Commit graph

693 commits

Author SHA1 Message Date
bunnie
f620296a94 fix warnings in hosted mode 2022-06-01 11:54:25 +10:00
bunnie
06cda24c19 fix another errant mut that wasn't needed in pddb 2022-06-01 11:54:25 +10:00
bunnie
503615a138 fix warnings that result from the PDDB mutability change 2022-06-01 11:54:25 +10:00
Sean Cross
d342d7a885 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
bunnie
8c08a9a188 bring shellchat to AES 0.8 compatibility
Also note here that we have:

- Run all the AES test vectors and confirmed the pass for both
  hw and sw
- Updated the benchmark numbers for the new AES implementation
2022-06-01 11:53:33 +10:00
bunnie
47b76a3d5b include a getrandom implementation that allows us to use modern randcore
A lot of packages are depending on 0.6 api, which requires a crate
that has OS specific TRNG calls. This patch keeps the 0.5 calls
inside the TRNG crate as direct API calls, and migrates to support
a 0.6 api to a patched version of getrandom that supports Xous.
2022-06-01 11:53:02 +10:00
bunnie
5337d34d45 fix warnings in hosted mode 2022-06-01 00:32:49 +08:00
bunnie
2eee81b218 fix another errant mut that wasn't needed in pddb 2022-06-01 00:21:30 +08:00
bunnie
3b1629744c fix warnings that result from the PDDB mutability change 2022-06-01 00:21:22 +08:00
Sean Cross
3ae9d8abf0 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:33:30 +08:00
bunnie
c11d5fe52b bring shellchat to AES 0.8 compatibility
Also note here that we have:

- Run all the AES test vectors and confirmed the pass for both
  hw and sw
- Updated the benchmark numbers for the new AES implementation
2022-05-30 03:09:05 +08:00
bunnie
e14e6206ed include a getrandom implementation that allows us to use modern randcore
A lot of packages are depending on 0.6 api, which requires a crate
that has OS specific TRNG calls. This patch keeps the 0.5 calls
inside the TRNG crate as direct API calls, and migrates to support
a 0.6 api to a patched version of getrandom that supports Xous.
2022-05-29 02:47:51 +08:00
bunnie
116015dff8 fixups and debug 2022-05-27 22:45:23 +08:00
bunnie
8553aea95e fixup a stub 2022-05-27 18:09:21 +08:00
bunnie
05f705a931 prove that we've restored ditherpunk functionality to hosted mode
this basically brings us back to the point of the original PR,
but with the code being optional.
2022-05-27 18:05:36 +08:00
bunnie
7d020182d4 integrate ditherpunk as a feature 2022-05-27 17:28:15 +08:00
bunnie
c8165be0fb Merge remote-tracking branch 'jb/dither' into bunnie-dev 2022-05-27 16:44:17 +08:00
nworbnhoj
342e8e82b1 implement shellchat test modals
remove modals feature ux_tests
2022-05-25 10:29:21 +10:00
bunnie
62cbc86aeb add automation strings 2022-05-24 23:21:26 +08:00
bunnie
4d1d132233 add a first-pass at what hardware CI automation strings might look like 2022-05-24 02:22:36 +08:00
bunnie
3bfdc238a0 add support for keymaps in HID
remaps keys based on the assumed keymap based on the user's
preference for the keyboard layout on the device.

So far, only dvorak and QWERTY are supported.
2022-05-17 16:41:08 +08:00
bunnie
ca275308ef Merge branch 'usbdev' into main 2022-05-17 02:31:10 +08:00
bunnie
66e4d9f803 move test commands for USB status checkup from keys to USB 2022-05-17 02:25:59 +08:00
bunnie
346caad315 Add the usb-device-xous driver to the default hardware config
Also includes the USB test commands in shellchat.

This is different from the usb-test crate, in that it's fully
integrated into Xous. usb-test is just for quick-testing the USB
driver, in the absence of most of the rest of Xous.
2022-05-17 00:46:52 +08:00
bunnie
6f1597b1e7 make "fountain" test optionally terminate
any characters typed as an argument after "fountain" will cause
it to terminate in 10 iterations
2022-05-13 14:50:29 +08:00
bunnie
b470588285 oops, fix a compile error. also try adding a flush()...this only made things worse?? 2022-05-13 02:25:35 +08:00
bunnie
56f9c654c0 debugging of TcpStream Drop dropping too fast
so far only able to confirm the problem happens, no effective
fixes yet.
2022-05-13 02:19:10 +08:00
bunnie
fd500927d3 quit fountain generator if error is encountered 2022-05-11 22:20:15 +08:00
bunnie
ce116c2c0d add "fountain" test to net suite 2022-05-11 21:24:04 +08:00
bunnie
9893e70759 fix warning 2022-05-06 13:45:22 +08:00
bunnie
71e41d4b0a fix buffer length check computation 2022-05-06 13:45:22 +08:00
bunnie
9354932483 fix buffer length check computation 2022-05-06 13:34:59 +08:00
bunnie
382f2ae306 fix warning 2022-05-06 04:00:55 +08:00
bunnie
33a3cfa7c2 fix typo 2022-04-25 18:34:31 +08:00
bunnie
a9b2dd535a add a note to remind about the purpose of the unsub test command 2022-04-25 18:32:09 +08:00
bunnie
d23dbd1db8 add an explicit test of the unsub path
normally you would never use this, this would cause the
connection manager to muck up.
2022-04-25 18:30:43 +08:00
bunnie
2c3143f790 Merge branch 'main' into multi-text-modals 2022-04-22 15:54:18 +08:00
bunnie
bac6c25bfe conversion toward standard testing method 2022-04-22 15:10:51 +08:00
bunnie
ee39b9643e add a timeout for the network to disconnect before starting update
this is to avoid panics due to malformed "packets" being received
as the EC is updating and not working correctly.
2022-04-21 01:22:17 +08:00
bunnie
c85f853e08 clean up use statements 2022-04-17 23:03:31 +08:00
bunnie
2fbb522c06 modify the web server to use mpsc, multiple workers
This is basically the Rust example for the web server, with
some tweaks. Add a command to make the device buzz when
a particular URL is hit, and to wait before responding when
another one is hit.
2022-04-17 18:50:10 +08:00
bunnie
f2bd4a6193 fix listener address and also remove the forced timeout on read 2022-04-17 04:58:55 +08:00
bunnie
b3d83c8494 migrate to std::TcpListener in tests 2022-04-17 04:07:13 +08:00
Gianguido Sorà
63cbe0e26f shellchat: style change in demo modals command 2022-04-13 15:52:14 +02:00
Gianguido Sorà
8375fdf801 shellchat: update demo modals command to new interface 2022-04-13 15:49:51 +02:00
bunnie
5d2c65cb6c fix missing update to display in panic handler 2022-04-10 16:57:04 +08:00
Gianguido Sorà
8123393a7d Merge branch 'main' into feature/multi-text-modals 2022-04-07 16:39:03 +02:00
bunnie
d49c35dc0c verify that unmount callbacks are working 2022-04-07 17:58:37 +08:00
bunnie
6ac4ef292b add basis mount/unmount to pddb shell commands, fix some UX formatting 2022-04-07 15:32:47 +08:00
Gianguido Sorà
ba347f6c79 add placeholders, current selection highlight 2022-04-05 16:18:43 +02:00
bunnie
067c603e03 strip out old UDP libraries, harmonize on just libstd UDP 2022-04-04 23:15:51 +08:00
bunnie
57339dfe2f udp libstd passing inital tests 2022-04-04 22:37:01 +08:00
bunnie
b5a6c436c2 first draft at some basic libstd UDP mechanics 2022-04-04 04:49:17 +08:00
Gianguido Sorà
0b62a2657a feature: generalization of modals.get_text()
Added a get_text_multi() method on modals which builds, shows and returns text taken from a modal view with a given amount of fields.

Calling get_text() is equal to a call to get_text_multi() with fields = 1.
2022-03-31 19:24:53 +02:00
Gianguido Sorà
83e61f5f1b feat: add wiring for multiple TextEntryPayloads drawing 2022-03-31 17:54:22 +02:00
bunnie
d736d54cee make pddbtest not part of the hw build but part of hosted mode by default 2022-03-29 16:49:18 +08:00
bunnie
d074de34d6 add seek tests 2022-03-29 04:40:51 +08:00
bunnie
5f6a21bff1 add some manual test cases that run in hosted mode for pddb
these are helpful for debugging "real" use cases, instead of
the synthetic CI benches that don't fully exercise the file-like
API.
2022-03-29 01:49:47 +08:00
bunnie
18c202dcee start of testing code for the PDDB 2022-03-28 22:56:32 +08:00
bunnie
91ed8193a7 fix delete commands to sync and also make keyword ordering parallel 2022-03-28 03:37:04 +08:00
bunnie
18b7cf78df add some pddb delete routines 2022-03-28 01:55:39 +08:00
bunnie
2340686e80 rate limit error messages 2022-03-27 16:45:00 +08:00
bunnie
107c63f7c2 update RTC functions to use libstd 2022-03-27 04:06:26 +08:00
bunnie
1617200cb6 remove the RTC "reach-around" cheat inside shellchat's test routine
The test routine for shellchat "cheats" and accesses the I2C block
to test the RTC during factory operations. This is not aesthetic
and is also potentially a security hole since we don't want less
trusted stuff willy-nilly playing with i2c.

Rewrite to

1) remove i2c references from shellchat
2) replace RTC calls with the newer non-dangerous llio calls that are
limited to read out the initialized time variables.
2022-03-27 02:56:41 +08:00
bunnie
df96ca1429 test for libstd Instant 2022-03-26 02:35:59 +08:00
bunnie
bfb8a17cd5 strip out legacy RTC calls in preparation for refactor 2022-03-24 02:19:26 +08:00
bunnie
140f07ddc8 latest revised test 2022-03-18 20:28:36 +08:00
bunnie
4463b909a1 initial cut at using libstd TcpStream for comms 2022-03-18 19:55:16 +08:00
bunnie
b246a369d4 lay in another layer of tts functionality
now shellchat can talk, and password entries are a thing.

next up: debug oom issues in STT when we start doing really big
strings.
2022-03-11 02:37:48 +08:00
bunnie
9116cb02b1 back-propagate pause->abort changes.
in many of the test routines what we really wanted was an
abort, not a pause.
2022-03-08 19:03:02 +08:00
bunnie
1d6fbbe5bb add the basic text to speech infrastructure.
also creates a method for isolating incompatibly licensed repos
2022-03-08 03:08:12 +08:00
bunnie
985fcdf9da a feature slipped in that i didn't mean to commit 2022-03-07 13:31:16 +08:00
bunnie
dd511432b4 fix dangling reference in AES ctr mode soft implementation 2022-03-07 13:28:10 +08:00
bunnie
271fd4d559 make the UDP socket specifiable on command line
this makes the bindings work on things other than localhost
2022-02-21 01:26:04 +08:00
bunnie
760957154e add a crappy but slightly more accurate approximation of UDP to hosted mode
It's crappy because it uses a busy wait loop to poll the udp
rx socket in order to accurately emulate the Xous async callback
feature (which is _not_ emulated for Tcp, for example).

It's more accurate because this emulation happens. But it's a lot
more complicated to implement it because zero-cost async UDP callbacks
aren't really a host-native feature (but they are a Xous-native feature!),
and I didn't want to .. pull in tokio or mio code surface into
the Xous hosted mode, seemed a bit like crushing a fly by dropping
a house on it. Maybe that's a fine solution in Oz, but Xous doesn't live in Oz.
2022-02-21 00:54:46 +08:00
bunnie
0dbf1661cb add TCP to hosted mode emulation
Total bodge -- we lop off the TCP stack at the Xous API level, and
substitute it with a native host TCP stack.

Caveat hacker: this means that a lot of OS-specific net properties
will carry through to the hosted mode emulation. This is adequate
for "smoke testing" a build but do not be shocked, *shocked* if
there are more bugs to be found because of some weird host integration
issue.
2022-02-20 21:31:32 +08:00
bunnie
960745ca61 eliminate static mut unsafe pattern in callback function storage
since xous 0.9.5, we've had a Box and we've had threads, so now we
can put the callback in a Box and pass it to a thread, instead
of relying on an `unsafe` work-around to get the callback function
pointer into the thread's environment.
2022-02-19 01:38:20 +08:00
bunnie
e4db83e59e add a "public" RTC get command to the LLIO
This implemnetation takes advantage of the fact that the LLIO
owns the RTC device, and bypasses a layer of indirection in the
call chain.
2022-02-19 01:16:20 +08:00
bunnie
95b857feea refactor i2c interface to eliminate static mut unsafes
also remove async write callbacks: in practice, these aren't used

Downside of this refactor is that threads for handling the
callbacks are not spawned on demand, they are spawned at boot,
leading to about an extra 68k of RAM used (most of it being
consumed in the codec block, actually). Some of this is also
probably extra object code because we're using more of the stdlib
primitives, which carry some weight.
2022-02-19 00:31:25 +08:00
bunnie
36bf400d46 fix a delay in factory test to match a revised delay
waiting a bit longer for the EC to boot requires the confirmation
time threshold for the EC boot to also be stretched out
2022-02-06 03:13:33 +08:00
bunnie
fd5c6568d1 trim out some excess redraw calls that are slowing down boot 2022-02-05 18:55:46 +08:00
bunnie
63ee19fc8a improve RSSI reporting during test 2022-02-04 17:46:22 +08:00
bunnie
06b9f88926 improve test oqc interface with new API 2022-02-04 17:11:42 +08:00
bunnie
8fa4499c14 fix some cosmetic issues 2022-02-03 20:45:46 +08:00
bunnie
9921377148 make sure the connection manager doesn't race with user settings
If the connection manager isn't paused while a user sets up a network,
it could decide that the currently partially configured status is
crap and then overwrite it with a saved configuration.

Pause the connection manager and make the user aware of this situation.
2022-02-03 18:46:51 +08:00
bunnie
ffa6884fe4 improve list formatting 2022-02-03 18:42:50 +08:00
bunnie
955d0182d6 some very minor ergonomic improvements around network connection UX 2022-02-03 18:38:43 +08:00
bunnie
de81cf62c3 fix typo in formatting field 2022-02-02 03:30:17 +08:00
bunnie
ef0e6606ed make the "web page" a little easier to read. hah! 2022-02-02 02:41:25 +08:00
bunnie
562a930ce0 add APIs to pause the connection manager, and pause the CM while doing EC updates
It's not a good time to bug the EC to do network stuff when it's updating
itself.

...might even want to send the network into a disconnected state,
but, let's start with just turning off the connection manager
for now.
2022-02-02 02:38:19 +08:00
bunnie
13de52fa8d TcpListener debugging, just a little bit
Spent a couple hours chasing down a "bug" which is acutally just
something about how http works that I don't understand. TCP was
working just fine but there is ... idk some sort of keep alive
thing that occupies a socket so the "web server" blocks waiting
for a read. Anyways, I guess the "right" way to solve that would
be to make a multi-threaded web server

OH GOD STOP

right. it's just a demo to prove that TCP works. done.

Open an issue if you find a problem with TCP kthx!
2022-02-02 00:23:14 +08:00
bunnie
925d53f646 TCP listener is "working"
Good enough so that if you type `net server` and you hit the IP
address of the device, it'll respond with something like

Hello from Precursor!
I have been up for 86087 ms.

There's still all kinds of bugs, I'm sure. But ... I'm also not
sure /why/ you would want a web server on Precursor. This is more
just to make sure that the TCP stack isn't totally broken.

The "web server" as it may be is quite broken and doesn't parse
any headers and probably sends a bogus amount of data because
I can't figure out if the content length includes some new lines
or not. But really, this just isn't in scope. Works with Chrome,
Firefox shows the status page and then says "connection reset" and hides
all the information. Whatever, browser compatibility is well beyond
my pay grade!
2022-02-01 18:54:07 +08:00
bunnie
faa51908d7 maybe, just maybe...we finally have version info baked into the kernel correctly. 2022-01-31 23:02:32 +08:00
bunnie
0910f7e373 tcpstream passing a simple demo test
not sure what other tests to run, not an expert in this stuff.
2022-01-31 14:35:55 +08:00
bunnie
2153c25be3 it is so damn hard to get Rust to inject a relevant build time into a build
Still not there....to get it reporting in a user-visible fashion
I'm realizing I'm going to have to build a dedicated facility in
Xous to track this because otherwise I have to trigger the
automatic rebuild of a "heavy" program that would naturally
encapsulate such information.

Maybe for now, though, at least over the serial port I can
get a somewhat relevant string???
2022-01-31 13:16:09 +08:00
bunnie
7999ea04d1 add a simple tcpget test stub to the shellchat 2022-01-31 05:02:18 +08:00
bunnie
4690075c40 clean build, but...much testing to do. 2022-01-31 04:03:31 +08:00
bunnie
177ad38db2 derive SSID scan on shellchat from the connection manager
The connection manager keeps track of all our SSIDs, not the COM.
2022-01-30 16:53:15 +08:00
bunnie
25bccd9446 THE BALDEST YAK: keyboard injection now working
I wrote in a commit yesterday how there was no ROI on doing this
yet somehow I kept on doing it. I blame poor impulse control.

Turns out there was a series of race conditions and bugs that
caused this thing to "mostly work" on the first go at it but
really hard to debug and get very right.

1. Litex UART has a weird undocumented API. You advance the Rx
FIFO by writing `1` to the PENDING bit, and no other way. However,
you determine if there are any more characters to receive by
reading the EMPTY bit and seeing if it is 1. The previous method
wrote `1` to the PENDING bit and then used the PENDING bit to
see if a character was available, under the theory that the
PENDING bit would be set again if there was still a character.
This is somewhat true, except that the PENDING bit is set only
some amount of time later which is about comparable to a few
CPU instructions, so if you had a fast loop path the PENDING
bit would show as cleared and you'd exit, which would cause
no further interrupts to fire because the interrupt was
effecitvely not acknowledged.

This isn't written up anywhere but I figured this out by
just reading the source code for Litex UART and BIOS:
e8be391504/litex/soc/cores/uart.py (L264-L279)
ccd3ab17be/litex/soc/software/libbase/uart.c (L38-L44)

2. I had the Key Injector IP block in the `sys` domain, which
would have its clock cut when the CPU went to sleep, which would
cause input characters to disappear when the CPU went into power
saving. moving this to "always on" domain fixes that.

3. I had the UART PHY in the always on block (so you could
send or receive exactly one character), but not the
separate UART block (which contained the FIFOs).
The UART block would also go into power
savings, and this would cause FIFO entries to go missing.

4. Escape sequences get sent as a burst of characters. The Key Injector
originally did not have a FIFO of its own, so it would only
remember the *last* key of the sequence that was written, causing
some keys to be dropped occassionally. Adding a 16-deep FIFO
to the injector fixes this.

5. The code I had to read out the injector's results was designed with
the "strobe" bit (to indicate that the FIFO had characters) in the
same regsiter as the character itself. Thus the loop that 1. checked
if the fifo was empty then 2. read and forwarded the character
would actually perform two reads from the FIFO. However, this "mostly worked"
I think because the FIFO retains the last value that was written
even when it was empty, so if only one character was read at a time
everything was fine. It only didn't work when you stuffed two characters
in there, as you'd drop the first one. Reading the FIFO once and
then interpreting the code with a bitmask fixes this.

6. The escape sequences, in their full glory with no dropped characters,
required a refactored parsing routine, which I have now added.

7. backspace->delete mappings, the bane of computer engineers since 1960.

OK. very bald yak. Here I lay down the shears next to several
mooshi pillows stuffed with the finest Yak hair.
2022-01-28 15:17:47 +08:00
bunnie
71c017641a fix up some debug messages and other minor nits 2022-01-27 04:07:22 +08:00
bunnie
4c4ca1577f fix connection manager state machine
seems to work a lot better, but needs a lot more testing
2022-01-27 03:56:39 +08:00
bunnie
1d27265d02 fix comma formatting in pddb lists to not put a trailing comma 2022-01-25 16:58:22 +08:00
bunnie
e55154be69 add version info for ~~xous~~ to the shellchat command
this took...way too long to figure out. Latest versions
of `vergen` for whatever reason seem totally broken for
my build hosts.
2022-01-25 16:37:50 +08:00
bunnie
077a286b42 add some pddb diagnostics shell commands 2022-01-25 15:56:06 +08:00
bunnie
d1563aa0ab add docs and screenshots 2022-01-25 03:11:50 +08:00
bunnie
02b2e4a6e7 deprecate request_focus api and make initial focus setting within the GAM
request_focus is "dangerous" because any random server could
request a UX context to pop up. There is a checked version
that requires a GAM token that should be used, but, this leaves
the question of how does the initial app that's supposed to be
focused gets set.

A small mod to the UxRegistration call is made to check for
the name of the default focus app, and when it is seen, a thread
is fired off to request focus for that app. That allows us
to deprecate this otherwise dangerous call.
2022-01-25 00:55:14 +08:00
bunnie
a0c4304d29 add focus/defocus messages to the GAM
this allows animation-heavy apps to be backgrounded and not
continue to run their animation while backgrounded.
2022-01-23 17:12:14 +08:00
bunnie
6653d42114 cleanup UX context registry
it's now a much smaller nightmare to maintain the registry, as all
the items are concentrated into a single location
2022-01-23 14:31:21 +08:00
bunnie
2642e6c075 various UX fixes that take advantage of the new font rendering engine 2022-01-22 00:10:31 +08:00
bunnie
7277b7bc1d start to refactor out the old blitstr v1 apis 2022-01-21 15:01:56 +08:00
bunnie
761d71d974 clean up some over-allocation in shellchat 2022-01-15 16:40:52 +08:00
bunnie
c7081ea944 Merge branch 'bunnie-dev' into main 2022-01-14 15:28:47 +08:00
bunnie
4f9374e860 add enhanced debugging to the COM for wf200 2022-01-14 15:27:24 +08:00
bunnie
a4bb889a5d update wlan status to a binary version with more detailed output 2022-01-14 02:23:57 +08:00
bunnie
0ba8650731 refactor SSID reporting
later on we'll have to add some UX around this but for now
the command line stuff is a bit nicer.
2022-01-13 21:12:14 +08:00
bunnie
837b2d5e9b Merge branch 'bunnie-dev' into main 2022-01-12 02:05:07 +08:00
bunnie
a8d7c7e9e2 cleann up the oqc test 2022-01-12 02:01:33 +08:00
bunnie
c43e31c500 fixing some bugs on oqc test.
there's an issue with the modals that has to be fixed next...
2022-01-11 22:34:45 +08:00
bunnie
5c32c9db25 Merge branch 'bunnie-dev' into main 2022-01-11 18:29:35 +08:00
bunnie
f464e34eef debug the test oqc integration 2022-01-11 18:29:12 +08:00
bunnie
f626374b36 reduce resource usage of the oqc_test
- code is merged into shellchat so there's less alignment overhead
and some library reuse
- server is not spawned until it's needed, so the RAM load is less
2022-01-11 17:19:13 +08:00
bunnie
4f638bb49a massive refactor to eliminate the RTC crate
Saves a bit on resources and the RTC crate doesn't need
to be stand-alone now that the modals crate is a thing;
we are able to split the UX routine to manage the RTC out
of the code that actually manages the hardware.

The hardware code ended up in LLIO, and the UX ended up in the status
routine.
2022-01-11 15:45:20 +08:00
bunnie
994e3d7cfb refactor llio crate (phase 1): organize files into sub-systems 2022-01-11 12:02:27 +08:00
bunnie
7f8d4ba63e Merge branch 'bunnie-dev' into main 2022-01-10 16:50:36 +08:00
bunnie
b3788a54af clarify the dependency policy 2022-01-10 16:50:10 +08:00
bunnie
9c2adb2c57 Merge branch 'bunnie-dev' into main 2022-01-10 16:35:56 +08:00
bunnie
995915ed4e nail down a couple more dependencies, and add a policy note to Cargo.toml
Each Cargo.toml now includes a comment which remnids maintainers
of the dependency policy for Xous (that is, nail down every dependency
to the minor number).
2022-01-10 15:54:27 +08:00
bunnie
dd943c5416 pin down versions and harmonize versions across servers
Versions are pinned down to the minor number. Yes, this means that
we don't automatically pull in features and bug updates from crates.io,
but it also means we don't pull in new attack surfaces and code that
hasn't been tested or reviewed. I'd like this process to be very deliberate
and not automatic for Xous.

The `rand` crate is almost pinned down to a single version, except
for an odd dependency that's pulled in by hosted mode that depends
on rand 0.8.4 via a subordinate dependency via the `tempfile` crate.
Pondering if it's worth it to try and eliminate that, because the
0.8.4 version doesn't get compiled into any version that touches
real hardware. It just makes it harder to analyze the Cargo.lock
file, mostly. I think I'll leave it as-is.
2022-01-10 15:39:55 +08:00
bunnie
1950492375 Merge branch 'bunnie-dev' into main 2022-01-09 14:07:47 +08:00
bunnie
dd18d94a03 e2e demo of pddb working now, we can store an ssid/password pair...finally. 2022-01-09 13:12:36 +08:00
bunnie
7aa2c7b054 a very basic e2e pddb application that tries to restore a network connection
lots of problems to solve still, but let's pick that up on the refactor
stage -- for now we want to get some evidence that the pddb API is
workable.
2022-01-09 01:29:28 +08:00
bunnie
b836a5afec Merge branch 'bunnie-dev' into main - pddb merge
All the PDDB infrastructure is now in place. The core filesystem is
fairly well tested, but the server APIs are entirely untested. However,
this merge at least gets the clean build into the mainline and will
cause a Precursor to create and format a PDDB. Note: this takes about
15 minutes -- about 7 minutes to erase the memory, 9 minutes to fill it
with random data. This is primarily limited by the raw speed of the
FLASH memory itself.
2022-01-08 00:13:14 +08:00
bunnie
9fcd7e17ae warning-clean. need to clean up the hosted mode flow a bit. 2022-01-07 23:22:12 +08:00
bunnie
7d660a3592 add key attribute query, clean up some warning 2022-01-07 16:18:44 +08:00
bunnie
fa7a9db348 add more key manipulation APIs 2022-01-07 15:43:50 +08:00
bunnie
6e5506a23d add pddb shell debug commands 2022-01-06 14:50:44 +08:00
bunnie
bc98064a59 add a function to recycle the PDDB for faster PDDB testing cycles 2022-01-05 11:22:29 +08:00
bunnie
5129b42dd9 remove shellchat services that conflict with the pddb 2022-01-04 21:56:50 +08:00
bunnie
0844b3e961 add formatting check and UX flow for formatting; redo salt (again)
probably should have split this into two commits. oh well.

first part introduces a check to see if root keys are initialized,
and if so, tries to mount the PDDB. If it can't mount, it asks
the user if they want to format it. It also updates the progress
of the fromatting.

the second part redoes the salt once again. After some discussion
SHA512/256 is also resistant to length extension attacsk so we
don't need to use the HMAC technique suggested. Would prefer to
reduce the number of algos to analyze, so we're going to a simple
SHA512/256 hash of the salt/basis name/plaintext password to generate
the salt that goes into the bcrypt routine that ultimately generates
the final key used by the system.
2022-01-03 16:51:51 +08:00
bunnie
48392ecd13
add margin on the ec reset time
4s seemed like a long time but i found one board that can't quite finish reset in that time, about 70% of the time it needs just a half second longer.
open up the window to 6s, just to ensure we don't get any false negatives.
2021-12-02 10:53:39 +08:00
bunnie
7208a86fdb rename aes-xous to aes, and change version number
this allows us to patch AES for external crates, too,
such as aes_gcm_siv
2021-11-07 05:17:34 +08:00
bunnie
65bad96f52 fix killbounce & formatting
sleep killbounce wouldn't work because we started limiting the
number of connections to the LLIO.

This change makes connections to the LLIO unlimited, but perhaps later
on we should split out the I2C bus into a separate security domain,
so that the LLIO's unlimited connection policy doesn't introduce a
risk into a rogue process being able to overwrite the RTC contents.
2021-10-30 02:14:31 +08:00
bunnie
2962d4ffc3 add a wifi retry to the oqc test 2021-10-29 05:25:40 +08:00
bunnie
81edf6a9c0 fix net ping description and help info 2021-10-28 18:37:48 +08:00
bunnie
72ffee7f13 cleanup of debug chatter, clarify some comments 2021-10-28 05:12:03 +08:00
bunnie
765519ff32 major refactor of ping implementation
- moved most ping state into the Net crate proper, since the smoltcp
implementation assumes a tightly bound set of objects and lifetimes
in its icmp abstraction

- created various convenience abstractions for handling single and
multiple pings, blocking and non-blocking.

- refactored the "net" command to use the new form

Initial testing indicates there are still some bugs (seems to be
with the way we are handling timestamping and doing pong retirement)
but at least we're not getting tons of async callback errors like
we were before, and we're not shuttling obscene amounts of state
using Arc-Mutex between the input and output of the ping operations.
2021-10-27 04:38:09 +08:00
bunnie
f53c57ba3f fix up a number of issues in ping
Now that I understand how smoltcp does ping better I have regrets.
The demo example in smoltcp uses a funky macro that was a bit
misleading. I have gotten rid of that but I probably would have made
different decisions in implementing this had I understood the API better.

Anyways. It works, but has some trouble handling the cases of timeouts
sometimes.
2021-10-22 04:08:43 +08:00
bunnie
f1fe850820 ping was surprisingly hard.
not fully working yet, but the architecture is there and it builds.
smoltcp's ping implementation (or at least its demo code) was not
very amenable to splitting into modules, had to recode most of it.

the ipv6 is still a hack.
2021-10-21 06:28:11 +08:00
bunnie
643e9a7d62 dns. needs more work, but it is at least minimally functional. 2021-10-20 05:18:54 +08:00
bunnie
ab3e05764e add some status and help message embellishments 2021-10-19 04:43:55 +08:00
bunnie
40771fbba7 flesh out UDP API...as much as we can
Multicast/Broadcast is not supported by smoltcp it seems, so those
calls are just unimplemented. But we are able to clone UdpSocket,
for the sick puppies who like to do that sort of thing.
2021-10-19 04:42:06 +08:00
bunnie
0cbca7fbe1 add UDP send and test routines 2021-10-19 01:41:22 +08:00
bunnie
98bbe848fc cleanup Udp Bind API
version for Xous internal use, and a version for integration into libstd.
2021-10-18 17:04:16 +08:00
bunnie
a8c6e8047f simple end-to-end demo of receiving UDP packets asynchronously 2021-10-18 05:55:42 +08:00
bunnie
23edeb9b5a add wlan dhcp to oqc test 2021-10-07 00:57:22 +08:00
bunnie
81653ec94b wot. how are these changes not being saved. 2021-10-04 17:37:17 +08:00
bunnie
f0c33bc99c tighten up operator flow for factory tests 2021-10-04 17:25:49 +08:00
bunnie
4a57adac3d add battery check, version print to oqc test 2021-09-20 00:05:21 +08:00
bunnie
87228ad747 basically working OQC test 2021-09-19 01:06:21 +08:00
bunnie
c2c919ba81 add oqc test service
this works around the problem with stdlib allocator not
working quite correctly in spawned threads.
2021-09-18 02:22:35 +08:00
bunnie
029c845359 add ssid, suspend/resume test to the OQC test routine; comment out keyboard
keyboard routine still pending fixing a possible bug in xous allocator
2021-09-16 03:54:35 +08:00
bunnie
ce026e661d clear warning from previous mux fix 2021-09-16 03:54:19 +08:00
bunnie
4882016d08 add a graphics test routine for OQC
invoked via the GAM, callable exactly once per boot for up
to 60 seconds.
2021-09-16 01:00:22 +08:00
bunnie
f0dd512d7d bump sha2 version number so it matches what's on crates.io (for clean patching) 2021-09-15 18:53:11 +08:00
bunnie
8edb02ba40 try a version using scalars, still crashes 2021-09-15 18:29:27 +08:00
bunnie
8ce0e8c789 intermediate checkpoint of failing memory-passing for keyrawstates 2021-09-15 17:59:13 +08:00
bunnie
dfc6444d78 add killkey test to the self test suite 2021-09-14 20:15:03 +08:00
bunnie
3f1ba5e279 add com trng seed, uptime on EC; EC reset test commands 2021-09-13 23:28:54 +08:00
bunnie
d0a83b6865 add backlight test 2021-09-11 22:53:20 +08:00
bunnie
49919c6123 fix typo in check clause 2021-09-11 18:02:26 +08:00
bunnie
5bff7433a5 add internal vcc measeruments to self test 2021-09-11 18:00:22 +08:00
bunnie
e06188c5fa add trng module to self-test 2021-09-11 00:16:55 +08:00
bunnie
6eed8deb4c improve audio testing integration for automation framework 2021-09-10 22:54:23 +08:00
bunnie
3be7204ce6 audio test frameworks initial working cut 2021-09-10 02:56:27 +08:00
bunnie
bd89146967 commit latest formatting changes for test output 2021-09-09 22:32:08 +08:00
bunnie
549912c9d5 add rtc test 2021-09-09 16:55:56 +08:00
bunnie
7ac8b9100d create a test case for cosine intrinsics 2021-09-08 15:10:54 +08:00
bunnie
0e94725d23 add wycheproof help message 2021-09-06 14:43:19 +08:00
bunnie
01bfc375b2 Merge branch 'main' into bunnie-dev 2021-09-06 14:40:16 +08:00
bunnie
1a55973346 adjustments to self test routines 2021-09-06 14:39:44 +08:00
Fabian Weißberg
4bb454ef10 Import x25519 vectors from Project Wycheproof
Closes #76

The test vectors in wycheproof-import/x25519_test.json correspond to the upstream commit 4672ff74d6.

For details see wycheproof-import/README.md.

Signed-off-by: Fabian Weißberg <fabian.weissberg@tu-dortmund.de>
2021-09-05 22:27:16 +02:00
bunnie
858a1ed019 beginnings of a factory self-test routine; expand COM functionality 2021-09-05 23:26:07 +08:00
bunnie
c2afa2b09f fix runs index length that was not pulled in after gateware optimization 2021-08-30 00:30:44 +08:00
bunnie
c3fc3ff23f add bbram provisioning sequence 2021-08-19 04:22:28 +08:00
bunnie
498f530165 the base layer of the AES oracle is in place for the rootkeys 2021-08-17 04:15:24 +08:00
bunnie
8a82caf2fc intermediate check-in on rootkeys enclave 2021-08-16 23:35:36 +08:00
Sam Blenny
af25697a6f Merge remote-tracking branch 'upstream/main' into com-wlan 2021-08-13 23:01:12 +00:00
bunnie
1c447fabef Merge branch 'jtag-premerge' into main 2021-08-12 01:55:48 +08:00
bunnie
0234b4b22d add shellchat jtag debug commands 2021-08-11 06:15:23 +08:00
bunnie
35e7cfe89e jtag server now reporting ID 2021-08-10 22:46:00 +08:00
bunnie
bdd70f9502 stash to figure out build issue 2021-08-10 22:41:22 +08:00
bunnie
5113df5eec Merge branch 'bunnie-dev' into main
Use a RefCell to solve the interior mutability issue introduced
by the &mut check introduced on MemoryRanges.
2021-08-10 18:13:33 +08:00
bunnie
04dc6a4c2b refactor engine-sha512 to be named sha2
this makes patch.crates-io much easier to debug, we now
have the hardware hasher working in all the places i expect it to.
2021-08-09 04:40:33 +08:00
bunnie
bc6ec8caf4 initial key provisioning demo working 2021-08-07 22:21:49 +08:00
Sam Blenny
8baccc0063 Remove dead code for ip shellchat command
This stuff was left over from an old idea that I didn't implement.

Signed-off-by: samblenny
2021-08-06 10:02:30 +00:00
Sean Cross
75fbf173a9 services: fix mutable references via as_slice_mut
The function `as_slice_mut()` takes a `MemoryRange` and returns a
mutable slice. Previously, this could be called on a memory range that
was not defined as `mut`.

This will be fixed in `xous-rs` so that `as_slice_mut()` can only be
called on a region that is defined as `mut`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-05 16:55:53 +08:00
bunnie
8b83fb7c65 remove heapless, go to libstd for all collections!!!!
*fistpump*
2021-08-04 01:25:32 +08:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
bunnie
2714c9eb13 link in some READMEs so that rustdoc pulls them in
also add some bread crumbs on the more user-facing APIs to
help beginners out. Need to do a good spring cleaning of the
rustdoc tree, though. looks pretty terrible as it is.
2021-08-01 16:08:27 +08:00
bunnie
d7d052b6ff refactor ux flow, now on a good footing 2021-07-31 03:27:16 +08:00
bunnie
86a5c34a5b refactor root-keys to use the latest UX features
UX flow for requesting passwords is now more or less complete...

this yak is shaved?
2021-07-29 03:30:03 +08:00
bunnie
8cdf3c148b clean up warnings before merge to main 2021-07-28 23:58:15 +08:00
bunnie
9ae5feab78 refactor to add helper threads to the UX format; documentation 2021-07-28 17:35:25 +08:00
bunnie
4affdabc73 password modal box now nominally works 2021-07-27 17:30:37 +08:00
bunnie
53f35f9928 intermediate work toward getting the password box going
lots of changes, maybe finally getting out of the UX rathole now
that basic localization is in place
2021-07-26 00:51:22 +08:00
Sam Blenny
5c93365acd implement COM bus txrx for wlan commands
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
803f6d496f fix passphrase length limit to match WF200 API
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
03ad8bd2e4 add support for wlan commands to com server
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
2bbb8d05b9 add ip shellchat command
This is for testing out the IP stack: list dhcp info, send pings,
send UDP message, and receive UDP message.

Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
e8bdf91cc3 add wlan shell command
This is for turning the WF200 wifi radio on and off, setting the
SSID and password, joining an AP, leaving an AP, and checking the
AP connection status.

Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
bunnie
e362e2579f un-break hosted mode 2021-07-18 18:29:24 +08:00
bunnie
d98f296499 fixed ordering bug in spinor driver
works now!
2021-07-18 18:02:46 +08:00
bunnie
91fe69ca27 add some real-hardware tests for spinor writes
definitely still bugs.

need to sleep on it.
2021-07-18 02:36:31 +08:00
bunnie
8045e0aac8 add the keys command
this is the beginning of where key management goes. for now,
all you can do is just turn USB debug on and off.
2021-07-13 00:47:05 +08:00
bunnie
a4f8346c34 reflect the latest fixes to the secure boot process
also patch up some issues with sha512 reset and loose
ends on docs and updates
2021-07-13 00:46:31 +08:00
bunnie
1949c1bbc9 a semblance of sanity, finally 2021-07-09 23:01:50 +08:00
bunnie
d846c5ad0e add a memory stress tester 2021-07-06 01:35:19 +08:00
bunnie
6c697de512 add l2 cache support (suspend/resume flushing)
also noted some performance benchmark improvements
2021-07-05 17:05:10 +08:00
bunnie
00be94d913 devboot mode support 2021-07-03 21:08:39 +08:00
bunnie
674faa46d9 button up after debugging the ed25519 issue 2021-06-29 23:46:15 +08:00
bunnie
0bad1ad755 isolate a potential compiler bug 2021-06-29 00:10:46 +08:00
bunnie
8da62390ad add RFC7748 test vectors for diffie hellman 2021-06-28 19:01:22 +08:00
bunnie
e01676d563 move the montgomery multiply code into the engine server
this saves a fairly substantial amount of time marshalling
re-used bits of microcode around on the benchmarks.
2021-06-28 18:41:34 +08:00
bunnie
ee87fd35a8 add hw acceleration for the affine transform on curve25519 2021-06-28 04:43:56 +08:00
bunnie
89b3875bfc commit before working on acceleration code 2021-06-28 02:33:32 +08:00
bunnie
0563bfb8ad remove local paths so we can push to CI 2021-06-28 01:32:17 +08:00
bunnie
e2ada8f8fe attempt to fix up some build system warts 2021-06-28 01:31:43 +08:00
bunnie
5ab0c0b426 commit a version that should be able to build in CI now 2021-06-27 03:14:50 +08:00
bunnie
e39c2200cd fix up the build system warts & integration with dalek crates
we are at least now only requiring users to use our patched
curve25519-dalek crate, which now builds cleanly in both
xous and std environments, but the higher-level crates can be
directly used from crates.io
2021-06-27 03:07:39 +08:00
bunnie
6efdb7e0db stash a version with XousEngine25519 traits in case we want it back later 2021-06-27 00:31:15 +08:00
bunnie
9ebd181694 engine25519 core services now working 2021-06-25 19:35:31 +08:00
bunnie
f7874aab94 add in a missing redraw command 2021-06-25 03:38:54 +08:00
bunnie
75dca6bd4c checkin for a rollback to sanity check some things 2021-06-25 02:09:42 +08:00
bunnie
afa55055ea add serial console mux setting 2021-06-24 13:52:44 +08:00
bunnie
3b0a4f2bf4 clean up some obvious bugs
stuff doesn't crash but also doesn't work
2021-06-24 03:38:32 +08:00
bunnie
ae25142acb engine25519 doesn't crash on boot, at least.
ManagedMemory structure for susres has some issues with large
blocks, so use "heap-allocated" structures
2021-06-24 03:17:32 +08:00
bunnie
96959bfe0d add version reporting to boot log 2021-06-21 22:18:39 +08:00
bunnie
69a22adee9 menus basically working 2021-06-19 00:25:18 +08:00
bunnie
0f937037e4 just getting to the point of implementing defacement
menu now pops up. does nothing, but we can at least
change contexts for the Ux into a different Ux theme.
2021-06-18 16:20:56 +08:00
bunnie
62c9737bbc tenuous addition of a menu object
things don't crash, but...haven't really validated if they work, either!
2021-06-18 04:10:41 +08:00
bunnie
3664ff6718 clean up keyboard event handling so the GAM is the gateway server
this allows the GAM to handle authentication for listening requests.
2021-06-17 01:12:25 +08:00
bunnie
356b07dacc works on "real hardware" but some issues with hosted mode 2021-06-16 17:03:28 +08:00
bunnie
5301f4af20 major refactor of the Ux -- can create, redirect I/O contexts
getting ready for Precursor to do more than just one thing.
2021-06-16 04:50:26 +08:00
bunnie
eee9f4e765 refactor xous-names to permit only a fixed number of connections
this prevents less trusted processes from connecting to servers
after the kernel initializations are done.

this works so long as we don't have disconnects from the kernel
servers. In order to support disconnects we will also need a
way to re-enumerate the SID to guarantee that we don't have a re-use
problem. But for now, the kernel is not designed with any practical
disconnect mechanism; there is no code that calls the Quit mechanism
on any server.
2021-06-15 17:41:14 +08:00
bunnie
a70b858812 convert to using the urandom interface 2021-06-11 16:29:25 +08:00
bunnie
abbd1574e5 add trng test and management commands 2021-06-08 21:29:23 +08:00
bunnie
b64d610d69 re-org the vex code a bit so it's not as repetative 2021-06-04 02:16:19 +08:00
bunnie
5a153d8fa9 add AES256 vex instructions support 2021-06-04 02:02:44 +08:00
bunnie
b1d027bc52 adding AES native instruction support 2021-06-04 00:49:34 +08:00
bunnie
fadc9c29ab Merge remote-tracking branch 'origin/master' into bunnie-dev 2021-06-02 03:59:25 +08:00
bunnie
b9f3182bb9 mods for hosted mode to work again 2021-06-02 03:45:15 +08:00
bunnie
ee2e38be05 add commands to help manage wfi/power debugging 2021-06-01 17:02:30 +08:00
bunnie
9f3647f3a3 have audio off by default on power-on to save power 2021-06-01 00:44:33 +08:00
bunnie
52c32cc4d1 auto-powerdown of sha block when not in use 2021-05-30 00:12:18 +08:00
bunnie
25a77ddb19 EC updating seems to work. 2021-05-25 05:13:20 +08:00
bunnie
c483581716 debugging some timing issues 2021-05-25 02:53:24 +08:00
bunnie
7529628053 partial progress on EC updater 2021-05-24 04:34:50 +08:00
bunnie
58edcc56f2 sha512 tests fully implemented, working through sus/res
note: sha512 will fail if a suspend is forced upon it!! but
it will vociferously complain if this happens.
2021-05-21 15:56:58 +08:00
bunnie
5526bc4100 add hardware support for sha512/256 2021-05-21 04:35:01 +08:00
bunnie
21a5ddb40f sha512 hardware acceleration is working, now benchmarking
also need to extend hw implementation to sha512/256
2021-05-21 03:15:13 +08:00
Sean Cross
eb7895d601 xous: add a return code to TerminateProcess
As part of this refactor, make `terminate_process()` a divergent call.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
bunnie
3f12b0a69b add a gyro test command to shellchat 2021-05-16 16:52:27 +08:00
bunnie
87b6d9b6d7 add backlight commands 2021-05-16 04:29:12 +08:00
bunnie
08a86749fe fix hosted mode bugs 2021-05-09 01:13:16 +08:00
bunnie
a8a35fa434 roll back heapless crate on ime-frontend 2021-05-08 23:55:08 +08:00
bunnie
391122823d refactor heapless version in attempt to debug issue that cropped up in xous-names
somehow, updating the toolchain has broken the FnvIndexMap implementation
2021-05-08 18:44:23 +08:00
bunnie
b904a114fe this commit crashes on boot 2021-05-08 16:40:44 +08:00
bunnie
7f7bdbff88 this will play the long sample. and it works! :) 2021-05-08 03:41:04 +08:00
bunnie
15fc4a6c36 audio working, trying out longer samples 2021-05-08 03:14:14 +08:00
bunnie
fe6b417643 checkpoint 2021-05-08 01:13:30 +08:00
bunnie
46fa8fa01e extend shellchat to allow for multiple callback registrations 2021-05-07 16:22:06 +08:00
bunnie
b3a60faec2 audio checkpoint 2021-05-07 15:09:51 +08:00
bunnie
7dd66a4c18 playback is mostly working and stable 2021-05-07 05:42:39 +08:00
bunnie
bc82dbd157 transition i2c api on codec, finally found the damn race condition 2021-05-06 05:05:17 +08:00
bunnie
b596c40dd6 refactor I2C to have work queue, cleaner (but untested) APIs 2021-05-06 03:40:04 +08:00
bunnie
bb5bc1d212 refactor i2c to break out the i2c machine to a separate server
the concurrency issues on I2C are getting hairy, and it was probably a
dubious decision from the start to merge I2C into the LLIO block; but
originally this was motivated by the idea of keeping all the
"miscellaneous slow stuff" in one process to keep the memory footprint
small and make code a bit more readable.

Keeping I2C in the same process space as the LLIO but splitting it
into its own thread and server splits the difference, by giving us
more options to deal with the concurrency, without inflating the size
of the kernel binary and allocating a lot of extra static data.
2021-05-06 00:45:14 +08:00
bunnie
d17ae106f1 kernel panic on memory lend 2021-05-05 00:58:48 +08:00
bunnie
61611caddd some general ideas to debug later 2021-05-04 02:47:03 +08:00
bunnie
f8979d6341 intermediate progress on audio. doesn't compile. 2021-05-04 02:22:35 +08:00
bunnie
0ca2f58c6e add a note to indicate if we're in cold sleep
it's not terribly aesthetic right now, but we can fix that later.
2021-05-02 03:36:54 +08:00
bunnie
b17753ce8b retrofit the rest of the servers for suspend/resume
we can now do suspend/resume in the xous chat!
2021-05-02 01:38:44 +08:00
bunnie
760b45be38 add some version commands 2021-04-26 09:24:43 +08:00
bunnie
061284ec5f debugging BOOST mode glitch issue
Here's an arcane bug for you:

When powering down, the Spartan 7 3.3V I/O drivers will
output a roughly 800us wide glitch as 3.3V falls below around
1.7V, if the 0.95V core voltage comes down first (which it does
because we have an active discharge on 0.95V, but not on 3.3V).

In this case, it's just wide and high enough to cause the
BOOST mode line to engage, which takes the BOOST output
and ties it to VBUS, which is just enough for the system to
think you're powering it back on again. Which is not what
you want when powering down.

The ultimate fix was to put a heftier pull-down on the BOOST
line so that it can't trip the BOOST output into the VBUS.
Another option could be more active discharge FETs, but that
would require a full board spin and we are already at certification,
so we'll stick with the stronger pull-down on BOOST. It seems to
be a robust fix in the worst corner cases we can find.

The downside is that when powering an external USB device,
you are burning an extra 30mW of power overcoming the pull-down,
but typically, any external USB devices plugged into Precursor
will burn far in excess of that, so the delta should be negligible.
2021-04-23 15:33:14 +08:00
bunnie
f97b61a788 add the killbounce command 2021-04-23 01:49:03 +08:00
bunnie
52a9116edb add various sleep/ship/kill/coldboot commands 2021-04-22 18:08:19 +08:00
bunnie
b85650f5a6 minor tweaks to SSID scan and FCC infra
-fix help string in FCC
-try resetting SSID scan state machine after sleep cycle & timeout
2021-04-18 13:38:42 +08:00
bunnie
53f3ca20f0 add SSID scanning 2021-04-16 23:58:30 +08:00
bunnie
b2c0608b0b initial cut at SSID scanning 2021-04-16 23:07:31 +08:00
bunnie
bda82246cf fix typos 2021-04-16 23:07:16 +08:00
bunnie
459026983c minor formatting issue 2021-04-16 23:06:49 +08:00
bunnie
22d676cc59 add reporting of sleep current 2021-04-16 19:58:05 +08:00
bunnie
809f0445e1 add vibe command 2021-04-16 19:27:48 +08:00
bunnie
024a072a7c absorb WDT fix to eliminate a race condition 2021-04-15 18:40:00 +08:00
bunnie
24ae5686c8 closing in on a final PDS set 2021-04-15 13:44:32 +08:00
bunnie
11ad8e4824 finalize FCC test files 2021-04-15 05:49:01 +08:00
bunnie
93400df67c an initial cut at fcc test commands 2021-04-15 04:10:47 +08:00
bunnie
9f4dc8a7b1 add wifi reset opcodes 2021-04-14 22:43:23 +08:00
bunnie
75295485a7 fix RTC callbacks 2021-04-14 02:58:22 +08:00
bunnie
f1d97fe428 RTC cmdline function mostly working
seems there is some issue with de-registering/disconnecting
connections though, need to make simpler test cases to diagnose
2021-04-10 01:01:51 +08:00
bunnie
4957effe9c fix up callbacks 2021-04-09 18:56:44 +08:00
bunnie
8b93dd0c63 RTC server now basically working
There is an issue with the rtc commandline time checking
with respect to unhooking its callback, maybe related to
the new disconnect/destroy server code
2021-04-09 05:24:29 +08:00
bunnie
fbcb795693 this delta makes it work 2021-04-09 00:34:43 +08:00
bunnie
e7e10a0ec9 commit again for debugging 2021-04-09 00:29:53 +08:00
bunnie
856934c2c9 some progress, but check in to recreate previous crash 2021-04-09 00:15:42 +08:00
bunnie
a9de4782c5 crashing on load when logger is in callback 2021-04-08 23:07:02 +08:00
bunnie
0fa3d3c969 begin debugging of the RTC 2021-04-08 04:38:01 +08:00
bunnie
12bb5ee972
Update README.md 2021-04-07 00:59:25 +08:00
bunnie
39db5084ab
Update README.md 2021-04-07 00:58:28 +08:00
bunnie
ca349ec1b0 clean up minor bugs and other issues 2021-04-06 22:38:11 +08:00
bunnie
b9162fda3d gettin' there! major modules now mostly working under v0.8 2021-04-06 19:32:35 +08:00
bunnie
24e9408ce0 fix most of the inter-server bugs
still some issue with the predictions showing a longer length
than expected, but this is progress.
2021-04-06 02:48:55 +08:00
bunnie
8c12dbe2af found a bug. 2021-04-06 01:52:26 +08:00
bunnie
9ba2fb134c refactor most major modules, but Xous now crashes 2021-04-05 23:50:00 +08:00
bunnie
470b5c6440 finalize API refactor for xous-names 2021-03-30 02:13:23 +08:00
bunnie
e889765caf refactor the Ticktimer API. 2021-03-28 18:14:41 +08:00
Sean Cross
fdce58d06e ipc: convert project to use xous-ipc
This rewrites the entire project so that most runnable projects now use
`xous-ipc` instead of `xous::String` where possible.

This also removes `rkyv` from the list of dependencies in `xous-rs`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 20:22:33 +08:00
Sean Cross
006101835e services: shellchat: use create_thread_0
This replaces create_thread_simple() which is deprecated.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 13:15:16 +08:00
Sean Cross
e894dbd7b8 Merge branch 'fix-messages' 2021-03-23 21:58:11 +08:00
bunnie
184a284da5 sleep_ms() bug exhibitition 2021-03-18 17:34:48 +08:00
bunnie
dacedc3b74
Merge pull request #52 from betrusted-io/hardware
Refactor system to use rkyv 0.4.1
2021-03-18 04:56:32 +08:00
bunnie
9c49940e1d add callback test back into shellchat 2021-03-18 04:22:17 +08:00
bunnie
ea8b208a15 finalize rkyv 0.4.1 refactor 2021-03-18 03:54:48 +08:00
bunnie
8fbd900a4c Merge branch 'hardware-no-cb' into rkyv-refactor
Bring the two branches up to date, while also laying the groundwork
for XousServerName to be used as a native index type in xous-names
so we aren't burdening xous::String with a hasher
2021-03-17 16:06:06 +08:00
bunnie
eda33b5de7 factor out the shellchat callback, which mysterious breaks things 2021-03-16 18:03:12 +08:00
bunnie
d68e3e8cf4 an attempt to refactor to rkyv 0.4.1
unfortunately, it looks like deserialize requires an alloc??
2021-03-16 02:02:53 +08:00
bunnie
2f71f2a1f5 add/test facility for handling async callbacks from shell commands 2021-03-14 00:39:27 +08:00
bunnie
88dd44c0d6
Update README.md 2021-03-11 23:12:30 +08:00
bunnie
ded21973d4
Update README.md 2021-03-11 23:09:53 +08:00
bunnie
2957c3d99e fix errant dot from screenshot tool 2021-03-11 23:07:05 +08:00
bunnie
beb3e0fec6 add a screenshot of shellchat 2021-03-11 23:04:04 +08:00
bunnie
4006df3c4f add instructions on how to make commands 2021-03-11 22:54:24 +08:00
bunnie
ae418f5718 refactor shellchat API to have less repeated code 2021-03-11 22:31:38 +08:00
bunnie
443e4a1444 remove draw_order from TextView
We can't support this anyways, because the textviews are
immediately drawn on call by the calling app
2021-03-11 18:52:10 +08:00
bunnie
16d8438a0d turn off some debugging 2021-03-11 04:12:14 +08:00
bunnie
0dbfa6a668 clean up warnings 2021-03-11 04:09:47 +08:00
bunnie
4baaec61d2 add sensors command to read ADC values 2021-03-11 02:57:58 +08:00
bunnie
835bee2c75 lay in foundations to support the sleep function 2021-03-11 01:45:54 +08:00
bunnie
2b66ab1db0 refactor to put commands in static storage
so that state can actually persist across multiple calls
2021-03-11 01:45:02 +08:00
bunnie
9566355f9a refactor command API
should be a bit more convenient now to add/modify command
lists as time goes on
2021-03-10 22:59:52 +08:00
bunnie
e829c0bd06 add framework for modular commands
I am not happy with this. I think the framework could be better
but I also can't figure out how.
2021-03-10 04:18:57 +08:00
bunnie
a9a7ac435f add support for rounded rectangle text bubbles and dynamic sizing
this makes more more natural chat-style text bubble interactions
2021-03-10 00:25:14 +08:00
bunnie
07a9cbb02d initial structuring of the shellchat app 2021-03-09 04:31:51 +08:00
bunnie
b5411851fd rudimentary shellchat -- commit for help on debug Move message 2021-03-09 03:52:39 +08:00