bmd-studio / stm32-for-vscode

STM32 extension for working with STM32 and CubeMX in VSCode
MIT License
203 stars 27 forks source link

Flashing fails with new update #207

Open NuclearTea opened 1 week ago

NuclearTea commented 1 week ago

Build succeeds however, doesnt produce the appropriate build files (build folder is basically empty).

Error:

image

Line in file:

flash: $(BUILD_DIRECTORY)/$(TARGET).elf
    "$(OPENOCD)" -f ./openocd.cfg -c "program $(BUILD_DIRECTORY)/$(TARGET).elf verify reset exit"
DeflateAwning commented 1 week ago

This is v3.2.8, right? What operating system?

Can you please include a larger section of the error? The part you've included isn't possible to debug from, as every possible failure during the make flash command will show that exact message ("Error 1").

I'm unable to reproduce this issue in its current state.

jortbmd commented 1 week ago

Hi. Thanks for opening up an issue for this. I cannot really tell what the issue might be from the input you have given please provide some more info if available. You can also run the make processing by typing in the command: make -f STM32Make.make and see what the output is. It might also be possible that something changed for your .stm32env file. Could you please delete this and check again?

vaibhavkpr commented 5 days ago

Hi! I would like to add to the issue details. The issue is with the v3.2.8 running on Windows. Here is a clearer screenshot of the flash error I am seeing. STM32Ext_Issue

jortbmd commented 5 days ago

@vaibhavkpr Thanks for the additional information. Can you maybe provide you .stm32env file? Also have you tried deleting it and try flashing the device again?

vaibhavkpr commented 4 days ago

@jortbmd No problem! Yes so far I have attempted deleting the extension and reinstalling it, reverting back to a previous version (Seems to work after setting the correct version directory of OPENOCD in the .stm32env file, doesn't still fix the issue in the new version despite having the right paths for both OPENOCD & GCC) & deleting the .stm32env file and regenerating it by attempting a new clean build.

It does appear that OPENOCD was updated to a newer version and I did verify that the updated paths exist.

Here is what the .stm32env file looks like:

# environment variable file used by stm32-for-vscode and the STM32Make.make makefile
# Other environment variables can be added here. If wanting to use the generated makefile in CI/CD context please
# configure the following variables: GCC_PATH, OPENOCD

ARM_GCC_PATH = c:\Users\Username\AppData\Roaming\Code\User\globalStorage\bmd.stm32-for-vscode\@xpack-dev-tools\arm-none-eabi-gcc\13.3.1-1.1.1\.content\bin
OPENOCD = C:\USERS\USERNAME\APPDATA\ROAMING\CODE\USER\GLOBALSTORAGE\BMD.STM32-FOR-VSCODE\@XPACK-DEV-TOOLS\OPENOCD\0.12.0-4.1\.CONTENT\BIN\OPENOCD.EXE
jortbmd commented 15 minutes ago

That is a weird bug. Looks like the path is ok. Can you double check if you run the openocd command with the full path in your terminal with and without quotes. e.g. C:\USERS\USERNAME\APPDATA\ROAMING\CODE\USER\GLOBALSTORAGE\BMD.STM32-FOR-VSCODE\@XPACK-DEV-TOOLS\OPENOCD\0.12.0-4.1\.CONTENT\BIN\OPENOCD.EXE and "C:\USERS\USERNAME\APPDATA\ROAMING\CODE\USER\GLOBALSTORAGE\BMD.STM32-FOR-VSCODE\@XPACK-DEV-TOOLS\OPENOCD\0.12.0-4.1\.CONTENT\BIN\OPENOCD.EXE" to see what happens. Also what shell are you using? CMD, Powershell, fish?