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 !

Parents
  • I think the easiest way might be to just use the pca10040 (without the 'e') configuration with the same source code. That said, I think you were pretty close to achieve this with your pca10040e project. In addition to increasing the FLASH_PH_SIZE you need to change the total flash size in your "linker_section_placements_segments" macro.

    The original setting from ble_app_ancs_c_pca10040e_112.emProject file

          linker_section_placements_segments="FLASH RX 0x0 0x30000;RAM RWX 0x20000000 0x6000"

    must be changed to:

          linker_section_placements_segments="FLASH RX 0x0 0x38000;RAM RWX 0x20000000 0x6000"

Reply
  • I think the easiest way might be to just use the pca10040 (without the 'e') configuration with the same source code. That said, I think you were pretty close to achieve this with your pca10040e project. In addition to increasing the FLASH_PH_SIZE you need to change the total flash size in your "linker_section_placements_segments" macro.

    The original setting from ble_app_ancs_c_pca10040e_112.emProject file

          linker_section_placements_segments="FLASH RX 0x0 0x30000;RAM RWX 0x20000000 0x6000"

    must be changed to:

          linker_section_placements_segments="FLASH RX 0x0 0x38000;RAM RWX 0x20000000 0x6000"

Children
Related