Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


vTaskStartScheduler() causes an Assertion

Posted by flat213 on October 26, 2016


i'm new to FreeRTOS and just want to set up a test project with Windows Port. So i've started the demo project therefor and it works fine.

For my project i didn't changed anything in the demo except of starting with the function main_blinky(), i start with the function usrAppInit(), which looks like that:

~~~ void usrAppInit(void) { printf("Initn"); StartTasks();


void StartTasks(void) { TaskHandlet xNvmTaskHandle = NULL; TaskHandlet xMainTaskHandle = NULL;

xTaskCreate(NVMTask, "tNVMTask",initNVM_STACK_SIZE, ( void * ) 1, initNVM_TASK_PRIORITY, &xNvmTaskHandle );

xTaskCreate(MainTask, "tMainTask", initMAIN_STACK_SIZE, (void *) 1, initMAIN_TASK_PRIORITY, &xMainTaskHandle );


for (;; );



and both Tasks are empty(just a printf):

~~~ void MainTask( void * pvParameters ) { /* Prevent the compiler warning about the unused parameter. */ ( void ) pvParameters;

for ( ;; )
	printf("Task Main ist dran\n");

} ~~~

When i debug this, i always get the following:

"ASSERT! Line 422, file c:...timers.c, GetLastError() 0 Trace output saved to Trace.dump"

I know that the Assertion is caused by vTaskStartScheduling, but why? What can be wrong? I think it's quite the same as in the demo which is running within the same project.

Thank you for helping!

vTaskStartScheduler() causes an Assertion

Posted by flat213 on October 26, 2016

Ok, i have found the fail. Its because of my implementation to get my application started. It looks like this:




I don't know which Line of Code exact causes the fail, but if i put my function instead of the blinky and start with mainCREATESIMPLEBLINKYDEMOONLY declared as 1, it should be ok.

You can delete or close.

vTaskStartScheduler() causes an Assertion

Posted by tlafleur on October 26, 2016

Printf are not in general terms, "rtos friendly". You might try running without them and see if you have the same issue.

Their is a friendly version in some of the demo code


alternate (3073 bytes)

vTaskStartScheduler() causes an Assertion

Posted by flat213 on October 26, 2016

Yes, i read this. But i think for test purposes it's ok to use printf. In my final project shouldn't be any printf. This didn't cause the error.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists