Hi Folks - I’m looking at colleague @victorcanoz’s issue with hardfaults on the latest GCC toolchain (FreeRTOS, GCC, newlib). He reduced it to a very simple stress-test that works fine on arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] but crashes promptly on arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major.
I’ve checked all the usual suspects: there is absolutely enough stack space (FreeRTOS tasks and ISR stack), all configuration settings look sane. I reproduced the problem on a LPC55S28-EVK (I don’t have the later processor here). Project attached. Crashes using MCUXpresso version 11.2 (but not earlier version 11.1).
I don’t see the problem running the stress test on a Kinetis K64F using the later toolchain and FreeRTOS 10.0.1 - It may be related to the M33 port of FreeRTOS, or using the latest GCC to build that port.
Thanks in advance,
Best Regards, Dave
PS: Some additional discussion here:
20201021b_failure_lpcxpresso55s28_freertos_generic.zip (798.9 KB)