aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/util.rs
AgeCommit message (Collapse)Author
2022-07-27Remove use of basepri register on thumbv8m.baseDavid Watson
The basepri register appears to be aviable on thumbv8m.main but not thumbv8m.base. At the very least, attempting to compile against a Cortex-M23 based Microchip ATSAML10E16A generates an error: ``` error[E0432]: unresolved import `cortex_m::register::basepri` --> /Users/dwatson/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rtic-1.1.3/src/export.rs:25:5 | 25 | use cortex_m::register::basepri; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `basepri` in `register` ``` This is an attempt to account for the fact that thumbv8m.base (M23) MCUs don't have the BASEPRI register but have more than 32 interrupts. This moves away from the architecture specific config flags and switches to a more functional flag. Make the mask size depend on the max interrupt id Rather than assuming a fixed interrupt count of 32 this code uses an array of u32 bitmasks to calculate the priority mask. The size of this array is calculated at compile time based on the size of the largest interrupt id being used in the target code. For thumbv6m this should be equivalent to the previous version that used a single u32 mask. For thumbv8m.base it will be larger depending on the interrupts used. Don't write 0s to the ISER and ICER registers Writing 0s to these registers is a no-op. Since these masks should be calculated at compile time, this conditional should result in writes being optimized out of the code. Prevent panic on non-arm targets Panicking on unknown targets was breaking things like the doc build on linux. This change should only panic when building on unknown arm targets.
2022-04-20Masks take 3Emil Fresk
2022-03-02Added support for SRP based scheduling for armv6mPer Lindgren
2022-02-22Clippy with pedantic suggestionsHenrik Tjäder
2022-02-09Fix/mute clippy errorsHenrik Tjäder
2021-12-25Clippy lintsHenrik Tjäder
2021-11-11Better errors on when missing to lock shared resourcesEmil Fresk
2021-08-20Use `mark_internal_name` by default for methods in `util` to make usage of ↵datdenkikniet
these functions more straightforward. fq_ident is always internal rq_ident is always internal monotonic_ident is always internal inputs_ident is always internal local_resources_ident is always internal shared_resources_ident is always internal monotonic_instants_ident is always internal tq_ident is always internal timer_queue_marker_ident is always internal static_shared_resource_ident is always internal static_local_resource_ident is always internal declared_static_local_resource_ident is always internal Only names, not idents, are now marked as internal Use same rtic internal everywhere
2021-07-09const genericsAndrey Zgarbul
2021-07-08Cleanup from review (needs releases to compile)Emil Fresk
2021-07-07Fixing testsEmil Fresk
2021-07-07Full local resource syntax workingEmil Fresk
2021-07-06Minimal app now compilesEmil Fresk
2021-07-05Started workEmil Fresk
2021-05-27Prepare release alpha.4Emil Fresk
2021-05-06Flattened the _ out of itEmil Fresk
2021-03-13Added interface for cancel/rescheduleEmil Fresk
Use wrapping add for marker No need to store handle to queue Remove unnecessary `SpawnHandle::new` Fix test Updated interface to follow proposal
2021-02-25Documentation generation fixesEmil Fresk
Test fixes
2021-02-18Now with new monotonic trait and crateEmil Fresk
2020-12-13Now handling SysTick as wellEmil Fresk
2020-12-12CleanupEmil Fresk
2020-12-12Monotonic codegen now passing compile stageEmil Fresk
2020-12-08TQ handlers being generatedEmil Fresk
2020-12-03Save, init generation fixedEmil Fresk
2020-10-23move dispatchers to app argumentPer Lindgren
2020-10-22Merge #396bors[bot]
396: Fix namespaces r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
2020-10-21Hide lock type better to not collide with user typesEmil Fresk
2020-10-21Updated examplesEmil Fresk
More work
2020-10-15Implement all clippy suggestionsHenrik Tjäder
2020-10-15Merge branch 'master' into spawn_experimentEmil Fresk
2020-10-15Detect if the rt flag is defined in the PAC/HALEmil Fresk
Better error message Improved error string Update UI tests
2020-10-11Now with spawn/schedule from anywhereEmil Fresk
2020-09-01Remove stale code, fix comment stylingHenrik Tjäder
2020-09-01Since there only will be one init/idle use .first().unwrap(), matching ↵Henrik Tjäder
rtic-syntax
2020-09-01Cargo fmtHenrik Tjäder
2020-09-01Brutally yank out multicoreHenrik Tjäder
2020-06-11Rename RTFM to RTICHenrik Tjäder
2019-08-20adapt to changes in rtfm-syntaxJorge Aparicio
2019-06-29WIPJorge Aparicio
2019-06-20RFC #207Jorge Aparicio
2019-06-18add homogeneous multi-core supportJorge Aparicio
2019-06-13rtfm-syntax refactor + heterogeneous multi-core supportJorge Aparicio