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:
Román Cárdenas Rodríguez 2024-03-20 21:06:47 +01:00 committed by GitHub
parent 22ac33a826
commit 4060c3def8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
166 changed files with 2322 additions and 315 deletions

View 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

View file

@ -0,0 +1,3 @@
received message: 1
received message: 2
received message: 3

View file

@ -0,0 +1,5 @@
foo - start
foo - middle
baz
foo - end
bar

View file

@ -0,0 +1,3 @@
init
hello from async
hello from async2

View 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

View file

@ -0,0 +1 @@
Sender 1 sending: 1 Err(NoReceiver(1))

View file

@ -0,0 +1 @@
Receiver got: Err(NoSender)

View file

@ -0,0 +1,2 @@
Sender 1 sending: 1
Sender 1 try sending: 2 Err(Full(2))

View 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

View file

@ -0,0 +1,7 @@
init
hello from bar
hello from baz
hello from foo
bye from foo
bye from bar
bye from baz

View 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

View 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

View file

@ -0,0 +1,5 @@
init
hello from async2
hello from async
hello from async with args a: 1, b: 2
idle

View 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

View file

@ -0,0 +1,3 @@
async_task data:[22, 22, 22, 22, 22]
uart0 data:[22, 22, 22, 22, 22]
idle

View file

@ -0,0 +1,4 @@
init
foo called 1 time
idle
foo called 2 times

View file

@ -0,0 +1,3 @@
init
foo
bar

View file

@ -0,0 +1,5 @@
foo(0)
foo(1)
foo(2)
foo(3)
bar

View file

View file

@ -0,0 +1,3 @@
bar: local_to_bar = 1
foo: local_to_foo = 1
idle: local_to_idle = 1

View 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

View file

View file

@ -0,0 +1,2 @@
bar: a = 0, b = 1, c = 2
foo: a = 0, b = 1, c = 2

View file

@ -0,0 +1 @@
init, total executor size = 9

View file

@ -0,0 +1,4 @@
init
foo called
idle
foo called

View file

@ -0,0 +1 @@
foo

View file

@ -0,0 +1,6 @@
UART1(STATE = 0)
shared: 0 -> 1
UART0(STATE = 0)
shared: 1 -> 2
UART1(STATE = 1)
shared: 2 -> 4

View file

@ -0,0 +1,4 @@
init
UART0 called 1 time
idle
UART0 called 2 times

View file

@ -0,0 +1,2 @@
init
idle

View file

@ -0,0 +1,2 @@
init
idle

View file

@ -0,0 +1 @@
init

View file

@ -0,0 +1,3 @@
bar: local_to_bar = 1
foo: local_to_foo = 1
idle: local_to_idle = 1

View file

@ -0,0 +1,2 @@
foo = 1
bar = 2

View file

@ -0,0 +1,5 @@
A
B - shared = 1
C
D - shared = 2
E

View file

@ -0,0 +1,6 @@
foo
bar(0)
baz(1, 2)
foo
bar(1)
baz(2, 3)

View file

@ -0,0 +1 @@
Multiple locks, s1: 1, s2: 1, s3: 1

View file

@ -0,0 +1,3 @@
init
bar a 13
foo a 13

View file

@ -0,0 +1,2 @@
bar(key = 0xdeadbeef)
foo(key = 0xdeadbeef)

View file

@ -0,0 +1,4 @@
foo Instant { ticks: 0 }
foo Instant { ticks: 10 }
foo Instant { ticks: 20 }
foo Instant { ticks: 30 }

View 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 }

View file

@ -0,0 +1,4 @@
foo
foo
foo
foo

View file

View file

@ -0,0 +1,5 @@
foo - start
baz - start
baz - end
bar
foo - end

View file

@ -0,0 +1,6 @@
foo - start
pre baz spawn 0 0
post baz spawn 0 0
baz - start
baz - end
foo - end

View file

@ -0,0 +1 @@
foo

View file

@ -0,0 +1 @@
20000000 t ramfunc::bar::h9d6714fe5a3b0c89

View file

@ -0,0 +1 @@
00000162 t ramfunc::foo::h30e7789b08c08e19

View file

@ -0,0 +1,2 @@
UART0: shared = 1
UART1: shared = 2

View file

@ -0,0 +1,4 @@
init
foo
bar
baz

View file

@ -0,0 +1 @@
received message: 42

View file

View file

@ -0,0 +1,2 @@
init
foo

View file

@ -0,0 +1 @@
foo 1, 1

View file

@ -0,0 +1,3 @@
init
Cannot spawn a spawned (running) task!
foo

View file

@ -0,0 +1,7 @@
init
foo
idle
foo
idle
foo
idle

View file

@ -0,0 +1,3 @@
received message: 1
received message: 2
received message: 3

View file

View file

View file

View file

View file

View file

View file

View file

@ -0,0 +1,5 @@
foo - start
foo - middle
baz
foo - end
bar

View file

@ -0,0 +1,3 @@
init
hello from async
hello from async2