Open aiotter opened 1 week ago
Any reason why you can't use the normal flash
subcommand to flash your non-Rust esp32 project? That's what I use.
Regardless, I think we'd accept a PR that extended the monitor flag to write-bin
.
I don't expect that it is possible, because espflash flash
is for ELF format.
I believe the binary file to be flashed into ESP32 is not in ELF format.
$ file MyProject.avm
MyProject.avm: a /usr/bin/env AtomVM script executable (binary data)
On AtomVM project, you write a program first with Erlang, Elixir or any other compatible languages, and then compiles it into BEAM format as usual.
AtomVM's packbeam
utility will then packs it into AVM binary, which you can espflash write-bin
into ESP32's 0x210000
address. AtomVM, flashed at bootloader partition in advance, will execute that AVM binary.
Do you think I can use flash
command in my case?
Regardless, I think we'd accept a PR that extended the monitor flag to
write-bin
.
Thank you for mentioning this! I'll try implementing it and open a PR when I have some time, hopefully.
I'm using espflash for Rust based and non-Rust based ESP32 project. It is great. However when I'm debugging non-Rust based app like Erlang with AtomVM, I'm stressed a bit to execute
espflash monitor
just afterespflash write-bin
again and again.How about adding
--monitor
option towrite-bin
just likeflash
command?It looks
cli::FlashArgs::{monitor,monitor_baud,log_format}
is safe to be copied intoWriteBinArgs
, and the same logic here can be added at the end ofwrite_bin
function as well.