Hello, I am having a little problem allocating relatively large arrays using this chip, I am using SDK 5.0.4, I have a 2 structs,
typedef struct{ uint8_t x, uint8_t y;} s1;
typedef struct{
uint8_t c;
s1* buf; // pointer to array of first struct
}s2;
Then I am allocating memory for dynamically for the second structure s2,
s2* mys2 = malloc( sizeof(s2) );
then inside an initializer for struct s2, I am allocating memory for struct s1
s2->buf = malloc( sizeof(s1)*length );
Everything works fine if the length is of the internal array is relatively small (70), but if I increase the size above that, the program crashes and it looks like a memory error. I have looked at the documentation and the DA15580 has enough RAM and ROM (82KB ROM, 42KB SRAM).
my code is based on the template from the SDK, and the memory allocation is called in my initialization function which is passed to .app_on_init. I will like to know if there is any limitation on dynamic memory allocation caused by the BLE Stack, Or could this be a problem in my program organization. Thanks for your help.
I am trying to port an existing solution to DA14580 and trying to install Keil (first time ever). I am having an issue: there is no choice of Keil:ARMCortex_DPF on the Packs side. Any ideas? Many thanks
(I am attaching an image for illustration)