
Designer Reference Manual USB08 Evaluation Board
46 Software Module Descriptions MOTOROLA
Software Module Descriptio ns
The compiler project for the USB08 reference design covers these C
modules (see Figure 3-1):
• U08MAIN.C
• U08KEY.C
• U08ADC.C
• VECJB8.C
An alternative possibility consists of controlling the translation of the
project via a batch file as shown in this example (BUILD.BAT).
cx6808 -v -l u08main.c u08adc.c u0 8k ey .c vecjb8.c
clnk -o usb08.h08 usb08 .lkf
chex -fm -h -o usb08.s1 9 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 USB08.S19, which can be loaded into
the FLASH memory of the MC68HC908JB8.
Another important file for controlling the translation is the linker file
USB08.LKF:
# USB08 LINK COMMAND FILE
# COSMIC HC08 C COMPILE R
#
+seg .text -b 0xdc00 -n .text # progra m sta rt address
+seg .const -a .text # constants fol lo w cod e
+seg .bsct -b 0x0040 -n .bsct # zero page sta rt address
+seg .ubsct -a .bsct -n .ubsct # data start a ddress
+seg .data -a .ubsct # data start addr es s
+def __sbss=@.bss # sta rt 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\cx0 8\L ib \libi.h08"
"c:\programs\cosmic\cx0 8\Lib\libm.h08"
+seg .const -b 0xfff0 # vectors start address
# Put your interrupt vectors file he re if nee ded
vecjb8.o
+def __memory=@.bss # s ymbol used by library
+def __stack=0x013f # s tack pointer initial v alue
MS-DOS is a registered trademark of Microsoft Corporation in the United States and/or other
countries.