I'm using a pynq-z1 board where i'm placing a CM1 soft proccessor and i want to load the code that would be executed by the CM1 on the DDR RAM of the pynq's PS so the CM1 could read the code from there.
I'm able to tell the CM1 (in keil uVision) that the ROM is external and is is the address that correspond to the PS RAM but i don't know how to extract the code itself from the .elf generated when building the proyect in the Keil and load it directly on the RAM of the PS.
I'm not sure if what i say makes sense or if i missing some steps.
Could you please give some hints?
Thanks in advance and best regards,
I am not sure if I get your question, but it sounds you want to have the pure code, not the ELF with all the stuff. There is a tool called "fromelf" which you can use to get the raw binary.But the MDK should be able to load the ELF via JTAG into the PS-RAM. Did you try this?
First of all, thanks for answering, I really appreciate that.
Yeah, my idea is to generate an ELF with all the information that the CM1 needs to know it has to run code from a certain address on the PS-RAM and all that stuff but without the code itself, because i want that code to be in the PS-RAM.
So I'm trying to generate this ELF without the code, then a file with the code of the CM1 to be loaded in the PS A9-RAM (i guess its abinary file, but I'm not really sure if its true or even how to loade it in the A9-RAM) and then with some tcl files that come with the CM1 download I'll make a bitstream out from that ELF that would be loaded in the board with another ELF with the A9 code (because i'm using both the CM1 and the A9) using the xilinx SDK.
The main problem is that I don't know how to get an ELF without the code and how to generate another file just with the code, also I'm not sure about which format should have the code file to be loaded in the A9 RAM and how to load it there,
About the fromelf… i know it exist and i read about the --only that probably is the way to get just the parts i want on the file... but i don¡t know exacly which parts should I include or not include in these two files (ELF os the CM1 without code and X-format CM1 code file to be loaded in the A9-RAM).
Could you give me any hint on that?