Commit graph

2873 commits

Author SHA1 Message Date
bunnie
163f8a23ac add susres testing feature to the ticktimer-test-client 2024-01-06 16:39:35 +08:00
bunnie
de9af9cfd1 add std test templates to shellchat
some tests cherry-picked out of the `std` suite to help look
into locking problems in the kernel. Behind a feature gate
of `locktests`
2024-01-04 23:19:51 +08:00
bunnie
8ec08c9c76 fix rust v1.75.0 warnings that are probably benign
a lot of re-import warnings have cropped up. While I appreciate
their studiousness on this, the problem is that removing some
of these exports in the API crate could mean that future users
who want access to some API features that aren't used in this
configuration are now unaccessible.

I think it's not a huge problem at the moment, just spam-cleaning
the warnings because there are too many to deal with carefully
at the moment.
2024-01-04 19:15:28 +08:00
bunnie
0d80912f0a fix warning in 1.75.0; breaking change with earlier rust versions
This is unfortunate, and calling this out in a single commit because
this is a dubious decision to achieve warning-free code for such
a minor thing.
2024-01-04 19:13:20 +08:00
bunnie
f88cca4401 cleanup hosted mode implementation for xous-log 2024-01-04 18:31:16 +08:00
Sean Cross
061abb05db xous-log: stdout: insert \r when printing \n
When printing messages to stdout or stderr, insert `\r` whenever we
encounter `\n`.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-29 19:01:19 +08:00
Sean Cross
409b50b85e blitstr2: regenerate files after template changes
Regenerate the font files after adjusting the template to generate files
that will not get changed by rustfmt.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-27 14:13:16 +08:00
Sean Cross
22546710df blitstr2: codegen: generate rustfmt-compatible code
Generate code that can be put through rustfmt without being altered.
This removes an issue where the font tables can be rearraged by simply
running `rustfmt` on the repository.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-12-27 14:12:26 +08:00
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
bunnie
b6306ac8f4 add debug statements around i2c locking 2023-12-24 23:51:24 +08:00
bunnie
5a0461cb01 make menu building a bit more efficient by not locking when not necessary 2023-12-24 23:51:04 +08:00
bunnie
7e04357aba modernize codec debug 2023-12-24 23:50:50 +08:00
bunnie
8931f10383 work around boot instability issue with a delay setting up codec in TTS
The `codec` seems to hang sometimes during `Setup8kStereo` at boot.
Did not get to the bottom of it, but suspect that the RTC I2C init
sequence is interfering with the codec init sequence. This might
be resolved while also fixing #467, but for now, a short delay
on boot works around the problem.
2023-12-24 23:35:47 +08:00
bunnie
23a9b0cc34 add more helpful debug output for token claim failure 2023-12-24 22:14:39 +08:00
bunnie
f9cf822efb fix #466
reverts pin to the published version on crates.io for smoltcp
2023-12-24 12:11:18 +08:00
bunnie
aaa52ca02c fix warning in en-tts build 2023-12-23 23:50:57 +08:00
bunnie
9c2523ded4 fix #227 2023-12-22 22:20:55 +08:00
bunnie
46588a418c pin smoltcp to a local fork
we need to tag out a release, so we're temporarily forking
`smoltcp` at its current head, testing it, and holding it
there until a full release is tagged out that captures all
of the good stuff that has been going on in that repo since
June.
2023-12-22 22:04:07 +08:00
bunnie
4917d16a02 add some notes about debugging smoltcp 2023-12-22 09:39:11 +08:00
bunnie
85def0adc5 don't block on connection manager
refactor CM routines so if the CM is hung it won't block the net
main thread.
2023-12-22 09:38:43 +08:00
bunnie
fcd7bc9bb8 allow pump to be falliable
attempt to reduce blocking in net path
2023-12-22 09:36:17 +08:00
nworbnhoj
7a75bf73e3
make net ws more robust to test websocket server connection failure 2023-12-12 16:12:22 +11:00
bunnie
fe2eb732a0 add a test for std seek 2023-12-10 12:54:06 +08:00
bunnie
2a521b5b86 fix stdseek to match std word ordering 2023-12-10 12:53:50 +08:00
bunnie
e0e908dbf4 fix utctimems to match std 2023-12-10 12:53:39 +08:00
bunnie
0a0ac292c3 modernize opcode debug on PDDB 2023-12-07 18:41:51 +08:00
bunnie
d9b8fe686d on second thought, no need to check if tz is 0
any time setting would have a non-zero utc offset since the hw
RTC starts near epoch. it is sufficient to just check for that.
2023-12-07 10:01:58 +08:00
bunnie
a36545073d fix #459
This is an error in the "unset time" validator -- should be an &&
statement instead of an || in checking for an unit'd state.
2023-12-07 02:15:25 +08:00
bunnie
9ab66eea80 change error message that's more of a warning 2023-12-07 02:15:05 +08:00
bunnie
7da070f37c fix #460 - prevent PDDB mount dialog from popping up during updates
check the newly-minted EC ready bit prior to running the PDDB mount
handler.
2023-12-07 01:31:06 +08:00
bunnie
6c39534a7b mark the EC as ready at the conclusion of all update activity
by marking the EC as ready after all the update checks are done
we can ensure that the PDDB mount dialog does not attempt to come
up during an EC update.
2023-12-07 01:30:33 +08:00
bunnie
5bff1f6c46 add routines to set/get EC readiness
The nominal purpose of this is to allow other services to delay
interactions that could interfere with an EC update.

Note that anyone could call this routine and mark the EC as not
ready, since the llio block is not secured and the API is public.

I don't think it's a security problem, but is a DoS vector.
2023-12-07 01:29:05 +08:00
bunnie
5aff0f2413 cleanup doc comment errors 2023-12-01 22:08:34 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
nworbnhoj
e8e875742e replace more TcpStream::connect(&str) with TcpStream::connect((&str, u16))
resolves #453
2023-11-30 20:29:15 +11:00
bunnie
367ede62b1 convert usbd-human-interface-device to xous-usb-hid 2023-11-16 17:27:00 +08:00
bunnie
419e547641 bump usbd-hid-device crate to latest
API changes to see if we want to absorb this prior to forking.
2023-11-12 00:02:07 +08:00
bunnie
4f75cd76a8 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-11-11 23:13:19 +08:00
bunnie
5ad6106daf fix missing arg on unsafe-app-loading 2023-11-11 23:12:51 +08:00
bunnie
d4624124c9
Merge pull request #443 from betrusted-io/chat-status
WIP: Chat status
2023-11-03 13:54:34 +08:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
f1cd3a4325
Merge pull request #439 from vihaanjim/main
An App Loader
2023-10-31 19:56:45 +08:00
bunnie
699372d8d3 add hashmarks to the status bar when a new name is registered
we can't guarantee that we're running only signed code at this point,
so create a visual indicator of this.
2023-10-31 00:42:25 +08:00
bunnie
c346485832 isolate unsafe app loading features behind unsafe-app-loading feature gate 2023-10-31 00:18:42 +08:00
bunnie
ae7ee770ee expose the GAM minimum redraw period
this could be useful for functions that have to rapidly
toggle events on the screen and want to make sure that
the last event actually is rendered.
2023-10-29 23:02:44 +08:00
bunnie
cdada99705 miss copy-back of the animation state 2023-10-29 19:14:57 +08:00
bunnie
4423339059 move wifi delay hook to the correct area
- remove modal pop-up for wifi connection, and replace with
busy animation
- specify units of delay in the constants (_MS to indicate milliseconds;
this is a convention I'm trying to adhere to)
- partial progress on debugging why the animation isn't running
(value of animation variable is not being passed back at the GAM layer).

Also a general note on coding styles that probably is going to cause
confusion now that more people are contributing to the code base.

Generally, when a lot of "generic" library functions fail, we've been
passing an error message up the stack. However, these functions are
actually meant to be infalliable, and when you kick the error up the
stack you just end up with a panic at an unhelpful location (because
you finally catch the error only at the main loop or something and
by that point there's nothing you can really do about it but panic,
since it's supposed to be an infalliable operation).

As a result I have been trying to tamp down on needless error propagations
and having them fail with a unwrap or expect at the point where the
abstraction should be infalliable. This helps in debugging the actual
failure root cause because you're closer to the line of code that
actually broke, instead of just some line at a generic error handler.

Of course if you build with stack unwinding the top-level unwraps are more
useful because you can peer down into the call chain, but even then,
with the limited screen real estate I think deeply nested failures
would probably overflow any panic display. So even with panic unwinding
I think we stil want to keep the root cause within a few stack frames,
instead of errors being passed up sixteen levels of abstraction before
finally dying.

This only applies to things that are meant to be truly infalliable,
like syscalls that should not fail, or like unpacking a buffer or
memory message that has already been allocated. In this case the errors
are more like asserts, and are helpful if they fail at the line where
they break instead of being passed up the call stack (which was the
original architecture).

Probably I should add a note about this to the Xous Book.
2023-10-29 16:33:03 +08:00
bunnie
d844c4306c reduce size of chat status bar to match status bars above 2023-10-28 22:50:23 +08:00
bunnie
8f549b3031 pick a more "happens to be aesthetic" setting for the XOR op defacing
XOR op should not be usable to create fake security boxes

but it also looks really ugly to have it defaced.

This small tweak makes the XOR function look decent for the initial
purpose of the function (chat status bar wait indicator).

Eventually, this will be a controversial decision, but I'll kick
that down the road.
2023-10-28 22:48:52 +08:00
bunnie
e2594a3000 fix visibility of default font 2023-10-20 00:39:03 +08:00