Wow, great catch, the lack of the \n does in fact cause stdout not to
flush, [face palm]

ok then, on to bigger and better things.
--Chuck



On Fri, May 30, 2014 at 1:41 AM, Марко Краљевић <[email protected]>
wrote:

> Yeah, this is a good point. Try adding this call before you print anything:
>
> setbuf(stdout, NULL);
>
> Looking through my code using newlib nano, I've got setbuf() calls in all
> of them, so I presume it was buffering, causing me grief too.
>
>
> On 30 May 2014 01:25, <[email protected]> wrote:
>
>>
>>
>> On 30 May 2014 08:07:41 BST, Chuck McManis <[email protected]>
>> wrote:
>> >So I was looking at the newlib nano code and thinking "Oh cool, I can
>> >use
>> >printf" and have had some issues getting it to work. An example repo is
>> >here: https://github.com/ChuckM/retarget-hang which demonstrates the
>> >problem on the STM32F4-Butterfly with the Embest BaseBoard
>>
>> Dumb question but did you look at the libopencm3-examples? They have code
>> that does more or less what your example does. The code for
>> STM32F4Discovery should run on most F4 series boards.
>>
>> PS Your printf has no \n so you might find studio buffering stops the
>> characters from being issued to _write (normal newlib has this, not sure
>> about nano)
>> --
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>
>>
>> ------------------------------------------------------------------------------
>> Time is money. Stop wasting it! Get your web API in 5 minutes.
>> www.restlet.com/download
>> http://p.sf.net/sfu/restlet
>> _______________________________________________
>> libopencm3-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
> _______________________________________________
> libopencm3-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>
>
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
libopencm3-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to