Device Driver (tef_em1d use) Source Configuration



1. Introduction

This section explains the source code configuration of the device driver used with the T-Engine reference board (tef_em1d).

For more information about the functional specifications of each device driver, please refer to the
"T-Engine Standard Device Driver Specifications" released by TRON Forum, and "T-Kernel 2.0 (tef_em1d) Implementation Specification" for implementation dependencies.

2. Directory Configuration

The device driver source code is included in the T-Kernel source code package.

The directory configuration diagram for the entire device driver source is described below.

  tkernel_source
    |
    |-- ...               (T-Kernel source directory)
    |-- lib                     Library
    |-- include                 Definition file (header file)
    |   `-- device                 Device driver definition file
    |-- etc                     make rule, various scripts
    |
    |-- driver           Device driver source directory
       `-- <Model Name>
           |
           |-- clk              Clock driver
           |   |-- build
           |   `-- src
           |       `-- svc          For the extended SVC interface
           |
           |-- console          Console driver
           |   |-- build
           |   `-- src
           |       `-- svc          For the extended SVC interface
           |
           |-- kbpd             KB/PD driver
           |   |-- build
           |   `-- src
           |
           |-- lowkbpd          KB/PD - Actual I/O driver
           |   |-- build
           |   `-- src
           |
           |-- screen          Screen driver
           |   |-- build
           |   `-- src
           |
           |-- sysdsk          System disk driver
           |   |-- build
           |   |-- obj            Object file for MMC use
           |   `-- src
           |
           `-- build           Overall build directory

3. clk Directory

This is the source for the clock driver which supports RTC on the T-Engine reference board.

The serial interface (I2C鐚ŒSPI) needed to access RTC is also used by other device drivers, so it is implemented as a separate subsystem which is accessed through extended SVC. For this reason, the extended SVC interface library is required.

Run make in the build directory to build both the object file and the extended SVC interface library. The interface library source and definition files are placed in the "src/svc" subdirectory. If they do not exist, they are automatically generated by a "perl" script.

The object file created in the build directory is copied to the "driver/<Model Name>/build" directory, and the interface library (libem1diic.a) is copied to the "tkernel_source/lib/build/<Model Name>" directory.

4. console Directory

This is the source for the console driver which supports the serial port on the T-Engine reference board.

The console driver is implemented as a subsystem which is accessed through extended SVC, so the extended SVC interface library is required.

Run make in the build directory to build both the object file and the extended SVC interface library. The interface library source and definition files are placed in the "src/svc" subdirectory. If they do not exist, they are automatically generated by a "perl" script.

The object file created in the build directory is copied to the "driver/<Model Name>/build" directory, and the interface library (libconsolesvc.a) is copied to the "tkernel_source/lib/build/<Model Name>" directory.

5. kbpd Directory

This is the KB/PD driver source to support a general keyboard and pointing device (mouse). This driver only performs logical processing which does not depend on the actual device, so the processing for the actual device is handled by the Actual I/O driver (lowkbpd).

The object file created in the build directory is copied to the "driver/<Model Name>/build" directory.

6. lowkbpd Directory

This is the source for the Actual I/O driver which supports the button switches on the touch panel and board connected to the T-Engine reference board.

It processes the touch panel as a pointing device and the button switches as keyboard keys.

The object file created in the build directory is copied to the "driver/<Model Name>/build" directory.

7. screen Directory

This is the source for the screen driver which supports the LCD connected to the T-Engine reference board.

The object file created in the build directory is copied to the "driver/<Model Name>/build" directory.

8. sysdsk Directory

This is the source for the system disk driver which supports the micro SD card slot on the T-Engine reference board.

However, the source files for the micro SD card (MMC) access functions are not included. The object file is placed in the "obj" subdirectory.

Only micro SD cards (SD, SDHC) are supported. Other types of disk media are not supported.

The object file created in the build directory is copied to the "driver/<Model Name>/build" directory.

9. build Directory

This is the build directory for creating all of the device drivers together. The object file for each device driver that is created is placed in this directory, and the previous object file is backed up in the "!OLD" subdirectory.

The object files for each device driver which are placed in this directory are used when building the T-Kernel execution image.