Skip to main content
ASeyo
Associate II
February 8, 2020
Question

__set_BASEPRI -- implicit declaration

  • February 8, 2020
  • 3 replies
  • 2773 views

__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

    This topic has been closed for replies.

    3 replies

    TDK
    February 8, 2020

    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
    ASeyoAuthor
    Associate II
    February 9, 2020

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

    TDK
    February 9, 2020

    So it compiles fine? Maybe rebuild the index.

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