当前位置:网站首页>NUC980-开发环境搭建
NUC980-开发环境搭建
2022-08-11 05:25:00 【火种力量】
系统需求
系统
- ubuntu 18.04 64 bit
- 依赖包
名称 | 作用 | 必须/建议 |
---|---|---|
patch | 用来打补丁的工具 | 必须 |
libc6-dev | 交叉编译所需要动态链接的32位库(i386版本) | 必须 |
libncurses5-dev | 设置内核编译界面所需要使用的的动态链接库 | 必须 |
git-all | 版本控制软件 | 必须 |
依赖包安装
sudo apt-get install automake autoconf libtool make lib32ncurses5 lib32z1 lib32stdc++6 ia32-libs bc curl wget python3.6 zip
源码下载
NUC980的源码可分为两部分
- 相关的环境源码包等,例如交叉编译工具包,SD烧录等
- Linux开发源码包等,包括uboot,kernel,rootfs等
下载前准备
- 创建工作目录
mkdir Source
- repo工具安装
- 创建工具包安装路径
mkdir ~/bin
- 设置环境变量
export PATH=~/bin:$PATH
- 下载repo工具包并设定执行权限
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
chmod a+x ~/bin/repo - 设置repo的路径
export REPO_URL=‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/’
- 设置git配置
git config --global user.name “Your Name”
git config --global user.email “[email protected]”
- 创建工具包安装路径
- 创建工作目录
源码环境包
- 官网地址源码地址
- https://www.nuvoton.com.cn/export/resource-files/NUC980_Linux-4.4_BSP_v1.03.000.zip
- 下载源码
- 进入源码安装路径
cd Source
- 下载源码环境包
wget https://www.nuvoton.com.cn/export/resource-files/NUC980_Linux-4.4_BSP_v1.03.000.zip
- 进入源码安装路径
Linux开发源码
- 开发源码说明
- 主要是涉及到的linux开发所需的uboot,kernel,rootfs等
- 下载
- 进入到Source目录,选择manifest目录
repo init -u https://gitee.com/OpenNuvoton/manifest.git -b nuc980-2019.03 -m gitee.xml
- 下载源码
repo sync
- 进入到Source目录,选择manifest目录
交叉编译工具安装
- 交叉编译说明
- 因NUC980的处理器的架构与本地环境的处理器的架构不一样,需要将本地的代码编译成能够运行程序,需要一种翻译工具-交叉编译工具,简而言之,交叉编译工具可以将本地的代码编译成特定机器的可执行程序
- 安装
- 进入Source目录
cd Source
- 解压源码环境包
unzip NUC980_Linux-4.4_BSP_v1.03.000.zip
- 进入解压目录
cd NUC980_Linux-4.4_BSP_v1.03.000
- 解压目录说明
目录名称 内容 BSP 包含了交叉编译工具,相应的镜像以及根文件系统的压缩包 Documents BSP目录的相关文件 Tools Windos上NuWriter烧录工具以及驱动程序,以及SD Writer - 进入BSP并解压nuc980bsp.tar.gz
cd BSP
tar -xvf nuc980bsp.tar.gz - 进入解压的并执行安装脚本
cd nuc980bsp/
sudo ./install.sh - 设置环境变量
- 使用vim打开/etc/bash.bashrc文件
sudo vi /etc/bash.bashrc
- 添加PATH="$PATH:/usr/local/arm_linux_4.8/bin
- 使用vim打开/etc/bash.bashrc文件
- 使环境变量生效
source /etc/bash.bashrc
- 查看交叉编译是否生效
arm-linux-gcc --version
- 测试交叉编译
- 新建test.c源码文件
#include <stdio.h> int main() { printf("hello world\r\n"); }
- 编译源码文件
arm-linux-gcc test.c -o test
- 说明
- 如编译无错误,则说明安装交叉编译成功
- 有错误,排查路径是否正确,是否缺少编译链所需的库
- 新建test.c源码文件
- 进入Source目录
边栏推荐
- 第七届集美大学程序设计竞赛(个人赛)题解
- 目标检测前言
- Maykle Studio - HarmonyOS Application Development Third Training
- Reconstruction and Synthesis of Lidar Point Clouds of Spray
- 博客目录
- 自定义形状seekbar学习
- Safety helmet identification system - escort for safe production
- OpenPCDet安装最新版:spconv一步到位
- AI-based intelligent image recognition: 4 different industry applications
- Realize data exchange between kernel and userspace through character device virtual file system (passed based on kernel 5.8 test)
猜你喜欢
梅科尔工作室-第四次PR培训笔记(字幕和标题动画,关键帧动画和声音处理)
电商机会:私域
weex入门踩坑
Pay “Attention” to Adverse Weather
Reconstruction and Synthesis of Lidar Point Clouds of Spray
Solutions to the 7th Jimei University Programming Contest (Individual Contest)
360° large field of view helmet recognition system-deep learning intelligent video analysis
HTTP缓存机制详解
CVPR2022——Not All Points Are Equal : IA-SSD
目标检测前言
随机推荐
Joint 3D Instance Segmentation and Object Detection for Autonomous Driving
CMT2380F32模块开发7-reset例程
博客目录
CNN-based Point Cloud De-Noising
梅科尔工作室-HarmonyOS应用开发第三次培训
智慧工地 安全帽识别系统
安全帽识别算法
Introduction of safety helmet wearing recognition system
基于AI智能图像识别:4个不同的行业应用
梅科尔工作室-深度学习第二讲 BP神经网络
Waymo dataset usage introduction (waymo-open-dataset)
小程序技术原理分析
TAMNet: A loss-balanced multi-task model for simultaneous detection and segmentation
华为云IOT平台设备获取api调用笔记
10 个超好用的 DataGrip 快捷键,快加入收藏! | 实用技巧
物联网基础知识学习
weex入门踩坑
KANO模型——确定需求优先级的神器
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第六次培训
Toward a Unified Model