当前位置:网站首页>Minigui3 runs on Hisilicon hi3520d/hi3531 platform
Minigui3 runs on Hisilicon hi3520d/hi3531 platform
2022-06-12 04:54:00 【hi_ LeTian】
Minigui3 In Haisi Hi3520D/Hi3531 Run on the platform
WORD Directly posted in , There are pictures , Can't see !!!! Download here PDF!
get Minigui3
from http://www.minigui.org/en/download/ Here to download The following three files :
libminigui-gpl-3.0.12.tar.gz MiniGUi3 The library of
minigui-res-be-3.0.12.tar.gz Minigui3 Resource files for
The first two files are required
mg-samples-3.0.12.tar.gz Minigui3 An example of
Extract it in one place , For example, my catalog is : /code/code_2016/mingui3
compile Minigui3
Minigui3 Very small , It's really small , and QT For enterprise applications , It's easy to compile , It'll be over in a few minutes , Think about compiling QT Hour two , Three hours is terrible , From time to time, I also report mistakes to you , It's really Mini, and UcGUI Just as small , The implementation principle is basically the same , But it is enough for most of us to do general applications , But on a particular platform , Use it well , Make beautiful and efficient UI, I really want to be in these small GUI Customize and modify a lot of things by yourself .
I basically compile by default MiniGui3 Of .
Compile the basic library
Unzip the file
tar –zxvf libminigui-gpl-3.0.12.tar.gz
cdlibminigui-gpl-3.0.12
Get into MiniGUI3 In the directory , There will be one build The catalog of , Compile scripts for many platforms already exist , There is no Hess , In fact, the matching is also very simple . Before transplantation, you should know Migui3 Of GAL and IAL, Basically, these two parts are what we do , Where it is , If you haven't used it , It is also difficult for us to modify it .
GAL yes UI Drawing interface ,IAL It is the interface of external equipment , Open a few files to learn , Basically, I understand , Just a few struct Interface , Different platforms are basically the same .
Because with Linux framebuffer Standard interface , Few changes have been made .
Write a configuration script file in the root directory , Such as , The following two configurations 3520d and 3531 It's basically the same :
#forhi3520D
CFLAGS="-I/home/jhting/minigui3/include-g -O0" ./configure \
--host=arm-hisiv100nptl-linux \
--prefix=/board/minigui3/hi3520d/\
--disable-screensaver\
--disable-splash\
--disable-jpgsupport \
--enable-videoqvfb=no\
--enable-rtosxvfb=no \
--enable-pcxvfb=no
#forhi3531
CFLAGS="-I/home/jhting/minigui3/include-g -O0" ./configure \
--host=arm-hisiv100nptl-linux \
--prefix=/board/minigui3/hi3531/\
--disable-screensaver\
--disable-splash\
--disable-jpgsupport \
--enable-videoqvfb=no\
--enable-rtosxvfb=no \
--enable-pcxvfb=no
Not used qvfb So turn them off ( An error containing the header file will also be reported when opening , But the corresponding changes Makefile Just fine ).
Execute the script above
Again :
make install
So after compiling , No report error , More fortunate .
Compile and install resource files
Resource files only need ./configure Connect it inside –prefix and –host Just install it , Basically :
./configure --host=arm-hisiv100nptl-linux --prefix=/board/minigui3/hi3531/
Compile the sample program
Example program I didn't compile all , I compiled whichever I used , Such as :
#for hi3520D
arm-hisiv100nptl-linux-gcc -o helloworldhelloworld.c -I/board/minigui3/hi3520d/include -L/board/minigui3/hi3520d/lib-L/code/code_2016/mingui3/hisi_hifb/board/hi3520d/lib -I/code/code_2016/mingui3/hisi_hifb/board/hi3520d/include-static -lminigui_ths -lhifb -lmpi -laec -lhdmi -lmem -ltde -ljpeg -lVoiceEngine-lresampler -lanr -lvqev2 -ljpeg6b -lpthread -lm -lpthread –ldl
#for hi3531
arm-hisiv100nptl-linux-gcc -o helloworldhelloworld.c -I/board/minigui3/hi3531/include/-L/board/minigui3/hi3531/lib-L/code/code_2016/mingui3/hisi_hifb/board/hi3531/lib-I/code/code_2016/mingui3/hisi_hifb/board/hi3531/include -static -lminigui_ths -lhifb -lmpi -laec -lhdmi -lmem -ltde -ljpeg -lVoiceEngine-lresampler -lanr -lpciv -lvqev2 -ljpeg6b -lpthread -lm -lpthread –ldl
There is one in the sample program libhifb.a The library of , This is for , Initialize the... Of the Hisilicon platform , There are instructions in the code modification
Code changes
Just press the above , Of course, nothing can come out , That is, when running the program , When compiling the sample program, we have a libhifb.a The library of , This is used to initialize the Hisilicon platform , To initialize Hisilicon MPI Systems and VO Output , Set some necessary parameters , In this part, I made a separate library for it , In this way MiniGUI Add some necessary calls libhifb.a This library , The modifications on different Hisilicon chip platforms are libhifb.a This library is finished , This won't put UI The code is too messy .
Initialize the code of Hisilicon
We use it Minigui3 Inside fbcon Interface to interface with Hisilicon fb Interface , to glance at minigui3 Inside fbcon Interface , Basic implementation sysvideo.h Inside GAL_VideoDevice The method of structure is OK ,fbcon Inside fbvideo.c It's all done , What we need to do is to connect with the Shanghai think platform hifb Just OK, Only a few lines have been changed .
The basic idea is to GAL_VideoDevice There are also initialization operations in , Put Hayes mpp,vo The initialization of is put here , There is one SetVideoMode Set the operation handle hifb Just put the parameters of .
For convenience , stay fbvideo.c To define a HISI_FB The macro , Use it to control the code modification relative to the Hisilicon platform .
So according to the basic needs , Define a header file hisi_hifb.h, Define the following methods :
int HIFB_VO_Start(void);
int HIFB_VO_Stop(void);
int HIFB_SetVideoMode(int fd, int width, int height, int bpp, intflags);
These methods are in libhifb.a A library implementation of .Minigui3 As long as fbvideo.c Just call it at the right place in the .
Write a libhifb.a The engineering of , Its directory is like this
Board The directory includes different platform header files and lib
There are codes of different platforms in the same level directory Such as src_hi3520d/src_hi3531/src_hi3536
However, Hisilicon has different platforms hifb and tde Basically consistent , It can also be written in the same code , There's no need to be so detailed .
There is a in the root directory Makefile.param The contents are as follows :
exportBOARD?=hi3531
exportINSTALL_PREFIX?=/board/minigui3/$(BOARD)
exportLIBTARGET?=libhifb.a
exportCROSS_COMPILE?= arm-hisiv100nptl-linux-
export CROSS?=arm-hisiv100nptl-linux-
exportCC:=$(CROSS)gcc
exportAR:=$(CROSS)ar
export CFLAGS +=-g -O0 -Wall -Werror
ifeq($(HIARCH),hi3531)
CFLAGS +=-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16
CXXFlAGS+=-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16
endif
exportPWD_PATH?=/code/code_2016/mingui3/hisi_hifb
exportMPP_LIB?=$(PWD_PATH)/board/$(BOARD)/lib
exportMPP_INCLUDE?=$(PWD_PATH)/board/$(BOARD)/include
CFLAGS +=-I$(MPP_INCLUDE)
If you compile , Modify the inside BOARD Parameters , Of course, it may be more convenient to pass it in as a parameter .
There is one in the catalog of different chips Makefile, It's all the same :
include../Makefile.param
SRC := $(wildcard *.c)
OBJ := $(SRC:%.c=%.o)
all:$(OBJ)
$(AR) rv $(LIBTARGET) $(OBJ)
cp $(LIBTARGET) $(INSTALL_PREFIX)/lib/
cp hisi_hifb.h$(INSTALL_PREFIX)/include/
%.o:%.c
$(CC) $(CFLAGS) -c $< -o [email protected]
.PHONY:clean
clean:
@rm -f $(OBJ)
In the code, I use , The operation is that I directly put Hess mpp Inside sample Copy the code , Such as src_hi3531 Files in :
Just change a little bit !
Connect the above things , Implemented a libhifb.a Library to initialize Hisilicon's stuff , stay Minigui3 Inside fbcon Inside fbvideo.c Call the appropriate place in the OK, Basically that's it , Make up again Minigui3 Library and helloworld Program , Just run .
Configure to run
The configuration will be modified a little , hold GAL Designated as fbcon, The resolution is changed ,IAL Just point to the corresponding mouse .
Some of the problems
1: In the process of doing the above , One of the problems is , Press the above thing , stay hi3515/hi3520D Up is running is OK 了 , Can output , But in hi3531,hi3536 Run up , Dead or alive, no output , After a day's work, there was no result , The final discovery is fbcon Some others in ioctl After the operation ,hi3531/hi3536 Of fb No way. , Closed some ioctl The operation is OK 了 .
2: The mouse has a shadow , This was used before ucgui Sometimes there are , It seems that it is better to use the mouse layer of Hisilicon to realize .
Basically, that's all , If you want to achieve good , Still have to use hifb Inside TDE These things , Otherwise, the picture will not work , The big screen must .
It's too late , If there is a hole in the document , Only dig but not fill , Identify yourself !!! For reference only !!!
边栏推荐
- 2022 examination questions and simulation examination for crane driver (limited to bridge crane)
- Asp. Net core EF value conversion
- Understanding of day16 array create query static and dynamic array array array performance in memory
- [backtracking] backtracking method to solve combinatorial problems
- How to quickly reference uview UL in uniapp, and introduce and use uviewui in uni app
- Harris corner detection principle-
- Some problems of silly girl solved
- Jwt Learning and use
- Applet pull-down load refresh onreachbottom
- How to generate provincial data from county-level data in ArcGIS?
猜你喜欢

Microsoft announces that it will discontinue support for older versions of visual studio

Chrome is amazingly fast, fixing 40 vulnerabilities in less than 30 days

2022 "college entrance examination memory" has been packaged, please check!

Accumulated temperature spatial distribution data, temperature distribution data, sunshine data, rainfall distribution, solar radiation data, surface runoff data, land use data, NPP data, NDVI data

kali下安装pycharm并创建快捷访问

JWT學習與使用

QT compile 45 graphic report of security video monitoring system

Operation of simulated examination platform for 2022 safety officer-b certificate examination questions

Image processing 13- calculation of integral diagram

How Windows installs multiple versions of MySQL and starts it at the same time
随机推荐
Ten trends of Internet Security in 2022 industry released
Install pycharm under Kali and create a shortcut access
Thousand word masterpiece "programming biography"
L1-068 harmonic average (10 points)
Find missing sequence numbers - SQL query to find missing sequence numbers
L1-066 cat is liquid (5 points)
Uview customer management JS
Solid programming concepts
Redis learning notes (continuously updating)
Bearpi IOT lighting LED
Sustainable service business models
Operation of simulated examination platform for theoretical question bank of G2 utility boiler stoker in 2022
When the build When gradle does not load the dependencies, and you need to add a download path in libraries, the path in gradle is not a direct downloadable path
2022 examination questions and online simulation examination for safety management personnel of hazardous chemical business units
Jwt Learning and use
Radiometric calibration and atmospheric correction of sentry 2 L1C multispectral data using sen2cor
Ubunt 20.04 uses CDROM or ISO as the installation source
leetcode 263. Ugly number
Some problems of silly girl solved
IC验证中的force/release 学习整理(6)研究对 wire 类型信号的影响