Commit graph

4007 commits

Author SHA1 Message Date
Sean Cross
e624c184cd ticktimer-server: rewrite sleep server as deadline
Use deadlines for sleep, rather than calculating the amount of remaining
time.

This keeps time consistent, because it means we don't have to
recalculate all sleeps whenever one expires.

It also allows us to take advantage of the hardware which will fire an
interrupt if we schedule a wakeup in the past.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:41:30 +08:00
Sean Cross
89cf0c1ab1 ticktimer-server: run rustfmt on Cargo.toml
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 21:37:52 +08:00
Sean Cross
91647592ca kernel-test: implement sleep test
This patch implements a simple sleep test.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-23 19:53:54 +08:00
Sean Cross
751dc8ee3a kernel-test: add test for ticktimer-server
This test is an attempt to fix `sleep_ms()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-18 20:10:58 +08:00
bunnie
184a284da5 sleep_ms() bug exhibitition 2021-03-18 17:34:48 +08:00
bunnie
6677d79834 initial RTC framework 2021-03-18 16:22:08 +08:00
bunnie
db5e56fd1a futzing with structures to try and figure out a threading issue 2021-03-18 16:21:43 +08:00
bunnie
ca07645dce remove loop polling on GAM, seems unecessary 2021-03-18 16:21:10 +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
2d5c1dd6db leverage min_const_generics and cleanup
the spoils of a hard fought battle to refactor to rkyv 0.4.1
2021-03-18 04:00:38 +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
edb099d3f2 fix hosted mode with dummy i2c emulation calls 2021-03-16 19:28:01 +08:00
bunnie
eda33b5de7 factor out the shellchat callback, which mysterious breaks things 2021-03-16 18:03:12 +08:00
bunnie
d74b3189e6 it builds, at least. 2021-03-16 16:37:38 +08:00
bunnie
8b8cad067c add the i2c file proper 2021-03-16 15:52:30 +08:00
bunnie
eff3e7d7bf incremental i2c changes 2021-03-16 15:52:13 +08:00
bunnie
f9439b48d6 checking in a refactor that we're going to abort 2021-03-16 12:27:29 +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
ab1b839900 checkpoint before figuring out how to deal with the String rkyv version issue... 2021-03-16 00:11:23 +08:00
bunnie
be38661a1e half-baked i2c stuff, but about to tear a bunch of it out 2021-03-15 14:58:48 +08:00
bunnie
2f71f2a1f5 add/test facility for handling async callbacks from shell commands 2021-03-14 00:39:27 +08:00
bunnie
6d2697667b
Merge pull request #51 from betrusted-io/hardware
Merge xobs changes to make typing much easier
2021-03-13 18:20:39 +08:00
bunnie
0950467a37 Merge branch 'hardware' of https://github.com/betrusted-io/xous-core into hardware 2021-03-13 18:15:37 +08:00
bunnie
5c1940a019 change the name of the window 2021-03-13 18:15:30 +08:00
Sean Cross
14c9d62046 gam: make sure opcodes are only available in-crate
This prevents them from accidentally being used outside of the crate.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-13 18:05:33 +08:00
Sean Cross
e1890b1717 graphics-server: buffer keypresses
Buffer keypresses so that keys are not lost. This improves
responsiveness, although there are still kernel plumbing issues.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-13 18:01:12 +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
685f36af41 commit that shows the bug fixed 2021-03-11 22:35:57 +08:00
bunnie
307df04e8b a commit that exhibits the string bug 2021-03-11 22:33:57 +08:00
bunnie
d2ef03b7e2 intermediate commit to try and lock in a bug 2021-03-11 22:32:05 +08:00
bunnie
ae418f5718 refactor shellchat API to have less repeated code 2021-03-11 22:31:38 +08:00
bunnie
e84845553e Merge branch 'hardware' of github.com:betrusted-io/xous-core into hardware 2021-03-11 18:53:53 +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
d24a8a67b5
Update README.md 2021-03-11 18:49:30 +08:00
bunnie
b8dfa1ddcb
Update README.md 2021-03-11 18:28:38 +08:00
bunnie
54cf95aec1 turn off more debugging for demo 2021-03-11 04:43:58 +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
7db6f857dd change boot screen to be more informative 2021-03-11 04:09:35 +08:00
bunnie
0f0ab91879 fix margin on uptime 2021-03-11 04:09:12 +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
812d334a01 fix unnecessarily long server name
xous server names are 64 characters long, not 256.

maybe should refactor to just eliminate the xous server name
structure -- it's actually redundant, and a vestige from when
we were just figuring out how to use rkyv.
2021-03-10 23:30: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
fbcb991e06 turn of debugging 2021-03-10 02:08:37 +08:00
bunnie
3e5936e920 fix backspace edge case 2021-03-10 02:05:31 +08:00
bunnie
63159e50db wire up some function keys in hosted mode, add some fun glyphs for testing 2021-03-10 01:58:38 +08:00
bunnie
9a455051bf forgot to do dynamic updates of the predictor
that'll be handy once we have a real IME
2021-03-10 01:50:50 +08:00
bunnie
ab277a6cdd fix less than one line check criteria 2021-03-10 01:36:40 +08:00
bunnie
44c1b66b8b fix border width arg 2021-03-10 01:25:36 +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
6d6d62f794 add an api for content canvas plugins
some calls are mandatory, such as supporting a redraw of the canvas
2021-03-10 00:24:29 +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
bunnie
d54b815653 add input listeners to get input lines.
next up: shellchat
2021-03-09 03:08:34 +08:00
bunnie
3cec151ffd fix prediction order 2021-03-09 02:47:25 +08:00
bunnie
7f7f30f23d make shell predictions only on newlines, for now 2021-03-09 02:33:10 +08:00
bunnie
71e45c4bf8 refactor redraw to be on-demand
seems to make the performance much better
2021-03-09 02:32:36 +08:00
bunnie
7d1fb5a31b ellipsis support and fixing prediction redraw bugs 2021-03-09 02:24:45 +08:00
bunnie
a4a96c9c56 add ellpsis support to textview 2021-03-09 02:23:49 +08:00
bunnie
c9e82c427e fix a bunch of minor bugs 2021-03-08 05:12:26 +08:00
bunnie
5dc537df05 fold in the predictor 2021-03-08 04:28:17 +08:00
bunnie
d5d8e0ee86 TIL you can't return variable-length strings in an rkyv
rkyv does some optimization to not send all the data in
a string if you don't use it up.

xous assumes the same "pos" argument on the return type

thus a variable length string doesn't work as a return type
(you can send it, because you can specify a "pos" on the send
side).

fortunately, the application for the variable-length string
was getting predictions out of the predictor, and a short (31 element)
fixed-length array with a side companion of a len variable
should be more than sufficient for completion suggestions.
2021-03-08 04:25:58 +08:00
bunnie
8a8c1e6a66 foundations for predictive text display 2021-03-08 00:57:50 +08:00
bunnie
33df36f841 make input text preview area grow dynamically as text gets too long 2021-03-07 18:58:48 +08:00
bunnie
f495b40fd8 insertion/deletion of text with back/forward buttons working now 2021-03-07 03:43:46 +08:00
bunnie
49d6018e5e new feature: backspace (*gasp* iknowrite?)
harder than it looks with utf8 and variable-width characters
2021-03-06 19:37:22 +08:00
bunnie
547dbbfe6b fix carriage return emulation and handling 2021-03-06 03:26:13 +08:00
bunnie
cb0686803e split out the background clear/redraw from the core loop 2021-03-06 02:45:47 +08:00
bunnie
00ada3ac3c clean up a debug message 2021-03-06 01:12:24 +08:00
bunnie
0cc1f9f5fb it doesn't look that impressive, but there's a lot of plumbing now. 2021-03-06 01:10:18 +08:00
bunnie
5d1fba4015 fix intersects algorithm
"duh"
2021-03-05 17:15:14 +08:00
bunnie
470abb3e7d fix rectangle intersection missing case 2021-03-05 00:56:22 +08:00
bunnie
5ea2a21d2d tighten up APIs, implement a very 0th-order input loop
this is where the debugging begins of the beginning of
the API. it's like finally finding the start of a roll
of clear tape.
2021-03-04 19:02:56 +08:00
bunnie
fff7c024ad prep to migrate API in git 2021-03-04 18:13:50 +08:00
bunnie
aa8c0e5792 a bit more deck shuffling on the APIs
feels a lot cleaner now.
2021-03-04 16:02:42 +08:00
bunnie
76684c89fc refactor the traits to have a default implementation
probably should be the *only* implementation because these are
only concerned with IPC calls that really require changes in
two separate crates, but I feel unconfident enough about the API
that for now I want the flexibility to experiment with non-default
APIs until I'm ready to freeze things.
2021-03-04 04:48:22 +08:00
bunnie
f565fdaf6f refactor API into a separate crate with traits 2021-03-04 04:33:20 +08:00
bunnie
92ca22c38c refactor IME plugin API into a common crate
This will allow other APIs to just include the API crate
to define all the gazintas and gozoutas.
2021-03-04 03:14:26 +08:00
bunnie
2b768e9b86 fix warnings in initial API 2021-03-03 23:27:30 +08:00
bunnie
e62256b3df clean up hosted mode warnings 2021-03-03 22:50:46 +08:00
bunnie
313f12acbb clean up warnings 2021-03-03 22:38:20 +08:00
bunnie
50b521266f Merge remote-tracking branch 'origin/hardware' into hardware 2021-03-03 22:09:57 +08:00
bunnie
b04e57f5a4 prepare for a merg 2021-03-03 22:09:45 +08:00
Sean Cross
0c6cb9135e services: add kernel-test
This was used to demonstrate the message passing bug.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-03 21:22:26 +08:00
bunnie
8f809c2a51 start layering in the IME front end and prediction APIs 2021-03-03 14:53:33 +08:00
bunnie
9804290854 add some primers to the status loop
this helps the screen-up time appear faster, so we aren't
waiting for a full poll interval for new data to appear before
the system apears to be powered on
2021-03-02 21:57:52 +08:00
bunnie
9a2bce24cb clean up timing and cosmetic issues on status updates 2021-03-02 21:47:23 +08:00
bunnie
4b0f50293f another intermediate commit 2021-03-02 21:15:40 +08:00
bunnie
96a19baa8d state before refactor of status to own process 2021-03-02 19:25:41 +08:00
bunnie
d1609d2a31 another commit checkpoint. somehow, i have a race condition now. 2021-03-01 15:08:08 +08:00
bunnie
70aa5b792b check in for inspection 2021-03-01 14:40:39 +08:00
bunnie
93a7567618 ticktimer prints its PID now 2021-03-01 13:46:02 +08:00
bunnie
4640dc404f make panic messages a bit more helpful 2021-03-01 13:45:36 +08:00
bunnie
5917ff4664 add object drawing to the GAM abstraction layer 2021-03-01 04:01:33 +08:00
bunnie
ce59bea2fa add function to extract canvas dimensions from GAM
gfx_conn should be exclusive from GAM to gfx_conn, so
need to refactor out all the errant calls that are
scattered about.
2021-03-01 02:33:13 +08:00
bunnie
bee1f796ee add rounded rectangle drawing 2021-03-01 01:49:22 +08:00
bunnie
1ee538cda8 clean up test hanzi characters now that we have the planes built in 2021-02-27 15:53:31 +08:00
bunnie
0c20f1dac1 add a test character for hanzi plane 2021-02-27 15:53:10 +08:00
bunnie
2795dc4d8a creepy Heapless bug cropping up again...this time u32s aren't being stored right 2021-02-27 15:52:40 +08:00
bunnie
838fa25bad get rid of the awful dummy arg hack and use #used directive to keep font maps in loader 2021-02-27 14:52:21 +08:00
bunnie
d7e1959fed disintegrated fonts working 2021-02-27 14:35:53 +08:00
bunnie
0dc40f4185 attempt to separate fontmaps and loader out of kernel 2021-02-27 02:12:19 +08:00
bunnie
463e2ad77d fixup GAM APIs to latest rkyv standard, fix drawable computation 2021-02-26 03:37:48 +08:00
bunnie
5b80b3fb42 get fcc-agent working again 2021-02-23 04:01:01 +08:00
bunnie
6528bc77d4 refactor GAM to use rkyv 2021-02-19 04:02:29 +08:00
bunnie
c5e6391e22 remove mention of Sendable and the ipc.rs module 2021-02-18 02:01:11 +08:00
bunnie
0af72ffb6d clean up Sendable references and warnings 2021-02-17 23:29:20 +08:00
Sean Cross
14f661f565 xous: remove id field from lend()
This argument is no longer used.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:54:08 +08:00
Sean Cross
aabd2d242d services: xous-names: remove buffer import from lib
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:53:33 +08:00
Sean Cross
05f27e4c0e services: xous-names: pass warning when write fails
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:53:09 +08:00
Sean Cross
6ecc25b7e0 services: keyboard: fix build warnings in lib
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:52:44 +08:00
Sean Cross
7d9fdb9c0d services: graphics: fix unused import warnings in op
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:52:23 +08:00
Sean Cross
f962be1f3c services: graphics: text: fix unused import warnings
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:51:59 +08:00
Sean Cross
5979556a2c services: com: fix warnings in lib
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:51:23 +08:00
Sean Cross
5d59fccbc0 services: graphics: fix warnings in lib
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:51:05 +08:00
Sean Cross
c4fb83b22f services: com: remove unused imports from main
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:50:12 +08:00
Sean Cross
c820573450 services: com: remove unused imports from api
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:47:07 +08:00
bunnie
b77827f2ed fix data type for hosted mode 2021-02-17 16:58:46 +08:00
bunnie
8646662804 commit checkpoint for xobs 2021-02-17 16:10:05 +08:00
bunnie
b803d7d4e9 commit that captures the multiple lend bug 2021-02-16 12:42:11 +08:00
bunnie
2b003f8a7d intermediate checkin 2021-02-16 00:28:44 +08:00
bunnie
07b3dd9afa add PID printout to every service as it starts 2021-02-15 19:16:21 +08:00
bunnie
af012c48dc getting a little further with the port, but still crashing on a borrow message 2021-02-15 04:42:30 +08:00
bunnie
fc8290cdb4 futzing around and something is kind of working on xous-string port to rkyv 2021-02-15 00:05:42 +08:00
bunnie
ed5cdabe40 port COM name registration to use rkyv instead of Sendable 2021-02-13 17:52:50 +08:00
bunnie
7e0902344c move XousBuffer to xous-rs 2021-02-13 01:42:31 +08:00
bunnie
05633604d1 remove duplicate buffer.rs file 2021-02-12 19:11:23 +08:00
bunnie
9f79367d1c Merge branch 'hardware-rkyv' into hardware 2021-02-12 01:56:50 +08:00
bunnie
6bbb3f9644 add note about where things got left off 2021-02-10 20:59:14 +08:00
Sean Cross
405469b637 benchmark-target: remove Lookup reference
This private API is no longer used.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:22:28 +08:00
Sean Cross
7d40c749f0 keyboard: remove internal xous_names API
This API is now private.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:13:25 +08:00
Sean Cross
704c0f47bf com: don't use internal xous_names register api
This API is now private.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:03:35 +08:00
Sean Cross
8ba7496f64 xous-names: use rkyv to pass messages
This is an experimental method of message passing to allow for mutable
structs.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:02:48 +08:00
Sean Cross
374e411b74 cargo: use resolver 2 to fix graphics issue
The graphics server has an issue where something upstream is activating
the "std" feature on "log", which prevents us from compiling anything
that includes the "log" crate. Which is everything.

Use resolver "2", which requires Rust 1.51 or newer.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:00:16 +08:00
Sean Cross
1e17d6402d services: benchmark-target: don't use private Lookup struct
Use a custom struct instead.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-04 10:34:22 +08:00
Sean Cross
3bd32389bf benchmark-target: don't use private Lookup field
This field was made private by the nameserver. Use a dummy structure
instead.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-04 10:32:58 +08:00
bunnie
9ad83d4873 a bunch for run-of-the-mill system functions in llio implemented 2021-01-28 04:03:30 +08:00
bunnie
7d3ef78f2a about halfway through the API implementation 2021-01-28 02:56:00 +08:00
bunnie
8ed37a0dcb add API framework for LLIO 2021-01-27 13:33:03 +08:00
bunnie
3cd175fb49 support one-off test images in xtask 2021-01-22 16:40:00 +08:00
bunnie
fb10311fbc run some benchmarks on hosted 2021-01-22 04:25:13 +08:00
bunnie
d235218ec3 this version of benchmark works. 2021-01-22 04:19:21 +08:00
bunnie
31e58c3337 add benchmarks. this commit exhibits a mysterious problem with Lookup API 2021-01-22 04:11:02 +08:00
bunnie
53dfda13bf test shell with the usize->u32 changes 2021-01-22 01:36:36 +08:00
bunnie
22ed00f0d8 refactor log-server to remove usize from sendable object 2021-01-22 01:34:36 +08:00
bunnie
da35ecc09c the great usize extinction event: xous-names
replace usize in repr(C) with u32 for xous-names
2021-01-22 00:41:25 +08:00
bunnie
0115f0f656 the great usize extinction event continues: keyboard
btw this is to eliminate "usize" primarily in `structs` that
are `repr(C)`. usize is ok in most other places.
2021-01-22 00:36:24 +08:00
bunnie
75cd321175 great usize extinction event - graphics-server 2021-01-22 00:33:49 +08:00
bunnie
87501444c5 the great usize extinction event: remove usize from blitstr 2021-01-22 00:27:45 +08:00
bunnie
2252d7b324 update README with link to project manager tool 2021-01-21 23:18:50 +08:00
bunnie
a58383209c fix log-server's type 2021-01-21 12:46:24 +08:00
bunnie
f1b25e1f1d add docs on servers 2021-01-21 03:57:52 +08:00
bunnie
cc6992c3df implement "imports" methodology
This commit simplifies managing git-repo hosted dependencies, so
there is a single location for changing the package path.
2021-01-20 16:22:38 +08:00
bunnie
9252455795 fix Gid passing issue to status thread 2021-01-20 14:57:40 +08:00
bunnie
53713baaa6 trying to debug why lend_mut() isn't working 2021-01-20 03:18:13 +08:00
bunnie
f247e557e8 now to the point of testing the general message flow in hosted mode 2021-01-19 18:58:57 +08:00
bunnie
54d299daf8 the other half of the previous commit 2021-01-19 17:10:52 +08:00
bunnie
757812423c refactor graphics-server api crate organization 2021-01-19 17:10:31 +08:00
bunnie
086a4da862 refactor TextView into graphics-server 2021-01-19 04:54:54 +08:00
bunnie
b72d2f2bb3 refactoring of interfaces 2021-01-19 00:05:33 +08:00
bunnie
73286828c8 more GAM API fleshing out; now to the point of updating a TextView 2021-01-18 04:12:40 +08:00
bunnie
01abbd4f47 more GAM API coming together 2021-01-17 21:58:02 +08:00
bunnie
5701bf4968 add debug attributes back in 2021-01-17 17:02:40 +08:00
bunnie
cc66c3911a starting to lay out initial framework for the graphical abstraction manager (GAM) 2021-01-17 04:02:08 +08:00
bunnie
72b8d6a3de add keyboard input emulation in hosted mode 2021-01-13 23:17:09 +08:00
bunnie
36cefdac3c fixes to get it working in hosted mode 2021-01-13 15:09:53 +08:00
bunnie
8a1991876f add basic TRNG service 2021-01-13 15:04:14 +08:00
bunnie
18fbd046f6 use git version of blitstr 2021-01-13 04:42:06 +08:00
bunnie
95cbf42cf2 refactor frame buffer to use double buffering 2021-01-13 04:39:04 +08:00
bunnie
2958858a3a refactor to use UTRA for control registers 2021-01-13 01:17:43 +08:00
bunnie
812fbf5d4f this patch fixes the previous commit's panic 2021-01-13 00:32:07 +08:00
bunnie
a404e4ae61 this panics with an alignment error (double string) issue #32 2021-01-13 00:27:12 +08:00
bunnie
c848d374c6 roll back the build time notice
Turns out the build time only seems to capture the last time
you managed to force a full rebuild (???). Even though cargo
indicates that a rebuild had happened of the main.rs, the environment
variable containing the time is not being updated, because the
build.rs file isn't being run. But! if you force a trigger of
that file, then cargo decides to rebuild *everything* which greatly
increases the build time, which is a drag for development.

So, just remove the build time notice. If it's not going to be
correct, better to not emit it than to be outright misleading...
2021-01-13 00:24:12 +08:00
bunnie
0a3c50f820 add build timestamping/versioning to the Xous log output 2021-01-12 23:30:52 +08:00
bunnie
2eafe825b8 refactor COM to use generic name registrations for event listeners 2021-01-12 18:44:02 +08:00
bunnie
cd4ea5ed17 make the run variant not break 2021-01-12 04:20:37 +08:00
bunnie
426c747f8f keyboard server basics seem working 2021-01-12 04:13:15 +08:00
bunnie
5cad631569 now it works! changing usize -> u8 did the trick. don't know why. spooky. 2021-01-12 02:08:20 +08:00
bunnie
6a3833ebc7 commit of mysterious tuple-vec problem 2021-01-12 01:37:52 +08:00
bunnie
aeadbfb1b5 fix up keyboard API to use scalars, add demo connection
also fix a bunch of other idiomatic weirdnesses
2021-01-12 00:00:57 +08:00
bunnie
f166073954 first draft of keyboard server 2021-01-11 06:11:15 +08:00
bunnie
a8d31cb7e2 update README and add xous-names into renode image 2021-01-09 02:23:01 +08:00
bunnie
ea78de8014 convert all services to use xous-names server 2021-01-09 02:12:01 +08:00
bunnie
4ef581a266 riddled with race conditions, but...sort of works 2021-01-08 05:20:53 +08:00
bunnie
ab6fa7ae1c another intermediate checkout 2021-01-07 22:30:26 +08:00
bunnie
95d4f03591 intermediate checkin 2021-01-07 21:53:08 +08:00
Sean Cross
6ccbacf65f loader: assign sections to process ownership
This ensures these addresses aren't re-used and handed out again by
memory allocation.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-07 20:33:21 +08:00
Sean Cross
147100fa38 graphics-server: minifb: use iterators for drawing the screen
This removes the bounds checks that were being performed, and goes for a
pure iterator approach.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-07 20:30:42 +08:00
bunnie
323c11f554 commit a version that exhausts the kernel allocation 2021-01-07 16:58:13 +08:00
bunnie
73c4be0457 upgrade name length to 64 characters 2021-01-05 16:53:19 +08:00
bunnie
0d869870ae this code works in hosted mode but fails on hardware 2021-01-05 15:48:51 +08:00
bunnie
ec675eefb4 cleanup warnings 2021-01-05 04:45:23 +08:00
bunnie
bdbe8f8288 intermediate checkin 2021-01-05 04:40:34 +08:00
bunnie
61409bb94c update README on xous-names, and refine the API a bit 2021-01-05 02:28:27 +08:00
bunnie
1075dff559 the name server itself 2021-01-04 23:34:36 +08:00
bunnie
cce89395f6 test framework for xous-names 2021-01-04 23:34:18 +08:00
bunnie
2beddd745e missed one merge conflict fix 2021-01-04 03:24:27 +08:00
bunnie
b7263f7ef0 Merge remote-tracking branch 'origin/master' into hardware 2021-01-04 03:19:23 +08:00
Sean Cross
7b50d00eb8 repo: run cargo fmt
This reformats line endings to be consistent, and reinforces the
contents of `.gitattributes`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-03 18:31:51 +08:00
bunnie
f2873e3514 some final notes for testing prep 2021-01-03 17:32:21 +08:00
bunnie
8336eb22f3 add notes on the agent 2021-01-03 17:26:17 +08:00
bunnie
1359db06f4 add repeat command for stand-alone emissions testing 2021-01-03 03:04:25 +08:00
bunnie
63234411e2 get fcc test working 2021-01-02 03:04:28 +08:00
bunnie
3ceb41208c checkpoint: problems with pds send line (borrowed memory) 2021-01-01 03:44:42 +08:00
bunnie
17156e483c check in a version that breaks 2021-01-01 00:50:13 +08:00
bunnie
534fb5373a intermediate checkin for sharing 2021-01-01 00:45:07 +08:00
bunnie
9d63d39cae add the agent itself 2020-12-31 19:31:30 +08:00
bunnie
b9a31f7d99 try to layer in the fcc agent 2020-12-31 19:31:12 +08:00
bunnie
3ab7c322d7 commit adjustment and testing tweaks 2020-12-21 02:33:22 +08:00
bunnie
957c065f41 push mods for modnoise eval etc. 2020-12-18 04:35:39 +08:00
bunnie
fdd474fa89 get the trng-tester server working 2020-12-15 22:37:06 +08:00
bunnie
8d36974a86 add trng-tester crate (just the beginning) 2020-12-14 23:30:58 +08:00
bunnie
c9a18125df add hardware TRNG support to kernel (issue #16) 2020-12-14 17:57:29 +08:00
bunnie
fdf3f6860a ugh fix more CI issues on "run" variant 2020-12-13 02:22:52 +08:00
bunnie
6b39946d31 fix git refs for push to master 2020-12-13 02:10:44 +08:00
bunnie
7488018e22 get wdt mods compiling into xtask run 2020-12-13 02:03:15 +08:00
bunnie
e1c4b702a9 add WDT support to xous-core 2020-12-13 01:54:25 +08:00
bunnie
95719852b3 Merge remote-tracking branch 'betrusted/master' into hardware 2020-12-12 12:58:06 +08:00
Sean Cross
25e4d16de3 xous-os: rename CreateServer to CreateServerWithAddress
Servers will, by default, get randomly-assigned SIDs. Certain servers
will want to have well-known SIDs, such as the log server or the
nameserver. These will use a separate call in order to perform this
priveledged operation.

A subsequent patch will add `CreateServer`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 20:33:33 +08:00
bunnie
bcb52f1a59 eliminate unused code 2020-12-03 23:58:26 +08:00
bunnie
fbf9d7a342 add some docs on the name server 2020-12-03 23:58:06 +08:00
bunnie
bd64323f36 revert to local repo for builds 2020-12-03 01:54:21 +08:00
bunnie
72ed8cd35d refer to pushed gitref for merge to main 2020-12-03 01:52:20 +08:00
bunnie
c0842517f6 major refactor of the graphics-server API
- remove redundant Rect/Rectangle implementations
- refactor Lines and Circles
- add DrawStyle to the message passing regimen
- depracate modal Styles; now every object has a DrawStyle shipped with it
- remove unused/redundant API calls
2020-12-03 01:48:10 +08:00
bunnie
cbf3ffa4a4 refer to the latest blitstr commit ref for public distribution 2020-11-28 02:08:15 +08:00
bunnie
5cd1bf7012 incorporate blitstr for string drawing 2020-11-28 02:05:55 +08:00
bunnie
c05153b5af add dirty bit set to put_pixel() 2020-11-27 17:21:31 +08:00
bunnie
2c3aef886c remove final vestiges of debug.rs, deprecate 4-uart support 2020-11-27 17:12:49 +08:00
bunnie
a129b48858 remove debug.rs from COM 2020-11-27 16:48:57 +08:00
Sean Cross
f04484abd9 shell: remove unused extra files
These files are leftover from a time when we didn't have the log server.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 14:13:21 +08:00
Sean Cross
684ba69a31 os_timer: move preemption from shell to ticktimer server
This is responsible for preemption in the system. Move it to the timer
server since it seems to make more sense to have there.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 14:13:21 +08:00
Sean Cross
513b99f916 ticktimer-server: remove debug module
This was leftover from before a time when we had the log server. It no
longer serves a need.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 14:00:19 +08:00
Sean Cross
fcb64a85d4 log-server: remove spurious print message
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 13:59:33 +08:00
Sean Cross
ff8cb19999 log-server: implement panic logging
This is now able to understand the panic log messages that are sent by
services that are in the procses of panicking.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 13:58:03 +08:00
Sean Cross
2e4b38a2f1 log-server: unconditionally enable logging
If users are including the `log-server` crate, then they probably want
logging regardless of what features are enabled.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 13:57:20 +08:00
Sean Cross
8e2faddd2f com_rs: use git protocol in Cargo.toml
Don't use git submodules, which can be confusing. Instead, use a git
repo in the Cargo.toml file.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-27 09:47:32 +08:00
bunnie
7ba75b14f9 add ability to render strings on multiple lines 2020-11-27 03:33:44 +08:00
bunnie
19a7a9ce98 get threaded version of COM handler working 2020-11-27 01:32:10 +08:00
bunnie
99d8f2a525 version with threads compiles, but doesn't work yet 2020-11-27 00:35:29 +08:00
bunnie
4ee7f67f82 commit the nonworking code for review 2020-11-26 00:39:15 +08:00
bunnie
b568d86153 get non-blocking gas gauge checking working 2020-11-25 23:06:57 +08:00
bunnie
62f8ce32f0 attempt a refactor to add non-blocking battery status checking
stuck at trying to receive messages in the main shell in a
non-blocking manner
2020-11-25 19:58:24 +08:00
bunnie
d583e20b18 very basic battery monitoring via COM 2020-11-25 05:11:32 +08:00
bunnie
058c4473bb helps to add the source code too 2020-11-24 22:45:44 +08:00
bunnie
fa12e513cd inital take at com 2020-11-24 22:45:10 +08:00
bunnie
bc832b3a50 fix interrupt pending clear issue in debug module
during conversion to documented interrupts from Litex a case was
missed.
2020-11-24 22:44:19 +08:00
Sean Cross
e7aa2c70a0 shell: use connect() instead of try_connect()
We don't need to use `try_connect()` anymore since we now have
`connect()` which will automatically retry as necessary.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 20:05:36 +08:00
Sean Cross
958fa96fde Merge branch 'master' of github.com:betrusted-io/xous-core 2020-11-23 19:32:31 +08:00
Sean Cross
0732075869 graphics-server: bounds-check the circle drawing
Otherwise we could overflow the buffer.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 19:31:52 +08:00
bunnie
1aa01fdf5d confirm sleep works, some minor fixup to UTRA style usage 2020-11-23 19:02:02 +08:00
Sean Cross
d5ba92a483 shell: re-enable msleep
Now that things work, we should be able to sleep.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:35:09 +08:00
Sean Cross
72a466bc61 ticktimer: use interrupt from UTRA
Previously UTRA didn't have an interrupt, so we just made one up. Use
the correct interrupt to get things working on hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:34:18 +08:00
Sean Cross
5c89487ca2 shell: fix const debug warnings on 1.48
This fixes a bunch of warnings that appeared with Rust 1.48.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:21:24 +08:00
Sean Cross
12532e1734 log-server: fix const warnings on rust 1.48
Rust 1.48 changed how warnings of const values operate.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:21:03 +08:00
Sean Cross
78a47ab4ba services: ticktimer: fix debug warnings on hardware
These appeared in Rust 1.48.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 16:13:19 +08:00
Sean Cross
6c17531512 Merge branch 'master' of github.com:betrusted-io/xous-core 2020-11-23 16:03:57 +08:00
bunnie
d26c80582e clean up gfx server API, allow for string size setting 2020-11-23 15:42:58 +08:00
bunnie
41d7f2a0e5 add ScreenSize message, add hanzi test to boot screen 2020-11-23 14:55:56 +08:00
Sean Cross
be1687ffdd Merge branch 'master' of github.com:betrusted-io/xous-core 2020-11-23 14:20:27 +08:00
bunnie
48720dc6a7 right, comment out the offending line 2020-11-23 03:52:40 +08:00
bunnie
a2670a7537 minor tweaks to improve the rendering of the bouncyball 2020-11-23 03:49:09 +08:00
bunnie
2d5bd20c16 bouncing ball "招财猫"-like totem now working 2020-11-23 03:18:43 +08:00
bunnie
16e9f43015 add circle drawing to graphics 2020-11-23 00:40:40 +08:00
bunnie
710abce418 fixup to latest soc.svd register documentation standard 2020-11-22 03:45:44 +08:00
Sean Cross
796c9c5998 services: ticktimer: remove excess hosted printing
This was used to try and debug an issue in the ticktimer server, which
ended up being an issue in the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 16:23:23 +08:00
Sean Cross
d9272ba21a ticktimer: use log server
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 16:09:34 +08:00
Sean Cross
aa315c534c ticktimer: implement msleep
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 16:09:01 +08:00
Sean Cross
5a66f72938 ticktimer: add opcodes for msleep
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 16:08:48 +08:00
Sean Cross
b8f69b4a7f ticktimer: use correct debug port
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 16:07:33 +08:00
Sean Cross
1a0be47d05 shell: add loop number to msleep
This allows us to trace the loop number through the syscall.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-11 16:06:39 +08:00
Sean Cross
7391b98f4e log-server: remove excess printing from log string
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-01 16:30:07 +08:00
Sean Cross
719549a2cb xous: rename ReturnToParentI -> ReturnToParent
This syscall isn't the only one that can be called from an interrupt
context.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-01 16:26:19 +08:00
Sean Cross
4f2be0c0e1 shell: use log-server for message logging
This paves the way for no longer needing our own UART for this process.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 21:27:35 +08:00
Sean Cross
1ffc440565 graphics-server: use log-server for all message printing
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 21:27:06 +08:00
Sean Cross
e18219b078 log-server: add first draft of logging server
This server implements `log`, and comes with a `lib` that allows for
setting up logging.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 21:26:19 +08:00
Sean Cross
f46f7c6e81 shell: use new String struct from xous
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 11:19:43 +08:00
Sean Cross
9192775e5e graphics-server: use String for String opcode
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 11:19:17 +08:00
Sean Cross
c33794c859 shell: use new graphics subsystem
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:30:34 +08:00
Sean Cross
7fc8dafc39 shell: add StringBuffer struct
Add a StringBuffer struct that can be used to create string messages.

This will eventually be promoted to Xous.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:29:58 +08:00
Sean Cross
2d4a2bf871 ticktimer: use millis instead of nanos on hosted
The `elapsed_ms()` function should probably return milliseconds rather
than nanoseconds. Time marches on.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:29:12 +08:00
Sean Cross
c7164c461d log-server: unify print messages for log_string
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:28:01 +08:00
Sean Cross
5823c23472 log-server: unify log messages
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:27:13 +08:00
Sean Cross
d9f858bcf0 log-server: remove pancurses dependency
This hasn't been required in a very long time.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:26:16 +08:00
Sean Cross
af1a7f5ba5 graphics-server: first general merge of gfxlib
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:22:03 +08:00
Sean Cross
7607b0f9ee graphics-server: remove embedded-graphics from backends
Use native drawing for these platforms.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:21:06 +08:00
Sean Cross
a2fd6b0438 graphics-server: remove dependency on embedded-graphics
The graphics server will implement its own routines.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:20:19 +08:00
Sean Cross
0bce0eeb53 ticktimer: implement hosted version of ticktimer
This gets the basic ticktimer server working in a hosted environment.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-28 11:14:26 +08:00
Sean Cross
4334e7c23e shell: fix build for hosted
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-28 11:14:09 +08:00
Sean Cross
f9af2322f7 log-server: fix compiling for hosted builds
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-28 11:13:39 +08:00
Sean Cross
dfed13bd9f shell: initialize the logstr before using it
This fixes UB when accessing an uninitialized value.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-15 11:58:23 +08:00
bunnie
9ee43a7acc some more attempts to get log strings working... 2020-10-15 00:01:02 +08:00
bunnie
c8a2f34998 add debug output to log_string 2020-10-14 23:15:33 +08:00
bunnie
ac4d79ea68 logging server bringup 2020-10-14 23:01:57 +08:00
bunnie
5cf8e9e3bc Merge remote-tracking branch 'origin/master' into ticktimer 2020-10-14 15:30:47 +08:00
bunnie
49f15e547f upgrade to work with multi-UART API 2020-10-14 04:35:15 +08:00
bunnie
5b51048774 add debugprint template to other servers 2020-10-14 03:41:53 +08:00
bunnie
1d23d2c1f7 unify debug.rs and move to UTRA format 2020-10-14 03:40:44 +08:00
bunnie
523d18f5ab refactor "examples" -> "services" 2020-10-14 02:04:21 +08:00