-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Bug
Target
NCS36510
Toolchain:
GCC_ARM - fails
ARM - pass
IAR - fails
mbed-cli version:
1.0.0
version
tag: mbed-os-5.4.1
Expected behavior
mbed-os-example-mesh-minimal with Thread sleep end device configuration should fit into 320K of flash and 48K of RAM. Just need to connect to parent. No need for routing.
Actual behavior
mbed-os-example-mesh minimal w/ Thread sleepy end device configuration results in a memory footprint that cannot always fit within NCS36510 single bank of flash (320K) and RAM (48K).
In the future, there will be 640K flash support, but this does not solve fitting it into the RAM.
Steps to reproduce
mbed compile -m NCS36510 -t GCC_ARM --profile mbed-os/tools/profiles/release.json
Result for GCC is that it does not fit into flash, even with release (small) profile.
Link: mbed-os-example-mesh-minimal_ncs36510
c:/program files (x86)/gnu tools arm embedded/4.9 2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./BUILD/NCS36510/GCC_ARM/mbed-os-example-mesh-minimal_ncs36510.elf sec
tion `.text' will not fit in region `FLASH'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 23776 bytes
collect2.exe: error: ld returned 1 exit status
[ERROR] c:/program files (x86)/gnu tools arm embedded/4.9 2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ./BUILD/NCS36510/GCC_ARM/mbed-os-example-mesh-minimal_ncs36510
.elf section `.text' will not fit in region `FLASH'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 23776 bytes
collect2.exe: error: ld returned 1 exit status
mbed compile -m NCS36510 -t IAR --profile mbed-os/tools/profiles/release.json
Result for IAR is that it does not fit into RAM
Link: mbed-os-example-mesh-minimal_ncs36510
Error[Lp011]: section placement failed
unable to allocate space for sections/blocks with a total estimated
minimum size of 0xbffc bytes (max align 0x8) in
<[0x3fff4000-0x3fffffff]> (total uncommitted space 0xbe00).
[ERROR] Error[Lp011]: section placement failed
unable to allocate space for sections/blocks with a total estimated
minimum size of 0xbffc bytes (max align 0x8) in
<[0x3fff4000-0x3fffffff]> (total uncommitted space 0xbe00).
mbed compile -m NCS36510 -t ARM --profile mbed-os/tools/profiles/release.json
Result for ARM compiler is successful build.
+-----------------------------+--------+-------+-------+
| Module | .text | .data | .bss |
+-----------------------------+--------+-------+-------+
| Misc | 146619 | 510 | 16673 |
| drivers | 912 | 4 | 28 |
| features/FEATURE_COMMON_PAL | 13182 | 179 | 8360 |
| features/filesystem | 366 | 0 | 0 |
| features/mbedtls | 127155 | 104 | 8836 |
| features/nanostack | 11655 | 149 | 5200 |
| hal | 546 | 16 | 0 |
| platform | 1411 | 34 | 380 |
| rtos | 182 | 8 | 0 |
| rtos/rtx | 6766 | 100 | 8396 |
| targets/TARGET_ONSEMI | 3937 | 60 | 84 |
| Subtotals | 312731 | 1164 | 47957 |
+-----------------------------+--------+-------+-------+
Allocated Heap: unknown
Allocated Stack: unknown
Total Static RAM memory (data + bss): 49121 bytes
Total RAM memory (data + bss + heap + stack): 49121 bytes
Total Flash memory (text + data + misc): 313895 bytes
Image: .\BUILD\NCS36510\ARM\mbed-os-example-mesh-minimal_ncs36510.bin
Config file (note the reduced mesh api heap size, yet it still fails to fit)
{
"config": {
"trace": {
"help": "options are true, false",
"value": true
},
"radio-type":{
"help": "options are ATMEL, MCR20, NCS36510",
"value": "NCS36510"
},
"mesh-type":{
"help": "options are MESH_LOWPAN, MESH_THREAD",
"value": "MESH_THREAD"
}
},
"target_overrides": {
"*": {
"target.features_add": ["NANOSTACK", "THREAD_END_DEVICE", "COMMON_PAL"],
"mbed-mesh-api.6lowpan-nd-panid-filter": "0xffff",
"mbed-mesh-api.6lowpan-nd-channel-page": 0,
"mbed-mesh-api.6lowpan-nd-channel": 12,
"mbed-mesh-api.6lowpan-nd-channel-mask": "(1<<12)",
"mbed-mesh-api.thread-config-panid": "0x0700",
"mbed-mesh-api.thread-master-key": "{0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}",
"mbed-mesh-api.thread-config-channel": 22,
"mbed-mesh-api.thread-device-type": "MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE",
"mbed-mesh-api.heap-size": 4000,
"mbed-trace.enable": false,
"platform.stdio-convert-newlines": true,
"platform.stdio-baud-rate": 115200
}
}
}