This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error in Linker script setup for SD110 v8, SDK v8.1

Hello,

Some questions regarding the linker script for the 8.1 SDK for SD110.

I was able to get an environment set up with ARM GCC, Make, etc. and compiled my program using the V7 SDK (for which it was written). I was able to resolve all of the issues in migrating to the 8.1 SDK and the program now compiles. However...

  1. What was previously under ./components/toolchain/gcc/*.ld had different versions for xxac, s110, s120, etc. These were removed. Is it now expected to copy "nrf51_xxac.ld" into the project directory and customize that?

  2. After compiling, and flashing, with the SD v8 already flashed, the eponymous error in writing to region 0 occurs. Great! I've seen that, and know how to resolve it -

    APP_CODE_BASE is 0x00018000 Total FLASH for QFAC is 256kB. 1kB = 1024 Bytes - that's 0x40000 total. So, the application ORIGIN is 0x00018000 and the length is 0x40000 - 0x00018000 - or 0x28000

    Flash line in linker script - FLASH (rx) : ORIGIN = 0x00018000, LENGTH = 0x28000

    APP_RAM_BASE is 0x20002000 Total RAM for QFAC is 32kB. That's 0x8000 total. RAM base is 0x20000000, so the SD uses 0x2000 of the 0x8000. That leaves 0x6000 for our application RAM length.

    RAM line in linker script - RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x6000

After the above settings, I still see the region 0 error. Why is this? The linker script matches exactly the values I would have put into Keil, and the process I used was the same as described in the SD specification (and which worked perfectly before, when I needed to update the addresses because there were many conflicting numbers floating around on the forums).

Are SD v8 and SDK v8.0 compatible? Am I missing something in the region calculations above?

Thanks, -Alex

Parents Reply Children
No Data
Related