Dialog Semiconductor customer support - Keil 5.14 https://support.dialog-semiconductor.com/resource-keywords/keil-514 en Problem with dynamic memory allocation https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/problem-dynamic-memory-allocation < div class = "字段field-name-taxonomy-forums字段-type-taxonomy-term-reference field-label-above">
Forums: 

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.

Device: 
Sun, 02 Sep 2018 22:34:56 +0000 uched41 226018 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/problem-dynamic-memory-allocation#comments
Keil uVision 5.14- Keil::ARMCortex_DPF package missing https://support.dialog-semiconductor.com/keil-uvision-514-keilarmcortexdpf-package-missing < div class = "字段field-name-taxonomy-forums字段-type-taxonomy-term-reference field-label-above">
Forums: 

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)

http://s10.postimg.org/5fe605e5l/Capture.png

Keywords: 
Device: 
Thu, 04 Jun 2015 08:57:26 +0000 bmorkunas 1636 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/keil-uvision-514-keilarmcortexdpf-package-missing#comments