Tim Crawford
70c8678a5f
tool: Add error for write locked
...
Add a new error for the case of trying to flash when security is enabled
and it is still locked and update the related docs.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2024-07-15 11:49:32 -06:00
Tim Crawford
426dc99f10
tool: Update clap to 4.5
...
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2024-07-10 13:20:53 -06:00
Tim Crawford
acf67d4413
tool: Assume ROM size is total flash size
...
Remove the hard-coded assumption that the EC is always 128K, as ITE
chips can also be 256K (which Clevo has started using since addw4).
Instead assume the ROM is correctly sized, which we do since
0d83819a21
("Pad binary file to total flash size") and proprietary
firmware has always done.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2024-02-28 11:40:32 -07:00
Ian Douglas Scott
47b070418a
ectool: Use clap derive syntax
...
Co-authored-by: Tim Crawford <tcrawford@system76.com >
2023-12-08 16:04:37 -07:00
Tim Crawford
166e03972b
tool: Derive Eq, PartialEq on enums
...
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-10-05 14:32:15 -06:00
Tim Crawford
4fa389e1bd
tool: Fix clippy warnings
...
Fix:
- clippy::unnecessary_cast
- clippy::needless_borrow
Allow:
- clippy::uninlined_format_args
- clippy::get_first
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-10-05 14:32:15 -06:00
Tim Crawford
782f18a3f6
tool: Update toolchain, edition, deps
...
- Update toolchain to nightly-2023-09-07
- Update edition to 2021
- Update deps
`OpenHidDeviceError` is deprecated, and is removed in newer versions.
Replace it with `HidApiErrorEmpty`, because there are no descriptions
for what anything means so I just picked one that didn't require fields.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2023-10-05 14:32:15 -06:00
13r0ck
fe6faa21fc
Add reset command to ectool
2023-06-14 13:50:20 -06:00
Jeremy Soller
4a1e0a5aa8
Add optional EC security state and documentation
2023-04-03 13:06:16 -06:00
Tim Crawford
1019878e3c
tool: Update dependencies
...
clap is only updated to 3.2 instead of 4.0 because I didn't want to deal
with all the changes.
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2022-11-30 08:39:16 -07:00
13r0ck
be5d34dc0d
Add other launch keyboards
2022-11-01 16:22:11 -06:00
Ian Douglas Scott
85595a8d4c
tool: Add a system76_ec command to disable input events
...
For testing Launch keyboards.
Could easily support in EC firmware as well if we had a use for that,
but not adding that for now.
2021-11-18 13:08:05 -08:00
Tim Crawford
43e5cf4ba3
Fix or silence clippy warnings on nightly
...
Fix:
- dead_code
- clippy::if_then_panic
- clippy::manual_memcpy
- clippy::needless_borrow
Silence:
- clippy::missing_safety_doc
- clippy::needless_range_loop
- clippy::single_match
Signed-off-by: Tim Crawford <tcrawford@system76.com >
2021-10-26 11:35:48 -06:00
Ian Douglas Scott
84d5c6b79d
tool: Make Access
require Send
and 'static
...
This allows the Configurator to send a `Ec<Box<dyn Access>>` through a
channel to a background thread. This could be done differently, but
presumably there's no reason to have an `Access` implementation this
doesn't apply to.
2021-04-13 11:04:51 -06:00
Jeremy Soller
0017450cbb
Add LED_SAVE command
2021-03-16 10:33:46 -06:00
Jeremy Soller
aab45bfcc1
Add layer parameter for LED_GET_MODE and LED_SET_MODE commands
2021-03-04 13:52:25 -07:00
Ian Douglas Scott
301eef6f21
tool: Fix and CI test with redox_hwio
2021-03-04 13:51:19 -07:00
Ian Douglas Scott
325762d4d8
tool: Fix building without std
feature
2021-03-04 13:51:19 -07:00
Jeremy Soller
f30a9d84f7
Fix unused variable warning
2021-03-01 11:50:31 -07:00
Jeremy Soller
2ef4cd7bbd
Add matrix command
2021-03-01 11:50:31 -07:00
Ian Douglas Scott
b11bc64bba
tool: API and CLI for LED matrix mode
2021-02-26 12:18:02 -07:00
Jeremy Soller
73a5d8b8a1
ectool 0.3.1: Implement read_debug for Box<dyn Access>
2021-02-23 09:45:55 -07:00
Tim Crawford
3e154d7f00
Add missing SPDX identifiers
2021-02-22 14:02:18 -07:00
Ian Douglas Scott
e30779ab8d
tool: Accesor method for HidDevice
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
2768925ec6
tool: Support downcasting generic Ec
...
Removes the `impl Access for &mut dyn Access` I added earlier. But that
hasn't proven too useful.
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
171257916c
tool: CLI for color/brightness
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
49b79f665b
tool: Add --access
argument to work with sim or hid
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
7c5ba4e62c
tool: Use clap
for argument parsing
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
504284bf72
tool: Move read_debug
to trait so generic code can use it
...
Returns error for backends that don't support it.
2021-02-22 08:08:49 -07:00
Ian Douglas Scott
0c1584385c
tool: Support for owned and unowned generic Ec
2021-02-22 08:08:49 -07:00
Jeremy Soller
304e7534c9
Add led value and color commands
2021-01-15 08:34:31 -07:00
Ian Douglas Scott
42f1b4863f
Add AccessLpcSim for communicating with ecsim
...
Probably the duplicated logic in `access/lpc/*` should be factored out
in some way, but it's a bit awkward to do so without defining a trait
that would be part of the public API...
2020-12-08 13:46:35 -07:00
Ian Douglas Scott
802bf417cc
tool: Use From<T> for slightly neater error handling
2020-12-08 13:46:35 -07:00
Jeremy Soller
b2aa7ba975
ectool 0.2.2: Use buffer to improve SPI performance
2020-10-06 09:31:34 -07:00
Jeremy Soller
726a0e0837
ectool version 0.2.1:
...
- Add hidapi feature
- Add redox_hwio feature
- Add feature documentation
2020-10-02 09:05:25 -07:00
Jeremy Soller
eff4caa752
Refactor SMFI interface and ectool
2020-10-01 19:35:34 -07:00
Jeremy Soller
99ef48f9c4
Address PR feedback
2020-09-29 19:42:05 -06:00
Jeremy Soller
ad5cd931e3
Move StdTimeout to ectool under std feature
2020-09-29 19:42:05 -06:00
Jeremy Soller
de26cdfa74
Commands for reading and setting keyboard map
2020-09-29 19:42:05 -06:00
Jeremy Soller
a8b38d6b37
tool: 0.1.3 - add backup ROM flashing
2020-04-06 16:39:40 -06:00
Jeremy Soller
20d3808aed
Allow a config.mk to be created that contains BOARD, KEYMAP, etc.
2020-04-04 13:01:13 -06:00
Jeremy Soller
82b7079f73
Add tool for collecting power/temp information
2020-04-04 08:23:52 -06:00
Jeremy Soller
62a909ee81
Improve fan curve
...
- Implement fan cooldown and heatup periods
- Add fan get/set commands
- Fix compilation with logging level lower than debug
2020-04-04 07:30:05 -06:00
Jeremy Soller
25a60568d0
Add print command
2020-03-14 21:13:07 -06:00
Jeremy Soller
ff01da5f12
Write and erase at the same time to improve speed
2020-02-27 15:05:28 -07:00
Jeremy Soller
d1468da590
Use 1024 byte erase
2020-02-27 14:48:24 -07:00
Jeremy Soller
33cc2a2a76
Better output when flashing EC
2020-02-27 14:46:32 -07:00
Jeremy Soller
6ac21ace9c
Set spi target to main
2020-02-27 13:30:33 -07:00
Jeremy Soller
e8dd295daa
Parameterize flash_inner
2020-02-27 13:21:59 -07:00
Jeremy Soller
68b9acd249
Add ability to flash backup rom
2020-02-26 13:43:31 -07:00