*** [上传] 使用 Raspberry Pi Pico 的 PlatformIO 上出现错误 1 问题

问题描述 投票:0回答:1

我正在 VSCode 中的学校项目中使用 PlatformIO。我正在尝试通过 USB 将代码从桌面上传到我的 Raspberry Pi Pico。代码之前已经上传过很多次了,但是现在不行了。这个问题是突然出现的,我之前已经可以上传了。我更改了一些代码,因为它有效,但我不明白为什么这会阻止它上传。代码构建没有问题。我现在只是尝试上传一个简单的眨眼程序作为测试,但这仍然失败。

我已经改为只上传一个简单的眨眼程序,而不是我的较大项目。我已经使用 Thonny IDE 上传了 python 代码,所以我知道我的电脑正在识别它,并且电缆是一根很好的电缆。我认为问题出在 VSCode 或平台 IO 中?这是错误输出:

    Processing pico (platform: raspberrypi; 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.9.0) > Raspberry Pi Pico
    HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
    DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, raspberrypi-swd)
    PACKAGES:
     - framework-arduino-mbed @ 4.0.2
     - tool-openocd-raspberrypi @ 2.1100.0 (11.0)
     - tool-rp2040tools @ 1.0.2
     - toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
    LDF: Library Dependency Finder -> https://bit.ly/
    configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 41 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    Checking size .pio\build\pico\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  15.1% (used 40740 bytes from 270336 bytes)
Flash: [          ]   0.2% (used 4034 bytes from 2097152 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Using manually specified: COM8
Forcing reset using 1200bps open/close on port COM8
Uploading .pio\build\pico\firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
.....................
*** [upload] Error 1
================================================================================ [FAILED] Took 11.99 seconds ================================================================================
 *  The terminal process "C:\Users\dylan\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--upload-port', 'COM8'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

这是 platformio 配置文件:

[env:pico]
platform = raspberrypi
board = pico
framework = arduino
upload_protocol = picotool
arduino visual-studio-extensions raspberry-pi-pico platformio
1个回答
0
投票

我今天尝试解决这个问题,我的解决方案是在按下 BOOTSEL 按钮插入 Pico 时添加字母

upload_port = E:
在我的情况下是 E:,然后我另外添加
upload_protocol = mbed
,特别是这一行我从这个PlatforIO 线程中的maxgerhardt得到它。 希望有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.