Designer Reference Manual
USB08 Evaluation Board
46
Software Module Descriptions
MOTOROLA
Software Module Descriptions
The compiler project for the USB08 reference design covers these C
modules (see
•
•
•
•
An alternative possibility consists of controlling the translation of the
project via a batch file as shown in this example (
cx6808 -v -l u08main.c u08adc.c u08key.c vecjb8.c
clnk -o usb08.h08 usb08.lkf
chex -fm -h -o usb08.s19 usb08.h08
This batch file can be invoked under the MS-DOS
®
system environment
to translate and link USB08 firmware components. The result of this
process is a S-record file named
, which can be loaded into
the FLASH memory of the MC68HC908JB8.
Another important file for controlling the translation is the linker file
:
# USB08 LINK COMMAND FILE
# COSMIC HC08 C COMPILER
#
+seg .text -b 0xdc00 -n .text # program start address
+seg .const -a .text # constants follow code
+seg .bsct -b 0x0040 -n .bsct # zero page start address
+seg .ubsct -a .bsct -n .ubsct # data start address
+seg .data -a .ubsct # data start address
+def [email protected] # start address of bss
# Put your startup file here
crtsjb8.o # startup routine
# Put your files here
u08main.o
u08key.o
u08adc.o
# "c:\programs\cosmic\cx08\Lib\libi.h08"
"c:\programs\cosmic\cx08\Lib\libm.h08"
+seg .const -b 0xfff0 # vectors start address
# Put your interrupt vectors file here if needed
vecjb8.o
+def [email protected] # symbol used by library
+def __stack=0x013f # stack pointer initial value
MS-DOS is a registered trademark of Microsoft Corporation in the United States and/or other
countries.