Skip to content

Pico RP2040 - How to debug with Segger J-Link? #233

Open
@rei-vilo

Description

@rei-vilo

How to debug an Arduino program with the Segger J-Link?

  • Core: Arduino Mbed OS RP2040 Boards
  • Board: Pico RP2040 board
  • Option: -g3 -ggdb
  • Programmer: Segger J-Link

The mbed RTOS plug-in doesn't seem to be listed among the standard options for the JLinkGDBServer.

The debugger stops at the two breakpoints...

Breakpoint 1, loop () at embed1.ino:94
94	    blink(myLED, 4, 333);

Breakpoint 2, blink (pin=25 '\031', times=times@entry=4 '\004', ms=ms@entry=333, level=level@entry=true) at LocalLibrary.cpp:27
27	        digitalWrite(pin, (level ^ (i % 2)) ? HIGH : LOW);

...then loops endlessly. Pausing shows the error...

Program received signal SIGTRAP, Trace/breakpoint trap.
0x1000636a in mbed_die ()

...with code

0x10006364: 10 b5           	push	{r4, lr}
0x10006366: 00 f0 55 f8     	bl	0x10006414 <core_util_critical_section_enter>
0x1000636a: fe e7           	b.n	0x1000636a <mbed_die+6>

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions