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

Compiling software for both NRF52832 and NRF52840

I am currently developing firmware that needs to run on both 32 and 40 chips.

The basics of the situation is the firmware contains 3 'applications'. A flag in the UICR region determines what app should be loaded. One of these applications will be running on a 32 chip, the other 2 will be running on 40s. The main feature needed from the 40 is QSPI support, it uses the NRF_FICR->INFO.PART to make sure that the 40-specific features are not used on the 32.

The optimal outcome of this would be running the same softdevice and firmware on both chips. 

Would there be any issues running the 40 soft device on the 32 chips, assuming that no 40-specific features where used on the 32? (or vice versa)

My current thinking is to use the s40 and using a linker script similar to the 32 to make the compiler happy with the memory and flash regions when programming, and so the 40 features are enabled at compile time, tne verify the chip type at runtime.

Related