damogranlabs / VS-Code-STM32-IDE

Use VS Code as STM32 IDE with CubeMX
MIT License
247 stars 52 forks source link

Maybe I got a bug. #33

Closed UPUPGOO closed 4 years ago

UPUPGOO commented 4 years ago

First of all, thank you for your tool. It is really helpful. I want to debug STM32F407ZET6, but I got one error. CG2 HVY%YHZ9W@ED{K(G` D The console outputted

Please check OUTPUT tab (Adapter Output) for output from openocd Launching server: "openocd" "-c" "gdb_port 50000" "-s" "C:\Users\ShengJiaPeng\Documents\PlatformIO\Projects\STM32F4" "-f" "interface/stlink-v2-1.cfg" "-f" "target/stm32f4x.cfg.cfg"

This is launch.json:

"showDevDebugOutput": true, "cwd": "${workspaceRoot}", "executable": "./build/STM32F4.elf", "name": "Debug STM32", "request": "launch", "type": "cortex-debug", "servertype": "openocd", "preLaunchTask": "Build STM", "device": "stlink", "configFiles": [ "interface/stlink-v2-1.cfg", "target/stm32f4x.cfg.cfg" ]

When I changed "target/stm32f4x.cfg.cfg" into "target/stm32f4x_stlink.cfg", everything was good.

schperplata commented 4 years ago

"configFiles" section and its values is created on update.py run. On first run you are asked to specify target configuration files (and other tool/file paths), so I assume you made a mistake at the beginning. This paths are than cached in buildData.json. and you don't need to set them again, unless qou manually run updatePaths.py.

Also, check that you are using the latest version. Latest version create a copy of cfg files in .vscode folder.

UPUPGOO commented 4 years ago

On first run you are asked to specify target configuration files (and other tool/file paths)

Sorry, I was not asked to specify any configuration file. The program was completely automatical to generate configuration files. I just ran 'Build STM32 project' command.

schperplata commented 4 years ago

Are you sure you have reported a bug at the correct place? A couple of things that are strange and/or not the same as in my default scripts:

UPUPGOO commented 4 years ago

sorry, I made a mistake. I was using stm32-for-vscode extension. I mixed up these two giuhub projects between stm32-for-vscode and yours because of the similar name. I am sorry again.