Run Time Crash Using Atollic with FreeRTOS

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

Hi Roger, Does it reach main() ? If not, have you linked with the proper ‘startup_stm32f4xx.s” ?

Run Time Crash Using Atollic with FreeRTOS

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

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:
CommonUtilitiesUDPLoggingPrintf.c
or create your own Telnet server. Note there is also a complete replacement of [v][s][n]printf() functions in:
CommonUtilitiesprintf-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.