Commit fc00a32
Scheduler implementation (#534)
* Add initial implementation of scheduler
* Try to fix -Wuninitialized warning
* Try to remove Wuninitialized warning temporarily
* Remove unnecessary clear of task element
* fix: Readability and todo for validation
* fix: allocate_slot
* Add explenation of sorted_task_ids_, static_assert for the bitmaps
* Remove long_wait_remaining_us_
* fix: better get_at
* fix: better front_id
Compiler would've probably optimized it but it's better to make it explicit
* fix: endianness in pop_front
* Added unlikely to release_slot conditional
* fix: Correct comment explenation
* No bit field insert, it annoyed me
* No more diagnostic ignore
* fix: loss in accuracy by not adding 1: #534 (comment)
* fix: Moved active_task_count_ modification
* Actually set used_bitmap_ in allocate_slot
* only include sources when cross-compiling
* modify CMakeLists inside Tests
* feat: use ugly ifdef guards for host testing purposes
* add sample tests for Scheduler
* add emulated ticking
* test for execution count
* fix: CI
* fix: expected result in test case + explanation
* add compiler specific and CoreMacros
* copy files from LL and CMSIS for TIM Registers
* bridge between LL MMIO Timer and user defined TIMER
* reduce the number of ugly macros
* compile the new mock file
* update test
* enable debugging of tests with TestMate C++ extension
* feat: add DSB and ISB intructions in x86_64
* feat: add NVIC
* add NVIC logic
* feat: use NVIC and remove print
* fix: move extern"C" block to allow using <iostream>
* add Register class to allow for side effects
* feat: use newly created Register class for side effects, neat trick in CNT write
* feat: be as realistic as possible in test, by using CNT++
* feat: remove unnecessary include
* feat: add an __RBIT impl for x86_64
* fix: compilation
* fix: used_bitmap_ -> free_bitmap_
* Added tests check in CI/CD
* fix(ci/cd): output folder
* Added ARM specific instructions to be able to compile in ARM hosts (Mac)
* Fix: compiler barrier for msvc, hopefully works
* Fix: Try to fix -Wchanges-meaning warning
* Fix typo
* Update Inc/MockedDrivers/common.hpp
#534 (comment)
Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com>
* Actually do the change github didn't do :/
* Fix typo p2
* Fix another typo
* Fix unsigned long - 64bit when testing using LL functions
* Minor fixes to scheduler
Rebased from remotes/origin/MockTim
* Fix: uint32_t* cast of a word instead of the ptr
* Fix: remove active_task_count_ decrement in pop_front()
#534 (comment)
* Try fix Wstrict-aliasing in front_id
* Try fix Wstrict-aliasing again
* Fix typo in allocate_slot
* fix: test UsedBitmap -> FreeBitmap
* used_bitmap_ -> free_bitmap_ in test part 2
* fixed tests discovery
* fix: set_timeout() test
* Add a test, fix the error (kind of)
* Fix: underflow in schedule_next_interval
* Fix: call schedule_next_interval() in start()
* Fix: invert condition, that was stupid
* feat: add test showcasing possible usage within StateMachine logic
* fix: Calculate correct prescaler & add to HALAL.hpp
* Try to fix tests
* try to fix tests part 2
* Try to fix tests part 3
* part 4 - add the wrapper.c to cmake, will this work?
* part 5 - fix cmake stm32h723xx_wrapper.c path
* fix: try to fix tests part 6
* fix: volatile warnings
* fix: active_PSC is now set when PSC is set
* fix: remove outdated comment
* fix: tests part 7, should work now
* fix: remove unecessary if, return if cancelled in cancel_timeout
* Pop all due tasks, several might be due in the same tick
* Revert force-push
* fix: off by one error + configure_timer_for_interval should use uint32_t
* fix: off by one error in schedule_next_interval()
* All 15 tasks in MultipleTasks test, and it works
* Add SameTaskMultipleTimes test, does all 16 tasks too
* larger NUM_TICKS just in case
* fix bug mentioned in previous cancel_timeout()
* fix: id uint32_t -> uint16_t + bug fix
* fix: remove TimerPeripheral::start and Time::start from HALAL::start
* try to fix ci/cd
* try to fix ci/cd part 2
* try to fix ci/cd part 3
* clean up ci/cd fix
* Remove unnecessary warning ignore
* fix: use wrapper instead of interface for stm32h7xx_ll_tim.h
* fix ci/cd and add the other submodule to be automatically added
* fix: actually add stm32h7xx_ll_tim_wrapper.h
* try to fix ci/cd warning
* try fix warnings again
* fix: add ignore Woverflow to stm32h7xx_ll_tim
* fix: remove need to ignore Woverflow warnings
* fix: Remove tim_register_definitions.hpp
We're already including them in stm32h723xx_wrapper
* Fix overflow calculation and a test
* Add link to wiki
* fix: revert .vscode settings change
* revert .vscode settings change part 2
* finish reverting change
---------
Co-authored-by: Gonzalo Sánchez <gonzalosmoya24@gmail.com>
Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com>
Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com>
Co-authored-by: StefanCostea <stefanxenadu@gmail.com>1 parent 726639b commit fc00a32
20 files changed
Lines changed: 1355 additions & 8 deletions
File tree
- .github/workflows
- .vscode
- Inc
- HALAL
- Services/Time
- MockedDrivers
- Src
- HALAL
- Services/Time
- MockedDrivers
- Tests
- Time
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
| |||
222 | 240 | | |
223 | 241 | | |
224 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
225 | 249 | | |
226 | 250 | | |
227 | 251 | | |
| |||
268 | 292 | | |
269 | 293 | | |
270 | 294 | | |
271 | | - | |
272 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
273 | 299 | | |
274 | | - | |
| 300 | + | |
| 301 | + | |
275 | 302 | | |
276 | 303 | | |
277 | 304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
0 commit comments