86 Commits

Author SHA1 Message Date
Johannes Löthberg
f88844246d
Replace old BLOCK_SIZES with definitions of the blocks themselves (#971)
* Replace old BLOCK_SIZES with definitions of the blocks themselves

The actual block definitions only exist within Python classes so this
commit uses PyO3 to import the esptool.py eFuse block definitions and
generates arrays of the length and read address of each eFuse block.

We need the actual read address here rather than using the old offset
method because not all eFuse blocks are sequential.  (On ESP32 the block
0 read registers are followed by the block 0 write registers.)

* xtask: Move efuse generator behind a feature

This prevents Python being necessary to build the xtask binary for other
purposes.
2025-12-10 13:47:01 +00:00
Sergio Gasquez Arcos
a02d2b1b13
ci: Update gha macos runners (#956) 2025-10-06 10:05:32 +00:00
Juraj Sadel
b993a42fe4
Add xtask command for running HIL tests (#912)
* feat: Initial test

* feat: Initial HIL tests in xtask

* refactor: End test if possible before timeout

* rebase

* Add checking for output from monitor

* CI: use xtask command instead of bash scripts

* clippy

* help find cargo

* Try increase duration for failing test

* remove bash tests

* reviews

* simplify

* Add a local_espflash flag to allow running espflash without re-building (CI) and re-building (locally)

* reviews

---------

Co-authored-by: Sergio Gasquez <sergio.gasquez@gmail.com>
2025-07-08 08:30:43 +00:00
Scott Mabin
f31f75e92e
Address library feedback (#901)
* use stored skip/verify params

* move command structs out of connection module

* changelog

* use scaling timeout for md5 check
2025-06-25 10:45:47 +00:00
Juraj Sadel
8127cd9c7d
fix warnings and make CI fail on warnings (#887) 2025-06-17 12:48:06 +00:00
Sergio Gasquez Arcos
99a9e6b835
Fix baudrate (#885)
* fix: Only change baud if neccesary

* feat: Only change baudrate if required

* docs: Udpate changelog

* test: Add high baudrate test

* feat: Increase timeout
2025-06-17 10:00:49 +00:00
Jesse Braham
04b7ebea5d
Implement new API for reading eFuse values (#847)
* Create the `xtask` package

* Implement and xtask subcommand to generate eFuse field definitions from YAML files

* Generate eFuse field definitions

* Update `target` module to provide new eFuse reading API

* All non-problematic chips working with new eFuse API

* ESP32 is now working

* ESP32-S2 is now (mostly) working

* Very necessary change :)

* Clean up the mess I made of the imports

* Address clippy lints

* Update `CHANGELOG.md`

* Perform fewer raw eFuse field reads for ESP32

* Address review comment regarding `xtask` package

* Verify that `xtask` package builds in CI

* Fix block offset calculation
2025-04-22 07:44:25 +00:00
Jesse Braham
eaef938661
Fix CI error by installing newly required dependency (#846) 2025-04-17 07:48:19 +00:00
Jesse Braham
5362c0f30b
Update to Rust 2024 edition (#843)
* Update to edition 2024

* Format using new edition rules

* Fix new clippy error

* Update `CHANGELOG.md`
2025-04-15 08:42:42 +00:00
Jesse Braham
8dea4e67c4
Add chip detection using security info (#814)
* Add the ability to create a `Chip` from its corresponding chip ID

* Attempt to detect chip using security info first, and use magic value if this fails

* Update timeouts in HIL workflow

* Update `CHANGELOG.md`

* Increase more timeouts for HIL
2025-03-26 11:54:18 +00:00
Kirill Mikhailov
dc81d8f5be
Add ROM version of read-flash command (#812)
* Add `ROM` version of `read-flash` command

* changelog entry

* dumb
2025-03-24 08:04:19 +00:00
Kirill Mikhailov
b7d9849b85
Fix read-flash which didn't work with some lengths (#804)
* wip

* finalize + hil test

hil test

* changelog entry

* fix
2025-03-06 07:28:30 +00:00
Sergio Gasquez Arcos
6db4b06945
feat: Remove publish to crates.io job (#801) 2025-03-05 08:40:22 +00:00
Kirill Mikhailov
b1483867b4
add --monitor option to write-bin (#783)
* changelog entry

* rebase

* fix

* update hil test

* increase timeout

increase timeout even more

* Fix CHANGELOG.md

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>

* play around timer....

increase timer

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2025-03-04 12:53:31 +00:00
Jesse Braham
acf2034f80
Update HIL workflow to use ubuntu-22.04, build in container to resolve GLIBC errors (#791) 2025-02-27 10:41:20 +00:00
Sergio Gasquez Arcos
e41be4f5eb
Fix write-bin padding (#788)
* feat: Update the way we pad bins

* tests: Add HIL test for writting bins

* ci: Fix timeouts

* test: Fix HIL write-bin  test

* docs: Update changelog

* docs: Remove outdate file

* feat: Avoid vec allocation
2025-02-26 15:00:50 +00:00
Juraj Sadel
e50c880982
Add timeout to HIL tests (#776)
* Add timeout to HIL tests

* Increase timeout for save-image_write-bin test
2025-02-18 10:54:24 +00:00
Sergio Gasquez Arcos
7495637db0
Improve HIL tests (#773)
* tests: Add log-format test

* ci: Add list-ports test

* feat: Read a larger flash section

* feat: Update how we check the erase-region command

* fix: Elf paths

* fix: Typo

* feat: Add defmt_log level

* feat: Update defmt elf

* docs: Add instructions to build defmt elf

* feat: Change test order to keep a non-defmt elf flashed on c6
2025-02-17 10:45:00 +00:00
Sergio Gasquez Arcos
6f3c96d11b
Improve HIL (#754)
* ci: Use job.env to avoid duplications

* ci: Add erase-region, hold-in-reset, reset and checksum-md5 tests

* ci: Use bash scripts

* cI: Update workflow

* feat: Udpate testing elfs

* test: Read 0x2000 bytes of flash

* docs: Add TODOs for issue #697

* fix: Typo

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

* docs: Improve the todo comment

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2025-02-11 08:20:47 +00:00
Jesse Braham
c73ea4dbe9
Additional improvements to CI workflow (#750) 2025-02-07 15:25:31 +00:00
Jesse Braham
cc7c43df58
Check for conflicting command-line option names in CI (#746)
* Run `completions` subcommand in CI to check for conflicting option names

* Fix conflicting short option name for `checksum-md5` subcommand
2025-02-06 12:43:58 +00:00
Jesse Braham
a105cb01b4
Remove the dependency on libudev and its corresponding feature (#742)
* No longer require `libudev`

* Update `CHANGELOG.md`
2025-02-06 09:33:18 +00:00
Jesse Braham
aab2ad4b2d
Add rustfmt.toml and format packages (#744)
* Add `rustfmt.toml`

* Format `cargo-espflash` and `espflash` packages

* Use `nightly` for `rustfmt` checks in CI
2025-02-05 14:52:29 +00:00
Jesse Braham
3c56608a8a
Update license files and top-level README.md, move test binaries to tests/ directory (#734)
* Update license files

* Move the test binaries to the tests/ directory

* Remove outdated notice from top-level `README.md`
2025-01-29 12:33:08 +00:00
Sergio Gasquez Arcos
9a45e19966
Avoid running hil twice and add --no-skip to espflash flash command (#732)
* ci: Avoid running  hil twice and add --no-skip to espflash flash command

* ci: Avoid running ci twice
2025-01-29 09:15:15 +00:00
Jesse Braham
3c5de2b996
Version 3.3.0 (#719)
* Version 3.3.0

* Suggest using `--locked` flag in installation instructions
2025-01-13 08:43:05 +00:00
ivmarkov
523eedcf57
Make clippy happy (#710)
* Make clippy happy

* Update to macos-13 to fix the crashing CI job

* Update CHANGELOG.md

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2024-12-19 13:52:46 +00:00
Sergio Gasquez Arcos
db1705b7d9
ci: Update the conditions that trigger the CI workflows (#653) 2024-07-18 12:46:36 +00:00
Sergio Gasquez
086753a18d ci: Avoid NodeJS warning 2024-05-27 16:04:20 +00:00
Sergio Gasquez Arcos
c034fe0e1b
Version 3.1.0 (#639)
* docs: Update changelog

* build: Bump espflash and cargo-espflash version

* build: Update dependencies

* build: Bump MSRV
2024-05-27 10:22:27 +02:00
Sergio Gasquez Arcos
15991b5c11
HIL: Allow manually running tests on other repos/branches (#625)
* style: Covnert println to log message

* ci: Allow manual trigger in other repo and branch
2024-04-18 14:48:35 +02:00
Sergio Gasquez Arcos
6e723f4845
ci: Update runner for arch64 and armv7 linux jobs (#612) 2024-03-13 14:06:22 +01:00
Sergio Gasquez Arcos
aceb99ac40
Fix macOS installation (#602)
* build: Run cargo update

* ci: Avoid nodejs 16 warnings

* build: Update deps
2024-03-04 12:48:31 +01:00
Dániel Buga
39e9611f00
Turn off some dependencies for library users (#599)
* Enable serialport for cli through its feature

* Add flashing feature, disable feature-specific dependencies

* Make strum optional

* Make toml optional

* Oops

* Changelog

* Merge flashing back into serialport

* Remove rppal mention

* Move things back

* Only enable miette/fancy for the CLI
2024-02-26 10:00:18 +01:00
Sergio Gasquez Arcos
f21829a2a7
Add initial HIL testing (#596)
* feat: Initial HIL test

* ci: Use esp-hal example instead of themplate

* ci: Expand the matrix to cover all targets

* feat: Update ESPFLASH_PORT

* feat: Check that it flashed properly

* feat: Add asserts to the board-info check

* ci: Enable other targets

* ci: Update flash test

* ci: Avoid building espflash on self-hosted-runner

* feat: Add non-interactive mode for monitoring

* ci: Add erase/read flash test

* ci: Add save-image/write-bintest

* chore: Code cleanup

* ci: Enable C2

* chore: Code cleanup

* ci: Update esp32c2 hosted runner name

* ci: Avoid building test apps

* docs: Update changelog
2024-02-23 15:02:23 +00:00
Sergio Gasquez Arcos
7fad99d43a
Prepare 3.0.0-rc.1 release (#586)
* feat: Bump dependencies, espflash and cargo-espflash

* build: Bump msrv

* chore: Update StubRequired code
2024-02-16 16:54:15 +01:00
Sergio Gasquez Arcos
0a5d5e6718
Remove support for Raspberry Pi's internal UART peripherals (#585)
* feat: Remove raspberry feature

* feat: Replace Interface types

* feat: Remove interface mod

* docs: Update changelog
2024-02-16 12:14:08 +01:00
Jesse Braham
0ae82dcaaf
Update dependencies and bump MSRV (#578)
* Update  dependencies to their latest versions

* Bump MSRV to 1.73.0

* Update `CHANGELOG.md`
2024-02-06 21:57:43 +00:00
Sergio Gasquez Arcos
9729308e78
Add a changelog check in CI (#560)
* ci: Add a changelog check

* docs: Update changelog
2024-01-30 10:08:01 +00:00
Dániel Buga
918c59f057 Actually check the lib in CI 2024-01-30 09:10:39 +01:00
Sergio Gasquez
54c8915e3a ci: Add publish to crates.io job 2023-10-17 08:02:41 -07:00
Sergio Gasquez Arcos
652740efd5
Update dependencies (#482)
* build: Update dependendencies

* docs: Update changelog

* build: Update espflash and cargo-espflash version

* fix: Update clap version to avoid bumping MSRV

* build: Revert updating toml to avoid updating MSRV

* build: Update dependendencies

* build: Bump MSRV

* Unping espflash version

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

* docs: Update changelog

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2023-10-03 17:30:28 +02:00
Sergio Gasquez Arcos
28fab99d85
Use Ubuntu 20.04 to avoid GLIBC errors on Rpi (#476)
* feat: Use Ubuntu 20.04 to avoid GLIBC errors on Rpi

* Call `apt-get update` before calling `apt-get install`

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2023-09-18 07:33:16 -07:00
Jesse Braham
ff973ac586 Call apt-get update before calling apt-get install 2023-09-18 07:16:31 -07:00
Sergio Gasquez Arcos
3c145c98f6
Merge CI/CD files (#470)
* ci: Merge CI files into a single one

* ci: Merge CD files into a single one

* ci: Use a matrix
2023-09-13 10:54:44 -07:00
Joseph Ross
129439a7a1
Fix CI checks (#465)
* Adopt fork of gha-ubuntu-cross with apt update fix.

* Fix new clippy warning.  We really do want an array with a single Range member.

* Update to better fix for gha-ubuntu-cross

* Avoid updating clap to newer minor versions

* Resolve incorrect_partial_ord_impl_on_ord_type clippy error

---------

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2023-09-12 08:16:01 -07:00
Sergio Gasquez Arcos
660f40fe27 Create issue_handler.yml 2023-06-22 05:46:30 -07:00
Jesse Braham
80ac7191ad Additionally check the x86_64-unknown-linux-musl target in CI 2023-06-06 07:32:18 -07:00
Jesse Braham
65bd430d1f Update the release workflow 2023-06-05 06:12:39 -07:00
Jesse Braham
151ca29a09 Update the CI workflow 2023-06-01 07:17:00 -07:00