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

nRF51822. Using QFAA (256kB) Code for QFAB (128kB)

Hi there,

I am using Eclipse and GCC (codesourcery) as development tools.

In the gcc makefile, once provided by Nordic with the "button_radio_example" are two lines, specifying the target chip:

TARGET_CHIP := NRF51822_QFAA_CA and DEVICE_VARIANT := xxaa

I recently changed my target chip to the 128kB Flash version, so those lines changed:

TARGET_CHIP := NRF51822_QFAB_B0 and DEVICE_VARIANT := xxab

It was weired, because the output file was completely the same (compared hash values of the files) like the one I compiled for the NRF51822_QFAA_G0.

Which differences are there in compiling anyway, and why are there two lines that need to be changed when changing the target chip? There did'nt seem to be a compiler error, when I use QFAA in TARGET_CHIP, and xxab as DEVICE_VARIANT.

Thanks in advance, Carl

Parents
  • Setting the correct device variant will ensure that the correct linker script is used by the linker. If you have a look at the Makefile.common line ~15 you'll see that which linker script is included is based on the DEVICE_VARIANT,USE_SOFTDEVICE, and DEVICESERIES variables.

    The only linker difference between xxaa and xxab is the flash size. So if you use the linker for xxaa on the xxab variant you will not get a warning if the 128K limit is exceeded.

Reply
  • Setting the correct device variant will ensure that the correct linker script is used by the linker. If you have a look at the Makefile.common line ~15 you'll see that which linker script is included is based on the DEVICE_VARIANT,USE_SOFTDEVICE, and DEVICESERIES variables.

    The only linker difference between xxaa and xxab is the flash size. So if you use the linker for xxaa on the xxab variant you will not get a warning if the 128K limit is exceeded.

Children
No Data
Related