Issue in compiling - getting error for Unplaced _section

Hi team ,

I am using 15.3 sdk and NRF52832 hardware. and Tool - SEGGER Embedded Studio for ARM 4.30c

I have developed code with DFU feature and and generated .hex file  - app_bootloader_and_setting.hex and DFU .zip file for application to over the air firmware update.

and its working.

Now wanted to change some part of  the code but getting following error.

Rebuilding ‘ble_app_buttonless_dfu_pca10040e_s112’ from solution ‘ble_app_buttonless_dfu_pca10040e_s112’ in configuration ‘Release’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/thumb_crt0.o does not exist.
  Assembling ‘thumb_crt0.s’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_backend_rtt.o does not exist.
  Compiling ‘nrf_log_backend_rtt.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_backend_serial.o does not exist.
  Compiling ‘nrf_log_backend_serial.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_backend_uart.o does not exist.
  Compiling ‘nrf_log_backend_uart.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_default_backends.o does not exist.
  Compiling ‘nrf_log_default_backends.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_frontend.o does not exist.
  Compiling ‘nrf_log_frontend.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_str_formatter.o does not exist.
  Compiling ‘nrf_log_str_formatter.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/boards.o does not exist.
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ses_startup_nrf52810.o does not exist.
  Assembling ‘ses_startup_nrf52810.s’
  Compiling ‘boards.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ses_startup_nrf_common.o does not exist.
  Assembling ‘ses_startup_nrf_common.s’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/system_nrf52810.o does not exist.
  Compiling ‘system_nrf52810.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_button.o does not exist.
  Compiling ‘app_button.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_error.o does not exist.
  Compiling ‘app_error.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_error_handler_gcc.o does not exist.
  Compiling ‘app_error_handler_gcc.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_error_weak.o does not exist.
  Compiling ‘app_error_weak.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_scheduler.o does not exist.
  Compiling ‘app_scheduler.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_timer.o does not exist.
  Compiling ‘app_timer.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_util_platform.o does not exist.
  Compiling ‘app_util_platform.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/crc16.o does not exist.
  Compiling ‘crc16.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/fds.o does not exist.
  Compiling ‘fds.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_assert.o does not exist.
  Compiling ‘nrf_assert.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_atfifo.o does not exist.
  Compiling ‘nrf_atfifo.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_atflags.o does not exist.
  Compiling ‘nrf_atflags.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_atomic.o does not exist.
  Compiling ‘nrf_atomic.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_balloc.o does not exist.
  Compiling ‘nrf_balloc.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_fprintf.o does not exist.
  Compiling ‘nrf_fprintf.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_fprintf_format.o does not exist.
  Compiling ‘nrf_fprintf_format.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_fstorage.o does not exist.
  Compiling ‘nrf_fstorage.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_fstorage_sd.o does not exist.
  Compiling ‘nrf_fstorage_sd.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_memobj.o does not exist.
  Compiling ‘nrf_memobj.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_pwr_mgmt.o does not exist.
  Compiling ‘nrf_pwr_mgmt.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_ringbuf.o does not exist.
  Compiling ‘nrf_ringbuf.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_section_iter.o does not exist.
  Compiling ‘nrf_section_iter.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_strerror.o does not exist.
  Compiling ‘nrf_strerror.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/sensorsim.o does not exist.
  Compiling ‘sensorsim.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_drv_clock.o does not exist.
  Compiling ‘nrf_drv_clock.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_drv_uart.o does not exist.
  Compiling ‘nrf_drv_uart.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_atomic.o does not exist.
  Compiling ‘nrfx_atomic.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_clock.o does not exist.
  Compiling ‘nrfx_clock.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_gpiote.o does not exist.
  Compiling ‘nrfx_gpiote.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_prs.o does not exist.
  Compiling ‘nrfx_prs.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_uart.o does not exist.
  Compiling ‘nrfx_uart.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_uarte.o does not exist.
  Compiling ‘nrfx_uarte.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrfx_saadc.o does not exist.
  Compiling ‘nrfx_saadc.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/bsp.o does not exist.
  Compiling ‘bsp.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/bsp_btn_ble.o does not exist.
  Compiling ‘bsp_btn_ble.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/main.o does not exist.
  Compiling ‘main.c’
    assignment to 'uint8_t *' {aka 'unsigned char *'} from 'uint8_t' {aka 'unsigned char'} makes pointer from integer without a cast [-Wint-conversion]
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_dfu_svci.o does not exist.
  Compiling ‘nrf_dfu_svci.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/SEGGER_RTT.o does not exist.
  Compiling ‘SEGGER_RTT.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/SEGGER_RTT_Syscalls_SES.o does not exist.
  Compiling ‘SEGGER_RTT_Syscalls_SES.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/SEGGER_RTT_printf.o does not exist.
  Compiling ‘SEGGER_RTT_printf.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/auth_status_tracker.o does not exist.
  Compiling ‘auth_status_tracker.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_advdata.o does not exist.
  Compiling ‘ble_advdata.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_advertising.o does not exist.
  Compiling ‘ble_advertising.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_conn_params.o does not exist.
  Compiling ‘ble_conn_params.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_conn_state.o does not exist.
  Compiling ‘ble_conn_state.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_srv_common.o does not exist.
  Compiling ‘ble_srv_common.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/gatt_cache_manager.o does not exist.
  Compiling ‘gatt_cache_manager.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/gatts_cache_manager.o does not exist.
  Compiling ‘gatts_cache_manager.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/id_manager.o does not exist.
  Compiling ‘id_manager.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_ble_gatt.o does not exist.
  Compiling ‘nrf_ble_gatt.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_ble_qwr.o does not exist.
  Compiling ‘nrf_ble_qwr.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_data_storage.o does not exist.
  Compiling ‘peer_data_storage.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_database.o does not exist.
  Compiling ‘peer_database.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_id.o does not exist.
  Compiling ‘peer_id.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/pm_buffer.o does not exist.
  Compiling ‘pm_buffer.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/security_dispatcher.o does not exist.
  Compiling ‘security_dispatcher.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/security_manager.o does not exist.
  Compiling ‘security_manager.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_manager_handler.o does not exist.
  Compiling ‘peer_manager_handler.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_dfu.o does not exist.
  Compiling ‘ble_dfu.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_dfu_bonded.o does not exist.
  Compiling ‘ble_dfu_bonded.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_dfu_unbonded.o does not exist.
  Compiling ‘ble_dfu_unbonded.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o does not exist.
  Compiling ‘nrf_sdh.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh_ble.o does not exist.
  Compiling ‘nrf_sdh_ble.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh_soc.o does not exist.
  Compiling ‘nrf_sdh_soc.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_tps.o does not exist.
  Compiling ‘ble_tps.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_cus.o does not exist.
  Compiling ‘ble_cus.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_bas.o does not exist.
  Compiling ‘ble_bas.c’
  Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ble_dis.o does not exist.
  Compiling ‘ble_dis.c’
  Output/Release/Exe/ble_app_buttonless_dfu_pca10040e_s112.elf does not exist.
  Generating linker script ‘ble_app_buttonless_dfu_pca10040e_s112.ld’
  Linking ble_app_buttonless_dfu_pca10040e_s112.elf
    Output/Release/Exe/ble_app_buttonless_dfu_pca10040e_s112.elf section `.init' will not fit in region `UNPLACED_SECTIONS'
    region `UNPLACED_SECTIONS' overflowed by 32905 bytes
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/thumb_crt0.o: in function `memory_set':
    (.init+0xe4): undefined reference to `__stack_end__'
    (.init+0xe8): undefined reference to `__stack_start__'
    (.init+0xec): undefined reference to `__stack_process_end__'
    (.init+0xf0): undefined reference to `__stack_process_start__'
    (.init+0xf4): undefined reference to `__data_load_start__'
    (.init+0xf8): undefined reference to `__data_start__'
    (.init+0xfc): undefined reference to `__data_end__'
    (.init+0x100): undefined reference to `__text_load_start__'
    (.init+0x104): undefined reference to `__text_start__'
    (.init+0x108): undefined reference to `__text_end__'
    (.init+0x10c): undefined reference to `__fast_load_start__'
    (.init+0x110): undefined reference to `__fast_start__'
    (.init+0x114): undefined reference to `__fast_end__'
    (.init+0x118): undefined reference to `__ctors_load_start__'
    (.init+0x11c): undefined reference to `__ctors_start__'
    (.init+0x120): undefined reference to `__ctors_end__'
    (.init+0x124): undefined reference to `__dtors_load_start__'
    (.init+0x128): undefined reference to `__dtors_start__'
    (.init+0x12c): undefined reference to `__dtors_end__'
    (.init+0x130): undefined reference to `__rodata_load_start__'
    (.init+0x134): undefined reference to `__rodata_start__'
    (.init+0x138): undefined reference to `__rodata_end__'
    (.init+0x13c): undefined reference to `__tdata_load_start__'
    (.init+0x140): undefined reference to `__tdata_start__'
    (.init+0x144): undefined reference to `__tdata_end__'
    (.init+0x148): undefined reference to `__fs_data_load_start__'
    (.init+0x14c): undefined reference to `__fs_data_start__'
    (.init+0x150): undefined reference to `__fs_data_end__'
    (.init+0x154): undefined reference to `__bss_start__'
    (.init+0x158): undefined reference to `__bss_end__'
    (.init+0x15c): undefined reference to `__tbss_start__'
    (.init+0x160): undefined reference to `__tbss_end__'
    (.init+0x164): undefined reference to `__heap_start__'
    (.init+0x168): undefined reference to `__heap_end__'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ses_startup_nrf52810.o: in function `_vectors':
    (.vectors+0x0): undefined reference to `__stack_end__'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/ses_startup_nrf_common.o: in function `InitializeUserMemorySections':
    (.init+0x40): undefined reference to `__start_nrf_sections'
    (.init+0x44): undefined reference to `__start_nrf_sections_run'
    (.init+0x48): undefined reference to `__end_nrf_sections_run'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_frontend.o: in function `nrf_log_module_name_get':
    nrf_log_frontend.c:(.text.nrf_log_module_name_get+0x2c): undefined reference to `__start_log_const_data'
    nrf_log_frontend.c:(.text.nrf_log_module_name_get+0x30): undefined reference to `__stop_log_const_data'
    nrf_log_frontend.c:(.text.nrf_log_module_name_get+0x34): undefined reference to `__start_log_dynamic_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_frontend.o: in function `nrf_log_color_id_get':
    nrf_log_frontend.c:(.text.nrf_log_color_id_get+0x28): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_log_frontend.o: in function `nrf_log_frontend_dequeue':
    nrf_log_frontend.c:(.text.nrf_log_frontend_dequeue+0x218): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/app_error_weak.o: in function `app_error_fault_handler':
    app_error_weak.c:(.text.app_error_fault_handler+0x54): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_fstorage.o: in function `nrf_fstorage_write':
    nrf_fstorage.c:(.text.nrf_fstorage_write+0xfc): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_fstorage.o: in function `nrf_fstorage_erase':
    nrf_fstorage.c:(.text.nrf_fstorage_erase+0xb0): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/main.o:main.c:(.text.disconnect+0x2c): more undefined references to `__start_log_const_data' follow
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/main.o: in function `main':
    main.c:(.text.startup.main+0x1ae): undefined reference to `pm_init'
    main.c:(.text.startup.main+0x1e0): undefined reference to `pm_sec_params_set'
    main.c:(.text.startup.main+0x1ec): undefined reference to `pm_register'
    main.c:(.text.startup.main+0x264): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_manager_handler.o: in function `_conn_secure':
    peer_manager_handler.c:(.text._conn_secure+0x8): undefined reference to `pm_conn_sec_status_get'
    peer_manager_handler.c:(.text._conn_secure+0x26): undefined reference to `pm_conn_secure'
    peer_manager_handler.c:(.text._conn_secure+0xac): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_manager_handler.o: in function `pm_handler_flash_clean':
    peer_manager_handler.c:(.text.pm_handler_flash_clean+0x2a): undefined reference to `pm_peer_rank_highest'
    peer_manager_handler.c:(.text.pm_handler_flash_clean+0xb8): undefined reference to `pm_peer_ranks_get'
    peer_manager_handler.c:(.text.pm_handler_flash_clean+0xd0): undefined reference to `pm_peer_delete'
    peer_manager_handler.c:(.text.pm_handler_flash_clean+0x194): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_manager_handler.o: in function `pm_handler_pm_evt_log':
    peer_manager_handler.c:(.text.pm_handler_pm_evt_log+0x1a0): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/peer_manager_handler.o: in function `pm_handler_on_pm_evt':
    peer_manager_handler.c:(.text.pm_handler_on_pm_evt+0x3c): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_dfu_svci.o: in function `nrf_dfu_svci_vector_table_set':
    nrf_dfu_svci.c:(.text.nrf_dfu_svci_vector_table_set+0x58): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_dfu_svci.o: in function `nrf_dfu_svci_vector_table_unset':
    nrf_dfu_svci.c:(.text.nrf_dfu_svci_vector_table_unset+0x30): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o:(.rodata.sdh_req_observers+0x0): undefined reference to `__start_sdh_req_observers'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o:(.rodata.sdh_req_observers+0x4): undefined reference to `__stop_sdh_req_observers'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o:(.rodata.sdh_stack_observers+0x0): undefined reference to `__start_sdh_stack_observers'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o:(.rodata.sdh_stack_observers+0x4): undefined reference to `__stop_sdh_stack_observers'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o:(.rodata.sdh_state_observers+0x0): undefined reference to `__start_sdh_state_observers'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh.o:(.rodata.sdh_state_observers+0x4): undefined reference to `__stop_sdh_state_observers'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh_ble.o: in function `nrf_sdh_ble_default_cfg_set':
    nrf_sdh_ble.c:(.text.nrf_sdh_ble_default_cfg_set+0x140): undefined reference to `__app_ram_start__'
    nrf_sdh_ble.c:(.text.nrf_sdh_ble_default_cfg_set+0x144): undefined reference to `__start_log_const_data'
    Output/ble_app_buttonless_dfu_pca10040e_s112 Release/Obj/nrf_sdh_ble.o: in function `nrf_sdh_ble_enable':
    nrf_sdh_ble.c:(.text.nrf_sdh_ble_enable+0x78): undefined reference to `__start_log_const_data'
Build failed

My flash_placement.xml

<!DOCTYPE Linker_Placement_File>
<Root name="Flash Section Placement">
  <MemorySegment name="FLASH" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
    <ProgramSection load="no" name=".reserved_flash" start="$(FLASH_PH_START)" size="$(FLASH_START)-$(FLASH_PH_START)" />
    <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START)" />
    <ProgramSection alignment="4" load="Yes" name=".init" />
    <ProgramSection alignment="4" load="Yes" name=".init_rodata" />
    <ProgramSection alignment="4" load="Yes" name=".text" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_ble_observers" inputsections="*(SORT(.sdh_ble_observers*))" address_symbol="__start_sdh_ble_observers" end_symbol="__stop_sdh_ble_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_soc_observers" inputsections="*(SORT(.sdh_soc_observers*))" address_symbol="__start_sdh_soc_observers" end_symbol="__stop_sdh_soc_observers" />
    <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" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_queue" inputsections="*(.nrf_queue*)" address_symbol="__start_nrf_queue" end_symbol="__stop_nrf_queue" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_const_data" inputsections="*(SORT(.log_const_data*))" address_symbol="__start_log_const_data" end_symbol="__stop_log_const_data" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_req_observers" inputsections="*(SORT(.sdh_req_observers*))" address_symbol="__start_sdh_req_observers" end_symbol="__stop_sdh_req_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_state_observers" inputsections="*(SORT(.sdh_state_observers*))" address_symbol="__start_sdh_state_observers" end_symbol="__stop_sdh_state_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_stack_observers" inputsections="*(SORT(.sdh_stack_observers*))" address_symbol="__start_sdh_stack_observers" end_symbol="__stop_sdh_stack_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_backends" inputsections="*(SORT(.log_backends*))" address_symbol="__start_log_backends" end_symbol="__stop_log_backends" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_balloc" inputsections="*(.nrf_balloc*)" address_symbol="__start_nrf_balloc" end_symbol="__stop_nrf_balloc" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_dynamic_data"  inputsections="*(SORT(.log_dynamic_data*))" runin=".log_dynamic_data_run"/>
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_filter_data"  inputsections="*(SORT(.log_filter_data*))" runin=".log_filter_data_run"/>
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".fs_data"  inputsections="*(.fs_data*)" runin=".fs_data_run"/>
    <ProgramSection alignment="4" load="Yes" name=".dtors" />
    <ProgramSection alignment="4" load="Yes" name=".ctors" />
    <ProgramSection alignment="4" load="Yes" name=".rodata" />
    <ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" />
    <ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" />
    <ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" />
    <ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
  </MemorySegment>
  <MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
    <ProgramSection load="no" name=".reserved_ram" start="$(RAM_PH_START)" size="$(RAM_START)-$(RAM_PH_START)" />
    <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START)" address_symbol="__app_ram_start__"/>
    <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run" address_symbol="__start_nrf_sections_run" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".log_dynamic_data_run" address_symbol="__start_log_dynamic_data" end_symbol="__stop_log_dynamic_data" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".log_filter_data_run" address_symbol="__start_log_filter_data" end_symbol="__stop_log_filter_data" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run_end" address_symbol="__end_nrf_sections_run" />
    <ProgramSection alignment="4" load="No" name=".fast_run" />
    <ProgramSection alignment="4" load="No" name=".data_run" />
    <ProgramSection alignment="4" load="No" name=".tdata_run" />
    <ProgramSection alignment="4" load="No" name=".bss" />
    <ProgramSection alignment="4" load="No" name=".tbss" />
    <ProgramSection alignment="4" load="No" name=".non_init" />
    <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" />
    <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack"  address_symbol="__StackLimit" end_symbol="__StackTop"/>
    <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
  </MemorySegment>
  <MemorySegment name="uicr_bootloader_start_address" start="0x00000FF8" size="0x4">
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_bootloader_start_address" address_symbol="__start_uicr_bootloader_start_address" end_symbol="__stop_uicr_bootloader_start_address" start = "0x00000FF8" size="0x4" />
  </MemorySegment>
</Root>

thumb_crt0.s

// **********************************************************************
// *                    SEGGER Microcontroller GmbH                     *
// *                        The Embedded Experts                        *
// **********************************************************************
// *                                                                    *
// *            (c) 2014 - 2019 SEGGER Microcontroller GmbH             *
// *            (c) 2001 - 2019 Rowley Associates Limited               *
// *                                                                    *
// *           www.segger.com     Support: [email protected]           *
// *                                                                    *
// **********************************************************************
// *                                                                    *
// * All rights reserved.                                               *
// *                                                                    *
// * Redistribution and use in source and binary forms, with or         *
// * without modification, are permitted provided that the following    *
// * conditions are met:                                                *
// *                                                                    *
// * - Redistributions of source code must retain the above copyright   *
// *   notice, this list of conditions and the following disclaimer.    *
// *                                                                    *
// * - Neither the name of SEGGER Microcontroller GmbH                  *
// *   nor the names of its contributors may be used to endorse or      *
// *   promote products derived from this software without specific     *
// *   prior written permission.                                        *
// *                                                                    *
// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND             *
// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,        *
// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF           *
// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE           *
// * DISCLAIMED.                                                        *
// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR        *
// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR           *
// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT  *
// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;    *
// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF      *
// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT          *
// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE  *
// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH   *
// * DAMAGE.                                                            *
// *                                                                    *
// **********************************************************************
//
//
//                           Preprocessor Definitions
//                           ------------------------
// APP_ENTRY_POINT
//
//   Defines the application entry point function, if undefined this setting
//   defaults to "main".
//
// INITIALIZE_STACK
//
//   If defined, the contents of the stack will be initialized to a the
//   value 0xCC.
//
// INITIALIZE_SECONDARY_SECTIONS
//
//   If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized.
//
// INITIALIZE_TCM_SECTIONS
//
//   If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections 
//   will be initialized.
//
// INITIALIZE_USER_SECTIONS
//
//   If defined, the function InitializeUserMemorySections will be called prior
//   to entering main in order to allow the user to initialize any user defined
//   memory sections.
//
// FULL_LIBRARY
//
//   If defined then 
//     - argc, argv are setup by the debug_getargs.
//     - the exit symbol is defined and executes on return from main.
//     - the exit symbol calls destructors, atexit functions and then debug_exit.
//  
//   If not defined then
//     - argc and argv are zero.
//     - the exit symbol is defined, executes on return from main and loops
//
// STACK_CHECK
//
//   If defined will set the v8m msplim/psplim registers to the start of the stacks
//
// RETURN_FROM_CRT0
//
//   If defined, carry out a return to link register on application exit.
//


#ifndef APP_ENTRY_POINT
#define APP_ENTRY_POINT main
#endif

#ifndef ARGSSPACE
#define ARGSSPACE 128
#endif
  .syntax unified

  .global _start
  .extern APP_ENTRY_POINT
  .global exit
  .weak exit

#ifdef INITIALIZE_USER_SECTIONS
  .extern InitializeUserMemorySections
#endif

  .section .init, "ax"
  .code 16
  .balign 2
  .thumb_func

_start:
  /* Set up main stack if size > 0 */
  ldr r1, =__stack_end__
  ldr r0, =__stack_start__
  subs r2, r1, r0
  beq 1f
#ifdef __ARM_EABI__
  movs r2, #0x7
  bics r1, r2
#endif
  mov sp, r1
#ifdef RETURN_FROM_CRT0
  push {lr}
#endif
#ifdef INITIALIZE_STACK
  movs r2, #0xCC
  ldr r0, =__stack_start__
  bl memory_set
#endif
#ifdef STACK_CHECK
  ldr r0, =__stack_start__
  msr msplim, r0
#endif
1:
  /* Set up process stack if size > 0 */
  ldr r1, =__stack_process_end__
  ldr r0, =__stack_process_start__
  subs r2, r1, r0
  beq 1f
#ifdef __ARM_EABI__
  movs r2, #0x7
  bics r1, r2
#endif
  msr psp, r1
  movs r2, #2
  msr control, r2
#ifdef INITIALIZE_STACK
  movs r2, #0xCC
  bl memory_set
#endif
#ifdef STACK_CHECK
  ldr r0, =__stack_process_start__
  msr psplim, r0
#endif
1:

  /* Copy initialized memory sections into RAM (if necessary). */
  ldr r0, =__data_load_start__
  ldr r1, =__data_start__
  ldr r2, =__data_end__
  bl memory_copy
  ldr r0, =__text_load_start__
  ldr r1, =__text_start__
  ldr r2, =__text_end__
  bl memory_copy
  ldr r0, =__fast_load_start__
  ldr r1, =__fast_start__
  ldr r2, =__fast_end__
  bl memory_copy
  ldr r0, =__ctors_load_start__
  ldr r1, =__ctors_start__
  ldr r2, =__ctors_end__
  bl memory_copy
  ldr r0, =__dtors_load_start__
  ldr r1, =__dtors_start__
  ldr r2, =__dtors_end__
  bl memory_copy
  ldr r0, =__rodata_load_start__
  ldr r1, =__rodata_start__
  ldr r2, =__rodata_end__
  bl memory_copy
  ldr r0, =__tdata_load_start__
  ldr r1, =__tdata_start__
  ldr r2, =__tdata_end__
  bl memory_copy
  ldr r0, =__fs_data_load_start__
  ldr r1, =__fs_data_start__
  ldr r2, =__fs_data_end__
  bl memory_copy
#ifdef INITIALIZE_SECONDARY_SECTIONS
  ldr r0, =__data2_load_start__
  ldr r1, =__data2_start__
  ldr r2, =__data2_end__
  bl memory_copy
  ldr r0, =__text2_load_start__
  ldr r1, =__text2_start__
  ldr r2, =__text2_end__
  bl memory_copy
  ldr r0, =__rodata2_load_start__
  ldr r1, =__rodata2_start__
  ldr r2, =__rodata2_end__
  bl memory_copy
#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */
#ifdef INITIALIZE_TCM_SECTIONS
  ldr r0, =__data_tcm_load_start__
  ldr r1, =__data_tcm_start__
  ldr r2, =__data_tcm_end__
  bl memory_copy
  ldr r0, =__text_tcm_load_start__
  ldr r1, =__text_tcm_start__
  ldr r2, =__text_tcm_end__
  bl memory_copy
  ldr r0, =__rodata_tcm_load_start__
  ldr r1, =__rodata_tcm_start__
  ldr r2, =__rodata_tcm_end__
  bl memory_copy
#endif /* #ifdef INITIALIZE_TCM_SECTIONS */

  /* Zero the bss. */
  ldr r0, =__bss_start__
  ldr r1, =__bss_end__
  movs r2, #0
  bl memory_set
  ldr r0, =__tbss_start__
  ldr r1, =__tbss_end__
  movs r2, #0
  bl memory_set
#ifdef INITIALIZE_SECONDARY_SECTIONS
  ldr r0, =__bss2_start__
  ldr r1, =__bss2_end__
  mov r2, #0
  bl memory_set
#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */
#ifdef INITIALIZE_TCM_SECTIONS
  ldr r0, =__bss_tcm_start__
  ldr r1, =__bss_tcm_end__
  mov r2, #0
  bl memory_set
#endif /* #ifdef INITIALIZE_TCM_SECTIONS */

#if !defined(__HEAP_SIZE__) || (__HEAP_SIZE__)
  /* Initialize the heap */
  ldr r0, = __heap_start__
  ldr r1, = __heap_end__
  subs r1, r1, r0
  cmp r1, #8
  blt 1f
  movs r2, #0
  str r2, [r0]
  str r1, [r0, #4] 
1:
#endif

#ifdef INITIALIZE_USER_SECTIONS
  ldr r2, =InitializeUserMemorySections
  blx r2
#endif

  .type start, function
start:

  /* Call constructors */
  ldr r0, =__ctors_start__
  ldr r1, =__ctors_end__
ctor_loop:
  cmp r0, r1
  beq ctor_end
  ldr r2, [r0]
  adds r0, #4
  push {r0-r1}  
  blx r2
  pop {r0-r1}
  b ctor_loop
ctor_end:

  /* Setup initial call frame */
  movs r0, #0
  mov lr, r0
  mov r12, sp

  /* Jump to application entry point */
#ifdef FULL_LIBRARY
  movs r0, #ARGSSPACE
  ldr r1, =args
  ldr r2, =debug_getargs  
  blx r2
  ldr r1, =args
#else
  movs r0, #0
  movs r1, #0
#endif
  ldr r2, =APP_ENTRY_POINT
  blx r2

  .thumb_func
exit:
#ifdef FULL_LIBRARY  
  mov r5, r0 // save the exit parameter/return result

  /* Call destructors */
  ldr r0, =__dtors_start__
  ldr r1, =__dtors_end__
dtor_loop:
  cmp r0, r1
  beq dtor_end
  ldr r2, [r0]
  adds r0, #4
  push {r0-r1}
  blx r2
  pop {r0-r1}
  b dtor_loop
dtor_end:

  /* Call atexit functions */
  ldr r2, =_execute_at_exit_fns  
  blx r2

  /* Call debug_exit with return result/exit parameter */
  mov r0, r5
  ldr r2, =debug_exit  
  blx r2
#endif

  /* Returned from application entry point */
#ifdef RETURN_FROM_CRT0
  pop {r2}
  bx r2
#else
  /* Loop forever */
exit_loop:
  b exit_loop
#endif

  .thumb_func
memory_copy:
  cmp r0, r1
  beq 2f
  subs r2, r2, r1
  beq 2f
1:
  ldrb r3, [r0]
  adds r0, r0, #1
  strb r3, [r1]
  adds r1, r1, #1
  subs r2, r2, #1
  bne 1b
2:
  bx lr

  .thumb_func
memory_set:
  cmp r0, r1
  beq 1f
  strb r2, [r0]
  adds r0, r0, #1
  b memory_set
1:
  bx lr

  // default C/C++ library helpers

.macro HELPER helper_name
  .section .text.\helper_name, "ax", %progbits
  .balign 2
  .global \helper_name
  .weak \helper_name  
\helper_name:
  .thumb_func
.endm

.macro JUMPTO name
#if defined(__thumb__) && !defined(__thumb2__)
  mov r12, r0
  ldr r0, =\name
  push {r0}
  mov r0, r12
  pop {pc}
#else
  b \name
#endif
.endm

HELPER __aeabi_read_tp
  ldr r0, =__tbss_start__-8
  bx lr
HELPER abort
  b .
HELPER __assert
  b .
HELPER __aeabi_assert
  b .
HELPER __sync_synchronize
  bx lr
HELPER __getchar
  JUMPTO debug_getchar
HELPER __putchar
  JUMPTO debug_putchar
HELPER __open
  JUMPTO debug_fopen
HELPER __close
  JUMPTO debug_fclose
HELPER __write   
  mov r3, r0
  mov r0, r1
  movs r1, #1  
  JUMPTO debug_fwrite
HELPER __read  
  mov r3, r0
  mov r0, r1
  movs r1, #1 
  JUMPTO debug_fread
HELPER __seek
  push {r4, lr}
  mov r4, r0
  bl debug_fseek
  cmp r0, #0
  bne 1f
  mov r0, r4
  bl debug_ftell
  pop {r4, pc}
1:
  ldr r0, =-1
  pop {r4, pc}
  // char __user_locale_name_buffer[];
  .section .bss.__user_locale_name_buffer, "aw", %nobits
  .global __user_locale_name_buffer
  .weak __user_locale_name_buffer
  __user_locale_name_buffer:
  .word 0x0

#ifdef FULL_LIBRARY
  .bss
args:
  .space ARGSSPACE
#endif

  /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */
  .section .stack, "wa", %nobits
  .section .stack_process, "wa", %nobits
  .section .heap, "wa", %nobits

set section placement macros

I am not getting where is the cause so please any one suggest me to come out this issues.

Waiting for your valuable response.

Thanks,

Rohit

Parents Reply Children
Related