Commit graph

108 commits

Author SHA1 Message Date
bunnie
aabe88e0d5 checkpoint the baremetal routine as we integrate into the boot chain 2025-09-29 16:21:53 +08:00
bunnie
c1ab8972fa update boot offsets to handle embedded signature block 2025-09-25 00:00:13 +08:00
bunnie
a458b6a5cc change voltage target for lower frequencies 2025-09-24 01:05:25 +08:00
bunnie
6e19c4b871 convert baremetal to use autostatics 2025-09-21 21:52:38 +08:00
bunnie
1255bf12d9 FLAG DAY: fix all names to harmonize around 'bao1x'
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.
2025-09-18 21:25:51 +08:00
bunnie
245bd6c264 add extended RO trng tests to baremetal 2025-09-18 20:17:45 +08:00
bunnie
442b3a6431 document why value is bit-shifted 2025-09-14 02:18:20 +08:00
bunnie
818717e236 add avalanche generator characterization routine to baremetal 2025-09-14 02:15:21 +08:00
bunnie
95b0639c51 add trng dump code
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.
2025-09-13 23:30:01 +08:00
bunnie
aeee970792 fix device name in baremetal 2025-09-13 01:08:47 +08:00
bunnie
01957c3b65 make baremetal work with windows CDC-ACM without special drivers 2025-09-12 22:15:04 +08:00
bunnie
602b60b669 refactor baremetal
- 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
2025-09-11 00:52:01 +08:00
bunnie
8e6c4161d6 add test for key presses in baremetal 2025-09-08 16:13:22 +08:00
bunnie
d07f74ab99 fixes for USB HS in baremetal 2025-09-08 09:50:17 +08:00
bunnie
f6c92a0a72 add usb disk option to baremetal environment
this will be used to help debug the HS issues
2025-09-07 15:11:46 +08:00
bunnie
43de6d67ec set uart baud to 1Mbaud and also make it a top-level constant 2025-08-20 02:24:54 +08:00
bunnie
4cd5f2d2c8 add a soft reset routine and also the ability to run a test command on reset 2025-08-20 02:19:03 +08:00
bunnie
5fb01c5332 fix broken bio test
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".
2025-08-20 01:47:41 +08:00
bunnie
74e3120ba2 move console over to UART2 and set speed to 1Mbps
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.
2025-08-20 01:46:18 +08:00
bunnie
59fa8ad2df add bio module to cramium test set 2025-08-20 01:45:46 +08:00
bunnie
29b524375b add wfi & ldo settings to repl
unit can now enter deep powerdown mode and wake up demonstrating
that the system can achieve the power numbers needed for the
product spec
2025-08-19 19:00:11 +08:00
bunnie
13b048089b improve clock divider setting to handle a wide range of clocks 2025-08-14 14:10:51 +08:00
bunnie
0cbdf1e9f1 fix "mysterious" BIO errors
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.
2025-08-14 02:04:39 +08:00
bunnie
6cd5a23893 this change to main.rs is needed to support the error handler 2025-08-14 02:04:04 +08:00
bunnie
0bb5ae95b9 convert repl to use error-type returns
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.
2025-08-14 02:01:39 +08:00
bunnie
38193077c5 Merge branch 'nto-bringup' of github.com:betrusted-io/xous-core into nto-bringup 2025-08-14 00:38:41 +08:00
bunnie
7c232626d6 add clock adjustment code (wip) 2025-08-14 00:38:01 +08:00
Sam Chin
bd8a3c7f88 cleaning up code 2025-08-13 19:15:46 +08:00
Sam Chin
d02970c264 now with read 2025-08-13 18:53:33 +08:00
Sam Chin
e020a45913 refactoring so that pin is a nice coherent function 2025-08-13 15:40:04 +08:00
Sam Chin
7af77a1d10 can now set multiple clocks on multiple fifos 2025-08-13 15:34:39 +08:00
Sam Chin
a6643a3314 moving square wave generator over - it does not play nice with other things right now 2025-08-12 21:19:29 +08:00
Sam Chin
a5e95c9c6d pin up works for core 0 via lib 2025-08-12 19:39:56 +08:00
Sam Chin
db7690210a pin up in library 2025-08-12 17:06:42 +08:00
Sam Chin
e954ca60e2 without other changes 2025-08-11 17:53:47 +08:00
Sam Chin
b32fa12da8 working square wave and pinup with nto bgas 2025-08-11 17:52:25 +08:00
bunnie
7cf23c41e7 add working state for bio tests 2025-08-11 14:58:55 +08:00
bunnie
c9f1e29907 commit a "magic state" that seems to be able to get BIO core 3
unwedged
2025-08-10 22:32:13 +08:00
bunnie
22151c7d72 partial progress on baremetal bringup 2025-08-08 03:37:31 +08:00
bunnie
cbedc3a091 tweaks for dev environment 2025-08-07 01:03:15 +08:00
sam chin
fffbb9371f wip 2025-08-06 18:55:36 +08:00
sam chin
baa3df4b0f wip 2025-08-06 18:51:07 +08:00
bunnie
30a15035c9 add a bogomips checker
sanity check the PLL settings against the RTC count.
2025-08-06 01:16:11 +08:00
bunnie
ca105f4be8 cleanup some more cache_flush refs 2025-08-05 23:02:54 +08:00
bunnie
653010b09a add rram test command to repl 2025-08-05 23:01:18 +08:00
bunnie
39beaba65f add peek/poke to repl environment 2025-08-05 22:21:26 +08:00
bunnie
9177e5865c nto bringup - now getting to repl prompt 2025-08-05 20:56:15 +08:00
bunnie
ce33301f83 repl fixes
fixup the repl loop to actually respond on console. tested on mpw,
we'll see if this works on nto...
2025-08-04 16:45:54 +08:00
bunnie
af64c1cf14 add baremetal-cramsoc target for chip bringup 2025-08-04 16:11:30 +08:00
bunnie
ee5bf1fccf commit current baremetal state checkpoint
various tests & stuff in flux
2025-07-22 01:11:35 +08:00
bunnie
9bb7c12b0b add ramtests module to artyvexii 2025-07-22 00:48:34 +08:00
bunnie
65bbaaecd2 changes and updates to artyvexii baremetal config 2025-07-22 00:47:55 +08:00
bunnie
f0b7afe68a add a baremetal target for vexii bringup
here lies the beginning of the path to upgrading the CPU
in the Xous ecosystem.
2025-07-10 14:56:27 +08:00
bunnie
1bff1eebf1 add repl environment to baremetal
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.
2025-06-15 23:53:02 +08:00
bunnie
cfe9f4d5c4 significant ergonomic improvements to baremetal
- IRQ handling added
- alloc crate is now available
- critical_section support enabled

Baseline uart RX handler added.
2025-06-15 23:22:47 +08:00
bunnie
a5eab45a86 add some comments to explain where the code is currently at 2025-06-15 02:06:27 +08:00
bunnie
e35fc7ee98 add some early smoke tests of the BIO subsystem 2025-06-15 01:04:09 +08:00
bunnie
b3a04e349a add an initial baremetal trial target
just prints hello world for now!
2025-06-14 01:43:32 +08:00