Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update gdb debugging doc #1083

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/development/openocd_gdb_debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Click on "Run", then "Add Configuration", then "Cortex Debug".

This should automatically create the needed "launch.json" file.

The version of cortex-debug tested here is 0.3.13. If you want to downgrade, go to 'uninstall' and 'install other versions...'.

#### Cortex Debug Configuration

Inside of the file, replace everything with the following:
Expand All @@ -66,7 +68,7 @@ Inside of the file, replace everything with the following:
{
"name": "STM32 Debug",
"cwd": "${workspaceRoot}",
"executable": "./build/cf2.elf",
"executable": "${workspaceRoot}/build/cf2.elf",
"request": "launch",
"type": "cortex-debug",
"device": "STM32F405",
Expand All @@ -93,8 +95,8 @@ Inside of the file, replace everything with the following:
- "runToMain" tells the GDB debug server to jump to main by default
- "preLaunchCommands" specifies the commands for the GDB server to send before giving away control to you; the commands here mimic the options that the tutorial for Eclipse below specifies

> **_NOTE:_**
> To debug an app, make sure that "cwd" points to the root dir of your app. Note that the "svdFile" path is relative to the "cwd" dir. You can add your app debugger as a separate configuration.
> **Note: Debugging an App**
> To debug an app, make sure to change the "executable" to ""${workspaceRoot}/examples/app_hello_world/build/cf2.elf", or to which app you would like to debug. You can add your app debugger as a separate configuration.

#### Installing the SVD file

Expand Down