Skip to content

Commit

Permalink
Merge pull request #413 from rosflight/varmint-submodule
Browse files Browse the repository at this point in the history
Varmint submodule
  • Loading branch information
bsutherland333 authored Jan 9, 2024
2 parents 11e8c0a + dd2922a commit 2c56690
Show file tree
Hide file tree
Showing 35 changed files with 222 additions and 2,161 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/f4_firmware.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: "pre-release"
on:
push:
branches:
- "master"
- "main"

jobs:
pre-release:
Expand All @@ -19,10 +19,8 @@ jobs:
run: sudo apt -y install gcc-arm-none-eabi
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make_f4
run: make BOARD=REVO -j4 -l4
- name: make_f1
run: make BOARD=NAZE -j4 -l4
- name: build varmint
run: mkdir build && cd build && cmake .. -DBUILD_VARMINT=true && make

- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand All @@ -31,5 +29,4 @@ jobs:
prerelease: true
title: "Development Build"
files: |
boards/airbourne/build/rosflight_REVO_Release.bin
boards/breezy/build/rosflight_NAZE_Release.hex
build/varmint.hex
33 changes: 15 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v2
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: sudo apt -y install gcc-arm-none-eabi
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make_f4
run: make BOARD=REVO -j4 -l4
- name: make_f1
run: make BOARD=NAZE -j4 -l4
- uses: actions/checkout@v2
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: sudo apt -y install gcc-arm-none-eabi
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: build varmint
run: mkdir build && cd build && cmake .. -DBUILD_VARMINT=true && make

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
boards/airbourne/build/rosflight_REVO_Release.bin
boards/breezy/build/rosflight_NAZE_Release.hex
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/varmint.hex
19 changes: 9 additions & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: clone
Expand All @@ -16,20 +16,19 @@ jobs:
- name: install gtest
run: |
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cmake CMakeLists.txt
sudo make
sudo cp ./lib/libgtest*.a /usr/lib
- name: cmake
run: |
cd test
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
mkdir build
cd build
cmake .. -DBUILD_TEST=true -DCMAKE_BUILD_TYPE=Release
- name: make
run: |
cd test/build
cd build
make
- name: test
run: |
cd test/build
./unit_tests
cd build
./test/unit_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: F1 Firmware
name: Varmint Firmware

on: [push]

Expand All @@ -15,5 +15,5 @@ jobs:
run: sudo apt -y install gcc-arm-none-eabi
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: make
run: make BOARD=NAZE -j4 -l4
- name: build
run: mkdir build && cd build && cmake .. -DBUILD_VARMINT=true && make
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
.vscode/
*.o
*.html
/boards/*/build/
/build/
/test/build/
/site/
*.idea*
.idea/
cmake-build*
*.map
scripts/parameter-descriptions.md

Expand Down
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "comms/mavlink/v1.0"]
path = comms/mavlink/v1.0
url = https://github.com/rosflight/mavlink_c_library.git
[submodule "boards/breezy/breezystm32"]
path = boards/breezy/breezystm32
url = https://github.com/rosflight/BreezySTM32.git
[submodule "boards/airbourne/airbourne"]
path = boards/airbourne/airbourne
url = https://github.com/rosflight/airbourne_f4.git
[submodule "boards/varmint"]
path = boards/varmint
url = https://github.com/rosflight/varmint.git
62 changes: 62 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
### project settings ###

cmake_minimum_required(VERSION 3.8)
project(rosflight_firmware C CXX ASM)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()

### git ###

# get version info
execute_process(COMMAND git rev-parse --short=8 HEAD
OUTPUT_VARIABLE GIT_VERSION_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
execute_process(COMMAND git describe --tags --abbrev=8 --always --dirty --long
OUTPUT_VARIABLE GIT_VERSION_STRING
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
if("${GIT_VERSION_STRING}" STREQUAL "")
set(GIT_VERSION_STRING "undefined")
endif()
if("${GIT_VERSION_HASH}" STREQUAL "")
set(GIT_VERSION_HASH "0")
endif()

### source files ###

include_directories(
include
include/interface
lib
comms/mavlink
comms/mavlink/v1.0
comms/mavlink/v1.0/common
comms/mavlink/v1.0/rosflight
)

file(GLOB_RECURSE ROSFLIGHT_SOURCES
"src/*.cpp"
"lib/turbomath/turbomath.cpp"
"comms/mavlink/mavlink.cpp"
)

### select boards to compile ###

option(BUILD_VARMINT "Build the varmint board target" OFF)
option(BUILD_TEST "Build the test board target" OFF)

if(BUILD_VARMINT)
message("===== Selecting varmint board target. =====")
add_subdirectory(boards/varmint)
elseif(BUILD_TEST)
message("===== Selecting test board target. ======")
add_subdirectory(test)
else()
message(FATAL_ERROR "No board selected! Please select the varmint or test board with -DBUILD_VARMINT=TRUE or -DBUILD_TEST=TRUE.")
endif ()
86 changes: 0 additions & 86 deletions Makefile

This file was deleted.

8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# ROSflight

![Unit Tests](https://github.com/rosflight/firmware/workflows/Unit%20Tests/badge.svg)
![F4 Firmware](https://github.com/rosflight/firmware/workflows/F4%20Firmware/badge.svg)
![F1 Firmware](https://github.com/rosflight/firmware/workflows/F1%20Firmware/badge.svg)
[![Unit Tests](https://github.com/rosflight/rosflight_firmware/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/rosflight/rosflight_firmware/actions/workflows/unit_tests.yml)
[![Varmint Firmware](https://github.com/rosflight/rosflight_firmware/actions/workflows/varmint_firmware.yml/badge.svg)](https://github.com/rosflight/rosflight_firmware/actions/workflows/varmint_firmware.yml)

![Documentation](https://github.com/rosflight/firmware/workflows/Documentation/badge.svg)

This is the firmware required for STM32F10x-based flight controllers (Naze32, Flip32 etc...) and STM32F4x5 boards (Revo) to run ROSflight. ROSflight is a software architecture which uses a simple, inexpensive flight controller in tandem with a much more capable companion computer running ROS. The companion computer is given a high-bandwidth connection to the flight controller to access sensor information and perform actuator commands at high rates. This architecture provides direct control of lower-level functions via the embedded processor while also enabling more complicated functionality such as vision processing and optimization via the ROS middleware.
This is the core firmware library for ROSflight. ROSflight is a software architecture which uses a flight controller in tandem with a companion computer running ROS. The companion computer is given a high-bandwidth connection to the flight controller to access sensor information and perform actuator commands at high rates. This architecture provides direct control of lower-level functions via the embedded processor while also enabling more complicated functionality such as vision processing and optimization via the companion computer and ROS.

ROSflight is designed to accomplish the following objectives:

Expand Down
Loading

0 comments on commit 2c56690

Please sign in to comment.