Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unable to print serial output on Arduino Leonardo #222

Closed
timwillett4 opened this issue Sep 15, 2021 · 2 comments
Closed

Unable to print serial output on Arduino Leonardo #222

timwillett4 opened this issue Sep 15, 2021 · 2 comments
Labels
board-support Support for a new board in `arduino-hal`. question Further information is requested windows Related to usage on Windows host systems.

Comments

@timwillett4
Copy link

timwillett4 commented Sep 15, 2021

I am hitting an error when trying to print serial output using an adruino leonardo connected to a WIndows 10 PC.

thread '<unnamed>' panicked at 'assertion failed: e.kind() == std::io::ErrorKind::TimedOut', C:\Users\timwi\.cargo\registry\src\github.com-1ecc6299db9ec823\ravedude-0.1.3\src\console.r
s:24:17
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I tested with Adruino IDE and it works fine there so it is noting with the USB Connection/Hardware.

config.toml:

[build]
target = "avr-specs/avr-atmega32u4.json"

[target.'cfg(target_arch = "avr")']
runner = "ravedude leonardo --open-console --baudrate 9600"

[unstable]
build-std = ["core"]

.Full console output:

cargo run
...
Writing | ################################################## | 100% 0.17s

avrdude: 1820 bytes of flash written
avrdude: verifying flash memory against target\avr-atmega32u4\debug\hello-world-arduino.elf:
avrdude: load data flash data from input file target\avr-atmega32u4\debug\hello-world-arduino.elf:
avrdude: input file target\avr-atmega32u4\debug\hello-world-arduino.elf contains 1820 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.04s

avrdude: verifying ...
avrdude: 1820 bytes of flash verified

avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)

avrdude done.  Thank you.

  Programmed target\avr-atmega32u4\debug\hello-world-arduino.elf
     Console COM6 at 9600 baud
thread '<unnamed>' panicked at 'assertion failed: e.kind() == std::io::ErrorKind::TimedOut', C:\Users\timwi\.cargo\registry\src\github.com-1ecc6299db9ec823\ravedude-0.1.3\src\console.r
s:24:17
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@Rahix Rahix changed the title Unable to print serial output on Adruino leonardo Unable to print serial output on Arduino Leonardo Sep 15, 2021
@Rahix
Copy link
Owner

Rahix commented Sep 15, 2021

Hi,

this is to be expected because the Arduino Leonardo, unlike the Uno, does not have a dedicated USART-to-USB converter chip. This means you'll need an external USB-Serial converter, connected to pins D0 and D1.

You're probably wondering how the official Arduino software gets around that: What they're doing is implementing a USB-Serial peripheral directly on the ATmega32U4 chip on your Leonardo. We plan to do the same in avr-hal at some point, but this is not yet done (see issue #40).

@Rahix Rahix added board-support Support for a new board in `arduino-hal`. question Further information is requested labels Sep 15, 2021
@timwillett4
Copy link
Author

Okay thanks so much for the help.

@Rahix Rahix closed this as completed Sep 16, 2021
@Rahix Rahix added the windows Related to usage on Windows host systems. label Feb 8, 2022
Repository owner locked and limited conversation to collaborators Sep 2, 2022
@Rahix Rahix converted this issue into discussion #313 Sep 2, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
board-support Support for a new board in `arduino-hal`. question Further information is requested windows Related to usage on Windows host systems.
Projects
None yet
Development

No branches or pull requests

2 participants