Skip to main content

RAM allocation

2 months ago

RAM allocation

Posted bymelj30 points 8 replies
0 upvotes

I've recently downloaded the latest SDK for DA14531 (6.0.4.1114) and tried to build my project but now the project cannot link due to not enough RAM free. The project builds fine with SDK 6.0.12.1020.2. What can I do to optimise the RAM usage? I am building on Linux using gcc-arm-none-eabi-7-2018-q2-update with optimisation -Os

In the release notes for SDK 6.0.4.1114 it states "1114/02 Defined extra free RAM area to be used by applications" - how is this extra RAM supposed to be mode available, or is it automatically available? Also can you confirm whether the SDK 6.0.4.1114 uses significantly more RAM than 6.0.12.1020.2? I am seeing something like an extra 2.5kB at least.

也应该# define CFG_RET_DATA_SIZE and #define CFG_RET_DATA_UNINIT_SIZE be set to? Are there implications for setting these incorrectly? Also where is the CPU stack size set? I find the whole documentation around these areas disappointing lacking or opaque compared to other platforms I have used.

Another related question: when I can build my code I find that the limit on total size is close to 40kB total as reported by gcc: e.g.

"text data bss dec hex
27180 156 11844 39180 990c"

In the above example if I increase a normal RAM buffer size slightly by only 256 bytes then the project cannot link due to the following error:

"/../../../arm-none-eabi/bin/ld: region RAM overflowed with stack"

This implies that the interrupt vectors, stack and heap sizes add up to around 8kB (since I believe that the DA14531 has 48kB total RAM) - is this correct, this seems like a unusually large amount to be allocated to these? Please advise.

2 months ago

PM_Dialog

Hi Melj,

Thanks for your question online. Could you please indicate which SDK project you are trying to build, so that I can try to replicate it? Are you using the Keil IDE?

Thanks, PM_Dialog

2 months ago

melj 30 points

I'm building my own project not an SDK project. I'm using the Smart Snippets Studio (Eclipse IDE) under Ubuntu, not Keil.

Thanks

2 months ago

PM_Dialog

Hi melj,

Let me check it and I'll get back to you.

Thanks, PM_Dialog

2 months ago

melj 30 points

Thanks, I wait for your reply.

1 month ago

melj 30 points

Do you have any progress with answering my questions please?

Thanks.

1 month ago

PM_Dialog

Hi melj,

Apologies for the delay, we are reviewing the details. SDK6.0.14 does consume a little from RAM than the previous version. We will comeback to you with the details and suggestions shortly.

Thanks, PM_Dialog

1 month ago

KB_Dialog

Hi melj,

We're still investigating the increased code size between the SDK versions and what guidance we can offer to reduce it. We will get back to you as soon as possible.

Best regards,

KB_Dialog

1 month ago

melj 30 points

Hi

Thanks for investigating. I look forward to your reply to my original questions.

Regards