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

bootloader with gcc too large

Hi,

in SDK v9, i tried to compile the bootloader example, but:

/usr/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 6944 bytes

why does the bootloader need so much stuff in the first place? like scheduler, timer, pstore, etc?

according to the map file, the .text section is 22296 bytes here is it parsed with a quickly hacked together script:

2 .rodata.str1.1
4 .text.sd_softdevice_vector_table_base_set
4 .text.sd_ble_enable
4 .text.sd_mbr_command
4 .text.sd_app_evt_wait
4 .text.sd_softdevice_disable
4 .text.sd_softdevice_vector_table_base_set
4 .text.sd_mbr_command
4 .text.sd_flash_write
4 .text.sd_flash_page_erase
4 .text.sd_nvic_critical_region_enter
4 .text.sd_nvic_critical_region_exit
4 .text.sd_ble_gap_address_set
4 .text.sd_ble_gap_address_get
4 .text.sd_ble_gap_adv_start
4 .text.sd_ble_gap_adv_stop
4 .text.sd_ble_gap_disconnect
4 .text.sd_ble_gap_ppcp_set
4 .text.sd_ble_gap_device_name_set
4 .text.sd_ble_gap_sec_params_reply
4 .text.sd_ble_gap_sec_info_reply
4 .text.sd_ble_gatts_service_changed
4 .text.sd_ble_gatts_rw_authorize_reply
4 .text.sd_ble_gatts_sys_attr_set
4 .text.sd_ble_gatts_sys_attr_get
4 .text.sd_ble_user_mem_reply
4 .text.sd_ble_gatts_service_add
4 .text.sd_ble_gatts_characteristic_add
4 .text.sd_ble_gatts_value_get
4 .text.sd_ble_gatts_hvx
4 .text.sd_ble_gatts_rw_authorize_reply
4 .text.sd_ble_uuid_vs_add
4 .text.sd_ble_gap_address_get
4 .text.sd_ble_gap_adv_data_set
4 .text.sd_ble_gap_appearance_get
4 .text.sd_ble_gap_device_name_get
4 .text.sd_ble_uuid_encode
4 .text.sd_ble_gap_conn_param_update
4 .text.sd_ble_gap_disconnect
4 .text.sd_ble_gap_ppcp_set
4 .text.sd_ble_gap_ppcp_get
4 .text.sd_nvic_EnableIRQ
4 .text.sd_evt_get
4 .text.sd_softdevice_enable
4 .text.sd_ble_evt_get
4 .rodata._global_impure_ptr
4 .rodata.m_dfu_timer_id
4 .rodata.m_conn_params_timer_id
8 .text.sys_evt_dispatch
8 .rodata.str1.4
12 .text.dfu_register_callback
12 .text.bootloader_util_settings_get
12 .text.service_error_handler
12 .text.conn_params_error_handler
12 .text.softdevice_assertion_handler
16 .text.ble_conn_params_stop
16 .rodata.CSWTCH.82
16 .rodata.CSWTCH.81
20 .text.bsp_init
20 .text.softdevice_evt_schedule
20 .text.intern_softdevice_events_execute
20 .text.softdevice_ble_evt_handler_set
20 .text.softdevice_sys_evt_handler_set
20 .rodata.swap_sub_state_sm_lut.5953
20 .rodata.swap_sub_state_sm_lut.6028
24 .text.app_error_handler
24 .text.softdevice_evt_get
32 .text.scheduler_init
32 .text.SVC_Handler
32 .text.dfu_reset
32 .text.hci_mem_pool_rx_data_size_set
36 .text.dfu_init_postvalidate
36 .text.bootloader_dfu_sd_in_progress
36 .text.dfu_error_notify
36 .rodata.ble_dfu_on_ble_evt
40 .text.__libc_fini_array
40 .text.pstorage_callback_handler
40 .text.dfu_timeout_handler
40 .text.dfu_cleared_func_app
40 .rodata.on_dfu_evt
44 .text.__do_global_dtors_aux
44 .text.hci_mem_pool_open
48 .text.dfu_activate_bl
52 .text.bootloader_init
52 .text.bootloader_settings_get
52 .text.dfu_prepare_func_app_erase
52 .text.app_timer_create
52 .text.SWI2_IRQHandler
56 .text.frame_dummy
56 .text.dfu_ble_peer_data_get
56 .text.dfu_activate_sd
56 .text.dfu_image_activate
56 .text.dfu_bl_image_swap
60 .text.nrf_delay_ms
60 .text.bootloader_util_app_start
60 .text.dfu_activate_app
64 .text.dfu_bl_image_validate
64 .text.crc16_compute
68 .text.dfu_init_pkt_complete
72 .text.bootloader_app_is_valid
72 .text.bootloader_dfu_start
72 .text.hci_mem_pool_rx_extract
76 .text.__libc_init_array
76 .text.app_sched_init
76 .text.softdevice_handler_init
84 .text.C_SVC_Handler
84 .text.bootloader_app_start
88 .text.bootloader_dfu_sd_update_continue
88 .text.hci_mem_pool_rx_produce
104 .text.pstorage_callback_handler
104 .text.ble_dfu_response_send
104 .text.ble_advdata_set
116 .text.ble_dfu_pkts_rcpt_notify
120 .text.dfu_transport_close
120 .text.rtc1_stop
120 .text.hci_mem_pool_rx_consume
120 .text.update_timeout_handler
120 .text.ble_conn_params_init
124 .text.pstorage_store
124 .text.app_sched_execute
132 .text.state_erase_data_page_entry_run
132 .text.ble_dfu_bytes_rcvd_report
136 .text.dfu_image_validate
136 .text.cmd_queue_enqueue
136 .text.conn_params_negotiation
144 .text.dfu_init_prevalidate
148 .text.state_swap_erase_entry_run
148 .text.dfu_cb_handler
148 .text.SystemInit
156 .text.dfu_init_pkt_handle
156 .text.pstorage_clear
160 .text.state_write_data_swap_entry_run
164 .text.state_restore_head_entry_run
168 .text.bootloader_dfu_sd_update_finalize
172 .text.ble_stack_init
172 .text.ble_conn_params_on_ble_evt
180 .text.dfu_init
180 .text.data_to_swap_write_state_run
184 .text.__register_exitproc
196 .text.dfu_data_pkt_handle
196 .text.state_restore_tail_entry_run
196 .text.tail_restore_state_run
196 .text.swap_erase_state_run
208 .text.app_timer_stop
216 .text.dfu_sd_img_block_swap
220 .text.pstorage_register
224 .text.RTC1_IRQHandler
236 .text.__call_exitprocs
236 .text.intern_softdevice_events_execute.part.0
248 .text.uuid_list_sized_encode
260 .text.app_timer_start
264 .text.dfu_start_pkt_handle
304 .text.dfu_sd_image_validate
304 .text.pstorage_init
340 .text.store_cmd_flash_write_execute
344 .rodata.ble_evt_dispatch
364 .text.startup.main
364 .text.bootloader_dfu_update_process
376 .text.dfu_sd_image_swap
384 .text.clear_operation_execute
384 .text.ble_dfu_on_ble_evt
388 .text.app_sched_event_put
404 .text.advertising_start.part.4
448 .text.dfu_transport_update_start
484 .text.state_entry_action_run
540 .text.pstorage_sys_event_handler
576 .text.ble_evt_dispatch
592 .text.head_restore_state_run
592 .text.data_page_erase_state_run
640 .text.ble_dfu_init
1004 .text.on_dfu_evt
1228 .text.SWI0_IRQHandler
1464 .text.adv_data_encode
Parents Reply Children
No Data
Related