I have arrays like this, code builds fine but stuck in a while() loop because of exception caused by startup code. we switched to 13s from bgm121 because this part has double RAM
It not could you upload your project that could reproduce the issue (keep only the part that could reproduce the issue).
32*32*4+32*32*2+32*32*2+8*32*2+8*32*2+32*32*2
=32*32*(4+2+2+2+1)
=32*32*13
=13k bytes
You could read the BLE document to get the memory map for stack and application. I am wondering if there is enough memory for this since the total RAM size for BGM12 is 64k.
0
Thank you for the quick response, right now, I switched to a lighter version where processing will happen in the mobile app, but I'll try to share the firmware that cause mentioned issue.
Correct Answer
0
I've only added single array of 2580 bytes, limited ble connections to 1, error is persistent with bgm121, bgm13p, bgm13s22, below is hardware/compiler info, attached is project folder and error screenshot
bgm13s22 stuck in startup
Hi!
I have arrays like this, code builds fine but stuck in a while() loop because of exception caused by startup code. we switched to 13s from bgm121 because this part has double RAM
it is memory related issue but is there a guide to know limitations?
could you try the simple example code in github peripheral example (without stack) to see if you could reproduce the issue.
https://www.silabs.com/community/mcu/32-bit/forum.topic.html/new_32-bit_periphera-hpNV.html
add you code into the example.
It not could you upload your project that could reproduce the issue (keep only the part that could reproduce the issue).
32*32*4+32*32*2+32*32*2+8*32*2+8*32*2+32*32*2
=32*32*(4+2+2+2+1)
=32*32*13
=13k bytes
You could read the BLE document to get the memory map for stack and application. I am wondering if there is enough memory for this since the total RAM size for BGM12 is 64k.
I've only added single array of 2580 bytes, limited ble connections to 1, error is persistent with bgm121, bgm13p, bgm13s22, below is hardware/compiler info, attached is project folder and error screenshot
bluetooth sdk 2.13.6.0, gnu arm 4.9.3
bgm13p22, BRD4306A Rev. A01
Running size tool
arm-none-eabi-size "soc-empty_hanging.axf" -A
soc-empty_hanging.axf :
section size addr
.text_bootloader 0 266403840
.text_apploader 47040 0
.text_signature 64 47040
.text_application 152408 47104
.text_application_ARM.exidx 8 199512
.stack_dummy 2048 536870912
.text_application_data 356 536872960
.bss 12460 536873316
.heap 3328 536885776
.nvm_dummy 4096 199520
.ARM.attributes 46 0
.comment 238 0
.debug_info 185927 0
.debug_abbrev 16946 0
.debug_loc 120075 0
.debug_aranges 2928 0
.debug_ranges 21256 0
.debug_line 42202 0
.debug_str 67786 0
.debug_frame 9352 0
Total 688564
Please ask this question in BLE frocum.
BLE stack team should know better how the memory was allocated.
@luweiguo
I tried, there is no issue if don't use stack, I can make arrays of 2.5K Bytes.
@Antti Hirvonen can you please move this thread back to Bluetooth forum?