firmware,software: add LED test mode (-67 bytes XRAM).
by whitequark 1 year 5 months
5783d828
firmware: {bool→__bit} pending_setup (+92 bytes XRAM).
by whitequark 1 year 5 months
bce02500
CI: refactor. NFC
by whitequark 1 year 5 months
8934f01f
cli,device: split factory flashing off into its own flow. Before this commit, some aspects of factory flashing (device enumeration and initial loading of firmware) were handled in the production flow. However, this interacted poorly with the device recovery flow, since uploading a production firmware causes the device to re-enumerate. * Re-enumeration is not very reliable, especially on Windows. (#252) * If more than one device is connected, re-enumeration could cause the wrong one to be destructively reflashed, since USB has no geographical addressing. In addition, behavior related to `--force` depended on the device EEPROM state, which is not appropriate to either factory flashing or the recovery flows. This commit solves these issues by separating (and simplifying) the production and the factory flashing flows. * The production flow only opens VID_QIHW:PID_GLASGOW devices (factory flashed) and loads only the production firmware. * The factory flashing flow opens VID_CYPRESS:PID_FX2 devices with no options, and VID_QIHW:PID_GLASGOW devices with `--reinitialize`. * The factory flashing flow loads the Cypress bootloader firmware, regardless of VID:PID. It ignores the EEPROM contents and flashes the configured revision and serial, as well as the built-in firmware, and asks the operator to power cycle the device. The notable differences are: * The factory flashing flow is incomparably more reliable. * The factory flashing flow is flashing a firmware in addition to the configuration block, halving the amount of programming steps. * The factory flashing flow no longer attempts to prevent you from flashing an already factory flashed device. This might seem bad at first glance, but: - It was added, IIRC, to handle potential re-enumeration bugs, which are no longer present. - It actively got in the way most of the time. - It's not *that* destructive--you just lose your serial, and even that only if you did not have it on a sticker or written down somewhere. (If you care about the serial it is probably because you have it in a script somewhere, so the problem of backing it up solves itself.) Fixes #252.
by whitequark 1 year 5 months
a1497d0e
Update CI action versions.
by whitequark 1 year 5 months
21a0b108
software: preserve caches (wasm and bitstream) on CI.
by whitequark 1 year 5 months
de9818fc
software: use PDM to manage dependencies on CI. At the moment (since commit 36769e73) synthesis tests are not running on CI because a request to install nonexistent optional dependency group is silently ignored by pip. Pip is not really suited for this workflow, so use PDM instead, and also set up the `pdm run test` alias since the test runner is liable to change in the future.
by whitequark 1 year 5 months
86959ffb
applet: adjust `synthesis_test()` to use target.toolchain.
by whitequark 1 year 5 months
3a645358
Add CODEOWNERS. This is a trial run of the functionality more than anything.
by whitequark 1 year 5 months
ab57d99f
target: cache bitstreams. This is a major usability improvement for two use cases: * routine and recommended use of the reset button on revC2+, which is otherwise excruciatingly slow; * frequent switching between multiple specific applet configurations, useful as a workaround for the lack of multiple applet support. This commit should make most uses of `run --prebuilt` obsolete. Fixes #43 (again).
by whitequark 1 year 5 months
08cb950e
Report a bug