Embedded Systems Firmware Demystified

There is more to an embedded system than just the embedded system. Don t 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, it s 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 don t have any GUI I didn t 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...