Cuda developmnent on Jetson Nano

Hi
I set up my jetson nano with the sdk manager and installed JetPack 4.6.1. Further more I tried to debug the matrix multiplication example within visual studio code and run into the following error:

cuda-gdb/7.12/gdb/infrun.c:2795: internal-error: resume: Assertion `pc_in_thread_step_range (pc, tp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]

Then I searched for solutions and found the following Topic:

They described to update CUDA to Version 11.X but as I searched for updating on Jetson Nano I encountered the following post:

So is it still not possible to update CUDA to Version 11.X on Jetson Nano? And if so, what is the best way to debug applications directly on Jetson Nano without the error that is mentioned above?

hi ,
Have you tried running cuda-gdb from commandline ?
You can create a debug release by specifying
make dbg=1

Hi,
first of all I want to have the single step feature of the debugger like shown in the picture below.


Second I already created the debug release by configuring the tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build",
            "type": "shell",
            "command": "make dbg=1",
            "problemMatcher":[
                "$nvcc"
            ],
            "group": "build" 
        },
        {
            "label": "Rebuild",
            "type": "shell",
            "command": "make clean; make dbg=1",
            "problemMatcher":[
                "$nvcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

In general the single step feature works until step 3 and then crashes with the error mentioned above. So back to my question:
Is it still not possible to update CUDA to Version 11.X on Jetson Nano? And if so, what is the best way to debug applications directly on Jetson Nano without the error that is mentioned above?

can you check if cuda-gdb straight from the terminal works ok (and post output here) and you can try setting the breakpoint on Cuda Code instead of CPU to check as well.

Want to find out if issue is VSC plugin.

nvnano@nvnano-desktop:/media/nvnano/SD-Card/cuda-10.2/samples/0_Simple/matrixMul$ cuda-gdb matrixMul
NVIDIA (R) CUDA Debugger
10.2 release
Portions Copyright (C) 2007-2020 NVIDIA Corporation
GNU gdb (GDB) 7.12
Copyright (C) 2016 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 "aarch64-elf-linux-gnu".
Type "show configuration" for configuration details.
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"...
Reading symbols from matrixMul...done.
(cuda-gdb) break matrixMul.cu:276
Breakpoint 1 at 0x928c: file matrixMul.cu, line 276.
(cuda-gdb) run
Starting program: /media/nvnano/SD-Card/cuda-10.2/samples/0_Simple/matrixMul/matrixMul 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=1, argv=0x7ffffff2f8) at matrixMul.cu:276
276	    printf("[Matrix Multiply Using CUDA] - Starting...\n");
(cuda-gdb) next
[Matrix Multiply Using CUDA] - Starting...
278	    if (checkCmdLineFlag(argc, (const char **)argv, "help") ||
(cuda-gdb) next
291	    int dev = findCudaDevice(argc, (const char **)argv);
(cuda-gdb) next
0x0000007fb7d4d784 in _dl_catch_exception () from /lib/aarch64-linux-gnu/libc.so.6
(cuda-gdb) next
Single stepping until exit from function _dl_catch_exception,
which has no line number information.
0x0000007fb7fe2418 in _dl_find_dso_for_object () from /lib/ld-linux-aarch64.so.1
(cuda-gdb) next
Single stepping until exit from function _dl_find_dso_for_object,
which has no line number information.
cuda-gdb/7.12/gdb/infrun.c:2795: internal-error: resume: Assertion `pc_in_thread_step_range (pc, tp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

The debugger started from the terminal crashes too. What should I do?

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Does matrixmul compile and run on the device without any tools attached ?