Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6571697
[MAVLINK] Add new mavlink messages
machadofelipe Aug 21, 2020
dc15623
[MAVLINK] Unify system msg text to be used outside osd.c
machadofelipe Aug 28, 2020
81f2e0c
[MAVLINK] Failsafe flight mode map to match Arduplane/Arducopter
machadofelipe Aug 28, 2020
d8ac874
[MAVLINK] Update mavlink library to latest v1.0 release
machadofelipe Aug 28, 2020
55ab364
[MAVLINK] Global position heading angle in centidegrees
machadofelipe Aug 28, 2020
c5ae7e8
[MAVLINK] Limit status text to USE_OSD boards
machadofelipe Aug 28, 2020
a4aca9e
[MAVLINK] Sensors health report, estimated velocity per axis and fix …
machadofelipe Aug 30, 2020
15eaeba
Docker CMake support
nmaggioni Sep 22, 2020
cb0665b
enable flying wing on mambaf405us (#6165)
stronnag Oct 3, 2020
b605d23
Merge pull request #6167 from nmaggioni/nm_cmake_docker
DzikuVx Oct 3, 2020
c930965
[SETTINGS] Make the settings compiler understand more complex conditi…
fiam Oct 4, 2020
44ba834
Merge pull request #6170 from iNavFlight/agh_settings_conditionals
fiam Oct 4, 2020
2a727df
[VTX] Fix compilation with VTX control enabled without SAUDIO/TRAMP
fiam Oct 4, 2020
8e89de1
Merge pull request #6171 from iNavFlight/agh_fix_vtx_compilation
fiam Oct 4, 2020
4b4a04e
Update Filter menu in CMS
DzikuVx Oct 4, 2020
1036042
[BUILD] Fix compilation with USE_SERVO_SBUS without USE_PWM_SERVO_DRIVER
fiam Oct 4, 2020
6f0c3f8
[BUILD] Fix compilation when USE_SERIALRX_CRSF is not defined
fiam Oct 4, 2020
6dc64bc
Merge pull request #6178 from iNavFlight/agh_fix_compilation_without_…
DzikuVx Oct 5, 2020
5fb5b18
Merge pull request #6174 from iNavFlight/dzikuvx-filter-cms-menu
DzikuVx Oct 5, 2020
5768156
Merge pull request #6177 from iNavFlight/agh_fix_compilation_servo_sbus
DzikuVx Oct 5, 2020
b4b2bc3
[GPS] Support GPS baud 230400
digitalentity Oct 5, 2020
59af9c1
Merge pull request #6182 from iNavFlight/de_gps_230400_baud
digitalentity Oct 6, 2020
9f9885a
fix advice on required native compiler (#6187)
stronnag Oct 6, 2020
7cdaf1c
CMS PID mechanics entries
DzikuVx Oct 7, 2020
a6162ff
Add missign ifdef checks
DzikuVx Oct 7, 2020
352a754
Update USB Flashing.md to cover Arch permissions
joleeee Oct 7, 2020
7f03d8a
Add GVar (0-3) to OSD.
joleeee Oct 7, 2020
c49f8ef
Remove comments
joleeee Oct 7, 2020
325fc27
Fix for platforms without PROGRAMMING feature
joleeee Oct 7, 2020
0543708
Fix LC IS_FAILSAFE only occuring when RX_LOSS_MONITORING
joleeee Oct 7, 2020
96d51cc
Merge pull request #6196 from joleeee/inav-lc-failsafe-fix
DzikuVx Oct 9, 2020
9353f98
Merge pull request #6194 from joleeee/patch-2
DzikuVx Oct 9, 2020
36612af
Merge pull request #6193 from iNavFlight/dzikuvx-osd-cms-mechanics
DzikuVx Oct 9, 2020
6db548a
Merge pull request #6195 from joleeee/inav-osd-gvar
DzikuVx Oct 9, 2020
04a0a92
Merge pull request #6062 from machadofelipe/machado_mavlink_update
digitalentity Oct 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
.git/
.vagrant/
obj/
.vscode/
/build/
/obj/
/tools/
/downloads/
30 changes: 9 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
FROM ubuntu:bionic
FROM ubuntu:focal

# Configuration
VOLUME /home/src/
WORKDIR /home/src/
ARG TOOLCHAIN_VERSION_SHORT
ENV TOOLCHAIN_VERSION_SHORT ${TOOLCHAIN_VERSION_SHORT:-"9-2019q4"}
ARG TOOLCHAIN_VERSION_LONG
ENV TOOLCHAIN_VERSION_LONG ${TOOLCHAIN_VERSION_LONG:-"9-2019-q4-major"}
ENV DEBIAN_FRONTEND noninteractive

# Essentials
RUN mkdir -p /home/src && \
apt-get update && \
apt-get install -y software-properties-common ruby make git gcc wget curl bzip2

# Toolchain
RUN wget -P /tmp "https://developer.arm.com/-/media/Files/downloads/gnu-rm/$TOOLCHAIN_VERSION_SHORT/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2"
RUN mkdir -p /opt && \
cd /opt && \
tar xvjf "/tmp/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2" -C /opt && \
chmod -R -w "/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG"

ENV PATH="/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG/bin:$PATH"
RUN apt-get update && apt-get install -y git cmake make ruby gcc

RUN useradd inav

USER inav

VOLUME /src

WORKDIR /src/build
ENTRYPOINT ["/src/cmake/docker.sh"]
28 changes: 24 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
if [ -z "$1" ]; then
echo "Usage syntax: ./build.sh <TARGET>"
set -e

if [[ $# == 0 ]]; then
echo -e "\
Usage syntax: ./build.sh <TARGET>

Notes:
* You can specify multiple targets.
* If no targets are specified, *all* of them will be built.
* To clean a target prefix it with \"clean_\".
* To clean all targets just use \"clean\"."
exit 1
fi

if [ -z "$(docker images -q inav-build)" ]; then
echo -e "*** Building image\n"
docker build -t inav-build .
echo -ne "\n"
fi

if [ ! -d ./build ]; then
echo -e "*** Creating build directory\n"
mkdir ./build
fi

echo -e "*** Building target $1\n"
docker run --rm -v "$(pwd)":/home/src/ inav-build make TARGET="$1"
echo -e "*** Building targets [$@]\n"
docker run --rm -it -v "$(pwd)":/src inav-build $@

if ls ./build/*.hex &> /dev/null; then
echo -e "\n*** Built targets in ./build:"
stat -c "%n (%.19y)" ./build/*.hex
fi
29 changes: 29 additions & 0 deletions cmake/docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

LAST_CMAKE_AT_REV_FILE="docker_cmake.rev"
CURR_REV="$(git rev-parse HEAD)"

initialize_cmake() {
echo -e "*** CMake was not initialized yet, doing it now.\n"
cmake ..
echo "$CURR_REV" > "$LAST_CMAKE_AT_REV_FILE"
}

# Check if CMake has never been initialized
if [ ! -f Makefile ]; then
initialize_cmake
fi

# Check if CMake was initialized for a different Git revision (new targets may have been added)
if [ -f "$LAST_CMAKE_AT_REV_FILE" ]; then
LAST_CMAKE_AT_REV="$(cat $LAST_CMAKE_AT_REV_FILE)"
if [[ "$LAST_CMAKE_AT_REV" != "SKIP" ]] && [[ "$LAST_CMAKE_AT_REV" != "$CURR_REV" ]]; then
initialize_cmake
fi
else
initialize_cmake
fi

# Let Make handle the arguments coming from the build script
make "$@"
4 changes: 4 additions & 0 deletions docs/USB Flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ This assigns the device to the plugdev group(a standard group in Ubuntu). To che
```
sudo usermod -a -G plugdev <username>
```
On Arch and its derivatives the group would be uucp and the command:
```
sudo usermod -a -G uucp <username>
```

## Platform Specific: Windows
Chrome can have problems accessing USB devices on Windows. A driver should be automatically installed by Windows for the ST Device in DFU Mode but this doesn't always allow access for Chrome. The solution is to replace the ST driver with a libusb driver. The easiest way to do that is to download [Zadig](http://zadig.akeo.ie/).
Expand Down
2 changes: 1 addition & 1 deletion docs/development/Building in Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You'll have to manually execute the same steps that the build script does:

1. `docker build -t inav-build .`
+ This step is only needed the first time.
2. `docker run --rm -v <PATH_TO_REPO>:/home/src/ inav-build make TARGET=<TARGET>`
2. `docker run --rm -it -v <PATH_TO_REPO>:/src inav-build <TARGET>`
+ Where `<PATH_TO_REPO>` must be replaced with the absolute path of where you cloned this repo (see above), and `<TARGET>` with the name of the target that you want to build.

Refer to the [Linux](#Linux) instructions or the [build script](/build.sh) for more details.
9 changes: 4 additions & 5 deletions docs/development/Building in Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,31 @@ In addition to a cross-compiler, it is necessary to install some other tools:
* `cmake` : generate the build environment
* `make` : run the firmware compilation
* `ruby` : build some generated source files from JSON definitions
* `gcc` : native compiler used to generate settings and run tests

Note that inav requires `cmake` version 3.13 or later; any distro that provides `cmake` 3.13 will also provide adequate versions of the other tools.

Note also that Ubuntu 18.04 LTS does NOT provide a modern enough `cmake`; it is recommended that you upgrade to Ubuntu 20.04 LTS which does.

If you wish to run the units tests, it is necessary to install a host C/C++ compiler (`gcc` or `clang`). This guide does not cover building and running the units tests.

### Ubuntu / Debian
```
# make sure the system is updated first
sudo apt update && sudo apt upgrade
sudo apt install git make ruby cmake
sudo apt install git make ruby cmake gcc
```

### Fedora
```
# make sure the system is updated first
sudo dnf -y update
sudo dnf install git make ruby cmake
sudo dnf install git make ruby cmake gcc
```

### Arch
```
# make sure the system is updated first
sudo pacman -Syu
sudo pacman -S git make ruby cmake
sudo pacman -S git make ruby cmake gcc
```

Once these prerequisites are installed, we can clone the repository to provide a local instance of the inav source code.
Expand Down
Loading