Commit Graph

699 Commits

Author SHA1 Message Date
Jesse Braham
b5b2e044dd Update addr2line and crossterm dependencies (#778) 2025-02-18 12:12:47 +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
Juraj Sadel
529b438468 Mention WSL2 in READMEs (#775)
* Mention WSL2 in READMEs

* reviews
2025-02-18 09:59:12 +00:00
Jesse Braham
be1ff81b15 Refactor: make more modules private (#772)
* Move `command` module into `connection` module

* Make the `elf` and `error` modules private

* Don't document the modules/types behind the `cli` feature

* Clean up some imports

* Remove unused code

* Miscellaneous cleanup

* Update `CHANGELOG.md`
2025-02-17 11:23:07 +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
Juraj Sadel
403b93d2e2 erase-region: Check if the address and size is multiple of 4096 and add HIL test (#771)
* erase-region: Check if the address and size is multiple of 4096 and add test

* changelog

* reviews

* updated test
2025-02-17 08:41:09 +00:00
AVee
7b6e5e1164 Add list-ports command to show the available serial ports. (#761) 2025-02-14 14:43:25 +00:00
Sergio Gasquez Arcos
e765bd8636 Normalize similar arguments (#759)
* feat: Normalize similar arguments

* feat: Remove unnecesary value_names

* feat: Remove some short version of arguments

* docs: Update changelog

* tests: Fix arguments

* feat: Use elf for MonitorConfigArgs to avoid duplication

* feat: Rename monitor_baud arg

* fix: Allow using log-format with custom runner

* feat: Add help for NoElf error

* clippy: Remove too_many_args expection
2025-02-14 10:30:55 +00:00
Jesse Braham
bba904084f Remove special handling of MUSL Linux now that we no longer use libudev (#749) 2025-02-13 14:29:09 +00:00
Juraj Sadel
158764f82d Add get-security-info command (#758)
* Add get-security-info command

* changelog

* fix clippy

* reviews

* Update HIL for get_security_info

* update changelog

* reviews

* HIL

* reviews

* fmt

* revert

* refactor error handling

* rebase and update S2 response length check

* fix S2 when no-stub flag is used, address comments

* Hack around strange command responses, make security info work with and without stub

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2025-02-13 12:50:46 +00:00
Sergio Gasquez Arcos
da99a6df5c Improve monitoring (#737)
* feat: Make non-interactive available in other commands

* feat: Use monitor_args in monitor()

* feat: Move elf arg to MonitorConfigArgs

* docs: Udpate changelog

* docs: Update readmes

* feat: Use parse_u32

* tests: Add espflash flash --monitor tests

* feat: Allow underscores in parse_u32
2025-02-12 11:43:10 +00:00
Jesse Braham
4ee4b59862 Swap out the flasher stubs with the legacy C stubs (#763) 2025-02-12 10:53:05 +00:00
Jesse Braham
d4da01ecc2 Remove the dependency on parse_int in favour of from_str_radix (#756)
* Remove the dependency on `parse_int` in favour of `from_str_radix`

* Add a unit test for the `parse_u32` function
2025-02-11 10:09:32 +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
ad1cb9f03b Remove the dependency on lazy_static in favour of buildt-in LazyLock (#755) 2025-02-10 12:32:31 +00:00
Jesse Braham
c73ea4dbe9 Additional improvements to CI workflow (#750) 2025-02-07 15:25:31 +00:00
Jesse Braham
258e46bef9 Deny missing debug implementation and Rust 2018 idioms (#751)
* Deny missing debug implementations

* Deny Rust 2018 idioms
2025-02-07 10:31:25 +00:00
Jesse Braham
c34197f492 Remove duplicate function definition in cli module (#747) 2025-02-06 13:19:23 +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
74f6f807a0 Add Taplo config file and format Cargo manifests (#743) 2025-02-05 14:33:09 +00:00
wcampbell
83d342e54d Use hex fmt for command debug print (#735) 2025-01-30 07:09:32 +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
Sergio Gasquez Arcos
30953a70b6 [cargo-espflash]: Fix -s collision (#731)
* fix: `-s` collision

* docs: Update changelog
2025-01-28 13:44:04 +00:00
chris-subtlebytes
c9183ffaf3 Calculate end of bootloader to update SHA256 (#716)
The current implementation uses the last 32 bytes of the bootloader
file. When Secure Boot V2 is enabled, the bootloader is padded. The
new implementation walks through the segments to find the end and adds
the 16-byte aligned 1-byte checksum to update the SHA256 instead of
incorrectly updating the padding.

Closes #715
2025-01-28 12:20:28 +00:00
Jesse Braham
de2ecaf992 Begin next release cycle (#722) 2025-01-14 12:57:19 +00:00
kpcyrd
85d8f3190b Fix test failure with no-run vs no_run (#723) 2025-01-14 12:53:08 +00:00
Jesse Braham
3c5de2b996 Version 3.3.0 (#719)
* Version 3.3.0

* Suggest using `--locked` flag in installation instructions
v3.3.0
2025-01-13 08:43:05 +00:00
ivmarkov
cc26a69fb5 Make the libudev dependency optional (#709)
Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2024-12-19 14:27:44 +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
Björn Quentin
4f8a526e23 Add external processor support (#705)
* Add external processor support

* CHANGELOG.md

* Clippy

* Address review comments
2024-11-26 14:36:40 +00:00
Joseph Ross
0641b71d44 Allow partition_table_offset to be specified in the config file. (for #699) (#700) 2024-11-02 08:01:35 +00:00
Jesse Braham
95539cc4c4 Update serialport dependency (#694) 2024-10-25 07:33:53 +00:00
Jesse Braham
8db008122a If a port was specified via CLI or config, search *all* serial ports, not just the filtered list (#693)
* If a port was specified via CLI or config, search *all* serial ports, not just the filtered list

* Update `CHANGELOG.md`
2024-10-24 19:03:56 +00:00
Jesse Braham
853d39b5cd New releases (#687)
* Update dependencies to their latest versions

* Bump version numbers of `cargo-espflash` and `espflash`

* Update `CHANGELOG.md`
v3.2.0
2024-10-18 09:08:31 +00:00
Thraen
726f495ee6 Add skip update check option (#689)
* Add skip update check option

* Add doc comments for `skip_update_check`

---------

Co-authored-by: David Amiot <david.amiot@thalesgroup.com>
Co-authored-by: Jesse Braham <jesse@beta7.io>
2024-10-18 08:56:29 +00:00
DaneSlattery
7b0c6acc57 Update download mode detection (#685)
* Update download mode detection

Previously, this failed to detect download mode during this regex match in the following message.

```
ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x1 (POWERON),boot:0x0 (DOWNLOAD(USB/UART0))
    waiting for download

```

`.*` only matches on any character EXCEPT line breaks,  where as [\s\S]` will match on anything.

* fix fmt

* Update CHANGELOG.md

* Update espflash/src/connection/mod.rs

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

* Update mod.rs

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-10-10 06:25:11 +00:00
davidqge
30300c4d1f Display timestamp, useful to find timing problem (#680)
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-10-08 07:36:52 +00:00
Jesse Braham
c119e61cab Add new chip detect magic value, ability to read chip revision for ESP32-P4 (#686)
* Add new chip detect magic value, ability to read chip revision

* Update `CHANGELOG.md`
2024-10-07 10:45:22 +00:00
Sergio Gasquez Arcos
64099f0ad0 Update bytemuck dependency (#666)
* build: Update bytemuck

* build: Update cargo dependency

* docs: Update changelog
2024-09-25 11:36:53 +00:00
Joseph Ross
62cec888d7 Add value_parser so partition-table-offset accepts offset expressed in hexadecimal. (#682)
* Add value_parser so `partition-table-offset` accepts offset expressed in hexadecimal.

* Add changelog entry.
2024-09-17 08:30:50 +00:00
Scott Mabin
46b5b8d9ef v3.1.1 release prep (#668) v3.1.1 2024-08-15 08:50:45 +00:00
Bilel MEDIMEGH
36bea5252a Monitor input only sends key on press now, not on release (#661) 2024-08-12 07:37:44 +00:00
Sergio Gasquez Arcos
2334907366 Downgrade crossterm and fix compilation (#659)
* build: Downgrade crossterm

* build: Update time

* docs: Update changelog
2024-08-02 15:56:42 +00:00
Sergio Gasquez Arcos
45946f84e0 Add note about current development state (#652)
* docs: Add note about current state

* fix: Improve wording

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

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-07-18 13:01:29 +00:00
Sergio Gasquez Arcos
db1705b7d9 ci: Update the conditions that trigger the CI workflows (#653) 2024-07-18 12:46:36 +00:00
Etienne
44ba4d4864 feat: add --no-default-features flag (#647)
* feat: add --no-default-features flag

* fix: update changelog

* Update CHANGELOG.md

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

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2024-07-01 10:55:43 +02:00
Joseph Ross
5c898ac7a3 Add commands reset and hold-in-reset (#644)
* Add commands `reset` and `hold-in-reset`

* Fix connect call to adopt new args.

* Add changelog entry

* Add `hold-in-reset` and `reset` commands to `cargo-espflash` as well.

* Update usage blocks in READMEs.
2024-06-06 09:24:29 +02:00