cancel
Showing results for 
Search instead for 
Did you mean: 

__set_BASEPRI -- implicit declaration

ASeyo
Associate II

__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?0690X00000D8iehQAB.png

3 REPLIES 3
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
ASeyo
Associate II

They are built in CMSIS functions and I have already included CMSIS Core. __set_PRIMASK works fine but __set_BASEPRI doesn't.

So it compiles fine? Maybe rebuild the index.

If you feel a post has answered your question, please click "Accept as Solution".