Skip to content

Support and Document pico-debug in PlatformIO #1427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 5, 2023

Conversation

maxgerhardt
Copy link
Contributor

@maxgerhardt maxgerhardt commented May 5, 2023

Partner for maxgerhardt/platform-raspberrypi@92f7dcb and maxgerhardt/platform-raspberrypi@bade1b3

  • Automatically adjusts used RAM size to 240K when using pico-debug
  • Detects and fails the build if USB stack is used (incompatible with pico-debug usage)
  • Adds pico-debug in protocols array
  • Removes non-autocreated tools/json/electroniccats_bombercat.json, board was possibly renamed earlier but not removed from repo?
  • Document pico-debug usage
  • Minor improvements to documentation based on user feedback

Example platformio.ini

[env]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
; only use if not yet merged
platform_packages = framework-arduinopico@https://github.com/maxgerhardt/arduino-pico.git
framework = arduino
board_build.filesystem_size = 1m

[env:pico_arduinopico]
board = rpipico
upload_protocol = pico-debug
debug_tool = pico-debug
build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB

With the documented flash and setup procedure, this works nicely.

grafik

@earlephilhower earlephilhower merged commit e95248a into earlephilhower:master May 5, 2023
@git2212
Copy link
Contributor

git2212 commented May 9, 2023

Hello,
I've tried this with the following in my platformio

board = rpipico
framework = arduino
platform =  https://github.com/maxgerhardt/platform-raspberrypi.git  ; see https://github.com/earlephilhower/arduino-pico/pull/1427
platform_packages = framework-arduinopico@https://github.com/maxgerhardt/arduino-pico.git ; only use if pull 1427 is not merged
; board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
board_build.f_cpu = 133000000L
upload_protocol = pico-debug
debug_tool = pico-debug

I don't know what I've done wrong but I get a barf from platformio:

ebugInvalidOptionsError: Unknown debug tool `pico-debug`. Please use one of `blackmagic, cmsis-dap, jlink, picoprobe, raspberrypi-swd` or `custom`:
  File "/home/arthur/.platformio/penv/lib/python3.7/site-packages/platformio/builder/main.py", line 187:
    env.SConscript("$BUILD_SCRIPT")
  File "/home/arthur/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py", line 597:

upload with pico-debug also fails, with

Warning! Unknown upload protocol pico-debug

I've also tried this without the platform_packages line as I see the changes have been merged...

should I have deleted some directories under .platformio first? I am sure I am missing something simple just not sure what it is :)

@maxgerhardt
Copy link
Contributor Author

maxgerhardt commented May 9, 2023 via email

@git2212
Copy link
Contributor

git2212 commented May 9, 2023

So VS-Platformio was giving the impression of re-downloading again but not actually updating it all properly ... see update reply here for more details.

Thanks!

@maxgerhardt
Copy link
Contributor Author

Deletion of C:\Users\<user>\.platformio\platforms\raspberrypi* (and packages\framework-arduinopico) is definitely the safest and cleanest way to perform the update if something doesn't work.

schkovich pushed a commit to schkovich/arduino-pico that referenced this pull request May 24, 2025
…arlephilhower#1427)

* Move multicore_lockout victim initialzied tracking to pico_multicore via new  multicore_lockout_victim_is_initialzied method, so user initialization of the multicore_lockout independent of pico_flash will work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants