Skip to main content
Visitor II
April 17, 2024
Question

VSCode GDB Debug - Enable Watchdog Halt

  • April 17, 2024
  • 0 replies
  • 1659 views

Hi,

 

I am not sure how to categorize this problem. I have a custom board that I had done an initial software development cycle on STM32CubeIDE. I am working a newer version in VSCode with the STM32 Extension. Everything is working with the exception of one problem. I am using a watchdog on my MCU (STM32L4R9ZGJ6), which triggers while I have the processor halted. I know how to fix this in CubeIDE (Debugger tab, Enable Suspend Watchdogs) but cannot figure it out on the VSCode/GDB side. Below is the launch.json I have so far:

 

 

 

 

 

{
 "version": "0.2.0",
 "configurations": [
 {
 "cwd": "${workspaceFolder}",
 "executable": "./build/debug/build/test.elf",
 "name": "Debug with ST-Link",
 "request": "launch",
 "type": "cortex-debug",
 "runToEntryPoint": "main",
 "showDevDebugOutput": "none",
 "servertype": "stlink"
 
 },
 
 {

 "name": "Launch",
 "type": "cppdbg",
 "request": "launch",
 "cwd": "${workspaceFolder}",
 "program": "${command:cmake.launchTargetPath}",
 "MIMode": "gdb",
 "miDebuggerPath": "${command:vscode-embedded.st.gdb}",
 "miDebuggerServerAddress": "localhost:3333",
 "debugServerPath": "${command:vscode-embedded.st.gdbserver}",
 "debugServerArgs": "--stm32cubeprogrammer-path ${command:vscode-embedded.st.cubeprogrammer} --swd --port-number 3333",
 "serverStarted": "Waiting for connection on port .*\\.\\.\\.",
 "stopAtConnect": true,
 "postRemoteConnectCommands": [
 {
 "text": "load build/debug/build/UPADermitron.elf"
 }
 ],
 "logging": {
 "engineLogging": true
 },
 "preLaunchTask": "Build",
 "svdPath": "${command:vscode-embedded.st.svd}/STM32L4R9.svd"
 }
 ]
}

 

 

 

 

Any help is appreciated! Sorry if this has come up but I have tried to find with no luck.

 

    This topic has been closed for replies.