diff --git a/.github/workflows/artifact-links.yml b/.github/workflows/artifact-links.yml index 4685c4c480..c56f1b0f5d 100644 --- a/.github/workflows/artifact-links.yml +++ b/.github/workflows/artifact-links.yml @@ -7,7 +7,7 @@ on: jobs: artifacts-url-comments: name: Add artifact links to PR and issues - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Add artifact links to PR and issues uses: tonyhallett/artifacts-url-comments@v1.1.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80414d3e20..0a202c9eb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,10 +26,10 @@ jobs: run: echo "::set-output name=targets::$(make targets-ci-print | jq -R -c 'split(" ")')" - name: Cache build toolchain - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-toolchain with: - path: tools/ + path: tools key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }} - name: Download and install toolchain @@ -39,7 +39,7 @@ jobs: build: name: Build needs: setup - runs-on: ubuntu-22.04 + runs-on: ubuntu-22.04 strategy: matrix: target: ${{ fromJson(needs.setup.outputs.targets) }} @@ -48,10 +48,10 @@ jobs: uses: actions/checkout@v2 - name: Fetch toolchain from cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-toolchain with: - path: tools/ + path: tools key: ${{ runner.os }}-${{ hashFiles('make/tools.mk') }} - name: Build target (without revision) diff --git a/.github/workflows/hide-artifact-links.yml b/.github/workflows/hide-artifact-links.yml index 4bcfb4ce92..2ae024d5ae 100644 --- a/.github/workflows/hide-artifact-links.yml +++ b/.github/workflows/hide-artifact-links.yml @@ -7,7 +7,7 @@ on: jobs: hide-artifacts-link-comments: name: Hide artifact links - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Hide comments uses: int128/hide-comment-action@v1 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000000..4a5fa39289 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,71 @@ +# You'll need to setup the follwing environment variables: +# env.repo_nightly - The repository to release nightly builds to e.g. betaflight-nightly +# env.release_notes - The release notes to be published as part of the github release +# env.debug_release_notes - The release notes to be published as part of the github debug release +# secrets.REPO_TOKEN - A GitHub token with permissions to push and publish releases to the nightly repo + +env: + repo_nightly: betaflight/betaflight-nightlies + debug_release_notes: > + This is an automated development build. + It may be unstable and result in craft loss or damage. + **Use only for testing.** + release_notes: This is a release build. + +name: Nightly + +on: + schedule: + - cron: "0 1 * * *" + +jobs: + ci: + name: CI + uses: ./.github/workflows/ci.yml + with: + release_build: false + + release: + name: Nightly release + needs: ci + runs-on: ubuntu-22.04 + steps: + - name: Fetch build artifacts + uses: actions/download-artifact@v2 + with: + path: assets/ + + - name: Select release notes + id: notes + run: | + set -- assets/*.hex + echo "::set-output name=notes::$(test -e "$1" && echo '${{ env.debug_release_notes }}' || echo '${{ env.release_notes }}')" + + - name: Get current date + id: date + run: echo "::set-output name=today::$(date '+%Y%m%d')" + + - name: Release + uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14 + with: + token: ${{ secrets.REPO_TOKEN }} + repository: ${{ env.repo_nightly }} + tag_name: v${{ steps.date.outputs.today }}.${{ github.run_number }} + files: assets/*.hex + draft: false + prerelease: false + fail_on_unmatched_files: true + body: | + ${{ steps.notes.outputs.notes }} + + ### Repository: + ${{ github.repository }} ([link](${{ github.event.repository.html_url }})) + + ### Branch: + ${{ github.ref_name }} ([link](${{ github.event.repository.html_url }}/tree/${{ github.ref_name }})) + + ### Latest changeset: + ${{ github.event.head_commit.id }} ([link](${{ github.event.head_commit.url }})) + + ### Changes: + ${{ github.event.head_commit.message }} diff --git a/make/tools.mk b/make/tools.mk index c6bf3d3a41..60294f48eb 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -5,6 +5,8 @@ # NOTE: These are not tied to the default goals # and must be invoked manually # +# ARM SDK Version: 10.3-2021.10 +# ############################################################### ############################## @@ -14,9 +16,9 @@ ############################## # Set up ARM (STM32) SDK -ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi +ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-none-eabi-10.3-2021.10 # Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion) -GCC_REQUIRED_VERSION ?= 11.2 +GCC_REQUIRED_VERSION ?= 10.3 .PHONY: arm_sdk_version @@ -26,18 +28,18 @@ arm_sdk_version: ## arm_sdk_install : Install Arm SDK .PHONY: arm_sdk_install -# source: https://developer.arm.com/downloads/-/gnu-rm - +ARM_SDK_URL_BASE := https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10 +# source: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads ifeq ($(OSFAMILY), linux) - ARM_SDK_URL := https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz + ARM_SDK_URL := $(ARM_SDK_URL_BASE)-x86_64-linux.tar.bz2 endif ifeq ($(OSFAMILY), macosx) - ARM_SDK_URL := https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-darwin-x86_64-arm-none-eabi.tar.xz + ARM_SDK_URL := $(ARM_SDK_URL_BASE)-mac.tar.bz2 endif ifeq ($(OSFAMILY), windows) - ARM_SDK_URL := https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-mingw-w64-i686-arm-none-eabi.zip + ARM_SDK_URL := $(ARM_SDK_URL_BASE)-win32.zip endif ARM_SDK_FILE := $(notdir $(ARM_SDK_URL)) @@ -52,7 +54,7 @@ arm_sdk_install: arm_sdk_download $(SDK_INSTALL_MARKER) $(SDK_INSTALL_MARKER): ifneq ($(OSFAMILY), windows) # binary only release so just extract it - $(V1) tar -C $(TOOLS_DIR) -xf "$(DL_DIR)/$(ARM_SDK_FILE)" + $(V1) tar -C $(TOOLS_DIR) -xjf "$(DL_DIR)/$(ARM_SDK_FILE)" else $(V1) unzip -q -d $(ARM_SDK_DIR) "$(DL_DIR)/$(ARM_SDK_FILE)" endif diff --git a/src/main/fc/core.c b/src/main/fc/core.c index 29980d3e03..0251b1048e 100644 --- a/src/main/fc/core.c +++ b/src/main/fc/core.c @@ -1082,7 +1082,7 @@ void processRxModes(timeUs_t currentTimeUs) pidSetAntiGravityState(IS_RC_MODE_ACTIVE(BOXANTIGRAVITY) || featureIsEnabled(FEATURE_ANTI_GRAVITY)); } -static FAST_CODE void subTaskPidController(timeUs_t currentTimeUs) +static FAST_CODE_NOINLINE void subTaskPidController(timeUs_t currentTimeUs) { uint32_t startTime = 0; if (debugMode == DEBUG_PIDLOOP) {startTime = micros();} diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index 6bbb429c12..6605acaae2 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -291,7 +291,7 @@ static FAST_CODE_NOINLINE void handleOverflow(timeUs_t currentTimeUs) } } -static FAST_CODE void checkForOverflow(timeUs_t currentTimeUs) +static FAST_CODE_NOINLINE void checkForOverflow(timeUs_t currentTimeUs) { // check for overflow to handle Yaw Spin To The Moon (YSTTM) // ICM gyros are specified to +/- 2000 deg/sec, in a crash they can go out of spec. @@ -346,7 +346,7 @@ static FAST_CODE_NOINLINE void handleYawSpin(timeUs_t currentTimeUs) } } -static FAST_CODE void checkForYawSpin(timeUs_t currentTimeUs) +static FAST_CODE_NOINLINE void checkForYawSpin(timeUs_t currentTimeUs) { // if not in overflow mode, handle yaw spins above threshold #ifdef USE_GYRO_OVERFLOW_CHECK