Hello. I have downloaded your modbus library and I am trying to use it. I use STM32F407. I have followed the steps that you have suggested:
When I try to build the project, I get 30 errors ( most of them are due to unknown types)
In file included from ../MODBUS-LIB/Src/Modbus.c:14:
C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc/Modbus.h:195:2: error: unknown type name 'osMessageQueueId_t'
195 | osMessageQueueId_t QueueTelegramHandle;
| ^~~~~~~~~~~~~~~~~~
C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc/Modbus.h:198:2: error: unknown type name 'osThreadId_t'
198 | osThreadId_t myTaskModbusAHandle;
| ^~~~~~~~~~~~
C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc/Modbus.h:204:2: error: unknown type name 'osSemaphoreId_t'
204 | osSemaphoreId_t ModBusSphrHandle;
| ^~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:44:7: error: unknown type name 'osMessageQueueAttr_t'
44 | const osMessageQueueAttr_t QueueTelegram_attributes = {
| ^~~~~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:45:8: error: field name not in record or union initializer
45 | .name = "QueueModbusTelegram"
| ^
../MODBUS-LIB/Src/Modbus.c:45:8: note: (near initialization for 'QueueTelegram_attributes')
../MODBUS-LIB/Src/Modbus.c:45:16: warning: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
45 | .name = "QueueModbusTelegram"
| ^~~~~~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:45:16: note: (near initialization for 'QueueTelegram_attributes')
../MODBUS-LIB/Src/Modbus.c:49:7: error: unknown type name 'osThreadAttr_t'
49 | const osThreadAttr_t myTaskModbusA_attributes = {
| ^~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:50:5: error: field name not in record or union initializer
50 | .name = "TaskModbusSlave",
| ^
../MODBUS-LIB/Src/Modbus.c:50:5: note: (near initialization for 'myTaskModbusA_attributes')
../MODBUS-LIB/Src/Modbus.c:50:13: warning: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
50 | .name = "TaskModbusSlave",
| ^~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:50:13: note: (near initialization for 'myTaskModbusA_attributes')
../MODBUS-LIB/Src/Modbus.c:51:5: error: field name not in record or union initializer
51 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:51:5: note: (near initialization for 'myTaskModbusA_attributes')
../MODBUS-LIB/Src/Modbus.c:51:18: error: 'osPriority_t' undeclared here (not in a function); did you mean 'osPriority'?
51 | .priority = (osPriority_t) osPriorityNormal,
| ^~~~~~~~~~~~
| osPriority
../MODBUS-LIB/Src/Modbus.c:51:17: warning: excess elements in scalar initializer
51 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:51:17: note: (near initialization for 'myTaskModbusA_attributes')
../MODBUS-LIB/Src/Modbus.c:51:32: error: expected '}' before 'osPriorityNormal'
51 | .priority = (osPriority_t) osPriorityNormal,
| ^~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:49:49: note: to match this '{'
49 | const osThreadAttr_t myTaskModbusA_attributes = {
| ^
../MODBUS-LIB/Src/Modbus.c:55:7: error: unknown type name 'osThreadAttr_t'
55 | const osThreadAttr_t myTaskModbusA_attributesTCP = {
| ^~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:56:5: error: field name not in record or union initializer
56 | .name = "TaskModbusSlave",
| ^
../MODBUS-LIB/Src/Modbus.c:56:5: note: (near initialization for 'myTaskModbusA_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:56:13: warning: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
56 | .name = "TaskModbusSlave",
| ^~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:56:13: note: (near initialization for 'myTaskModbusA_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:57:5: error: field name not in record or union initializer
57 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:57:5: note: (near initialization for 'myTaskModbusA_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:57:17: warning: excess elements in scalar initializer
57 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:57:17: note: (near initialization for 'myTaskModbusA_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:57:32: error: expected '}' before 'osPriorityNormal'
57 | .priority = (osPriority_t) osPriorityNormal,
| ^~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:55:52: note: to match this '{'
55 | const osThreadAttr_t myTaskModbusA_attributesTCP = {
| ^
../MODBUS-LIB/Src/Modbus.c:65:7: error: unknown type name 'osThreadAttr_t'
65 | const osThreadAttr_t myTaskModbusB_attributes = {
| ^~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:66:5: error: field name not in record or union initializer
66 | .name = "TaskModbusMaster",
| ^
../MODBUS-LIB/Src/Modbus.c:66:5: note: (near initialization for 'myTaskModbusB_attributes')
../MODBUS-LIB/Src/Modbus.c:66:13: warning: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
66 | .name = "TaskModbusMaster",
| ^~~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:66:13: note: (near initialization for 'myTaskModbusB_attributes')
../MODBUS-LIB/Src/Modbus.c:67:5: error: field name not in record or union initializer
67 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:67:5: note: (near initialization for 'myTaskModbusB_attributes')
../MODBUS-LIB/Src/Modbus.c:67:17: warning: excess elements in scalar initializer
67 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:67:17: note: (near initialization for 'myTaskModbusB_attributes')
../MODBUS-LIB/Src/Modbus.c:67:32: error: expected '}' before 'osPriorityNormal'
67 | .priority = (osPriority_t) osPriorityNormal,
| ^~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:65:49: note: to match this '{'
65 | const osThreadAttr_t myTaskModbusB_attributes = {
| ^
../MODBUS-LIB/Src/Modbus.c:72:7: error: unknown type name 'osThreadAttr_t'
72 | const osThreadAttr_t myTaskModbusB_attributesTCP = {
| ^~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:73:5: error: field name not in record or union initializer
73 | .name = "TaskModbusMaster",
| ^
../MODBUS-LIB/Src/Modbus.c:73:5: note: (near initialization for 'myTaskModbusB_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:73:13: warning: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
73 | .name = "TaskModbusMaster",
| ^~~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:73:13: note: (near initialization for 'myTaskModbusB_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:74:5: error: field name not in record or union initializer
74 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:74:5: note: (near initialization for 'myTaskModbusB_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:74:17: warning: excess elements in scalar initializer
74 | .priority = (osPriority_t) osPriorityNormal,
| ^
../MODBUS-LIB/Src/Modbus.c:74:17: note: (near initialization for 'myTaskModbusB_attributesTCP')
../MODBUS-LIB/Src/Modbus.c:74:32: error: expected '}' before 'osPriorityNormal'
74 | .priority = (osPriority_t) osPriorityNormal,
| ^~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:72:52: note: to match this '{'
72 | const osThreadAttr_t myTaskModbusB_attributesTCP = {
| ^
../MODBUS-LIB/Src/Modbus.c:82:7: error: unknown type name 'osSemaphoreAttr_t'
82 | const osSemaphoreAttr_t ModBusSphr_attributes = {
| ^~~~~~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:83:5: error: field name not in record or union initializer
83 | .name = "ModBusSphr"
| ^
../MODBUS-LIB/Src/Modbus.c:83:5: note: (near initialization for 'ModBusSphr_attributes')
../MODBUS-LIB/Src/Modbus.c:83:13: warning: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
83 | .name = "ModBusSphr"
| ^~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c:83:13: note: (near initialization for 'ModBusSphr_attributes')
../MODBUS-LIB/Src/Modbus.c: In function 'ModbusInit':
../MODBUS-LIB/Src/Modbus.c:226:33: warning: implicit declaration of function 'osThreadNew'; did you mean 'osThreadDef'? [-Wimplicit-function-declaration]
226 | modH->myTaskModbusAHandle = osThreadNew(StartTaskModbusSlave, modH, &myTaskModbusA_attributes);
| ^~~~~~~~~~~
| osThreadDef
../MODBUS-LIB/Src/Modbus.c:263:33: warning: implicit declaration of function 'osMessageQueueNew'; did you mean 'osMessageDelete'? [-Wimplicit-function-declaration]
263 | modH->QueueTelegramHandle = osMessageQueueNew (MAX_TELEGRAMS, sizeof(modbus_t), &QueueTelegram_attributes);
| ^~~~~~~~~~~~~~~~~
| osMessageDelete
../MODBUS-LIB/Src/Modbus.c:265:34: warning: comparison between pointer and integer
265 | if(modH->QueueTelegramHandle == NULL)
| ^~
../MODBUS-LIB/Src/Modbus.c:276:35: warning: comparison between pointer and integer
276 | if (modH->myTaskModbusAHandle == NULL)
| ^~
arm-none-eabi-gcc "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c" -mcpu=cortex-m4 -std=gnu11 -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/ADS7828/Inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/Custom_IO/Inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/MCP41/Inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/PCA9539/Inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/TB_specific/inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/UART3/inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc" -I"C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Config" -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.d" -MT"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o"
In file included from ../MODBUS-LIB/Src/UARTCallback.c:12:
C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc/Modbus.h:195:2: error: unknown type name 'osMessageQueueId_t'
195 | osMessageQueueId_t QueueTelegramHandle;
| ^~~~~~~~~~~~~~~~~~
C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc/Modbus.h:198:2: error: unknown type name 'osThreadId_t'
198 | osThreadId_t myTaskModbusAHandle;
| ^~~~~~~~~~~~
C:/Users/petrikas.lu/Desktop/WORK/UTB/MODBUS-LIB/Inc/Modbus.h:204:2: error: unknown type name 'osSemaphoreId_t'
204 | osSemaphoreId_t ModBusSphrHandle;
| ^~~~~~~~~~~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:57,
from ../MODBUS-LIB/Src/UARTCallback.c:9:
../MODBUS-LIB/Src/UARTCallback.c: In function 'HAL_UART_TxCpltCallback':
../MODBUS-LIB/Src/Modbus.c:294:29: warning: implicit declaration of function 'osSemaphoreNew'; did you mean 'osSemaphoreDef'? [-Wimplicit-function-declaration]
294 | modH->ModBusSphrHandle = osSemaphoreNew(1, 1, &ModBusSphr_attributes);
| ^~~~~~~~~~~~~~
| osSemaphoreDef
../MODBUS-LIB/Src/Modbus.c:296:30: warning: comparison between pointer and integer
296 | if(modH->ModBusSphrHandle == NULL)
| ^~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:57,
from ../MODBUS-LIB/Src/Modbus.c:10:
../MODBUS-LIB/Src/Modbus.c: In function 'vTimerCallbackT35':
../MODBUS-LIB/Src/Modbus.c:461:28: warning: passing argument 1 of 'xTaskGenericNotify' makes pointer from integer without a cast [-Wint-conversion]
461 | xTaskNotify(mHandlers[i]->myTaskModbusAHandle, 0, eSetValueWithOverwrite);
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1854:78: note: in definition of macro 'xTaskNotify'
1854 | #define xTaskNotify( xTaskToNotify, ulValue, eAction ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL )
| ^~~~~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1853:45: note: expected 'TaskHandle_t' {aka 'struct tskTaskControlBlock *'} but argument is of type 'int'
1853 | BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
../MODBUS-LIB/Src/Modbus.c: In function 'vTimerCallbackTimeout':
../MODBUS-LIB/Src/Modbus.c:476:29: warning: passing argument 1 of 'xTaskGenericNotify' makes pointer from integer without a cast [-Wint-conversion]
476 | xTaskNotify(mHandlers[i]->myTaskModbusAHandle, ERR_TIME_OUT, eSetValueWithOverwrite);
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1854:78: note: in definition of macro 'xTaskNotify'
1854 | #define xTaskNotify( xTaskToNotify, ulValue, eAction ) xTaskGenericNotify( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL )
| ^~~~~~~~~~~~~
../MODBUS-LIB/Src/UARTCallback.c:34:38: warning: passing argument 1 of 'xTaskGenericNotifyFromISR' makes pointer from integer without a cast [-Wint-conversion]
34 | xTaskNotifyFromISR(mHandlers[i]->myTaskModbusAHandle, 0, eNoAction, &xHigherPriorityTaskWoken);
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1945:119: note: in definition of macro 'xTaskNotifyFromISR'
1945 | #define xTaskNotifyFromISR( xTaskToNotify, ulValue, eAction, pxHigherPriorityTaskWoken ) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) )
| ^~~~~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1853:45: note: expected 'TaskHandle_t' {aka 'struct tskTaskControlBlock *'} but argument is of type 'int'
1853 | BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1944:52: note: expected 'TaskHandle_t' {aka 'struct tskTaskControlBlock *'} but argument is of type 'int'
1944 | BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:60,
from ../MODBUS-LIB/Src/Modbus.c:10:
../MODBUS-LIB/Src/Modbus.c: In function 'StartTaskModbusSlave':
../MODBUS-LIB/Src/Modbus.c:731:21: warning: passing argument 1 of 'xQueueSemaphoreTake' makes pointer from integer without a cast [-Wint-conversion]
731 | xSemaphoreTake(modH->ModBusSphrHandle , portMAX_DELAY); //before processing the message get the semaphore
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:289:74: note: in definition of macro 'xSemaphoreTake'
289 | #define xSemaphoreTake( xSemaphore, xBlockTime ) xQueueSemaphoreTake( ( xSemaphore ), ( xBlockTime ) )
| ^~~~~~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:59,
from ../MODBUS-LIB/Src/Modbus.c:10:
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:1418:47: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
1418 | BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
../MODBUS-LIB/Src/Modbus.c: In function 'ModbusQuery':
../MODBUS-LIB/Src/Modbus.c:777:23: warning: passing argument 1 of 'xQueueGenericSend' makes pointer from integer without a cast [-Wint-conversion]
777 | xQueueSendToBack(modH->QueueTelegramHandle, &telegram, 0);
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:395:86: note: in definition of macro 'xQueueSendToBack'
395 | #define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
| ^~~~~~
../MODBUS-LIB/Src/UARTCallback.c: In function 'HAL_UARTEx_RxEventCallback':
../MODBUS-LIB/Src/UARTCallback.c:152:42: warning: passing argument 1 of 'xTaskGenericNotifyFromISR' makes pointer from integer without a cast [-Wint-conversion]
152 | xTaskNotifyFromISR(mHandlers[i]->myTaskModbusAHandle, 0 , eSetValueWithOverwrite, &xHigherPriorityTaskWoken);
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1945:119: note: in definition of macro 'xTaskNotifyFromISR'
1945 | #define xTaskNotifyFromISR( xTaskToNotify, ulValue, eAction, pxHigherPriorityTaskWoken ) xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) )
| ^~~~~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/task.h:1944:52: note: expected 'TaskHandle_t' {aka 'struct tskTaskControlBlock *'} but argument is of type 'int'
1944 | BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:650:45: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
650 | BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
../MODBUS-LIB/Src/Modbus.c: In function 'ModbusQueryInject':
../MODBUS-LIB/Src/Modbus.c:789:18: warning: passing argument 1 of 'xQueueGenericReset' makes pointer from integer without a cast [-Wint-conversion]
789 | xQueueReset(modH->QueueTelegramHandle);
| ~~~~^~~~~~~~~~~~~~~~~~~~~
| |
| int
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:1433:51: note: in definition of macro 'xQueueReset'
1433 | #define xQueueReset( xQueue ) xQueueGenericReset( xQueue, pdFALSE )
| ^~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:1644:46: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
1644 | BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
../MODBUS-LIB/Src/Modbus.c:791:24: warning: passing argument 1 of 'xQueueGenericSend' makes pointer from integer without a cast [-Wint-conversion]
791 | xQueueSendToFront(modH->QueueTelegramHandle, &telegram, 0);
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:313:87: note: in definition of macro 'xQueueSendToFront'
313 | #define xQueueSendToFront( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
| ^~~~~~
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:650:45: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
650 | BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:60,
from ../MODBUS-LIB/Src/Modbus.c:10:
../MODBUS-LIB/Src/Modbus.c: In function 'SendQuery':
../MODBUS-LIB/Src/Modbus.c:841:21: warning: passing argument 1 of 'xQueueSemaphoreTake' makes pointer from integer without a cast [-Wint-conversion]
841 | xSemaphoreTake(modH->ModBusSphrHandle , portMAX_DELAY); //before processing the message get the semaphore
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:289:74: note: in definition of macro 'xSemaphoreTake'
289 | #define xSemaphoreTake( xSemaphore, xBlockTime ) xQueueSemaphoreTake( ( xSemaphore ), ( xBlockTime ) )
| ^~~~~~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:59,
from ../MODBUS-LIB/Src/Modbus.c:10:
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:1418:47: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
1418 | BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
../MODBUS-LIB/Src/Modbus.c: In function 'StartTaskModbusMaster':
../MODBUS-LIB/Src/Modbus.c:1057:22: warning: passing argument 1 of 'xQueueReceive' makes pointer from integer without a cast [-Wint-conversion]
1057 | xQueueReceive(modH->QueueTelegramHandle, &telegram, portMAX_DELAY);
| ~~~~^~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:59,
from ../MODBUS-LIB/Src/Modbus.c:10:
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:868:41: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
868 | BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:60,
from ../MODBUS-LIB/Src/Modbus.c:10:
../MODBUS-LIB/Src/Modbus.c:1150:23: warning: passing argument 1 of 'xQueueSemaphoreTake' makes pointer from integer without a cast [-Wint-conversion]
1150 | xSemaphoreTake(modH->ModBusSphrHandle , portMAX_DELAY); //before processing the message get the semaphore
../Middlewares/Third_Party/FreeRTOS/Source/include/semphr.h:289:74: note: in definition of macro 'xSemaphoreTake'
289 | #define xSemaphoreTake( xSemaphore, xBlockTime ) xQueueSemaphoreTake( ( xSemaphore ), ( xBlockTime ) )
| ^~~~~~~~~~
In file included from ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:59,
from ../MODBUS-LIB/Src/Modbus.c:10:
../Middlewares/Third_Party/FreeRTOS/Source/include/queue.h:1418:47: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
1418 | BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
| ~~~~~~~~~~~~~~^~~~~~
make: *** [MODBUS-LIB/Src/subdir.mk:22: MODBUS-LIB/Src/UARTCallback.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [MODBUS-LIB/Src/subdir.mk:22: MODBUS-LIB/Src/Modbus.o] Error 1
"make -j16 all" terminated with exit code 2. Build might be incomplete.