Bebug RP2040 not working (i use J-link EDU)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- arduino, cpp, raspberry-pi
- Domain
- devtools, embedded-iot
Research direction
Start with platformio.ini and src/main.cpp, then reproduce the J-Link debug session using the shown setup and loop breakpoints. Compare the behavior with the linked PlatformIO community discussion and inspect the debug console's invalid addresses; done means reliable breakpoints and valid call-stack and memory output during the RP2040 session.
Written by the indexing model from the issue text.
Description
I can fine upload and run it blink.cpp and others
Debug starts and breaks at setup
Call Stack "dump"
setup @ 0x10000902 (c:\Users\hs\Documents\PlatformIO\Projects\RP2040_1\src\main.cpp: 6)
@ 0x60582020 (Unknown Source: 0)
Data from DEBUG CONSOLE
Temporary breakpoint 1, setup () at src \ main.cpp: 66
pinMode (LED_BUILTIN, OUTPUT);
Reading 64 bytes @ address 0x20041F00
WARNING: Failed to read memory @ address 0x60582020
WARNING: Failed to read memory @ address 0x60582020
If I put BreakPoint in the loop it stops Sometimes once) I almost never, if i make a manual break after a while
-> Reading 64 bytes @ address 0x10000900 Read 2 bytes @ address 0x10000920 (Data = 0x2100)
Call Stack "dump"
@ 0x00000030 (Unknown Source: 0)
<signal handler called> @ 0xfffffff9 (Unknown Source: 0)
@ @ 0x1400000c (Unknown Source: 0)
?? @ 0xfffffffe (Unknown Source: 0)
DEBUG CONSOLE after Break manual pause
Program
received signal SIGTRAP, Trace / breakpoint trap.
Removing breakpoint @ address 0x10000920, Size = 2
Removing breakpoint @ address 0x10000920, Size = 2
Read 4 bytes @ address 0x00000030 (Data = 0xE7FDBF30)
Read 2 bytes @ address 0x00000030 (Data = 0xBF30) 0x00000030 in ?? ()
Read 4 bytes @ address 0x20041EFC (Data = 0xB1000000)
Reading 64 bytes @ address 0x20041EC0
Read 4 bytes @ address 0x1400000C (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x1400000C (Data = 0xFFFF)
WARNING: Failed to read memory @ address 0xFFFFFFFE
WARNING: Failed to read memory @ address 0xFFFFFFFE
Debugger Segger J-LINK EDU
platformio.ini
[env: pico]
platform = raspberrypi
board = pico
framework = arduino
build_type = debug
upload_protocol = jlink
debug_tool = jlink
debug_init_break = tbreak setup
test code
#include <Arduino.h>
// the setup function runs once when you press reset or power the board
void setup () {
// initialize digital pin LED_BUILTIN as an output.
pinMode (LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop () {
digitalWrite (LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay (1000); // wait for a second
digitalWrite (LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay (1000); // wait for a second
}
Please see
https://community.platformio.org/t/debug-pico-rp2040-some-who-have-success-with-it/25865/2
KR Henrik
- Dominant language
- Python
- Stars
- 96
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from platformio/platform-raspberrypi
-
Pico 2 and 2wOpenboard request
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
board request
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
board request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 30/100
platformio/platform-raspberrypi#86 · 1 reaction ·
-
board request
Difficulty 5/5 Over a week Newbie friendliness 25/100
platformio/platform-raspberrypi#87 · 2 reactions ·
All issues in platformio/platform-raspberrypi
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day