2020-02-08 07: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?
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.
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.
2020-02-09 07:07 AM
So it compiles fine? Maybe rebuild the index.