The code base had evolved through several code names, interim
names, company names and chip names that alternatively did or did
not exist.
Baochip is the definitive name of the company, and the Baochip1x
(full part number BAO1X2S4F-WA) is the definitivey part number of
the SoC. For convenience, the part number is shortened to 'bao1x'
in most feature flags and variable references.
This commit fixes all of the odd names and removes some unmaintained
early targets.
this code, when run, will continuously dump base64-encoded
TRNG traces to the serial port. Combined with the script
in tools/trng_b64.py which runs on the host, one can recover
extensive TRNG raw data for further analysis by TRNG characterization
tools.
- remove signed bootloader code
- replace with serial console over USB
file transfer needs to be reworked to not use signatures
in baremetal, but rather just a simple hash to verify integrity.
repl needs to be reworked with an "in-place" code upload command
so that large images (> available RAM) can be burned
the fifo_basic() test case - if not allowed to run for a while -
can lead to some strange lockups in the system fifos. it's
an interesting question as to why the fifo's can't be "cleaned up"
in a sane fashion when it gets scrambled, but for now, the answer
is I think "don't do that".
this makes on the go debugging a bit easier.
the memory initialiazation also has to be moved earlier because
the static initialization of the bool that determines which
console mode to use has to be clean early on. It may even
need to move into the asm stub, but would prefer to avoid that
if I can.
turns out...the memory test was subtly smashing stack. It made
sense during early bring up to do this quick test but I should
have retired it sooner.
Keeping it around for a little bit longer because chips aren't
fully brought-up and I could see this being a useful stub in
case we find an outlier that actually has memory access problems.
The main benefit of this is we don't have to remember to call
the "abort" function post-amble in case of an error: you can
just return an error type.
I took a pass at trying to convert all the argument parsing
using "idiomatic" rust. In some cases, it's nice. But in
some cases it's pretty clunky and hard to follow. I think
the clunkiness is outweighed by never having to forget to
call the abort function, and one can avoid the whole...
map_err().and_then() madness by just using more traditional
if/else with returns. I think that's a fine choice to make.
This will help keep the command somewhat organized as things
are developed.
Also provides some templating for e.g. how to handle carriage
returns, etc.