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


Run Time Crash Using Atollic with FreeRTOS

Posted by groger57 on February 2, 2016


Running this: FreeRTOS: 8.2.0 Device: STM32F4 Discovery board

I'm posting in this forum as I am hoping to find an answer to this issue. Although I have 1 year "paid" support with the Atollic software I have, they can't seem to help me with this issue, I'm not sure that they understand what's going on or just can't be bothered to respond, so I hope someone here can help.

I have some very basic software. I set up the RTC, a couple of timers, an ADC single channel, and a FreeRTOS queue that is the ISR safe call. I need to make it clear that this software compiles and works perfectly well in IAR, and functions as it should, exactly.

Now, I've created a project in Atollic, and after getting through all the hoops and jumps with doing that, I have it compiling with no errors. Again, let me clarify the code is verbatim from the IAR, I just copied the source and header files over, using the same CMSIS libraries and FreeRTOS libraries.

After it starts running, it crashes. I have a breakpoint at vTaskStartScheduler(), but it never reaches there. Atollic chokes and breaks in HardFaultHandler in stm32f4xxit.c I was told by Atollic support that it was enabling the RTC that was causing it. So, to prove this false, I commented out the call to the RTC initialization, and it was still crashing. Go figure. I was also told that interrupts cannot be enabled before launching vTaskStartScheduler, but this has never caused a problem in IAR, or for that matter, in another Atollic program I have. I have read in this forum where Richard Barry responded to a similar issue regarding the enabling of peripheral interrupts and it seems that there is no issue with doing so.

Can anyone explain how it would work perfectly well using IAR, and not in Atollic? Is the GCC really that different (good or bad) compared to the IAR compiler? Or does this even have anything to do with FreeRTOS?

Thanks for any help or advice you can provide. (really need to get this functioning) Gary

Run Time Crash Using Atollic with FreeRTOS

Posted by heinbali01 on February 2, 2016

Hi Roger,

Does it reach main() ? If not, have you linked with the proper 'startup_stm32f4xx.s'' ?

Run Time Crash Using Atollic with FreeRTOS

Posted by groger57 on February 2, 2016


yes, that is the problem - my mistake. when I brought my files over, I brought in the startup file from the IAR project. it now appears to be functioning, but breaks when i try to execute any "printf" statement. however, getting printf to work in atollic is always a problem...

Thanks for your help, Hein.

Run Time Crash Using Atollic with FreeRTOS

Posted by heinbali01 on February 2, 2016

Thanks for your help

You're welcome. I'm glad that my first guess was correct.

I suppose you have seen the STM32F4xx demo ? It is presented as an Atollic IDE project.

Do you have Ethernet connected to your device? If so, you can make use of:


or create your own Telnet server.

Note there is also a complete replacement of [v][s][n]printf() functions in:


The syntax they use is now almost as complete as GNU's printf, but they're less stack hungry and 'lighter'. They do not recognise floating point parameters ( %g ).


[ 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