Quality RTOS & Embedded Software

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


undefined reference to `xQueueCreateCountingS

Posted by parera on November 22, 2011
I wanted to use counting semaphores in a RX62 FreeRtos Project, GnuRX toolchain, the iead was to use
xSemaphoreGiveFromISR( xSci_Semaphore, &xHigherPriorityTaskWoken ); inside the SCI rx interrupt to detect comands on the serial port

i declare the

static xSemaphoreHandle xSci_Semaphore = NULL; //pot ser counting o Binary
when i call the function

xSci_Semaphore=xSemaphoreCreateCounting( 10,0);//fins a rebre 10 salts de linia no pot quedar-se pillat

I get

Phase Compiler finished
Phase Linker starting

C:\WorkSpace\Mine_RTOS_702\Mine_RTOS_702\Debug\main_.o: In function `GPS':

C:\WorkSpace\Mine_RTOS_702\Mine_RTOS_702/main_.c:194: undefined reference to `xQueueCreateCountingSemaphore'

Phase Linker finished

Build Finished

1 Error, 0 Warnings

in FreeRTOSConfig.h i have defined

#define configUSE_MUTEXES 1

and i have included this in main_.c

/* FreeRTOS.org includes. */
/* Kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "queue.h"

Before i just used a binarySemaphore just fine in the same project, even if i try to use it in the reference project i get the same error.
In the book, the example 12 uses thet function just fine on the Renesas compiler hew project

Thank you very much for reading and any help or hints

RE: undefined reference to `xQueueCreateCountingS

Posted by woops_ on November 22, 2011
“#define configUSE_MUTEXES 1

Is this cut from your source or a mistype in your post? "Config" must be "config"

RE: undefined reference to `xQueueCreateCountingS

Posted by parera on November 23, 2011
thank you very much woops, it was that, yes that was a copy paste and was a mistype

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

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner