[ABANDONED] FreeRTOS - CMSIS build errors

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] FreeRTOS - CMSIS build errors

    Hi,

    I'm currently working on a project using IAR EWARM, which is using the STemWin API library and the FreeRTOS library.

    I wanted to try Embedded Studio to see how it does compared to IAR, and it mostly builds except for 14 errors when compiling the 'cmsis_os.c', which is part of the FreeRTOS and comes with the STemWin library.
    (ie you can find it in your latest StemWin 1.4.0, "STemWin_Library_V1.4.0\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c"


    I made a simple 'temp' project with just enough of the files to only compile the 'cmsis_os.c' file, and zipped it up, so you can easily reproduce...

    this is the output of the compliation errors, seems like the compiler is having issues interpreting the 'inline function declarations in the 'cmsis_gcc.h' file, particulary the ones that have inline asm in the declaration...

    Source Code

    1. Building ‘cmsis_os.c’ from project ‘Executable_1’ from solution ‘Executable_1’ in configuration ‘Debug’
    2. Compiling ‘cmsis_os.c’
    3. cmsis_os.c
    4. macro "__get_CONTROL" passed 1 arguments, but takes just 0
    5. expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    6. cmsis_os.h
    7. cmsis_os.c
    8. expected identifier or '(' before '__asm__'
    9. cmsis_os.c
    10. macro "__get_APSR" passed 1 arguments, but takes just 0
    11. expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    12. macro "__get_PRIMASK" passed 1 arguments, but takes just 0
    13. expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    14. cmsis_os.h
    15. cmsis_os.c
    16. expected identifier or '(' before '__asm__'
    17. cmsis_os.c
    18. macro "__get_BASEPRI" passed 1 arguments, but takes just 0
    19. expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    20. cmsis_os.h
    21. cmsis_os.c
    22. expected identifier or '(' before '__asm__'
    23. cmsis_os.c
    24. macro "__get_FAULTMASK" passed 1 arguments, but takes just 0
    25. expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    26. cmsis_os.h
    27. cmsis_os.c
    28. expected identifier or '(' before '__asm__'
    29. Build failed
    Display All
    Files
    • TEMP.zip

      (305.11 kB, downloaded 223 times, last: )
  • Well, just to update:

    It appears there are conflicts of about 6 or so functions in the 'cmsis_gcc.h', which comes with Free_RTOS, and the same functions declared in the 'intrinsics.h', that comes with Segger Studio..

    ie '\SEGGER\SEGGER Embedded Studio for ARM 4.16\include\intrinsics.h'

    example
    cmsis_gcc.h:


    Source Code

    1. __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_CONTROL(void)


    intrinsics.h:

    Source Code

    1. unsigned __get_CONTROL(void);#endif#define __get_CONTROL()\({\ unsigned long __bp;\ __asm__ __volatile__("mrs %[bp], CONTROL"\ : [bp] "=r"(__bp));\ __bp;\})#endif

    So for some reason these functions are not defined the same within the Embedded Studio and elsewhere...