08-20-2021 01:44 PM
Hi, when uploading the code below, which is using a "large" array, to the Arduino Nicla Sense ME, the following error message comes up:
++ MbedOS Error Info ++
Error Status: 0x80FF0144 Code: 324 Module: 255
Error Message: Assertion failed: _stack_buffer != NULL
Location: 0x430B9
File: ./mbed-os/connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.cpp+186
Error Value: 0x0
Current Thread: main Id: 0x200051B4 Entry: 0x19E6F StackSize: 0xC00 StackMem: 0x20004590 SP: 0x2000508C
For more info, visit: https://mbed.com/s/error?error=0x80FF0144&tgt=NICLA
-- MbedOS Error Info --
This does not happen if the array is small (e.g. 2 instead of 800), or if the line "BHY2.begin();" is commented out. The example sketches work, but just adding a large array to the code leads to this error.
The Code:
#include "Arduino_BHY2.h"
int all_readings[800];
void setup() {
all_readings[0] = 0;
BHY2.begin(); // if this command is commented out: no error is thrown
}
void loop() {
BHY2.update(); // this line does not impact the error, so commenting it out has no effect on the error.
}
08-23-2021 09:07 AM
Hello maxlo,
It seems to have something to do with the stack of your software environment. Could you try increasing the stack size in your software environment?
08-23-2021 11:36 AM
Hi,
how would one do that? In the Arduino IDE I found no option to set the stack size.
Is it some Mbed OS variable that has to be set in the Arduino code? If so, which one is it?
09-05-2021 05:34 PM
Hi, is there any missing info we should provide to investigate the problem? This problem has been the main blocker for our development for two weeks now
09-10-2021 05:48 AM - edited 09-10-2021 05:49 AM
Hello Maxlo
I have just come accross this, so appologies for the late replies.
We have looked into this, and provided a guide and some resources (pre-compiled libraries etc) to help you on this.
Please take a look at the details here: https://drive.google.com/drive/folders/1DLr9Z49Or1-Eb-JAZDr6vuLbRhvZii29?usp=sharing
Please check out the README in the shared folder.
Let me know how it pans out.