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

Splitting RAM memory into segments

Hello All,

I am developing code for STM32F207 ARM microprocessor. Application has two types of variables that need to be separated in different RAM memory segments. I declare variable like this:

uint32_t uiTestVar1 __attribute__((section("SafeRegion"))) = 0xA0A1;

and have created a scatter file:

LR_IROM1 0x8000000 0x80000{
  RO_CODE 0x8000000 0x80000{
    *(+RO)
  }
  RW_IRAM1 0x20000000 0x00080000{
    *(SafeRegion)
  }
  RW_IRAM2 0x20080000 0x00080000{
    *(+RW +ZI)
  }
}

Still when I run the application in the debug mode, it looks that the program counter is pointing to 0x00000000 undefined.

Please help on how to fix this problem?

Is it possible to place larger number of variables in the safe region using:
#pragma arm section rwdata = "SafeRegion" ?

Thanks,
Guillermo

Parents
  • That means you changed at least two things in a single step (introduced a self-written 1scatter file, and split RAM regions), and now something's gone wrong. That strategy is bad. You want to change one thing at a time.

    So you should really start with creating your own, working scatter file first. Once you've got that up and running, come back to how you might split RAM regions.

    On the surface of it, it looks wrong that you have your RAM sections inside the ROM one --- and specified the same ROM address on top of that.

Reply
  • That means you changed at least two things in a single step (introduced a self-written 1scatter file, and split RAM regions), and now something's gone wrong. That strategy is bad. You want to change one thing at a time.

    So you should really start with creating your own, working scatter file first. Once you've got that up and running, come back to how you might split RAM regions.

    On the surface of it, it looks wrong that you have your RAM sections inside the ROM one --- and specified the same ROM address on top of that.

Children
No data