Commit graph

550 commits

Author SHA1 Message Date
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
bb6dcd07a4 Merge remote-tracking branch 'origin/master' into hardware 2020-11-25 22:01:40 +08:00
Sean Cross
f0db281c7d kernel: add test for try_receive_message()
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:52:13 +08:00
Sean Cross
6008326297 svd2utra: update soc.svd with COM IRQ
This should fix CI.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:47:17 +08:00
Sean Cross
df4db87719 emulation: add fake COM interrupt for CI
The `renode.svd` file hasn't been updated yet, but code depends on
having an interrupt for COM. Add a fake interrupt to get CI building
again.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:39:37 +08:00
Sean Cross
8927ef00a2 kernel: add TryReceiveMessage support
This is a nonblocking form of ReceiveMessage.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:26:21 +08:00
Sean Cross
6604bfcdb0 xous-rs: add TryReceiveMessage
This non-blocking function call will retrieve a message if one exists,
or will immediately return None if the queue is empty.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-25 20:20:59 +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
a4a6065348 settings.json for working on hardware 2020-11-25 17:03:11 +08:00
bunnie
d583e20b18 very basic battery monitoring via COM 2020-11-25 05:11:32 +08:00
bunnie
471befa970 Merge branch 'master' into hardware 2020-11-24 22:46:44 +08:00
bunnie
db25b05a14 Merge branch 'master' of github.com:betrusted-io/xous-core 2020-11-24 22:46:24 +08:00
bunnie
772bceeb2d fix interrupt pending clear issue in debug module
during conversion to documented interrupts from Litex a case was
missed.
2020-11-24 22:46:10 +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
59b108f0d2 Cargo: update to latest lockfiles
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-24 22:30:40 +08:00
Sean Cross
b3b57f5eb5 xous: temporarily remove debug-here
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-24 22:04:26 +08:00
Sean Cross
aeef0638e7 xous: set license to MIT/Apache-2
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-24 22:02:02 +08:00
Sean Cross
f3a2c31067 kernel: add test for out-of-order blockingscalars
This already works, we just want to make sure it works.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-24 15:35:54 +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
222bde8db7 xous: remove extra prints from network
This was useful when tracking down network issues.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 20:05:10 +08:00
Sean Cross
e3cb05baf5 kernel: syscall: send WouldBlock to retry messages
This is handled by the client library to re-send the request.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 20:04:37 +08:00
Sean Cross
693800ac9d xous: hosted: retry when we get WouldBlock
When this is returned, we need to stop and retry the whole packet rather
than merely waiting as we do when we receive a Blocking message.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 20:03:00 +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
Sean Cross
8270283868 renode: memlcd: accurately map all hardware dirty bits
Previously we were only checking one dirty bit, which doesn't match
what's going on with the real hardware.

Check all the bits to ensure we're accurate.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 19:31:11 +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
1071a3246b emulation: assign interrupt 8 to ticktimer
This matches the new value from hardware.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:34:50 +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
65c8c6eef5 kernel: implement and use klog!() macro
This replaces the majority of println!() and print!() calls, and works
on baremetal and hosted modes.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:24:28 +08:00
Sean Cross
eecd9c2367 kernel: syscall: return Ok for yield() on hosted
When running in Hosted mode, a yield shouldn't do anything.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:23:53 +08:00
Sean Cross
dfa20cc1b1 kernel: test: rename send_repeat_mutableborrow_message
This function would previously clash with the other name.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:22:59 +08:00
Sean Cross
657604a199 kernel: test: use as_ptr() for memory messages
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:22:37 +08:00
Sean Cross
1291a2b3aa kernel: hosted: fix unused variable warnings
These only appear when not printing messages.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:21:57 +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
b24719a0fc xous: fix blocking return values
These values weren't being properly returned when Yielding or when
calling operations that would block, or that actually blocked.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:20:20 +08:00
Sean Cross
5f52acfa9b xous: document WouldBlock and BlockedProcess
These results have similar names but are very different in terms of what
they do.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:19:37 +08:00
Sean Cross
c36615d014 utralib: use canonicalized path for svd in rebuilding
Use the full path to the .svd file to ensure it is rebuilt when the file
changes.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:18:44 +08:00
Sean Cross
6041269033 kernel: Cargo: minor spacing reformat
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:14:39 +08:00
Sean Cross
98fb7f739d xous: hosted: remove excess debug from network packets
These packets were always printed, which is excessive.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 16:15:19 +08:00
Sean Cross
8c05fa99d2 renode: update svd to match example file
Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 16:14: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