MacOS Arduino开发环境搭建和编译minimosd-extra
1.从arduino官方网站:https://www.arduino.cc/en/Main/Software下载mac平台的IDE2.安装Arduino Makefile ,git clone https://github.com/sudar/Arduino-Makefile.git3. 下载minimosd-extra源代码git clone https://github.com/night-g
·
1. 从arduino官方网站:https://www.arduino.cc/en/Main/Software下载mac平台的IDE
2.安装Arduino Makefile ,
git clone https://github.com/sudar/Arduino-Makefile.git
3. 下载minimosd-extra源代码
git clone https://github.com/night-ghost/minimosd-extra.git
4.下载SingleSerial
cd minimosd-extra
git submodule init
git submodule update
5. 修改build.sh, 仅编译MAVLINK和NMEA
#!/bin/sh
BUILD='MinimOsd_Extra/build-atmega328'
SRC='MinimOsd_Extra'
RELEASE='Released/FW_+_Char'
version(){
cat MinimOsd_Extra/version.h | grep 'RELEASE_NUM' | awk '{print $3}'
}
VERS=`version`
make_one(){
PROTO=$1
make -C $SRC PROTO="-DUSE_${PROTO}=1"
[ -f $BUILD/MinimOsd_Extra.hex ] && mv $BUILD/MinimOsd_Extra.hex $RELEASE/MinimOsd_Extra_Uni.${VERS}DV-${PROTO}-release.hex && rm -rf $BUILD
}
#make_one 'UAVTALK' &&
#make_one 'MAVLINK' &&
#make_one 'MAVLINKPX4' &&
#make_one 'MWII' &&
#make_one 'NMEA' &&
#make_one 'LTM'
make_one 'MAVLINK'&&
make_one 'NMEA'
#make_one 'MAVLINK' '-DWALKERA_TELEM=RssiPin' &&
6.修改MinimOsd_Extra/Makefile的include文件名为你下载的Arduino Makefile源码所在路径,我这里是 /Volumes/p1t2/Arduino-Makefile/Arduino.mk
...
#include /usr/share/arduino/Arduino.mk
include /Volumes/p1t2/Arduino-Makefile/Arduino.mk
# !!! Important. You have to use make ispload to upload when using ISP programmer
7执行 build.sh
./build.sh
更多推荐
已为社区贡献1条内容
所有评论(0)