Quality RTOS & Embedded Software

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


GCC 4.8 and TivaTM4C1231

Posted by simon--r on October 22, 2015

Hi all FreeRTOS: 7.2.0 MCU: TM4C1231 Memory alloc: heap_4

My application works when compiled with GCC 4.7. I’ve updated to GCC 4.8 and the same application is unstable, and reports unreasonably large numbers from xPortGetFreeHeapSize, e.g.: GCC 4.7.1 7800 bytes
GCC 4.8.3 33537864 bytes

I’ve tried updating to FreeRTOS 8.2.3 but this makes no difference. I have a task StackOverflowHook installed but it is not being called.

I would appreciate any suggestions/ideas. Unfortunately the JTAG port on my hardware isn’t easily accessible for debugging. Thanks

GCC 4.8 and TivaTM4C1231

Posted by rtel on October 22, 2015

Did you look at the release notes for the compiler to see what was different? Could it be the libraries that are the biggest difference?

GCC 4.8 and TivaTM4C1231

Posted by heinbali01 on October 22, 2015

Is there a higher gcc version available ( >= 4.9.1 ? ) for the TM4C1231 ? In 4.8, for the first time, the gcc compiler is compiled by a C++ compiler. It is not unthinkable that some regression has taken place.

Did you try different levels of optimisation already? -O0, -O1, -O2 and (my favourite) -Os ?

It is a pity that embedded debugging is difficult. If not I would definitely check the value of 'xFreeBytesRemaining', see why and when it becomes extremely high.

Do you have a listing ( main.lss mixed with C-code ) of the functions in heap_4.c ?

~~~~ void vPortFree( void *pv ); static void prvHeapInit( void ); static void prvInsertBlockIntoFreeList( BlockLinkt *pxBlockToInsert ); void *pvPortMalloc( sizet xWantedSize ); ~~~~

You write you have 'StackOverflowHook' installed, I assume that you also have this define?

~~~~ #define configCHECKFORSTACK_OVERFLOW 2 ~~~~

Please let us know your findings.


GCC 4.8 and TivaTM4C1231

Posted by simon--r on October 29, 2015

Thanks for your suggestions. I'm still investigating, but I think that my problem is a bug in our linker script, and changing the compiler has made the problem show up. So it's not a FreeRTOS fault.

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

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner