EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Winarm and sprintf

Started by Taris October 29, 2009
--- In l..., "rtstofer" wrote:
> When I start a project, I get the serial port to work first. Then
> I write a few put??? functions to output hex bytes, shorts and
> words. Next I write a putnum routine to output decimal values and
> add a few string routines.
>

Makes sense. However, a half-decent development system should provide you with a means of doing simple puts like that without incurring the overheads of a general purpose all-singing and dancing IO library.

>
> However, as I don't use JTAG, having the various string and put functions simplifies debugging.
>

Yes indeed. We still haven't yet had to use JTAG or any sort of interactive debugging. Incredibly, that even includes the first time ever that the Oberon compiler was used to generate code for the LPC2xxx! Most of the credit for that has to go to Prof Wirth for his elegant design and (almost) bug-free original code.

--
Chris Burrows
CFB Software
Armaide: LPC2xxx Oberon-07 Development System
http://www.cfbsoftware.com

An Engineer's Guide to the LPC2100 Series

> Yes indeed. We still haven't yet had to use JTAG or any sort of interactive debugging. Incredibly, that even includes the first time ever that the Oberon compiler was used to generate code for the LPC2xxx! Most of the credit for that has to go to Prof Wirth for his elegant design and (almost) bug-free original code.
>

I'm a huge fan of Prof Wirth's work. Pascal has always been one of my favorite languages. When I was messing around with 8051 clones, I bought a Pascal compiler for it http://users.iafrica.com/r/ra/rainier/ Very nice!

I haven't been following along with Oberon. Guess I'll have to play catch-up.

Richard

--- In l..., "rtstofer" wrote:
>
> I'm a huge fan of Prof Wirth's work. Pascal has always been one of my favorite languages. When I was messing around with 8051 clones, I bought a Pascal compiler for it http://users.iafrica.com/r/ra/rainier/ Very nice!
>
> I haven't been following along with Oberon. Guess I'll have to play catch-up.
>

Thought I'd better start a new topic - this discussion has strayed away from WinArm and sprintf somewhat ;-)

A quick catch up of what Wirth has been working on most recently is here:

http://www.inf.ethz.ch/personal/wirth/Articles/Oberon.html

The earlier work he did with the model helicopters looked like a whole lot of fun! There are some videos on the net somewhere - if you're interested I'll track them down. In the meantime a presentation I attended at the 2007 Oberon Day in Zurich included some photos of the hardware used and the helicopters (they're not small!). You can download a copy here:

http://www.oberon-industry.ethz.ch/events/oberonday/presentations

Download the 'Oberon-based Autopilots...' pdf.

Now you can use the same compiler technology for LPC2xxx development!

--
Chris Burrows
CFB Software
Armaide: LPC2xxx Oberon-07 Development System
http://www.cfbsoftware.com/armaide

Am 10/31/2009 4:19 PM, also sprach Donald H:
> --- In l..., Dick Balaska wrote:
>
>> Am 10/29/2009 8:40 PM, also sprach rtstofer:
>>
>>> I tend to use the stuff from "The C Programming Language" by Kernighan/Ritchie
>>>
>> It's amazing that a 31 year old IT book is still relevant.
>>
>>
>
> IT Book ???
>
> You have never read have you ??!!!
>
> don
>
>
Are you saying it's a children's book? 'Once upon a time there was a
friendly pointer. "Hello World", said the pointer. Are there any
functions that want to play with me? The pointer met up with the twins
*a and a[0] ...'

Or perhaps a mystery: 'The pointer dereferenced into the void of the
heap. Unaware that the adjacent byte had been written as an int, the
pointer dutifully returned the data unaware of the stream corruption
that would follow.'
dik
I question how this book is an IT book.

From: http://en.wikipedia.org/wiki/The_C_Programming_Language_%28book%29
"The C Programming Language has often been cited as a model for technical writing, due to the book's clear presentation and concise treatment. In just 228 pages (272 pages in the second edition), the book covers C comprehensively. Examples generally consist of complete programs of the type one is likely to encounter in daily usage of the language, _with an emphasis on system programming_. The technical details of C are balanced by the authors' observations on good programming practice, which are immediately illustrated with concrete, realistic examples. As the authors write in the preface to the second edition:[2]"

(My emphasis added.)

1) This is an embedded systems group.
2) C was created for systems programming, IT applications came years later.
This book is as much an IT book, as it is a "children's book" and "mystery", what are you thinking ??

don

At 04:33 PM 10/31/2009, you wrote:
>--- In l..., "rtstofer" wrote:
> >
> >
> > When I start a project, I get the serial port to work first. Then
> > I write a few put??? functions to output hex bytes, shorts and
> > words. Next I write a putnum routine to output decimal values and
> > add a few string routines.
> >Makes sense. However, a half-decent development system should
>provide you with a means of doing simple puts like that without
>incurring the overheads of a general purpose all-singing and dancing
>IO library.
>
> >
> > However, as I don't use JTAG, having the various string and put
> functions simplifies debugging.
> >Yes indeed. We still haven't yet had to use JTAG or any sort of
>interactive debugging. Incredibly, that even includes the first time
>ever that the Oberon compiler was used to generate code for the
>LPC2xxx! Most of the credit for that has to go to Prof Wirth for his
>elegant design and (almost) bug-free original code.
>
>--
>Chris Burrows
>CFB Software
>Armaide: LPC2xxx Oberon-07 Development System
>http://www.cfbsoftware.com

Is there a utility that let's you download the files into the LPCxxxx
and then act as a terminal to receive debugging messages?

Cecil
K5NWA
www.softrockradio.org www.qrpradio.com

"Blessed are the cracked, for they shall let in the light."

--- In l..., k5nwa wrote:

> Is there a utility that let's you download the files into the LPCxxxx
> and then act as a terminal to receive debugging messages?
>
> Cecil

I usually use lpc21isp for device programming (using Linux) and minicom for terminal IO. As a result, I have to exit minicom before reprogramming.

But that's because I don't read directions! Apparently, lpc21isp has a terminal - see the -term command line option. Duh!

I was playing with FlashMagic on WinXP a couple of days ago. It has a terminal window.

Richard

At 09:14 AM 11/2/2009, you wrote:
>--- In l..., k5nwa wrote:
>
> > Is there a utility that let's you download the files into the LPCxxxx
> > and then act as a terminal to receive debugging messages?
> >
> > Cecil
>
>I usually use lpc21isp for device programming (using Linux) and
>minicom for terminal IO. As a result, I have to exit minicom before
>reprogramming.
>
>But that's because I don't read directions! Apparently, lpc21isp
>has a terminal - see the -term command line option. Duh!
>
>I was playing with FlashMagic on WinXP a couple of days ago. It has
>a terminal window.
>
>Richard

Thanks

Cecil
K5NWA
www.softrockradio.org www.qrpradio.com

"Blessed are the cracked, for they shall let in the light."


The 2024 Embedded Online Conference