Skip to main content
Associate III
October 3, 2024
Solved

Tasks created by CubeMX vs created by code

  • October 3, 2024
  • 4 replies
  • 1341 views

Is there any difference if I create two freertos tasks by hand in my code or if I do it using the cubemx interface?
Things like preventive checks, checks that the stacks do not overlap or are too big compared to the available memory?

This topic has been closed for replies.
Best answer by mƎALLEm

No. There is no special check. It just sets the values you selected as it does for the HAL.

 

4 replies

mƎALLEm
ST Technical Moderator
October 3, 2024

Hello @Manuel Ferrero ,

I don't think there is something preventing you to do this. Just put it un "User code" block.

The check of stack is done at OS level at runtime if you activate stack overflow hook. CubeMx just set the values you selected.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Associate III
October 3, 2024

No, I know I can create tasks and queues and whatever from my code, I was just wondering if cubemx does some checks behind the scene.

It seems it does not.

Thanks.

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
October 3, 2024

No. There is no special check. It just sets the values you selected as it does for the HAL.

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.