diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-AF245763-EB25-49BC-90DC-0BD5F2D22AA5.dita --- a/Symbian3/PDK/Source/GUID-AF245763-EB25-49BC-90DC-0BD5F2D22AA5.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-AF245763-EB25-49BC-90DC-0BD5F2D22AA5.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,74 +1,74 @@ - - - - - -Specific -Build InformationThis document discusses the details of the build procedure which -are specific to device drivers. -
Building -device drivers

Building a device driver is similar to building -any other component in Symbian platform. This section discusses the details -that are specific to drivers, and assumes that you are familiar with the Symbian -platform build tools.

Device drivers can be built either by using -console commands (bldmake and abld) -or by using an IDE. Any project can be built for multiple platforms. Generally, -it is either ARM for the hardware target or WINSCW for the emulator target. -For hardware target builds, the build can be for ARMV5, ARMV6, and Thumb, -while for emulator builds, the platform is WINSCW. The compilers used for -ARM are the ARM RVCT compiler or, in earlier versions of the platform, -a version of the GNU GCC compiler. For the emulator, the compiler is the Carbide.c++ -or Metrowerks CodeWarrior compiler.

The .mmp file -(project file) specifies the source files to build and the platform for which -the target binary will be built.

-
Variant specific target

When a target is specified -using the keyword VariantTarget(), the build tools generate -a unique name for the binary by adding the variant name. This allows separate -binaries to be created for each variant, and prevents the current binary being -overwritten.

For example, if the target to be built is d_expio_ldd.ldd, -then VariantTarget(d_expio_ldd,ldd) would be specified -in the .mmp file. If the project is then built for the h4hrp variant, -the final target binary built is called _h4hrp_d_expio_ldd.ldd.

-
ROM image build

To include a driver in a ROM image, -the driver's files must be included in the corresponding obey files (.oby). -In the base subsystem, the binaries are specified in .iby files, -and the .iby files are then included in .oby files.

For -example, to include a driver in the H4 text shell ROM image, it should be -included in kernel.iby. This file is located in base\omap_hrp\h4\rom\, -and exported to epoc32\rom\h4hrp. Similarly for the TechView -ROM build, the relevant file is base_h4hrp.iby file, -which is located in base\omap_hrp_h4\rom\, and exported -to epoc32\rom\include. An example from an .iby file -is shown below:

// .iby file - -/** -##KMAIN## gets the path for e32 -##BUILD## gets the build – udeb/urel according to build -##VARIANT gets the target from corresponding variant -*/ - -device[VARID]=\EPOC32\RELEASE\##KMAIN##\##BUILD##\d_expio_ldd.ldd sys\bin\d_expio_ldd.ldd - -device[VARID]=\EPOC32\RELEASE\##KMAIN##\##BUILD##\_##VARIANT##_d_expio_pdd.pdd sys\bin\d_expio_pdd.pdd

On -building the test .inf files, test .iby files will be -generated. This includes the newly added binaries in the .iby file.

After -building the drivers, a ROM can be built. Device driver and base developers -generally build text shell ROM images for development and testing. These can -be built using the rom tool (from base\e32\rombuild). -By default, the ROM image is generated in that directory. An alternate path -can also be specified.

For example, for the H4HRP variant, a text -shell ROM image is built using:

rom –v=h4hrp –I=armv5 udeb

This -builds a ROM called H4HRPARMV5D.IMG, which can then be -downloaded to target hardware and tested.

To include base test programs -in a ROM image, the option –type can be used. For example:

rom -–v=h4hrp –I=armv5 udeb –type=e32tests

This includes the -tests from base\e32test. The tool uses as input a generated -or precompiled oby file, which includes all the generated -test .iby files.

+ + + + + +Specific +Build InformationThis document discusses the details of the build procedure which +are specific to device drivers. +
Building +device drivers

Building a device driver is similar to building +any other component in Symbian platform. This section discusses the details +that are specific to drivers, and assumes that you are familiar with the Symbian +platform build tools.

Device drivers can be built either by using +console commands (bldmake and abld) +or by using an IDE. Any project can be built for multiple platforms. Generally, +it is either ARM for the hardware target or WINSCW for the emulator target. +For hardware target builds, the build can be for ARMV5, ARMV6, and Thumb, +while for emulator builds, the platform is WINSCW. The compilers used for +ARM are the ARM RVCT compiler or, in earlier versions of the platform, +a version of the GNU GCC compiler. For the emulator, the compiler is the Carbide.c++ +or Metrowerks CodeWarrior compiler.

The .mmp file +(project file) specifies the source files to build and the platform for which +the target binary will be built.

+
Variant specific target

When a target is specified +using the keyword VariantTarget(), the build tools generate +a unique name for the binary by adding the variant name. This allows separate +binaries to be created for each variant, and prevents the current binary being +overwritten.

For example, if the target to be built is d_expio_ldd.ldd, +then VariantTarget(d_expio_ldd,ldd) would be specified +in the .mmp file. If the project is then built for the h4hrp variant, +the final target binary built is called _h4hrp_d_expio_ldd.ldd.

+
ROM image build

To include a driver in a ROM image, +the driver's files must be included in the corresponding obey files (.oby). +In the base subsystem, the binaries are specified in .iby files, +and the .iby files are then included in .oby files.

For +example, to include a driver in the H4 text shell ROM image, it should be +included in kernel.iby. This file is located in base\omap_hrp\h4\rom\, +and exported to epoc32\rom\h4hrp. Similarly for the TechView +ROM build, the relevant file is base_h4hrp.iby file, +which is located in base\omap_hrp_h4\rom\, and exported +to epoc32\rom\include. An example from an .iby file +is shown below:

// .iby file + +/** +##KMAIN## gets the path for e32 +##BUILD## gets the build – udeb/urel according to build +##VARIANT gets the target from corresponding variant +*/ + +device[VARID]=\EPOC32\RELEASE\##KMAIN##\##BUILD##\d_expio_ldd.ldd sys\bin\d_expio_ldd.ldd + +device[VARID]=\EPOC32\RELEASE\##KMAIN##\##BUILD##\_##VARIANT##_d_expio_pdd.pdd sys\bin\d_expio_pdd.pdd

On +building the test .inf files, test .iby files will be +generated. This includes the newly added binaries in the .iby file.

After +building the drivers, a ROM can be built. Device driver and base developers +generally build text shell ROM images for development and testing. These can +be built using the rom tool (from base\e32\rombuild). +By default, the ROM image is generated in that directory. An alternate path +can also be specified.

For example, for the H4HRP variant, a text +shell ROM image is built using:

rom –v=h4hrp –I=armv5 udeb

This +builds a ROM called H4HRPARMV5D.IMG, which can then be +downloaded to target hardware and tested.

To include base test programs +in a ROM image, the option –type can be used. For example:

rom +–v=h4hrp –I=armv5 udeb –type=e32tests

This includes the +tests from base\e32test. The tool uses as input a generated +or precompiled oby file, which includes all the generated +test .iby files.

\ No newline at end of file