diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-57989FF8-5E8F-4C8A-9D38-169AFCA4C078.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-57989FF8-5E8F-4C8A-9D38-169AFCA4C078.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,116 @@ + + + + + +Baseport Template Implementation GuideDescribes the use of the Baseport Template in porting Symbian +platform. +
General +procedure

The Baseport Template is a minimal +baseport for the Symbian platform that implements the basic functionality +of a baseport without supplying any hardware specific code. It provides +a skeleton of a working baseport, which base porters can modify in +accordance with the instructions in the comments. Porting involves +abstraction from hardware and must be performed in a set sequence +(for example, the abstraction in the drivers depends on previous abstraction +in HAL which depends on previous abstraction in ASIC and so on). Many +of the header files are not in the Baseport Template files but are +held elsewhere in the code base, for example, ..\e32\include\kernel\arm\

+
File +structure

The files which make up the Baseport +Template are divided between two directories, ASSP and Variant containing +two classes of the same names. This division represents a fundamental +feature of the kernel architecture which you are recommended to retain +in your implementation of the port. The baseport involves implementing +functions to run on the target hardware, but it is useful to distinguish +between functionality specific to the CPU (ARM etc) and functionality +specific to peripherals with their own processors. ASSP functions +must be implemented in accordance with the device hardware, while +Variant functions correspond to off chip peripherals. The distinction +is not absolutely mandatory (it is possible just to provide a Variant +layer) but strongly recommended and assumed in many other areas of +the porting process.

A port with an ASSP/Variant architecture +is implemented with two C++ classes and two .mpp files.

    +
  • ...\template_assp\assp.cpp

  • +
  • ...\template_assp\katemplate.mmp

  • +
  • ...\template_variant\specific\variant.cpp

  • +
  • ...\template_variant\vtemplate.mmp

  • +

For more information see the Base Porting Guide.

+
+
Bootstrap

The bootstrap is the code that runs after a hardware +reset, to initialize the basic system services that enable the kernel +to run. Parts of it must be written in assembler (either GNU or ARM) +and are specific to the device hardware, while others are written +in C++ and are automatically translated into assembler. Bootstrap +is implemented as the bootstrap/template.s file.

This is supplied as an example only: implementation is entirely +dependent on the target hardware.

For more information see the Base Porting Guide.

+
Interrupt +dispatcher

The Symbian platform is a real time +interrupt driven operating system. To port it you need to determine +the number and function of the interrupts in your port and implement +the interrupt dispatcher to handle them. Interrupt service routines +(ISRs) are held in an array of class SInterruptHandler as a member of the TemplateInterrupt class defined +in template_assp_priv.h. ISRs are associated +with individual interrupt sources defined in the ASSP layer by functions +of the Interrupt class such as Bind() and Unbind().

    +
  • ...\template_assp\template_assp_priv.h

  • +
  • ...\template_assp\interrupts.cpp

  • +

For more information see the Base Porting Guide.

+
+ ASIC

The Asic class +contains initialization functions which must be called early in the +boot process. ASSP is derived from Asic and Variant from the ASSP derivation.

    +
  • ...\template_assp\template_assp.h

  • +
  • ...\template_assp\template_assp.cpp

  • +

For more information see the Base Porting Guide.

+
+ HAL

The HAL class +abstracts items of hardware specific functionality. You must implement +functions to get and set hardware specific attributes in accordance +with the hardware used on the target device. The attributes are defined +in config.hcf and values.hda configuration files.

    +
  • ...\template_variant\hal\config.hcf

  • +
  • ...\template_variant\hal\values.hda

  • +

The attributes are modified by get and set functions called +HAL handlers defined in the relevant hardware drivers.

For more +information see the Base Porting Guide.

+
+ Drivers

The rest of the work involves +porting drivers. A typical implementation would include these drivers:

    +
  • DMA Framework

      +
    • ...\template_assp\dmapsl.cpp

    • +
    • ...\template_assp\dma.mpp

    • +

  • +
  • Digitizer Driver

      +
    • ...\template_variant\specific\xyin.cpp

    • +
    • ...\template_variant\exxytemplate.mmp

    • +

  • +
  • Keyboard Driver

      +
    • ...\template_variant\exkey_inttemplate.mmp

    • +
    • ...\template_variant\specific\keyboard_interrupt.cpp

    • +

  • +
  • LCD Extension

      +
    • ...\template_variant\specific\lcd.cpp

    • +
    • ...\template_variant\exlcdtemplate.mmp

    • +

  • +
  • Serial Port Driver

      +
    • ...\template_variant\specific\uart.cpp

    • +
    • ...\template_variant\datxtemplate.mmp

    • +

  • +
  • Sound Driver

      +
    • ...\template\template_variant\specific\soundsc_rx.cpp

    • +
    • ...\template\template_variant\specific\soundsc_tx.cpp

    • +
    • ...\template\template_variant\soundsctemplate.mmp

    • +

  • +
  • USB Client Driver Technology

      +
    • ...\template_assp\pa_usbc.cpp

    • +
    • ...\template_assp\usbcc.mmp

    • +

  • +
+
\ No newline at end of file