How to reduce the used space of AES CBC

Dear Support Team

After I added AES CBC(samples/crypto/aes_cbc) to my project, the SRAM reduced 56Kbytes and the Flash reduced 256Kbytes, it reduced too many space that we didn't have enough space for the project. The below pictures show the configurations we add to prj,conf.

The below picture shows the space before I added AES CBC to the project.

The below picture shows the space after I added AES CBC to the project.

As we must use AES CBC in the project, Is there any way to reduce the space occupied by the AES CBC? Many thanks.

Parents
  • Hi Tom,

    Are you sure that enabling these features takes an extra 56 kilobytes of SRAM and 256 kilobytes of Flash? Looking at the memory report of the AES CBC sample, it seems that these features only take up about 20 kilobytes of RAM, with the rest taken by the logging system.

    One thing you could do is experiment with the allocated heap space, it's not certain that 8 KB is necessary.

    I could take a closer look at the memory footprint of these features, but it's not certain that it can be reduced further.

    Please also note that NCS has a documentation page on memory footprint optimization.

    Best regards,
    Raoul

Reply
  • Hi Tom,

    Are you sure that enabling these features takes an extra 56 kilobytes of SRAM and 256 kilobytes of Flash? Looking at the memory report of the AES CBC sample, it seems that these features only take up about 20 kilobytes of RAM, with the rest taken by the logging system.

    One thing you could do is experiment with the allocated heap space, it's not certain that 8 KB is necessary.

    I could take a closer look at the memory footprint of these features, but it's not certain that it can be reduced further.

    Please also note that NCS has a documentation page on memory footprint optimization.

    Best regards,
    Raoul

Children
No Data
Related