problem importing CubeMX FreeRTOS project

Sysprogs forums Forums VisualGDB problem importing CubeMX FreeRTOS project

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11166
    Dubbie
    Participant

    Hi,

    I am having a little trouble importing a project generated by the cubeMX, including FreeRTOS.

    For some reason the osThreadDef macro isn’t being found. If I rightclick and choose “go to declaration” it goes to the cmsis_os.h as expected, but “go to definition” does nothing.

    The other weird thing is that there seems to be a missing argument on the CubeMX version of the osThreadDef macro.

    I tried the VisualGDB sample project, and that works just fine.

    I have successfully imported and built non-FreeRTOS projects in the past. Any hints here would be very appreciated.

    Thanks in advance.

     

    #11172
    Dubbie
    Participant

    Self reply…

    I have fixed this. As expected, it was an “incompetent user fault”

    VS2015 suggested I add a bunch of paths to the VisualGDB include paths. I had said “Sure, why not” One of those paths contained the wrong version of the cmsis_os.h

    Deleted that path and everything sprang into life.

    😀

    #11180
    support
    Keymaster

    Hi,

    Yes, sorry about that. The STM32 BSP comes with different versions of the cmsis_os.h and the VisualGDB header discovery does not go deep enough to validate them.

    Normally if you add references to FreeRTOS via the Embedded Frameworks page, VisualGDB should set the correct include directories automatically and you won’t need to fix anything manually.

    #25236
    Seidleroni
    Participant

    In case someone comes across this in the future like I did, here is what you need to do:

    -Include the cmsis_os.c/.h files from “\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS”

    -Add the port.c and portmacro.h files from “\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1”

     

    #25240
    support
    Keymaster

    Thanks for sharing this!

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