Skip to content
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

Add support for exceptions #27

Closed
idubrov opened this issue May 24, 2017 · 4 comments
Closed

Add support for exceptions #27

idubrov opened this issue May 24, 2017 · 4 comments

Comments

@idubrov
Copy link

idubrov commented May 24, 2017

I don't know how much value would be to support all possible exceptions (as tasks), but at least sys_tick should be supported, I think.

@japaric
Copy link
Collaborator

japaric commented May 24, 2017

Yeah, we definitively want to do this, but there are some complications with the implementation and changes around the user interface, IIRC. I think exceptions would have a different syntax in the tasks! macro; exceptions in tasks! won't work by default because you have to disable the "exceptions" feature of the cortex-m-rt crate; the mechanism to override the other exceptions, the ones not used as tasks, would change (it won't use the EXCEPTIONS variable anymore). At least that's the expected breakage; I haven't tried to implement this yet.

@japaric
Copy link
Collaborator

japaric commented Jun 12, 2017

Exceptions that have configurable priority:

  • UsageFault (6)
  • BusFault (5)
  • MenManage (4)
  • SVCall (11)
  • SysTick (15)
  • PendSV (14)

Source.

These are candidates for being tasks. Their priorities are set through the System Handler Priority Registers. The number in parenthesis in the position of the exception priority in those registers.

@japaric
Copy link
Collaborator

japaric commented Jun 28, 2017

#31 would fix this.

@japaric
Copy link
Collaborator

japaric commented Jul 29, 2017

Done in #34. Only the system handlers (PENDSV, SYS_TICK and SVCALL) can be used as tasks.

@japaric japaric closed this as completed Jul 29, 2017
andrewgazelka pushed a commit to andrewgazelka/cortex-m-rtic that referenced this issue Nov 3, 2021
define handlers as weak aliases of DEFAULT_HANDLER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants