cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Frame Buffer

Frame Buffer

 

DE2 Board

This is a framebuffer driver and usage, tested on the DE2 board. 1. download the DE2 demo disc, DE2 System CD v. 1.5—ZIP

2. download the Avalon_VGA_Controller.zip (you must join Nios Forum to access the "Post Your Own IP") and PS/2 component

3. unzip the DE2 demo disc, in project dir, DE2_System_v1.5/DE2_demonstrations/DE2_NIOS_HOST_MOUSE_VGA unzip the VGA controller and PS/2.

4. in the same project dir, unzip the attached  de2_vga.zip. I have included ptf and sof in it. I delete the binary VGA, add the new VGA at 640x480 16bits 565, add PS/2, and change the SDRAM clock from 50MHz to 100MHz. Now the SDRAM have 200MByte/s bandwidth, and the VGA will use 50MByte/s. ( If you ever want to use 24bits color, you will need to swap RED and BLUE outputs at the top level, as to make it compatible with Microwin. )

5. in uClinux-dist kernel config,

Processor type and features -->

Platform (Altera DE2 Development board support) -->


Device Drivers --> Character devices --->

[*] Virtual terminal

[ ] Support for console on virtual terminal # YOU SHOULD NOT SELECT THIS

select the frame buffer driver,

Device Drivers --> Graphics support --->

[*] Support for frame buffer devices ---> [*] Altera framebuffer support

Console display driver support --->

[ ] VGA text console # YOU MUST UNSELECT THIS

< > Framebuffer Console support

select input device drivers,

Device Drivers --> Input device support

[*] Generic input layer (needed for keyboard, mouse, ...)

--- Userland interfaces

[*] Mouse interface

[ ] Provide legacy /dev/psaux device

(1024) Horizontal screen resolution

(768) Vertical screen resolution

if you will use PS/2 mouse or keyboard,

Device Drivers ---> Input Device Drivers

[*] Keyboard --->

<*> AT keyboard

[*] Mouse --->

<*> PS/2 mouse

Hardware I/O ports --->

--- Serial I/O support

[ ] i8042 PC Keyboard controller # YOU MUST UNSELECT THIS

[ ] Serial port line discipline # YOU MUST UNSELECT THIS

[*] Altera UP PS2 controller

if you will use USB mouse or keyboard, select ISP1362 USB host driver (see UsbHost)

Device Drivers ---> HID Devices

[*] Generic HID support

6. in uClinux-dist user config,

MicroWindows --->

[*] MicroWindows

--- Compiling Options

[*] Optimize

[*] Thread safe # if you use pthread

--- Libraries

[*] NanoX

--- Demos

[*] NanoXDemo

--- Applications

[*] NanoWM

--- Settings

(Packed-16bit-5/6/5) Screeen PixType

[ ] Link App into server

[*] Have File IO

[*] Have JPEG Support # if you want JPEG, and then libjpeg will be selected

--- Display Config

[*] Frame Buffer Display

--- Mouse/Touch Screen

[*] Serial Mouse

--- Keyboard

[*] Scan Keyboard

--- Install These Applications

[*] Nano-X

[*] NanoWM

[*] NXclock

[*] NXterm

[*] NXView

7. Build and boot uClinux, It will show,

io scheduler noop registered

io scheduler deadline registered (default)

fb0: Altera frame buffer device, using 600K of video memory

Serial: JTAG UART driver $Revision: 1.1 $

ttyJ0 at MMIO 0x806810f0 (irq = 1) is a jtag_uart

Then it will detect the USB mouse,

/> input: CHESEN USB MOUSE as /class/input/input0

input: USB HID v1.10 Mouse [CHESEN USB MOUSE] on usb-isp1362-hcd-2

Last, run the nano-X server,

/> nano-X &

/> nanowm &

/> nxclock &

/> nxterm &

It should display a arrow cursor, round clock and shell terminal.

OR, try the attached zImage_de2_vga,


nano-X &

nxview /home/ftp/rhino.jpg &

The 8M memory on DE2 is very tight. So you should not add too many features/drivers in kernel , or user apps. Otherwise it will run out of memory and crash.

LCD frame buffer on NEEK

This is driver is available only in the v2.6.26-nios2 branch of uClinux-dist.git.

In uClinux-dist kernel config,

Processor type and features -->

Platform (Altera Nios II Embedded Evaluation Kit support) -->


Device Drivers --> Character devices --->

[*] Virtual terminal

[ ] Support for console on virtual terminal # YOU MUST UNSELECT THIS

select the frame buffer driver,

Device Drivers --> Graphics support --->

[*] Support for frame buffer devices ---> [*] Altera framebuffer support

Console display driver support --->

[ ] VGA text console # YOU MUST UNSELECT THIS

< > Framebuffer Console support

select the SPI driver for touch panel,

Device Drivers --> [*] SPI support ---> [*] Altera SPI Controller


select input device drivers,

Device Drivers --> Input device support

[*] Generic input layer (needed for keyboard, mouse, ...)

--- Userland interfaces

[*] Mouse interface

[ ] Provide legacy /dev/psaux device

(800) Horizontal screen resolution

(480) Vertical screen resolution

[*] Event interface # You must select this to use touch panel

if you will use PS/2 mouse or keyboard,

--- Input Device Drivers

[*] Keyboard ---> <*> AT keyboard

[*] Mouse ---> <*> PS/2 mouse


[*] Touchscreens ---> [*] ADS7846/TSC2046 and ADS7843 based touchscreens

Hardware I/O ports --->

--- Serial I/O support

[ ] i8042 PC Keyboard controller # YOU MUST UNSELECT THIS

[ ] Serial port line discipline # YOU MUST UNSELECT THIS

[*] Altera UP PS2 controller


Device Drivers ---> HID Devices

[*] Generic HID support

6. in uClinux-dist user config,

MicroWindows --->

[*] MicroWindows

--- Compiling Options

[*] Optimize

[*] Thread safe # if you use pthread

--- Libraries

[*] NanoX

--- Demos

[*] NanoXDemo

--- Applications

[*] NanoWM

--- Settings

(Packed-32bit-8/8/8) Screeen PixType

[ ] Link App into server

[*] Have File IO

[*] Have JPEG Support

--- Display Config

[*] Frame Buffer Display

--- Mouse/Touch Screen

[ ] Serial Mouse # only if you have ps2 mouse

[*] Common touchscreen using tslib

[ ] No Mouse

--- Keyboard

[*] Scan Keyboard # only if you have a ps2 keyboard

[ ] No Keyboard # only if you don't have a keyboard

--- Install These Applications

[*] Nano-X

[*] NanoWM

[*] NTetris

[*] NXclock

[*] NXView

Build and boot, you should see the fb0 and input device.

io scheduler noop registered

io scheduler deadline registered (default)

fb0: Altera FB frame buffer device

ttyJ0 at MMIO 0x8002000 (irq = 10) is a Altera JTAG UART

console [ttyJ0] enabled


altps2 : base 88009280 irq 9

mice: PS/2 mouse device common for all mice

ads7846 spi0.0: touchscreen, irq 14

input: ADS784x Touchscreen as /class/input/input0


input: AT Raw Set 2 keyboard as /class/input/input1

Calibrate the touch screen.

/> TSLIB_FBDEVICE=/dev/fb0

/> TSLIB_CONSOLEDEVICE=none

/> TSLIB_CALIBFILE=/etc/pointercl

/> TSLIB_TSDEVICE=/dev/input/event0 // your touchscreen device

/> ts_calibrate

You could save the file of TSLIB_CALIBFILE to a flash filesystem, so that you

don't have to run ts_calibrate each time.

Run the nano-X server,

/> CONSOLE=/dev/tty1 # only if you have keyboard

/> nano-X &

/> nanowm &

/> nxclock &

It should display a round clock.

Then you can try out nxview and display jpeg picture. eg,

/> nxview /home/ftp/rhino.jpg &

Or plag a game,

/> ntetris &


nxlib and fltk-1.1

MicroWindows --->

Libraries --->

[*] nxlib

An "editor" example fltk-1.1 apps will be installed.

links web browser

Network Applications --->

[*] links

This is a fast, lightweight text and graphical web-browser.

Console on framebuffer

Device Drivers --> Character devices --->

[*] Virtual terminal

[* ] Support for console on virtual terminal

select the frame buffer driver,

Device Drivers --> Graphics support --->

[*] Support for frame buffer devices ---> [*] Altera framebuffer support


Console display driver support --->

[ ] VGA text console # YOU MUST UNSELECT THIS

<*> Framebuffer Console support

[*] Select compiled-in fonts

[*] VGA 8x16 font


[*] Bootup logo ---> # optional, to display a penguin

Please check the kernel doc,

  • linux-2.6/Documentation/console/console.txt
  • linux-2.6/Documentation/fb/fbcon.txt

Additional Resources

Changelog of de2_vga.zip, ver 2. add PS/2.

Download


Attachments
Version history
Last update:
‎06-27-2019 12:31 AM
Updated by:
Contributors