This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Placing a range of variables in external ram

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

Parents
  • 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

Reply
  • 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

Children