配置开发环境
配置系统
i2C-MP15X-B开发板的开发环境基于Ubuntu 16.04 64bit操作系统,内存最小4GB,硬盘至少80GB,推荐使用SSD硬盘,以获得更快的编译速度。Ubuntu 16.04系统安装好后,安装以下必要软件包:
sudo apt-get install build-essential git-core libncurses-dev flex bison texinfo zip unzip zlib1g-dev gettext u-boot-tools g++ xz-utils mtd-utils gawk diffstat gcc-multilib python git make gcc g++ diffstat bzip2 gawk chrpath wget cpio texinfo lzop libssl-dev libncurses5-dev libncursesw5-dev gdisk
配置工具链
i2C-MP15X-B开发板提供的编译工具链也是64bit,编译工具链是i2som-image-qt。除了可以用来编译对应的应用程序,也可以用来编译U-Boot, Linux代码。
文件名 | 工具链分类 | 说明 | 适合开发者 |
i2som-image-qt-openstlinux-eglfs-i2cmp15xbe-x86_64-toolchain-2.6-snapshot.sh | SDK Toolchain | i2som-image-qt系统镜像的应用开发工具链 | 系统和应用开发者 |
i2som-image-weston-openstlinux-eglfs-i2cmp15xbe-x86_64-toolchain-2.6-snapshot.sh | SDK Toolchain | i2som-image-weston系统的应用开发工具链 | 系统和应用开发者 |
下面以安装i2som-image-qt系统镜像的SDK工具链为例,将工具安装在/opt/st/i2cmp15xbe-i2som-image-qt/2.6-snapshot目录下。
$ chmod a+x i2som-image-qt-openstlinux-eglfs-i2cmp15xbe-x86_64-toolchain-2.6-snapshot.sh
$ ./i2som-image-qt-openstlinux-eglfs-i2cmp15xbe-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/i2cmp15xbe/2.6-snapshot): /opt/st/i2cmp15xbe-i2som-image-qt/2.6-snapshot
You are about to install the SDK to "/opt/st/i2cmp15xbe-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/i2cmp15xbe-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.
按同样的方安可以安装i2som-image-weston系统镜像的SDK工具链。安装时请注意,工具链的路径应该指定不同路径,相同路径会有文件覆盖的情况。例如,/opt/st/i2cmp15xbe-i2som-image-qt/2.6-snapshot 和 /opt/st/i2cmp15xbe-i2som-image-weston/2.6-snapshot。
准备开发目录
在用户的家目录下创建i2C-MP15X-B目录,作为开发的工作目录。
$ mkdir $HOME/i2SOM-STM32MP1
$ cd $HOME/i2SOM-STM32MP1
本章节的目录都以$HOME/i2SOM-STM32MP1为基目录来操作,可以将所有03-Source目录下的代码压缩包,复制到该目录下。
作者:SteveChen 创建时间:2024-09-18 16:42
最后编辑:SteveChen 更新时间:2024-09-18 16:42
最后编辑:SteveChen 更新时间:2024-09-18 16:42