Giter Club home page Giter Club logo

cortex-debug's Issues

Debugger does not pause on breakpoint when FreeRTOS is enabled

I tried the newly added RTOS support but it does not seem to work for me as intended.

Steps to reproduce:

  1. Enable cortex-debug's new FreeRTOS support by adding "rtos": "FreeRTOS" to launch.json
  2. Set a breakpoint shortly after the call to vTaskStartScheduler.
  3. Plug in the STLink into USB and power on the target board
  4. Press the "Go" symbol to start debugging
  5. The debugger will break immediately after reset as usual
  6. Press continue
  7. The actions of the target board indicate that the breakpoint is indeed hit, but everything in VSCode appears as if the target is still running. Clicking on the pause button has no effect.

Debug console output:

adapter speed: 2000 kHz
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08008e20 msp: 0x20020000
Note: automatically using hardware breakpoints for read-only addresses.
[Switching to Thread 1]

I'm using:
STM32F405RG
STLink V2
OpenOCD 0.10.0
VSCode 1.19.0 on Linux

launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            // For the Cortex-Debug extension
            "type": "cortex-debug",
            "servertype": "openocd",
            "request": "launch",
            "name": "Debug ODrive",
            "executable": "${workspaceRoot}/build/ODriveFirmware.elf",
            "rtos": "FreeRTOS",
            "device": "STM32F405RG",
            "configFiles": [
                "interface/stlink-v2.cfg",
                "target/stm32f4x_stlink.cfg",
            ],
            "cwd": "${workspaceRoot}"
        },
    ]
}

Feature Request: Addtional Scopes in Variable display

While looking at LLDB debug extension by Vadim, I found its Variable display very powerful. It includes not only Local variables, but also static and global variables, and various registers in categories. I find this quite good. The Cortex register views and Peripherals can become part of this. What do you think, @Marus?

Below is a screenshot of using the LLDB extension, and examining the variables and registers.

screen shot 2018-01-22 at 16 23 35

Parsing of SVD Files

Hi,
I recently tried using an svd file
I managed to pick up one from here https://github.com/posborne/cmsis-svd
since I'm using a LPC1769 I tried using this one https://github.com/posborne/cmsis-svd/blob/master/data/NXP/LPC176x5x_v0.2.svd

However it doesn't look like this works
in the debugger it just says "No SVD File Loaded"

In order to narrow things down a bit, I tried forcing the use of one of the svd files that comes with the extension
copy paste STM32F0xx.svd into the root directory then tried

"svdFile": "${workspaceFolder}/STM32F0xx.svd",

This actually works / is parsed, although it's the incorrect mapping for the MCU it does show entries within the debug window
This suggests there's something within LPC176x5x_v0.2.svd that the parser doesn't like

I might try removing bits of the file to see if that gets it to work

Access to bitpacked struct does not show up in debugger view

I dont know if this is cortex debug problem, or general vscode debugger problem, but here goes.

I have a bitpacked struct that has a lot of flags in it. Basically so that i can access it like struct.flag1 to see if it is set.

struct flags
{
      bool flag1 : 1;
      bool flag2 : 1;
      ...
      bool flag32: 1;
} __attribute__((packed));

However this will not show up nicely in the variable window. I only see: p:{...} and it is not extendable so that I can click it and see every flag as true/false

It works if I manually go into the gdb terminal and type "print p", then i get a nice list like

$3 = { flag1 = true, flag2 = false, ... flag32 = true }

GDB port conflict

We have found a few cases where the default port 50000 is being used by other software. This port conflict causes GDB unable to launch.

Would you be able to add an option in the debug config that can manually select the port which the server should listen and GDB should connect to?

Rust Support

This is an issue to discuss things related to support for Rust.

Restart not updating code location in editor

When I click on restart (or pause then restart), the debugging session does not jump to the init functions. The Debug console outputs "Resetting target", but the code stays in the old location and the call stack window doesn't change.

If I then click the step over button, it jumps to the correct location, so I'm convinced the reset is actually taking place, it's just the editor / call stack that isn't updated.

Unable to restart a running debug session

If the debugger is running (not paused) and I press the "restart" button, I get the following error:

Could not restart: Cannot execute this command while the target is running. Use the "interrupt" command to stop the target and then try again. (from interpreter-exec console "monitor halt")

I started digging through the code, and it looks like the interrupt command is sent before monitor halt so I'm not sure why the error message is saying this. Maybe because there is set target async on and the device hasn't stopped running yet?

This is my launch.json.

{
    "name": "Launch app",
     "type": "cortex-debug",
     "request": "launch",
     "servertype": "jlink",
     "device": "MK22FN512VLH12",
     "executable": "${workspaceRoot}/build/app/Firmware.elf",
      "svdFile": "${workspaceRoot}/jlink/MK22F51212.svd"
}

[Windows] Unable to capture stderr output from spawned st-util process

There seems to be a issue on Windows that the stderr output from spawned st-util.exe is not captured. Thus the promise returned byGDBServer.init() never gets resolved. This eventually leads the st-util.exe process being sent a SIGTERM signal due to timeout, and the debugging on Windows using st-util fails to launch.

I'm looking into this problem at the moment. This issue tracker will track my findings and relevant discussions.

Set path to arm-none-eabi-gdb

Is there an option to set the path to arm-none-eabi-gdb? I can have different versions on my system and would like to able to select per project.

Strange behaviour of this extension in my side

Hello,
I try since several times to run my project with your extension, it does not run as it should but I do not know where to start to debug:

I am able to run my project using a classic cppdbg configuration (here after):
/*{
"name": "(gdb) Proj",
"logging": { "trace": true, "traceResponse": true, "engineLogging": true },
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/Proj",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "/opt/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gdb",
"miDebuggerServerAddress": "localhost:2331",
"debugServerPath": "/opt/SEGGER/JLink_V614f/JLinkGDBServer",
"debugServerArgs": "-device STM32F429ZI -if SWD -speed 10000",
"serverStarted": "connection...",
"preLaunchTask": "flash",

        "setupCommands": [
            {
                "description": "Exec file and symbols",
                "text": "-file-exec-and-symbols ${workspaceRoot}/Proj",
                "ignoreFailures": true
            }
        ]
    }*/

I just had to make a flash target in my makefile that directly uses Jlink to flash

ANd with the cortex M debug configuration as this:
{
"name": "Debug Microcontroller",
"type": "cortex-debug",
"request": "launch",
"servertype": "jlink",
"executable": "${workspaceRoot}/Proj",
"cwd": "${workspaceFolder}",
"device": "STM32F429ZI",
"interface":"swd",
"showDevDebugOutput": true,
"debugServer": 2331,
}

I get the first time "connection refused": I assume this was because the Jlink gdb server path was not correct, I found in another issue these parameters in my preferences settings:
"cortex-debug.JLinkGDBServerPath": "/opt/SEGGER/JLink_V614f/JLinkGDBServer",
"cortex-debug.armToolchainPath": "/opt/gcc-arm-none-eabi-5_4-2016q3/bin", (I tried too with a terminating "/")

But I still have the "connect ECONNREFUSED 127.0.0.1:2331" message

If I start manually the JlinkGDBServer, I do not have this message, but the debug does not start, event if I get in the JlinkGDBServer side a connection (Waiting for GDB connection...Connected to 127.0.0.1
)

Would you have some tricks top enable debug verbosity so I can understand what happens ?

Thanks

RTOS Support

I'm not sure I understand this comment in the marketplace overview:

RTOS Support (J-Link and OpenOCD - RTOS supported depends on GDB server support)

To me RTOS support is the ability to see a list of tasks or the state of a mailbox etc. In particular it is nice to be able to see the call stack of any task and jump to it to examine its state. So not really a GDB thing but knowing how to find and decode the state of things on the target.

Adding more tag on description.

Hello,
Firstly thank you very much for this awesome extension. It does exactly what I need. I would like to share my experience and simeple suggestions here.

When tried searching extensions for embbeded system on VS code for the first time, I could not find this extension. This is because I my search words was "openocd" and "jlink" and this extension did not appear on the search result. I missed this extension for months.

So why not make this extension more searchable, e.g. adding openocd, jlink, stlink, and etc tags in the extension description?

Thank you.

Breakpoint at main

I'm not sure if it's common to all projects (this is the first I have tried), but on starting the debug session, the program counter is set to my reset handler, which runs the init functions before main.

On other debuggers (Ozone / Eclipse) it would set a break point at main as this is normally where you want to start debugging. Obviously you can set a break point there, but I thought it was a good feature to have.

Support for various number formats

Sometimes it's helpful to be able to view the register values in decimal or well formatted binary. This could be useful for our teaching purpose.

One possibility is adding options in the right-click drop down menu to change the numeric format of a particular register.

Would you be considering adding such support? And would you like a pull request for it?

No SVD file loaded issue

Debugger works fine except loading SVD file.

My config is:

{
    "version": "0.2.0",
    "configurations": [
        {
            "cwd": "${workspaceRoot}",
            "executable": "./build/firmware_flash.elf",
            "name": "Debug",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "openocd",
            "configFiles": [
                "/usr/share/openocd/scripts/board/atmel_saml21_xplained_pro.cfg"
            ],
            "svdFile": "${workspaceRoot}/doc/saml21b/svd/ATSAML21J18B.svd"
        }
    ]
}

The official SVD file comes form http://packs.download.atmel.com/ website.

I use Ubuntu 14.04, Visual Studio Code 1.22.2 and OpenOCD 0.10.0

Failed to launch OpenOCD GDB Server

Hi Marcel,
I installed Cortex-Debug 0.1.11 in the VS Code on Win7(64 bit), and here is my settings:

{
    "cwd": "${workspaceRoot}",
    "executable": "./obj/main/main.elf",
    "name": "cortex-debug",
    "request": "launch",
    "type": "cortex-debug",
    "servertype": "openocd",
    "configFiles": [
        "C:\\openocd\\share\\openocd\\scripts\\target\\stm32f4x.cfg"
    ]
}

But when start debugging, it failed and i find the following logs from "Adapter Output":

Open On-Chip Debugger 0.10.0 (2017-08-21) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Error: Debug adapter does not support any transports? Check config file order.
Error: unable to select a session transport. Can't continue.
shutdown command invoked

and a messages Failed to launch OpenOCD GDB Server: Timeout..

Is that means there is something missing for transports? But I cant find any parameter to set this.
Thanks.

JLink and SVD files

I started to use this plugin with JLink.
From configuration point of view device setting is overriding svdFile.
The problem is, that I'm using Silicon Laboratories microcontrollers and some of symbols in device type are XXX for JLink device setting. SVD files are available for exact model of chip.

Would it be possible to change behavior of device and svdFile dependence?
Or might it be feasible to supply SVD files for other vendors?
On the other hand many SVD files will increase size of plugin...

VARIABLES view missing types?

Hi!
I cannot find a way to see the type of the variables in the VARIABLES view.
I'm not sure if I'm missing how to turn it on? Knowing the type helps a lot when debugging code to know if it's a pointer, or reference, etc.

I can see it when hovering, but I'd like it to always be visible, like an extra column or in parentheses or similar.

BR Emil

More error output from server

At the moment the output from server (st-util etc.) as been piped, and is pretty silent. It can be difficult to see what happened if there was an error (e.g. Timeout). It may be a good idea to direct the output to the OUTPUT tab.

Add to watch fills in wrong variable name

When right clicking on a local variable, and selecting "Add to watch", it adds "var_variable" to the watch window when it should be "variable".
When adding an array element it adds "var_array.0" for element 0. It should be "array[0]".

You can manually edit this to work, but it would be nicer if it filled it in correctly to being with.

P.S. I hope you don't mind all the issues I'm creating, I just really like the tool and want to help make it better.

Feature to view variables as different types

Would it be possible to add the ability to view the variables as different types? Working with hardware means viewing the variables as hex and even binary can be really useful. Pointers are converted to hex and ASCII is shown next to bytes, so I guess it's possible?

Also array pointers only show up as a single value, again it would be very useful if you can choose to display these as an array. Usually you are asked to enter the size of the array, then it just displays that area of memory as the variable.

How to Support or Donate?

Hi, I saw this project over on Reddit. I really like the initiative and I want to support your work. Is there a way to send a monetary contribution?

Feature request: run openocd from a remote pc

I have been using the extension and found it to be very nice and valuable tool. Now, I wanted to run openocd from another computer in the same network. I was able to achieve this by modifying the source-code and changing the ip address and port numbers while at the same time disabling the local openocd. This is working fine but I was wondering if this is something you can consider for future releases. This can be in the form of providing optional arguments to disable the local openocd and provide the remote address and port numbers. The remote openocd can be started manually.

Thanks

How to set a breakpoint at main

Hi, I am trying to use your plugin, it works but I want more...

launch.json:

{
"version": "0.2.0",
"configurations": [
{
"name": "Something Launch",
"type": "cortex-debug",
"request": "launch",
"servertype": "jlink",
"device": "STM32L433CC",
"cwd": "${workspaceRoot}",
"executable": "build/something.elf",
"interface": "swd",
"debuggerArgs": [
],
"svdFile": "/Users/path to/Keil/STM32L4xx_DFP/2.0.0/CMSIS/SVD/STM32L4x3.svd"
}
]
}

When press F5 the debug console shows:
/Users/someone/.gdbinit:1: Error in sourced command file:
No symbol table is loaded. Use the "file" command.
Reading symbols from /Users/path to/project/build/LoRa_eTag.elf...
done.
0x08000df2 in main () at Core/Src/main.c:101
101 MX_RTC_Init();
Not implemented stop reason (assuming exception): undefined
Resetting target
Resetting target

The program halts at:

ldr sp, =_estack

I want to set a breakpoint at main ant halt at main when we launch debug.

Failed to launch undefined GDB Server: Timeout

Hi,
I have no success starting a JLINK debug session on Windows. I am using the following launch configuration:

{
    "version": "0.2.0",
    "configurations": [
        
        {
            "name": "Debug (J-Link)",
            "type": "cortex-debug",
            "request": "launch",
            "servertype": "jlink",
            "cwd": "${workspaceRoot}",
            "executable": "./build/temp-control-f4.elf",
            "device": "STM32F407VG",
            "interface": "swd",
        }
    ]
}

The JLinkGDBServer launches successfully and waits for a connection:
jlinkgdbserver

But after several seconds, I get an error message which says: Failed to launch undefined GDB Server: Timeout.

I am assuming, somethin with the path to the actual arm-none-eabi-gdb executable is not right? I have these lines in my workspace settings:

"cortex-debug.armToolchainPath": "C:\\Program Files (x86)\\GNU Tools ARM Embedded\\6 2017-q2-update\\bin",
"cortex-debug.JLinkGDBServerPath": "C:\\Program Files (x86)\\SEGGER\\JLink_V620f\\JLinkGDBServer.exe"

armToolchainPath is the one with the arm-none-eabi-* executables.

Is there anything else I forgot to configure?

Thanks!

ITM debugging doesn't work under Windows

When I try to set swoConfig.enabled to true in my launch.json configuration entry, I get an exception:

Failed to launch OpenOCD GDB Server: Timeout.

In the adapter output, it starts almost normally, but then it logs

Error: Can't open trace destination file

which appears to come from here, bitching about the tpio config internal command being called with an invalid path - here in the extenion, I gather. I also can see that ChildProcess.spawnSync('mkfifo', [this.swoPath]) is only called on non-windows platforms, so this is probably the culprit - the file really doesn't exist.

What do you think can I do about this? Do you want to support this at all?


This SO thread suggests using sockets instead. I have no idea what openocd expects to work with.
I also have mkfifo tools installed from Mingw64 and Cygwin64, could they work if I just remove the OS check?

Setting break point while target running

I am not sure if this is a limitation of VS Code (I haven't really used it for debugging before). But setting break points while the target is running brings up a circle outline that says "unverified breakpoint" and this then does not trigger. It also doesn't become a proper break point when the target is paused either.

The hardware is capable of setting break points on a running target and I am used to setting them in other debuggers.

Error: spawn arm-none-eabi-gdb ENOENT

Hallo.
Thanks for your plugin. I'm trying to use it.

launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Microcontroller",
"request": "launch",
"type": "cortex-debug",
"executable": "${workspaceRoot}/_debug/sdw_d.elf",
"cwd": "${workspaceRoot}",
"servertype": "jlink",
"device": "STM32F446RE",
}
]
}

vscode debug console:

Could not start debugger process, does the program exist in filesystem?
Error: spawn arm-none-eabi-gdb ENOENT

Terminal:

Andreys-Mac-Pro:Dev andrey$ arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors 6-2017-q1-update) 7.12.1.20170215-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
Type "show configuration" for configuration details.
---Type to continue, or q to quit---
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) Quit
Andreys-Mac-Pro:Dev andrey$

What am I doing wrong?

bmp enhancements; swo support

Would it be possible for you to add swo support for the bmp? The code to do this is relatively straightforward (See https://github.com/mubes/orbuculum/blob/master/Src/orbuculum.c around line 1202 ... there may be other stuff in Orbuculum you can make use of too) but does need to be enabled via a suitable monitor command (monitor traceswo for 'standard' bmp monitor traceswo <speed> for bluepill or bmp with async swo support). When parallel trace support is in place this will probably be enabled by a similar mechanism.

svdFile not loading

Hello, really enjoying your plugin. For whatever reason, the SVD file I have is not loading. I have a link in the configuration to the svd file as shown below. The SVD file is for the nrf52832_xxAA board from Nordic Semiconductors. Their SDK with the SVD file can be found at http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v14.x.x/

"svdFile": "C:/projects/svd/nrf52.svd",

Thoughts?

bmp enhancements; configurable command lines

First of all - thanks for this, exactly what we need, a competent debug tool on a reasonably lightweight platform. I will file a number of issues separately so they can be addressed/reconciled/rejected independently as appropriate.

The first issue is that the command lines available to the bmp configuration (and perhaps to others, I don't know) appear to be set in program code (in bmp.ts as far as I can see). That means that some assumptions and behaviours are hard-coded into the program. In my case, the use of SWD with the monitor swdp_scan is not appropriate, but I can also see things like multi-drop configuration, initial run-to and ITM configuration all being different depending on specific use-cases.

Would it be possible/is it appropriate for you to add the option to override these via the launch.json configuration?

Debug arguments not recognized

Hi!
Really like your extension so far! However, I am having problems adding my own debug arguments.
Specifically, I am trying to enable monitor mode debugging on the nrf52 platform, and therefore need to set the "mon exec SetMonModeDebug = 1" and "mon exec SetMonModeVTableAddr = 0x23000" arguments. I get some error stating "No such file or directory". Can also mention that these arguments are recognized perfectly fine by the code-debug/Native debug extension.

Support J-Link target interface selection/incorrect default executable for J-Link on Windows.

It's very excited to found this extension, I'am a Chinese developer , and I'am using VSCode to develop STM32 program everyday , edit and debug(use cpp extension +J-Link GDB server ).

I tried cortex-debug , but the first problem is , I use SWD interface , not JTAG , to connect to STM32 . And cortex-debug do not work for this. Can you add a configuration for interface chosen?

The command introduction at the 83 page of <UM08001_JLink>.

Anyway , it's very appreciate , and I will study your source code , to figure out how this work .

Timeout issue with Openocd

Hi,
I've recently been trying this out with Visual Studio Code
I'm currently using a LPC1769 test board

However I've been experiencing timeout errors when starting the debug session using openocd

Failed to launch OpenOCD GDB server: Timeout

So far I've tried

  • JLink / Segger - attached to the SWD port of the board - works okay
  • OpenOCD - attached to the CMSIS-DAP adapter on the board via USB - generates timeout error

So far I've managed to get this working with a JLink Segger okay, using the following config
This seems to work fine:

        {
            "name": "Debug (JLink Segger)",
            "type": "cortex-debug",
            "request": "attach",
            "servertype": "jlink",
            "cwd": "${workspaceRoot}",
            "executable": "./BUILD/LPC1768/GCC_ARM/GBD.Dlang.MbedBlinkyTest.elf",
            "device": "LPC1769",
            "interface": "swd",
        }

However using the inbuilt CMSIS-DAP / USB adapter that's built into the board, results in the timeout error

        {
            "name": "Debug (OpenOCD USB)",
            "type": "cortex-debug",
            "request": "launch",
            "device": "LPC1769",
            "servertype": "openocd",
            "cwd": "${workspaceRoot}",
            "executable": "./BUILD/LPC1768/GCC_ARM/GBD.Dlang.MbedBlinkyTest.elf",
            "configFiles": [
                "./scripts/openocd_configs/usb_boardconf.cfg"
            ]
        },

usb_boardconf.cfg

source [find interface/cmsis-dap.cfg]
source [find target/lpc17xx.cfg]
adapter_khz 500

# Make the initial connection and halt the board
init
targets
reset halt

I have managed to connect via openocd / gdb using the command line fine
which suggests a problem with the plugin

openocd -f scripts\openocd_configs\usb_boardconf.cfg
arm-none-eabi-gdb.exe --eval-command="target remote localhost:3333"

It would be nice if you could just specify a gdb instance running on a specific port to connect to
since I think the attach mode, still launches it's own gdb instance

Website documentaion for other debuggers

The website currently only mentions the Jlink and OpenOCD server.

I'd like to see the configuration required for the STLink and black magic probe.

Could you please try to update this?

Thanks

Move cortex-debug.armToolchainPath to launch.json

I have several different versions of toolchains installed, so having a single setting in settings.json is slightly awkward to use.

It would be a big help if I could set the path in launch.json

"configurations": [
        {
            "armToolchainPath": "/path/to/toolchain/",

would this be a possible?

Feature Request: JLinkRTTClient

Seggers RTT is an excellent debug print out and also trace tool:
https://www.segger.com/products/debug-probes/j-link/technology/real-time-transfer/about-real-time-transfer/

In particular I use JLinkRTTClient : "J-Link RTT Client acts as a Telnet client, but automatically tries to reconnect to a J-Link connection when a debug session is closed. The J-Link RTT Client is part of the J-Link Software and Documentation Pack for Windows, Linux and macOS and can be used for simple RTT use cases."

I manually start and stop this for each debug session.

A minimal feature request would be to start and stop this, similar to a semihosting session but better.

See here for a side by side comparison:
https://blog.segger.com/getting-printf-output-from-target-to-debugger/

Native debug configuration

How is difficult to add native debug configurations which we had in the original extension?

See our existing configuration for native-debug. Os, having this configuration we could switch to your extension. We don't need to specify paths to openOCD, J-LInk, or etc, because we handle this work on our virtual GDB side.

Thanks!

Random breakpoint after startup with FreeRTOS enabled

Before I enabled FreeRTOS as the RTOS in the cortex debug configuration my application would always halt on the Reset_Handler in my startup asm after uploading and starting to debug (is there a way to disable this break on start?)

Now with it enabled (I also have the OpenOCD support file) upon starting it instead picks another thread:

image

I believe this might be related to the second issue described in #31 where the wrong thread is focused, but I don't quite understand how these other threads already appear to be created when this should be right after a reset.

fails to find the source code

Debug session fails to find the corresponding source code. The underlying environment (gdb and OpenOCD) seems to be working good. I am able to download the code to the target, start a debug session, and halt the target. However, on halt, I always get disassembly rather then the source code. Addition to this, breakpoints set on source code lines are also not working.

The target binary is compiled with dwarf debugging symbols. The gdb running in the debug console itself is seeing the symbols like below. Breakpoints set manually through the console also works as expected.

target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x08001b5c msp: 0x20001800
Note: automatically using hardware breakpoints for read-only addresses.
Temporary breakpoint 1, main () at Src/main.c:83
83	  HAL_Init();

I could not figure out how to make the VS Code be aware of the source code. Is there a way to forcibly tell the existence of the source tree?

VS Code in question is running under Windows 10. I am using gnu-mcu-eclipse-openocd-0.10.0-7-20180123-1217-win64 and gcc-arm-none-eabi-7-2017-q4-major-win32-sha2 for debugging.

Failed to launch undefined GDB Server

Error: spawn EACCES
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": ".......elf",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "STM32F722ZE",
"interface": "swd",
}
]

$ which JLinkGDBServer
/opt/local/bin/JLinkGDBServer

Hi, I attempted to us cortex-debug on OSX. I can not figure out how to debug this issue as there is no verbose output available. I also added /opt/local/bin to the JLink path in user settings. Both approaches didn't work. My setup is working in eclipse. Thanks.

bmp enhancements; Run to start

It would be useful in the startup commands if you could add start which would place a temporary breakpoint at main and run to it, rather than at the instructions after reset...of course you might on occasion want to run right from reset (refer to my previous note about configurable startup options :-) ).

DAVE

ST-Link support and other contributions

Hi, this is some great work that you are doing!

I'm wondering if you will be supporting ST-Link tools? I'm an assistant at a university and we will be using VSCode as an IDE for ARM development. We will be using PlatformIO community version for the project management, but would like to use this debugger plugin as opposed to a paid and less featured one from PlatformIO.

For simplicity of setting up, we'd like to use ST-Link tools which comes with PlatformIO tool chain as opposed to OpenOCD.
So we are wondering if you will be interested in adding support or taking in merge request for this feature, and possibly some other features that we might need in the future.

Cheers again for the work!

Some core Cortex registers missing?

Hi! I was testing the debug plugin, great work!

After testing some I realized that the following registers are missing in the register view, is there a way to add them or am I doing something wrong?
Thanks!

PRIMASK
FAULTMASK
BASEPRI
CONTROL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.