Clang IntelliSense: Error: use of undeclared identifier __nop

Sysprogs forums Forums VisualGDB Clang IntelliSense: Error: use of undeclared identifier __nop

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7682
    kunzeti
    Participant

    Hello,

    I’m new in VisualGDB and I try to Import a KEIL µVision Project. Now I get the error, that __nop is undeclared identifier. My Hardware is a LPC1768.

    The Main.cpp is as followed:

    #include “LPC17xx.h”

    #include “stdbool.h”

    int main(void)

    {

    while (ture)

    {

    __nop();

    }

    }

     

     

    The current Building and linking Defines in VisualGDB Project Properties -> Embedded Project are:

    DEBUG __ARMCC_VERSION=560020 __arm__ __CC_ARM

    <span class=”hps”>Are the</span> <span class=”hps”>settings</span> <span class=”hps”>correct? Did I forgot something?</span>

    • This topic was modified 8 years, 9 months ago by kunzeti.
    • This topic was modified 8 years, 9 months ago by kunzeti.
    #7694
    support
    Keymaster

    Hi,

    This happens because _nop()  is not a GCC compiler extension and VisualGDB IntelliSense does not know about it.

    You can work around it by adding something like #define _nop() to gcc_compat.h in the VisualGDB directory. The definition will only affect IntelliSense, so the code will be compiled the same way as before.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.