We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
Aha. So if that is your problem, why are you spending your entire post (including the Summary line) discussing things that have nothing to do with code memory, much less the program counter?
Thanks for answer,
I am not experienced in scatter files scripting but is it posiible to split RAM memory in that way? Application is working fine without scatter file, that is why I posted it.
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.