This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hard faults using sprintf() and float


>>> Looks like you have a problem with misaligned loads. Check your MPU
>>> configuration.

MPU is disabled in my application but this is also the case in FreeRTOS
demo code provided for SAME70. Must MPU be configured/enabled to avoid
the hard fault ?

> Your stack needs to be 8-byte aligned at all function boundaries.  The
> compiler will maintain this invariant if start-up and interrupt code
> handle the startup and interrupt entry code (most m-class cores will do
> the latter automatically).

I'm afraid that I don't quite understand you. I am using the linker
script from the FreeRTOS demo. Nevertheless I changed all ALIGN(4) to
(8) but the hard fault still occurs. According to the map file I seems
that the function boundaries in the newlib code are not 8 byte aligned.
Do I have to recompile the newlib stuff to achieve 8 byte alignment for
functions ?

Can I check if the provided newlib library is ready for (Free)RTOS
applications ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]