FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2015 Threads]
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
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?
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.
Regards.
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.