Page tree
Skip to end of metadata
Go to start of metadata

PanGu开发板的应用开发,需要先安装应用开发工具包(SDK)。PanGu开发板提供了两种SDK工具包:i2som-image-qt-openstlinux-eglfs-pangu-x86_64-toolchain-2.6-snapshot.sh和i2som-image-weston-openstlinux-weston-pangu-x86_64-toolchain-2.6-snapshot.sh。


开发SDK说明
i2som-image-qt-openstlinux-eglfs-pangu-x86_64-toolchain-2.6-snapshot.sh基于Qt5图形库的系统,包含Qt5.11相关的开发库
i2som-image-weston-openstlinux-weston-pangu-x86_64-toolchain-2.6-snapshot.sh基于Weston窗体系统,包含GTK图形库开发应用

两种工具链都可以编译C,C++标准库的应用,但对于第三方的库支持有差异。


下面以安装i2som-image-qt-openstlinux-eglfs-pangu-x86_64-toolchain-2.6-snapshot.sh工具包为例。

在“资源下载”页面下载工具包后,确认有执行权限,然后安装即可。这里将安装路径设置为“/opt/i2SOM-yocto-adk-core/2.2-r0”。

$ chmod a+x i2som-image-qt-openstlinux-eglfs-pangu-x86_64-toolchain-2.6-snapshot.sh
$ ls -lh
-rwxr-xr-x 1 i2somdev i2somdev 199M Nov 29 10:20 i2SOM-yocto-glibc-x86_64-core-image-base-cortexa7hf-neon-toolchain-2.2-r0.sh
$ $ ./i2som-image-qt-openstlinux-eglfs-pangu-x86_64-toolchain-2.6-snapshot.sh
ST OpenSTLinux - EGLfs - (A Yocto Project Based Distro) SDK installer version 2.6-snapshot
==========================================================================================
Enter target directory for SDK (default: /opt/st/pangu/2.6-snapshot): /opt/st/pangu-i2som-image-qt/2.6-snapshot
You are about to install the SDK to "/opt/st/pangu-i2som-image-qt/2.6-snapshot". Proceed[Y/n]? y
[sudo] password for build:
Extracting SDK...................................................................................................................................................................................................................................................................................................................................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /opt/st/pangu-i2som-image-qt/2.6-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi


验证开发工具是否安装正确,显示版本信息就表示工具链安装和加载正确。

$ source /opt/st/pangu-i2som-image-qt/2.6-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi
$ $CC --version
arm-openstlinux_eglfs-linux-gnueabi-gcc (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


然后就可以编译应用程序了。

  • No labels