Motorola 68HC912D60, DG128, CMD912x, DT128 manual Assembling source code, AS12 HELLO.ASM -LHELLO

Page 6

Assembling source code

An example program called “HELLO.ASM” is provided under the\EXAMPLES\912x directory of the CD and if you installed AxIDE, under that programs \EXAMPLE directory. You must use the example for the PM Module you have installed on the CMD912x board. The PM Label is located beside the microcontroller. For example:

\EXAMPLE\HC12D60\HELLO.ASM Example program for the PM12D60 \EXAMPLE\HC12D128\HELLO.ASM Example program for the PM12D128 \EXAMPLE\HC12D256\HELLO.ASM Example program for the PM12D256

You can assemble your source code using command line tools under a DOS prompt by typing:

AS12 HELLO.ASM –LHELLO

Most compilers and assemblers allow many command line options so using a MAKE utility or batch file is recommended if you use this method. Run AS12 without any arguments to see all the options, or see the AS12.TXT file on the disk.

The programming utility AxIDE provided with this board contains a simple interface to this assembler. Use it by selecting "Build" from its menu. This will prompt you for the file to be assembled. NOTE: You must select your board from the pull down menu first, or it may not build correctly.

DO NOT use long path names (> 8 characters). The free assembler is an old DOS tool that does not recognize them.

If there are no errors in your source code, 2 output files will be created:

HELLO.S19 a Motorola S-Record file that can be programmed into memory

HELLO.LST a common listing file which shows the relationship between source and output

The listing file is especially helpful to look at when debugging your program. If your program has errors, they will be displayed and no output will be generated, otherwise the listing file will be displayed.

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.

6

Image 6
Contents CMD912x Contents Installing the Software Getting StartedBoard Startup Support Software Software DevelopmentTutorial Creating source codeAssembling source code AS12 HELLO.ASM -LHELLORunning your application Programming Flash Eeprom #$7FEBDM Operation Memory Maps PM12DP256 Memory MapPM12DG128 / PM12DT128 Memory Map Peripheral AreaPM12D60 Memory Map Peripheral Area see note 2 belowOption Switches Config SwitchCOM Switch Mode Switch PM12D60Ports and Connectors PRU PortPRU Port Connector McuportBusport Analog Port COM1COM2 CAN1 4 Ports Can 1 4 Port ConnectionsLcdport KeypadTB1 and J6 Power BDM PortTroubleshooting Tips and Suggestions UtilitiesLCD Command Codes TablesLCD Character Codes Mon12 Monitor Commands BulkO Signal Connection Reference OtherPS4/MIOS