I am working with a large amount of data using s Mega processor and I need to put in PROGMEM.
I am instructing the compiler to place the data in Sections .fini9, .fini8 and .fini7. I am also instructing the compiler to place the data after the program data using the following:
#define PROGMEM_Late1 __attribute_ ((__section(".fini9") ))
and that is working. I know this because my program continues to work even when the data involved is larger than 64k.
The problem I am having is that the data is getting corrupted when the data crosses over a 64k boundary. To fix this problem I want to force the compiler/linker to place the sections at specific memory locations.
The "avr" manual says I can do this with a "-W1" command. The "avr" manual says that the command can be used from the "C" compiler using the following command:
-W1,--section-start=.fini9=0xfa01 // 64k -W1,--section-start=.fini8=0x1f401 // 128k -W1,--section-start=.fini7=0x2ee01 // 192k
I can't get it to compile. I have tried all of the following:
& avr -W1,--section-start=.fini9=0xfa00 avr-W1,--section-start=.fini9=0xfa00
I have placed the command in the "Setup" loop as well as at the top of the program where my #include and #define statements are located.
Can this be done from the compiler and if so how??