Description
Hi,
Great work on the framework. I have been using the 'stable' platform IO environment with a Rpi pico for a while and it works great. However, all the work you have done on the pico-w and additional feature support is just too cool not to use.
When I try a project with platformio.ini set to:
[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
It clones the framework, compiles it all, generates the firmware and uploads it and it runs fine. However, when I try to upload again the pico responds to reset from picotool and isn't seen again. To recover the device you need to power up in bootsel mode and copy a different firmware made using an alternative environment to the pico which then starts to behave properly again until you try another download. I've tried it with a standard pico and pico-w and they both behave the same.
Am I doing something stupid?
The output below is from a flash sketch setup and build fresh. You can see the 1st download work. The sketch runs but on the second download the pico vanishes from the USB devices in device manager after the forced reset operation.
* Executing task: C:\Users\steve\.platformio\penv\Scripts\platformio.exe run --target upload
Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; board: pico; framework: arduino)
----------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.7.0+sha.ff7a675) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, picoprobe, raspberrypi-swd)
PACKAGES:
- framework-arduinopico @ 1.20401.0+sha.8aad2ca
- tool-mklittlefs-rp2040-earlephilhower @ 5.100300.220714 (10.3.0)
- tool-openocd-rp2040-earlephilhower @ 5.100300.220714 (10.3.0)
- tool-rp2040tools @ 1.0.2
- toolchain-rp2040-earlephilhower @ 5.100300.220714 (10.3.0)
Flash size: 2.00MB
Sketch size: 2.00MB
Filesystem size: 0.00MB
Maximium Sketch size: 2093056 EEPROM start: 0x101ff000 Filesystem start: 0x101ff000 Filesystem end:
0x101ff000
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 27 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\pico\firmware.elf
Flash size: 2.00MB
Sketch size: 2.00MB
Filesystem size: 0.00MB
Maximium Sketch size: 2093056 EEPROM start: 0x101ff000 Filesystem start: 0x101ff000 Filesystem end:
0x101ff000
Checking size .pio\build\pico\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 2.7% (used 7056 bytes from 262144 bytes)
Flash: [ ] 2.6% (used 53896 bytes from 2093056 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Auto-detected: COM28
Forcing reset using 1200bps open/close on port COM28
Uploading .pio\build\pico\firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
...Loading into Flash: [ ] 0%
Loading into Flash: [= ] 6%
Loading into Flash: [=== ] 12%
Loading into Flash: [===== ] 18%
Loading into Flash: [======= ] 24%
Loading into Flash: [========= ] 31%
Loading into Flash: [=========== ] 37%
Loading into Flash: [============ ] 43%
Loading into Flash: [============== ] 49%
Loading into Flash: [================ ] 55%
Loading into Flash: [================== ] 62%
Loading into Flash: [==================== ] 68%
Loading into Flash: [====================== ] 74%
Loading into Flash: [======================== ] 80%
Loading into Flash: [========================= ] 86%
Loading into Flash: [=========================== ] 93%
Loading into Flash: [============================= ] 99%
Loading into Flash: [==============================] 100%
=================================== [SUCCESS] Took 5.43 seconds ===================================
* Terminal will be reused by tasks, press any key to close it.
Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; board: pico; framework: arduino)
----------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.7.0+sha.ff7a675) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, picoprobe, raspberrypi-swd)
PACKAGES:
- framework-arduinopico @ 1.20401.0+sha.8aad2ca
- tool-mklittlefs-rp2040-earlephilhower @ 5.100300.220714 (10.3.0)
- tool-openocd-rp2040-earlephilhower @ 5.100300.220714 (10.3.0)
- tool-rp2040tools @ 1.0.2
- toolchain-rp2040-earlephilhower @ 5.100300.220714 (10.3.0)
Flash size: 2.00MB
Sketch size: 2.00MB
Filesystem size: 0.00MB
Maximium Sketch size: 2093056 EEPROM start: 0x101ff000 Filesystem start: 0x101ff000 Filesystem end:
0x101ff000
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 27 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\pico\firmware.elf
Flash size: 2.00MB
Sketch size: 2.00MB
Filesystem size: 0.00MB
Maximium Sketch size: 2093056 EEPROM start: 0x101ff000 Filesystem start: 0x101ff000 Filesystem end:
0x101ff000
Checking size .pio\build\pico\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 2.7% (used 7056 bytes from 262144 bytes)
Flash: [ ] 2.6% (used 53896 bytes from 2093056 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Auto-detected: COM29
Forcing reset using 1200bps open/close on port COM29
Uploading .pio\build\pico\firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
.....................
*** [upload] Error 1
=================================== [FAILED] Took 12.23 seconds ===================================
* The terminal process "C:\Users\steve\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.