Skip to content

Cortex M0(+) DWT fixes #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 12, 2019
Merged

Cortex M0(+) DWT fixes #127

merged 3 commits into from
Mar 12, 2019

Conversation

korken89
Copy link
Contributor

@korken89 korken89 commented Dec 15, 2018

The current DWT setup has a lot of registers that are not available in Cortex-M0(+), fixes are added here.

@korken89 korken89 requested a review from a team as a code owner December 15, 2018 16:52
@korken89
Copy link
Contributor Author

@korken89 korken89 changed the title [Do not merge yet] Cortex M0 DWT fixes [Do not merge yet] Cortex M0(+) DWT fixes Dec 15, 2018
@korken89 korken89 changed the title [Do not merge yet] Cortex M0(+) DWT fixes Cortex M0(+) DWT fixes Dec 15, 2018
@korken89
Copy link
Contributor Author

There, I think this is ready. Comment/suggestions @rust-embedded/cortex-m ?

@japaric
Copy link
Member

japaric commented Dec 15, 2018

This is technically a breaking change because it makes code like this:

let cyccnt = &p.DWT.cyccnt;

stop compiling (when target = thumbv6) so this should be merged when we are ready to release v0.6.0.

@korken89
Copy link
Contributor Author

Indeed, but it is a bug now so a break is inevitable.
I would opt for fixing this ASAP as people might think that the DWT cyccnt exists now.

@therealprof
Copy link
Contributor

I tend to agree with @korken89 here. This is preventing the use of undefined behaviour (most likely even a crash) so it has precedence over "a breaking change" and thus should go in ASAP.

@adamgreig adamgreig mentioned this pull request Jan 14, 2019
@adamgreig adamgreig added this to the v0.6.0 milestone Jan 27, 2019
@adamgreig adamgreig mentioned this pull request Jan 28, 2019
@Disasm Disasm added the S-waiting-on-bors Currently approved, waiting to merge. label Feb 22, 2019
@adamgreig
Copy link
Member

Merging in preparation of releasing 0.6.0.

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 12, 2019

👎 Rejected by too few approved reviews

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot added a commit that referenced this pull request Mar 12, 2019
97: Rename `shcrs` to `shcsr` in `scb::RegisterBlock` r=adamgreig a=rajivr

Commit `c290aa4e` introduced `shcrs` field to `scb::RegisterBlock`. 

In CMSIS, this field is `shcsr`.

https://github.com/ARM-software/CMSIS_5/blob/5.3.0/CMSIS/Core/Include/core_cm4.h#L449

This patch changes `shcrs` to `shcsr`.

Signed-off-by: Rajiv Ranganath <[email protected]>

106: Stir register and debugger check r=adamgreig a=thenewwazoo

Adds support for requesting an interrupt via the STIR register and checking whether a debugger is attached.

127: Cortex M0(+) DWT fixes r=adamgreig a=korken89

The current DWT setup has a lot of registers that are not available in Cortex-M0(+), fixes are added here.



Co-authored-by: Rajiv Ranganath <[email protected]>
Co-authored-by: Brandon Matthews <[email protected]>
Co-authored-by: Brandon Matthews <[email protected]>
Co-authored-by: Emil Fresk <[email protected]>
@bors
Copy link
Contributor

bors bot commented Mar 12, 2019

Build failed (retrying...)

bors bot added a commit that referenced this pull request Mar 12, 2019
106: Stir register and debugger check r=adamgreig a=thenewwazoo

Adds support for requesting an interrupt via the STIR register and checking whether a debugger is attached.

127: Cortex M0(+) DWT fixes r=adamgreig a=korken89

The current DWT setup has a lot of registers that are not available in Cortex-M0(+), fixes are added here.



Co-authored-by: Brandon Matthews <[email protected]>
Co-authored-by: Brandon Matthews <[email protected]>
Co-authored-by: Emil Fresk <[email protected]>
@bors
Copy link
Contributor

bors bot commented Mar 12, 2019

Build failed (retrying...)

bors bot added a commit that referenced this pull request Mar 12, 2019
127: Cortex M0(+) DWT fixes r=adamgreig a=korken89

The current DWT setup has a lot of registers that are not available in Cortex-M0(+), fixes are added here.



Co-authored-by: Emil Fresk <[email protected]>
@bors
Copy link
Contributor

bors bot commented Mar 12, 2019

Build succeeded

@bors bors bot merged commit 712aa29 into master Mar 12, 2019
@bors bors bot deleted the cortex-m0-dwt-fix branch March 12, 2019 21:37
adamgreig pushed a commit that referenced this pull request Jan 12, 2022
127: bump the syn dependency r=therealprof a=japaric

and switch to the recommended way to parse tokens: `parse_macro_input!`.

This improves (?) error messages when the user applies one of our attributes to
an item that's not a function.

Consider

``` rust
 #[entry]
static MAIN: () = ();

```

The error message changed from:

```
error: custom attribute panicked
  --> src/main.rs:10:1
   |
10 | #[entry]
   | ^^^^^^^^
   |
   = help: message: `#[entry]` must be applied to a function: ParseError(Some("failed to parse fn item: failed to parse"))
```

to:

```
error: expected `fn`
  --> src/main.rs:11:1
   |
11 | static MAIN: () = ();
   | ^^^^^^

error: aborting due to previous error
```

---

Before landing this I'd like to hear more details about #125 to see if this
helps

Co-authored-by: Jorge Aparicio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Currently approved, waiting to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants