Author: John PassanitiJohn Passaniti Date: Jan 29, 2007 15:58
(rickman wrote:
> I am working on an entry for the Luminary Micro Stellaris design
> contest. The contest rules require you to use the the Keil tools that
> come with the LM eval board. This limits the entries to C programs.
Of course, you could implement a Forth in C...
> I started with a Forth program and converted it to C. This went
> without too much trouble and the conversion was fairly easy. I did
> find it a bit harder to debug under C using a standard debugger, but
> there were not many issues that could not be resolved without too much
> pain. Mainly it was a lot easier in Forth to test each word or
> routine separately rather than as part of a whole. The C debug tools
> just don't make it easy to test routines separately.
I don't know what debugger you use, but what I typically do in my C
development is to create a Forth-like shell where every C function is
exposed. So if I had a function like this:
int subtract(int x, int y) { return x - y; }
I could interactively test it from my shell like this:
1 2 subtract .
|