C M L 1 2 S D P 2 5 6
0 1 / 3 0 / 0 4
7
If there are no fatal errors in your source code, 2 output files will be created:
HELLO.S19
a Motorola S-Record file that can be loaded or programmed into
memory
HELLO.LST
a common listing file which provides physical address information
with resulting opcode and operand information. Warnings and error
messages are provided with a summary at the end of the file.
The listing file is especially helpful to look at when debugging your program. If your program
has errors, they will be displayed in the listing or fatal errors will prevent output from being
generated. The end of the listing file generally provides a count of errors or warnings in the
file.
If you prefer a windows integrated programming environment, try the Motorola MCU-EZ tools.
Refer to the MCU-EZ documentation on the disk for more information.
Also, a port for the free GNU C compiler and tools for the HC12 is available on the CD under
\Shareware and also online at www.gnu-m68hc11.org. Note that this version does not
support HC12 Paging operation, check the web site for updates.
Running your application
After creating a Motorola S-Record file you can "upload" it to the development board for a test
run. The provided example “HELLO.ASM” was created to run from external RAM so you can
use the MON12 Monitor to test it without programming it into Flash.
If you haven’t done so already, verify that the CML12Sxxx board is connected and operating
properly by following the steps under “GETTING STARTED” until you see the Mon12 prompt,
then follow these steps to run your program:
1. Press and release the RESET button on the CML12Sxxx board. You should see the
PRESS ANY KEY message. Hit the return key
↵
to get the monitor prompt.
2. Type
LOAD
↵
This will prepare Mon12 to receive a program.
3. Select Upload and when prompted for a file name select your assembled program file in s-
record format that was created in the previous section called:
HELLO.S19
Your program will be sent to the board through the serial port.
4. When finished loading you will see a done message and the > prompt again. Type
GO
4000
↵
This tells MON12 to execute the program at address $4000 hex, which is the start of our
test program.
5. If everything is working properly you should see the message “Hello World” echoed back to
your terminal screen. Press RESET to return to the monitor.
6. If you do not get this message, see the
TROUBLESHOOTING
section in this manual