Hello Developers, i am trying to run FreeRTOS with Infineon Triboard. I have endedup with an warning “unused parameter’pvParameters”. I found this warning is from a function “task.h” file #define xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ) )
Please cany anyone help me in this regards by saying why this warning appears as I am new to RTOS AS WELL.
Foolowing the above query, the above mention function “xTaskCreate()” is throwing an another warning “pointer targets in passing argument 2 of xTask GeneriCreate differ in signdness**”
If you do not use the parameter passed in then you will get the warning
“unused parameter”. To silence the warning simply use the parameter in
a benign way, such as adding:
Hello Richard, i trust you are doing well, thank you very much for the response and very much apprieciated, It indeed sorted the problem. I am new to RTOS so struggling to find out some answers for the errors and warning. Because FreeRTOS is the basement to bag a huge project from my company.
i have some warnings listed below, if possible can you shed some of your knowledge please,
1)** “pointer targets in passing argument 2 of 'xTaskGenericCreate’differ in signedness [-Wpointer-sign]” for the macro. i have attached the macro.**
initialization makes integer from pointer without a cast
unsigned int intstack = &__ISTACK; (what is wrong in this initialisation ?)
These are really C questions, rather than FreeRTOS specific questions.
1)“pointer targets in passing argument 2 of 'xTaskGenericCreate’differ
in signedness [-Wpointer-sign]” for the macro. i have attached the macro.
Argument 2 is a char* (string) so I’m going to guess your compiler is
set to treat all ‘char’ as ‘unsigned char’ hence you get an ‘unsigned
char *’ where you expect a ‘char *’ - or the other way around.
Which version of FreeRTOS are you using? Some really, really old
versions used to have specific types here, but now it is just plain old
‘char *’ so there is something odd with the compiler command line.
initialization makes integer from pointer without a cast
unsigned int intstack = &__ISTACK; (what is wrong in this initialisation ?)
Well I don’t know how __ISTACK is defined, but if you are taking the
address of it, then you are left with a pointer. You are then assigning
that pointer to an unsigned int. So, as per the warning, you are
creating an unsigned int from an address (pointer). You can cast the
address to an unsigned int, if you are 100% sure it is valid to do so
(width of address will always fit in an unsigned int).
Hello Richard,
Kindly accept my apology for these kind of questions. I realised it after i send you the request and I kindly make sure it will not repeated again.
i am using Infineon TC277 microcontroller (Infineon Triboard) for our Research Project. I use Eclipse IDE with GCC compiler.
I managed to get FreeRTOS (v7.1.0) files for this microcontroller from Infineon.
I am planning to update the RTOS files with the latest version.
**if i update the FreeRTOS files to latest version, Does it impact the existing Task body and functions which is supported by version 7.1?
**
Thank you very much for the support.
*if i update the FreeRTOS files to latest version, Does it impact the
existing Task body and functions which is supported by version 7.1?
*
I don’t think so. 7.1 is very old though, I think there are some
behavioral differences with things like how priority inheritance works,
which in turn imposes more restrictions on how mutexes can be used from
interrupts, etc.
Hello,
i am trying to run a Task and my target boad is Triboard TC277. It is a tricore mcrocontroller, The below is my task body,
void vLEDon_Task (void *pvParameters)
{
(void) pvParameters;
for(;
{
InitLED();
}
} Create task API
xTaskCreate( vLEDon_Task, “LED ON”, 128, NULL, LED_ON_TASK_PRIORITY, NULL );
Every time it hits the “InitLED();” function but i cannot see any physical LEDs coming ON in the target board. Am i doing something wrong in the Task body. It is given higher priority.
Note:-The led works fine as I saw it at the time of LED initialisation.
Do you REALLY want to keep initializing the LED. (its in the loop). You likely also want the task to block or delay on something or it will just keep on running and keep other tasks from running.
Best they describe what the expected behaviour is as it is not clear
what InitLED is doing, or why calling it in a tight loop would behave
differently when it is done in a task compared to just from main()
before the scheduler has started.
hello Richard and Richard,
Thank you very much for the reply,
I am trying to toggle LED’s from the target Board. Before making the toggle function I first wanted to acheive to switch the LEDs ON using the Task body function.
I am to switch on two different LEDs use two task function.
I will attach the source file with comments on it.
the InitLED is the functionjust turn on the leds.
Attachment
main0.c - please look from line 76
led.h - declaration of LED function
Please help me as where I am going wrong and how to flash a LED, Am ! missing some logic here?
Hello Richard,
Please can you shed some light on the above question. Kindly do not hesitate to ask me for more infomation.
Kindly help me in this regard.
Thank you very much in avance.
Deepak
Hello Guys,
Kindly reply , Have I given a confused you with the questions. Please shed some light on the topic.
i am trying to run a Task and my target boad is Triboard TC277. It is a tricore mcrocontroller,
The below is my task body,
void vLEDon_Task (void *pvParameters)
{
(void) pvParameters;
for(;
{
InitLED();
}
}
Create task API
xTaskCreate( vLEDon_Task, “LED ON”, 128, NULL, LED_ON_TASK_PRIORITY, NULL );
Every time it hits the “InitLED();” function but i cannot see any physical LEDs coming ON in the target board. Am i doing something wrong in the Task body. It is given higher priority.
Note:-The led works fine as I saw it at the time of LED initialisation.
My answer is as per before really - if you sit in a tight loop
repeatedly initialising the LED, what do you expect to happen? If you
believe continuously initialising and re-initialising the LED will
result in the LED being turned on, then how does the behaviour differ
when you do this from inside a task compared to when you do it from
main() (without the scheduler running). Is there a function to turn the
LED on that you could just call once?
Yes there are functions to turn ON and Clear the LEDs. (LED_on() and ClearLED()) in led.h file
Yes, you are right, I Initialise the LED and clear the LED in main function.
When I try to implement the LED_ON() function inside the task it is not switicng ON the LED. Atleast in a tight loop the LED should be constantly switched On but in my task it is not switching ON the LED.
void vLEDon_Task (void *pvParameters)
{
(void) pvParameters;
for(;
{
InitLED(); // it will switch On or turn ON four LEDs
}
}