To install the arm-none-eabi-gdb debugger in Ubuntu for use with Visual Studio Code, you can follow these steps:
- Open a terminal window.
- Update the package list by running the following command
sudo apt update
- Install the gdb-multiarch package by running the following command:
sudo apt install gdb-multiarch
- Verify that the arm-none-eabi-gdb command is available by running the following command:
arm-none-eabi-gdb –version
If the command is installed correctly, you should see the version number of the gdb debugger.
- In Visual Studio Code, open the settings editor by selecting “Preferences: Open User Settings” from the Command Palette (Ctrl+Shift+P).
- In the search bar at the top of the settings editor, type “debugger path”.
- Under “Debug > GDB > Path”, set the path to the arm-none-eabi-gdb command. The path should be
/usr/bin/arm-none-eabi-gdb
.Alternatively, you can set the path to the command in the launch.json file for your project. For example:bashCopy code"configurations": [ { "name": "Debug", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/build/program.elf", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "MIMode": "gdb", "miDebuggerPath": "/usr/bin/arm-none-eabi-gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ]
Once you have installed and configured the arm-none-eabi-gdb debugger, you should be able to use it for debugging code on your Teensy board in Visual Studio Code.
sudo apt install gcc-arm-none-eabi
ln -s /usr/bin/gdb-multiarch /usr/bin/arm-none-eabi-gdb
Setup Teensy Loader in Ubuntu:
https://www.pjrc.com/teensy/loader_linux.html