Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
421: Allow #[naked] attribute on interrupt handlers and pre_init r=thalesfragoso a=adamgreig
Might be useful for `pre_init` especially, now that constrained naked functions are hopefully [on the road to being stable](https://github.com/rust-lang/rust/issues/90957).
`pre_init` and `entry` are called from our `asm.S` via `bl __pre_init` and `bl main`, exception and interrupt handlers are called directly by the CPU; in either case there's no issue with calling a naked function.
Inspired by https://twitter.com/the6p4c/status/1489266955232034817
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
418: Exclude c-m-rt from cron test of cortex-m, fixes #417 r=thejpster a=adamgreig
Excludes cortex-m-rt from the plain ci-linux cron CI. We already test cortex-m-rt separate in rt-ci-linux, and plain `cargo test` doesn't work on x86 for cortex-m-rt.
Fixes #417 which is where this week's cron run failed.
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
416: Fix #414, use fully qualified path for `exception` enum in `#[exception]` macro r=thalesfragoso a=adamgreig
Partially reverts https://github.com/rust-embedded/cortex-m-rt/pull/224
to continue to use a fully-qualified path to `exception`.
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
Partially reverts https://github.com/rust-embedded/cortex-m-rt/pull/224
to continue to use a fully-qualified path to `exception`.
|
|
415: Fix most clippy lints r=adamgreig a=newAM
This fixes all clippy lints that do not result in a user-visible change, and result in valid code for the 1.40 MSRV.
Co-authored-by: Alex Martens <alex@thinglab.org>
|
|
|
|
|
|
391: Merge cortex-m-rt into this repository r=thejpster a=adamgreig
This PR merges the cortex-m-rt repository (with history) into this repo, inside the `cortex-m-rt` folder which is added to the workspace. The main advantage is easier combined testing of cortex-m with cortex-m-rt (including on-hardware tests e.g. #355), and in the future easier changes across the two projects.
The MSRV of cortex-m-rt is bumped 1.39 -> 1.40 to align it with cortex-m itself.
I've updated the CI to run the same tests and checks as before, and updated references to the old URL.
If/after this is merged, I propose adding a note to the old repo's README and then archiving it.
An alternative to this technique would be adding all the files in one new commit (not preserving history), if anyone thinks that would be neater.
NB: This PR also adds an inline to ITM to fix a clippy hard error.
For future reference, the git work was:
```
cd cortex-m-rt
git filter-repo --to-subdirectory-filter cortex-m-rt
cd ../cortex-m
git remote add rt ../cortex-m-rt
git fetch rt
git merge --allow-unrelated-histories rt/master
```
Co-authored-by: bors[bot] <bors[bot]@users.noreply.github.com>
Co-authored-by: Jonathan 'theJPster' Pallant <github@thejpster.org.uk>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Co-authored-by: Daniel Egger <daniel@eggers-club.de>
Co-authored-by: Niklas Claesson <nicke.claesson@gmail.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Co-authored-by: Vadim Kaushan <admin@disasm.info>
|
|
|
|
|
|
|
|
|
|
cortex-m-semihosting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385: remove the ptr() function in favor of the PTR constant r=adamgreig a=TDHolmes
Per #370/#235, the const fn ptr() was supposed to be deprecated and subsequently removed. This PR removes it for the master branch tracking the 0.8 release
Co-authored-by: Tyler Holmes <tyler@holmesengineering.com>
|
|
|
|
Per #370/#235, the const fn ptr() was supposed to be deprecated and
subsequently removed. This PR removes it for the master branch tracking
the 0.8 release
|
|
381: TPIU: swo_supports: make struct fields public, improve documentation r=thejpster a=tmplt
A few small changes that I missed the first time around when the TPIU API was expanded.
Co-authored-by: Viktor Sonesten <v@tmplt.dev>
|
|
|
|
|
|
|
|
380: Improve singleton!() macro r=adamgreig a=Rahix
This PR addresses two shortcomings of the `cortex_m::singleton!()` macro, which I raised in #364. For review, I think it is best to look at the two commits implementing these changes individually.
I think this changeset should also be backported to `0.7.x` where it applies cleanly and which is also the place where I tested it.
### 1. Fix `singleton!()` sometimes ending up in `.data`
The static is always initialized to a "zero" value with `Option::None` which means it should end up in `.bss`. However, if the enclosed type has a niche, `Option::None` can become a non-zero bitpattern which moves the whole singleton from `.bss` to `.data`. This is especially problematic when storing large buffers in the `singleton!()` as this starts eating lots of flash space unnecessarily.
To prevent this, I switched to using an explicit boolean flag instead. This is not quite as nice but at least there is no chance for the `singleton!()` to end up in `.data`...
For reference and as an example, the faulty behavior can be triggered with
```rust
cortex_m::singleton!(: Option<u32> = None)
```
(the inner option has a non-zero niche which the outer option will occupy)
### 2. Allow naming the `static`
Due to the static always being named `VAR` right now, all `singleton!()` instances end up having non-descriptive symbol names like `__cortex_m_rt_main::{{closure}}::VAR` which makes them hard to tell apart in a debugger or when looking at an objdump.
I added the ability to set an explicit name which end up becoming part of the symbol name. This does not affect Rust code at all - the new name is not visible anywhere. It works like this:
```rust
let value = singleton!(FOO_BUFFER: [u8; 1024] = [0u8; 1024]);
```
Of course the old syntax also still works and keeps the old behavior of calling the static `VAR`.
Fixes #364.
Co-authored-by: Rahix <rahix@rahix.de>
|
|
|
|
As detailed in rust-embedded/cortex-m#364, niche optimization of the
`Option` used in the `singleton!()` macro can lead to the initial value
of the static to contain non-zero bits. This in turn leads to the whole
static being moved from `.bss` to `.data` which means it eats up flash
space for no reason. Especially if the singleton stores a particularly
large type, this can be quite problematic.
Prevent this by using an explicit boolean flag instead of the `Option`
type. This is not quite as nice but at least there is no chance for the
`singleton!()` to end up in `.data`...
|
|
Right now, the `singleton!()` macro always creates a static named `VAR`.
This is annoying when digging through objdump output or digging into
memory with a debugger because it is hard to see what singleton you're
looking at when they are all called `<...>::{{closure}}::VAR`.
To make it a bit nicer, allow setting the name of the generated static
to some meaningful identifier which can then be cross-referenced in
debugger output, for example with
singleton!(FOO_BUFFER: [u8; 1024] = [0u8; 1024]);
There is no other side-effects to this change - the identifier is never
visible to other code because it is still contained in the closure of
the macro.
|
|
379: Backport 0.7.4's changelog updates and version number to master r=thejpster a=adamgreig
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
378: CHANGELOG: add missing items r=adamgreig a=tmplt
Co-authored-by: Viktor Vilhelm Sonesten <v@tmplt.dev>
|
|
|
|
373: `SCB.ICSR.VECTACTIVE` is 9 bits, not 8 r=adamgreig a=TDHolmes
Closes #332
Co-authored-by: Tyler Holmes <tyler@holmesengineering.com>
|
|
|
|
|
|
Closes #332
|
|
366: itm: derive serde for `LocalTimestampOptions`, impl gated `TryFrom<u8>` r=adamgreig a=tmplt
This PR is an upstream push of more std-features required by `cargo-rtic-scope`. If required, the `TryFrom<u8>` impl can be kept downstream.
Co-authored-by: Viktor Sonesten <v@tmplt.dev>
|
|
350: Update bare-metal dependency r=adamgreig a=hellow554
Bare-metal has released its 1.0 version. Let's use it!
Co-authored-by: Marcel Hellwig <github@cookiesoft.de>
Co-authored-by: Marcel Hellwig <git@cookiesoft.de>
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
374: Construct a SysTick delay with a clock source r=adamgreig a=mciantyre
Helpful for users who prefer an external clock source for their system
timer. Proposing this as a 0.7 backwards-compatible change.
Co-authored-by: Ian McIntyre <ianpmcintyre@gmail.com>
|
|
367: add methods needed for cycle count comparisons r=adamgreig a=TDHolmes
Extends the existing DWT comparator code to include cycle count comparisons which fire a `DebugMonitor` exception, if enabled with `enable_debug_monitor`. See working example [here](https://github.com/TDHolmes/embedded-profiling/blob/58d8b106921977816e2b5a05bcb43e976197edaf/ep-dwt/src/lib.rs#L57)
Co-authored-by: Tyler Holmes <tyler@holmesengineering.com>
|