first post, perplexed by printf()
Tue Oct 7 05:24:00 GMT 2014
On 10/06/2014 04:30 AM, Federico Terraneo wrote:
>> Ok, I will hack on this a bit today and see how far I get. The
>> linker script and startup code I'm using are the ones distributed
>> by SiLabs for this family of processors. At first glance, your
>> linker script and startup code are very different from those.
> This is just a guess, as I have not seen the SiLabs linker script, but
> have you tried if malloc works on your platform, such as trying to
> allocate some blocks, writing into them and seeing if it makes the
> system crash? I've seen some linker script in the past, provided by
> chip manufacturers, which fail to set up a working heap, and printf
> calls malloc internally.
Hi! I got sidetracked by other work last night and today, and didn't
get very far in my efforts. I'll take another stab at it tomorrow.
But as far as malloc(), that's working fine, and I just verified it
again (to make sure the compiler wasn't optimizing it out, etc). I'm
able to malloc() a 4K chunk of memory and initialize it in a loop.
Dave McGuire, AK4HZ/3
New Kensington, PA
More information about the Newlib