From: n5ac on
I have just constructed a bootloader for a Xilinx FPGA. I am trying to get
my main application converted to MCS using the flow described in XAPP482
(run data2mem and then xapp482.exe). The issue I'm having is that data2mem
seems to ignore .rodata and .data sections in the .elf file, leaving me
with uninitialized memory after a boot.

Is there a way to get data2mem to include these sections or is there
another way to read the ELF file and get it combined with an MCS file for
burning in the PROM that includes these sections?

Thanks,
Steve



---------------------------------------
Posted through http://www.FPGARelated.com
From: Petter Gustad on
"n5ac" <n5ac(a)n5ac.com> writes:

> Is there a way to get data2mem to include these sections or is there
> another way to read the ELF file and get it combined with an MCS file for
> burning in the PROM that includes these sections?

It's been a while since I used the Xilinx tools, but in general you
should be able to modify the linker script to put your .rodata into
..text or .css (or whatever data2mem will include).

Petter

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: n5ac on
>> Is there a way to get data2mem to include these sections or is there
>> another way to read the ELF file and get it combined with an MCS file
for
>> burning in the PROM that includes these sections?
>
>It's been a while since I used the Xilinx tools, but in general you
>should be able to modify the linker script to put your .rodata into
>.text or .css (or whatever data2mem will include).
>
>Petter

Petter -- not sure why I didn't think of this! I had been working with the
linker script but it didn't occur to me to place everything in .text. This
did fix the problem. Unfortunately I did have to add the .bss section which
is very large because of the structures I have in memory so this
significantly increases the size of my PROM image, but it did solve the
problem.

Thanks!

---------------------------------------
Posted through http://www.FPGARelated.com