cancel
Showing results for 
Search instead for 
Did you mean: 

VSCode extension build and only flash program

maze2go
Associate

I started using stm32 MCU's on my university. There we used the CubeIDE. Now I have a board at home for own projects. I wanted to use VSCode with the new extension, because i prefer it over Eclipse / CubeIDE. Now I have two questions. I can debug my program via vscode, but I found no option to just flash it onto the board without debugging. (Where) can I do that?

Another questions that came into my mind related to that is, if I could just build my project without flashing it like you can do it on CubeIDE. When I press CTRL + P in vscode and press run build task i get an error:

 

FAILED: LED_TEST.elf 
cmd.exe /C "cd . && C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506\tools\bin\arm-none-eabi-gcc.exe -fdata-sections -ffunction-sections --specs=nano.specs -Wl,--gc-sections -g -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -T C:/Users/Matth/Desktop/LED_TEST/STM32G431KBTX_FLASH.ld CMakeFiles/LED_TEST.dir/Core/Src/main.c.obj CMakeFiles/LED_TEST.dir/Core/Src/stm32g4xx_hal_msp.c.obj CMakeFiles/LED_TEST.dir/Core/Src/stm32g4xx_it.c.obj CMakeFiles/LED_TEST.dir/Core/Src/syscalls.c.obj CMakeFiles/LED_TEST.dir/Core/Src/sysmem.c.obj CMakeFiles/LED_TEST.dir/Core/Src/system_stm32g4xx.c.obj CMakeFiles/LED_TEST.dir/Core/Startup/startup_stm32g431kbtx.s.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_cortex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma_ex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_exti.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ramfunc.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_gpio.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pwr_ex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pwr.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rcc_ex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rcc.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_tim_ex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_tim.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart_ex.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart.c.obj CMakeFiles/LED_TEST.dir/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.c.obj -o LED_TEST.elf   && cmd.exe /C "cd /D C:\Users\Matth\Desktop\LED_TEST\build\debug\build && C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506\tools\bin\arm-none-eabi-size.exe C:/Users/Matth/Desktop/LED_TEST/build/debug/build/LED_TEST.elf && cd /D C:\Users\Matth\Desktop\LED_TEST\build\debug\build && C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506\tools\bin\arm-none-eabi-objcopy.exe -O ihex C:/Users/Matth/Desktop/LED_TEST/build/debug/build/LED_TEST.elf LED_TEST.hex && cd /D C:\Users\Matth\Desktop\LED_TEST\build\debug\build && C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506\tools\bin\arm-none-eabi-objcopy.exe -O binary C:/Users/Matth/Desktop/LED_TEST/build/debug/build/LED_TEST.elf LED_TEST.bin""
Der Befehl "cmd.exe" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
ninja: build stopped: subcommand failed.
build finished with error(s).

It sais that the command "cmd.exe" is misspelled  or could not be found.

 

10 REPLIES 10

When I try to run this, I get following eror:

command 'vscode-embedded.st.gdb' not found