MiniGUI1.33 open source version ported on ARMSYS2410-B

Publisher:huanxinLatest update time:2021-06-25 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0. Preparation

(a) Create the following directory:

minigui

|--build_x86 /Build MiniGUI running on PC

|--build_arm /Build MiniGUI running on ARM

|--tarball /All package resource storage points

(b) download MiniGUI:

Download libminigui-1.3.3.tar.gz and minigui-res-1.3.3.tar.gz from www.minigui.com and put

tarball directory

(Starting directory: minigui)

#cd build_x86

#tar zxvf ../tarball/libminigui-1.3.3.tar.gz

#tar zxvf ../tarball/minigui-res-1.3.3.tar.gz

#cd ../build_arm

#tar zxvf ../tarball/libminigui-1.3.3.tar.gz

#cd ..

(c) download and install qvfb:

Download qvfb-1.0.tar.gz from www.minigui.com and put it into the tarball directory

#cd build_x86

#tar zxvf ../tarball/qvfb-1.0.tar.gz

#cd qvfb-1.0

#./configure

#make

#make install

#cd ..

(d) Create a sample program:

test.c

--------------------------------------------------------------------------test.c begin

#include

#include

#include

#include

#include

#define MWINDOW_LX 10

#define MWINDOW_TY 50

#define MWINDOW_RX 230

#define MWINDOW_BY 180

static char * hello_str = "HelloMiniGUI!";

HWND hMainWnd;

static int WinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)

{

HDC hdc;

RECT rc;


switch (message)

{

case MSG_PAINT :

hdc = BeginPaint(hWnd);

GetClientRect(hWnd, &rc);

DrawText(hdc, hello_str, -1, &rc, DT_LEFT);

EndPaint(hWnd, hdc);

break;

case MSG_CLOSE :

DestroyMainWindow(hWnd);

PostQuitMessage(hWnd);

break;

default :

return(DefaultMainWinProc(hWnd, message, wParam, lParam));

}

return(0);

}


int InitMainWindow(void)

{

MAINWINCREATE window_info;


window_info.dwStyle = WS_VISIBLE | WS_BORDER | WS_CAPTION;

window_info.dwExStyle = WS_EX_NONE;

window_info.spCaption = "MiniGUI";

window_info.hMenu = 0;

window_info.hCursor = GetSystemCursor(0);

window_info.hIcon = 0;

window_info.MainWindowProc = WinProc;

window_info.lx = MWINDOW_LX;

window_info.ty = MWINDOW_TY;

window_info.rx = MWINDOW_RX;

window_info.by = MWINDOW_BY;

window_info.iBkColor = COLOR_lightwhite;

window_info.dwAddData = 0;

window_info.hHosting = HWND_DESKTOP;

hMainWnd = CreateMainWindow(&window_info);

if (hMainWnd == HWND_INVALID)

return(0);

else

return(1);

}


int MiniGUIMain (int argc, const char ** argv)

{

MSG Msg;


#ifdef _LITE_VERSION

SetDesktopRect(0, 0, 800, 600);

#endif


InitMainWindow();

ShowWindow(hMainWnd, SW_SHOWNORMAL);


while (GetMessage(&Msg, hMainWnd))

{

TranslateMessage(&Msg);

DispatchMessage(&Msg);

}

MainWindowThreadCleanup(hMainWnd);

return(0);

}


#ifndef _LITE_VERSION

#include

#endif

--------------------------------------------------------------------------test.c end


1. Build MiniGUI for PC:

(a) build lib

#Cd build_x86

#Cd libminigui-1.3.3

#./configure

#make

#make install

#cd ..

(b) install resource

#cd minigui-res-1.3.3

#make install

#cd ..

(Resources are installed to /usr/local/lib/minigui/)

(c) build and run test

#gcc –o test test.c –lpthread –lminigui –ljpeg –lpng –lz –lttf

Change the values ​​of gal_engine and ial_engine of the [system] group in /usr/local/etc/MiniGUI.cfg to qvfb

#qvfb –width 640 –height 480 –depth 16 &

#./test

#cd ..

2. Build MiniGUI for ARM:

(a) build lib

#cd build_arm

#cd libminigui-1.3.3

#make menuconfig

In the default settings

Change "NEWGAL" to "OLDGAL" in "GAL engine options";

Keep the last three items in "Font options" and uncheck the rest;

Remove support for JPG and PNG in "Image options";

In the "Development environment options", set "Compiler" to "arm-linux-gcc" and "Path prefix" to "/usr/local/arm/2.95.3/arm-linux" (assuming the cross-compilation environment is installed in /usr/local/arm). All other options are set to their default values. Save the changes and exit menuconfig

#make

#make install

#cd ..

(b) build test.c

#arm-linux-gcc –o test test.c –lpthread –lminigui

This will create a file called test.

(c) Setting up the root file system

Assume that there is already a root file system available

Copy the library files previously installed in /usr/local/arm/2.95.3/arm-linux/lib to the /lib directory of the target file system. If you are not sure which library files in that directory need to be copied, you can repeat the process of 2.(a) and change the value of "Path prefix" to the path of an empty directory you created in advance. For example, I created a new directory /root/need and changed the value of "Path prefix" to "/root/need". Then after executing 2.(a), all the files in the /root/need/lib directory are the MiniGUI library files we need to copy. (This method is very redundant-_-)

Copy the /usr/local/etc/MiniGUI.cfg file to the /usr/local/etc/ directory of the target file system, and modify the file, change the value of gal_engine in the [system] group to "fbcon", the value of ial_engine to "console", the value of mdev to "/dev/mouse", the value of mtype to "PS2", and change the defaultmode in the [fbcon] group to "640x480-16bpp" (depending on the actual situation).

Copy the entire directory /usr/local/lib/minigui/res to /usr/local/lib/minigui on the target file system.

Finally, copy the compiled test file to /bin of the target file system.

(d) Setting up the mouse

My LCD doesn't have a touch screen, so I need to set up a mouse. My mouse uses a USB port.

Modify the file system's /etc/init.d/rcS and add a line: "ln /dev/input/mice /dev/mouse"

(e) run

Power on the board and execute via minicom:

#test &

You can see the running results on the LCD.


Keywords:ARM Reference address:MiniGUI1.33 open source version ported on ARMSYS2410-B

Previous article:Remote multi-channel data acquisition system solution and hardware details
Next article:Research on audio decoder single chip system based on ARM core

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号