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

cannot set high priority for scheduled tasks #81

Closed
burrbull opened this issue Jun 22, 2018 · 3 comments
Closed

cannot set high priority for scheduled tasks #81

burrbull opened this issue Jun 22, 2018 · 3 comments

Comments

@burrbull
Copy link
Contributor

I use RTFM 0.4 from
https://github.com/japaric/stm32f103xx-hal/tree/rtfm-up

But when I try set priority different from 1 for task that not associated with interrupt, program compiling fails with error:

error: proc macro panicked
   --> src/main.rs:344:1
    |
344 | / app! {
345 | |     device: stm32f103xx,
346 | |
347 | |     resources: {
...   |
395 | |     },
396 | | }
    | |_^
    |
    = help: message: not enough free interrupts
@bergus
Copy link

bergus commented Jun 23, 2018

You cannot have a task that is not associated with an interrupt. However, RTFM can do the assignment for you (and also put multiple tasks on the same interrupt if they have the same priority); you will need to provide a list like free_interrupts: [EXTI0], for that though.

@burrbull
Copy link
Contributor Author

Any interrupt that I will not use, or some particular?
I think this should be added to user manual in book.
Thanks.

@japaric
Copy link
Collaborator

japaric commented Nov 3, 2018

This is now covered in the book.

@japaric japaric closed this as completed Nov 3, 2018
andrewgazelka pushed a commit to andrewgazelka/cortex-m-rtic that referenced this issue Nov 3, 2021
81: Add a __pre_init function to be called at the start of the reset handler r=korken89 a=yodaldevoid

I needed this for a project so I went ahead and rebased and tweaked @jcsoo 's changes from rtic-rs#71. I will admit, I got a little impatient waiting and that also played into why I did this. If either @jcsoo or @japaric have an issue with this PR, please let me know and I will remove it. I apologize for toes that I have stepped on.

Now onto the PR. This is possibly the simplest implementation that is possible. No nightly features were used in this implementation. Also, there is no hand-holding for the end user; if they want to mess with uninitialized statics, that is on them.

If you would like me to add more documentation, please let me know what you would like to see.

Fixes rtic-rs#17 

Co-authored-by: Jonathan Soo <jcsoo@agora.com>
Co-authored-by: Gabriel Smith <ga29smith@gmail.com>
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

3 participants