#6 Framebuffer Device Driver / Microwindows on Synthetic target

In this section, the framebuffer IO and MicroWindows test applications are configured to run on a synthetic target. Tested with openSUSE 11.0 32-bit and openSUSE 11.3 64-bit. A framebuffer device driver is also available for the ILI9325 LCD controller here.

I. Framebuffer Device Driver

For complete details on the subject of synthetic target and framebuffer, refer to the eCos documentation:
- Synthetic Target
- Framebuffer Device on Synthetic Target

a. Setup the host wrapper:

The eCos synthetic applications interact with the IOs of the host through an I/O Auxiliary layer. This layer is part of the eCos repository and must be compiled/installed on the host machine. Tcl/TK version 8.3 or later is required to compile the host tools. The complete ecosystem will default install in /usr/local/libexec/ecos/. It is also possible to compile synthetic host package seperatly if required.

$ mdkir synth_host
$ cd synth_host
$ /home/my_ecos_repository/configure { options }
$ make
$ make install

Possible options allow to select the installation directory or the Tcl/TK location:
--prefix=<path>
--with-tcl=<path>
--with-tcl-header=<path>
--with-tcl-lib=<path>

b. Compiling the synthetic target framebuffer example:

To compile the framebuffer tests application, compile the linux default template with the framebuffer IO package included.

$ mdkir synth
$ cd synth
$ ecosconfig new linux default
$ ecosconfig add io_framebuf
$ ecosconfig tree
$ make
$ make tests

To run the application:
./install/tests/io/framebuf/current/tests/fb --io



II. Microwindows

In order to tests Microwindows on synthetic target, the following patch must be applied to eCos repository. This patch is gathered from the eMBosLab project. Keyboard and mouse is not supported in the current patch.
Compile the linux net template with the framebuffer IO and microwindows package included. In this example, to avoid the use of a DHCP server, the Ethernet interface is configured with a fix IP address (12.12.12.1). The framebuffer and microwindows package are configured as follow:


Create and compile the linux synthetic application, including the tetris demo:

$ mdkir synth_mw
$ cd synth_mw
$ ecosconfig new linux net
$ ecosconfig add io_framebuf
$ ecosconfig add mw
$ configtool ecos.ecc (adjust configuration as needed)
$ ecosconfig tree
$ make
$ make tests

Run the application (tetris demo):
./install/bin/ecos_mw.elf --io -t /usr/local/libexec/ecos/devs/eth/synth/ecosynth/current/ethernet.tdf



The default Target Definition File (ethernet.tdf) creates a virtual network interface (tap3) using the Linux kernel's ethertap facility. The virtual network interface is created on top of the Ethernet device (eth0) using the MAC 00:FE:42:63:84:A5.

From /usr/local/libexec/ecos/devs/eth/synth/ecosynth/current/ethernet.tdf:
synth_device ethernet {
eth0 ethertap tap3 00:FE:42:63:84:A5
}


While the synthetic application is running, using root privilege, configuring the IP address of the virtual interface of the host:
ifconfig tap3 12.12.12.2

Assuming the Ethernet interface of the application is configured with the IP address 12.12.12.1, it should be possible to ping the application using "ping 12.12.12.1".

III. VNC and Microwindows

To overcome the lack of mouse when using MicroWindows on synthetic target, the application can be accessed through VNC. To to do so, add the VNC server package to the configuration. In this case, the IO framebuffer layer is no longer required, instead, the VNC server package implements a virtual framebuffer layer. An example of ecos.ecc is located here.

$ mdkir synth_vnc
$ cd synth_vnc
$ ecosconfig new linux net
$ ecosconfig add mw
$ ecosconfig add vnc_server
$ configtool ecos.ecc (adjust configuration as needed)
$ ecosconfig tree
$ make
$ make tests

Start the tetris demo as usual (./install/bin/ecos_mw.elf --io -t /usr/local/libexec/ecos/devs/eth/synth/ecosynth/current/ethernet.tdf), setup the ethernet tap3 IP address of the host (ifconfig tap3 12.12.12.2). To access the application, a VNC client such as the Gnome VNC client (Vinagre) can be used:



Tetris: Not an easy game...