cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable the FreeRTOS task generation in CubeMX?

DSchw.4
Associate

This problem was already mentioned two years ago and was allegedly fixed in version 5.2.0 of CubeMX. It is currently impossible for me to remove the default FreeRTOS task from CubeMX (6.0.1 with a STM32 F4 MCU), even removing it from the ioc file does not help. Is there any other way to do this?

As a side node this would not be a problem if CubeMX created the task attribute definition in the right order. g++ considers this to be an error.

2 REPLIES 2
Pavel A.
Evangelist III

How g++ belongs here? CubeMX generates plain C code.

People who want to add C++ to that C code, please just use your common sense.

Resist temptation to rename main.c to cpp. C++ is not a strict superset of C... not yet.

-- pa

The only way to use C++ and take full advantage of CubeMX is to compile the main.c with g++ (renaming does not work properly). This also does not have anything to with C++, CubeMX generates a main.c that is always perfectly valid C++ code.

The problem is that CubeMX generates the definition in the wrong order (that shouldn't be done in C either) and the arm-none-eabi g++ has the error for this enabled in such a way, that it can not be disabled as far as I know (it is an optional warning normally).​