UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
5,262 Views
Registered: ‎07-08-2016

Assembly code on the Zynq in Vivado SDK

Hi,

 

I was wondering if there is any materials on a assembling and running a simple assembly code (Thumb 2 preferred) application on the Zynq. I want to use the Zybo as a platform to teach a basic embedded systems course, and we always start with Assembly. 

 

Please advise. Thanks!

 

Brett

Tags (4)
0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
5,247 Views
Registered: ‎08-01-2008

Re: Assembly code on the Zynq in Vivado SDK

check these links
http://www.dbrss.org/zybo/
http://www.wiki.xilinx.com/Zynq+AP+SoC?responseToken=9fc0196077b8bd3eefd9cb6e89307599
https://www.xilinx.com/support/documentation-navigation/design-hubs/dh0050-zynq-7000-design-overview-hub.html
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Adventurer
Adventurer
5,231 Views
Registered: ‎07-08-2016

Re: Assembly code on the Zynq in Vivado SDK

@balkris I appreciate the response, but none of those resources have anything to do with assembly language programming on the Zynq. 

 

I would like to assemble and link an assembly program using the arm-none-eabi toolchain from the command line, just like you would on another ARM chip, and then use it to run a basic application on the Zynq. I don't want anything to do with PL or Vivado/SDK, just want to run a bare-bones application written in assembly. 

0 Kudos
Adventurer
Adventurer
5,221 Views
Registered: ‎07-08-2016

Re: Assembly code on the Zynq in Vivado SDK

I guess the title of this thread is a misnomer, since above I said I wanted a way to do it outside SDK. I guess I will rephrase my question as the following two questions: 

 

  1. Is it possible to compile and run C code for the Zynq, WITHOUT using the Xilinx toolchain?
  2. Is it possible to assemble and run ARM assembly code on the Zynq, WITHOUT using the Xilinx toolchain? By this I mean writing a program that does NOT use any of the Xilinx driver libraries or autogenerated init code (i.e. constructing your own simple vector table, giving definitions to the various exception handlers, etc.) 
  3. If not, is it possible to at least assemble and link ARM assembly code from within SDK?
0 Kudos
Visitor sampat76
Visitor
5,196 Views
Registered: ‎07-31-2016

Re: Assembly code on the Zynq in Vivado SDK

I doubt you can compile c applications for Zynq without Xilinx toolchain. If you want to create your own toolchain, refer to the resource page below:
https://www.xilinx.com/guest_resources/gnu/

Coming to your original question, you can use inline assembly commands in your c code. Check the answer record below for an example on MicroBlaze:
https://www.xilinx.com/support/answers/18561.html
0 Kudos
Adventurer
Adventurer
5,195 Views
Registered: ‎07-08-2016

Re: Assembly code on the Zynq in Vivado SDK

@sampat76 thanks for the response.

 

Hmmm thats interesting, since Xilinx does provide a tailored gcc-arm-none-eabi toolchain, that includes a c compiler, assembler, and linker...all that is missing is a way to get the .elf or .bitfile onto the board.

 

And I know about the inline assembly, but unfortunately that won't work for what we are looking for.

 

I find it hard to believe that there is absolutely no way to directly program the processors onboard the zynq, and frankly quite unfortunate :(

 

 

0 Kudos
Scholar ericv
Scholar
5,182 Views
Registered: ‎04-13-2015

Re: Assembly code on the Zynq in Vivado SDK

Xilink's tool-chain is Mentor Graphics branch of GCC called Code Sourcery.

You can also use the Linaro GCC branch or ARM's CC (Keil).

They will all generate code that can run on the Zynq.

 

If you don't want to us SDK, there are many solutions.

No products that are based on the Zynq require SDK :-)

The program can be loaded from a SD/MMC card, QSPI flash, NAND etc.

A quick search on Zynq Boot should give you plenty of options.

Regards