Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

portBASE_TYPE conflict definition with vtaskDelayUntil()

Posted by chaabanemalki on April 15, 2014

Hello,

I migrated from freeRTOS 7.6.0 to 8.0.0

when building the same project of a PIC32Mx using XC32 1.31 and FreeRTOS 8.0.0

I get this error everytime i use vtaskDelayUntil() ../GPS/GPS.c:488:21: warning: passing argument 1 of 'vTaskDelayUntil' from incompatible pointer type ../Source/include/task.h:599:6: note: expected 'TickType_t * const' but argument is of type 'long int *'

But I don't get it with FreeRTOS 7.6.0

here is my line of code

portBASETYPE xLastTimeWakeTask; vTaskDelayUntil(&xLastTimeWakeTask, 100/portTICKRATE_MS);

the first argument (portTickType) in vtaskDelayUntil() is defined :

in 7.6.0 : typedef unsigned long portTickType;

in 8.0.0 : typedef uint32t TickTypet; and in microchip type definition i find

typedef __ uint32t uint32t; typedef unsigned int __ uint32_t;

and this makes TickType_t an unsigned int.

I changed the definition of TickTypet to long like portBASETYPE, would that make a mess after ?


portBASE_TYPE conflict definition with vtaskDelayUntil()

Posted by davedoors on April 15, 2014

In both V7.6.0 and V8.0.0 the tick type has been unsigned. Your code snipped is declaring xLastTimeWakeTask as a signed portBASE_TYPE. This has probably always been wrong in your code but not been highlighted until you switch to v8 because in v8 it is attempting an implicit conversion to a typedef.

Try building against V7.6.0 with the -Wextra compiler option. Does it generate a warning then?

Have a look at http://www.freertos.org/upgrading-to-FreeRTOS-V8.html#typedefs


portBASE_TYPE conflict definition with vtaskDelayUntil()

Posted by chaabanemalki on April 15, 2014

Thank you for the clarificaiton, I mixed between portBASE_TYPE and portTickType


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists