FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2016 Threads]
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.
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.