Abstract: AWTK is a universal GUI engine developed by ZLG that can run on various operating systems. It has been favored by more and more developers and users since its release. AWTK is suitable for the embedded field. This article will explain how to deploy AWTK applications into the embedded development environment.
AWTK has already been transplanted on multiple embedded platforms and provides corresponding template projects, such as: embedded Linux, AWorksOS, RT1052 bare system and STM32 bare system, etc. After the AWTK application is debugged in Windows, it is very convenient to deploy it to this embedded development environment. It only requires a few simple steps. Please see below for the specific content.
Below we will take HelloDesigner-Demo as an example to explain how to deploy the application into the embedded development environment.
Deploy applications to embedded Linux
The following uses the ZLG Zhouligong Linux Development Kit M6708-T (Cortex-A9) as the carrier to describe how to deploy the application into embedded Linux. The steps are as follows:
Install cross-compiler (Ubuntu16x64)
In the M6708-T development kit CD information, find the installation script of the arm-poky-linux-gnueabi compiler and execute it. By default, it is installed in a directory similar to the following:
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
Download AWTK integration package
Download the integration package from the AWTK official website, and extract the integration package to the Linux system directory (such as: /home/user):
Change the compilation tool chain
Change the awtk-linux-fb/awtk_config.py file:
Set TOOLS_PREFIX to the path of the arm-poky-linux-gnueabi compiler, as shown on the right:
If the CPU supports hard floating point, turn on "-mfloat-abi=hard", as shown in the picture on the right:
Compile Application
Copy HelloDesigner-Demo to the user_apps directory. Execute the following command and the target file will be output to awtk-linux-fb/build/bin:
cd/home/user/awtk-linux-fb
sconsAPP=../user_apps/HelloDesigner-Demo
Packaging Application
After the compilation is completed, the application and resource files need to be packaged together, and then they can be downloaded to the board and run. Execute the following command to generate the compressed package release.tar.gz:
cd/home/user/awtk-linux-fb
./release.sh../user_apps/HelloDesigner-Demo/res
Run the application
Upload release.tar.gz to the development board and decompress it, then run the board through ssh or parallel port adjustment assistant:
./release/bin/demo
Deploy the application to AWorksOS
The following takes the RT1052 platform as an exampleEmbedded Linux development tutorial Zhou Ligong introduces how to transplant your own applications to the AWorksOS platform. Download the latest RT1052 CD information from the ZLG official website, which contains the transplanted AWTKEclipse project and AWTKkeil project. Just block the sample code file that comes with the project (usually named xxx_demo), and then add the user's own application code to the project.
Build applications using Eclipse
Find the aw_m1052_disk-2.0.0 directory under the AWorksOSSDK development package, and then follow the steps below:
Open m1052_awtk project
Block demos example
Shield m1052_awtk project comes with demos application examples, you can operate as shown on the right:
Add the application to the project
Copy HelloDesigner-Demo to:
aw_m1052_disk-2.0.0-testexamplesapplicationapp_awtk_demosrcuser_apps directory, then refresh the project, and the display will be as shown on the right. After that, you can compile and debug the project.
Use Keil to build applications
Find the aw_easyarmrt1052_disk-2.0.1 directory (in AWorksOSSDK) Embedded Linux Development Tutorial Zhou Ligong, and then follow the steps below:
Open easy_arm_rt1052.uvprojx project
Shield awtk-demo example
In the easy_arm_rt1052 project, an awtk-demo example is provided by default. If you need to add your own application to the project, first block the awtk-demo folder and operate as shown on the right:
Add the application to the project
Add the source code in HelloDesigner-Demo (usually in the src directory) to this Keil project, and operate as shown on the right. After that, you can compile and debug the project.
Deploy the application to other platforms
awtk-easyarm-rt1052-raw project for RT1052 bare system
awtk-stm32f429igtx-raw project for STM32 bare system
The above projects can be found on AWTK’s official website or GitHub. If you want to add your own application to compile and run on this kind of Keil project, the technique is Handan Xiaoyi Red Hat Linux, that is, first block the sample code file that comes with the project (usually named xxx_demo), and then add users to the project own application code.
RT1052 Bare System Keil Project
Get awtk-easyarm-rt1052-raw source code
gitclone
Open the awtk_gui_demo.uvprojx project
Shield Chart-Demo example
In the awtk_gui_demo project, a Chart-Demo example is provided by default. If you need to add your own application to the project, first block the Chart-Demo folder and operate as shown on the right:
Add the application to the project
Add the source code of HelloDesigner-Demo (usually in the src directory) to this Keil project, and operate as shown on the right. After that, you can compile and debug the project.
STM32 bare system Keil project
The following uses STM3232FF429429 as an example of the Linux operating system to explain how to add your own application to the project. The steps are as follows:
Get STM3232ff429429igtx source code
gitclone
Get AWTK source code
We need to put the AWTK source code in the project directory and participate in compilation together, and ensure the consistency between the AWTKSDK version and the application. There are two ways to obtain the AWTK source code:
Form 1 (recommended to use this method):
Find the Designer installation directory and copy the entire AWTKSDKawtk directory to the awtk-stm32f429igtx-raw directory.
Form 2:
Download the latest AWTK source code from GitHub according to the following command.
cdawtk-stm32f429igtx-raw
gitclone
Open the awtk.uvprojx project
Block AWTK-DEMO example
In the awtk project, an AWTK-DEMO example is provided by default. If you need to add your own application to the project, first block the AWTK-DEMO folder and operate as shown on the right:
Add the application to the project
Add the source code of HelloDesigner-Demo (usually in the src directory) to this Keil project, and operate as shown on the right. After that, you can compile and debug the project.
The above is the detailed content of How to deploy applications to embedded Linux?. For more information, please follow other related articles on the PHP Chinese website!