Message buffer is not supported
nopnop2002 opened this issue · 1 comments
nopnop2002 commented
My envronment
I'm using STM32duino FreeRTOS for Platform IO.
stm32duino/STM32duino FreeRTOS@^10.2.1
https://registry.platformio.org/libraries/stm32duino/STM32duino%20FreeRTOS
Content of the problem
FreeRTOS Message Buufer feature is not supported.
A compile error will occur.
#include <Arduino.h>
#include <STM32FreeRTOS.h>
#define BAUDRATE 115200
MessageBufferHandle_t xMessageBufferTrans;
MessageBufferHandle_t xMessageBufferRecv;
void task(void *pvParameters)
{
while(1) {
Serial.println("task is running");
delay(1000);
}
}
void setup() {
Serial.begin(BAUDRATE);
Serial.println("serial (same as 4)");
Serial.println("*****");
portBASE_TYPE xTask = xTaskCreate(task, "TASK", configMINIMAL_STACK_SIZE, NULL, 2, NULL);
configASSERT( xTask );
// start scheduler
Serial.println("Start Scheduler.....");
vTaskStartScheduler();
Serial.println("Insufficient RAM");
while(1);
}
void loop() {
// Empty. Things are done in Tasks.
}
nopnop2002 commented
I solved it by including message_buffer.h.
#include <Arduino.h>
#include <STM32FreeRTOS.h>
#include <message_buffer.h>