Appendix A: Building a Host-Based Toolbox

Overview

There is more to an embedded system than just the embedded system. Dont let yourself develop the attitude that I only do firmware. Even if the final product will be hidden inside a toaster with no interface to a user , it is still very handy during the development cycle to have a few tools on the PC for various things. In general, its very handy to have the ability to write programs for the PC (or whatever host you are on) because, every once in a while, you will need to write something that is just begging to be a host program. Some tools are useful for modifying the binary image file created from the executable; others are useful for communicating with the target via RS-232 or Ethernet. This appendix describes some tools I have written that I have found the most useful when interfacing to a target running MicroMonitor; however, most of these tools are generic enough to be applicable regardless of the platform.

I will introduce three useful code snippets in this chapter. The snippets provide the following capabilities:

  • Interfacing to a binary file on the host;

  • Interfacing to a COM port on the PC;

  • Interfacing to a UDP socket on the PC.

No, the code is not C++, and you dont have any GUI I didnt even use a GUI to write these tools. I did use Microsoft Visual C++ command line tools and nmake (nothing fancy). The snippets that follow are shown for quick illustration only. For the complete working source, refer to the CD.



Embedded Systems Firmware Demystified
Embedded Systems Firmware Demystified (With CD-ROM)
ISBN: 1578200997
EAN: 2147483647
Year: 2002
Pages: 118
Authors: Ed Sutter

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net