How to port uCGUI to S3C44B0X

Publisher:幸福微风Latest update time:2022-12-26 Source: elecfansKeywords:uCGUI Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1. Experimental purpose

  1. Preliminarily master the underlying hardware driver functions of uCGUI;

  2. Master the methods and steps of porting uCGUI to ARM S3C44BOX.


  2. Experimental content

  Port uCGUI to the ARM processor S3C44BOX, and write the Hello World program to display the "Hello World!" string on the LCD of the Micetek 44B0 experimental platform. At the LCD display plane coordinate (20, 20), an integer less than 10000 is displayed. , the integer keeps adding 1 in a loop, and the display is updated immediately after each addition of 1, thus reflecting the speed of the display output.


  3. Preliminary knowledge

  1. Architecture of uCGUI:

  uCGUI contains three general folders: Application, Config, and GUI. Among them:

  Ⅰ Application is the application folder, which contains the main function file and other resource files.

  Ⅱ Config is the GUI configuration folder, which contains three files:

  ★ GUICONF.H is the configuration file of uCGUI, which is responsible for configuring the GUI's support for OS, window manager, DMA, touch screen, and Unicode code. As well as setting the default font and default colors of various controls, etc.

  ★ GUITouchConf.h is responsible for configuring the touch screen.

  ★ LCDConf.h is responsible for configuring the LCD display, such as resolution, number of color bits, and other settings of the LCD controller.

  Ⅲ GUI is the implementation part of uCGUI. It is the most important part of GUI and contains eight to nine folders.

  ★ ConvertColor is a color conversion folder, which contains 24-bit color-conversion functions between various colors.

  ★ ConvertMono is a grayscale color conversion folder, which contains functions for converting between 24-bit color-monochrome, four-level grayscale, 16-level grayscale and user-defined colors.

  ★ Core is the core of the GUI, and most of the processing functions of the GUI are in this folder.

  ★ Font is the font folder of the GUI. We can add or delete fonts by adding or subtracting files in it.

  ★ LCDDriver is the underlying interface part of the GUI. The part we transplant should be in this folder.

  ★ MemDev is some processing function files of GUI's DMA mode.

  ★ Widget contains various window controls, such as dialog boxes, buttons and other controls.

  ★ WM is the window message processing function folder of GUI.

  ★ Touch is the underlying interface part of touch screen and mouse.

  2. Parts of UCGUI that need to be transplanted

  ① The files that need to be modified for uCGUI transplantation are: modify Main.c, LCDConf.h, add LCD 44b0.h, LCD 44b0.c in the LCDDrive folder, where LCD 44b0.h is the statement of LCD 44b0.c, provided by LCD 44b0.c A series of LCD underlying function interfaces.

  ② If you want to support DMA mode, you need to add an LCDMemc.h, LCDMemc.c file. LCDMemc.h makes the declaration of LCDMemc.c, and LCDMemc.c makes the underlying interface function of DMA mode.

  ③ If you want to support touch screen and mouse, you need to modify the definition in GUICONF.H:

  #define GUI_SUPPORT_TOUCH (1)

  Make the GUI support mouse touch screen and configure the GUITouchConf.h file. Add the corresponding interface driver under GUITouch.

  We mainly transplant the direct drive mode of LCD, so we only need to modify <1>.

  I use the JediView (for ARM) integrated debugging environment. Other environments are similar. The hardware is S3C44b0X, the LCD is 256-color LCD, and the resolution is 320×240.

  4. Experimental equipment and tools (including software debugging tools)

  Hardware: Micetek 44B0 Experimental System

  JEDI emulator

  PC Pentumn 100 or above

  Software: PC operating system win2000

  JEDIView integrated development environment

  5. Program Description

  Create a new folder uCGUI, add all the folders and files of the above system to the uCGUI folder, delete LCDWin.c under the LCDDrive folder, which is the simulation driver under VC, and add LCD 44b0.h to the LCDDrive folder , LCD 44b0.c. The touch screen driver is not transplanted for the time being. You can keep the Touch directory empty and use it for future expansion.

  Create a new Inc folder in the uCGUI directory and add opTIon.h, 44b.h, 44blib.h, def.h, cache.h, lcdlib.h, 44blcd.h.

  Add lcdlib.c to the Application folder.

  Create a new project also called uCGUI, and add all the folders and internal files of the above system to the uCGU project.

  Modify the include configuration: Open Tools->Option->Directory->Include Files and add the path

  …uCGUIguiConvertColor

  ...uCGUIguiConvertMono

  …uCGUIguiCore

  …uCGUIguiFont

  ...uCGUIguiLCDDriver

  …uCGUIguiMemDev

  …uCGUIguiWidget

  …uCGUIguiWM

  …uCGUIguiTouch

  ……:ucOSConfig

  ...guiApplication

  Among them... is the path of the project you built. The above paths may not be added in some compilers and will be found automatically. They need to be added in the JediView (for ARM) integrated debugging environment.

  Since uCGUI uses the math library, you need to add the -lm parameter to the link setting under the Gcc compiler so that the compiler can find the math library.


  6. Experimental phenomena

  The LCD screen displays the experimental results, in which the value in line 2 keeps adding 1 and jumping.


Keywords:uCGUI Reference address:How to port uCGUI to S3C44B0X

Previous article:Minimum system of serial network server based on S3C4510B
Next article:S3C2410 processor features

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号