We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, All what i want to Store Table in certain address ..Can I?
I tried __a but Doesn't work :
ex: int x __a 0x00000100; error expecting a ";"
ANYWAY I want simple way to burn down some constant in memory at certain location..CAN I ??
thx
any particular reason why it has to be at a specific address?
It goes against the tide to allocate data storage manually. That's the compiler's job, so you need to make sure the compiler doesn't also use the same memory area.
You just need to use the following:
#include <absacc.h> int x __at(0x00000100);
Do a search for "locate variables to specific addresses" in the help.
Hope that helps.
"You just need to use the following"
But first you still need to answer the question of why you think it is necessary to fix the table at a specific location...
"But first you still need to answer the question of why you think it is necessary to fix the table at a specific location..."
By reading the posters original question, he wanted to know how to place a constant at a specific location in memory. So I answered him.
As to the question why is it necessary to fix a table at a specific location, surely that is up to the person who is writing the software in the first place? There are many reasons why you may need to do this (I have done this many times for sharing constants between multiple applications in flash) but it has nothing to do with the question that was asked in the first place.
The problem here is that a significant number of the posters who want to know how to do something, have based their question on a missunderstanding.
That is a reason why it isn't always enough to just answer their original question. Hence the very regular questions what problems OP are trying to solve.