__set_BASEPRI -- implicit declaration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-08 7:03 AM
__set_PRIMASK(1); // No error
__set_BASEPRI(3 << 4); // Implicit declaration
This is a snippet of my code from keil uvision5. But, the IDE results in a syntax error; implicit declaration of function ' __set_BASEPRI ' is invalid in C99 is the error. Why can't the IDE detect __set_BASEPRI as a built in function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-08 12:11 PM
Are those functions #included somewhere before they're used? Trace the include paths to ensure.
For me, they're declared in the same file, but maybe not on your implementation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-08 11:10 PM
They are built in CMSIS functions and I have already included CMSIS Core. __set_PRIMASK works fine but __set_BASEPRI doesn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-09 7:07 AM
So it compiles fine? Maybe rebuild the index.
