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

Linker error when upgrading to SDK 17.0 from 15.2

I have moved my project over to SDK 17.0.  So far I have changed very little.

On compiling I straight away get a liner error: "Undefined reference to '__RAM1_segment_end__'"

This is on line117 of ses_startup_nrf_common.s

Code looks like this:

#ifndef STACK_INIT_VAL
#define STACK_INIT_VAL __RAM1_segment_end__
#endif

Reset_Handler:

  /* Perform prestart tasks. */
  b nRFInitialize

.thumb_func
afterInitialize:
  
#ifndef NO_STACK_INIT
  /* Initialise main stack */
  ldr r0, =STACK_INIT_VAL

Error is on last line of this code.

in my SDK15.2 I don't know how to see if STACK_INIT_VAL is defined, or where "__RAM1_segment_end__", so am a bit stuck.  Any ideas?

Parents
  • Hi,

    The first problem is described in the release notes for SDK 17.0.2:

    Compatibility of SES projects:
    
    Updates and fixes in the MDK used by Segger Embedded Studio break backwards compatibility
    with old SES project files.
    To use old projects in combination with this version of the SDK (MDK),
    make the following updates:
    
    1. In the flash_placement.xml file:
       MemorySegment name must be changed from "RAM" to "RAM1":
       <MemorySegment name="RAM1" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
    
    2. In the .emProject file:
       In "linker_section_placements_segments" you must refer to "RAM1", replacing "RAM":
       linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000"

    Can you check if following this also resolves your second problem? The .fs_data_run section should be defined in the flash_placement.xml file:

    <ProgramSection alignment="4" keep="Yes" load="No" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />

    Best regards,
    Jørgen

  • Hi Jorgen. I have same problem but there is  a difference. When i changed the 'Memory Settings', I have new linker error "cannot find run section .log_dynamic_data_run referenced in log_dynamic_data". 

  • Please check that you have the section defined in your flash_placement.xml file:

    <ProgramSection alignment="4" keep="Yes" load="No" name=".log_dynamic_data_run" address_symbol="__start_log_dynamic_data" end_symbol="__stop_log_dynamic_data" />

Reply Children
Related