Subject:
|
Re: serial port interrupts
|
Newsgroups:
|
lugnet.robotics.rcx.pbforth
|
Date:
|
Mon, 15 May 2000 19:07:58 GMT
|
Reply-To:
|
sjm@judgement%Spamcake%.com
|
Viewed:
|
1679 times
|
| |
| |
Ralph Hempel wrote:
> It's amazing, but I get all kinds of comments on how it's impossible to
> debug systems like the RCX brick. I guess if you're used to deeply
> embedded systems, figuring out how to let it tell you what's going on
> is a big part of the magic...
I'm not suggesting that it isn't hard. Compared to
native debugging with printf and gdb in an emacs
window it is quite hard. It's just that you build
up a bag of tricks after a while or take up
application development instead. :-)
One of the tricks is to do development in tiny steps
where minimal debug information isn't a burden.
Another is to defer most of the heavy lifting until you
get a working platform that can be used to debug itself.
I don't have to tell you how strong Forth is in this
regard.
A standard general purpose tool I usually create is a
simple to call subroutine that takes a single numeric
arguement in a register. It displays the number on the
LED/LCD/whatever and then waits for a debounced button
press. I wrap this in a macro that saves the register
on the stack and restores it after the jsr. The routine
itself saves and restores any registers it uses.
This makes it invisible to the calling code except
for the CPU time it takes.r. If the display has enough
bits I display both the arguement and the return
address of the calling routine.
Scattering calls to the macro in the code makes a poor man's
single stepper. It is amazing what you can debug with this
simple tool.
> Yup, I just downloaded a pre-built set of binaries for Windows from
> Gavin's site. There are other pre-built binaries for Linux,
> but I don't have the links handy.
Do you have a pointer to Gavin's site? That will get
me started till I find the Linux stuff.
Is there an H8 assembler in Forth that can be used to
create assembler based Forth words? I'm thinking more
of my robot application where I think I will be CPU
limited. I'd rather do that with downloadable words
than editing the firmware.
I fully agree with posting active development traffic
like this on this list. It is not very much and might
encourage other people to try it themselves. The
distinction between Forth user and Forth platform
developer should always be fuzzy. Creating a Forth
application is really a matter of extending the Forth
interpreter.
|
|
Message is in Reply To:
| | RE: serial port interrupts
|
| (...) It's amazing, but I get all kinds of comments on how it's impossible to debug systems like the RCX brick. I guess if you're used to deeply embedded systems, figuring out how to let it tell you what's going on is a big part of the magic... (...) (25 years ago, 15-May-00, to lugnet.robotics.rcx.pbforth)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|