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

Jun 07, 2005 2 Replies

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



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;

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required