Skip to content
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

Problem about auto detection of port #5

Open
asukiaaa opened this issue May 16, 2022 · 1 comment
Open

Problem about auto detection of port #5

asukiaaa opened this issue May 16, 2022 · 1 comment

Comments

@asukiaaa
Copy link

You introduced auto detection on an issue thread platformio#2

It works if /media/${USER}/RPI-RP2 presence with the following setting.

[env:pico]
platform = [email protected]:maxgerhardt/platform-raspberrypi.git#develop
; platform = raspberrypi
board = pico
framework = arduino
upload_protocol = mbed
upload_port = /media/asuki/RPI-RP2

However, does not work if /dev/ttyACM0 is mounted.

Thank you.

@fiechr
Copy link

fiechr commented May 28, 2022

I have a similar problem

I'm using Manjaro Linux (Arch based).

Either I don't set a upload protocol/port, then the upload protocol "knocks" on the /dev/ttyACM0 port and the pico restarts and the virtual disk shows up and is mounted (by the OS) at /run/media/username/RPI-RP2*, but the picotool seems to not get that and times out, although the path exists and is readable/writable by the user, while picotool is still running.

If I manually copy the firmware file with a simple cp .pio/build/pico/firmware.uf2 /run/media/username/RPI-RP2/ after the failed upload process, the file gets copied, Pico restarts and all is fine.

Or I set the upload_protocol = mbed together with upload_port = /run/media/username/RPI-RP2. Then the Pico doesn't restart automatically anymore (no port knocking) and I need to manually unplug and re-plug it, holding the boot select button (which is even more cumbersome).

Unfortunately, I can only get one of those behaviors, but not both.

What I'm looking for, is a process that first knocks on the port, waits until the Pico restarts, the fs is (auto-)mounted and then starts the upload/copy part.

*/media/username/RPI-RP2 works too, it's just a symlink to /run/media/username/RPI-RP2.

This is my current platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:pico]
;platform = raspberrypi
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
;upload_protocol = mbed
;upload_port = /run/media/username/RPI-RP2
monitor_speed = 115200
lib_deps = https://github.com/bolderflight/sbus

platform_packages =
    framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
    ;toolchain-pico@https://github.com/earlephilhower/pico-quick-toolchain/releases/download/1.3.1-a/x86_64-linux-gnu.arm-none-eabi-7855b0c.210706.tar.gz
    toolchain-pico@https://github.com/earlephilhower/pico-quick-toolchain/releases/download/1.3.3-a/x86_64-linux-gnu.arm-none-eabi-ed6d983.220212.tar.gz

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

No branches or pull requests

2 participants