[AVR] Specify location of __attribute__((__progmem__))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to write some code on an AVR64DD32 CPU that modifies its own flash content at runtime.

I use the __attribute__((__progmem__)) to specify that my variable shall be in the flash memory. This works, however it places the default content into the beginning of the flash right after the interrupt vectors which belongs to APPCODE space.

The datasheet says that I can't modify APPCODE space from APPCODE, and I need to put those to APPDATA space. The address of it is defined by a fuse bytes (in my case it is 0xC000).

So the question is how can I instruct the linker to put my variable to a specific location in the Flash memory?


Thanks,
Levente

--
Levente Kovacs
Senior Electronic Engineer

W: http://levente.logonex.eu



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux