Debugging NuttX on Atmel SAM L21 microcontroller with J-Link programmer

Run JLink GDB server this way:

$ JLinkGDBServer -device ATSAML21J18 -if SWD

Execute GDB passing the ELF file:

$ arm-none-eabi-gdb nuttx

Connect to GDB server:

(gdb) target remote localhost:2331
Remote debugging using localhost:2331
0xfffffffe in ?? ()

Reset, load, add breakpoint and continue:

(gdb) monitor reset
Resetting target

(gdb) load nuttx
Loading section .text, size 0xc758 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0xc758
Loading section .data, size 0x70 lma 0xc760
Start address 0xa4, load size 51152
Transfer rate: 12488 KB/sec, 3410 bytes/write.

(gdb) b os_start
Breakpoint 1 at 0x3130: file init/os_start.c, line 260.

(gdb) c
Continuing.

(gdb) step

One thought on “Debugging NuttX on Atmel SAM L21 microcontroller with J-Link programmer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s