Hi I have CortexM4 with external ram, since the external ram is slower than internally, I would like to have the possibility to place a variable in external ram. But I don't wan't to specify a exact adress of it. Is there a attribute to set at the variable to place it in external ram ? Lars
Hi I have done that know, but I'm not sure that the compiler does what i wont it to. I have defined this:
int my_var __attribute__ ((__section__("RAM1"))); #define ExInt(x) int x __attribute__ ((__section__("RAM1"))); ExInt(my_int); uint8 PowerLed __attribute__ ((__section__("RAM1"))) = Color_Green;
I have set RAM1 to start at 0x60000000, when i open the map file i find that: Symbol Name Value Ov Type Size Object(Section) PowerLed 0x1fff04ec Data 1 nib.o(RAM1) my_var 0x1fff04f0 Data 4 nib.o(RAM1) my_int 0x1fff04f4 Data 4 nib.o(RAM1) I'm not sure that it is done the way i wish.
Lars
If you check/use the [Use Memory Layout from Target Dialog]
Then you can use the [Options for file 'filename.c']
Right Click the 'filename.c', choose the [Options for file 'filename.c'], you would see a dialog.
Use that dialog.
Hi That doesn't place the variables in external memory. My external memmory (RAM1) starts at 0x60000000, but variables are always placed into IRAM1 from 0x1FFF0000. What am i doing wrong ?