Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Version 9.0.0.rc2, queue.c build defect

Posted by jkovacic on March 30, 2016

I've just tried to compile a very simple GCC/ARM-based project with FreeRTOS v9.0.0rc2. Compilation failed with the following output:

arm-none-eabi-gcc -c -mcpu=arm926ej-s -Wall -Wextra -Werror -IFreeRTOS/Source/include/ -IDemo/ -IFreeRTOS/Source/portable/GCC/ARM926EJ-S/ FreeRTOS/Source/queue.c -o obj/queue.o FreeRTOS/Source/queue.c:472:13: error: 'prvInitialiseMutex' defined but not used [-Werror=unused-function] static void prvInitialiseMutex( Queue_t *pxNewQueue ) ^ cc1: all warnings being treated as errors

(yes, the compiler is configured to treat all warnings as errors). The reason is obvious: my project is very simple and does not use mutexes at all, hence the function "prvInitialiseMutex", declared and defined in queue.c, is never called. BTW, this functiuon first appeared in this version.

I've fixed this issue by simply enclosing the declaration and definition of this function with: if ( configUSE_MUTEXES == 1 )

By doing that, my demo does build and works as expected.

I have committed this "workaround" into a side branch of my demo project, feel free to take a look at it and compare my queue.c with the original one. If you need further information, you may find my contact details in my GitHub profile.

Looking forward to hear about the official solution of this issue.

Version 9.0.0.rc2, queue.c build defect

Posted by rtel on March 30, 2016

Good feedback, thanks. Our testing tends to use comprehensive configurations so warnings generated by simpler configurations can be missed. It is always the aim to have no warnings.

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

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS