搭建开发环境*
GX8009、GX8010 芯片的所有 SDK 需要在 Linux 环境下进行编译,本文主要介绍如何搭建 SDK 的开发编译环境。
提醒
对于 windows 开发工程师来说,可以使用 VirtualBox 虚拟机软件安装 Ubuntu,然后阅读下文安装编译所需要的工具,也一样能进行 SDK 的开发。
1. ARM 工具链安装*
- 安装依赖包
$ sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev unzip texinfo device-tree-compiler dosfstools libusb-1.0-0-dev
- 下载ARM工具链:点击链接(http://yun.nationalchip.com:10000/l/3Fj5eN),下载在本地
~/Downloads/
中。 - 安装:
- 新建安装目录文件夹:
$ sudo mkdir -p /opt/gxtools/ $ cd /opt/gxtools
- 将上面链接下载下来的工具包解压到当前目录:
$ sudo tar xvf ~/Downloads/arm-openwrt-linux_5.3.0-12009.tar.gz
- 然后编辑 ~/.bashrc,在末尾添加如下两行:
export PATH="/opt/gxtools/arm-openwrt-linux_5.3.0-12009/bin:$PATH" export STAGING_DIR="/opt/gxtools/arm-openwrt-linux_5.3.0-12009/bin"
- 新建安装目录文件夹:
- 检测工具链安装是否成功
$ arm-openwrt-linux-gcc -v Reading specs from /opt/gxtools/arm-openwrt-linux_5.3.0-12009/bin/../lib/gcc/arm-openwrt-linux-gnueabi/5.3.0/specs COLLECT_GCC=arm-openwrt-linux-gnueabi-gcc.bin COLLECT_LTO_WRAPPER=/opt/gxtools/arm-openwrt-linux_5.3.0-12009/bin/../libexec/gcc/arm-openwrt-linux-gnueabi/5.3.0/lto-wrapper Target: arm-openwrt-linux-gnueabi Configured with: /home/ptd/xukai/robotos/openwrt/build_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/gcc-5.3.0/configure --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt GCC 5.3.0 12009' --prefix=/home/ptd/xukai/robotos/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-openwrt-linux-gnueabi --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --without-isl --without-cloog --with-host-libstdcxx=-lstdc++ --with-gmp=/home/ptd/xukai/robotos/openwrt/staging_dir/host --with-mpfr=/home/ptd/xukai/robotos/openwrt/staging_dir/host --with-mpc=/home/ptd/xukai/robotos/openwrt/staging_dir/host --disable-decimal-float --with-diagnostics-color=auto-if-env --enable-libssp --enable-__cxa_atexit --with-arch=armv7-a --with-float=hard --with-headers=/home/ptd/xukai/robotos/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/include --disable-libsanitizer --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/ptd/xukai/robotos/openwrt/staging_dir/toolchain-arm_cortex-a7+neon_gcc-5.3.0_glibc-2.22_eabi/lib --enable-lto --with-libelf=/home/ptd/xukai/robotos/openwrt/staging_dir/host Thread model: posix gcc version 5.3.0 (OpenWrt GCC 5.3.0 12009)
2. MCU 工具链安装*
请阅读MCU 工具链安装
3. DSP 工具链安装*
请阅读DSP 工具链安装