Error: unknown type name when using IAR with VisualGDB

Sysprogs forums Forums VisualGDB Error: unknown type name when using IAR with VisualGDB

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35025
    LS
    Participant

    Hello!

    I’m using the IAR ARM compiler for STM32 with VisualGDB. The original IAR project was imported into a new VisualGDB project.

    However, some keyword macro’s are not recognized by Clang IntelliSense, such as __no_init or __root. This means that the code gives multiple “Error: unknown type name” errors which is not correct, because it will be recognized by the IAR compiler.

    See attachment for more details.

    Is there any way to include or ignore this keyword macro?

    • This topic was modified 3 months ago by LS.
    • This topic was modified 3 months ago by LS.
    • This topic was modified 3 months ago by LS.
    • This topic was modified 3 months ago by LS.
    Attachments:
    You must be logged in to view attached files.
    #35034
    support
    Keymaster

    Hi,

    Sure, VisualGDB provides a special mechanism for fine-tuning that behavior:

    1. It defines a __SYSPROGS_CODESENSE__ macro on the IntelliSense level. The macro is not defined during build, so all code enclosed in #ifdef __SYSPROGS_CODESENSE__ will only affect IntelliSense.
    2. It forcibly includes %VISUALGDB_DIR%\gcc_compat.h file when using IntelliSense. The file contains various empty definitions for various macros that would otherwise cause errors.

    You can eliminate the errors you mentioned by adding the following lines in gcc_compat.h (inside #ifdef __IAR_SYSTEMS_ICC__):

    #define __no_init
    #define __root

    It will only affect IntelliSense and will not interfere with the build.

     

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