Problem with ProfilerRTOS_FreeRTOS.c

Sysprogs forums Forums VisualGDB Problem with ProfilerRTOS_FreeRTOS.c

This topic contains 3 replies, has 2 voices, and was last updated by  elivoe 2 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30858

    elivoe
    Participant

    Hi,

     

    in the ProfilerRTOS_FreeRTOS.c file there is the following function:

    If I compile a project with FreeRTOS and FastSemihosting I get the compiler errors “Error conflicting types for ‘xQueueGenericSendFromISR’ …” and “Error conflicting types for ‘xQueueReceiveFromISR’ …”. This is because the file includes “FreeRTOS.h” which further includes “queue.h” (at least in the FreeRTOS port I use). So the declaration of those two functions is in the same c file and gets compiled into the same object. As the declaration does not match (return type and paramters) the compiler throws those two error messages. Of course I can fix this for myself but I would have to change it any time you update the FastSemihosting code. It would be great if you could fix it in your code as well.

     

    Thanks!

     

    Elias

    • This topic was modified 2 years, 3 months ago by  support. Reason: formatting
    #30859

    elivoe
    Participant

    A possible fix could be something like that:

    So it detects if the “queue.h” file is included by checking if the xQueueSendFromIsr is defined.

     

    • This reply was modified 2 years, 3 months ago by  support. Reason: formatting
    #30870

    support
    Keymaster

    Hi,

    Thanks for pointing it out. Indeed, in our test setups, the FreeRTOS.h did not directly include queue.h, so the profiler hooks built without any issues.

    We have switched ProfilerRTOS_FreeRTOS.c to reference the FreeRTOS functions in a way that does not depend on the included headers. You can find the details in this commit. The fix will be included in the next update of our profiler framework.

    #30871

    elivoe
    Participant

    Hi,

     

    Thank you for your quick response and the fix!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.