Howdy All,
I have some variables at fixed memory locations using
unsigned char spriteRam[256*8] __attribute__ ((section (".spriteram"))); unsigned char vram[32*28] __attribute__ ((section (".vram"))); unsigned char trigtable[64] __attribute__ ((section (".trigtable")));
and a makefile with this
LDFLAGS += -Wl,--section-start=.spriteram=0x00800400 LDFLAGS += -Wl,--section-start=.vram=0x00800C00 LDFLAGS += -Wl,--section-start=.trigtable=0x00800F80
I had an issue with the HEX file having the 0x8n000000 memory locations in it.
So I did a bit of searching and reading and worked out I could add this to the avr-objcopy section of the makefile
HEX_FLASH_FLAGS += -R .spriteram HEX_FLASH_FLAGS += -R .vram HEX_FLASH_FLAGS += -R .trigtable
I tried to find out in the manual pages for avr-objcopy but did not find anything. Is there a way to just remove/ignore the RAM/EEPROM addresses when making a hex file. Or do i have to add each section I create?
It does not really kill me to add them. I just would like to do it the "preferred way" if there is one.