Due to the allocation of Flash resources, only 100KB ROM for the app, and if we use Keil, we will have about 20KB of margin for additional code development, but we have to abandon Keil for the sake of the compilation platform.
Is there any way to optimize the program's ROM usage? Our code is very timing-sensitive, and if we change it directly from O3 to Os, we will get obvious ROM benefits, but our program execution will start to get messy.
I tried to analyze the map file and found that the main extra ROM resource consumption came from the referenced Mbedtls library and some C libraries.But I didn't have a better way to replace them, and because we were short on RAM, I had to turn on the MBEDTLS_AES_ROM_TABLES in the Mbedtls library.