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

nrf_pwr_mgmt.c:78: undefined reference to `__start_pwr_mgmt_data' when using pwr management

Hello everyone, I am running a code with uart i2c interruption and power management but I have this error : nrf_pwr_mgmt.c:78: undefined reference to `__start_pwr_mgmt_data'

I already try to copie some code in the linker script but it doesn't work. Maybe I am doigt it wrong.

Thank you have a good day ! 

best regards,

Arnaud 

Parents
  • I'm hitting this problem too. Likely it is some dependency of the pwr_mgmt library that I haven't yet been able to find.

    SDK: 17.0.2; IDE: Segger SES

    I have already added the following files to my project:

    components/libraries/pwr_mgmt/nrf_pwr_mgmt.c
    components/libraries/experimental_section_vars/nrf_section_iter.c

    And these include paths in Preprocessor - User Include Directories:

    components/libraries/pwr_mgmt
    components/libraries/experimental_section_vars
    components/libraries/mutex

    And enabled the following in sdk_config.h:

    NRF_PWR_MGMT_ENABLED
    NRF_SECTION_ITER_ENABLED

    Anybody got an answer for this?

  • Well, here's the answer. Looks like this problem is specific to using SES IDE. How would any developer be expected to know this!! 

    A similar DevZone post about "undefined reference to '__fs_data_load_start__' " led me to suspect the flash_placement.xml file. Comparing that file in my project to the one in examples/peripheral/pwr_mgmt/ gave the solution.

    In file flash_placement.xml, the following line is needed (it should be after the name=".text" line):

     <ProgramSection alignment="4" keep="Yes" load="Yes" name=".pwr_mgmt_data" inputsections="*(SORT(.pwr_mgmt_data*))" address_symbol="__start_pwr_mgmt_data" end_symbol="__stop_pwr_mgmt_data" />

    Apparently, not all the example projects include this line (my project started with the blinky example).

Reply
  • Well, here's the answer. Looks like this problem is specific to using SES IDE. How would any developer be expected to know this!! 

    A similar DevZone post about "undefined reference to '__fs_data_load_start__' " led me to suspect the flash_placement.xml file. Comparing that file in my project to the one in examples/peripheral/pwr_mgmt/ gave the solution.

    In file flash_placement.xml, the following line is needed (it should be after the name=".text" line):

     <ProgramSection alignment="4" keep="Yes" load="Yes" name=".pwr_mgmt_data" inputsections="*(SORT(.pwr_mgmt_data*))" address_symbol="__start_pwr_mgmt_data" end_symbol="__stop_pwr_mgmt_data" />

    Apparently, not all the example projects include this line (my project started with the blinky example).

Children
No Data
Related