Optimizing X-CUBE-CRYPTOLIB for memory constraint
Hello!
I want to use Asymmetric Crypto algorithms like ECC or RSA for my FreeRTOS project running on STM32F051K8.
The controller has 64 KB of flash.
Since X-CUBE-CRYPTOLIB occupies quite large memory footprint, my FLASH is getting overflowed by the .text area, on linking the X-CUBE-CRYPTOLIB library.
I have made following changes to optimize the memory required for X-CUBE-CRYPTOLIB:
- Disabled everything else (unnecessary #defines) apart from INCLUDE_ECC in crypto.h file
- Optimization settings in Project properties:
- -Os optimization for size
- Debug level "none"
But still my flash is getting overflowed by around 7000 bytes.
Please tell me what else can I do for memory optimization?
Otherwise, I might have to change the microcontroller with big FLASH memory.
I also have attached error screenshot for the reference. 
