Quality RTOS & Embedded Software

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




Loading

Run Time Crash Using Atollic with FreeRTOS

Posted by groger57 on February 2, 2016

Hi,

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

hello:

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:

Common\Utilities\UDPLoggingPrintf.c

or create your own Telnet server.

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

Common\Utilities\printf-stdarg.c

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 ).

Regards.


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




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS