Commit graph

10340 commits

Author SHA1 Message Date
bunnie
47dd23b1e1 remove a page table dump
cleans up boot log slightly; slightly improves screen-up time
2026-03-20 15:50:00 +08:00
bunnie
7f3dddd74d fix loader edge case: gap in incoming minielf
If there is a gap > 4k in an incoming minielf, the swap offset
becomes desynchronized with the loading offset.

This patch catches that case and increments the swap offset. The
gap data is simply uninit and unused by the system.
2026-03-20 15:48:51 +08:00
bunnie
d254e415e8
Merge pull request #835 from sbellem/xtask-cargo-config-fix
Resolve relative --config paths in xtask
2026-03-19 10:29:44 +08:00
yoda
fa7e34d87a
Resolve relative --config paths in xtask
Problem: relative .toml config paths don't resolve
when cargo is invoked from a subdirectory like kernel/.

Solution: convert relative paths to absolute against
the project root in the cargo() helper.
2026-03-19 01:53:42 +09:00
bunnie
e548696757
Merge pull request #834 from sbellem/cargo-manifest-dir
fix: use runtime CARGO_MANIFEST_DIR
2026-03-18 11:05:39 +08:00
bunnie
15e8910c93
Merge pull request #833 from sbellem/xtask-cargo-config
xtask: support and propagate cargo --config arg
2026-03-18 11:04:29 +08:00
Sylvain Bellemare
fa14fa78c6
feat(xtask): add --config flag for cargo config
Problem: there is no way to pass extra cargo config
(e.g. vendored sources) through xtask to the
underlying cargo invocations.

Solution: accept --config flags in cargo xtask and
thread them through all internal cargo invocations.
The cargo() helper now returns a Command with the
config flags already applied.
2026-03-18 11:06:04 +09:00
Sylvain Bellemare
b83800ba5a
fix: use runtime CARGO_MANIFEST_DIR
Problem: env!() bakes the path at compile time,
so it breaks when the binary runs from a different
location (e.g. a Guix/Nix sandbox or container).

Solution: use std::env::var() to read it at runtime.
2026-03-18 10:50:09 +09:00
Andy Chan
90486c3a2a docs: add pddbci testing instructions to tools README
Replace the _TBD_ testing section with concrete steps for running
pddbci.py, including Python venv setup and dependency installation.
2026-03-14 00:22:26 -07:00
bunnie
e9c408fbca
Merge pull request #830 from shockham/fix-ball-app-i16-to-isize
Fix ball app compilation updating i16 to isize.
2026-03-14 15:16:22 +08:00
shockham
e4cae07d6f
Fix ball app compilation updating i16 to isize.
Fix the ball app compiling as type checks failed due to expecting isize
rather than i16.
Remove DrawStyle import as has been moved and no longer needed.

Signed-off-by: S Hockham <shockham@protonmail.com>
2026-03-12 15:27:03 +00:00
bunnie
a846f680a8
Merge pull request #829 from betrusted-io/dabao-tester
More tester code
2026-03-08 00:16:35 +08:00
bunnie
c5b3b71f16 add a convenience target to the signer 2026-03-07 19:31:04 +08:00
bunnie
3035143172 fix hosted mode 2026-03-06 21:26:22 +08:00
bunnie
cc7b4740ac cleanup baosec-lite forming routine 2026-03-06 19:18:37 +08:00
bunnie
017ab2a5fd report QR code when test code is scanned 2026-03-06 19:18:05 +08:00
bunnie
3ac87613d1 add UI feedback on baosec targets for PDDB init
useful for MP flow progress monitoring
2026-03-06 19:17:43 +08:00
bunnie
f11d096a27 add utility routine for creating an empty uf2 file
this is useful for resetting devices in CI
2026-03-06 19:17:19 +08:00
bunnie
31738d94ef
Merge pull request #828 from betrusted-io/dabao-tester
Dabao tester
2026-03-02 02:15:42 +08:00
bunnie
75c1faa652 update selftest to what's used in production 2026-03-02 01:24:38 +08:00
bunnie
c38214865f add a routine to initialize the ioconfig from the resource spec
in particular this makes sure the io config masks are extracted.
2026-02-28 23:20:04 +08:00
bunnie
f0b0c038f2 chore: fix out of date comment 2026-02-28 23:19:53 +08:00
bunnie
9841e0a199
Merge pull request #827 from betrusted-io/tweaks
add support for more keyboard input configs on baosec
2026-02-27 01:37:22 +08:00
bunnie
90c3f095ec add support for more keyboard input configs on baosec 2026-02-26 18:29:47 +08:00
bunnie
3e3879ba4d
Merge pull request #826 from betrusted-io/adc
ADC
2026-02-24 02:29:05 +08:00
bunnie
e47e65b708 add test routines for ADC 2026-02-24 01:35:16 +08:00
bunnie
4a542346c8 cleanup names and fixup the init delays 2026-02-24 01:34:54 +08:00
bunnie
e704477f79 api changes for ADC service 2026-02-24 01:34:32 +08:00
bunnie
663139b607 split ADC into its own service thread
this allows the ADC to depend on core HAL services. It's structured
so that other 'misc' services would go into the "other" module,
just to keep the overhead of threads/services down a bit. Up until
this point all the other services mapped to existing/other
server names, like the RTC, susres, etc.
2026-02-24 01:33:25 +08:00
bunnie
18e72a970c add draft ADC support to hal service 2026-02-23 18:53:37 +08:00
bunnie
302b7b65bf add std opcodes for ADC operations 2026-02-23 18:53:19 +08:00
bunnie
35168f8085 add getters/setters for adc channel specifications 2026-02-23 18:52:55 +08:00
bunnie
ac1e451aa1 add routines for setting/updating i2c clocks
in anticipation for frequency scaling support
2026-02-23 18:52:23 +08:00
bunnie
bd2a69327b add working draft of ADC driver
this is based on a reference driver in C but translated
largely by Claude and then checked & signed off by me.
2026-02-23 18:15:38 +08:00
bunnie
5a8d5a8de5 fix allocation bug for ifram 2026-02-23 18:15:14 +08:00
bunnie
a8012a6e01
Merge pull request #825 from betrusted-io/vault2-ui
Vault2 UI
2026-02-23 14:41:27 +08:00
bunnie
6730a01799 cleanup FIDO2 UI
messages now fit on the screen and are clearer for the small
format
2026-02-23 03:13:56 +08:00
bunnie
992cbb4388 move buttons and menus around for toggling modes
a little easier to use with a hot key for switching ui modes
2026-02-22 22:29:33 +08:00
bunnie
73c0946325
Merge pull request #824 from betrusted-io/bio-c
C compiler for BIO
2026-02-22 14:34:09 +08:00
bunnie
af6260fb43 add a check for div instructions without "softdiv.h"
This will hopefully save some troubles for developers who
accidentally invoke a divide without realizing it.

Prints an error with instructions on how to resolve the
situation.
2026-02-22 03:42:51 +08:00
bunnie
7e37aa50c8 clang2rustasm.py: improve handling of more cases in clang code
- handle .rodata, .data, .bss, .set labels better. This allows
for static globals
- handle call instructions. These are manually resolved by
changing the call pseudo-instruction into a jal with a rust
assembly-compliant label.
2026-02-22 03:34:42 +08:00
bunnie
db6aa1255a rename fixed point converters
Q20.12 and Q16.16 come as .h files in the BIO C library,
so converters in Rust to shove data to and from the BIO in
those formats are provided.
2026-02-22 03:33:23 +08:00
bunnie
75ce3f886d constrain the C compiler codegen
1. we can't resolve jump tables in Rust assembly. The label
grammar isn't rich enough to do this. As a result, this code
genreation method is suppressed.

2.there is no 'div' instruction on this PicoRV, so the +m is
converted to +zmmul, which correctly emits mulitplies, but
skips the divide.

A soft divide library is provided for programs that require
division.
2026-02-22 03:23:57 +08:00
bunnie
174b97a3a7 add the colorwheel feature 2026-02-22 03:23:41 +08:00
bunnie
3e2daa8746 add "wheel" test
color wheel test, where the colors are generated directly in
the BIO.
2026-02-22 03:23:05 +08:00
bunnie
02d90fe056 add a more complicated demo program
This C routine incorporates statics, arrays, globals,
switch/case, division, and a bunch of other stuff that
is designed to exercise corner cases in the assembly conversion
script.

The program itself just cycles LEDs in a rainbow vomit pattern.
2026-02-22 03:20:57 +08:00
bunnie
8ee6d86748 cleanup math test Fp refernce 2026-02-22 03:20:11 +08:00
bunnie
c80877d064 add various C libraries for BIO use.
Note that there is no LTO/trimming in the BIO flow, so
wantonly including libraries you don't use just grows
your code size for no use.
2026-02-22 03:19:04 +08:00
bunnie
19d8294369 add math test routine to dabao-console 2026-02-20 23:54:49 +08:00
bunnie
8f709216d6 add autogeneration header to math_test.rs 2026-02-20 23:54:34 +08:00