This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: MBEDTLS library in CC2340R5

Part Number: CC2340R5

Tool/software:

Hi,

We have used MBED TLS library for performing AES 128 encryption and encrypting a plain text. The code snippet can be found below.

But we get the following error like program is not fitting into memory.

Not sure why this is coming and how to resolve it?

  • Hello,

    This issue arises when there is not enough RAM on the device to fit the program. This isn't uncommon with the CC2340R5 since it was meant for small footprint devices.

    There are a couple of options here:

    1. Set the compiler directive to optimize for code size. (Project Properties -> Arm Compiler -> Optimization -> Optimization Level -Oz).

    2. Optimize the program to use less RAM. A good way of going about this is analyzing the .map file generated when building the project and looking for sections that are taking up a lot of space. By optimizing these areas, you can save on RAM.

    3. We also offer the CC2340R53 (64kB RAM) which has about twice the amount of available RAM than the CC2340R5 (36kB RAM). 

    Best,

    Nima Behmanesh