arch.arm.ap: add AP register definition.
by whitequark 4 years 7 months
8027c68f
arch.arm.dp: add DP register definitions, up to DP...
by whitequark 4 years 8 months
3f68dcb7
arch.arm.jtag: add JTAG-DP IR/DR definitions.
by whitequark 4 years 8 months
12f279f7
firmware, software: positively verify API compatib...
by whitequark 4 years 8 months
firmware, software: positively verify API compatibility.

Before this commit, firmware and software did not check USB protocol
compatibility in any way. Although this mostly worked because there
were few changes in USB protocol, there were still breaking changes,
the last one in commit 5a7d18a6 that caused a silent hang when wrong
firmware version was used. The community is larger now and this sort
of breakage is no longer acceptable.

After this commit, firmware exports an "API level" (functionally
similar to a semver major version) and software verifies that its own
API level matches that of the firmware. On mismatch, software reloads
the firmware, like it would handle a blank device. Each time firmware
is changed in an incompatible way (affecting e.g. control requests,
FIFO configuration, ...) the API level must be increased.

Miscellaneous cleanups:
* In device enumeration code, no more than one handle to a device
is now kept open at the same time. Although it doesn't matter on
Linux, on Windows opening a USB device is an exclusive operation.
* GlasgowHardwareDevice.{get_serial_list→enumerate_serials}
30dc11b2
software: simplify firmware management.
by whitequark 4 years 8 months
software: simplify firmware management.

* Move firmware to glasgow/device/firmware.ihex.
* Teach GlasgowHardwareDevice to find firmware unassisted.
* Remove all code that accepted custom firmware filenames except
for `flash --firmware`. There is no loss of functionality; during
development, use `make -C firmware load`, which was always a more
reliable option anyway.
68f8cfbf
support.arepl, cli: gracefully handle Ctrl+C in RE...
by whitequark 4 years 8 months
support.arepl, cli: gracefully handle Ctrl+C in REPL.

Ctrl+C is turned into cancellation if the REPL is running user code,
and into KeyboardInterrupt on the main thread (i.e. the default
Python behavior) if the REPL is waiting for input.
26602c8f
support.asignal: restore handler if future is canc...
by whitequark 4 years 8 months
support.asignal: restore handler if future is cancelled.
0fecc003
support.{pyrepl→arepl}: rewrite with native asyn...
by whitequark 4 years 8 months
support.{pyrepl→arepl}: rewrite with native async/await.

As a part of the rewrite, inline code from code.InteractiveConsole
and asyncio.AsyncIOInteractiveConsole as necessary. This seems like
it would make things more complicated, but it turns out that the code
in InteractiveConsole is very old and has too much indirection, which
AsyncIOInteractiveConsole painstakingly works around.
09a4f8a5
platform.rev_c1: explain difference from platform....
by whitequark 4 years 8 months
platform.rev_c1: explain difference from platform.rev_c0. NFC.
3dec17c8
applet.interface.ps2_host: convert to nmigen
by Attie Grande 4 years 8 months
99fde95f
Report a bug