avr-hal icon indicating copy to clipboard operation
avr-hal copied to clipboard

Ravedude not working on Windows (10)

Open Septias opened this issue 4 years ago • 11 comments

Running ravedude like this on Windows 10

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

produces this error:

Programming target\avr-atmega328p\debug\arduino.elf => COM4
avrdude: invalid file format 'e' in update specifier
avrdude: error parsing update operation 'flash:w:target\avr-atmega328p\debug\arduino.elf:e'
Error: avrdude failed
error: process didn't exit successfully: `ravedude uno --open-console --baudrate 57600 target\avr-atmega328p\debug\arduino.elf` (exit code: 1)

It complains about :e specifier being wrong and that's exactly what I observed when I tried to flash manually on windows.

Septias avatar Apr 12 '21 13:04 Septias

Thanks! Can you quickly check which version of avrdude you have installed?

Rahix avatar Apr 12 '21 13:04 Rahix

$ ravedude -V
ravedude v0.1.2 (no git)

Septias avatar Apr 12 '21 13:04 Septias

right, but I was looking for the avrdude version, not ravedude ;) Try

$ avrdude -?

the version will be shown at the very end of the help output.

Rahix avatar Apr 12 '21 16:04 Rahix

Oof still version 5.10... with 6.3 it works...

Septias avatar Apr 12 '21 17:04 Septias

I'm still experiencing "performance issues" with the serial console though... It should normally output a message with ufmt every 250ms. On my Linux WSL with a screen it runs really smooth, but the console created by ravedude always outputs the messages in batches of like 3-5 messages instead of one-by-one. When I open the connection manually:

function read-com {
    $port= new-Object System.IO.Ports.SerialPort COM3,57600,None,8,one
    $port.Open()
    do {
        $line = $port.ReadLine()
        Write-Host $line # Do stuff here
    }
    while ($port.IsOpen)
}

I get a steady flow.

Septias avatar Apr 12 '21 18:04 Septias

On Mon, Apr 12, 2021 at 11:27:38AM -0700, Sebastian Klähn wrote:

experiencing "performance issues" with the serial console

Please in a fresh issue ...

stappersg avatar Apr 12 '21 18:04 stappersg

Please in a fresh issue ...

No need to.


Oof still version 5.10... with 6.3 it works...

I see. The question is, if lot's of people still use 5.10 we should support it as well. Where did you get this older version?


I'm still experiencing "performance issues" with the serial console though...

Hm, this looks like a buffering issue. But we're actually flushing stdout whenever a new message arrives:

https://github.com/Rahix/avr-hal/blob/9e3848f13b7ef3b03617545c959ad476e454a76a/ravedude/src/console.rs#L20-L21

Maybe you can play around with that code a bit to check what is going on? I don't have a windows on hand so I cannot test this...

You can test just the serial console (without flashing a binary) by calling:

$ ravedude uno -cb 57600

(without a path to a binary).

Rahix avatar Apr 13 '21 10:04 Rahix

(or test directly from the ravedude/ directory with cargo run -- -cb 57600)

Rahix avatar Apr 13 '21 10:04 Rahix

Maybe try removing this line and see if it changes anything:

https://github.com/Rahix/avr-hal/blob/9e3848f13b7ef3b03617545c959ad476e454a76a/ravedude/src/console.rs#L7

Rahix avatar Apr 13 '21 10:04 Rahix

Oof still version 5.10... with 6.3 it works...

hi all, I'm in the same situation and I fall in the same mistake. Is it possible to cite in the documentation that at least avrdude => 6.3 has to be used or something like "tested with avrdude 6.3" ?

michelepagot avatar Sep 07 '21 16:09 michelepagot

On Tue, Sep 07, 2021 at 09:07:21AM -0700, Michele wrote:

that at least avrdude => 6.3 has to be used or something like "tested with avrdude 6.3" ?

Thank you for https://github.com/Rahix/avr-hal/pull/218.patch

stappersg avatar Sep 07 '21 19:09 stappersg