I am using Watcom regularly for debugging 186 embedded code. I have used
the AM186ER with a PROMJet and the Lantronix (Grid Connect) DSTni LX and EX
with a serial port.
Obviously trap files are going to be somewhat specific to the hardware
environment. I can supply you my source files for these. They are derived
for OW trap files. I'm not the greatest at working with makefiles and the
build environment so some of it is command line driven and some of it is IDE
driven. Also I'm not really Windows programmer, so I made minimal changes
to the host side of things, and what I did may not be the best.
I made some design changes, that I thought made sense, at least in my
I modified the trap interface a bit. From the host side it appears the
but what actually is transferred across the link has been trimmed down
only what a 186 class processor would need to save communication time.
I did my own serial link protocol. I didn't need modem handling or a
bunch of error correction, because I was working with short physical
cables. Again this saved some time.
Since the target had no file system, I included code loading across the
link in the process.
Somewhere along the line, changes to the interface have rendered the
link partially inoperative. It can't restart. I haven't had time to
has changed and why it adversely affected my code.
I also created a modified version of the IDE config files to support
16 bit embedded development. I would be happy to share that information
with you as well, if it is of use. You may want my modified printf
of functions, also which eliminate DOS INT dependencies and target a
serial port. Again, you may have to modify them, but at least it would
only be at the lowest level (cout()). I did not target scanf, as I
it terribly useful, nor did I address malloc and friends, as no sane
developer would use dynamic memory allocation anyway.
The OW tools already include absolute linking capability and output of
hex or binary files, as well as code relocation and initialized data
copying. Those are documented in the linker manual. I added them
ten years ago and have been using them regularly. There is still a bug
the linker that was introduced since then that causes problems in
cases (overflow of group AUTO). If you run into that, I can get you a
copy of the 1.4 beta linker that I've been using, or you can download
a version from around that time before the bug was introduced.
If you would like startup code that works from a reset vector and copies
the initialized data back into place (from a ROM image), I would be
to share that, also.
There is a document about trap files. It is buried in the source code tree
somewhere. I don't recall exactly where right now. If you have access to
the source tree, you can look for it. It is part of a section that has a
number of developer documents in it. If not, let me know and I will go
looking for it. I don't know if I have a copy of the tree on any computer
right now, so I might have to create one to find it. I haven't done
anything with the source tree in a few years.