first post, perplexed by printf()

Dave McGuire
Wed Oct 8 19:12:00 GMT 2014

On 10/08/2014 02:05 PM, Jonathan Roelofs wrote:
>>>>> If I do printf("%d\n", 1); everything works fine.  If I do
>>>>> printf("%d\n", 10);, my processor hangs.  (again with no debugging
>>> Pointed question: where did you get your implementation of __aeabi_divmod?
>>   Well I certainly didn't write it. ;)  Isn't that in libgcc?
> Yeah, that comes from libgcc. The pointed question was aimed at whether you were
> using the one from llvm's compiler_rt, which had a bug which has subsequently
> been fixed, that manifested itself in a similar manner. But since you're not
> using that, it's probably not the same problem.

  Nope, not that.  Thanks for the thought, though!

> When your processor hangs, can you tell if it's hitting an interrupt, and if so
> which one?

  I haven't looked that far yet, but on a lark I just tried the
"official" gcc-arm-embedded toolchain, and my (unmodified) code runs,
with my linker script and startup there's something wrong with
my toolchain.

  "Dang these guys and their broken home-built toolchains!" ;)

  (It has worked wonderfully for many years on dozens of projects, but
this is the first time I've targeted a thumb-only processor, so it's
gotta have something to do with that.)

  So that "official" toolchain looks to be Cortex-only, oddly, which is
a problem for me.

  I'll go digging through their build scripts to see if I can figure out
what's going on.


Dave McGuire, AK4HZ/3
New Kensington, PA

More information about the Newlib mailing list