Skip to content

GPIO-based DTR reset needed for upload on Raspberry Pi/UP2 board etc. #34

Closed
@deadprogram

Description

@deadprogram

First of all, thanks for working on this project, I have been wanting a Golang-based CLI for the Arduino toolchain for the longest time.

It would appear that in order to upload code to an Arduino that is connected directly to the ttyAMA0 serial port via the pins on a Raspberry Pi, UP2 board or other board, a GPIO pin-based DTR reset needs to be implemented.

Such like an implementation could be an additional flag named something like gpioreset that is conditional similar to what https://github.com/arduino/arduino-cli/blob/master/commands/upload/upload.go#L212 does, but that pulls the GPIO pin high/low similar to https://github.com/platformio/platformio-core/pull/687/files#diff-9df12ed969b3177c694a1020f4de5cc8R82 but of course allowing a specific GPIO pin to be specified.

For example:

arduino-cli upload -p /dev/ttyAMA0 -gpioreset 4 --fqbn atmel-avr-xminis:avr:atmega328 Arduino/MyFirstSketch

would use GPIO4 to perform the reset before attempting the upload.

Any thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions