I apologize in advance if this turns out to be a dumb beginner mistake, but I’m trying out some WeAct RP2350A_V10 boards and are planning on swapping them in a prototype since they have the A4 version of the RP2350 chip which my official Raspberry Pi Pico 2 don’t.
I’ve managed to program the Pico 2 boards using this platformio.ini config without any issues, through SWD with the three pin Raspberry Pi Debug Probe:
[env]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
framework = arduino
board = rpipico2
board_build.core = earlephilhower
upload_protocol = cmsis-dap
debug_tool = cmsis-dap
I tried just swapping the Pico 2 boards with the WeAct board and tried uploading with the same config, but nothing happens. It seems to overwrite the already uploaded program that comes with the board (being some kind of blink test of the two onboard LEDs at GP24 and GP25), but it doesn’t run my code at all. I get a success message from the terminal saying that the upload was successful, but I only see the power LED being lit on the board with no code running.
Holding the BOOT button on the board and connecting it through USB works, where I can drag and drop a precompiled .uf2 file onto the storage unit that gets mounted for the unit. That runs the program immediately.
But trying upload through PlatformIO doesn’t work at all. I’ve tried also using the boards USB as the upload port instead of through the Raspberry Pi Debug Probe SWD, but both of them says that the upload is successful, but then nothing is running on the boards.
Am I missing something obvious here? Have anyone tried using these boards or similar generic boards with PlatformIO?
If relevant, here is the full log of the upload:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/rpipico2.html
PLATFORM: Raspberry Pi RP2040 (1.14.0+sha.a606be6) > Pico 2
HARDWARE: RP2350 150MHz, 512KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (blackmagic, cmsis-dap, jlink, picoprobe, raspberrypi-swd)
PACKAGES:
- framework-arduinopico @ 1.40200.0+sha.5ef8a5a
- tool-mklittlefs-rp2040-earlephilhower @ 5.100300.230216 (10.3.0)
- tool-openocd-rp2040-earlephilhower @ 5.140200.240929 (14.2.0)
- tool-picotool-rp2040-earlephilhower @ 5.140200.240929 (14.2.0)
- toolchain-rp2040-earlephilhower @ 5.140200.240929 (14.2.0)
Flash size: 4.00MB
Sketch size: 4.00MB
Filesystem size: 0.00MB
PSRAM size: 0.00MB
Maximium Sketch size: 4190208 EEPROM start: 0x103ff000 Filesystem start: 0x103ff000 Filesystem end: 0x103ff000
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 66 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/client/firmware.elf
Flash size: 4.00MB
Sketch size: 4.00MB
Filesystem size: 0.00MB
PSRAM size: 0.00MB
Maximium Sketch size: 4190208 EEPROM start: 0x103ff000 Filesystem start: 0x103ff000 Filesystem end: 0x103ff000
Checking size .pio/build/client/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 1.9% (used 10140 bytes from 524288 bytes)
Flash: [ ] 1.5% (used 63672 bytes from 4190208 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = cmsis-dap
Uploading .pio/build/client/firmware.elf
Open On-Chip Debugger 0.12.0+dev-gebec9504d-dirty (2024-08-27-20:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
DEPRECATED! use 'adapter serial' not 'cmsis_dap_serial'
cortex_m reset_config sysresetreq
adapter speed: 5000 kHz
Warn : [rp2350.dap.core1] VECTRESET is not supported on this Cortex-M core, using SYSRESETREQ instead.
Warn : [rp2350.dap.core1] Set 'cortex_m reset_config sysresetreq'.
[rp2350.dap.core0] halted due to breakpoint, current mode: Thread
xPSR: 0xf9000000 pc: 0x000000a0 msp: 0xf0000000
[rp2350.dap.core1] halted due to debug-request, current mode: Thread
xPSR: 0xf9000000 pc: 0x000000a0 msp: 0xf0000000
** Programming Started **
Warn : Adding extra erase range, 0x10012900 .. 0x10012fff
** Programming Finished **
** Verify Started **
** Verified OK **
Warn : [rp2350.dap.core1] VECTRESET is not supported on this Cortex-M core, using SYSRESETREQ instead.
Warn : [rp2350.dap.core1] Set 'cortex_m reset_config sysresetreq'.
[rp2350.dap.core0] halted due to breakpoint, current mode: Thread
xPSR: 0xf9000000 pc: 0x000000a0 msp: 0xf0000000
[rp2350.dap.core1] halted due to debug-request, current mode: Thread
xPSR: 0xf9000000 pc: 0x000000a0 msp: 0xf0000000
shutdown command invoked
============================================================================================= [SUCCESS] Took 3.06 seconds =============================================================================================