[arm-gnu] Placing variable at absolute address in RAM
Tom Evans
tom_usenet at optusnet.com.au
Thu Apr 5 05:24:24 UTC 2012
JM wrote:
> Hello
>
> I've researched this, asked on other forums, and so far I'm no closer.
>
> I'm trying to place a variable at a specific address in RAM on a TI ARM
> Cortex-M3. I have good reason for doing so, which I can explain briefly:
How about just calling malloc() in a loop until you get an allocation
that matches all of your addressing requirements, and then free all the
ones that didn't. Brutal, but it should work if called very early on in
your startup before anything else has got to malloc().
If you don't have "malloc" then you should have something similar
managing your heap that could be abused to do this for you.
Tom
More information about the arm-gnu
mailing list