How to make a Release configuration of CubeMX generated project?
Me again
After discovering that after opening CN2 the Cube MX generated project won’t run in ether confugartion I returned to the STM examples again.
Compiled STM example, created Release, downloaded to the chip. The same story: with closed CN2 the program runs, with opened CN2 - does not.
I connected scope to the CN2 pins and found that when USB cable is connected, the chip in the interface part of the board sends some information: there is SWCLK and SWDIO. Definetly, when the CN2 is open there is no connection and target µC does not do anything.
So, where is the problem? In GCC itself, or in GCC options, or ....