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

Segger studio build mesh light_switch example got an error: undefined reference to `__RAM_segment_end__

Hi,

       I dowloaded mesh 5.0 sdk and open light_switch example project with SES which installed in a 64bit windows 10. 

       I set the SDK ROOT as following the step of online guide :https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v4.1.0%2Fmd_doc_getting_started_how_to_build.html&anchor=how_to_build_segger

       At last I build the project and got an error : 

1> D:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.40/gcc/arm-none-eabi/bin/ld: build/light_switch_client_nrf52840_xxAA_s140_7.2.0_Debug/obj/ses_startup_nrf_common.o: in function `afterInitialize':
1> D:\work\TianHuan\synsor\SRC\nRF5_SDK_16.0.0_98a08e2\modules\nrfx\mdk/ses_startup_nrf_common.s:110: undefined reference to `__RAM_segment_end__'
Build failed

       Checked the project option, the "Memory Segments" of linker page is set as :

   How to solve this problem??

Parents
  • Found root cause. Mesh-v5 source code changed the flash_placement.xml segment name from RAM to RAM1 !!! 

    Don't know why change such name, But it is really broken the SDK inheritable continuity and stability . Because SDK16 the SES start assemble source definition

    #define STACK_INIT_VAL __RAM_segment_end__

    must to be changed to 

    #define STACK_INIT_VAL __RAM1_segment_end__

    otherwise, 

    grep RAM1 . -nr -l -m 1 | xargs sed -i 's/RAM1/RAM/g'

    change all RAM1 back to RAM again.

Reply
  • Found root cause. Mesh-v5 source code changed the flash_placement.xml segment name from RAM to RAM1 !!! 

    Don't know why change such name, But it is really broken the SDK inheritable continuity and stability . Because SDK16 the SES start assemble source definition

    #define STACK_INIT_VAL __RAM_segment_end__

    must to be changed to 

    #define STACK_INIT_VAL __RAM1_segment_end__

    otherwise, 

    grep RAM1 . -nr -l -m 1 | xargs sed -i 's/RAM1/RAM/g'

    change all RAM1 back to RAM again.

Children
Related