From: Jesus Calvino-Fraga <JesusC@ec...> - 2006-03-26 22:38:39
Something along this lines may work:
void MINOR_VERSION (void) _naked
.area MY_VERSION (ABS)
At 10:29 AM 3/26/2006, you wrote:
>I want to place some data at a fixed memory location (in ROM).
>I already tried
>const uint8_t at 0xaffe MINOR_VERSION = 1;
>but it doesn't seem to do what I want.
From: Philipp Klaus Krause <pkk@sp...> - 2006-03-28 11:18:06
Jesus Calvino-Fraga wrote:
> Something along this lines may work:
> void MINOR_VERSION (void) _naked
> .area MY_VERSION (ABS)
> .org 0xaffe
> .db 0x01
Thanks; it works (when at the end of the file, otherwise everything in
the file is at 0xaffe), but changes the type of MY_VERSION from uint8_t
to void(* )(void).
I want to access MY_VERSION from both inside my code (where I'd prefer
it to have the type uint8_t) and from a peripheral, which can access the
memory (which is why I need the fixed location).
Get latest updates about Open Source Projects, Conferences and News.