public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Hard faults using sprintf() and float
@ 2017-03-24  8:31 Jochen Strohbeck
  2017-03-24  9:38 ` Sebastian Huber
  0 siblings, 1 reply; 7+ messages in thread
From: Jochen Strohbeck @ 2017-03-24  8:31 UTC (permalink / raw)
  To: newlib

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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-03 18:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24  8:31 Hard faults using sprintf() and float Jochen Strohbeck
2017-03-24  9:38 ` Sebastian Huber
2017-03-24 11:46   ` Jochen Strohbeck
2017-03-24 13:41     ` Richard Earnshaw (lists)
2017-03-27  8:48       ` Jochen Strohbeck
2017-04-03 13:19         ` Jochen Strohbeck
2017-04-03 18:57           ` onkel.jack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).