This topic describes how to include the ported driver in a ROM.
The USB client driver, EUSBC.LDD, and the USB client controller, USBCC.DLL (the PDD) and any other required component (e.g. a USB transceiver DLL) must be added to the ROM image by adding suitable definitions to the ROM .oby files. In the template port add definitions to two files:
the kernel.iby file in ...\template_variant\rom\, if building a text-shell ROM image; it contains the lines:
// USB Client device[VARID]= \Epoc32\Release\##KMAIN##\##BUILD##\USBC.LDD \sys\bin\EUSBC.LDD // USB Device Driver extension[VARID]= \Epoc32\Release\##KMAIN##\##BUILD##\_##VARIANT##_USBCC.DLL \sys\bin\USBCC.DLL
the base_template.iby file in ...\template_variant\rom\, if building a full ROM image; it contains the lines:
// USB Drivers extension[VARID]=KERNEL_DIR\DEBUG_DIR\_template_usbcc.dll \sys\bin\usbcc.dll device[VARID]= KERNEL_DIR\DEBUG_DIR\usbc.ldd \sys\bin\eusbc.ldd
Add the command line test applications. This can be done in a special purpose .oby file which is used to create the text shell, test ROM image:
FILE=/EPOC32/RELEASE/ARMV5/UREL/T_USB.EXE SYS\BIN\T_USB.EXE FILE=/EPOC32/RELEASE/ARMV5/UREL/T_USBAPI.EXE SYS\BIN\T_USBAPI.EXE
Note: Both these test applications are also pulled in by default by the standard e32tests.oby file.
The macro EUSBC needs to be defined for the base port to pull in the user-mode components (e.g. USBMan) for a full ROM image. For template, this is done in ...\template_variant\template.oby:
REM Define whether or not to include USB client support: #define EUSBC