2018年11月1日 14:36:02
1.環境搭建
a.下載SDK 和 Toolchain
https://labs.mediatek.com/download/AGSSkG38
https://labs.mediatek.com/download/2whWQCuB
b.環境變量設置
vi ~/.profile 環境變量
PATH="$HOME/bin:$HOME/.local/bin:$PATH:$HOME/linkit/toolchain/bin"
vi ~/.br 非交互式環境變量
export STAGING_DIR="$HOME/linkit/SDK/staging_dir"
bashrc與profile都用於保存用戶的環境信息,bashrc用於交互式non-loginshell,而profile用於交互式login shell
2.代碼驗證
#include <stdio.h>
int main()
{
printf("hello world\r\n");
return 1;
}
腳本命令
mipsel-openwrt-linux-g++ hello.c -o hello