2025-12-29 4:50 PM - edited 2025-12-29 4:56 PM
When creating a project in STM32CubeMX, ST ARM Clang was selected. Compilation and debugging in VSCode all work, but some variables are optimized out, which seems like the compiler optimization is set too high. However, it's unclear where to set the compile flag -O0.
CMakeLists.txt like this, does not work