2023-04-08 11:30 PM
How does the compiler optimization level affect the performance and memory usage of STM32 applications?
2023-04-09 12:51 AM
...depends very much on the type of core and the code.
and on optimizer setting; you have to try, to see what its doing with your code.
i tested on M4 core, stm32F303 :
set /toggle a pin in a while loop; at 72MHz, needs 260ns. with optimizer (-O2) 65ns.
2023-04-09 01:01 AM
The way a computer program is optimized when it is being made can affect how fast and efficiently it runs on STM32 microcontrollers. If the program is optimized more, it can run faster and use less memory, but it might also take longer to make and be bigger in size. The level of optimization needed depends on what the program is supposed to do, and it's a trade-off between how fast it runs, how much memory it uses, and how long it takes to make. It's important to test the program with different levels of optimization to find the best balance for the specific needs of the program.
2023-04-09 06:33 AM
This is a compiler 101 type question, not really specific to any ARM core even.
Reading an [e]book is probably a more effective way to understand how compiler works and why they have the best for speed/size options.
Back in 2000, Microsoft was introducing a new windows operating system, and developping application was with VisualStudio MFC. Originally, the bit type was uint32_t... few years later is became a true single bit in memory....