|ARM Technical Support Knowledge Articles|
This Knowledge Article applies to chip designers who are using ARM's Cortex-M System Design Kit (CMSDK) IP to design a chip containing a Cortex-M processor.
The debug_tests and trace_tests of the CMSDK go into unexpected HardFault and cannot finish if one of the following versions of ARM GCC has been used for compilation:
The problem does not occur if the following ARM GCC versions have been used:
Other ARM GCC versions have not been tested, but it is likely that versions after arm-none-eabi-gcc-4.8.4 will cause the same issue.
The problem is caused by null pointer dereferencing in debug_tests and trace_tests, which are undefined and lead the ARM GCC compiler to optimize them away and replace them with UDF (Undefined) instructions. The UDF instructions ultimately cause a HardFault in the simulation.
The workaround for the problem is to reduce the compiler's optimization by modifying the appropriate makefiles.
In case of Cortex-M3/M4
In case of Cortex-M0/M0+
Did you find this article helpful? Yes No
How can we improve this article?