warning:- unused parameters pvparameters

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. MANY THANKS TO EVERONE IN ADVANCE

warning:- unused parameters pvparameters

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**” Many Thanks

warning:- unused parameters pvparameters

Tasks have the following prototype: void vTaskFunction( void *pvParameters ) { } 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: ( void ) pvParameters; into the task body.

warning:- unused parameters pvparameters

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.** 2) initialization makes integer from pointer without a cast unsigned int intstack = &__ISTACK; (what is wrong in this initialisation ?) Kindly help me in this regard thank you very much in advance, Regards, Deepak

warning:- unused parameters pvparameters

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.
2) 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). unsigned int intstack = (unsigned int) &__ISTACK; again though – these are not FreeRTOS questions.

warning:- unused parameters pvparameters

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. Regards, Deepak

warning:- unused parameters pvparameters

*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.

warning:- unused parameters pvparameters

Thank you very much for your comments Richard, i will try and update it and come back to you if I found something i struggle with. Thank you again for your invaluable support.

warning:- unused parameters pvparameters

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 vLEDonTask (void *pvParameters) { (void) pvParameters; for(;;) { InitLED(); } } Create task API xTaskCreate( vLEDonTask, “LED ON”, 128, NULL, LEDONTASK_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. Please help me in this regard. Regards, Deepak

warning:- unused parameters pvparameters

Can you walk us through what you expect this code to do – thanks.

warning:- unused parameters pvparameters

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. Even a vTaskDelay(1) might help.

warning:- unused parameters pvparameters

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.

warning:- unused parameters pvparameters

hello Richard and Richard, Thank you very much for the reply, 1) 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. 2) I am to switch on two different LEDs use two task function. 3) I will attach the source file with comments on it. 4) the InitLED is the functionjust turn on the leds. Attachment 1) main0.c – please look from line 76 2) 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?

warning:- unused parameters pvparameters

this is led.h which defines the function of LED for Infineon microcontroller. Kindly help me in this regard on how to flash the led using task functions. Regards, Deepak

warning:- unused parameters pvparameters

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

warning:- unused parameters pvparameters

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 vLEDonTask (void *pvParameters) { (void) pvParameters; for(;;) { InitLED(); } } Create task API xTaskCreate( vLEDonTask, “LED ON”, 128, NULL, LEDONTASK_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. Thank you in advance, Kind Regards, Deepak

warning:- unused parameters pvparameters

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?

warning:- unused parameters pvparameters

hello richard, thank you very much for replying. 1) Yes there are functions to turn ON and Clear the LEDs. (LED_on() and ClearLED()) in led.h file 2) Yes, you are right, I Initialise the LED and clear the LED in main function. 3) When I try to implement the LEDON() 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 vLEDonTask (void *pvParameters) { (void) pvParameters; for(;;) { InitLED(); // it will switch On or turn ON four LEDs } } Deepak

warning:- unused parameters pvparameters

Can you show the code of initLED()?

warning:- unused parameters pvparameters

Please have a look at the attached file for led.h.

warning:- unused parameters pvparameters

Please have a look at the attached file for led.h.

warning:- unused parameters pvparameters

define InitLED(); portLED->IOCR8.U=0x80808080; // initialise and switch on four leds from their port pin

warning:- unused parameters pvparameters

Before I make any further replies please reply to my questions. “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).” In other words, have you tested the function does what you expect when you are not using FreeRTOS? Why would doing something that accesses a port, that is writes to hardware with no dependency on FreeRTOS, behave differently inside a task than outside a task?

warning:- unused parameters pvparameters

hello richard, The scheduler is working. the problem is with the clearLED() fuction which was called before the InitLED task. Now the Task body is working. I am now trying to toggle the led inside the task body. Sorry for the inconviince caused Richard. Many Thanks for your continous support.