2019-05-27 09:14 AM
Hi
Is there already a OSWrapper_cmsis.cpp for FreeRTOS v2?
Currently I am stuck because the OSWrapper_cmsis.cpp seems to be for v1.
I tried to port my Atollic Project to FreeRTOS CMSIS v2.
However there a now a lot of compiler failures left, which I cannot handle.
It seems like there are some includes missing ("vTaskSetApplicationTaskTag was not declared in this Scope", "TaskHandle_t was not declared in this scope" in FreeRTOS.h).
Br. Raphael
2019-05-28 12:13 AM
Ok, I created a new project with CMSIS v2 and it is not compilable out of box.
It seems TouchGFX causes a conflict with CMSIS v2.
If I exclude all TGX folders and references in the code I can get it to compile after fixing this:
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.stack_size = 4096,
.priority = (osPriority_t) osPriorityNormal
};
Triggers a "sorry, unimplemented: non-trivial designated initializers not supported" error.
The code has to be changed to:
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.attr_bits = osThreadDetached,
.cb_mem = NULL,
.cb_size = 0,
.stack_mem = NULL,
.stack_size = 4096,
.priority = (osPriority_t) osPriorityNormal,
.tz_module = 0,
.reserved = 0
};
However, with TGX included I had no luck until now.
2019-05-28 01:30 PM
This is probably because TGX causes all source files, even C, to compile as C++.
C++ is not an absolute superset of c99 (or c11) yet.
-- pa
2019-05-29 12:22 AM