Notes on setting up debug environment on an nvidia jetson

Hey all I just want to share a few thoughts on what it took for me to get the debug environment up and running starting from scratch on a jetson xavier nx development board. This isn’t a comprehensive guide by any means just a place to document all the little things i ran into while following along with the linux setup documentation for debug with a stlinkv3

Everything went pretty smooth except for a few things:

I manually linked the arm toolchain components according to this post: apt - How to install arm-none-eabi-gdb on Ubuntu 20.04 LTS (Focal Fossa) - Ask Ubuntu

The instructions for installing the arm toolchain on the official guide are unclear imo and don’t really work / give you any confirmation it worked. Also I had to link arm-none-eabi-ar and arm-none-eabi-objcopy along with the others mentioned in the post

I added upper case letters to some file paths in c_cpp_properties.json and fixed some deprecated file paths

I added executable permissions to build_examples.py otherwise rebuild_all.sh would fail

the guide say to run “task build all” in the vscode command window which is confusing imo. the real goal is to run rebuild_all.sh the task thing never worked for me

Needed to update openocd version from 0.10.0 to 0.11.0 as described by Openocd error "Can't find interface/stlink.cfg" - #4 by ben_serge

had error with USB access. Added a rule for the STlink according to eclipse - openocd **Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED** - Stack Overflow and [feature] STLINK-V3 programmer support · Issue #820 · stlink-org/stlink · GitHub. not sure if it really worked… I think it only worked after I swapped usb ports.

each project requires that I go into the “build” folder and add executable permissions to the files there otherwise make fails. Basically it gets mad until i give 777 to everything in the build folder. Then I’m golden for all debugging!

anyways hopefully this is helpful to anyone looking into setting this up for themselves. Takes a minute but don’t get discouraged, now I can debug!!

2 Likes