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

Extra flash when emulating 52810 (to allow debugging with Optimization=none)

I compiled and debugged the PCA10040e ANCS example (ie emulating the 52810 using the 52832) from SDK 15.3 - successfully. But I wanted to turn off code optimization to facilitate debugging. That seems to bring the solution over the flash size limit of the 52810.

How can I cheat and allow emulating the 52810 which (temporarily, for debugging) taking advantage of the 52832's larger flash ?

So after adding a debug configuration in the .emProject file via

<configuration Name="Debug"
c_preprocessor_definitions="DEBUG; DEBUG_NRF"
gcc_optimization_level="None"/>

I get ".text too large to fit in FLASH memory segment" during linking. So I tried to modify the 

linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x38000;

and bumped the FLASH_PH_SIZE a little (from 0x30000). It will link now, but the J-Link reports a "Error reported. Failed to download application. Generic error." 

Any ideas ? How could I temporarily use more flash while emulating the 52810 ?

Thanks !