FreeRTOSv202012.00 STM32-Demo not running

Hi,

I’m an absolute Beginner in FreeRTOS.
I started with Demo “CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil”-Example.
Target 1: STM32H723ZG (Nucleo-144) - no success
Target 2: STM32F429ZI (Nucleo-144) - no success

The Projects compiles very well. (IDE Visual GDB, ARM GCC 9.3.1 )

Both “Blinky”-Variant runs fine. (mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1)
But the “main_full”-Variant crashed with an Assertion in “timers.c”
whereis the Timerhandle = 0.
Im my Opinion this is a Side-effect.

Depending on “configMINIMAL_STACK_SIZE” (def. 130) more or less Functioncalls in main_full() will executed correctly (before Assertion)…
Lower the Value leads to more successfully Functioncalls.

Debugging ends here:
tasks.c/prvInitialiseNewTask()
/* Fill the stack with a known value to assist debugging. */
( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );

A Heap-Allocation Problem?
I’m running out of Ideas now.
Has anyone already run that demo example?
Are the Targets mentioned above too small?

I can’t upload my “FreeRTOSConfig.h” because I’m a new user :frowning: :roll_eyes:

Kind regards

When in doubt increase the stack. configMINIMAL_STACK_SIZE is the bare minimum FreeRTOS itself requires without taking into account any (unknown) application code (as documented). STM32F7 has quite a lot of RAM so try with a stack size of e.g. 512.
I strongly recommend to define configASSERT and enabling stack overflow checking (for development/debugging). This usually also helps to tune task stack sizes and heap size.

Hi there, some News…

first I moved from DTCMRAM to RAM_D1 (320k)

Figured out, that these Config Settings are too small:
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) // default: 130
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 75 * 1024 ) ) // default:46, xFreeBytesRemaining ca. 10k seems OK

moved back to DTCMRAM

So the app started/initialized w/o error.

But in the Check-Task some Task Fails:

Error: xAreIntQueueTasksStillRunning
Error: xAreDynamicPriorityTasksStillRunning
Error: xAreBlockTimeTestTasksStillRunning
Error: xAreRecursiveMutexTasksStillRunning
Error: xIsCreateTaskStillRunning
Error: xAreSemaphoreTasksStillRunning
Error: xAreEventGroupTasksStillRunning
Error: xAreInterruptSemaphoreTasksStillRunning
Error: xAreQueueSetTasksStillRunning

IntQueue.c - /* The high priority 2 task has stalled. / prvQueueAccessLogError( LINE );
dynamic.c - /
The check has not incremented so an error exists. / xReturn = pdFALSE;
bloctime.c - /
Have both tasks performed at least one cycle since this function was last called? / if( xPrimaryCycles == xLastPrimaryCycleCount )
recmutex.c - /
Is the polling task still cycling? / if( uxLastPollingCycles == uxPollingCycles )
death.c - if( usLastCreationCount == usCreationCount )
semtest.c - if( sLastCheckVariables[ xTask ] == sCheckVariables[ xTask ] )
EventGroupsDemo.c - if( ulPreviousISRCycles == ulISRCycles )
IntSemTest.c - if( ulLastMasterLoopCounter == ulMasterLoops )
QueueSet.c - /
Ensure that all the queues in the set have been used. This ensures the test is working as intended and guards against the rand() in the Tx task missing some values. */
for( x = 0; x < queuesetNUM_QUEUES_IN_SET; x++ )
{
if( ulLastQueueUsedCounter[ x ] == ulQueueUsedCounter[ x ] )
{…

xAreIntQueueTasksStillRunning() // failed
xAreMathsTaskStillRunning() // runs fine
xAreDynamicPriorityTasksStillRunning() // failed
xAreBlockingQueuesStillRunning() // runs fine
xAreBlockTimeTestTasksStillRunning() // failed
xAreGenericQueueTasksStillRunning() // runs fine
xAreRecursiveMutexTasksStillRunning() // failed
xIsCreateTaskStillRunning() // failed
xAreSemaphoreTasksStillRunning() // failed
xAreTimerDemoTasksStillRunning() // runs fine
xAreCountingSemaphoreTasksStillRunning() // runs fine
xIsQueueOverwriteTaskStillRunning() // runs fine
xAreEventGroupTasksStillRunning() // failed, @xDelayPeriod=400ms OK
xAreInterruptSemaphoreTasksStillRunning() // failed rarely, @xDelayPeriod=400ms OK
xAreQueueSetTasksStillRunning() // failed rarely, @xDelayPeriod=400ms OK
xAreTaskNotificationTasksStillRunning() // runs fine
ulLastRegTest1Value == ulRegTest1LoopCounter) // runs fine
ulLastRegTest2Value == ulRegTest2LoopCounter) // runs fine

I increases the xDelayPeriod to 400ms. (with little success)

At the Moment FreeRTOS frustrating me.
Hey, the Target is a Rocket (Cortex-M7).

Is this an issue related to Task-Priority.
This Example (CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil) should run out of the Box…

Kind Regards