split documentation doesn't build on nrf51dk target, FLASH overflowed
- Dominant language
- C
- Stars
- 891
- Forks
- 381
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
```
Jacobs-MacBook-Air:charm jacobrosenthal$ newt build split-nrf51dk
...
Linking /Users/jacobrosenthal/Downloads/charm/bin/targets/split-nrf51dk/app/apps/splitty/splitty_tmp.elf
Error: /usr/local/Cellar/gcc-arm-none-eabi-49/20150925/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: /Users/jacobrosenthal/Downloads/charm/bin/targets/split-nrf51dk/app/apps/splitty/splitty_tmp.elf section `.text' will not fit in region `FLASH'
/usr/local/Cellar/gcc-arm-none-eabi-49/20150925/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 13080 bytes
collect2: error: ld returned 1 exit status
```
Just turning off logging doesnt get us there anymore:
```
syscfg.vals:
BLE_LL_CFG_FEAT_LE_ENCRYPTION: "0"
BLE_SM_LEGACY: "0"
LOG_LEVEL: 255
```
```
Jacobs-MacBook-Air:charm jacobrosenthal$ newt build split-nrf51dk
...
Linking /Users/jacobrosenthal/Downloads/charm/bin/targets/split-nrf51dk/app/apps/splitty/splitty_tmp.elf
Error: /usr/local/Cellar/gcc-arm-none-eabi-49/20150925/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: /Users/jacobrosenthal/Downloads/charm/bin/targets/split-nrf51dk/app/apps/splitty/splitty_tmp.elf section `.text' will not fit in region `FLASH'
/usr/local/Cellar/gcc-arm-none-eabi-49/20150925/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 2896 bytes
collect2: error: ld returned 1 exit status
```
This is subjective but this got me there anyway
```
syscfg.vals:
BLE_LL_CFG_FEAT_LE_ENCRYPTION: "0"
BLE_SM_LEGACY: "0"
STATS_NEWTMGR: 0
LOG_NEWTMGR: 0
CONFIG_NEWTMGR: 0
LOG_LEVEL: 255
```
```
Jacobs-MacBook-Air:charm jacobrosenthal$ newt size split-nrf51dk
Size of Application Image: app
FLASH RAM
40 13614 *fill*
534 1456 apps_splitty.a
20 0 boot_split_app.a
196 432 hw_bsp_nrf51dk.a
118 32 mgmt_newtmgr_transport_nmgr_shell.a
4864 774 sys_shell.a
96 0 split-nrf51dk-sysinit-app.a
480 0 libgcc.a
objsize
text data bss dec hex filename
6316 4 15904 22224 56d0 /Users/jacobrosenthal/Downloads/charm/bin/targets/split-nrf51dk/app/apps/splitty/splitty.elf
Size of Loader Image: loader
FLASH RAM
257 255 *fill*
72 0 split-nrf51dk-sysinit-app.a
88 0 split-nrf51dk-sysinit-loader.a
881 93 apps_bleprph.a
1203 104 boot_bootutil.a
479 26 boot_split.a
1252 0 crypto_mbedtls.a
405 0 encoding_base64.a
1026 0 encoding_cborattr.a
2118 0 encoding_tinycbor.a
1780 0 fs_fcb.a
508 496 hw_bsp_nrf51dk.a
52 0 hw_cmsis-core.a
3349 716 hw_drivers_nimble_nrf51.a
248 0 hw_drivers_uart_uart_hal.a
338 0 hw_hal.a
3918 81 hw_mcu_nordic_nrf51xxx.a
7721 4981 kernel_os.a
2560 50 libc_baselibc.a
2097 24 mgmt_imgmgr.a
200 20 mgmt_mgmt.a
776 100 mgmt_newtmgr.a
1320 44 mgmt_newtmgr_nmgr_os.a
488 106 mgmt_newtmgr_transport_ble.a
29301 2142 net_nimble_controller.a
32243 2786 net_nimble_host.a
662 218 net_nimble_host_services_ans.a
338 215 net_nimble_host_services_gap.a
200 62 net_nimble_host_services_gatt.a
1531 648 net_nimble_host_store_config.a
86 0 net_nimble_host_util.a
95 0 net_nimble.a
668 101 net_nimble_transport_ram.a
1859 193 sys_config.a
1941 103 sys_console_full.a
600 128 sys_flash_map.a
487 133 sys_id.a
1130 30 sys_log_full.a
392 12 sys_mfg.a
636 140 sys_reboot.a
270 32 sys_stats_full.a
30 5 sys_sysinit.a
1223 0 time_datetime.a
438 0 util_cbmem.a
620 0 util_crc.a
234 0 util_mem.a
2060 0 libgcc.a
objsize
text data bss dec hex filename
110148 984 12660 123792 1e390 /Users/jacobrosenthal/Downloads/charm/bin/targets/split-nrf51dk/loader/apps/bleprph/bleprph.elf
Jacobs-MacBook-Air:charm jacobrosenthal$
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with `newt build split-nrf51dk`, then inspect the reported FLASH usage with `newt size split-nrf51dk`. Compare the default `syscfg.vals` settings with the listed workaround and identify a project-supported way to keep the target within its FLASH limit. Done means the target builds successfully without the linker overflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100