skyeye 上跑 Microwindows
等待教程。。。
[ 本帖最后由 ksh 于 2008-7-18 22:29 编辑 ] 偶恐怕写不了什么教程,水平有限,只是简单记录了一些注意事项。想看的就凑合着看先。
其实44b0支持FB,所以驱动比较简单,关键是ECOS各包的引用问题。
a、安装“libgtk2.0-dev”然后编译skyeye;
b、skyeye对44B0的LCD参数处理上存在问题,需要修改“dev_lcd_s3c44b0x.c”文件中的“lcd_s3c44b0x_changed”函数,在131行增加“width = 320; height = 240;”,将LCD宽高设置为固定值,并注意44B0的“LCDSADDR2”寄存器中的BSWP位设置为“0”;
c、删除“microwindows.cdl”中的“requires CYGPKG_POSIX_TIMERS”行,否则将导致无休止的需求冲突;
d、“alarm”函数无定义编译错误,删除“client.c”中对“alarm(1);”函数的调用;
e、修改“microwindows.cdl”中的“eCos ARM drivers”驱动编译文件(可用“kbd_null.c”替代),否则nanox服务端将因为打开mouse而无法启动;
f、修改“scr_ecos.c”驱动,原文件中的“fb_open”函数不支持256色;
g、在“lcd_support.c”中实现fb驱动需要的几个简单函数,lcd_init、lcd_getinfo等;
h、“microwindows.cdl”文件中的“CYGPKG_MICROWINDOWS_CFLAGS_ADD”选项定义了对MW的编译控制,类似于MW的“config”文件,编译应用程序时也应该加上;
i、所有MW头文件在“$(INSTALL_DIR)/include/microwin”目录中;
j、“demos/nanox”目录下包含了演示程序;而__MW_APP_TAB__数组中包含了所有与mw服务端线程相关的数据,应该保证让其先运行,否则“GrOpen”时将有可能连接不到服务端。
k、“devdraw.h”中包含了原始的图形设备驱动,“GdOpenScreen”打开屏幕,然后就可以使用其它函数绘制屏幕;
回复 #3 深思 的帖子
S3C44B0X 的 LCD 模拟我是按手册写的,但是有一点,不支持 Dual-Scan 模式。这个模拟的LCD屏宽高是通过寄存器判别的,
在三星本身自带的44B0X开发包以及当时 Michael Kang 提供的 2.4.x 测试包上测试通过的。
另外,该模拟2位色深4灰度模式的色彩变换可能是倒了个,上次好像有用户说过。 我也不晓得44B0的LCD究竟如何配置,有写参数迷茫的很;
我把ecos44b0 的补丁传上来了,你可以看看是不是我 LCD 的参数配置错了。
http://www.linuxfans.org/bbs/viewthread.php?tid=185065&extra=page%3D1&frombbs=1 原帖由 深思 于 2008-7-28 18:36 发表 http://218.56.161.13/bbs/images/common/back.gif
我也不晓得44B0的LCD究竟如何配置,有写参数迷茫的很;
我把ecos44b0 的补丁传上来了,你可以看看是不是我 LCD 的参数配置错了。
http://www.linuxfans.org/bbs/viewthread.php?tid=185065&extra=page%3D1& ...
下面是你提供的文件中的内容:
ecos-cvs/packages/hal/arm/s3c44b0x/current/include/lcd-support.h
...
#define LCD_WIDTH (320)
#define LCD_HEIGHT (240)
…
#define DISMODE 2
…
#define LINEBLANK 10
#define HOZVAL (LCD_WIDTH)
#define LINEVAL (LCD_HEIGHT)
#define dLCDCON2 ((LINEBLANK<<21)|(HOZVAL<<10)|LINEVAL)
…
#define MODESEL 3
…
#define BSWP 0
…
从中可看出你想设置的 LCD 具体参数是:
宽320、高240、8位色深(256索引空间) Single-Scan 模式
其中,关于 HOZVAL/LINEVAL 的计算公式有错。应为下面:
#define HOZVAL (((LCD_WIDTH)*3)/8-1)
#define LINEVAL ((LCD_HEIGHT)-1)
具体缘由我摘录手册内容如下,供你参考:
P12-4
The VFRAME and VLINE pulse generation is controlled by the configurations of the HOZVAL field and the LINEVAL
field in the LCDCON2 register. Each field is related to the LCD size and display mode. In other words, the HOZVAL
and LINEVAL can be determined by the size of the LCD panel and the display mode according to the following
equation:
HOZVAL = ( Horizontal display size / Number of the valid VD data line) -1
In color mode: Horizontal display size = 3 * Number of Horizontal Pixel
In case of 4-bit dual scan display the number of valid VD data line should be 4 and in case of 8-bit signal scan
display mode, the number of valid VD data lines should be 8.
LINEVAL = (Vertical display size) -1: In case of single scan display type
LINEVAL = (Vertical display size / 2) -1: In case of dual scan display type
LCD Control 2 Register Register
AddressR/W
DescriptionResetValue LCDCON20x01F00004R/WLCD control 2 register0x00000000 LCDCON2BitDescriptionInitial State LINEBLANKThese bits indicate the blank time inone horizontal line durationtime. These bits adjust the rate ofthe VLINE finely.The unit of LINEBLANK is MCLK.Ex) If the value of LINEBLANK is 10,the blank time is insertedto VCLK during 10 system clocks.0x000 HOZVALThese bits determine the horizontalsize of the LCD panel.HOZVAL has to be determined to meetthe condition that totalbytes of 1 line be 2n bytes. If the xsize of LCD is 120 dots inmono mode, x=120 can not be supportedbecause 1 lineconsists of 15 bytes. Instead, x=128 in mono mode can besupported because 1 line consists of16 bytes(2n). Theadditional 8 dot will be discarded byLCD panel driver.0x000 LINEVALThese bits determine the verticalsize of LCD panel.0x000
LCDSADDR2BitDescriptionInitial State BSWPByte swap control bit1 : Swap Enable 0 : Swap DisableLCD DMA fetches the frame memory databy 4 word burstaccess. In little endian mode andBSWP is 0, the frame memorydata are displayed in the sequence,4n+3th, 4n+2th ,4n+1th ,4nthdata. If BSWP is 1, the sequence willbe 4n-th, 4n+1th,4n+2th, 4n+3th.If the CPU is little endian mode, theframe buffer may beaccessed by only byte access mode,Because BSWP is 1, thebyte accessed data will be showncorrectly also in the littleendian mode. In the other case, BSWPhas to be 0.0
[ 本帖最后由 AnthonyLee 于 2008-7-29 00:43 编辑 ] 哦,估计是我理解错了。这个参数这么设置挺奇怪的。
页:
[1]