Jump to content
  • 0

Merging a BIT and ELF files for the Zynq Processing System


Max_van_Daalen

Question

Hi all,

I've recently started to learn / play with Ada using the GNAT GPS 2017 IDE from AdaCore, so far on STM32 systems. I very much like Ada, I hadn't realised that it was such a capable low level development language and as a bonus strongly typed.

Anyway, in the free version of GPS, AdaCore supply "small" and "full" Ravenscar run-times for the Zynq. As an experiment, I've used GPS to write some Ada that compiles into an ELF and appears to be correctly built for "Zynq7 Processing System" (in terms of initialisation, vectors etc. Cleaned using an ELF viewing tool).

The one thing I can't figure out is how to merge the Ada ELF file with my Vivado BIT file. In Vivado I've built a simple processing example that uses a custom AXI component to operate the LEDs on my Zybo. I've written a C version of my Ada using the Vivado SDK.to make sure the BIT file works.

I can finds lots of posts on-line explaining how to merge BIT and ELF files for the MicrobBlaze processor, but nothing for the built-in Zynq ARM cores.

I had naively assumed it would be something you could do from within Vivado (you can for the MicroBlaze). I've tried to use the "updatemem" command but have struggled to find some of the input files that it requires and I'm not even sure if it will do what I want.

Does anyone have any suggestions?

Many thanks!

Max

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi @jpeyron,

Thanks for the reply!

I have made some progress... It appears that you can only merge bit-streams with ELFs intended for soft processors like MicroBlaze (in Vivado use "add sources" and then the tools "associate ELF files" option), but you can't do it for the Zynq's built in ARM cores.

So instead I've created a BOOT.ini file containing the FSBL, the bit-stream and the Ada ELF. I then boot this from an SD card and this works perfectly. I need to see if I can find a USB/JTAG driver for the AdaCore GPS IDE (not sure if this exists).

I now have a secondary problem, the Ada run-time doesn't seem to be able to access my custom AXI components. The C code generated by the SDK works, so I assume it's doing some additional initialisation. More fun!

Regards,

Max

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...