cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE for VSCode Configure Presets

KnarfB
Super User

Hi,

I create an empty project for Nucleo-L432KC with all default settings using STM32CubeIDE 3.6.4. on Win11.

Default settings are gcc toolchain and Debug preset.

Then, I switch to Release Preset (CMake: Select Configure Preset - as described in Development — STM32CubeIDE for Visual Studio Code Extensions Documentation 0.1.0 documentation).

After building in Build/Release, the compile commands are like

{
  "directory": "C:/tmp/test2/build/Release",
  "command": "C:\\ST\\cube\\gnu-tools-for-stm32\\13.3.1+st.9\\bin\\arm-none-eabi-gcc.exe -DRTE_DEVICE_STARTUP_STM32L4XX -IC:/tmp/test2/Inc -IC:/tmp/test2 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wno-comment -O3 -DNDEBUG -std=gnu11 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mlittle-endian -mthumb -Wall -Wextra -Wpedantic -Wno-unused-parameter -Os -o CMakeFiles\\test2.dir\\Src\\sysmem.c.obj -c C:\\tmp\\test2\\Src\\sysmem.c",
  "file": "C:\\tmp\\test2\\Src\\sysmem.c",
  "output": "CMakeFiles\\test2.dir\\Src\\sysmem.c.obj"
},

having two potentially conflicting optimization settings: -O3 ... -Os. 

I would like to see more presets pre-defined like RelWithDebInfo and MinSizeRel and have a more direct way to configure all those flags.

Likewise some advanced docs explaining if/how to do a headless build with cmake (without VS code?), using cmake-gui to re-configrue/finetune a project creating new presets, what's the exact difference between configure and build presets and why do  i have to learn all that, etc.. 

I like the STM32CubeIDE for VS Cube pretty much. But, even though the underlying tools are mostly open-source (toolchain, cmake) I'm still feeling somewhat "locked in" into a predescribed and rather complex workflow.

hth

KnarfB

 

0 REPLIES 0