Placing variables at a specific location (address) using microblaze GCC

Hello,

I am trying to figure out the ins and outs of the MB-GCC compiler. I am not familiar with how to place variable at specific locations in memory. I have used the #pragma directive with other compilers to nail down variables to specific locations in memory.

Any help would be appreciated. I think that it may also be neccessary to create another section in memory using the linker. ie .text or .bss etc.

Thanks in adavance.

Jeremy

Reply to
JW
Loading thread data ...

Specify a new section for your variables, and add this section to your linker script with the fixed address.

E.g.: int fixed_data __attribute__ ((section ("YOURSECTION"))) = 0;

Reply to
Zolee

Thank you for your reply, I did finally find this information.

Reply to
JW

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.