Description Resource Path Location Type
unknown type name 'UBaseType_t' task.h /osiloskop/src line 1156 C/C++ Problem
Description Resource Path Location Type
unknown type name 'UBaseType_t' task.h /osiloskop/src line 2046 C/C++ Problem
Description Resource Path Location Type
unknown type name 'TickType_t' task.h /osiloskop/src line 2013 C/C++ Problem
Description Resource Path Location Type
unknown type name 'TaskFunction_t' task.h /osiloskop/src line 90 C/C++ Problem
Description Resource Path Location Type
unknown type name 'StackType_t' task.h /osiloskop/src line 122 C/C++ Problem
Description Resource Path Location Type
unknown type name 'ListItem_t' task.h /osiloskop/src line 1919 C/C++ Problem
Description Resource Path Location Type
unknown type name 'List_t' task.h /osiloskop/src line 1918 C/C++ Problem
I have task. h file and All these name defined as :
I’m not sure why you are getting this error - but you don’t give me much
of a clue as to what you are doing.
UBaseType_t is included in portmacro.h, which is a header file that is
specific to the port you are using. If you include FreeRTOS.h before
task.h then portmacro.h will be included for you (do not include
pormacro.h manually, just include FreeRTOS.h). However, if you fail to
include FreeRTOS.h before tasks.h then your code will not build anyway
due to the following #error statement:
#ifndef INC_FREERTOS_H
#error "include FreeRTOS.h must appear in source files before
include task.h"
#endif
Unless that is, you are using a very very old version of FreeRTOS.
Thank you so much for your reply
I updated my portmacro.h file But I have these error :
Description Resource Path Location Type
'configMAX_SYSCALL_INTERRUPT_PRIORITY' undeclared (first use in this function) portmacro.h /osiloskop/src line 139 C/C++ Problem
Description Resource Path Location Type
unknown type name 'TaskFunction_t' task.h /osiloskop/src line 155 C/C++ Problem
I found my error But I have only this error again:
Description Resource Path Location Type
'configMAX_SYSCALL_INTERRUPT_PRIORITY' undeclared (first use in this function) portmacro.h /osiloskop/src line 139 C/C++ Problem
I’m afraid I’m not going to look at your code. You need to figure it
out - it is just a header include problem.
Some rules:
The FreeRTOS API functions are prefixed to let you know which header
file to include. For example, if you use xQueueReceive() then you must
include queue.h. HOWEVER if you include a header file that contains
prototypes for FreeRTOS API functions then you must also include
FreeRTOS.h first. For example:
#include "FreeRTOS.h"
#include "queue.h"
Never include FreeRTOSConfig.h, portable.h or portmacro.h yourself,
they are included in FreeRTOS.h, and the order in which FreeRTOS.h
includes header files is correct to avoid dependency issues.
If you are getting dependency issues, like UBaseType_t is being
referenced before it is being declared, then the above rules are being
broken somewhere and you need to work out where. I suspect another
header file is using a FreeRTOS type without FreeRTOS.h being seen
first. The compiler error should tell you which C file generated the
error, so you will have to look at the header files included by that C
file and work backwards.
Thank you but there are lots of freeRTOSConfig.h(I mean header file name are same bıt their code is different like freertosconfig.h) How can I decide that which is true?
FreeRTOSConfig.h is an APPLICATION header file, that should be part of YOUR application, and not just taken from some random place. In the FreeRTOS distibution there are lots of copies of it under the ‘Demo’ folder, as this is full of demo applications for many different systems.
If you started your application based on one of the demo, then you should have copied the file with the rest of the demo application.
even i faced this issue in my workspace, the root cause is portmacro.h header file was added in 2 places, ThirdParty\FreeRTOS\include and ThirdParty\FreeRTOS\portable\GCC\ARM_CM4F
i compared both and i found both are different, so i deleted portmacro.h under ThirdParty\FreeRTOS\include and keeping only under ThirdParty\FreeRTOS\portable\GCC\ARM_CM4F, then this issue is resolved
That would be an error in whoever packaged FreeRTOS for that system, as portmacro.h should NOT appear in FreeRTOS\include but only in an appropriate folder under portable.