2020-03-27 08:59 AM
Hi,
I am trying to implement Queues for my application having three tasks. Two tasks sending messages and third task will receive the messages from task 1 and task 2.
But when I build I am getting this errors.
20:52:21 **** Incremental Build of configuration Debug for project GPS_UART_1 ****
make -j4 all
arm-none-eabi-gcc “…/Core/Src/main.c�? -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DDEBUG -DSTM32F407xx -c -I…/Middlewares/Third_Party/FreeRTOS/Source/include -I…/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I…/Drivers/CMSIS/Include -I…/Drivers/STM32F4xx_HAL_Driver/Inc -I…/Core/Inc -I…/Drivers/CMSIS/Device/ST/STM32F4xx/Include -I…/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I…/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o “Core/Src/main.o�?
arm-none-eabi-gcc -o “GPS_UART_1.elf�? @“objects.list�? -mcpu=cortex-m4 -T"F:\Target\STM32Proto\GPS_UART_Reception\STM32F407VGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map=“GPS_UART_1.map�? -Wl,–gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -u _scanf_float -Wl,–start-group -lc -lm -Wl,–end-group
Core/Src/main.o: In function
main': F:/Target/STM32Proto/GPS_UART_Reception/Debug/../Core/Src/main.c:238: undefined reference to
xQueueCreateSet’
F:/Target/STM32Proto/GPS_UART_Reception/Debug/…/Core/Src/main.c:241: undefined reference to
xQueueAddToSet' F:/Target/STM32Proto/GPS_UART_Reception/Debug/../Core/Src/main.c:242: undefined reference to
xQueueAddToSet’
Core/Src/main.o: In function
Serial_Receive_2': F:/Target/STM32Proto/GPS_UART_Reception/Debug/../Core/Src/main.c:467: undefined reference to
xQueueSelectFromSet’
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:49: GPS_UART_1.elf] Error 1
“make -j4 all�? terminated with exit code 2. Build might be incomplete.
20:52:28 Build Failed. 5 errors, 0 warnings. (took 7s.366ms)
Please help me out.
If I am using queue sets then you must have configUSE_QUEUE_SETS set to 1 in FreeRTOSCOnfig.h. But this is not found
Regards,
Kumar
2020-03-27 05:26 PM
Yes, you need a queue set for task 3 to receive messages from tasks 1 and 2.
You have to add configUSE_QUEUE_SETS to FreeRTOSCOnfig.h yourself, like this.
<snip>
/* USER CODE BEGIN Defines */
/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
#define configUSE_QUEUE_SETS 1
/* USER CODE END Defines */
#endif /* FREERTOS_CONFIG_H */