Unknown Type Name UBaseType_t

freertos90 wrote on Wednesday, April 12, 2017:

Hello ;
I have this error :

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 :

typedef BaseType_t (*TaskHookFunction_t)( void * );

Why I have this error ?

rtel wrote on Thursday, April 13, 2017:

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.

freertos90 wrote on Thursday, April 13, 2017:

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

rtel wrote on Thursday, April 13, 2017:

Please show the order in which you include the header files.

freertos90 wrote on Thursday, April 13, 2017:

My main file starts likes attachments

freertos90 wrote on Thursday, April 13, 2017:

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

rtel wrote on Thursday, April 13, 2017:

Are you including header files from within other header files?

freertos90 wrote on Thursday, April 13, 2017:

Yes
Can I ask question? Where should be this function ‘configMAX_SYSCALL_INTERRUPT_PRIORITY’ other from portmacro

rtel wrote on Thursday, April 13, 2017:

That should be defined in FreeRTOSConfig.h.

freertos90 wrote on Friday, April 14, 2017:

Actually I want to run these code Which file should added for running these code:
pixel_constant.h
mem_control.h
mem_control.c
main.c
You shoul see in step 5 here http://www.instructables.com/id/Digital-Oscilloscope-using-Digilent-Zybo-Board/

rtel wrote on Friday, April 14, 2017:

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:

  1. 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"
  1. 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.

freertos90 wrote on Friday, April 14, 2017:

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?

richard_damon wrote on Saturday, April 15, 2017:

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.