debugprobe icon indicating copy to clipboard operation
debugprobe copied to clipboard

Add support for other RP2040-based boards

Open smittytone opened this issue 4 years ago • 1 comments

Here is the restored PR. It now builds via the command line with cmake and through VSCode, with the former taking the user’s board choice from PICO_BOARD if defined and exported. Or folk can set this in CmakeLists.txt, which is probably the route we VSCode users will take, but whatever.

This PR targets master, but I recommend creating a new branch — I'll re-target the PR to that. That way you can merge it there, make whatever changes you see fit, and merge to master in due course if you wish.

Tested on the Pico, QTPy RP2040, Pro Micro RP2040 and Feather RP2040 on Mac, built at the command line and under VSCode.

There remains the issue of PICO_DEFAULT_LED_PIN not defined errors with non-Pico builds, cludged in my code. I was thinking of adding this to CMakeLists.txt before the first add_executable() is called (and picoprobe_config.h processed), but haven't had time to test it.

if (NOT ${PICO_BOARD} STREQUAL "pico")
    add_compile_definitions(PICO_DEFAULT_LED_PIN=0)
endif()

smittytone avatar Sep 17 '21 09:09 smittytone

There remains the issue of PICO_DEFAULT_LED_PIN not defined errors with non-Pico builds, cludged in my code.

Did you try the #if !defined(PICO_DEFAULT_LED_PIN) && !defined(PICO_DEFAULT_WS2812_PIN) that I suggested in your other PR ?

lurch avatar Sep 20 '21 08:09 lurch

SDK changes in the interim have made this PR redundant, I think, so I plan to close it unless I hear otherwise.

smittytone avatar Mar 27 '23 07:03 smittytone