cancel
Showing results for 
Search instead for 
Did you mean: 

OSWrapper für FreeRTOS CMSIS v2

bitlischieber
Associate III

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

3 REPLIES 3
bitlischieber
Associate III

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.

Pavel A.
Evangelist III

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

bitlischieber
Associate III

I migrated now the OSWrapper_cmsis.cpp file and it compiles now fine.

First I had an error, that the timing was not correct.

Apperently you mustn't inser "NULL" for the "void *msg_ptr

" argument of "osMessageQueueGet(..)".

Now it works with v2!