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

Scatter File Memory Confusion

I am using Keil uVision with an LM3S6965. I am trying to place a status string in flash on a cortex M3. I want it to be near the end of flash. I am using the following inside my program:

const char completeString[] __attribute__((at(0x3FF00))) = "stat";

And the scatter file looks like this:

LR_IROM1 0x00002000 0x0003E000 ; load region size_region
{ ER_IROM1 0x00002000 0x0003E000 ; load address = execution address { *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) }

RW_IRAM1 0x20000000 0x00010000 ; RW data { .ANY (+RW +ZI) }
}

This works, but I would like to put the status string at 0x3FFF0, but when I try to do that the linker complains that the image is too big. It seems to think that the image is only allowed to be 0x3E000, but isn't it really 0x2000 + 0x3E000 = 0x40000? The chip has 0x40000 flash.

I tried just changing the 0x3E000 to 0x40000 in the scatter file, and the location of the string to 0x3FFF0, but when I do that it builds fine, but Keil won't load the program. It says the flash times out.

What am I missing here?

0