FrameBuffer

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






drunken79 posted SDL sources at SDL for Nios2
look in the file CONFIGURE.NIOS for ./configure options. After compiling, the library is in /src/.libs/ or in the directory you specified with --prefix.
Some small example programms from :
Example SDL Programms
And a thread at gmane about uclinux and libsdl :
Gmane SDL on uClinux

The Nano-X Window System previously named Microwindows

Linux Framebuffer Driver Writing HOWTO

How to use framebuffer devices
Writting Linux Frame Buffer Driver fo LCD Device - China Linux Forum [ 簡體 ]
Introduction to Microwindows Programming | Linux Journal
Embedded GUI: FLTK SDL

How to write a framebuffer driver using the new api.
Input API

The Linux USB Input Subsystem, Part I


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

   

Tag page

Files 3

FileSizeDateAttached by 
 de2vga.tar.bz2
No description
1661.78 kB02:45, 8 Dec 2008AdminActions
 de2_vga.zip
No description
155.21 kB02:45, 8 Dec 2008AdminActions
 zImage_de2_vga
No description
1623.16 kB02:45, 8 Dec 2008AdminActions
Viewing 3 of 3 comments: view all
please tell me why nano-X couldn't be found when "make romfs".
Posted 01:32, 29 Dec 2009
Could you tell us your uClinux-dist version or download site. Because have make error when compile microwin/src. I'm useing uClinux-dist-20080131.tar from terasic. make[5]: *** [fblin8.o] Error 1 make[5]: Leaving directory `/root/uClinux/uClinux-dist/user/microwin/src/drivers' make[4]: *** [subdir-drivers] Error 2 make[4]: Leaving directory `/root/uClinux/uClinux-dist/user/microwin/src' make[3]: *** [all] Error 1 make[3]: Leaving directory `/root/uClinux/uClinux-dist/user/microwin' make[2]: *** [microwin] Error 2 make[2]: Leaving directory `/root/uClinux/uClinux-dist/user' make[1]: *** [all] Error 2 make[1]: Leaving directory `/root/uClinux/uClinux-dist/user' make: *** [subdirs] Error 1 edited 06:18, 26 Jan 2010
Posted 06:17, 26 Jan 2010
louis vuitton makes handbags for spring that resemble trash bags with leather replica burberry scarf. The Raindrop Besace purses retail for $1,960 each. Refinery 29 reminds those interested in owning the bags of these words, spoken by louis vuitton replicas D: "And in walks this girl with like garbage bags. I thought lv handbags kinda like ghetto, and like ... weird.lv handbags on sale them are some of the many well-known, such as Tiffany & Co, Ralph Lauren and louis vuitton.
Posted 01:21, 9 Mar 2010
Viewing 3 of 3 comments: view all
You must login to post a comment.
SourceForge.net