一、 实验目的

1.了解Microwindows 基本结构。

2.练习Microwindows 的系统配置和编译安装。

二、实验内容

1. 下载Microwindows 系统安装包,解压缩后进行系统设置,编译安装。

2. 启动NanoX 服务器。

3.掌握Make命令的使用

4.掌握Microwindows的移植

三、预备知识

1.掌握在linux 集成开发环境中编写和调试程序的基本过程。

2.了解ARM 应用程序的框架结构。

3.掌握Linux 下的程序编译与交叉编译。

四、实验设备及工具(包括软件调试工具)

硬件:SZ7207G ARM 嵌入式开发板、PC Pentumn500 以上, 硬盘10G 以上。

软件:PC 机操作系统redhat linux 9.0 minicom linux 开发环境

五、实验步骤

1.在/home下创建Micro文件夹,将光盘中jpegsrc.v6b.tar.gzmicrowindows-0.90.tar.gz、复制到Micro文件夹中,将光盘中microwindows-fonts-0.90.tar.gz复制到/home/Micro/microwindows/src文件夹中。运行 如下命令:

tar xzvf jpegsrc.v6b.tar.gz C ./

tar xzvf microwindows-0.90.tar.gz C ./

修改文件夹microwindows-0.90microwindows

tar xzvf microwindows-fonts-0.90.tar.gz C ./

2.编译安装Jpeg库到开发环境:

打开/home/Micro/microwindows/src/contrib/jpeg/readme.txt文件:

- cp jconfig.doc jconfig.h

- cp makefile.ansi Makefile

- Open the Makefile and delete the jconfig.h: target

- Don't forget to setup the right cc tools if you cross-compile!

- type 'make'

打开/home/Micro/jpeg-6b/makefile文件

# The name of your C compiler:

9行修改为:CC= arm-linux-gcc

122-125行取消:

#jconfig.h: jconfig.doc

# echo You must prepare a system-dependent jconfig.h file.

# echo Please read the installation directions in install.doc.

# exit 1

保存退出。

3.修改/home/Micro/microwindows/src目录中的config文件,增加相应的选项,使之支持更多的图片格式,并重新编译它,编译通过之后,将rootfs.img文件挂载至basicfs目录中,进入/usr/microwin/bin目录中,把/home/Micro/microwindows/src/bin目录中的nano-Xnanowmlandminenanocal.ppmuponface.ppm文件拷贝到文件系统中的/usr/microwin/bin目录中,如有同名文件则覆盖它。

4.将/home/Micro/m.icrowindows/src/Configs目录下的文件config.l7200文件拷贝到/home/Micro/Microwindows/src下,并使将其更句为config。打开该文件。进行如下配置。

####################################################################

# Microwindows and Nano-X configuration file

#

# This package can be configured to run on Linux (MIPS, ARM, POWERPC or x86)

# UNIX, ELKS, DJGPP, or RTEMS.

# On Linux, we've got drivers for Linux 2.x framebuffers, X11, or,

# svgalib for VGA hardware.

# In addition, a gpm or direct serial mouse driver can be configured.

# On ELKS, the bios screen driver and serial mouse driver are always used.

#

# Either Microwindows and/or Nano-X can be built.

# Microwindows and Nano-X have several demos.

#

# For MSDOS makes, see mcmwin.mak and mcnanox.mak

####################################################################

####################################################################

#

# build target platform

#

# Valid ARCH values are:

#

# LINUX-NATIVE

# LINUX-ARM

# LINUX-MIPS

# LINUX-POWERPC

# LINUX-SH

# FREEBSD-X86

# SOLARIS

# RTEMS

# DJGPP

# ELKS

#

# note: ELKS can't build client/server nano-X, nor widget lib

#

####################################################################

ARCH = LINUX-ARM

ARMTOOLSPREFIX = arm-linux-

MIPSTOOLSPREFIX = mipsel-linux-

POWERPCTOOLSPREFIX = powerpc-linux-

SHTOOLSPREFIX = sh-linux-gnu

RTEMSTOOLSPREFIX = i386-rtemself-

####################################################################

#

# Compiling options

#

####################################################################

OPTIMIZE = Y

DEBUG = N

VERBOSE = N

####################################################################

#

# Libraries to build: microwin, nano-X, nanowidget, object frameworks

#

####################################################################

MICROWIN = Y

NANOX = Y

SHAREDLIBS = N

NWIDGET = Y

OBJFRAMEWORK = N

####################################################################

#

# Demos to build

#

####################################################################

MICROWINDEMO = Y

NANOXDEMO = Y

####################################################################

#

# Applications to build

#

####################################################################

NANOWM = Y

####################################################################

#

# The pixeltype of the native hardware or underlying graphics library.

# This definition defines the PIXELVAL to be 32, 16 or 8 bits wide.

# If using Linux framebuffer, set to MWPF_TRUECOLOR0888, and use fbset.

# It also enables GdArea/GrArea for this particular pixel packing format.

#

# define MWPF_PALETTE /* pixel is packed 8 bits 1, 4 or 8 pal index*/

# define MWPF_TRUECOLOR0888 /* pixel is packed 32 bits 8/8/8 truecolor*/

# define MWPF_TRUECOLOR888 /* pixel is packed 24 bits 8/8/8 truecolor*/

# define MWPF_TRUECOLOR565 /* pixel is packed 16 bits 5/6/5 truecolor*/

# define MWPF_TRUECOLOR332 /* pixel is packed 8 bits 3/3/2 truecolor*/

#

####################################################################

SCREEN_PIXTYPE = MWPF_TRUECOLOR565

####################################################################

#

# NanoX: Put Y to the following line to link the nano-X application

# with the server. This is required for ELKS, if no network is present,

# or for speed or debugging. This affects the nano-X server only.

#

####################################################################

LINK_APP_INTO_SERVER = N

####################################################################

#

# File I/O support

# Supporting either below drags in libc stdio, which may not be wanted

#

####################################################################

HAVE_FILEIO = Y

####################################################################

# BMP, GIF reading support

####################################################################

HAVE_BMP_SUPPORT = Y

HAVE_GIF_SUPPORT = Y

HAVE_XPM_SUPPORT = Y

HAVE_PNM_SUPPORT = Y

HAVE_PCF_SUPPORT = N

HAVE_FNT_SUPPORT =N

####################################################################

# JPEG support through libjpeg, see README.txt in contrib/jpeg

####################################################################

HAVE_JPEG_SUPPORT = Y

INCJPEG = .

LIBJPEG = /home/Micro/jpeg-6b/libjpeg.a

####################################################################

# T1 adobe type1 font support thru t1lib

####################################################################

HAVE_T1LIB_SUPPORT = N

INCT1LIB = /usr/include

LIBT1LIB = /usr/lib/libt1.a

####################################################################

# TrueType font support thru FreeType

####################################################################

HAVE_FREETYPE_SUPPORT = N

INCFTLIB = /usr/include

LIBFTLIB = /usr/lib/libttf.so

FREETYPE_FONT_DIR = "/usr/local/microwin/fonts"

####################################################################

# Shared memory support for Nano-X client/server protocol speedup

####################################################################

HAVE_SHAREDMEM_SUPPORT = N

####################################################################

# Chinese Han Zi Ku font support

####################################################################

HAVE_HZK_SUPPORT = Y

HZK_FONT_DIR = "fonts/chinese"

####################################################################

# Chinese BIG5 compiled in font support (big5font.c)

####################################################################

HAVE_BIG5_SUPPORT = Y

####################################################################

# Chinese GB2312 compiled in font support (gb2312font.c)

####################################################################

HAVE_GB2312_SUPPORT = Y

####################################################################

# Generate screen driver interface only with no fonts or clipping

####################################################################

NOFONTSORCLIPPING = N

####################################################################

#

# Window move algorithms for Microwindows

# Change for tradeoff between cpu speed and looks

# ERASEMOVE repaints only backgrounds while window dragging, quicker.

# Otherwise an XOR redraw is used for window moves only after button up,

# quickest (should set for ELKS)

# UPDATEREGIONS paints in update clipping region only for better look and feel

#

####################################################################

ERASEMOVE = Y

UPDATEREGIONS = Y

####################################################################

#

# Use MS fonts (default no)

#

####################################################################

HAVEMSFONTS = N

####################################################################

#

# Link with Gray Palette (valid only for 4bpp modes)

#

####################################################################

GRAYPALETTE = N

####################################################################

#

# If the platform is running UNIX, Linux or RTEMS...

#

####################################################################

ifneq ($(ARCH), ELKS)

# X Window screen, mouse and kbd drivers

X11 = N

ifeq ($(X11), Y)

# predefined model or select screen width, height, depth(palette mode only)

SCREEN_E15 = N

SCREEN_WIDTH = 640

SCREEN_HEIGHT = 480

SCREEN_DEPTH = 4

else

# framebuffer screen driver (linear and/or vga 4 planes)

# set VTSWITCH to include virtual terminal switch code

# set PORTRAIT_MODE to L or R for left or right orientation

# set FBREVERSE to reverse bit orders in 1,2,4 bpp

# set FBVGA=N for all systems without VGA hardware (for MIPS must=N)

FRAMEBUFFER = Y

FBVGA = N

VTSWITCH = N

PORTRAIT_MODE = N

FBREVERSE = N

# svgalib screen driver

VGALIB = N

# direct VGA hardware access screen driver

HWVGA = N

####################################################################

# Mouse or touch screen driver

# TPMOUSE for Linux-VR and Embedded Planet

# TPHELIO for VTech Helio

# ADSMOUSE for ADS Graphics Client

# IPAQMOUSE for Compaq iPAQ

# HARRIERMOUSE for NEC Harrier

# PSIONMOUSE for the Psion 5

####################################################################

GPMMOUSE = N

SUNMOUSE = N

SERMOUSE = Y

TPMOUSE = N

TPHELIO = N

ADSMOUSE = N

IPAQMOUSE = N

HARRIERMOUSE = N

PSIONMOUSE = N

NOMOUSE = N

# keyboard or null kbd driver

TTYKBD = Y

PIPEKBD = N

NOKBD = N

endif

####################################################################

# Screen driver specific configuration

# SA1100_LCD_LTLEND 4bpp driver with arm SA1100 LCD controller

# INVERT4BPP 4bpp inverted pixel driver for VTech Helio

####################################################################

SA1100_LCD_LTLEND = N

INVERT4BPP = N

####################################################################

#

# If the platform is a RTEMS box ....

#

####################################################################

ifeq ($(ARCH), RTEMS)

# Location & BSP information of the RTEMS build

RTEMS_BUILD = /tools/build-i386-elf-rtems

RTEMS_BSP = pc386

LINK_APP_INTO_SERVER = N

endif

endif

####################################################################

#

# If the platform is an ELKS box ...

#

####################################################################

ifeq ($(ARCH), ELKS)

# Higher speed asm driver, c driver of hercules screen driver

ASMVGADRIVER = Y

CVGADRIVER = N

HERCDRIVER = N

DBGDRIVER = N

# Mouse support

SERMOUSE = Y

endif

制作我们的开发平台:

拷贝/home/Micro/microwindows/src/bin/目录下的launcherlauncher.cnf文件至文件系统中的/usr/microwin/bin/目录下,用文本编辑器打开launcher.cnf文件,它是launcher程序的配置文件,修改后的结果如下:

#/usr/microwin/bin/launcher.cnf

# Sample launcher configuration file

# Copyright (c) 2002 Alex Holden <alex@alexholden.net>

# These are the screen savers to use:

# A simple screen blanker:

# $screensaver /usr/microwin/bin/nsaver 1

# Draws random dots:

$screensaver /usr/microwin/bin/nsaver 2

# Draws random lines:

$screensaver /usr/microwin/bin/nsaver 3

# Draws worms that crawl randomly around the screen:

$screensaver /usr/microwin/bin/nsaver 4

# Draws a star field accelerating towards the viewer:

$screensaver /usr/microwin/bin/nsaver 5

# Draws a simulated lightning storm:

$screensaver /usr/microwin/bin/nsaver 6

# Draws an orbiting planet simulation:

$screensaver /usr/microwin/bin/nsaver 7

# Draws a moire interference pattern:

$screensaver /usr/microwin/bin/nsaver 8

# Makes the screen appear to melt:

$screensaver /usr/microwin/bin/nsaver 9

# Blacks the screen out then bounces a hole to the desktop around the screen:

$screensaver /usr/microwin/bin/nsaver 10

# Draws random squares:

$screensaver /usr/microwin/bin/nsaver 11

# Draws random squares using the munch algorithm:

$screensaver /usr/microwin/bin/nsaver 12

# Draws a randomly panning magnified area of the desktop:

$screensaver /usr/microwin/bin/nsaver 13

# This is the screen saver timeout delay (in seconds):

$screensaver_timeout 10

# Comment this out to start the screensavers in order instead of at random.

$random_screensaver

# Set this to the number of seconds between changing the screensaver. Set to 0

# or comment out to never rotate screensavers.

$screensaver_rotate_time 300

# Run the screen calibrator at startup.

# $startup /usr/microwin/bin/nanocal

# Start the window manager

$startup /usr/microwin/bin/nanowm

# This is the file to use as the root window background image:

$window_background_image /usr/microwin/bin/uponface.ppm

# This is the mode to use for the window background:

# 0 = tile across screen

# 1 = draw once in centre of screen

# 2 = draw once at top left of screen

$window_background_mode 0

# This is the background colour to use for the root window.

# The current possible values are:

# BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGNETA, YELLOW, BROWN, GRAY.

# If you want a wider selection of colours, find the ones you want in

# nxcolors.h and add them to the switch statement in launcher.c

# set_window_background_colour(). If the exact colours you want aren't in

# nxcolors.h you can define your own with the MWRGB(r,g,b) macro.

# $window_background_colour GREEN

# These are the launcher panel items. Each line is in the format:

# The item name must not contain any spaces.

# <item name> <icon filename> <command> <first argument> <second argument> <...>

# The item name must not contain any spaces.

# The icon filename can be the letter '-' to specify no icon.

#bin前加/usr/microwin/

Tetris bin/ntetris.ppm bin/ntetris

NanoBreaker /usr/microwin/bin/nbreaker.ppm /usr/microwin/bin/nbreaker -d demos/nbreaker/gamedata

Landmine /usr/microwin/bin/landmine.ppm /usr/microwin/bin/landmine

Slider /usr/microwin/bin/slider.ppm /usr/microwin/bin/slider bin/slidebmp.bmp

Terminal /usr/microwin/bin/nxterm.ppm /usr/microwin/bin/nxterm

Clock /usr/microwin/bin/nxclock.pgm /usr/microwin/bin/nxclock

# Map /usr/microwin/bin/world.ppm /usr/microwin/bin/world

Magnifier /usr/microwin/bin/logo.ppm /usr/microwin/bin/nxmag

Scribble /usr/microwin/bin/nxscribble.ppm /usr/microwin/bin/nxscribble

SoftKeyboard /usr/microwin/bin/nxkbd.pgm /usr/microwin/bin/nxkbd

Roach /usr/microwin/bin/nxroach.pgm /usr/microwin/bin/nxroach -roaches 10

Tux /usr/microwin/bin/tux.ppm /usr/microwin/bin/tux

NXEyes /usr/microwin/bin/nxeyes.pgm /usr/microwin/bin/nxeyes

# Pressure - /usr/microwin/bin/pressure

# Recalibrate /usr/microwin/bin/nanocal.ppm /usr/microwin/bin/nanocal -c

修改之后我们将把/home/Micro/microwindows/src/bin/目录中包含在launcher.cnf文件中程序和图标文件一起拷贝过来放在文件系统中的/usr/microwin/bin/目录中,并将/home/Micro/microwindows/src/bin/目录中的launcher.sh拷贝放至文件系统中的/usr/microwin/bin目录中。

拷贝/home/Micro/microwindows/src/fonts/chinese目录中的目标文件和字体文件(.C源文件除外)。放在文件系统中的/usr/microwin/bin/fonts/目录中(fonts目录为新建的)

所做文件系统在/home/Micro/armfile/rootfs.img.gz

3、按照如上选项的内容,将各项设置好,并进入Microwindows的目录中。

4、进入终端后,进入/home/Micro/microwindows/src目录下,键入make,等待交叉编译器将所有必须的文件及例子代码编译成目标板上的执行代码。

出错,打开/home/Micro/microwindows/src /drivces/mou_ser.c 文件,,删去49行中一个“*/

注意事项一:

由于软件版本、开发工具、代码、文件依赖关系及配置的文件的原因,可能会导致编译的失败。如发生此种情况,请根据情况采取以下措施:

1)查看终端输出,确定问题的原因;

2)如果为代码出错,找到对应的文件,更正即可;

3)如果为版本问题,开发工具问题,请确定使用的相匹配的软件版本及相应的开发工具。

4)如果为文件依赖关系出错,请确定你未改动配置文件。如果你对编译文件的依赖关系不是很熟悉,请查阅相关的编译文档或重新建立开发环境。

5)配置文件出错,确定你与以上的配置内容相符。

注意事项二:

由于Microwindows程序要支持JPEG的图像格式,所以,必须先下载Jpeg支持库,并将其编译安装到开发环境中,否则将通不过Microwindows的编译。因此,要么取消Jpeg的支持功能,要么先安装Jpeg支持库。

取消Jpeg支持将这项改为:HAVE_JPEG_SUPPORT = N.

六、实验思考

1、在配置文件中有一项HAVE_GB2312_SUPPORT = N,是支持汉字库的选项,查阅资料,完成汉字支持的功能。

2、看是否能通过这种方式,在PC机上建立起Microwindows程序的模拟开发环境,以便于开发及调试。(提示:可通过互联网,登录官方网站。也可通过阅读文档,及在互联网上搜索相关资料。)

实验三 Microwindows的配置和安装实验相关推荐

  1. 实验三 静态路由配置

    计算机网络实验 实验三 静态路由配置 一.实验目的 二.实验目的 三.实验步骤 3.1 连接实验拓扑结构 3.2 配置路由器IP地址和掩码 3.3 配置PC机IP地址.网关地址 3.4 配置路由器的路 ...

  2. 计算机网络实验 实验三 VLAN基本配置

    实验三 VLAN基本配置 第一关 打开桌面的Cisco packet tracer软件 (软件需要登录 但是可以使用游客登录 打开软件后点击右下角 ghost login 弹出网页后关闭网页 右下角变 ...

  3. CCNA实验三 把路由器配置成PC

    CCNA实验三 把路由器配置成PC 环境:Windows XP, GNS3.0.7 步骤: 1. 首先打开GNS创建下面的拓扑:       分别右键查看R1 和PC的console端口:R1:200 ...

  4. 实验三 静态路由配置和缺省路由配置

    实验三 静态路由配置和缺省路由配置 一.实验目的 1.掌握静态路由和缺省路由配制方法. 二.实验内容 1.配置两台路由器上的静态路由.缺省路由.实现网络的互通. 三.实验设备 PC终端一台,cisco ...

  5. 20155220 实验三 敏捷开发与XP实践 实验报告

    20155220 实验三 敏捷开发与XP实践 实验报告 实验内容 XP基础 XP核心实践 相关工具 实验要求 没有Linux基础的同学建议先学习<Linux基础入门(新版)><Vim ...

  6. 2018-2019-2 20175230 实验三《Java面向对象程序设计》实验报告

    目录 实验三 实验三 敏捷开发与XP实践 实验内容 实验要求 实验步骤 (一) 编码标准 (二)敏捷开发与XP (三)敏捷开发与XP 实验体会 实验三 实验三 敏捷开发与XP实践 实验内容 1.XP基 ...

  7. 20155226 实验三 敏捷开发与XP实践 实验报告

    20155226 实验三 敏捷开发与XP实践 实验报告 实验内容 XP基础 XP核心实践 相关工具 实验要求 没有Linux基础的同学建议先学习<Linux基础入门(新版)><Vim ...

  8. 20155201 实验三《Java面向对象程序设计》实验报告

    20155201 实验三<Java面向对象程序设计>实验报告 一.实验内容 XP基础 XP核心实践 相关工具 二.实验要求 1.没有Linux基础的同学建议先学习<Linux基础入门 ...

  9. 20165301陈潭飞2017-2018-2 20165301 实验三《Java面向对象程序设计》实验报告

    2017-2018-2 20165301 实验三<Java面向对象程序设计>实验报告 一.敏捷开发与XP实践-1 实验要求: 在IDEA中使用工具(Code->Reformate C ...

最新文章

  1. 机器学习判定模型与生成模型区别
  2. android开发教程
  3. Python 技巧篇-开头注释怎么写最好,开头注释需要包含什么,开头注释的重要性
  4. Docker file 搭建 Nginx镜像
  5. 算法改进有多快?是否比迭代硬件收益更大?这是MIT的结论
  6. Xilinx 拥抱“新基建” 发力大中华区核心市场
  7. 有感于最近一个朋友买股票大亏
  8. 微信小程序 页面如何自动滚动到底部
  9. 《Python程序设计基础》在亚马逊当当京东互动出版网淘宝等各大书店上架
  10. MySql 建表出现的问题:[ERR] 1064 - You have an error in your SQL syntax; check the manual..........
  11. 通过管理门户部署云服务与VIP交换
  12. 用PWA构建一个完全离线的网站
  13. Tracer 结合logback记录日志
  14. 三菱PLC 串口通信开发心得经验
  15. 伺服驱动器--增益调整
  16. Hive教程(01)- 初识Hive
  17. Linux iproute2 命令家族(ip / ss)
  18. 计算机D盘无法读取,D盘目录或文件被损坏且无法读取的愿意以及解决办法
  19. 使用大白菜U盘启动盘制作工具去除预装软件(安装纯净系统)
  20. 玩客云刷armbian安装php环境_[小白版]玩客云刷armbian后搭建anmp环境+可道云

热门文章

  1. 网上做什么最赚钱:适合你的才是最赚钱的,
  2. 【MapReduce】分布式计算框架MapReduce
  3. MySQL狂神笔记(不全)
  4. 离散数学-14 图的基本概念
  5. 汽车电气架构开发流程的一些随想(二)——时间节点之概念开发阶段
  6. Composer Satis搭建
  7. 仰天长啸 Spring 之注解事务 @Transactional
  8. 【安安教具】-【数学】-【有理数计算】模拟器 教你如何用python制作有理数计算模拟器 python项目小发明 eval函数
  9. Android测试题
  10. 逻辑为基、数企赋能(NO.3)-逻辑定律