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]

Hard faults using sprintf() and float


Hello,
I'm using newlib 2.4.0 as provided by the ASF / Atmel Studio
Installation. I'm on a SAME70 and my app is heavily using float32 and
therefore I'm interested in using printf and co. in my FreeRTOS / lwip
environment. Now it seems to me that there is a problem in memory
allocation stuff but I can't get deeper. Looks like sprintf with "%.3e"
format string results in a hard fault which I tracked down to the newlib
library. Any idea what I can do ?
Regards

In Hard Fault Handler
SCB->HFSR = 0x40000000
Forced Hard Fault
SCB->CFSR = 0x00008200
Bus fault:
r0 = 0x36353931
r1 = 0x00000000
r2 = 0x00000004
r3 = 0x2040b970
r12 = 0xfadffbfe
lr = 0x004461ff
pc = 0x00447128 <-- !!
psr = 0x81010000

_Balloc():
 447118: 6cc3 ldr r3, [r0, #76] ; 0x4c
:
 447126: b180 cbz r0, 44714a <_Balloc+0x32>
 447128: 6802 ldr r2, [r0, #0] <-- !!
 44712a: f843 2024 str.w r2, [r3, r4, lsl #2]
:
 44715e: 6044 str r4, [r0, #4]
 447160: 6086 str r6, [r0, #8]
 447162: e7e4 b.n 44712e <_Balloc+0x16>


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