mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
RISC-V support over CLINT (#815)
* Rebase to master * using interrupt_mod * bug fixes * fix other backends * Add changelog * forgot about rtic-macros * backend-specific configuration * core peripherals optional over macro argument * pre_init_preprocessing binding * CI for RISC-V (WIP) * separation of concerns * add targets for RISC-V examples * remove qemu feature * prepare examples folder * move examples all together * move ci out of examples * minor changes * add cortex-m * new xtask: proof of concept * fix build.yml * feature typo * clean rtic examples * reproduce weird issue * remove unsafe code in user app * update dependencies * allow builds on riscv32imc * let's fix QEMU * Update .github/workflows/build.yml Co-authored-by: Henrik Tjäder <henrik@tjaders.com> * New build.rs * removing test features * adapt ui test to new version of clippy * add more examples to RISC-V backend * proper configuration of heapless for riscv32imc * opt-out examples for riscv32imc * point to new version of riscv-slic * adapt new macro bindings * adapt examples and CI to stable * fix cortex-m CI * Review --------- Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
This commit is contained in:
parent
22ac33a826
commit
4060c3def8
166 changed files with 2322 additions and 315 deletions
17
ci/expected/hifive1/prio_inheritance.run
Normal file
17
ci/expected/hifive1/prio_inheritance.run
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[Idle]: Started
|
||||
[SoftMedium]: Started
|
||||
[SoftMedium]: Shared: 1
|
||||
[SoftHigh]: Started
|
||||
[SoftHigh]: Shared: 2
|
||||
[SoftHigh]: Finished
|
||||
[SoftMedium]: Finished
|
||||
[SoftLow1]: Started
|
||||
[SoftLow1]: Shared: 3
|
||||
[SoftLow1]: Yield
|
||||
[SoftLow2]: Started
|
||||
[SoftLow2]: Shared: 4
|
||||
[SoftLow2]: Yield
|
||||
[SoftLow1]: Finished
|
||||
[SoftLow2]: Finished
|
||||
[Idle]: Shared: 4
|
||||
[Idle]: Finished
|
||||
3
ci/expected/hifive1/static.run
Normal file
3
ci/expected/hifive1/static.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
received message: 1
|
||||
received message: 2
|
||||
received message: 3
|
||||
5
ci/expected/hifive1/task.run
Normal file
5
ci/expected/hifive1/task.run
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
foo - start
|
||||
foo - middle
|
||||
baz
|
||||
foo - end
|
||||
bar
|
||||
3
ci/expected/hifive1/zero_prio_task.run
Normal file
3
ci/expected/hifive1/zero_prio_task.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
init
|
||||
hello from async
|
||||
hello from async2
|
||||
9
ci/expected/lm3s6965/async-channel-done.run
Normal file
9
ci/expected/lm3s6965/async-channel-done.run
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Sender 1 sending: 1
|
||||
Sender 1 done
|
||||
Sender 2 sending: 2
|
||||
Sender 3 sending: 3
|
||||
Receiver got: 1
|
||||
Sender 2 done
|
||||
Receiver got: 2
|
||||
Sender 3 done
|
||||
Receiver got: 3
|
||||
1
ci/expected/lm3s6965/async-channel-no-receiver.run
Normal file
1
ci/expected/lm3s6965/async-channel-no-receiver.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
Sender 1 sending: 1 Err(NoReceiver(1))
|
||||
1
ci/expected/lm3s6965/async-channel-no-sender.run
Normal file
1
ci/expected/lm3s6965/async-channel-no-sender.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
Receiver got: Err(NoSender)
|
||||
2
ci/expected/lm3s6965/async-channel-try.run
Normal file
2
ci/expected/lm3s6965/async-channel-try.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Sender 1 sending: 1
|
||||
Sender 1 try sending: 2 Err(Full(2))
|
||||
6
ci/expected/lm3s6965/async-channel.run
Normal file
6
ci/expected/lm3s6965/async-channel.run
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Sender 1 sending: 1
|
||||
Sender 2 sending: 2
|
||||
Sender 3 sending: 3
|
||||
Receiver got: 1
|
||||
Receiver got: 2
|
||||
Receiver got: 3
|
||||
7
ci/expected/lm3s6965/async-delay.run
Normal file
7
ci/expected/lm3s6965/async-delay.run
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
init
|
||||
hello from bar
|
||||
hello from baz
|
||||
hello from foo
|
||||
bye from foo
|
||||
bye from bar
|
||||
bye from baz
|
||||
6
ci/expected/lm3s6965/async-infinite-loop.run
Normal file
6
ci/expected/lm3s6965/async-infinite-loop.run
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
init
|
||||
hello from async 0
|
||||
hello from async 1
|
||||
hello from async 2
|
||||
hello from async 3
|
||||
hello from async 4
|
||||
6
ci/expected/lm3s6965/async-task-multiple-prios.run
Normal file
6
ci/expected/lm3s6965/async-task-multiple-prios.run
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
init
|
||||
hello from async 3 a 1
|
||||
hello from async 4 a 2
|
||||
hello from async 1 a 3
|
||||
hello from async 2 a 4
|
||||
idle
|
||||
5
ci/expected/lm3s6965/async-task.run
Normal file
5
ci/expected/lm3s6965/async-task.run
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
init
|
||||
hello from async2
|
||||
hello from async
|
||||
hello from async with args a: 1, b: 2
|
||||
idle
|
||||
16
ci/expected/lm3s6965/async-timeout.run
Normal file
16
ci/expected/lm3s6965/async-timeout.run
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
init
|
||||
the hal takes a duration of Duration { ticks: 45 }
|
||||
timeout
|
||||
the hal takes a duration of Duration { ticks: 45 }
|
||||
hal returned 5
|
||||
the hal takes a duration of Duration { ticks: 45 }
|
||||
hal returned 5
|
||||
now is Instant { ticks: 213 }, timeout at Instant { ticks: 263 }
|
||||
the hal takes a duration of Duration { ticks: 35 }
|
||||
hal returned 5 at time Instant { ticks: 249 }
|
||||
now is Instant { ticks: 313 }, timeout at Instant { ticks: 363 }
|
||||
the hal takes a duration of Duration { ticks: 45 }
|
||||
hal returned 5 at time Instant { ticks: 359 }
|
||||
now is Instant { ticks: 413 }, timeout at Instant { ticks: 463 }
|
||||
the hal takes a duration of Duration { ticks: 55 }
|
||||
timeout
|
||||
3
ci/expected/lm3s6965/big-struct-opt.run
Normal file
3
ci/expected/lm3s6965/big-struct-opt.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
async_task data:[22, 22, 22, 22, 22]
|
||||
uart0 data:[22, 22, 22, 22, 22]
|
||||
idle
|
||||
4
ci/expected/lm3s6965/binds.run
Normal file
4
ci/expected/lm3s6965/binds.run
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
init
|
||||
foo called 1 time
|
||||
idle
|
||||
foo called 2 times
|
||||
3
ci/expected/lm3s6965/cancel-reschedule.run
Normal file
3
ci/expected/lm3s6965/cancel-reschedule.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
init
|
||||
foo
|
||||
bar
|
||||
5
ci/expected/lm3s6965/capacity.run
Normal file
5
ci/expected/lm3s6965/capacity.run
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
foo(0)
|
||||
foo(1)
|
||||
foo(2)
|
||||
foo(3)
|
||||
bar
|
||||
0
ci/expected/lm3s6965/cfg-whole-task.run
Normal file
0
ci/expected/lm3s6965/cfg-whole-task.run
Normal file
3
ci/expected/lm3s6965/common.run
Normal file
3
ci/expected/lm3s6965/common.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
bar: local_to_bar = 1
|
||||
foo: local_to_foo = 1
|
||||
idle: local_to_idle = 1
|
||||
47
ci/expected/lm3s6965/complex.run
Normal file
47
ci/expected/lm3s6965/complex.run
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
init
|
||||
idle p0 started
|
||||
t2 p4 called 1 time
|
||||
enter lock s4 0
|
||||
t3 p4 exit
|
||||
idle enter lock s3 0
|
||||
idle pend t0
|
||||
idle pend t1
|
||||
idle pend t2
|
||||
t2 p4 called 2 times
|
||||
enter lock s4 1
|
||||
t3 p4 exit
|
||||
idle still in lock s3 0
|
||||
t1 p3 called 1 time
|
||||
t1 enter lock s4 2
|
||||
t1 pend t0
|
||||
t1 pend t2
|
||||
t1 still in lock s4 2
|
||||
t2 p4 called 3 times
|
||||
enter lock s4 2
|
||||
t3 p4 exit
|
||||
t1 p3 exit
|
||||
t0 p2 called 1 time
|
||||
t0 p2 exit
|
||||
|
||||
back in idle
|
||||
enter lock s2 0
|
||||
idle pend t0
|
||||
idle pend t1
|
||||
t1 p3 called 2 times
|
||||
t1 enter lock s4 3
|
||||
t1 pend t0
|
||||
t1 pend t2
|
||||
t1 still in lock s4 3
|
||||
t2 p4 called 4 times
|
||||
enter lock s4 3
|
||||
t3 p4 exit
|
||||
t1 p3 exit
|
||||
idle pend t2
|
||||
t2 p4 called 5 times
|
||||
enter lock s4 4
|
||||
t3 p4 exit
|
||||
idle still in lock s2 0
|
||||
t0 p2 called 2 times
|
||||
t0 p2 exit
|
||||
|
||||
idle exit
|
||||
0
ci/expected/lm3s6965/declared_locals.run
Normal file
0
ci/expected/lm3s6965/declared_locals.run
Normal file
2
ci/expected/lm3s6965/destructure.run
Normal file
2
ci/expected/lm3s6965/destructure.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
bar: a = 0, b = 1, c = 2
|
||||
foo: a = 0, b = 1, c = 2
|
||||
1
ci/expected/lm3s6965/executor-size.run
Normal file
1
ci/expected/lm3s6965/executor-size.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
init, total executor size = 9
|
||||
4
ci/expected/lm3s6965/extern_binds.run
Normal file
4
ci/expected/lm3s6965/extern_binds.run
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
init
|
||||
foo called
|
||||
idle
|
||||
foo called
|
||||
1
ci/expected/lm3s6965/extern_spawn.run
Normal file
1
ci/expected/lm3s6965/extern_spawn.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
foo
|
||||
6
ci/expected/lm3s6965/generics.run
Normal file
6
ci/expected/lm3s6965/generics.run
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
UART1(STATE = 0)
|
||||
shared: 0 -> 1
|
||||
UART0(STATE = 0)
|
||||
shared: 1 -> 2
|
||||
UART1(STATE = 1)
|
||||
shared: 2 -> 4
|
||||
4
ci/expected/lm3s6965/hardware.run
Normal file
4
ci/expected/lm3s6965/hardware.run
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
init
|
||||
UART0 called 1 time
|
||||
idle
|
||||
UART0 called 2 times
|
||||
2
ci/expected/lm3s6965/idle-wfi.run
Normal file
2
ci/expected/lm3s6965/idle-wfi.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
init
|
||||
idle
|
||||
2
ci/expected/lm3s6965/idle.run
Normal file
2
ci/expected/lm3s6965/idle.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
init
|
||||
idle
|
||||
1
ci/expected/lm3s6965/init.run
Normal file
1
ci/expected/lm3s6965/init.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
init
|
||||
3
ci/expected/lm3s6965/locals.run
Normal file
3
ci/expected/lm3s6965/locals.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
bar: local_to_bar = 1
|
||||
foo: local_to_foo = 1
|
||||
idle: local_to_idle = 1
|
||||
2
ci/expected/lm3s6965/lock-free.run
Normal file
2
ci/expected/lm3s6965/lock-free.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
foo = 1
|
||||
bar = 2
|
||||
5
ci/expected/lm3s6965/lock.run
Normal file
5
ci/expected/lm3s6965/lock.run
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
A
|
||||
B - shared = 1
|
||||
C
|
||||
D - shared = 2
|
||||
E
|
||||
6
ci/expected/lm3s6965/message.run
Normal file
6
ci/expected/lm3s6965/message.run
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
foo
|
||||
bar(0)
|
||||
baz(1, 2)
|
||||
foo
|
||||
bar(1)
|
||||
baz(2, 3)
|
||||
1
ci/expected/lm3s6965/multilock.run
Normal file
1
ci/expected/lm3s6965/multilock.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
Multiple locks, s1: 1, s2: 1, s3: 1
|
||||
3
ci/expected/lm3s6965/not-sync.run
Normal file
3
ci/expected/lm3s6965/not-sync.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
init
|
||||
bar a 13
|
||||
foo a 13
|
||||
2
ci/expected/lm3s6965/only-shared-access.run
Normal file
2
ci/expected/lm3s6965/only-shared-access.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
bar(key = 0xdeadbeef)
|
||||
foo(key = 0xdeadbeef)
|
||||
4
ci/expected/lm3s6965/periodic-at.run
Normal file
4
ci/expected/lm3s6965/periodic-at.run
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
foo Instant { ticks: 0 }
|
||||
foo Instant { ticks: 10 }
|
||||
foo Instant { ticks: 20 }
|
||||
foo Instant { ticks: 30 }
|
||||
7
ci/expected/lm3s6965/periodic-at2.run
Normal file
7
ci/expected/lm3s6965/periodic-at2.run
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
foo Instant { ticks: 0 }
|
||||
bar Instant { ticks: 10 }
|
||||
foo Instant { ticks: 30 }
|
||||
bar Instant { ticks: 40 }
|
||||
foo Instant { ticks: 60 }
|
||||
bar Instant { ticks: 70 }
|
||||
foo Instant { ticks: 90 }
|
||||
4
ci/expected/lm3s6965/periodic.run
Normal file
4
ci/expected/lm3s6965/periodic.run
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
foo
|
||||
foo
|
||||
foo
|
||||
foo
|
||||
0
ci/expected/lm3s6965/peripherals-taken.run
Normal file
0
ci/expected/lm3s6965/peripherals-taken.run
Normal file
0
ci/expected/lm3s6965/pool.run
Normal file
0
ci/expected/lm3s6965/pool.run
Normal file
5
ci/expected/lm3s6965/preempt.run
Normal file
5
ci/expected/lm3s6965/preempt.run
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
foo - start
|
||||
baz - start
|
||||
baz - end
|
||||
bar
|
||||
foo - end
|
||||
6
ci/expected/lm3s6965/prio-inversion.run
Normal file
6
ci/expected/lm3s6965/prio-inversion.run
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
foo - start
|
||||
pre baz spawn 0 0
|
||||
post baz spawn 0 0
|
||||
baz - start
|
||||
baz - end
|
||||
foo - end
|
||||
1
ci/expected/lm3s6965/ramfunc.run
Normal file
1
ci/expected/lm3s6965/ramfunc.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
foo
|
||||
1
ci/expected/lm3s6965/ramfunc.run.grep.bar
Normal file
1
ci/expected/lm3s6965/ramfunc.run.grep.bar
Normal file
|
|
@ -0,0 +1 @@
|
|||
20000000 t ramfunc::bar::h9d6714fe5a3b0c89
|
||||
1
ci/expected/lm3s6965/ramfunc.run.grep.foo
Normal file
1
ci/expected/lm3s6965/ramfunc.run.grep.foo
Normal file
|
|
@ -0,0 +1 @@
|
|||
00000162 t ramfunc::foo::h30e7789b08c08e19
|
||||
2
ci/expected/lm3s6965/resource-user-struct.run
Normal file
2
ci/expected/lm3s6965/resource-user-struct.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
UART0: shared = 1
|
||||
UART1: shared = 2
|
||||
4
ci/expected/lm3s6965/schedule.run
Normal file
4
ci/expected/lm3s6965/schedule.run
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
init
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
1
ci/expected/lm3s6965/shared.run
Normal file
1
ci/expected/lm3s6965/shared.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
received message: 42
|
||||
0
ci/expected/lm3s6965/smallest.run
Normal file
0
ci/expected/lm3s6965/smallest.run
Normal file
2
ci/expected/lm3s6965/spawn.run
Normal file
2
ci/expected/lm3s6965/spawn.run
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
init
|
||||
foo
|
||||
1
ci/expected/lm3s6965/spawn_arguments.run
Normal file
1
ci/expected/lm3s6965/spawn_arguments.run
Normal file
|
|
@ -0,0 +1 @@
|
|||
foo 1, 1
|
||||
3
ci/expected/lm3s6965/spawn_err.run
Normal file
3
ci/expected/lm3s6965/spawn_err.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
init
|
||||
Cannot spawn a spawned (running) task!
|
||||
foo
|
||||
7
ci/expected/lm3s6965/spawn_loop.run
Normal file
7
ci/expected/lm3s6965/spawn_loop.run
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
init
|
||||
foo
|
||||
idle
|
||||
foo
|
||||
idle
|
||||
foo
|
||||
idle
|
||||
3
ci/expected/lm3s6965/static.run
Normal file
3
ci/expected/lm3s6965/static.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
received message: 1
|
||||
received message: 2
|
||||
received message: 3
|
||||
0
ci/expected/lm3s6965/t-binds.run
Normal file
0
ci/expected/lm3s6965/t-binds.run
Normal file
0
ci/expected/lm3s6965/t-cfg-resources.run
Normal file
0
ci/expected/lm3s6965/t-cfg-resources.run
Normal file
0
ci/expected/lm3s6965/t-htask-main.run
Normal file
0
ci/expected/lm3s6965/t-htask-main.run
Normal file
0
ci/expected/lm3s6965/t-idle-main.run
Normal file
0
ci/expected/lm3s6965/t-idle-main.run
Normal file
0
ci/expected/lm3s6965/t-late-not-send.run
Normal file
0
ci/expected/lm3s6965/t-late-not-send.run
Normal file
0
ci/expected/lm3s6965/t-schedule.run
Normal file
0
ci/expected/lm3s6965/t-schedule.run
Normal file
0
ci/expected/lm3s6965/t-spawn.run
Normal file
0
ci/expected/lm3s6965/t-spawn.run
Normal file
5
ci/expected/lm3s6965/task.run
Normal file
5
ci/expected/lm3s6965/task.run
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
foo - start
|
||||
foo - middle
|
||||
baz
|
||||
foo - end
|
||||
bar
|
||||
3
ci/expected/lm3s6965/zero-prio-task.run
Normal file
3
ci/expected/lm3s6965/zero-prio-task.run
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
init
|
||||
hello from async
|
||||
hello from async2
|
||||
Loading…
Add table
Add a link
Reference in a new issue