This document is the ownership of EMAC, Inc. Copyright 2003. Unauthorized duplication or copying of this document is strictly forbidden.
iPac HCS12 Manual.doc
- 11 -
Rev 1.2 - 11/11/03
3. Software
3.1 Introduction
The iPac HCS12 can be programmed in a variety of languages. There are a number of Free compilers, interpreters, and
assemblers available allowing the iPac to be programmed in C, Basic or Assembly languages. EMAC has written all the
drivers for the iPac board in C using Cosmic commercial C compiler/debugger and have ported these drivers to the GNU
Open Source C compiler. The Cosmic compiler can be purchased from EMAC if the customer is interested in using this
compiler and the GNU compiler can be downloaded freely from http://www.gnu-m68hc11.org/.
The resident flash on the iPac can be programmed via it's serial bootloader firmware over the RS232 com port or via it's
BDM port. Software can be written with Cosmics HC12 paged compiler or the Free GNU compiler located at
http://www.gnu-m68hc11.org/. See the associated Read-Me files for further information on the use of these compilers with
the iPac.
EMAC provides Driver object files and Demo application source code usable by the free GNU or Cosmic compilers,
allowing the user to quickly develop custom applications. Programs developed in this manner can download over the
provided serial bootloader at no extra cost to the user other than the original purchase of the hardware.
Also optionally available is a full function Modbus client software module, that turns the iPac into a fully compliant Modbus
slave. See the iPac Modbus manual for additional details.
3.2 Bootloader
The iPac serial bootloader provides a free, industry standard method for users to program the flash of an IPAC HCS12 as
opposed to the BDM cable with required software which would be purchased.
All iPacs ship with serial bootloader firmware installed within their f000 protected sector. This bootloader is activated by
shorting together pins 10 and 11 of the keypad header and then resetting the board. Once Shorted, the bootloader then issues
a menu through the RS232 port at 115200 baud. From this menu users can change the baud rate, erase the EEPROM, erase
the FLASH, and program the FLASH using the S record format.
This bootloader is a slightly modified version of Motorola’s serial bootloader. Users wanting more information should
reference the Motorola serial bootloader app note AN2153. For all programming purposes the iPac bootloader is exactly the
same except the baud rate defaults to 115200 instead of 9600.
Further documentation and an example Linux program to automatically communicate and download code to the bootloader
are provided within the GNU iPac project, located on the provided CD and available for download on the EMAC website.