damogranlabs / VS-Code-STM32-IDE

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

Cortex Peripherals and Registers Pane wont open while debugging #4

Closed ali80 closed 5 years ago

ali80 commented 5 years ago

I cant figure out if there is a bug with cortex-debug extension or there is something wrong with the configurations. here is what is working

what is not working

I tried checking the svd file with Keil and the debugging works fine there using the same SVD file, here is the launch.json file

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Cortex debug",
            "type": "cortex-debug",
            "request": "launch",
            "servertype": "openocd",
            "cwd": "${workspaceFolder}",
            "executable": "E:/temp/ARM/NUCLEO-F446/vsCodeTest/build/vsCodeTest.elf",
            "svdFile": "C:/Keil_v5/ARM/PACK/Keil/STM32F4xx_DFP/2.13.0/CMSIS/SVD/STM32F446x.svd",
            "configFiles": [
                "D:/STMicroelectronics/GNU-MCU-Eclipse/OpenOCD/0.10.0-10-20181020-0522/scripts/interface/stlink.cfg",
                "D:/STMicroelectronics/GNU-MCU-Eclipse/OpenOCD/0.10.0-10-20181020-0522/scripts/target/stm32f4x.cfg"
            ]
        },
        {
            "name": "Debug current Python file",
            "type": "python",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "program": "${file}",
            "console": "integratedTerminal"
        }
    ]
}

screenshot of peripheral and register panes wont open

schperplata commented 5 years ago

Yeah, I am also experiencing strange things with VS Code lately. I have a working STM32F0x: core and peripheral tabs are working OK. Breakpoint and call stack also. However, I am unable to switch between different tabs while the core is halted and I keep getting "Error: "Cannot read property 'getTreeNode' of null" error after latest update.

I have downloaded SVD file (STM32F446x.svd) and tested it with my STM32F0 board: Cortex tabs are still available, and while peripheral registers are not correct (obviously), they are displayed correctly.

Even with no SVD file defined in Launch configuration, Cortex tabs are shown: image

So, my guess is there is something wrong with your VS Code or Cortex debug plugin. Try standard procedure: disable all unnecessary plugins and enable them one by one to see if other plugings interfere with Cortex Debug plugin.

So, try disabling plugins, try reinstall and than report issue on the appropriate place. I don't think this has anything to do with this scripts, since Cortex-debug configuration here is really as basic as it gets.