mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge branch 'master' into patch-3
This commit is contained in:
commit
a2d79e0664
25
.circleci/config.yml
Normal file
25
.circleci/config.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# CircleCI configuration file used to build and get a preview of the generated
|
||||||
|
# Doxygen documentation.
|
||||||
|
# Note that the job on CircleCI takes around 30 minutes to complete because
|
||||||
|
# copying +19k individual files to their cloud storage is very slow.
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
doc-build:
|
||||||
|
docker:
|
||||||
|
- image: riot/static-test-tools
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: make doc
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
cp -R doc/doxygen/html /doc
|
||||||
|
- store_artifacts:
|
||||||
|
path: /doc
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
doc-build:
|
||||||
|
jobs:
|
||||||
|
- doc-build
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,5 +1,6 @@
|
|||||||
*.a binary
|
*.a binary
|
||||||
*.patch binary
|
*.patch binary
|
||||||
|
Cargo.lock binary
|
||||||
# Default conflict marker size is 7 which causes some of the headings in
|
# Default conflict marker size is 7 which causes some of the headings in
|
||||||
# release-notes.txt to trigger git diff --check: 'leftover conflict marker'
|
# release-notes.txt to trigger git diff --check: 'leftover conflict marker'
|
||||||
# when the heading is exactly 7 characters long.
|
# when the heading is exactly 7 characters long.
|
||||||
|
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -11,8 +11,7 @@ IF YOUR ISSUE IS RELATED TO SECURITY
|
|||||||
please submit it to the security mailing-list security@riot-os.org.
|
please submit it to the security mailing-list security@riot-os.org.
|
||||||
|
|
||||||
If your issue is a question related to the usage of RIOT, please submit it to
|
If your issue is a question related to the usage of RIOT, please submit it to
|
||||||
the user mailing-list users@riot-os.org or to the developer mailing-list
|
our forum at https://forum.riot-os.org.
|
||||||
devel@riot-os.org.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
#### Description
|
#### Description
|
||||||
|
12
.github/ISSUE_TEMPLATE/security_bug.md
vendored
12
.github/ISSUE_TEMPLATE/security_bug.md
vendored
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
name: 'Security Bug report'
|
|
||||||
about: |
|
|
||||||
Don't use the issue tracker for this! Please write an e-mail to
|
|
||||||
security@riot-os.org. The button was just added to advertise this message.
|
|
||||||
---
|
|
||||||
|
|
||||||
# DON'T USE THE ISSUE TRACKER FOR THIS!
|
|
||||||
<!--
|
|
||||||
Please write an e-mail to security@riot-os.org. The button was just added to
|
|
||||||
advertise this message!
|
|
||||||
-->
|
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -2,7 +2,7 @@
|
|||||||
The RIOT community cares a lot about code quality.
|
The RIOT community cares a lot about code quality.
|
||||||
Therefore, before describing what your contribution is about, we would like
|
Therefore, before describing what your contribution is about, we would like
|
||||||
you to make sure that your modifications are compliant with the RIOT
|
you to make sure that your modifications are compliant with the RIOT
|
||||||
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
|
coding conventions, see https://github.com/RIOT-OS/RIOT/blob/master/CODING_CONVENTIONS.md.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
### Contribution description
|
### Contribution description
|
||||||
|
156
.github/labeler.yml
vendored
Normal file
156
.github/labeler.yml
vendored
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
"Area: arduino API":
|
||||||
|
- "sys/arduino/**/*"
|
||||||
|
|
||||||
|
"Area: BLE":
|
||||||
|
- "pkg/nimble/**/*"
|
||||||
|
- "sys/net/ble/**/*"
|
||||||
|
- "sys/include/net/bluetil/**/*"
|
||||||
|
- "sys/include/net/skald/**/*"
|
||||||
|
- "sys/include/net/skald.h"
|
||||||
|
|
||||||
|
"Area: boards":
|
||||||
|
- "boards/**/*"
|
||||||
|
|
||||||
|
"Area: build system":
|
||||||
|
- "Makefile.*"
|
||||||
|
- "makefiles/**/*"
|
||||||
|
- "**/*.mk"
|
||||||
|
|
||||||
|
"Area: CI":
|
||||||
|
- ".circleci/**/*"
|
||||||
|
- ".github/**/*.yml"
|
||||||
|
- ".murdock"
|
||||||
|
|
||||||
|
"Area: CoAP":
|
||||||
|
- "sys/net/application_layer/*coap/**/*"
|
||||||
|
- "sys/include/net/*coap*/**/*"
|
||||||
|
|
||||||
|
"Area: core":
|
||||||
|
- "core/**/*"
|
||||||
|
|
||||||
|
"Area: cpu":
|
||||||
|
- "cpu/**/*"
|
||||||
|
|
||||||
|
"Area: doc":
|
||||||
|
- "doc/**/*"
|
||||||
|
- "**/*.md"
|
||||||
|
- "**/*.txt"
|
||||||
|
- "**/*.cff"
|
||||||
|
|
||||||
|
"Area: drivers":
|
||||||
|
- "drivers/**/*"
|
||||||
|
|
||||||
|
"Area: examples":
|
||||||
|
- "examples/**/*"
|
||||||
|
|
||||||
|
"Area: Kconfig":
|
||||||
|
- "dist/tools/kconfiglib/**/*"
|
||||||
|
- "makefiles/kconfig.mk"
|
||||||
|
- "kconfigs/*"
|
||||||
|
- "**/Kconfig"
|
||||||
|
|
||||||
|
"Area: LoRa":
|
||||||
|
- "drivers/llcc68/**/*"
|
||||||
|
- "drivers/sx126x/**/*"
|
||||||
|
- "drivers/sx127x/**/*"
|
||||||
|
- "drivers/include/llcc68.h"
|
||||||
|
- "drivers/include/sx126x.h"
|
||||||
|
- "drivers/include/sx127x.h"
|
||||||
|
- "pkg/semtech-loramac/**/*"
|
||||||
|
- "sys/net/lora/**/*"
|
||||||
|
- "sys/net/gnrc/link_layer/lorawan/**/*"
|
||||||
|
- "sys/include/net/lorawan/**/*"
|
||||||
|
- "sys/include/net/gnrc/lorawan/**/*"
|
||||||
|
- "sys/include/net/gnrc/lorawan.h"
|
||||||
|
- "sys/include/net/lora.h"
|
||||||
|
- "sys/include/net/loramac.h"
|
||||||
|
|
||||||
|
"Area: network":
|
||||||
|
- "sys/net/**/*"
|
||||||
|
- "sys/include/net/**/*"
|
||||||
|
- "pkg/lwip/**/*"
|
||||||
|
- "pkg/openthread/**/*"
|
||||||
|
- "pkg/openwsn/**/*"
|
||||||
|
- "pkg/paho-mqtt/**/*"
|
||||||
|
|
||||||
|
"Area: OTA":
|
||||||
|
- "sys/suit/**/*"
|
||||||
|
- "sys/include/suit/**/*"
|
||||||
|
- "sys/include/suit.h"
|
||||||
|
|
||||||
|
"Area: pkg":
|
||||||
|
- "pkg/**/*"
|
||||||
|
|
||||||
|
"Area: SAUL":
|
||||||
|
- "drivers/saul/**/*"
|
||||||
|
- "drivers/include/saul/**/*"
|
||||||
|
- "drivers/include/saul.h"
|
||||||
|
- "sys/saul_reg/**/*"
|
||||||
|
- "sys/include/saul_reg.h"
|
||||||
|
|
||||||
|
"Area: sys":
|
||||||
|
- "sys/**/*"
|
||||||
|
|
||||||
|
"Area: tests":
|
||||||
|
- "tests/**/*"
|
||||||
|
- "fuzzing/**/*"
|
||||||
|
- "dist/pythonlibs/**/*"
|
||||||
|
- "makefiles/tests/**/*"
|
||||||
|
|
||||||
|
"Area: timers":
|
||||||
|
- "sys/*timer/**/*"
|
||||||
|
- "sys/include/*timer/**/*"
|
||||||
|
- "sys/include/*timer.h"
|
||||||
|
|
||||||
|
"Area: toolchain":
|
||||||
|
- "makefiles/toolchain/**/*"
|
||||||
|
|
||||||
|
"Area: tools":
|
||||||
|
- "dist/tools/**/*"
|
||||||
|
- "dist/testbed-support/**/*"
|
||||||
|
- "makefiles/tools/**/*"
|
||||||
|
|
||||||
|
"Area: USB":
|
||||||
|
- "sys/usb/**/*"
|
||||||
|
- "sys/include/usb/**/*"
|
||||||
|
- "sys/include/usb.h"
|
||||||
|
|
||||||
|
"Platform: native":
|
||||||
|
- "boards/native/**/*"
|
||||||
|
- "cpu/native/**/*"
|
||||||
|
|
||||||
|
"Platform: ARM":
|
||||||
|
- "cpu/arm7_common/**/*"
|
||||||
|
- "cpu/cortexm_common/**/*"
|
||||||
|
- "cpu/cc2*/**/*"
|
||||||
|
- "cpu/efm32/**/*"
|
||||||
|
- "cpu/kinetis/**/*"
|
||||||
|
- "cpu/lm4f120/**/*"
|
||||||
|
- "cpu/lpc*/**/*"
|
||||||
|
- "cpu/nrf5*/**/*"
|
||||||
|
- "cpu/qn908x/**/*"
|
||||||
|
- "cpu/sam*/**/*"
|
||||||
|
- "cpu/stellaris_common/**/*"
|
||||||
|
- "cpu/stm32/**/*"
|
||||||
|
- "makefiles/arch/cortexm.inc.mk"
|
||||||
|
|
||||||
|
"Platform: AVR":
|
||||||
|
- "cpu/atmega*/**/*"
|
||||||
|
- "cpu/avr8_common/**/*"
|
||||||
|
- "makefiles/arch/avr8.inc.mk"
|
||||||
|
|
||||||
|
"Platform: ESP":
|
||||||
|
- "cpu/esp*/**/*"
|
||||||
|
|
||||||
|
"Platform: MIPS":
|
||||||
|
- "cpu/mips*/**/*"
|
||||||
|
- "makefiles/arch/mips.inc.mk"
|
||||||
|
|
||||||
|
"Platform: MSP":
|
||||||
|
- "cpu/msp*/**/*"
|
||||||
|
- "makefiles/arch/msp430.inc.mk"
|
||||||
|
|
||||||
|
"Platform: RISC-V":
|
||||||
|
- "cpu/riscv_common/**/*"
|
||||||
|
- "cpu/fe310/**/*"
|
||||||
|
- "makefiles/arch/riscv.inc.mk"
|
36
.github/workflows/check-pr.yml
vendored
Normal file
36
.github/workflows/check-pr.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: check-pr
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, reopened, labeled, unlabeled, synchronize]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted, dismissed]
|
||||||
|
jobs:
|
||||||
|
check-labels:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: RIOT-OS/check-labels-action@v1.0.0
|
||||||
|
with:
|
||||||
|
access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
unset_labels: 'CI: needs squashing,State: waiting for other PR,Process: blocked by feature freeze'
|
||||||
|
cond_labels: '(Process: needs >1 ACK,review.approvals>1),(Area: RDM,review.approvals>2)'
|
||||||
|
check-commits:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.base_ref }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
check: [commit-msg, pr_check]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
# Use the SHA of the PR branch as-is, not the PR branch merged
|
||||||
|
# in master (default behavior in GH actions)
|
||||||
|
# See https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Fetch base branch
|
||||||
|
run:
|
||||||
|
git fetch origin '${{ github.base_ref }}:${{ github.base_ref }}'
|
||||||
|
- name: Run checks
|
||||||
|
run: |
|
||||||
|
./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}"
|
13
.github/workflows/circleci.yml
vendored
Normal file
13
.github/workflows/circleci.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name: doc-build-artifact
|
||||||
|
on: [status]
|
||||||
|
jobs:
|
||||||
|
circleci_artifacts_redirector_job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Run CircleCI artifacts redirector
|
||||||
|
steps:
|
||||||
|
- name: GitHub Action step
|
||||||
|
uses: larsoner/circleci-artifacts-redirector-action@master
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
artifact-path: 0/doc/index.html
|
||||||
|
circleci-jobs: doc-build
|
14
.github/workflows/labeler.yml
vendored
Normal file
14
.github/workflows/labeler.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: pr-labeler
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@main
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
sync-labels: true
|
175
.github/workflows/release-test.yml
vendored
Normal file
175
.github/workflows/release-test.yml
vendored
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
name: release-tests
|
||||||
|
|
||||||
|
# Run automated part of the tests specified by the release specs (see
|
||||||
|
# https://github.com/RIOT-OS/Release-Specs/) on `native` and IoT-LAB boards.
|
||||||
|
#
|
||||||
|
# It is split into `native` tests and IoT-LAB tests, as the tests are
|
||||||
|
# resource-wise disjunct and thus can be run parallel. For each IoT-LAB board
|
||||||
|
# test an IoT-LAB experiment is started using the `rici` account.
|
||||||
|
#
|
||||||
|
# This workflow is run periodically on master with a cron job, on new pushed
|
||||||
|
# release candidates tags and release tags, and can be triggered via workflow
|
||||||
|
# dispatch.
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * 6'
|
||||||
|
push:
|
||||||
|
# Run on all new release candidates and release tags
|
||||||
|
tags:
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]-RC[0-9]*'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
riot_version:
|
||||||
|
description: 'RIOT version to checkout'
|
||||||
|
required: true
|
||||||
|
default: 'master'
|
||||||
|
release_specs_version:
|
||||||
|
description: 'Release-Specs version to checkout'
|
||||||
|
required: true
|
||||||
|
default: 'master'
|
||||||
|
docker_version:
|
||||||
|
description: 'riot/riotbuild docker image version'
|
||||||
|
required: true
|
||||||
|
default: 'latest'
|
||||||
|
filter:
|
||||||
|
description: 'Pytest filter. Leave empty for all.'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKER_MAKE_ARGS: -j
|
||||||
|
# split up native and IoT-LAB tasks to parallelize somewhat and prevent
|
||||||
|
# to hit Github Limit of 6h per job.
|
||||||
|
jobs:
|
||||||
|
tasks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 360
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
pytest_mark:
|
||||||
|
- "iotlab_creds"
|
||||||
|
include:
|
||||||
|
- pytest_mark: "not iotlab_creds"
|
||||||
|
sudo: "sudo"
|
||||||
|
steps:
|
||||||
|
- name: Generate .riotgithubtoken
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ matrix.sudo }}" ]; then
|
||||||
|
echo '${{ secrets.RIOT_CI_ACCESS_TOKEN }}' > ~/.riotgithubtoken
|
||||||
|
else
|
||||||
|
sudo sh -c "echo '${{ secrets.RIOT_CI_ACCESS_TOKEN }}' > ~/.riotgithubtoken"
|
||||||
|
fi
|
||||||
|
- name: Setup IoT-LAB credentials
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
run: |
|
||||||
|
echo '${{ secrets.IOTLABRC }}' > ~/.iotlabrc
|
||||||
|
- name: Setup SSH agent
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
uses: webfactory/ssh-agent@v0.4.1
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.IOTLAB_PRIVATE_KEY }}
|
||||||
|
- name: Fetch host key from IoT-LAB saclay site
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
run: |
|
||||||
|
IOTLAB_USER=$(cat ~/.iotlabrc | cut -f1 -d:)
|
||||||
|
ssh -oStrictHostKeyChecking=accept-new \
|
||||||
|
${IOTLAB_USER}@saclay.iot-lab.info exit
|
||||||
|
- name: Fetch host key from IoT-LAB lille site
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
run: |
|
||||||
|
IOTLAB_USER=$(cat ~/.iotlabrc | cut -f1 -d:)
|
||||||
|
ssh -oStrictHostKeyChecking=accept-new \
|
||||||
|
${IOTLAB_USER}@lille.iot-lab.info exit
|
||||||
|
- name: Checkout Release-Specs
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: RIOT-OS/Release-Specs
|
||||||
|
path: Release-Specs
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: ${{ github.event.inputs.release_specs_version }}
|
||||||
|
- name: Checkout RIOT
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: RIOT-OS/RIOT
|
||||||
|
path: RIOT
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: ${{ github.event.inputs.riot_version }}
|
||||||
|
- name: Set up Python 3.8
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install tox junit2html
|
||||||
|
- name: Pull riotbuild docker image
|
||||||
|
run: |
|
||||||
|
DOCKER_VERSION="${{ github.event.inputs.docker_version }}"
|
||||||
|
if [ -z "$DOCKER_VERSION" ]; then
|
||||||
|
DOCKER_VERSION="latest"
|
||||||
|
fi
|
||||||
|
docker pull riot/riotbuild:$DOCKER_VERSION
|
||||||
|
- name: Create TAP interfaces
|
||||||
|
if: ${{ matrix.pytest_mark == 'not iotlab_creds' }}
|
||||||
|
run: |
|
||||||
|
sudo RIOT/dist/tools/tapsetup/tapsetup -c 11
|
||||||
|
- name: Run release tests
|
||||||
|
timeout-minutes: 350
|
||||||
|
run: |
|
||||||
|
RIOTBASE="$GITHUB_WORKSPACE/RIOT"
|
||||||
|
TOX_ARGS=""
|
||||||
|
if ! echo ${{ github.event.inputs.riot_version }} | \
|
||||||
|
grep -q "[0-9]\{4\}.[0-9]\{2\}-RC[0-9]\+"; then
|
||||||
|
TOX_ARGS+="--non-RC "
|
||||||
|
fi
|
||||||
|
if [ -n "${{ github.event.inputs.filter }}" ]; then
|
||||||
|
K="-k"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd Release-Specs
|
||||||
|
# definition in env does not work since $GITHUB_WORKSPACE seems not to
|
||||||
|
# be accessible
|
||||||
|
${{ matrix.sudo }} \
|
||||||
|
BUILD_IN_DOCKER=1 \
|
||||||
|
DOCKER_MAKE_ARGS=${DOCKER_MAKE_ARGS} \
|
||||||
|
DOCKER_ENV_VARS="USEMODULE QUIETER" \
|
||||||
|
GITHUB_REPOSITORY=${GITHUB_REPOSITORY} \
|
||||||
|
GITHUB_RUN_ID=${GITHUB_RUN_ID} \
|
||||||
|
GITHUB_SERVER_URL=${GITHUB_SERVER_URL} \
|
||||||
|
APPKEY="${{ secrets.CI_TTN_APPKEY }}" \
|
||||||
|
NWKSKEY="${{ secrets.CI_TTN_NWKSKEY_ABP }}" \
|
||||||
|
APPSKEY="${{ secrets.CI_TTN_APPSKEY_ABP }}" \
|
||||||
|
DEVEUI="70B3D57ED00463E7" \
|
||||||
|
APPEUI="0000000000000000" \
|
||||||
|
DEVADDR="260B41C7" \
|
||||||
|
TTN_DL_KEY="${{ secrets.CI_TTN_DL_KEY }}" \
|
||||||
|
TTN_APP_ID="release-tests" \
|
||||||
|
TTN_DEV_ID="eui-70b3d57ed00463e7-otaa" \
|
||||||
|
TTN_DEV_ID_ABP="eui-70b3d57ed0046d5d-abp" \
|
||||||
|
RIOTBASE=${RIOTBASE} \
|
||||||
|
$(which tox) -e test -- ${TOX_ARGS} \
|
||||||
|
${K} "${{ github.event.inputs.filter }}" -m "${{ matrix.pytest_mark }}"
|
||||||
|
- name: junit2html and XML deploy
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
DATE=$(date +"%Y-%m-%d-%H-%M-%S")
|
||||||
|
if echo ${{ github.event.inputs.riot_version }} | \
|
||||||
|
grep -q "[0-9]\{4\}.[0-9]\{2\}"; then
|
||||||
|
VER=${{ github.event.inputs.riot_version }}
|
||||||
|
else
|
||||||
|
VER=$(git -C $GITHUB_WORKSPACE/RIOT rev-parse --short HEAD)
|
||||||
|
fi
|
||||||
|
MARK=$(echo "${{ matrix.pytest_mark }}" | tr '[ _]' '-')
|
||||||
|
REPORT_XML=$GITHUB_WORKSPACE/Release-Specs/test-report.xml
|
||||||
|
REPORT_NAME=test-reports/test-report-$MARK-$VER-$DATE
|
||||||
|
mkdir test-reports/
|
||||||
|
junit2html ${REPORT_XML} ${REPORT_NAME}.html
|
||||||
|
cp ${REPORT_XML} ${REPORT_NAME}.xml
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: Test Reports
|
||||||
|
path: test-reports/*
|
41
.github/workflows/static-test.yml
vendored
Normal file
41
.github/workflows/static-test.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: static-tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]-RC[0-9]*'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
static-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup git
|
||||||
|
run: |
|
||||||
|
# Note: ${{ github.base_ref }} is empty when not in a PR
|
||||||
|
if [ -n "${{ github.base_ref }}" ]; then
|
||||||
|
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }} --no-tags
|
||||||
|
else
|
||||||
|
git config diff.renameLimit 16384
|
||||||
|
fi
|
||||||
|
git config apply.whitespace nowarn
|
||||||
|
- name: Fetch riot/static-test-tools Docker image
|
||||||
|
run: docker pull riot/static-test-tools:latest
|
||||||
|
- name: Run static-tests
|
||||||
|
run: |
|
||||||
|
# Note: ${{ github.base_ref }} is empty when not in a PR
|
||||||
|
docker run --rm \
|
||||||
|
-e CI_BASE_BRANCH=${{ github.base_ref }} \
|
||||||
|
-e GITHUB_RUN_ID=${GITHUB_RUN_ID} \
|
||||||
|
-v $(pwd):/data/riotbuild \
|
||||||
|
riot/static-test-tools:latest \
|
||||||
|
make static-test
|
145
.github/workflows/test-on-iotlab.yml
vendored
Normal file
145
.github/workflows/test-on-iotlab.yml
vendored
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
name: test-on-iotlab
|
||||||
|
|
||||||
|
# Run 'compile_and_test_for_board.py' on IoT-LAB boards.
|
||||||
|
#
|
||||||
|
# This workflow will launch all tests on a list of IoT-LAB boards.
|
||||||
|
#
|
||||||
|
# This workflow is only run periodically on master with a cron and on new
|
||||||
|
# pushed release candidates tags.
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Schedule weekly runs on Monday at 00:00 on master
|
||||||
|
schedule:
|
||||||
|
- cron: '00 0 * * 1'
|
||||||
|
push:
|
||||||
|
# Run on all new releases and release candidates tags
|
||||||
|
tags:
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]-RC[0-9]*'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*'
|
||||||
|
# Allow manual trigger
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
riot_version:
|
||||||
|
description: 'RIOT version to checkout'
|
||||||
|
required: true
|
||||||
|
default: 'master'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Runs all tests on IoT-LAB boards
|
||||||
|
compile_and_test_for_board:
|
||||||
|
strategy:
|
||||||
|
max-parallel: 8
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
boards:
|
||||||
|
- riot: dwm1001
|
||||||
|
iotlab:
|
||||||
|
archi: dwm1001:dw1000
|
||||||
|
site: saclay
|
||||||
|
- riot: iotlab-m3
|
||||||
|
iotlab:
|
||||||
|
archi: m3:at86rf231
|
||||||
|
site: saclay
|
||||||
|
- riot: nrf51dk
|
||||||
|
iotlab:
|
||||||
|
archi: nrf51dk:ble
|
||||||
|
site: saclay
|
||||||
|
- riot: nrf52dk
|
||||||
|
iotlab:
|
||||||
|
archi: nrf52dk:ble
|
||||||
|
site: saclay
|
||||||
|
- riot: nrf52840dk
|
||||||
|
iotlab:
|
||||||
|
archi: nrf52840dk:multi
|
||||||
|
site: saclay
|
||||||
|
- riot: nrf52832-mdk
|
||||||
|
iotlab:
|
||||||
|
archi: nrf52832mdk:ble
|
||||||
|
site: saclay
|
||||||
|
- riot: nucleo-wl55jc
|
||||||
|
iotlab:
|
||||||
|
archi: nucleo-wl55jc:stm32wl
|
||||||
|
site: grenoble
|
||||||
|
- riot: samr21-xpro
|
||||||
|
iotlab:
|
||||||
|
archi: samr21:at86rf233
|
||||||
|
site: saclay
|
||||||
|
- riot: samr34-xpro
|
||||||
|
iotlab:
|
||||||
|
archi: samr34:sx1276
|
||||||
|
site: grenoble
|
||||||
|
- riot: b-l072z-lrwan1
|
||||||
|
iotlab:
|
||||||
|
archi: st-lrwan1:sx1276
|
||||||
|
site: saclay
|
||||||
|
- riot: b-l475e-iot01a
|
||||||
|
iotlab:
|
||||||
|
archi: st-iotnode:multi
|
||||||
|
site: saclay
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: ${{ matrix.boards.riot }}
|
||||||
|
env:
|
||||||
|
IOTLAB_NODE: auto
|
||||||
|
BUILD_IN_DOCKER: 1
|
||||||
|
COMPILE_AND_TEST_FOR_BOARD: ./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py
|
||||||
|
COMPILE_AND_TEST_ARGS: --with-test-only --jobs=2 --report-xml
|
||||||
|
# Exclude applications that are expected to fail or cannot run on iotlab
|
||||||
|
# - tests/periph_timer_short_relative_set is expected to fail
|
||||||
|
# - tests/riotboot requires the riotboot feature and provides a test
|
||||||
|
# but flashing at a specific offset is not (yet) supported on IoT-LAB
|
||||||
|
# so it will always fail because of that limitation
|
||||||
|
APPLICATIONS_EXCLUDE: tests/periph_timer_short_relative_set tests/riotboot
|
||||||
|
# Increase tolerance error with `tests/periph_timer_periodic` because
|
||||||
|
# of timing issues with the test script when running in the github
|
||||||
|
# actions environment
|
||||||
|
TEST_PERIPH_TIMER_PERIODIC_PRECISION: 0.30
|
||||||
|
steps:
|
||||||
|
- name: Set up Python 3.8
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install iotlabcli pexpect riotctrl[rapidjson] junit-xml
|
||||||
|
- name: Configure credentials
|
||||||
|
run: echo '${{ secrets.IOTLABRC }}' > ~/.iotlabrc
|
||||||
|
- name: Setup SSH agent
|
||||||
|
uses: webfactory/ssh-agent@v0.4.1
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.IOTLAB_PRIVATE_KEY }}
|
||||||
|
- name: Fetch host key from IoT-LAB ${{ matrix.boards.iotlab.site }} site
|
||||||
|
run: |
|
||||||
|
IOTLAB_USER=$(cat ~/.iotlabrc | cut -f1 -d:)
|
||||||
|
ssh -oStrictHostKeyChecking=accept-new \
|
||||||
|
${IOTLAB_USER}@${{ matrix.boards.iotlab.site }}.iot-lab.info exit
|
||||||
|
- name: Pull riotbuild docker image
|
||||||
|
run: |
|
||||||
|
docker pull riot/riotbuild:latest
|
||||||
|
- name: Checkout RIOT
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.riot_version }}
|
||||||
|
- name: Launch IoT-LAB experiment
|
||||||
|
run: |
|
||||||
|
IOTLAB_EXP_ID=$(iotlab-experiment --jmespath="id" submit \
|
||||||
|
-n "riot-ci-${{ matrix.boards.riot }}" -d 360 \
|
||||||
|
-l 1,site=${{ matrix.boards.iotlab.site }}+archi=${{ matrix.boards.iotlab.archi }})
|
||||||
|
iotlab-experiment wait -i ${IOTLAB_EXP_ID}
|
||||||
|
echo "IOTLAB_EXP_ID=${IOTLAB_EXP_ID}" >> $GITHUB_ENV
|
||||||
|
- name: Run compile_and_test_for_board.py on ${{ matrix.boards.riot }}
|
||||||
|
run: |
|
||||||
|
${COMPILE_AND_TEST_FOR_BOARD} . ${{ matrix.boards.riot }} \
|
||||||
|
results-${{ matrix.boards.riot }} ${COMPILE_AND_TEST_ARGS} \
|
||||||
|
--applications-exclude="${APPLICATIONS_EXCLUDE}"
|
||||||
|
- name: Stop IoT-LAB experiment
|
||||||
|
if: always()
|
||||||
|
run: iotlab-experiment stop -i ${IOTLAB_EXP_ID}
|
||||||
|
- name: Archive results
|
||||||
|
if: always()
|
||||||
|
# Store generated results-<riot board name> artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.boards.riot }}
|
||||||
|
path: results-${{ matrix.boards.riot }}
|
105
.github/workflows/test-on-ryot.yml
vendored
Normal file
105
.github/workflows/test-on-ryot.yml
vendored
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
---
|
||||||
|
# Run 'compile_and_test_for_board.py' on connected boards.
|
||||||
|
#
|
||||||
|
# This workflow will run on a RYOT (Run Your Own Test) machine and launch
|
||||||
|
# all tests on all boards currently connected to that machine. This
|
||||||
|
# workflow relies on self-hosted runners, this means building and
|
||||||
|
# flashing happens on the self-hosted runner (all in docker). An alternative
|
||||||
|
# approach was used in https://github.com/RIOT-OS/RIOT/pull/14600, where
|
||||||
|
# the RYOT machine was only used for remote flashing, this is a better
|
||||||
|
# alternative if ssh access is possible.
|
||||||
|
#
|
||||||
|
# Documentation:
|
||||||
|
#
|
||||||
|
# * Setup a RYOT machine:
|
||||||
|
# https://github.com/fjmolinas/riot-ryot/blob/master/setup.md
|
||||||
|
#
|
||||||
|
# * Requirements (already filled by a RYOT machine):
|
||||||
|
# * Add one or more self-hosted runners:
|
||||||
|
# https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners
|
||||||
|
# * All required flashing tools installed
|
||||||
|
# * udev rules that map all BOARD to /dev/riot/tty-$(BOARD), see
|
||||||
|
# http://riot-os.org/api/advanced-build-system-tricks.html#multiple-boards-udev
|
||||||
|
# * RIOT_MAKEFILES_GLOBAL_PRE that sets PORT and DEBUG_ADAPTER_ID for each
|
||||||
|
# BOARD
|
||||||
|
# * A list of connected BOARDs in JSON format so that fromJSON can be used
|
||||||
|
# to dynamically setup the matrix, e.g. make target providing this:
|
||||||
|
# https://github.com/fjmolinas/riot-ryot/blob/72fc9ad710a2219e942c5965a014e934822e9da5/template/conf/makefiles.pre#L19-L24
|
||||||
|
# * RYOT: https://github.com/fjmolinas/riot-ryot
|
||||||
|
|
||||||
|
name: test-on-ryot
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Schedule weekly runs Saturday at 00:00 on master
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 6'
|
||||||
|
push:
|
||||||
|
# Run on all new release candidates
|
||||||
|
tags:
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]-RC[0-9]*'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9]'
|
||||||
|
- '[0-9][0-9][0-9][0-9].[0-9][0-9].*'
|
||||||
|
env:
|
||||||
|
# self-hosted runners are started by a systemd which is not a "login" shell
|
||||||
|
# this means that no local environment variables are loaded (e.g. /etc/environment)
|
||||||
|
# when the runner is started. So explicitly set RIOT_MAKEFILES_GLOBAL_PRE
|
||||||
|
# to set PORT and DEBUG_ADAPTER_ID per BOARD
|
||||||
|
RIOT_MAKEFILES_GLOBAL_PRE: '/builds/conf/makefiles.pre'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
connected_boards:
|
||||||
|
name: Get Connected Boards
|
||||||
|
runs-on: self-hosted
|
||||||
|
outputs:
|
||||||
|
boards: ${{ steps.ci-connected-boards.outputs.boards }}
|
||||||
|
steps:
|
||||||
|
# Get all currently connected boards if not passed through an input
|
||||||
|
- id: ci-connected-boards
|
||||||
|
run: echo "::set-output name=boards::$(make -C /builds/boards/ list-boards-json --no-print-directory)"
|
||||||
|
|
||||||
|
# Runs all tests on connected boards
|
||||||
|
compile_and_test_for_board:
|
||||||
|
name: ${{ matrix.board }}
|
||||||
|
runs-on: self-hosted
|
||||||
|
needs: connected_boards
|
||||||
|
# ci-riot-tribe has 8 cores, parallelism will depend on actually configured
|
||||||
|
# runners
|
||||||
|
strategy:
|
||||||
|
max-parallel: 7
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
board: ${{ fromJson(needs.connected_boards.outputs.boards) }}
|
||||||
|
env:
|
||||||
|
BUILD_IN_DOCKER: 1
|
||||||
|
COMPILE_AND_TEST_FOR_BOARD: /builds/boards/RIOT/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py
|
||||||
|
# args for compile_and_test_for_board script
|
||||||
|
COMPILE_AND_TEST_ARGS: --with-test-only --report-xml --incremental
|
||||||
|
# environment vars for compile_and_test_for_board script to pass
|
||||||
|
# USEMODULE and CFLAGS use:
|
||||||
|
# DOCKER_ENVIRONMENT_CMDLINE=\'-e USEMODULE=<name>\'
|
||||||
|
# DOCKER_ENVIRONMENT_CMDLINE=\'-e CFLAGS=-D<flag>\'
|
||||||
|
COMPILE_AND_TEST_VARS: ''
|
||||||
|
APPLICATIONS: ''
|
||||||
|
# Exclude 'tests/periph_timer_short_relative_set' since its expected
|
||||||
|
# to fail on most BOARDs
|
||||||
|
APPLICATIONS_EXCLUDE: 'tests/periph_timer_short_relative_set'
|
||||||
|
steps:
|
||||||
|
- name: Checkout RIOT
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.riot_version }}
|
||||||
|
# Make sure it runs git clean -xdff before fetching
|
||||||
|
clean: true
|
||||||
|
- name: Run compile_and_test_for_board.py
|
||||||
|
run: |
|
||||||
|
${COMPILE_AND_TEST_VARS} ${COMPILE_AND_TEST_FOR_BOARD} . \
|
||||||
|
${{ matrix.board }} results-${{ matrix.board }} \
|
||||||
|
${COMPILE_AND_TEST_ARGS} \
|
||||||
|
--applications="${APPLICATIONS}" \
|
||||||
|
--applications-exclude="${APPLICATIONS_EXCLUDE}"
|
||||||
|
- name: Archive results
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.board }}
|
||||||
|
path: results-${{ matrix.board }}
|
81
.github/workflows/tools-buildtest.yml
vendored
Normal file
81
.github/workflows/tools-buildtest.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
name: tools-buildtest
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tools-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Build flatc standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/flatc
|
||||||
|
- name: Build mosquitto_rsmb standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/mosquitto_rsmb
|
||||||
|
- name: Build bossa-1.8 standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/bossa-1.8
|
||||||
|
- name: Build bossa-1.9 standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/bossa-1.9
|
||||||
|
- name: Build bossa-nrf52 standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/bossa-nrf52
|
||||||
|
- name: Build edbg standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/edbg
|
||||||
|
- name: Build pic32prog standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/pic32prog
|
||||||
|
- name: Build setsid standalone
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/setsid
|
||||||
|
- name: Build ethos
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/ethos
|
||||||
|
- name: Build uhcpd
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/uhcpd
|
||||||
|
- name: Build stm32 clk_conf
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C cpu/stm32/dist/clk_conf
|
||||||
|
- name: Build kinetis calc_spi_scalers
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C cpu/kinetis/dist/calc_spi_scalers
|
||||||
|
- name: Build fixdep tool
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/fixdep
|
||||||
|
- name: Build lpc2k_pgm tool
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/lpc2k_pgm
|
||||||
|
- name: Build riotboot_serial tool
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/riotboot_serial
|
||||||
|
- name: Build ZEP dispatcher & topology generator
|
||||||
|
uses: aabadie/riot-action@v1
|
||||||
|
with:
|
||||||
|
cmd: make -C dist/tools/zep_dispatch
|
38
.github/workflows/tools-test.yml
vendored
Normal file
38
.github/workflows/tools-test.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: tools-test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
python-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install tox
|
||||||
|
python -m pip install kconfiglib
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gcc-multilib
|
||||||
|
- name: Test backport_pr
|
||||||
|
run: cd dist/tools/backport_pr && tox
|
||||||
|
- name: Test compile_and_test_for_board
|
||||||
|
run: cd dist/tools/compile_and_test_for_board && tox
|
||||||
|
- name: Test riotctrl_ctrl
|
||||||
|
run: cd dist/pythonlibs/riotctrl_ctrl && tox
|
||||||
|
- name: Test riotctrl_shell
|
||||||
|
run: cd dist/pythonlibs/riotctrl_shell && tox
|
||||||
|
- name: Test kconfig script
|
||||||
|
run: cd dist/tools/kconfiglib/tests && ./test.sh
|
23
.gitignore
vendored
23
.gitignore
vendored
@ -1,5 +1,7 @@
|
|||||||
# Object files
|
# Object files
|
||||||
*.o
|
*.o
|
||||||
|
# Target files
|
||||||
|
*.elf
|
||||||
# Documentation artifacts
|
# Documentation artifacts
|
||||||
doc/doxygen/html
|
doc/doxygen/html
|
||||||
doc/doxygen/latex
|
doc/doxygen/latex
|
||||||
@ -7,14 +9,22 @@ doc/doxygen/man
|
|||||||
doc/doxygen/*.log
|
doc/doxygen/*.log
|
||||||
doc/doxygen/*.db
|
doc/doxygen/*.db
|
||||||
doc/doxygen/*.tmp
|
doc/doxygen/*.tmp
|
||||||
# Built binaries
|
# bin (e.g.:build directory) and .bin files
|
||||||
*bin
|
bin
|
||||||
|
*.bin
|
||||||
# Build directory
|
# Build directory
|
||||||
/build
|
/build
|
||||||
|
# AFL findings
|
||||||
|
fuzzing/**/findings/
|
||||||
# Backup files
|
# Backup files
|
||||||
*~
|
*~
|
||||||
*.orig
|
*.orig
|
||||||
|
.*.swn
|
||||||
|
.*.swo
|
||||||
.*.swp
|
.*.swp
|
||||||
|
*.save
|
||||||
|
*.rej
|
||||||
|
\#*\#
|
||||||
cachegrind.out*
|
cachegrind.out*
|
||||||
# Eclipse workspace files
|
# Eclipse workspace files
|
||||||
.project
|
.project
|
||||||
@ -69,8 +79,17 @@ results/
|
|||||||
compile_commands.json
|
compile_commands.json
|
||||||
compile_flags.txt
|
compile_flags.txt
|
||||||
|
|
||||||
|
# cache files of clangd (and probably other tools)
|
||||||
|
.cache/
|
||||||
|
|
||||||
|
# generated by clang-check for C++ code
|
||||||
|
*.plist
|
||||||
|
|
||||||
# suit manifest keys
|
# suit manifest keys
|
||||||
keys/
|
keys/
|
||||||
|
|
||||||
# clangd language server
|
# clangd language server
|
||||||
.clangd/
|
.clangd/
|
||||||
|
|
||||||
|
# custom clang-tidy flags, also used when using clangd language server
|
||||||
|
.clang-tidy
|
||||||
|
5
.mailmap
5
.mailmap
@ -1,3 +1,8 @@
|
|||||||
|
Benjamin Valentin <benjamin.valentin@ml-pa.com> <benjamin.valentin@ml-pa.com>
|
||||||
|
Benjamin Valentin <benjamin.valentin@ml-pa.com> <benpicco@googlemail.com>
|
||||||
|
Benjamin Valentin <benjamin.valentin@ml-pa.com> <benpicco@beuth-hochschule.de>
|
||||||
|
Benjamin Valentin <benjamin.valentin@ml-pa.com> <benpicco@zedat.fu-berlin.de>
|
||||||
|
Benjamin Valentin <benjamin.valentin@ml-pa.com> <benpicco@flauschlabor.de>
|
||||||
Cenk Gündoğan <mail-github@cgundogan.de> <cnkgndgn@gmail.com>
|
Cenk Gündoğan <mail-github@cgundogan.de> <cnkgndgn@gmail.com>
|
||||||
Cenk Gündoğan <mail-github@cgundogan.de> <mail@cgundogan.de>
|
Cenk Gündoğan <mail-github@cgundogan.de> <mail@cgundogan.de>
|
||||||
Hauke Petersen <devel@haukepetersen.de> <hauke.petersen@fu-berlin.de>
|
Hauke Petersen <devel@haukepetersen.de> <hauke.petersen@fu-berlin.de>
|
||||||
|
394
.murdock
394
.murdock
@ -1,13 +1,141 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
: ${TEST_BOARDS_AVAILABLE:="nrf52dk samr21-xpro"}
|
# uncomment and change this to limit builds, e.g.,
|
||||||
: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}
|
#export BOARDS="samr21-xpro native"
|
||||||
|
# and / or
|
||||||
|
#export APPS="examples/hello-world tests/unittests"
|
||||||
|
|
||||||
|
#
|
||||||
|
: ${TEST_BOARDS_AVAILABLE:="esp32-wroom-32 samr21-xpro"}
|
||||||
|
|
||||||
|
# temporarily disabling llvm builds until https://github.com/RIOT-OS/RIOT/pull/15595
|
||||||
|
# is in
|
||||||
|
#: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}
|
||||||
|
: ${TEST_BOARDS_LLVM_COMPILE:=""}
|
||||||
|
|
||||||
|
: ${TEST_KCONFIG_BOARDS_AVAILABLE:="
|
||||||
|
adafruit-itsybitsy-m4
|
||||||
|
arduino-due
|
||||||
|
arduino-leonardo
|
||||||
|
arduino-mkrzero
|
||||||
|
arduino-mega2560
|
||||||
|
arduino-nano
|
||||||
|
atxmega-a1-xplained
|
||||||
|
atxmega-a3bu-xplained
|
||||||
|
avr-rss2
|
||||||
|
avsextrem
|
||||||
|
bastwan
|
||||||
|
bluepill
|
||||||
|
b-l475e-iot01a
|
||||||
|
cc1352-launchpad
|
||||||
|
cc2650-launchpad
|
||||||
|
derfmega128
|
||||||
|
dwm1001
|
||||||
|
esp32-ci
|
||||||
|
esp32-heltec-lora32-v2
|
||||||
|
esp8266-ci
|
||||||
|
esp8266-esp-12x
|
||||||
|
hamilton
|
||||||
|
hifive1
|
||||||
|
mbed_lpc1768
|
||||||
|
mega-xplained
|
||||||
|
microbit
|
||||||
|
mulle
|
||||||
|
native
|
||||||
|
nrf52840dk
|
||||||
|
nrf9160dk
|
||||||
|
nucleo-f072rb
|
||||||
|
nucleo-f103rb
|
||||||
|
nucleo-f207zg
|
||||||
|
nucleo-f334r8
|
||||||
|
nucleo-f429zi
|
||||||
|
nucleo-f767zi
|
||||||
|
nucleo-g071rb
|
||||||
|
nucleo-g474re
|
||||||
|
nucleo-l011k4
|
||||||
|
nucleo-l073rz
|
||||||
|
nucleo-l152re
|
||||||
|
nucleo-l433rc
|
||||||
|
nucleo-l552ze-q
|
||||||
|
p-nucleo-wb55
|
||||||
|
qn9080dk
|
||||||
|
remote-revb
|
||||||
|
same54-xpro
|
||||||
|
samr21-xpro
|
||||||
|
seeedstudio-gd32
|
||||||
|
slstk3400a
|
||||||
|
sltb001a
|
||||||
|
slwstk6220a
|
||||||
|
stm32f723e-disco
|
||||||
|
stm32mp157c-dk2
|
||||||
|
waspmote-pro
|
||||||
|
weact-f401ce
|
||||||
|
z1
|
||||||
|
"}
|
||||||
|
|
||||||
|
: ${TEST_KCONFIG_ENFORCE_APP_GROUPS:="
|
||||||
|
tests/cb_mux*
|
||||||
|
tests/congure_*
|
||||||
|
tests/driver_b*
|
||||||
|
tests/driver_f*
|
||||||
|
tests/driver_g*
|
||||||
|
tests/driver_h*
|
||||||
|
tests/driver_i*
|
||||||
|
tests/driver_j*
|
||||||
|
tests/driver_l*
|
||||||
|
tests/driver_o*
|
||||||
|
tests/driver_p*
|
||||||
|
tests/driver_q*
|
||||||
|
tests/driver_r*
|
||||||
|
tests/driver_s*
|
||||||
|
tests/driver_t*
|
||||||
|
tests/driver_u*
|
||||||
|
tests/driver_v*
|
||||||
|
tests/external_board_dirs
|
||||||
|
tests/periph_*
|
||||||
|
tests/pkg_elk
|
||||||
|
tests/pkg_uzlib
|
||||||
|
tests/prng_*
|
||||||
|
tests/trace
|
||||||
|
tests/xtimer_*
|
||||||
|
tests/ztimer_*
|
||||||
|
examples/hello-world
|
||||||
|
tests/ieee802154_hal
|
||||||
|
"}
|
||||||
|
|
||||||
|
# This list prevents boards from being tested by the TEST_KCONFIG_TEST_ALLOWLIST
|
||||||
|
# This should only be used for boards that require a lot of work, such as,
|
||||||
|
# requiring modelling of a clock tree.
|
||||||
|
# As a rule of thumb, only add boards here if there are not differences in
|
||||||
|
# modules or packages.
|
||||||
|
# Eventually this list will be removed...
|
||||||
|
#
|
||||||
|
: ${TEST_KCONFIG_BOARD_BLOCKLIST:="
|
||||||
|
6lowpan-clicker
|
||||||
|
pic32-wifire
|
||||||
|
"}
|
||||||
|
|
||||||
|
# This list will force all boards that are not in the TEST_KCONFIG_BOARD_BLOCKLIST
|
||||||
|
# to be tested on the apps. The purpose is to prevent new boards from skipping
|
||||||
|
# the kconfig implementations.
|
||||||
|
: ${TEST_KCONFIG_TEST_ALLOWLIST:="
|
||||||
|
examples/hello-world
|
||||||
|
tests/saul
|
||||||
|
tests/mtd_mapper
|
||||||
|
"}
|
||||||
|
|
||||||
|
: ${TEST_WITH_CONFIG_SUPPORTED:="examples/suit_update tests/driver_at86rf2xx_aes"}
|
||||||
|
|
||||||
export RIOT_CI_BUILD=1
|
export RIOT_CI_BUILD=1
|
||||||
export STATIC_TESTS=${STATIC_TESTS:-1}
|
export CC_NOCOLOR=1
|
||||||
|
export STATIC_TESTS=0
|
||||||
export CFLAGS_DBG=""
|
export CFLAGS_DBG=""
|
||||||
export DLCACHE_DIR=${DLCACHE_DIR:-~/.dlcache}
|
export DLCACHE_DIR=${DLCACHE_DIR:-~/.dlcache}
|
||||||
export ENABLE_TEST_CACHE=${ENABLE_TEST_CACHE:-1}
|
export ENABLE_TEST_CACHE=${ENABLE_TEST_CACHE:-1}
|
||||||
|
export MURDOCK_REDIS_HOST=${MURDOCK_REDIS_HOST:-127.0.0.1}
|
||||||
|
NIGHTLY=${NIGHTLY:-0}
|
||||||
|
RUN_TESTS=${RUN_TESTS:-${NIGHTLY}}
|
||||||
|
FULL_BUILD=${FULL_BUILD:-${NIGHTLY}}
|
||||||
|
|
||||||
# This is a work around for a bug in CCACHE which interacts very badly with
|
# This is a work around for a bug in CCACHE which interacts very badly with
|
||||||
# some features of RIOT and of murdock. The result is that ccache is
|
# some features of RIOT and of murdock. The result is that ccache is
|
||||||
@ -26,10 +154,63 @@ export ENABLE_TEST_CACHE=${ENABLE_TEST_CACHE:-1}
|
|||||||
# It is only the combination of these three factors which causes this bug.
|
# It is only the combination of these three factors which causes this bug.
|
||||||
export OPTIONAL_CFLAGS_BLACKLIST="-gz"
|
export OPTIONAL_CFLAGS_BLACKLIST="-gz"
|
||||||
|
|
||||||
NIGHTLY=${NIGHTLY:-0}
|
DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS -E ENABLE_TEST_CACHE
|
||||||
RUN_TESTS=${RUN_TESTS:-${NIGHTLY}}
|
-E TEST_HASH -E CI_PULL_LABELS -ECI_BASE_BRANCH -ECI_BASE_COMMIT
|
||||||
|
-EPKG_USE_MIRROR -EAPPS_CHANGED -EBOARDS_CHANGED -ESTATIC_TESTS"
|
||||||
|
|
||||||
DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS -E ENABLE_TEST_CACHE -E TEST_HASH"
|
if [ ${NIGHTLY} -eq 1 ]; then
|
||||||
|
export PKG_USE_MIRROR=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
CFCR_ARGS="--upstreambranch ${CI_BASE_COMMIT}"
|
||||||
|
|
||||||
|
get_supported_kconfig_board_app() {
|
||||||
|
local board=$1
|
||||||
|
local appdir=$2
|
||||||
|
if is_in_list "${board}" "${TEST_KCONFIG_BOARD_BLOCKLIST}"; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# On nightlies run all possible kconfig tests on all boards
|
||||||
|
# Normally we don't want to do this as it adds quite a bit to build time
|
||||||
|
# and the subset of boards we are testing for are pretty good at catching
|
||||||
|
# any bugs...
|
||||||
|
# This will be over one day, I promise.
|
||||||
|
if [ ${NIGHTLY} -eq 1 ]; then
|
||||||
|
if is_in_list "${appdir}" "${TEST_KCONFIG_ENFORCE_APP_GROUPS}"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ -f "${appdir}/app.config.test" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if is_in_list "${appdir}" "${TEST_KCONFIG_TEST_ALLOWLIST}"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if is_in_list "${board}" "${TEST_KCONFIG_BOARDS_AVAILABLE}"; then
|
||||||
|
if is_in_list "${appdir}" "${TEST_KCONFIG_ENFORCE_APP_GROUPS}"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ -f "${appdir}/app.config.test" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
kconfig_module_packages_diff() {
|
||||||
|
local board=$1
|
||||||
|
local appdir=$2
|
||||||
|
|
||||||
|
make clean --no-print-directory -C ${appdir} BOARD=${board}
|
||||||
|
mmp=$(make --no-print-directory info-modules info-packages -C ${appdir} BOARD=${board})
|
||||||
|
|
||||||
|
make clean --no-print-directory -C ${appdir} BOARD=${board}
|
||||||
|
kmp=$(TEST_KCONFIG=1 make --no-print-directory info-modules info-packages -C ${appdir} BOARD=${board})
|
||||||
|
|
||||||
|
|
||||||
|
bash -c "diff <(echo \"${mmp}\") <(echo \"${kmp}\")"
|
||||||
|
}
|
||||||
|
|
||||||
check_label() {
|
check_label() {
|
||||||
local label="${1}"
|
local label="${1}"
|
||||||
@ -116,8 +297,36 @@ get_apps() {
|
|||||||
# Only print for boards in $BOARDS.
|
# Only print for boards in $BOARDS.
|
||||||
get_supported_boards() {
|
get_supported_boards() {
|
||||||
local appdir=$1
|
local appdir=$1
|
||||||
|
local only_changed=0
|
||||||
|
|
||||||
|
if [ -n "$APPS_CHANGED" ]; then
|
||||||
|
if is_in_list "$appdir" "${APPS_CHANGED}"; then
|
||||||
|
# this app has changed -> build for all boards
|
||||||
|
true
|
||||||
|
else
|
||||||
|
# this is not a changed app -> build for changed boards
|
||||||
|
only_changed=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -n "$BOARDS_CHANGED" ]; then
|
||||||
|
echo d
|
||||||
|
# no changed apps, some changed boards -> build for changed boards
|
||||||
|
only_changed=1
|
||||||
|
else
|
||||||
|
# no changed apps list, no changed boards list -> build all boards
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $only_changed -eq 1 ]; then
|
||||||
|
BOARDS_=${BOARDS}
|
||||||
|
export BOARDS="$BOARDS_CHANGED"
|
||||||
|
fi
|
||||||
|
|
||||||
local boards="$(make --no-print-directory -C$appdir info-boards-supported 2>/dev/null || echo broken)"
|
local boards="$(make --no-print-directory -C$appdir info-boards-supported 2>/dev/null || echo broken)"
|
||||||
|
|
||||||
|
export BOARDS="${BOARDS_}"
|
||||||
|
|
||||||
if [ "$boards" = broken ]; then
|
if [ "$boards" = broken ]; then
|
||||||
echo "makefile_broken"
|
echo "makefile_broken"
|
||||||
return
|
return
|
||||||
@ -168,8 +377,12 @@ get_app_board_toolchain_pairs() {
|
|||||||
|
|
||||||
# use dwqc to create full "appdir board toolchain" compile job list
|
# use dwqc to create full "appdir board toolchain" compile job list
|
||||||
get_compile_jobs() {
|
get_compile_jobs() {
|
||||||
|
check_label "CI: skip compile test" && return
|
||||||
|
update_changed_modules || return
|
||||||
|
|
||||||
get_apps | \
|
get_apps | \
|
||||||
dwqc ${DWQ_ENV} -s \
|
maybe_filter_changed_apps | \
|
||||||
|
dwqc ${DWQ_ENV} --queue default-first -s \
|
||||||
${DWQ_JOBID:+--subjob} \
|
${DWQ_JOBID:+--subjob} \
|
||||||
"$0 get_app_board_toolchain_pairs \${1} $0 compile"
|
"$0 get_app_board_toolchain_pairs \${1} $0 compile"
|
||||||
}
|
}
|
||||||
@ -196,11 +409,11 @@ test_hash_calc() {
|
|||||||
|
|
||||||
test_cache_get() {
|
test_cache_get() {
|
||||||
test "${ENABLE_TEST_CACHE}" = "1" || return 1
|
test "${ENABLE_TEST_CACHE}" = "1" || return 1
|
||||||
test -n "$(redis-cli get $1)" > /dev/null
|
test -n "$(redis-cli -h ${MURDOCK_REDIS_HOST} get $1)" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
test_cache_put() {
|
test_cache_put() {
|
||||||
redis-cli set "$1" ok
|
redis-cli -h ${MURDOCK_REDIS_HOST} set "$1" ok
|
||||||
}
|
}
|
||||||
|
|
||||||
# compile one app for one board with one toolchain. delete intermediates.
|
# compile one app for one board with one toolchain. delete intermediates.
|
||||||
@ -228,13 +441,44 @@ compile() {
|
|||||||
# sanity checks
|
# sanity checks
|
||||||
[ $# -ne 2 ] && error "$0: compile: invalid parameters (expected \$appdir \$board:\$toolchain)"
|
[ $# -ne 2 ] && error "$0: compile: invalid parameters (expected \$appdir \$board:\$toolchain)"
|
||||||
[ ! -d "$appdir" ] && error "$0: compile: error: application directory \"$appdir\" doesn't exist"
|
[ ! -d "$appdir" ] && error "$0: compile: error: application directory \"$appdir\" doesn't exist"
|
||||||
[ ! -d "boards/$board" ] && error "$0: compile: error: board directory \"boards/$board\" doesn't exist"
|
|
||||||
|
|
||||||
# compile
|
# We compile a first time with Kconfig based dependency
|
||||||
|
# resolution for regression purposes. $TEST_KCONFIG contains a
|
||||||
|
# list of board-application tuples that are currently modeled to
|
||||||
|
# run with Kconfig
|
||||||
|
|
||||||
|
should_check_kconfig_hash=0
|
||||||
|
|
||||||
|
if get_supported_kconfig_board_app "${board}" "${appdir}"; then
|
||||||
|
should_check_kconfig_hash=1
|
||||||
|
BOARD=${board} make -C${appdir} clean
|
||||||
|
CCACHE_BASEDIR="$(pwd)" BOARD=${board} TOOLCHAIN=${toolchain} RIOT_CI_BUILD=1 TEST_KCONFIG=1 \
|
||||||
|
make -C${appdir} all test-input-hash -j${JOBS:-4}
|
||||||
|
RES=$?
|
||||||
|
if [ $RES -eq 0 ]; then
|
||||||
|
kconfig_test_hash=$(test_hash_calc "${BINDIR}")
|
||||||
|
else
|
||||||
|
kconfig_test_hash=0
|
||||||
|
echo "An error occurred while compiling using Kconfig";
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# compile without Kconfig
|
||||||
CCACHE_BASEDIR="$(pwd)" BOARD=$board TOOLCHAIN=$toolchain RIOT_CI_BUILD=1 \
|
CCACHE_BASEDIR="$(pwd)" BOARD=$board TOOLCHAIN=$toolchain RIOT_CI_BUILD=1 \
|
||||||
make -C${appdir} clean all test-input-hash -j${JOBS:-4}
|
make -C${appdir} clean all test-input-hash -j${JOBS:-4}
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
|
test_hash=$(test_hash_calc "$BINDIR")
|
||||||
|
|
||||||
|
if [ ${should_check_kconfig_hash} != 0 ]; then
|
||||||
|
if [ ${kconfig_test_hash} != ${test_hash} ]; then
|
||||||
|
echo "Hashes of binaries with and without Kconfig mismatch for ${appdir} with ${board}";
|
||||||
|
echo "Please check that all used modules are modelled in Kconfig and enabled";
|
||||||
|
kconfig_module_packages_diff ${board} ${appdir}
|
||||||
|
RES=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# run tests
|
# run tests
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
if [ $RUN_TESTS -eq 1 -o "$board" = "native" ]; then
|
if [ $RUN_TESTS -eq 1 -o "$board" = "native" ]; then
|
||||||
@ -243,7 +487,6 @@ compile() {
|
|||||||
BOARD=$board make -C${appdir} test
|
BOARD=$board make -C${appdir} test
|
||||||
RES=$?
|
RES=$?
|
||||||
elif is_in_list "$board" "$TEST_BOARDS_AVAILABLE"; then
|
elif is_in_list "$board" "$TEST_BOARDS_AVAILABLE"; then
|
||||||
test_hash=$(test_hash_calc "$BINDIR")
|
|
||||||
echo "-- test_hash=$test_hash"
|
echo "-- test_hash=$test_hash"
|
||||||
if test_cache_get $test_hash; then
|
if test_cache_get $test_hash; then
|
||||||
echo "-- skipping test due to positive cache hit"
|
echo "-- skipping test due to positive cache hit"
|
||||||
@ -314,7 +557,11 @@ run_test() {
|
|||||||
BOARD=$board TOOLCHAIN=${toolchain} make -C$appdir flash-only termdeps -j2
|
BOARD=$board TOOLCHAIN=${toolchain} make -C$appdir flash-only termdeps -j2
|
||||||
|
|
||||||
# now run the actual test
|
# now run the actual test
|
||||||
BOARD=$board TOOLCHAIN=${toolchain} make -C$appdir test
|
if is_in_list "${appdir}" "${TEST_WITH_CONFIG_SUPPORTED}"; then
|
||||||
|
BOARD=${board} TOOLCHAIN=${toolchain} make -C${appdir} test-with-config
|
||||||
|
else
|
||||||
|
BOARD=$board TOOLCHAIN=${toolchain} make -C$appdir test
|
||||||
|
fi
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
if [ $RES -eq 0 -a -n "$TEST_HASH" ]; then
|
if [ $RES -eq 0 -a -n "$TEST_HASH" ]; then
|
||||||
@ -325,26 +572,119 @@ run_test() {
|
|||||||
return $RES
|
return $RES
|
||||||
}
|
}
|
||||||
|
|
||||||
# execute static tests
|
basename_list () {
|
||||||
static_tests() {
|
for path in $*; do
|
||||||
local repo=${CI_BASE_REPO:-https://github.com/RIOT-OS/RIOT}
|
basename $path
|
||||||
local branch=${CI_BASE_BRANCH:-master}
|
done
|
||||||
|
}
|
||||||
|
|
||||||
print_worker
|
# calls out to can_fast_ci_run.py.
|
||||||
|
#
|
||||||
OUT="$(git remote add upstream $repo 2>&1 && git fetch upstream ${branch}:${branch} 2>&1)"
|
# returns 1 if nothing should be built.
|
||||||
RES=$?
|
# or, returns 0, potentially meddling with BOARDS, APPS, BOARDS_CHANGED, APPS_CHANGED.
|
||||||
if [ $RES -ne 0 ]; then
|
update_changed_modules() {
|
||||||
echo "$OUT"
|
# early out if there's no base commit info
|
||||||
exit 1
|
if [ -z "${CI_BASE_COMMIT}" ]; then
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILDTEST_MCU_GROUP=static-tests ./dist/tools/ci/build_and_test.sh
|
# early out if a full build is requested
|
||||||
|
if [ $FULL_BUILD -eq 1 ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if these are set, just build what's requested.
|
||||||
|
if [ -n "$BOARDS" -o -n "$APPS" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# do full build if requested by label
|
||||||
|
check_label "CI: full build" && return 0
|
||||||
|
|
||||||
|
# call out to can_fast_ci_run.py
|
||||||
|
# that script will output e.g.,
|
||||||
|
# APPS_CHANGED="foo/bar foo/barfoo"
|
||||||
|
# BOARDS_CHANGED="foo/bar foo/barfoo"
|
||||||
|
# just eval that output, so we set those variables directly in this shell.
|
||||||
|
eval $(dist/tools/ci/can_fast_ci_run.py \
|
||||||
|
${CFCR_ARGS} \
|
||||||
|
--changed-boards --changed-apps \
|
||||||
|
2>/dev/null || echo CFCR_ERROR=1)
|
||||||
|
|
||||||
|
# if this errors, it means we cannot skip any builds.
|
||||||
|
if [ -n "$CFCR_ERROR" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if can_fast_ci_run exits 0 but doesn't output any changed apps or boards,
|
||||||
|
# it means we can skip all compile jobs.
|
||||||
|
if [ -z "$APPS_CHANGED" -a -z "$BOARDS_CHANGED" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# can_fast_ci_run.py outputs "board/fooboard", but the rest of this script
|
||||||
|
# expects a board name without leading "board/".
|
||||||
|
if [ -n "$BOARDS_CHANGED" ]; then
|
||||||
|
export BOARDS_CHANGED="$(basename_list $BOARDS_CHANGED)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if no board has changed, filter by just setting APPS.
|
||||||
|
# same for apps -> BOARDS.
|
||||||
|
if [ -z "$APPS_CHANGED" -a -n "$BOARDS_CHANGED" ]; then
|
||||||
|
export BOARDS="$(echo $BOARDS_CHANGED | $(_greplist ${BOARDS}))"
|
||||||
|
unset BOARDS_CHANGED
|
||||||
|
elif [ -n "$APPS_CHANGED" -a -z "$BOARDS_CHANGED" ]; then
|
||||||
|
export APPS="$(echo $APPS_CHANGED | $(_greplist ${APPS}))"
|
||||||
|
unset APPS_CHANGED
|
||||||
|
fi
|
||||||
|
|
||||||
|
export APPS_CHANGED
|
||||||
|
export BOARDS_CHANGED
|
||||||
|
}
|
||||||
|
|
||||||
|
maybe_filter_changed_apps() {
|
||||||
|
# if no boards have changes, only a subset of the apps need to be built.
|
||||||
|
# else, all apps need to be passed, as they'll need to be built for
|
||||||
|
# the changed boards.
|
||||||
|
if [ -n "$BOARDS_CHANGED" ]; then
|
||||||
|
cat
|
||||||
|
else
|
||||||
|
$(_greplist $APPS_CHANGED)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# execute static tests
|
||||||
|
static_tests() {
|
||||||
|
print_worker
|
||||||
|
build_filter_status
|
||||||
|
|
||||||
|
[ "$STATIC_TESTS" = "1" ] && \
|
||||||
|
./dist/tools/ci/static_tests.sh
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
build_filter_status() {
|
||||||
|
echo "--- can_fast_ci_run:"
|
||||||
|
if [ $FULL_BUILD -eq 1 ]; then
|
||||||
|
echo "--- doing full build."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
dist/tools/ci/can_fast_ci_run.py ${CFCR_ARGS} --explain --json --changed-boards --changed-apps
|
||||||
|
if [ -n "$MURDOCK_TEST_CHANGE_FILTER" ]; then
|
||||||
|
echo MURDOCK_TEST_CHANGE_FILTER=$MURDOCK_TEST_CHANGE_FILTER
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
update_changed_modules
|
||||||
|
|
||||||
|
if [ -n "$CFCR_ERROR" ]; then
|
||||||
|
echo "-- can_fast_ci_run.py exited non-zero"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_non_compile_jobs() {
|
get_non_compile_jobs() {
|
||||||
[ "$STATIC_TESTS" = "1" ] && \
|
echo "$0 static_tests"
|
||||||
echo "$0 static_tests###{ \"jobdir\" : \"exclusive\" }"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get_jobs() {
|
get_jobs() {
|
||||||
|
19
.travis.yml
19
.travis.yml
@ -1,19 +0,0 @@
|
|||||||
sudo: required
|
|
||||||
|
|
||||||
language: minimal
|
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- docker pull riot/riotbuild
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
# Fetch the base branch when it is not `master`
|
|
||||||
- git fetch origin "${TRAVIS_BRANCH}:${TRAVIS_BRANCH}"
|
|
||||||
|
|
||||||
script:
|
|
||||||
- docker run -a STDIN -a STDOUT -a STDERR --rm -u "$(id -u)"
|
|
||||||
-e CI_BASE_BRANCH="${TRAVIS_BRANCH}"
|
|
||||||
-v "${PWD}:/data/riotbuild" -v /etc/localtime:/etc/localtime:ro
|
|
||||||
riot/riotbuild make static-test
|
|
49
CITATION.cff
Normal file
49
CITATION.cff
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
cff-version: 1.2.0
|
||||||
|
message: "If you use this software, please cite it as below."
|
||||||
|
title: RIOT - The friendly Operating System for the IoT
|
||||||
|
url: https://www.riot-os.org/
|
||||||
|
preferred-citation:
|
||||||
|
type: article
|
||||||
|
authors:
|
||||||
|
- family-names: Baccelli
|
||||||
|
given-names: Emmanuel
|
||||||
|
- family-names: Gündoğan
|
||||||
|
given-names: Cenk
|
||||||
|
- family-names: Hahm
|
||||||
|
given-names: Oliver
|
||||||
|
- family-names: Kietzmann
|
||||||
|
given-names: Peter
|
||||||
|
- family-names: Lenders
|
||||||
|
given-names: Martine S.
|
||||||
|
- family-names: Petersen
|
||||||
|
given-names: Hauke
|
||||||
|
- family-names: Schleiser
|
||||||
|
given-names: Kaspar
|
||||||
|
- family-names: Schmidt
|
||||||
|
given-names: Thomas C.
|
||||||
|
- family-names: Wählisch
|
||||||
|
given-names: Matthias
|
||||||
|
title: "RIOT: An Open Source Operating System for Low-End Embedded Devices in the IoT"
|
||||||
|
url: https://www.riot-os.org/assets/pdfs/riot-ieeeiotjournal-2018.pdf
|
||||||
|
journal: IEEE Internet of Things Journal
|
||||||
|
scope: "If you use this software, we prefer that you cite our paper as below."
|
||||||
|
publisher:
|
||||||
|
- name: IEEE
|
||||||
|
month: 3
|
||||||
|
year: 2018
|
||||||
|
volume: 5
|
||||||
|
issue: 6
|
||||||
|
pages: 4428-4440
|
||||||
|
doi: 10.1109/JIOT.2018.2815038
|
||||||
|
abstract: >
|
||||||
|
As the Internet of Things (IoT) emerges, compact operating systems (OSs) are
|
||||||
|
required on low-end devices to ease development and portability of IoT
|
||||||
|
applications. RIOT is a prominent free and open source OS in this space. In
|
||||||
|
this paper, we provide the first comprehensive overview of RIOT. We cover
|
||||||
|
the key components of interest to potential developers and users: the
|
||||||
|
kernel, hardware abstraction, and software modularity, both conceptually and
|
||||||
|
in practice for various example configurations. We explain operational
|
||||||
|
aspects like system boot-up, timers, power management, and the use of
|
||||||
|
networking. Finally, the relevant APIs as exposed by the OS are discussed
|
||||||
|
along with the larger ecosystem around RIOT, including development and open
|
||||||
|
source community aspects.
|
155
CODEOWNERS
Normal file
155
CODEOWNERS
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
## CODEOWNERS for autoreview assigning in github
|
||||||
|
|
||||||
|
# https://help.github.com/en/articles/about-code-owners#codeowners-syntax
|
||||||
|
|
||||||
|
# Order is important; for each modified file, the last matching
|
||||||
|
# pattern takes the most precedence.
|
||||||
|
|
||||||
|
*.md @jia200x
|
||||||
|
|
||||||
|
/.murdock @kaspar030
|
||||||
|
|
||||||
|
/boards/common/atxmega/ @nandojve
|
||||||
|
/boards/common/esp*/ @gschorcht
|
||||||
|
/boards/common/nrf*/ @aabadie @haukepetersen
|
||||||
|
/boards/common/nucleo*/ @aabadie
|
||||||
|
/boards/common/silabs/ @basilfx
|
||||||
|
/boards/common/slwstk6000b/ @basilfx
|
||||||
|
/boards/common/stm32/ @aabadie @fjmolinas
|
||||||
|
/boards/e180-zg120b-tb/ @basilfx
|
||||||
|
/boards/esp*/ @gschorcht @yegorich
|
||||||
|
/boards/hamilton/ @Hyungsin
|
||||||
|
/boards/ikea-tradfri/ @basilfx
|
||||||
|
/boards/lobaro-lorabox/ @leandrolanzieri
|
||||||
|
/boards/nrf*/ @aabadie @haukepetersen
|
||||||
|
/boards/nucleo*/ @aabadie @fjmolinas
|
||||||
|
/boards/phynode-kw41z/ @jia200x
|
||||||
|
/boards/sam*-xpro/ @dylad
|
||||||
|
/boards/same54-xpro/ @benpicco
|
||||||
|
/boards/sensebox_samd21/ @leandrolanzieri @jia200x
|
||||||
|
/boards/slstk340*/ @basilfx
|
||||||
|
/boards/sltb001a/ @basilfx
|
||||||
|
/boards/slwstk6000b/ @basilfx
|
||||||
|
/boards/slwstk6220a/ @basilfx
|
||||||
|
/boards/sodaq-sara-aff/ @leandrolanzieri
|
||||||
|
/boards/stk3*00/ @basilfx
|
||||||
|
/boards/openmote*/ @MrKevinWeiss
|
||||||
|
/boards/cc1352p-launchpad @luisan00
|
||||||
|
/boards/atxmega*/ @nandojve
|
||||||
|
|
||||||
|
/core/ @kaspar030
|
||||||
|
|
||||||
|
/cpu/arm7_common/ @kaspar030 @maribu
|
||||||
|
/cpu/avr8_common/ @kYc0o @maribu @nandojve
|
||||||
|
/cpu/atmega*/ @kYc0o @maribu
|
||||||
|
/cpu/atxmega/ @nandojve
|
||||||
|
/cpu/cc2538/ @hexluthor @smlng @fjmolinas
|
||||||
|
/cpu/cc26x0/ @hexluthor @smlng
|
||||||
|
/cpu/cc26x2_cc13x2/ @hexluthor @smlng
|
||||||
|
/cpu/cc26xx_cc13xx/ @hexluthor @smlng
|
||||||
|
/cpu/cortexm_common/ @kaspar030 @bergzand
|
||||||
|
/cpu/efm32/ @basilfx
|
||||||
|
/cpu/esp*/ @gschorcht
|
||||||
|
/cpu/fe310/ @aabadie @kaspar030 @bergzand
|
||||||
|
/cpu/kinetis/ @fjmolinas
|
||||||
|
/cpu/lpc2387/ @benpicco @maribu
|
||||||
|
/cpu/mips*/ @kaspar030 @francois-berder
|
||||||
|
/cpu/msp430*/ @kaspar030 @gschorcht
|
||||||
|
/cpu/nrf*/ @aabadie @haukepetersen
|
||||||
|
/cpu/nrf52/radio/nrf802154/ @bergzand @SemjonKerner @jia200x
|
||||||
|
/cpu/sam0_common/ @benpicco @dylad @keestux
|
||||||
|
/cpu/samd21/ @dylad @biboc
|
||||||
|
/cpu/samd5x/ @benpicco @dylad
|
||||||
|
/cpu/saml1x/ @dylad
|
||||||
|
/cpu/saml21/ @dylad
|
||||||
|
/cpu/stm32*/ @aabadie @fjmolinas @DipSwitch @vincent-d
|
||||||
|
/cpu/stm32/periph/eth* @maribu
|
||||||
|
/cpu/stm32/periph/ptp.c @maribu
|
||||||
|
|
||||||
|
/doc/ @aabadie @jia200x
|
||||||
|
|
||||||
|
/dist/tools/sliptty/ @miri64
|
||||||
|
/dist/tools/dhcpv6-pd_ia/ @miri64
|
||||||
|
|
||||||
|
/drivers/ad7746/ @leandrolanzieri
|
||||||
|
/drivers/at24mac/ @benpicco
|
||||||
|
/drivers/at86rf215/ @benpicco
|
||||||
|
/drivers/at86rf2xx/ @daniel-k @Hyungsin @jia200x @smlng @miri64
|
||||||
|
/drivers/bh1900nux/ @wosym
|
||||||
|
/drivers/bq2429x/ @jeandudey
|
||||||
|
/drivers/cc110x/ @maribu
|
||||||
|
/drivers/cc1xxx_common/ @maribu
|
||||||
|
/drivers/ccs811/ @gschorcht
|
||||||
|
/drivers/enc28j60/ @haukepetersen
|
||||||
|
/drivers/dcf77/ @daexel
|
||||||
|
/drivers/dht/ @wosym
|
||||||
|
/drivers/dose/ @jue89
|
||||||
|
/drivers/ds18/ @leandrolanzieri
|
||||||
|
/drivers/itg320x/ @gschorcht
|
||||||
|
/drivers/mcp2515/ @wosym
|
||||||
|
/drivers/mrf24j40/ @bergzand
|
||||||
|
/drivers/pca9685/ @gschorcht
|
||||||
|
/drivers/sht3x/ @gschorcht
|
||||||
|
/drivers/si70xx/ @basilfx
|
||||||
|
/drivers/slipdev/ @miri64
|
||||||
|
/drivers/sx127x/ @aabadie @jia200x
|
||||||
|
/drivers/ws281x/ @maribu
|
||||||
|
/drivers/xbee/ @haukepetersen @miri64
|
||||||
|
/drivers/include/periph/ @MrKevinWeiss
|
||||||
|
/drivers/periph_common/ @MrKevinWeiss
|
||||||
|
/drivers/include/periph/ptp.h @maribu
|
||||||
|
|
||||||
|
/pkg/cryptoauthlib/ @Einhornhool @PeterKietzmann
|
||||||
|
/pkg/lua/ @jcarrano
|
||||||
|
/pkg/lwip/ @miri64
|
||||||
|
/pkg/gecko_sdk/ @basilfx
|
||||||
|
/pkg/lora-serialization/ @leandrolanzieri
|
||||||
|
/pkg/micropython/ @bergzand @kaspar030
|
||||||
|
/pkg/openthread/ @Hyungsin @jia200x
|
||||||
|
/pkg/semtech-loramac/ @aabadie @jia200x
|
||||||
|
/pkg/tinydtls/ @rfuentess @leandrolanzieri
|
||||||
|
/pkg/u8g2/ @basilfx
|
||||||
|
/pkg/ucglib/ @basilfx
|
||||||
|
/pkg/wakaama/ @leandrolanzieri
|
||||||
|
|
||||||
|
/sys/clif/ @leandrolanzieri
|
||||||
|
/sys/event/ @kaspar030
|
||||||
|
/sys/evtimer/ @kaspar030
|
||||||
|
/sys/fmt/ @kaspar030
|
||||||
|
/sys/net/application_layer/gcoap/ @haukepetersen @kb2ma @chrysn
|
||||||
|
/sys/net/application_layer/nanocoap/ @kaspar030 @haukepetersen @kb2ma @chrysn
|
||||||
|
/sys/include/net/sock* @maribu
|
||||||
|
/sys/net/netif/ @miri64 @jia200x
|
||||||
|
/sys/net/gnrc/network_layer/ @miri64
|
||||||
|
/sys/net/gnrc/transport_layer/tcp/ @brummer-simon @miri64
|
||||||
|
/sys/net/gnrc/transport_layer/udp/ @miri64
|
||||||
|
/sys/net/gnrc/link_layer/lorawan/ @jia200x
|
||||||
|
/sys/net/gnrc/netif/ @miri64 @jia200x
|
||||||
|
/sys/net/gnrc/routing/rpl/ @cgundogan @emmanuelsearch
|
||||||
|
/sys/net/ @miri64 @haukepetersen @PeterKietzmann @cgundogan
|
||||||
|
/sys/pm_layered/ @kaspar030
|
||||||
|
/sys/random/fortuna/ @basilfx
|
||||||
|
/sys/riotboot/ @kaspar030 @fjmolinas
|
||||||
|
/sys/suit @kaspar030 @fjmolinas @bergzand
|
||||||
|
/sys/tsrb/ @kaspar030
|
||||||
|
/sys/usb/ @bergzand @dylad @aabadie
|
||||||
|
/sys/xtimer/ @kaspar030 @MichelRottleuthner
|
||||||
|
|
||||||
|
/sys/include/ztimer.h @kaspar030 @bergzand
|
||||||
|
/sys/include/ztimer/ @kaspar030 @bergzand
|
||||||
|
/sys/ztimer/ @kaspar030 @bergzand
|
||||||
|
|
||||||
|
/tests/ @smlng @leandrolanzieri @aabadie @MichelRottleuthner @fjmolinas
|
||||||
|
/tests/candev/ @wosym
|
||||||
|
/tests/driver_bq2429x/ @jeandudey
|
||||||
|
/tests/driver_dht/ @wosym
|
||||||
|
/tests/gnrc* @miri64
|
||||||
|
/tests/lwip* @miri64
|
||||||
|
/tests/slip/ @miri64
|
||||||
|
/tests/unittests @miri64
|
||||||
|
/tests/*/tests/*.py @miri64
|
||||||
|
/tests/cpu_efm32_features/ @basilfx
|
||||||
|
|
||||||
|
# KConfig maintainers will be notified about all KConfig changes
|
||||||
|
Kconfig @leandrolanzieri @jia200x @cgundogan
|
||||||
|
pm.c @kaspar030
|
@ -2,11 +2,20 @@
|
|||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
* Code shall be [C99](http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf)
|
* Code shall be [C11](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf)
|
||||||
compliant.
|
compliant.
|
||||||
* Avoid dynamic memory allocation (malloc/free, new, etc.)! It will break
|
* Avoid dynamic memory allocation (malloc/free, new, etc.)! It will break
|
||||||
real-time guarantees, increase code complexity, and make it more likely to use
|
real-time guarantees, increase code complexity, and make it more likely to use
|
||||||
more memory than available.
|
more memory than available.
|
||||||
|
* Avoid the use of floating point arithmetic. Not every MCU has a FPU and software
|
||||||
|
floating point libraries cause unnecessary overhead.
|
||||||
|
Instead use fixed-point integers and transform equations so that they stay within
|
||||||
|
the range of integer math.
|
||||||
|
An easy way to ensure this is by multiplying by a constant factor, ideally a power
|
||||||
|
of two - this is a simple shift operation.
|
||||||
|
Take care that intermediate values do not exceed the range of the data type you are using.
|
||||||
|
When writing drivers, do not convert the measurement data into float, but instead
|
||||||
|
choose an appropriate integer format / SI prefix.
|
||||||
* Please obey the Linux coding style as described in
|
* Please obey the Linux coding style as described in
|
||||||
https://www.kernel.org/doc/Documentation/process/coding-style.rst with the
|
https://www.kernel.org/doc/Documentation/process/coding-style.rst with the
|
||||||
following modifications and additions:
|
following modifications and additions:
|
||||||
@ -49,7 +58,7 @@
|
|||||||
uint8_t b;
|
uint8_t b;
|
||||||
} foobar_t;
|
} foobar_t;
|
||||||
```
|
```
|
||||||
* Use of a seperate line typedef for structs is allowed for forward
|
* Use of a separate line typedef for structs is allowed for forward
|
||||||
declarations, e.g.,
|
declarations, e.g.,
|
||||||
```
|
```
|
||||||
typedef struct mystruct mystruct_t;
|
typedef struct mystruct mystruct_t;
|
||||||
@ -88,7 +97,7 @@
|
|||||||
|
|
||||||
## Return values
|
## Return values
|
||||||
|
|
||||||
* Any function must return one of the following values:
|
* Every function must return one of the following values or none (void):
|
||||||
* logical value (zero or not zero)
|
* logical value (zero or not zero)
|
||||||
* an error code (given as a negative number or zero) or a positive status
|
* an error code (given as a negative number or zero) or a positive status
|
||||||
value
|
value
|
||||||
|
@ -158,15 +158,6 @@ void my_class::do_something_else() {
|
|||||||
- Keywords are always followed by a whitespace: `if (...)`, `template <...>`,
|
- Keywords are always followed by a whitespace: `if (...)`, `template <...>`,
|
||||||
`while (...)`, etc.
|
`while (...)`, etc.
|
||||||
|
|
||||||
- Leave a whitespace after `!` to make negations easily recognizable:
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
if (! sunny())
|
|
||||||
stay_home();
|
|
||||||
else
|
|
||||||
go_outside();
|
|
||||||
```
|
|
||||||
|
|
||||||
- Opening braces belong to the same line:
|
- Opening braces belong to the same line:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
464
CONTRIBUTING.md
464
CONTRIBUTING.md
@ -4,78 +4,153 @@ Thank you for your interest in contributing to RIOT! There are many ways to
|
|||||||
contribute, and we appreciate all of them. You can jump to the major sections
|
contribute, and we appreciate all of them. You can jump to the major sections
|
||||||
of this document using the following links:
|
of this document using the following links:
|
||||||
|
|
||||||
* [Feature Requests][feature-requests]
|
* [Getting Started][getting-started]
|
||||||
* [Bug Reports][bug-reports]
|
* [Bug Reports and Feature Requests][issues]
|
||||||
* [Pull Requests][pull-requests]
|
* [Contributing code][contributing-code]
|
||||||
* [Writing Documentation][writing-documentation]
|
* [Writing Documentation][writing-documentation]
|
||||||
|
* [Working with Git][working with git]
|
||||||
|
|
||||||
If you have questions, please send an email to users@riot-os.org or
|
If you have questions, please write a post over at our [forum] or chat on
|
||||||
devel@riot-os.org mailing list or chat on [#riot-os][riot-chat].
|
`#riot-os:matrix.org` on [Matrix].
|
||||||
|
|
||||||
As a reminder, all contributors are expected to follow our
|
As a reminder, all contributors are expected to follow our
|
||||||
[Code of Conduct](CODE_OF_CONDUCT.md).
|
[Code of Conduct](CODE_OF_CONDUCT.md).
|
||||||
|
|
||||||
[riot-chat]: http://webchat.freenode.net?channels=riot-os
|
[forum]: https://forum.riot-os.org
|
||||||
|
[Matrix]: https://matrix.to/#/#riot-os:matrix.org
|
||||||
|
|
||||||
## Feature Requests
|
## Getting Started
|
||||||
[feature-requests]: #feature-requests
|
[getting-started]: #getting-started
|
||||||
|
If you are just beginning to work with RIOT you might first want to read our
|
||||||
|
[documentation]. Especially the following sections might be of interest to you
|
||||||
|
|
||||||
Before opening a new feature request, check the
|
- [Getting Started](https://doc.riot-os.org/getting-started.html)
|
||||||
[existing feature requests][existing-feature-request] if there's one already
|
- [Creating modules](https://doc.riot-os.org/creating-modules.html)
|
||||||
open on the same topic.
|
- [Creating an application](https://doc.riot-os.org/creating-an-application.html)
|
||||||
|
|
||||||
To request new features or enhancements, just open a new
|
[documentation]: https://doc.riot-os.org
|
||||||
[feature request issue][new-feature-request]. Describe your use case, why you
|
|
||||||
need this feature and why this feature is important for RIOT.
|
|
||||||
|
|
||||||
[existing-feature-request]: https://github.com/RIOT-OS/RIOT/issues?q=state:open+type:issue+label:"Type:+new+feature"
|
## Bug reports and feature requests
|
||||||
[new-feature-request]: https://github.com/RIOT-OS/RIOT/issues/new?template=feature_request.md&title=Feature+Request:
|
[issues]: #bug-reports-and-feature-requests
|
||||||
|
Both bug reports and feature request, big or small, are welcome.
|
||||||
|
|
||||||
## Bug Reports
|
Before submitting a feature request, please check if an [open issue][existing-feature-request]
|
||||||
[bug-reports]: #bug-reports
|
already exists. If this is not the case, [submit a feature request][feature-request].
|
||||||
|
Describe your use case, why you need this feature and why this feature is important for RIOT.
|
||||||
|
|
||||||
While bugs are unfortunate, they're a reality in software. We can't fix what we
|
Before filing a bug report, please check if an [open issue][existing-bug]
|
||||||
don't know about, so please report liberally. If you're not sure if something
|
already exists. If this is not the case, [submit a new bug report][bug-report].
|
||||||
is a bug or not, feel free to file a bug report anyway.
|
If you're not sure if something is a bug or not, feel free to file a bug report anyway.
|
||||||
|
|
||||||
**If you believe reporting your bug publicly represents a security risk to
|
**If you believe reporting your bug publicly represents a security risk to
|
||||||
RIOT users, please send an email describing the bug to security@riot-os.org**.
|
RIOT users, please send an email describing the bug to <security@riot-os.org>**.
|
||||||
We would appreciate waiting for a 6 months grace period before reporting it on
|
We would appreciate waiting for a 6 months grace period before reporting it on
|
||||||
public channels, to allow us adequate time to release the fix.
|
public channels, to allow us adequate time to release the fix.
|
||||||
|
|
||||||
Before reporting a bug, have a look at [open bugs][existing-bugs-link]. Maybe
|
[bug reports]: https://github.com/RIOT-OS/RIOT/issues/new?template=bug_report.md
|
||||||
someone has already reported your error.
|
[feature requests]: https://github.com/RIOT-OS/RIOT/issues/new?template=feature_request.md
|
||||||
|
|
||||||
Once you have verified that the bug you have found hasn't been reported, opening an issue is as easy as
|
[existing-feature-request]: https://github.com/RIOT-OS/RIOT/issues?q=state:open+type:issue+label:"Type:+new+feature"
|
||||||
clicking on [this link][bug-report-link] and filling out the fields.
|
[feature-request]: https://github.com/RIOT-OS/RIOT/issues/new?template=feature_request.md&title=Feature+Request:
|
||||||
|
[existing-bug]: https://github.com/RIOT-OS/RIOT/issues?q=state:open+type:issue+label:"Type:+bug"
|
||||||
|
[bug-report]: https://github.com/RIOT-OS/RIOT/issues/new?template=bug_report.md&title=Bug:
|
||||||
|
|
||||||
[existing-bugs-link]: https://github.com/RIOT-OS/RIOT/issues?q=state:open+type:issue+label:"Type:+bug"
|
## Contributing code
|
||||||
[bug-report-link]: https://github.com/RIOT-OS/RIOT/issues/new?template=bug_report.md&title=Bug:
|
[contributing-code]: #contributing-code
|
||||||
|
If you think your work should be integrated in the main RIOT repository, take
|
||||||
|
the following steps:
|
||||||
|
|
||||||
Each bug report issue uses a template with 5 sections that are there to help
|
1. Fork the RIOT git repository (if you haven't done this already).
|
||||||
other contributors understand your issue and eventually reproduce it:
|
1. Create a branch for your contribution.
|
||||||
|
1. Make sure your code is in compliance with RIOTs [coding conventions].
|
||||||
|
1. Make commits. Make sure to follow RIOTs [commit conventions].
|
||||||
|
1. Push this branch to your fork on GitHub.
|
||||||
|
1. Open a [pull request][open-a-pull-request]. See [pull requests].
|
||||||
|
1. RIOT maintainers will set [labels] and provide feedback.
|
||||||
|
1. Address this feedback. See [working with git].
|
||||||
|
1. Your code is merged in RIOT master branch when it passes review.
|
||||||
|
|
||||||
#### Description
|
Be sure to read the [general tips] below.
|
||||||
|
|
||||||
#### Steps to reproduce the issue
|
[open-an-issue]: https://github.com/RIOT-OS/RIOT/issues?q=state:open+type:issue+label:"Type:+bug"
|
||||||
|
[labels]: https://github.com/RIOT-OS/RIOT/wiki/RIOT%27s-labeling-system
|
||||||
|
[open-a-pull-request]: https://help.github.com/articles/using-pull-requests
|
||||||
|
|
||||||
#### Expected results
|
### General Tips
|
||||||
|
[general tips]: #general-tips
|
||||||
|
From experience, the following recommendations help to get a software
|
||||||
|
contribution into RIOT master faster:
|
||||||
|
|
||||||
#### Actual results
|
- **Ask around for help!** Either offline or through one of our communication
|
||||||
|
channels (see above). The earlier you check your feature design with other
|
||||||
|
people, the less likely it is that it is denied during the review process.
|
||||||
|
- **Verify your concept early!** If you work on your own until the code
|
||||||
|
*looks* good enough to show publicly, you might miss some design flaws others
|
||||||
|
might have spotted earlier.
|
||||||
|
- **Keep it simple!** Try to use what is already there and don't change existing
|
||||||
|
APIs if not absolutely necessary.
|
||||||
|
- **Keep it small!** A PR with >1000 lines of changes will very likely make
|
||||||
|
even the most active reviewer put your review on their long to-do list.
|
||||||
|
- **Keep it modular!** Make extensions to a feature or new features for a
|
||||||
|
platform optionally to use.
|
||||||
|
- **Provide tests!** They should be comprehensible and easy to be executed.
|
||||||
|
Alternatively comprehensive testing procedures should be provided with your
|
||||||
|
pull request.
|
||||||
|
|
||||||
#### Versions
|
### Coding conventions
|
||||||
|
[coding conventions]: #coding-conventions
|
||||||
|
|
||||||
To fill the `Versions` section, you can use the script provided in the RIOT git
|
RIOT has extensive [coding conventions][coding-conventions].
|
||||||
repository:
|
It is possible to check if your code follows these conventions:
|
||||||
```
|
|
||||||
make print-versions
|
|
||||||
```
|
|
||||||
|
|
||||||
In summary, try to include as much information as possible to help maintainers
|
* You can [uncrustify] `.c` and `.h` files:
|
||||||
or other developers fix the bug quickly.
|
|
||||||
|
|
||||||
## Pull Requests
|
```console
|
||||||
[pull-requests]: #pull-requests
|
$ uncrustify -c $RIOTBASE/uncrustify-riot.cfg --no-backup <your file>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: The `--no-backup` flag makes uncrustify *replace* the current file
|
||||||
|
with a formatted version.
|
||||||
|
|
||||||
|
* RIOT provides static test tools to verify the quality of changes (cppcheck,
|
||||||
|
trailing whitespaces, documentation, etc). These tools are wrapped in a
|
||||||
|
single `make` target: `static-test`.
|
||||||
|
|
||||||
|
*Watch out:* the command below will rebase your branch on your master branch,
|
||||||
|
so make sure they can be rebased (e.g. there's no potential conflict).
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ make static-test
|
||||||
|
```
|
||||||
|
|
||||||
|
Use it before opening a PR to perform last time checks.
|
||||||
|
|
||||||
|
[coding-conventions]: CODING_CONVENTIONS.md
|
||||||
|
|
||||||
|
### Commit conventions
|
||||||
|
[commit conventions]: #commit-conventions
|
||||||
|
|
||||||
|
* Each commit should target changes of specific parts/modules of RIOT. The
|
||||||
|
commits use the following pattern:
|
||||||
|
|
||||||
|
```
|
||||||
|
area of code: description of changes
|
||||||
|
```
|
||||||
|
|
||||||
|
You can use multi-line commit messages if you want to detail more the
|
||||||
|
changes.
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
periph/timer: Document that set_absolute is expected to wrap
|
||||||
|
|
||||||
|
Most timers are implemented this way already, and keeping (documenting)
|
||||||
|
it that way allows the generic timer_set implementation to stay as
|
||||||
|
simple as it is.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pull Requests
|
||||||
|
[pull requests]: #pull-requests
|
||||||
|
|
||||||
GitHub's Pull Request (PR) feature is the primary mechanism used to make
|
GitHub's Pull Request (PR) feature is the primary mechanism used to make
|
||||||
contributions to the RIOT codebase. GitHub itself has some great documentation
|
contributions to the RIOT codebase. GitHub itself has some great documentation
|
||||||
@ -84,11 +159,6 @@ We use the [fork and pull model][development-models], where contributors push
|
|||||||
changes to their personal fork and create pull requests to bring those changes
|
changes to their personal fork and create pull requests to bring those changes
|
||||||
into the source repository.
|
into the source repository.
|
||||||
|
|
||||||
[about-pull-requests]: https://help.github.com/articles/about-pull-requests/
|
|
||||||
[development-models]: https://help.github.com/articles/creating-a-pull-request-from-a-fork
|
|
||||||
|
|
||||||
### General rules
|
|
||||||
|
|
||||||
* Before opening a new Pull Request, have a look at
|
* Before opening a new Pull Request, have a look at
|
||||||
[existing ones][existing-pull-requests]. Maybe someone has already opened one
|
[existing ones][existing-pull-requests]. Maybe someone has already opened one
|
||||||
about the same thing. If it's the case, you might be able to help with the
|
about the same thing. If it's the case, you might be able to help with the
|
||||||
@ -97,168 +167,44 @@ into the source repository.
|
|||||||
Old and stalled [PRs are sometimes archived][archived-pull-requests] with the
|
Old and stalled [PRs are sometimes archived][archived-pull-requests] with the
|
||||||
"State: archived" label, maybe one of them is also about the same topic.
|
"State: archived" label, maybe one of them is also about the same topic.
|
||||||
|
|
||||||
* Each Pull Request form uses a template with 3 sections that are there to help
|
* The Pull Request title should reflect what it is about and be in the same form
|
||||||
maintainers understand your contribution and help them in testing it:
|
as the [commit conventions].
|
||||||
|
|
||||||
#### Contribution description
|
|
||||||
|
|
||||||
#### Testing procedure
|
|
||||||
|
|
||||||
#### Issues/PRs references
|
|
||||||
|
|
||||||
|
* Each Pull Request form uses a template that is there to help
|
||||||
|
maintainers understand your contribution and help them in testing it.
|
||||||
Please fill each section with as much information as possible.
|
Please fill each section with as much information as possible.
|
||||||
|
|
||||||
* The Pull Request title should reflect what it is about and be in the form:
|
* We recommend that you leave the *'Allow edits from maintainers'* check box ticked.
|
||||||
|
This will allow maintainer finalizing your PR by pushing in your branch.
|
||||||
`area of change: description of changes`
|
In general, this speeds up the PR merge in the main repository.
|
||||||
|
Note that this is not an obligation.
|
||||||
|
|
||||||
* Remember that smaller PRs tend to be merged faster, so keep your changes as
|
* Remember that smaller PRs tend to be merged faster, so keep your changes as
|
||||||
concise as possible. They should be confined to a single explainable
|
concise as possible. They should be confined to a single explainable
|
||||||
change, and be runnable on their own. So don't hesitate to split your PRs
|
change, and be runnable on their own. So don't hesitate to split your PRs
|
||||||
into smaller ones when possible.
|
into smaller ones when possible.
|
||||||
|
|
||||||
* In the Pull Request form, we recommend that you leave the
|
|
||||||
"Allow edits from maintainers" check box ticked. This will allow maintainer
|
|
||||||
finalizing your PR by pushing in your branch. In general, this speeds up the
|
|
||||||
PR merge in the main repository. Note that this is not an obligation.
|
|
||||||
|
|
||||||
* Check if your code follows the [coding conventions][coding-conventions]. If
|
|
||||||
it doesn't, you can [uncrustify][uncrustify] a file:
|
|
||||||
|
|
||||||
$ uncrustify -c $RIOTBASE/uncrustify-riot.cfg <your file>
|
|
||||||
|
|
||||||
* RIOT provides static test tools to verify the quality of changes (cppcheck,
|
|
||||||
trailing whitespaces, documentation, etc). These tools are wrapped in a
|
|
||||||
single `make` target: `static-test`.
|
|
||||||
|
|
||||||
*Watch out:* the command below will rebase your branch on your master branch,
|
|
||||||
so make sure they can be rebased (e.g. there's no potential conflict).
|
|
||||||
|
|
||||||
$ make static-test
|
|
||||||
|
|
||||||
Use it before opening a PR to perform last time checks.
|
|
||||||
|
|
||||||
* Each commit should target changes of specific parts/modules of RIOT. The
|
|
||||||
commits use the following pattern:
|
|
||||||
|
|
||||||
`area of code: description of changes`.
|
|
||||||
|
|
||||||
You can use multi-line commit messages if you want to detail more the
|
|
||||||
changes.
|
|
||||||
|
|
||||||
* Try to answer reviews as quickly as possible to speed up the review process
|
|
||||||
and avoid stalled PRs.
|
|
||||||
|
|
||||||
* Maintainers try their best to review every PR as fast as possible, but they
|
* Maintainers try their best to review every PR as fast as possible, but they
|
||||||
are also only human and it can happen that they miss a few PRs or might be
|
are also only human and it can happen that they miss a few PRs or might be
|
||||||
preoccupied with other PRs. If it happens that your PR receives no review for
|
preoccupied with other PRs. If it happens that your PR receives no review for
|
||||||
a long time, don't hesitate to gently solicit a review by commenting or
|
a long time, don't hesitate to gently solicit a review by commenting or
|
||||||
by explicitly mentioning a maintainer that you know is knowledgeable in the
|
by explicitly mentioning a maintainer that you know is knowledgeable in the
|
||||||
area of the PR. You can also advertise the PR on devel@riot-os.org mailing
|
area of the PR. You can also advertise the PR on the [forum] and ask for a
|
||||||
list and ask for a review there.
|
review there.
|
||||||
|
|
||||||
|
* Try to answer reviews as quickly as possible to speed up the review process
|
||||||
|
and avoid stalled PRs.
|
||||||
|
|
||||||
You can find more information about RIOT development procedure on this
|
You can find more information about RIOT development procedure on this
|
||||||
[wiki page][development-procedures].
|
[wiki page][development-procedures].
|
||||||
|
|
||||||
|
[about-pull-requests]: https://help.github.com/articles/about-pull-requests/
|
||||||
|
[development-models]: https://help.github.com/articles/creating-a-pull-request-from-a-fork
|
||||||
[existing-pull-requests]: https://github.com/RIOT-OS/RIOT/pulls
|
[existing-pull-requests]: https://github.com/RIOT-OS/RIOT/pulls
|
||||||
[archived-pull-requests]: https://github.com/RIOT-OS/RIOT/pulls?q=is:pr+label:"State:+archived"
|
[archived-pull-requests]: https://github.com/RIOT-OS/RIOT/pulls?q=is:pr+label:"State:+archived"
|
||||||
[coding-conventions]: CODING_CONVENTIONS.md
|
|
||||||
[uncrustify]: http://uncrustify.sourceforge.net
|
[uncrustify]: http://uncrustify.sourceforge.net
|
||||||
[development-procedures]: https://github.com/RIOT-OS/RIOT/wiki/Development-procedures
|
[development-procedures]: https://github.com/RIOT-OS/RIOT/wiki/Development-procedures
|
||||||
|
|
||||||
### Git usage
|
|
||||||
|
|
||||||
Using git is a bit difficult for newcomers. If you are completely new to git,
|
|
||||||
we recommend that you [start by learning it][try-github-io] a bit. You can also
|
|
||||||
read the official [getting started documentation][git-scm-getting-started].
|
|
||||||
|
|
||||||
In this section, we give the bare minimum for a better experience with our
|
|
||||||
development workflow on GitHub.
|
|
||||||
|
|
||||||
[try-github-io]: https://try.github.io/
|
|
||||||
[git-scm-getting-started]: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
|
|
||||||
|
|
||||||
#### Setup your local RIOT repository
|
|
||||||
|
|
||||||
Before you start modifying code, you need to fork the RIOT upstream repository
|
|
||||||
from the [RIOT main GitHub page][riot-github].
|
|
||||||
|
|
||||||
If it's your first time with git, configure your name and emails:
|
|
||||||
|
|
||||||
$ git config --global user.name = "<your name here>"
|
|
||||||
$ git config --global user.email = "<your email address here>"
|
|
||||||
|
|
||||||
Then clone locally your fork of RIOT (replace `account name` with your actual
|
|
||||||
login on GitHub):
|
|
||||||
|
|
||||||
$ git clone git@github.com:<account name>/RIOT.git
|
|
||||||
|
|
||||||
You can keep any branch of your local repository up-to-date with the upstream
|
|
||||||
master branch with the following commands:
|
|
||||||
|
|
||||||
$ git checkout <branch name>
|
|
||||||
$ git pull --rebase https://github.com/RIOT-OS/RIOT.git
|
|
||||||
|
|
||||||
Use it before opening a PR. This will at least ensure the PR is mergeable but
|
|
||||||
also that it is up-to-date with the upstream repository.
|
|
||||||
|
|
||||||
[riot-github]: https://github.com/RIOT-OS/RIOT
|
|
||||||
|
|
||||||
#### Work on branches
|
|
||||||
|
|
||||||
Avoid opening PR from the `master` branch of your fork to the master branch of
|
|
||||||
the RIOT upstream repository: update your master branch and start a new branch
|
|
||||||
from it.
|
|
||||||
|
|
||||||
$ git checkout master
|
|
||||||
$ git pull --rebase https://github.com/RIOT-OS/RIOT.git
|
|
||||||
$ git checkout -b <new branch>
|
|
||||||
# Do your changes, commit, update with latest upstream master
|
|
||||||
$ git push
|
|
||||||
|
|
||||||
#### Add fixup commits during review
|
|
||||||
|
|
||||||
To keep the history of changes easier to track for reviewers, it is recommended
|
|
||||||
to push your review request updates in fixup commits.
|
|
||||||
|
|
||||||
Let's say your PR contains 3 commits with comments: `prefix1: change 1`,
|
|
||||||
`prefix2: change 2` and `prefix3: change 3`.
|
|
||||||
|
|
||||||
Instead of committing changes in `prefix2` in a 4th commit `prefix2: change 4`,
|
|
||||||
you can use the `--fixup` option:
|
|
||||||
|
|
||||||
$ git add /path/of/prefix2
|
|
||||||
$ git commit --fixup <prefix2 commit hash>
|
|
||||||
|
|
||||||
#### Squash commits after review
|
|
||||||
|
|
||||||
Squashing a commit is done using the rebase subcommand of git in interactive
|
|
||||||
mode:
|
|
||||||
|
|
||||||
$ git rebase master -i
|
|
||||||
|
|
||||||
You can find information on rebasing in
|
|
||||||
[GitHub rebase documentation][about-git-rebase].
|
|
||||||
|
|
||||||
[about-git-rebase]: https://help.github.com/articles/about-git-rebase/
|
|
||||||
|
|
||||||
If you used [fixup commits](#add-fixup-commits-during-review) during the review
|
|
||||||
phase, squashing commits can be performed in a single command:
|
|
||||||
|
|
||||||
$ git rebase -i --autosquash
|
|
||||||
|
|
||||||
**Watch out: Don't squash your commit until a maintainer asks you to do it.**
|
|
||||||
|
|
||||||
Otherwise the history of review changes is lost and for large PRs, it
|
|
||||||
makes it difficult for the reviewer to follow them. It might also happen that
|
|
||||||
you introduce regression and won't be able to recover them from previous
|
|
||||||
commits.
|
|
||||||
|
|
||||||
Once squashing is done, you will have to force push your branch to update the
|
|
||||||
PR:
|
|
||||||
|
|
||||||
$ git push --force-with-lease
|
|
||||||
|
|
||||||
## Writing Documentation
|
## Writing Documentation
|
||||||
[writing-documentation]: #writing-documentation
|
[writing-documentation]: #writing-documentation
|
||||||
|
|
||||||
@ -271,12 +217,146 @@ the modules, cpus, boards and packages documentation.
|
|||||||
General documentation pages are written in Markdown and located in
|
General documentation pages are written in Markdown and located in
|
||||||
`doc/doxygen/src`.
|
`doc/doxygen/src`.
|
||||||
|
|
||||||
To generate the documentation, simply run:
|
To generate the documentation, simply run the following
|
||||||
|
|
||||||
$ make doc
|
|
||||||
|
|
||||||
from the base directory of the RIOT source code.
|
from the base directory of the RIOT source code.
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ make doc
|
||||||
|
```
|
||||||
|
|
||||||
The generated documentation is located in `doc/doxygen/html`
|
The generated documentation is located in `doc/doxygen/html`
|
||||||
|
|
||||||
[doxygen]: http://www.doxygen.nl/
|
[doxygen]: http://www.doxygen.nl/
|
||||||
|
|
||||||
|
## Working with Git
|
||||||
|
[working with git]: #working-with-git
|
||||||
|
Using git is a bit difficult for newcomers. If you are completely new to git,
|
||||||
|
we recommend that you [start by learning it][try-github-io] a bit. You can also
|
||||||
|
read the official [getting started documentation][git-scm-getting-started].
|
||||||
|
|
||||||
|
In this section, we give the bare minimum for a better experience with our
|
||||||
|
development workflow on GitHub.
|
||||||
|
|
||||||
|
[try-github-io]: https://try.github.io/
|
||||||
|
[git-scm-getting-started]: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
|
||||||
|
|
||||||
|
### Setup your local RIOT repository
|
||||||
|
|
||||||
|
Before you start modifying code, you need to fork the RIOT upstream repository
|
||||||
|
from the [RIOT main GitHub page][riot-github].
|
||||||
|
|
||||||
|
If it's your first time with git, configure your name and emails:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git config --global user.name = "<your name here>"
|
||||||
|
$ git config --global user.email = "<your email address here>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then clone locally your fork of RIOT (replace `account name` with your actual
|
||||||
|
login on GitHub):
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git clone git@github.com:<account name>/RIOT.git
|
||||||
|
```
|
||||||
|
|
||||||
|
You can keep any branch of your local repository up-to-date with the upstream
|
||||||
|
master branch with the following commands:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git checkout <branch name>
|
||||||
|
$ git pull --rebase https://github.com/RIOT-OS/RIOT.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Use it before opening a PR. This will at least ensure the PR is mergeable but
|
||||||
|
also that it is up-to-date with the upstream repository.
|
||||||
|
|
||||||
|
[riot-github]: https://github.com/RIOT-OS/RIOT
|
||||||
|
|
||||||
|
### Work on branches
|
||||||
|
|
||||||
|
Avoid opening PR from the `master` branch of your fork to the master branch of
|
||||||
|
the RIOT upstream repository: update your master branch and start a new branch
|
||||||
|
from it.
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git checkout master
|
||||||
|
$ git pull --rebase https://github.com/RIOT-OS/RIOT.git
|
||||||
|
$ git checkout -b <new branch>
|
||||||
|
```
|
||||||
|
|
||||||
|
Do your changes, commit, update with latest upstream master
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git push
|
||||||
|
```
|
||||||
|
|
||||||
|
### Add fixup commits during review
|
||||||
|
|
||||||
|
To keep the history of changes easier to track for reviewers, it is recommended
|
||||||
|
to push your review request updates in fixup commits.
|
||||||
|
|
||||||
|
Let's say your PR contains 3 commits with comments: `prefix1: change 1`,
|
||||||
|
`prefix2: change 2` and `prefix3: change 3`.
|
||||||
|
|
||||||
|
Instead of committing changes in `prefix2` in a 4th commit `prefix2: change 4`,
|
||||||
|
you can use the `--fixup` option:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git add /path/of/prefix2
|
||||||
|
$ git commit --fixup <prefix2 commit hash>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Squash commits after review
|
||||||
|
|
||||||
|
Squashing a commit is done using the rebase subcommand of git in interactive
|
||||||
|
mode:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git rebase master -i
|
||||||
|
```
|
||||||
|
|
||||||
|
You can find information on rebasing in
|
||||||
|
[GitHub rebase documentation][about-git-rebase].
|
||||||
|
|
||||||
|
[about-git-rebase]: https://help.github.com/articles/about-git-rebase/
|
||||||
|
|
||||||
|
If you used [fixup commits](#add-fixup-commits-during-review) during the review
|
||||||
|
phase, squashing commits can be performed in a single command:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git rebase -i --autosquash
|
||||||
|
```
|
||||||
|
|
||||||
|
**Watch out: Don't squash your commit until a maintainer asks you to do it.**
|
||||||
|
|
||||||
|
Otherwise the history of review changes is lost and for large PRs, it
|
||||||
|
makes it difficult for the reviewer to follow them. It might also happen that
|
||||||
|
you introduce regression and won't be able to recover them from previous
|
||||||
|
commits.
|
||||||
|
|
||||||
|
If you encounter a merge conflict you could either resolve it by hand with an
|
||||||
|
editor and use
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git add -p
|
||||||
|
```
|
||||||
|
|
||||||
|
To add your changes or use a merge tool like [meld](https://meldmerge.org/) to
|
||||||
|
resolve your merge conflict.
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git mergetool
|
||||||
|
```
|
||||||
|
|
||||||
|
After the merge conflict is resolved you can continue to rebase by using
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git rebase --continue
|
||||||
|
```
|
||||||
|
|
||||||
|
Once squashing is done, you will have to force push your branch to update the
|
||||||
|
PR:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git push --force-with-lease
|
||||||
|
```
|
||||||
|
63
Kconfig
Normal file
63
Kconfig
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Copyright (c) 2019 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
#
|
||||||
|
mainmenu "RIOT Configuration"
|
||||||
|
|
||||||
|
# Load macro definitions
|
||||||
|
rsource "kconfigs/Kconfig.consts"
|
||||||
|
|
||||||
|
# Load feature declarations
|
||||||
|
rsource "kconfigs/Kconfig.features"
|
||||||
|
|
||||||
|
# Load error symbols
|
||||||
|
rsource "kconfigs/Kconfig.errors"
|
||||||
|
|
||||||
|
# For now, get used modules as macros from this file (see kconfig.mk)
|
||||||
|
osource "$(KCONFIG_GENERATED_DEPENDENCIES)"
|
||||||
|
|
||||||
|
# Load first board configurations, which might override CPU's
|
||||||
|
orsource "$(BOARDDIR)/Kconfig"
|
||||||
|
orsource "$(RIOTCPU)/$(CPU)/Kconfig"
|
||||||
|
|
||||||
|
rsource "$(RIOTBOARD)/Kconfig"
|
||||||
|
rsource "$(RIOTCPU)/Kconfig"
|
||||||
|
|
||||||
|
# The application may declare new symbols as well
|
||||||
|
osource "$(APPDIR)/Kconfig"
|
||||||
|
|
||||||
|
rsource "core/Kconfig"
|
||||||
|
rsource "drivers/Kconfig"
|
||||||
|
rsource "sys/Kconfig"
|
||||||
|
rsource "pkg/Kconfig"
|
||||||
|
|
||||||
|
menu "External Modules"
|
||||||
|
osource "$(KCONFIG_EXTERNAL_MODULE_CONFIGS)"
|
||||||
|
endmenu # External Modules
|
||||||
|
|
||||||
|
menu "External Packages"
|
||||||
|
osource "$(KCONFIG_EXTERNAL_PKG_CONFIGS)"
|
||||||
|
endmenu # External Packages
|
||||||
|
|
||||||
|
comment "RIOT is in a migration phase."
|
||||||
|
comment "Some configuration options may not be here. Use CFLAGS instead."
|
||||||
|
|
||||||
|
comment "!! ERROR: There are conflicting modules active !!"
|
||||||
|
depends on ERROR_MODULES_CONFLICT != ""
|
||||||
|
|
||||||
|
config TEST_KCONFIG
|
||||||
|
bool
|
||||||
|
default y if '$(TEST_KCONFIG)' = '1'
|
||||||
|
help
|
||||||
|
This is used during the Kconfig migration to test the module dependency
|
||||||
|
modelling. Don't change the default value unless you know what you are
|
||||||
|
doing.
|
||||||
|
|
||||||
|
config DEVELHELP
|
||||||
|
bool "Development Help"
|
||||||
|
help
|
||||||
|
Set to enable code in RIOT that does safety checking which might not be
|
||||||
|
needed in a production environment but helps in the development
|
||||||
|
process.
|
173
LOSTANDFOUND.md
173
LOSTANDFOUND.md
@ -31,6 +31,8 @@ Reason for removal:
|
|||||||
- feature was never used and there is no reason for keeping it
|
- feature was never used and there is no reason for keeping it
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Additionally, a link reference for the commit on GitHub is added to the bottom of this document.
|
||||||
|
|
||||||
By putting the name of the removed feature and the commit hash in the same line,
|
By putting the name of the removed feature and the commit hash in the same line,
|
||||||
one can very quickly find the commit using `git grep`.
|
one can very quickly find the commit using `git grep`.
|
||||||
|
|
||||||
@ -40,6 +42,69 @@ This way, their names are never removed from the RIOT repository.
|
|||||||
|
|
||||||
# Removed Features
|
# Removed Features
|
||||||
|
|
||||||
|
### pkg/libcoap [d83d08f0995a88f399e70a7d07b44dd780082436]
|
||||||
|
|
||||||
|
Author:
|
||||||
|
- Martine Lenders <mlenders@inf.fu-berlin.de>
|
||||||
|
|
||||||
|
Reasons for removal:
|
||||||
|
- Not maintained anymore, no updates for 8 years
|
||||||
|
- Upstream libcoap allows building with RIOT, so there is a migration path for users
|
||||||
|
|
||||||
|
### sys/net/gnrc/nettest [cdc252ab7bd4161cc046bf93a3e55995704b24d4]
|
||||||
|
Author:
|
||||||
|
- Martine Lenders <mlenders@inf.fu-berlin.de>
|
||||||
|
|
||||||
|
Reasons for removal:
|
||||||
|
- Not maintained anymore
|
||||||
|
- Not used in GNRC
|
||||||
|
|
||||||
|
### boards/chronos [ed3887ac5c1e95308c2827bce3cdca8b0f146c22]
|
||||||
|
Author(s):
|
||||||
|
- Oliver Hahm <oliver.hahm@inria.fr>
|
||||||
|
- Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- board is quite outdated
|
||||||
|
- board cannot be automatically tested for lack of UART
|
||||||
|
- board has many special cases, which hurt upgrade to msp430-elf-gcc 9.x
|
||||||
|
- the onboard radio has been unsupported for a while
|
||||||
|
- no one seems to use the board, no one seems to maintain it
|
||||||
|
|
||||||
|
### sys/net/gnrc/application_layer/tftp [0e2a62078850e1ecc74db2db4d639cf2d8fb96d3]
|
||||||
|
Author:
|
||||||
|
- DipSwitch <dipswitch@ownage4u.nl>
|
||||||
|
|
||||||
|
Reasons for removal:
|
||||||
|
- Not maintained anymore.
|
||||||
|
- Existing quality and security defects.
|
||||||
|
|
||||||
|
### pkg/oonf_api [c829f820ee870bffc60c7df688d2da8373553212]
|
||||||
|
Author:
|
||||||
|
- Benjamin Valentin <benpicco@googlemail.com>
|
||||||
|
|
||||||
|
Reasons for removal:
|
||||||
|
- Package has not been update since 2013.
|
||||||
|
- Tests were never integrated to the CI.
|
||||||
|
- NHDP, which was the only upstream user, has been removed.
|
||||||
|
|
||||||
|
### sys/net/routing/nhdp [9026823bb906f64168d7d38e52be92f390353dc8]
|
||||||
|
Author:
|
||||||
|
- Fabian Nack <nack@inf.fu-berlin.de>
|
||||||
|
|
||||||
|
Reasons for removal:
|
||||||
|
- Not maintained anymore.
|
||||||
|
- Does not comply with the current RIOT programming practices.
|
||||||
|
|
||||||
|
### sys/ubjson [bea30c3f8949ebd9fdf4a9bf0a987652889930f5]
|
||||||
|
Author(s):
|
||||||
|
- René Kijewski <rene.kijewski@fu-berlin.de>
|
||||||
|
|
||||||
|
Reasons for removal:
|
||||||
|
- Unsafe code.
|
||||||
|
- Did not comply with RIOT standards.
|
||||||
|
- More standard alternatives available (such as CBOR).
|
||||||
|
|
||||||
### boards/jiminy-mega256rfr2 [232aed3e18118624b862d36bfec7cd1c21ca2d26]
|
### boards/jiminy-mega256rfr2 [232aed3e18118624b862d36bfec7cd1c21ca2d26]
|
||||||
Author:
|
Author:
|
||||||
- Josua Arndt <jarndt@ias.rwth-aachen.de>
|
- Josua Arndt <jarndt@ias.rwth-aachen.de>
|
||||||
@ -137,5 +202,109 @@ Author(s):
|
|||||||
Reason for removal:
|
Reason for removal:
|
||||||
- broke the abstraction of `gnrc_pktbuf`
|
- broke the abstraction of `gnrc_pktbuf`
|
||||||
- its only user within the RIOT code base `gnrc_ipv6_ext` was reworked in
|
- its only user within the RIOT code base `gnrc_ipv6_ext` was reworked in
|
||||||
f671a87fe2c539c3aecd595ae03fa4f6f209d042 so it is not needed anymore.
|
[f671a87fe2c539c3aecd595ae03fa4f6f209d042] so it is not needed anymore.
|
||||||
- the function was deprecated in f2760c033c5f332be076b25aa212aca4007c3d65
|
- the function was deprecated in [f2760c033c5f332be076b25aa212aca4007c3d65]
|
||||||
|
|
||||||
|
### boards/wsn430-v1_3b, boards/wsn430-v1_4 [e63cd54f3b1e002a7895bb7c46af889b341c1a15]
|
||||||
|
|
||||||
|
Author(s):
|
||||||
|
- Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||||
|
- Martine Lenders <m.lenders@fu-berlin.de>
|
||||||
|
- Milan Babel <babel@inf.fu-berlin.de>
|
||||||
|
- Oliver Hahm <oliver.hahm@inria.fr>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- no longer accessible on the IoT-LAB testbed
|
||||||
|
|
||||||
|
### pkg/emb6 [4f243c52eabefe709d78560ce7f1d502d737a999]
|
||||||
|
Author(s):
|
||||||
|
- Martine S. Lenders <m.lenders@fu-berlin.de>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- Stale upstream (last update to date in Mar 2018)
|
||||||
|
- Ported version even older (last update Feb 2016)
|
||||||
|
- Updating to more recent version would be more effort than its worth
|
||||||
|
|
||||||
|
### GNRC_NETTYPE_IOVEC [4f243c52eabefe709d78560ce7f1d502d737a999]
|
||||||
|
Author(s):
|
||||||
|
- Martine S. Lenders <m.lenders@fu-berlin.de>
|
||||||
|
- Hauke Petersen <devel@haukepetersen.de>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- Unused since [9fb2f541baca469e34fa01b004d6f19385700ce9]
|
||||||
|
|
||||||
|
### pkg/nordic_softdevice_ble [35b6ccedf31f10a5f8e4f97609ad5b10c28bdc34]
|
||||||
|
Author(s):
|
||||||
|
- Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||||
|
- Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
|
- Martine Lenders <m.lenders@fu-berlin.de>
|
||||||
|
- Wojciech Bober <wojciech.bober@nordicsemi.no>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- Outdated, unmaintained and no longer working
|
||||||
|
|
||||||
|
### gnrc_pktbuf_replace_snip() [72821a502f073006643cb4ef7815fc8c42563ce6]
|
||||||
|
Author(s):
|
||||||
|
- Joakim Nohlgård <joakim.nohlgard@eistec.se>
|
||||||
|
- Martine S. Lenders <m.lenders@fu-berlin.de>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- Unused, untested and no longer needed
|
||||||
|
|
||||||
|
### sys/irq_handler [a2dd6f90e51ca9edef643ba72bd1fd18113cf0d2]
|
||||||
|
Author(s):
|
||||||
|
- Gunar Schorcht <gunar@schorcht.net>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- Provides some feature as `sys/event_thread`
|
||||||
|
- Has been deprecated directly in the first release it was provided
|
||||||
|
|
||||||
|
### boards/slwstk6220a [cab1ea66b49e3c72e2827c8686c09d84ae3ef9a9]
|
||||||
|
Author(s):
|
||||||
|
- Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||||
|
- Bas Stottelaar <basstottelaar@gmail.com>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- The old implementation of the SLWSTK6220A based on `cpu/ezr32wg` did not use
|
||||||
|
the Gecko SDK, that other EFM32-based boards do use
|
||||||
|
- The old implementation had limited peripherals supported
|
||||||
|
- New implementation (with the same name) that is based on `cpu/efm32` was
|
||||||
|
added in commit [fe941ac9fe3f81c0f08ff3b8564cf439639abcda]
|
||||||
|
|
||||||
|
### boards/fox [81458c8eed8949c686d5ded652dbee10748e860b]
|
||||||
|
Author(s):
|
||||||
|
- Thomas Eichinger <thomas.eichinger@fu-berlin.de>
|
||||||
|
|
||||||
|
Reason for removal:
|
||||||
|
- Hardware not available so can't be tested
|
||||||
|
|
||||||
|
[d83d08f0995a88f399e70a7d07b44dd780082436]: https://github.com/RIOT-OS/RIOT/commit/d83d08f0995a88f399e70a7d07b44dd780082436
|
||||||
|
[cdc252ab7bd4161cc046bf93a3e55995704b24d4]: https://github.com/RIOT-OS/RIOT/commit/cdc252ab7bd4161cc046bf93a3e55995704b24d4
|
||||||
|
[ed3887ac5c1e95308c2827bce3cdca8b0f146c22]: https://github.com/RIOT-OS/RIOT/commit/ed3887ac5c1e95308c2827bce3cdca8b0f146c22
|
||||||
|
[0e2a62078850e1ecc74db2db4d639cf2d8fb96d3]: https://github.com/RIOT-OS/RIOT/commit/0e2a62078850e1ecc74db2db4d639cf2d8fb96d3
|
||||||
|
[c829f820ee870bffc60c7df688d2da8373553212]: https://github.com/RIOT-OS/RIOT/commit/c829f820ee870bffc60c7df688d2da8373553212
|
||||||
|
[9026823bb906f64168d7d38e52be92f390353dc8]: https://github.com/RIOT-OS/RIOT/commit/9026823bb906f64168d7d38e52be92f390353dc8
|
||||||
|
[bea30c3f8949ebd9fdf4a9bf0a987652889930f5]: https://github.com/RIOT-OS/RIOT/commit/bea30c3f8949ebd9fdf4a9bf0a987652889930f5
|
||||||
|
[232aed3e18118624b862d36bfec7cd1c21ca2d26]: https://github.com/RIOT-OS/RIOT/commit/232aed3e18118624b862d36bfec7cd1c21ca2d26
|
||||||
|
[a2bcd7539ce1931b7aec0077ea71dadd62c96edd]: https://github.com/RIOT-OS/RIOT/commit/a2bcd7539ce1931b7aec0077ea71dadd62c96edd
|
||||||
|
[ee6b6b9c388b78fcec7ba6e239a6c76041b9bbb7]: https://github.com/RIOT-OS/RIOT/commit/ee6b6b9c388b78fcec7ba6e239a6c76041b9bbb7
|
||||||
|
[9447cb303426d7c6348bb84999f88bf929cd6263]: https://github.com/RIOT-OS/RIOT/commit/9447cb303426d7c6348bb84999f88bf929cd6263
|
||||||
|
[ea73cc49eacd45640b9660134c4c92b887cb2716]: https://github.com/RIOT-OS/RIOT/commit/ea73cc49eacd45640b9660134c4c92b887cb2716
|
||||||
|
[99009af25e201bbc182d376e99df34133417be6c]: https://github.com/RIOT-OS/RIOT/commit/99009af25e201bbc182d376e99df34133417be6c
|
||||||
|
[cfa9580f319508f858c8fe30ecce8b2b59b6caa3]: https://github.com/RIOT-OS/RIOT/commit/cfa9580f319508f858c8fe30ecce8b2b59b6caa3
|
||||||
|
[b3eb9b8cf23f0702fa725d536df6ad6528f84189]: https://github.com/RIOT-OS/RIOT/commit/b3eb9b8cf23f0702fa725d536df6ad6528f84189
|
||||||
|
[7bc271807cecbffbb01a37c56a367b98fb823573]: https://github.com/RIOT-OS/RIOT/commit/7bc271807cecbffbb01a37c56a367b98fb823573
|
||||||
|
[fc45d7c5ac3d46bfdfb21c243cd3d4881bc5c836]: https://github.com/RIOT-OS/RIOT/commit/fc45d7c5ac3d46bfdfb21c243cd3d4881bc5c836
|
||||||
|
[b83430aa625a1d42f11f9badf5e5cfbb8efacd99]: https://github.com/RIOT-OS/RIOT/commit/b83430aa625a1d42f11f9badf5e5cfbb8efacd99
|
||||||
|
[f671a87fe2c539c3aecd595ae03fa4f6f209d042]: https://github.com/RIOT-OS/RIOT/commit/f671a87fe2c539c3aecd595ae03fa4f6f209d042
|
||||||
|
[f2760c033c5f332be076b25aa212aca4007c3d65]: https://github.com/RIOT-OS/RIOT/commit/f2760c033c5f332be076b25aa212aca4007c3d65
|
||||||
|
[e63cd54f3b1e002a7895bb7c46af889b341c1a15]: https://github.com/RIOT-OS/RIOT/commit/e63cd54f3b1e002a7895bb7c46af889b341c1a15
|
||||||
|
[4f243c52eabefe709d78560ce7f1d502d737a999]: https://github.com/RIOT-OS/RIOT/commit/4f243c52eabefe709d78560ce7f1d502d737a999
|
||||||
|
[3cac6e0979468ba56659291fd1cd11096611589d]: https://github.com/RIOT-OS/RIOT/commit/3cac6e0979468ba56659291fd1cd11096611589d
|
||||||
|
[9fb2f541baca469e34fa01b004d6f19385700ce9]: https://github.com/RIOT-OS/RIOT/commit/9fb2f541baca469e34fa01b004d6f19385700ce9
|
||||||
|
[35b6ccedf31f10a5f8e4f97609ad5b10c28bdc34]: https://github.com/RIOT-OS/RIOT/commit/35b6ccedf31f10a5f8e4f97609ad5b10c28bdc34
|
||||||
|
[72821a502f073006643cb4ef7815fc8c42563ce6]: https://github.com/RIOT-OS/RIOT/commit/72821a502f073006643cb4ef7815fc8c42563ce6
|
||||||
|
[a2dd6f90e51ca9edef643ba72bd1fd18113cf0d2]: https://github.com/RIOT-OS/RIOT/commit/a2dd6f90e51ca9edef643ba72bd1fd18113cf0d2
|
||||||
|
[cab1ea66b49e3c72e2827c8686c09d84ae3ef9a9]: https://github.com/RIOT-OS/RIOT/commit/cab1ea66b49e3c72e2827c8686c09d84ae3ef9a9
|
||||||
|
[fe941ac9fe3f81c0f08ff3b8564cf439639abcda]: https://github.com/RIOT-OS/RIOT/commit/fe941ac9fe3f81c0f08ff3b8564cf439639abcda
|
||||||
|
[81458c8eed8949c686d5ded652dbee10748e860b]: https://github.com/RIOT-OS/RIOT/commit/81458c8eed8949c686d5ded652dbee10748e860b
|
||||||
|
@ -117,6 +117,11 @@ complete that no input from the original developer or maintainer is required.
|
|||||||
- Be friendly. Respect the original author, bearing in mind that their coding
|
- Be friendly. Respect the original author, bearing in mind that their coding
|
||||||
style or their design may be just as valid as the way you would have done
|
style or their design may be just as valid as the way you would have done
|
||||||
it and of course, always follow the [Code of Conduct].
|
it and of course, always follow the [Code of Conduct].
|
||||||
|
- If a contributor has opened a PR, the reviewer should attempt to
|
||||||
|
help the author of the contribution to get it to its best shape and
|
||||||
|
according to the RIOT Standard™. If there is disagreement, it’s important
|
||||||
|
to understand the reasons behind and always give technical arguments,
|
||||||
|
pros and cons or snippets.
|
||||||
|
|
||||||
|
|
||||||
### Organisation of reviewing between maintainers
|
### Organisation of reviewing between maintainers
|
||||||
@ -155,6 +160,28 @@ GitHub's review sidebar.
|
|||||||
If there are multiple maintainers reviewing a PR, always give the other
|
If there are multiple maintainers reviewing a PR, always give the other
|
||||||
maintainers reasonable time to ACK before dismissing their review.
|
maintainers reasonable time to ACK before dismissing their review.
|
||||||
|
|
||||||
|
### Release, Feature Freeze, and Backports
|
||||||
|
|
||||||
|
Before the official release of a new RIOT version, two feature freeze periods
|
||||||
|
are announced on the
|
||||||
|
[RIOT development email list](https://lists.riot-os.org/mailman/listinfo/devel):
|
||||||
|
The soft feature freeze and the hard feature freeze. During the soft feature
|
||||||
|
freeze only PRs with minor impact should be merged into master. The hard feature
|
||||||
|
freeze begins when the release manager creates a new release branch. Therefore,
|
||||||
|
the restriction on merging PRs into the master branch are lifted at that point.
|
||||||
|
|
||||||
|
Once the release branch is created, no backports of new features will be
|
||||||
|
accepted. Instead, backports should consist only of bug fixes or of reverting
|
||||||
|
features that were added during the last development period (and not part of any
|
||||||
|
release), but didn't reach the required maturity or API stability yet. For
|
||||||
|
bigger changes (which explicitly includes any revert), the PR has to be
|
||||||
|
announced to the maintainer mailing list and should be merged no sooner than
|
||||||
|
48h after the announcement and needs at least two ACKs.
|
||||||
|
|
||||||
|
In case of security relevant backports (both bug fixes and reverts), the
|
||||||
|
announcement can be skipped and the fix merged once at least two ACKs are
|
||||||
|
there.
|
||||||
|
|
||||||
[list of maintainers]: https://github.com/RIOT-OS/RIOT/wiki/Maintainers
|
[list of maintainers]: https://github.com/RIOT-OS/RIOT/wiki/Maintainers
|
||||||
[Best Practices]: https://github.com/RIOT-OS/RIOT/wiki/Best-Practice-for-RIOT-Programming
|
[Best Practices]: https://github.com/RIOT-OS/RIOT/wiki/Best-Practice-for-RIOT-Programming
|
||||||
[Comparing build sizes]: https://github.com/RIOT-OS/RIOT/wiki/Comparing-build-sizes
|
[Comparing build sizes]: https://github.com/RIOT-OS/RIOT/wiki/Comparing-build-sizes
|
||||||
|
11
Makefile
11
Makefile
@ -22,7 +22,11 @@ clean:
|
|||||||
@echo "Cleaning all build products for the current board"
|
@echo "Cleaning all build products for the current board"
|
||||||
@for dir in $(APPLICATION_DIRS); do "$(MAKE)" -C$$dir clean; done
|
@for dir in $(APPLICATION_DIRS); do "$(MAKE)" -C$$dir clean; done
|
||||||
|
|
||||||
distclean: docclean
|
pkg-clean:
|
||||||
|
@echo "Cleaning all package sources"
|
||||||
|
rm -rf build/pkg
|
||||||
|
|
||||||
|
distclean: docclean pkg-clean
|
||||||
@echo "Cleaning all build products"
|
@echo "Cleaning all build products"
|
||||||
@for dir in $(APPLICATION_DIRS); do "$(MAKE)" -C$$dir distclean; done
|
@for dir in $(APPLICATION_DIRS); do "$(MAKE)" -C$$dir distclean; done
|
||||||
|
|
||||||
@ -34,8 +38,8 @@ welcome:
|
|||||||
@echo ""
|
@echo ""
|
||||||
@echo "Please see our Quick Start Guide at:"
|
@echo "Please see our Quick Start Guide at:"
|
||||||
@echo " https://doc.riot-os.org/getting-started.html"
|
@echo " https://doc.riot-os.org/getting-started.html"
|
||||||
@echo "Or ask questions on our mailing list:"
|
@echo "You can ask questions or discuss with other users on our forum:"
|
||||||
@echo " users@riot-os.org (http://lists.riot-os.org/mailman/listinfo/users)"
|
@echo " https://forum.riot-os.org"
|
||||||
|
|
||||||
print-versions:
|
print-versions:
|
||||||
@./dist/tools/ci/print_toolchain_versions.sh
|
@./dist/tools/ci/print_toolchain_versions.sh
|
||||||
@ -43,4 +47,5 @@ print-versions:
|
|||||||
include makefiles/boards.inc.mk
|
include makefiles/boards.inc.mk
|
||||||
include makefiles/app_dirs.inc.mk
|
include makefiles/app_dirs.inc.mk
|
||||||
|
|
||||||
|
include makefiles/tools/riotgen.inc.mk
|
||||||
-include makefiles/tests.inc.mk
|
-include makefiles/tests.inc.mk
|
||||||
|
118
Makefile.base
118
Makefile.base
@ -5,7 +5,7 @@ endif
|
|||||||
#
|
#
|
||||||
# enable second expansion of prerequisites.
|
# enable second expansion of prerequisites.
|
||||||
#
|
#
|
||||||
# Doing that here enables it globally for all modules and the application.
|
# Doing that here enables it globally for all modules
|
||||||
#
|
#
|
||||||
# See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html
|
# See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html
|
||||||
# for what it can be used for.
|
# for what it can be used for.
|
||||||
@ -14,11 +14,13 @@ endif
|
|||||||
unexport DIRS
|
unexport DIRS
|
||||||
DIRS := $(sort $(abspath $(DIRS)))
|
DIRS := $(sort $(abspath $(DIRS)))
|
||||||
|
|
||||||
MODULE ?= $(shell basename $(CURDIR))
|
_MOD := $(shell basename $(CURDIR))
|
||||||
|
MODULE ?= $(_MOD)
|
||||||
|
|
||||||
.PHONY: all clean $(DIRS:%=ALL--%) $(DIRS:%=CLEAN--%)
|
.PHONY: all clean $(DIRS:%=ALL--%) $(DIRS:%=CLEAN--%) $(MODULE).module \
|
||||||
|
compile-commands $(DIRS:%=COMPILE-COMMANDS--%) $(MODULE).cleanup
|
||||||
|
|
||||||
all: $(BINDIR)/$(MODULE).a ..nothing
|
all: $(MODULE).module ..nothing
|
||||||
|
|
||||||
..nothing:
|
..nothing:
|
||||||
@:
|
@:
|
||||||
@ -31,6 +33,9 @@ $(DIRS:%=ALL--%):
|
|||||||
$(DIRS:%=CLEAN--%):
|
$(DIRS:%=CLEAN--%):
|
||||||
$(QQ)"$(MAKE)" -C $(@:CLEAN--%=%) clean
|
$(QQ)"$(MAKE)" -C $(@:CLEAN--%=%) clean
|
||||||
|
|
||||||
|
$(DIRS:%=COMPILE-COMMANDS--%):
|
||||||
|
$(QQ)"$(MAKE)" -C $(@:COMPILE-COMMANDS--%=%) compile-commands
|
||||||
|
|
||||||
## submodules
|
## submodules
|
||||||
ifeq (1, $(SUBMODULES))
|
ifeq (1, $(SUBMODULES))
|
||||||
# don't use *.c as SRC if SRC is empty (e.g., no module selected)
|
# don't use *.c as SRC if SRC is empty (e.g., no module selected)
|
||||||
@ -40,19 +45,24 @@ ifeq (1, $(SUBMODULES))
|
|||||||
BASE_MODULE ?= $(MODULE)
|
BASE_MODULE ?= $(MODULE)
|
||||||
|
|
||||||
# for each $(BASE_MODULE)_<name> in USEMODULE, add <name>.c to SRC
|
# for each $(BASE_MODULE)_<name> in USEMODULE, add <name>.c to SRC
|
||||||
SRC += $(patsubst $(BASE_MODULE)_%,%.c,$(filter $(BASE_MODULE)_%,$(USEMODULE)))
|
# unless in SUBMODULES_NO_SRC
|
||||||
|
SRC += $(wildcard \
|
||||||
|
$(filter-out $(SUBMODULES_NO_SRC),\
|
||||||
|
$(patsubst $(BASE_MODULE)_%,%.c,\
|
||||||
|
$(filter $(BASE_MODULE)_%,$(USEMODULE)))))
|
||||||
|
|
||||||
# don't fail if a selected *.c file does not exist
|
# remove duplicates
|
||||||
ifeq (1, $(SUBMODULES_NOFORCE))
|
SRC := $(sort $(SRC))
|
||||||
SRC := $(filter $(SRC), $(wildcard *.c))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# By default consider C++ files has a .cpp extension
|
||||||
|
SRCXXEXT ?= cpp
|
||||||
|
|
||||||
ifeq ($(strip $(SRC))$(NO_AUTO_SRC),)
|
ifeq ($(strip $(SRC))$(NO_AUTO_SRC),)
|
||||||
SRC := $(filter-out $(SRC_NOLTO), $(wildcard *.c))
|
SRC := $(filter-out $(SRC_NOLTO), $(wildcard *.c))
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(SRCXX))$(NO_AUTO_SRC),)
|
ifeq ($(strip $(SRCXX))$(NO_AUTO_SRC),)
|
||||||
SRCXX := $(wildcard *.cpp)
|
SRCXX := $(filter-out $(SRCXXEXCLUDE),$(wildcard *.$(SRCXXEXT)))
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(ASMSRC))$(NO_AUTO_SRC),)
|
ifeq ($(strip $(ASMSRC))$(NO_AUTO_SRC),)
|
||||||
ASMSRC := $(wildcard *.s)
|
ASMSRC := $(wildcard *.s)
|
||||||
@ -61,14 +71,40 @@ ifeq ($(strip $(ASSMSRC))$(NO_AUTO_SRC),)
|
|||||||
ASSMSRC := $(wildcard *.S)
|
ASSMSRC := $(wildcard *.S)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# include makefile snippets for packages in $(USEPKG) that modify GENSRC:
|
|
||||||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.gensrc)
|
ifneq (,$(SRCXX))
|
||||||
|
ifeq (,$(filter cpp,$(USEMODULE)))
|
||||||
|
ifneq (1,$(TEST_KCONFIG))
|
||||||
|
$(error Found C++ source, but feature "cpp" is not used. Add "FEATURES_REQUIRED += cpp")
|
||||||
|
else
|
||||||
|
$(error Found C++ source, but "cpp" module is not used. Enable the MODULE_CPP in Kconfig)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
compile-commands: | $(DIRS:%=COMPILE-COMMANDS--%)
|
||||||
|
$(file >$(BINDIR)/$(MODULE)/compile_cmds.txt,SRC: $(sort $(SRC) $(SRC_NO_LTO)))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,SRC_NO_LTO: $(sort $(SRC_NO_LTO)))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,SRCXX: $(sort $(SRCXX)))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,CURDIR: $(CURDIR))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,CFLAGS: $(CFLAGS))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,LTOFLAGS: $(LTOFLAGS))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,INCLUDES: $(INCLUDES))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,CXXFLAGS: $(CXXFLAGS))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,CXXINCLUDES: $(CXXINCLUDES))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,CC: $(CC))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,CXX: $(CXX))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,TARGET_ARCH: $(TARGET_ARCH))
|
||||||
|
$(file >>$(BINDIR)/$(MODULE)/compile_cmds.txt,TARGET_ARCH_LLVM: $(TARGET_ARCH_LLVM))
|
||||||
|
|
||||||
|
# include makefile snippets for packages in $(PKG_PATHS) that modify GENSRC:
|
||||||
|
-include $(PKG_PATHS:%=%Makefile.gensrc)
|
||||||
|
|
||||||
GENOBJC := $(GENSRC:%.c=%.o)
|
GENOBJC := $(GENSRC:%.c=%.o)
|
||||||
OBJC_LTO := $(SRC:%.c=$(BINDIR)/$(MODULE)/%.o)
|
OBJC_LTO := $(SRC:%.c=$(BINDIR)/$(MODULE)/%.o)
|
||||||
OBJC_NOLTO := $(SRC_NOLTO:%.c=$(BINDIR)/$(MODULE)/%.o)
|
OBJC_NOLTO := $(SRC_NOLTO:%.c=$(BINDIR)/$(MODULE)/%.o)
|
||||||
OBJC := $(OBJC_NOLTO) $(OBJC_LTO)
|
OBJC := $(OBJC_NOLTO) $(OBJC_LTO)
|
||||||
OBJCXX := $(SRCXX:%.cpp=$(BINDIR)/$(MODULE)/%.o)
|
OBJCXX := $(SRCXX:%.$(SRCXXEXT)=$(BINDIR)/$(MODULE)/%.o)
|
||||||
ASMOBJ := $(ASMSRC:%.s=$(BINDIR)/$(MODULE)/%.o)
|
ASMOBJ := $(ASMSRC:%.s=$(BINDIR)/$(MODULE)/%.o)
|
||||||
ASSMOBJ := $(ASSMSRC:%.S=$(BINDIR)/$(MODULE)/%.o)
|
ASSMOBJ := $(ASSMSRC:%.S=$(BINDIR)/$(MODULE)/%.o)
|
||||||
|
|
||||||
@ -76,18 +112,25 @@ OBJ := $(OBJC) $(OBJCXX) $(ASMOBJ) $(ASSMOBJ) $(GENOBJC)
|
|||||||
DEP := $(OBJC:.o=.d) $(OBJCXX:.o=.d) $(ASSMOBJ:.o=.d)
|
DEP := $(OBJC:.o=.d) $(OBJCXX:.o=.d) $(ASSMOBJ:.o=.d)
|
||||||
|
|
||||||
include $(RIOTMAKE)/blob.inc.mk
|
include $(RIOTMAKE)/blob.inc.mk
|
||||||
|
include $(RIOTMAKE)/tools/fixdep.inc.mk
|
||||||
|
|
||||||
$(BINDIR)/$(MODULE)/:
|
$(BINDIR)/$(MODULE)/:
|
||||||
$(Q)mkdir -p $@
|
$(Q)mkdir -p $@
|
||||||
|
|
||||||
$(BINDIR)/$(MODULE).a $(OBJ): | $(BINDIR)/$(MODULE)/
|
OLD_OBJECTS = $(wildcard $(BINDIR)/$(MODULE)/*.o)
|
||||||
|
|
||||||
# Build the archive from the output directory to create relative thin archives
|
# do not clean objects from bindist modules
|
||||||
# This allows having them valid in and outside of docker
|
ifeq (,$(filter $(MODULE),$(BIN_USEMODULE)))
|
||||||
$(BINDIR)/$(MODULE).a: $(OBJ) | $(DIRS:%=ALL--%)
|
OBJECTS_TO_REMOVE = $(filter-out $(OBJ),$(OLD_OBJECTS))
|
||||||
@# Recreate archive to cleanup deleted/non selected source files objects
|
endif
|
||||||
$(Q)$(RM) $@
|
|
||||||
$(Q)cd $(@D) && $(AR) $(ARFLAGS) $(@F) $(subst $(@D)/,,$^)
|
$(MODULE).module compile-commands $(OBJ): | $(BINDIR)/$(MODULE)/
|
||||||
|
|
||||||
|
$(MODULE).module: $(OBJ) $(if $(OBJECTS_TO_REMOVE),$(MODULE).cleanup) | $(DIRS:%=ALL--%)
|
||||||
|
|
||||||
|
$(MODULE).cleanup:
|
||||||
|
$(Q)# cleanup non selected source files objects
|
||||||
|
$(Q)$(RM) $(OBJECTS_TO_REMOVE)
|
||||||
|
|
||||||
CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
|
CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
|
||||||
CCASFLAGS = $(filter-out $(CCASUWFLAGS), $(CFLAGS)) $(CCASEXFLAGS)
|
CCASFLAGS = $(filter-out $(CCASUWFLAGS), $(CFLAGS)) $(CCASEXFLAGS)
|
||||||
@ -96,29 +139,48 @@ CCASFLAGS = $(filter-out $(CCASUWFLAGS), $(CFLAGS)) $(CCASEXFLAGS)
|
|||||||
|
|
||||||
$(OBJC_LTO): CFLAGS+=$(LTOFLAGS)
|
$(OBJC_LTO): CFLAGS+=$(LTOFLAGS)
|
||||||
|
|
||||||
$(OBJC): $(BINDIR)/$(MODULE)/%.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
# Define dependencies for object files
|
||||||
|
OBJ_DEPS += $(RIOTBUILD_CONFIG_HEADER_C)
|
||||||
|
|
||||||
|
$(OBJC): $(BINDIR)/$(MODULE)/%.o: %.c $(OBJ_DEPS) | $(if $(SHOULD_RUN_KCONFIG),$(KCONFIG_GENERATED_AUTOCONF_HEADER_C))
|
||||||
$(Q)$(CCACHE) $(CC) \
|
$(Q)$(CCACHE) $(CC) \
|
||||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
||||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||||
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
$(CFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||||
|
ifneq (,$(SHOULD_RUN_KCONFIG))
|
||||||
|
$(Q)$(FIXDEP) $(@:.o=.d) $@ $(KCONFIG_SYNC_DIR) > $(@:.o=.tmp)
|
||||||
|
$(Q)mv $(@:.o=.tmp) $(@:.o=.d)
|
||||||
|
endif
|
||||||
|
|
||||||
$(GENOBJC): %.o: %.c $(RIOTBUILD_CONFIG_HEADER_C)
|
$(GENOBJC): %.o: %.c $(OBJ_DEPS) | $(if $(SHOULD_RUN_KCONFIG),$(KCONFIG_GENERATED_AUTOCONF_HEADER_C))
|
||||||
$(Q) $(CCACHE) $(CC) \
|
$(Q) $(CCACHE) $(CC) \
|
||||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$<)\" \
|
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$<)\" \
|
||||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||||
$(CFLAGS) $(INCLUDES) -MD -MP -c -o $@ $<
|
$(CFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $<
|
||||||
|
ifneq (,$(SHOULD_RUN_KCONFIG))
|
||||||
|
$(Q)$(FIXDEP) $(@:.o=.d) $@ $(KCONFIG_SYNC_DIR) > $(@:.o=.tmp)
|
||||||
|
$(Q)mv $(@:.o=.tmp) $(@:.o=.d)
|
||||||
|
endif
|
||||||
|
|
||||||
$(OBJCXX): $(BINDIR)/$(MODULE)/%.o: %.cpp $(RIOTBUILD_CONFIG_HEADER_C)
|
$(OBJCXX): $(BINDIR)/$(MODULE)/%.o: %.$(SRCXXEXT) $(OBJ_DEPS) | $(if $(SHOULD_RUN_KCONFIG),$(KCONFIG_GENERATED_AUTOCONF_HEADER_C))
|
||||||
$(Q)$(CCACHE) $(CXX) \
|
$(Q)$(CCACHE) $(CXX) \
|
||||||
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
|
||||||
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
|
||||||
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||||
|
ifneq (,$(SHOULD_RUN_KCONFIG))
|
||||||
|
$(Q)$(FIXDEP) $(@:.o=.d) $@ $(KCONFIG_SYNC_DIR) > $(@:.o=.tmp)
|
||||||
|
$(Q)mv $(@:.o=.tmp) $(@:.o=.d)
|
||||||
|
endif
|
||||||
|
|
||||||
$(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
|
$(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
|
||||||
$(Q)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
$(Q)$(AS) $(ASFLAGS) -o $@ $(abspath $<)
|
||||||
|
|
||||||
$(ASSMOBJ): $(BINDIR)/$(MODULE)/%.o: %.S $(RIOTBUILD_CONFIG_HEADER_C)
|
$(ASSMOBJ): $(BINDIR)/$(MODULE)/%.o: %.S $(OBJ_DEPS) | $(if $(SHOULD_RUN_KCONFIG),$(KCONFIG_GENERATED_AUTOCONF_HEADER_C))
|
||||||
$(Q)$(CCAS) $(CCASFLAGS) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
|
$(Q)$(CCAS) $(CCASFLAGS) $(INCLUDES) -MQ '$@' -MD -MP -c -o $@ $(abspath $<)
|
||||||
|
ifneq (,$(SHOULD_RUN_KCONFIG))
|
||||||
|
$(Q)$(FIXDEP) $(@:.o=.d) $@ $(KCONFIG_SYNC_DIR) > $(@:.o=.tmp)
|
||||||
|
$(Q)mv $(@:.o=.tmp) $(@:.o=.d)
|
||||||
|
endif
|
||||||
|
|
||||||
# pull in dependency info for *existing* .o files
|
# pull in dependency info for *existing* .o files
|
||||||
# deleted header files will be silently ignored
|
# deleted header files will be silently ignored
|
||||||
|
998
Makefile.dep
998
Makefile.dep
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,15 @@
|
|||||||
# Process FEATURES variables
|
# Process provided FEATURES
|
||||||
#
|
#
|
||||||
# The board/board common are responsible for defining the CPU and CPU_MODEL
|
# The board/board common are responsible for defining the CPU and CPU_MODEL
|
||||||
# variables in their Makefile.features.
|
# variables in their Makefile.features.
|
||||||
# This makes them available when setting features based on CPU_MODEL in the cpu
|
# This makes them available when setting features based on CPU_MODEL in the cpu
|
||||||
# Makefile.features and also during dependency resolution.
|
# Makefile.features and also during dependency resolution.
|
||||||
|
|
||||||
include $(RIOTBOARD)/$(BOARD)/Makefile.features
|
# Transition:
|
||||||
|
# Moving 'CPU/CPU_MODEL' to Makefile.features is an ongoing work and may not
|
||||||
|
# reflect the state of all boards for the moment.
|
||||||
|
|
||||||
|
include $(BOARDDIR)/Makefile.features
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
ifeq (,$(CPU))
|
ifeq (,$(CPU))
|
||||||
@ -14,37 +18,9 @@ endif
|
|||||||
|
|
||||||
include $(RIOTCPU)/$(CPU)/Makefile.features
|
include $(RIOTCPU)/$(CPU)/Makefile.features
|
||||||
|
|
||||||
|
# Provide CPU as a feature to allow listing all boards with a CPU
|
||||||
|
FEATURES_PROVIDED += cpu_$(CPU)
|
||||||
|
|
||||||
# Resolve FEATURES_ variables
|
# Features that are conflicting for all architectures
|
||||||
# Their value will only be complete after resolving dependencies
|
FEATURES_CONFLICT += picolibc:newlib
|
||||||
|
FEATURES_CONFLICT_MSG += "Only one standard C library can be used"
|
||||||
# Features that are required by the application but not provided by the BSP and
|
|
||||||
# features that are used but blacklisted (prepended with "!").
|
|
||||||
# Having features missing may case the build to fail.
|
|
||||||
FEATURES_MISSING = $(sort $(filter-out $(FEATURES_PROVIDED),$(FEATURES_REQUIRED)))
|
|
||||||
|
|
||||||
# Features that are only optional and not required at the same time.
|
|
||||||
# The policy is to by default use by features if they are provided by the BSP.
|
|
||||||
FEATURES_OPTIONAL_ONLY = $(sort $(filter-out $(FEATURES_REQUIRED),$(FEATURES_OPTIONAL)))
|
|
||||||
FEATURES_OPTIONAL_USED = $(sort $(filter $(FEATURES_PROVIDED),$(FEATURES_OPTIONAL_ONLY)))
|
|
||||||
# Optional features that will not be used because they are not provided
|
|
||||||
FEATURES_OPTIONAL_MISSING = $(sort $(filter-out $(FEATURES_PROVIDED),$(FEATURES_OPTIONAL_ONLY)))
|
|
||||||
|
|
||||||
# Features that are used for an application
|
|
||||||
FEATURES_USED = $(sort $(FEATURES_REQUIRED) $(FEATURES_OPTIONAL_USED))
|
|
||||||
|
|
||||||
# Used features that conflict when used together
|
|
||||||
FEATURES_CONFLICTING = $(sort $(foreach conflict,$(FEATURES_CONFLICT),$(call _features_conflicting,$(conflict))))
|
|
||||||
|
|
||||||
# Return conflicting features from the conflict string feature1:feature2
|
|
||||||
# $1: feature1:feature2
|
|
||||||
# Return the list of conflicting features
|
|
||||||
_features_conflicting = $(if $(call _features_used_conflicting,$(subst :, ,$1)),$(subst :, ,$1))
|
|
||||||
# Check if all features from the list are used
|
|
||||||
# $1: list of features that conflict together
|
|
||||||
# Return non empty on error
|
|
||||||
_features_used_conflicting = $(filter $(words $1),$(words $(filter $(FEATURES_USED),$1)))
|
|
||||||
|
|
||||||
# Features that are used by the application but blacklisted by the BSP.
|
|
||||||
# Having blacklisted features may cause the build to fail.
|
|
||||||
FEATURES_USED_BLACKLISTED = $(sort $(filter $(FEATURES_USED), $(FEATURES_BLACKLIST)))
|
|
||||||
|
665
Makefile.include
665
Makefile.include
File diff suppressed because it is too large
Load Diff
85
README.md
85
README.md
@ -1,6 +1,14 @@
|
|||||||
[![Nightly CI status master][master-ci-badge]][master-ci-link]
|
[![Nightly CI status master][master-ci-badge]][master-ci-link]
|
||||||
[![IRC][irc-badge]][irc-link]
|
[![Nightly HiL CI overview][hil-ci-badge]][hil-ci-link]
|
||||||
|
[![GitHub release][release-badge]][release-link]
|
||||||
|
[![License][license-badge]][license-link]
|
||||||
|
[![API docs][api-badge]][api-link]
|
||||||
|
[![Wiki][wiki-badge]][wiki-link]
|
||||||
|
[![Stack Overflow questions][stackoverflow-badge]][stackoverflow-link]
|
||||||
|
[![Twitter][twitter-badge]][twitter-link]
|
||||||
|
[![Matrix][matrix-badge]][matrix-link]
|
||||||
|
|
||||||
|
<p align="center"><img src="doc/doxygen/src/riot-logo.svg" width="66%"><!--
|
||||||
ZZZZZZ
|
ZZZZZZ
|
||||||
ZZZZZZZZZZZZ
|
ZZZZZZZZZZZZ
|
||||||
ZZZZZZZZZZZZZZZZ
|
ZZZZZZZZZZZZZZZZ
|
||||||
@ -25,7 +33,7 @@
|
|||||||
ZZZZZZ ZZZZZZ ZZZZZ 777 7777777777 777
|
ZZZZZZ ZZZZZZ ZZZZZ 777 7777777777 777
|
||||||
ZZZZZZZZZZZZZZZ ZZZZ 777 77777777 777
|
ZZZZZZZZZZZZZZZ ZZZZ 777 77777777 777
|
||||||
ZZZZZZZZZZZ Z
|
ZZZZZZZZZZZ Z
|
||||||
ZZZZZ
|
ZZZZZ --></p>
|
||||||
|
|
||||||
The friendly Operating System for IoT!
|
The friendly Operating System for IoT!
|
||||||
|
|
||||||
@ -67,6 +75,30 @@ but not limited to:
|
|||||||
* Sigfox
|
* Sigfox
|
||||||
* LoRaWAN
|
* LoRaWAN
|
||||||
|
|
||||||
|
## GETTING RIOT
|
||||||
|
|
||||||
|
The most convenient way to get RIOT is to clone it via Git
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git clone https://github.com/RIOT-OS/RIOT
|
||||||
|
```
|
||||||
|
|
||||||
|
this will ensure that you get all the newest features and bug fixes with the
|
||||||
|
caveat of an ever changing work environment.
|
||||||
|
|
||||||
|
If you prefer things more stable, you can download the source code of one of our
|
||||||
|
quarter annual releases [via Github][releases] as ZIP file or tarball. You can
|
||||||
|
also checkout a release in a cloned Git repository using
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ git pull --tags
|
||||||
|
$ git checkout <YYYY.MM>
|
||||||
|
```
|
||||||
|
|
||||||
|
For more details on our release cycle, check our [documentation][release cycle].
|
||||||
|
|
||||||
|
[releases]: https://github.com/RIOT-OS/RIOT/releases
|
||||||
|
[release cycle]: https://doc.riot-os.org/release-cycle.html
|
||||||
|
|
||||||
## GETTING STARTED
|
## GETTING STARTED
|
||||||
* You want to start the RIOT? Just follow our
|
* You want to start the RIOT? Just follow our
|
||||||
@ -77,21 +109,14 @@ For specific toolchain installation, follow instructions in the
|
|||||||
[getting started](https://doc.riot-os.org/getting-started.html) page.
|
[getting started](https://doc.riot-os.org/getting-started.html) page.
|
||||||
* The RIOT API itself can be built from the code using doxygen. The latest
|
* The RIOT API itself can be built from the code using doxygen. The latest
|
||||||
version of the documentation is uploaded daily to
|
version of the documentation is uploaded daily to
|
||||||
[riot-os.org/api](https://riot-os.org/api).
|
[doc.riot-os.org](https://doc.riot-os.org).
|
||||||
|
|
||||||
### USING THE NATIVE PORT WITH NETWORKING
|
## FORUM
|
||||||
If you compile RIOT for the native cpu and include the `netdev_tap` module,
|
Do you have a question, want to discuss a new feature, or just want to present
|
||||||
you can specify a network interface like this: `PORT=tap0 make term`
|
your latest project using RIOT? Come over to our [forum] and post to your hearts
|
||||||
|
content.
|
||||||
|
|
||||||
#### SETTING UP A TAP NETWORK
|
[forum]: https://forum.riot-os.org
|
||||||
There is a shell script in `RIOT/dist/tools/tapsetup` called `tapsetup` which
|
|
||||||
you can use to create a network of tap interfaces.
|
|
||||||
|
|
||||||
*USAGE*
|
|
||||||
|
|
||||||
To create a bridge and two (or `count` at your option) tap interfaces:
|
|
||||||
|
|
||||||
./dist/tools/tapsetup/tapsetup [-c [<count>]]
|
|
||||||
|
|
||||||
## CONTRIBUTE
|
## CONTRIBUTE
|
||||||
|
|
||||||
@ -99,15 +124,8 @@ To contribute something to RIOT, please refer to our
|
|||||||
[contributing document](CONTRIBUTING.md).
|
[contributing document](CONTRIBUTING.md).
|
||||||
|
|
||||||
## MAILING LISTS
|
## MAILING LISTS
|
||||||
* RIOT OS kernel developers list
|
* RIOT commits: [commits@riot-os.org](https://lists.riot-os.org/mailman/listinfo/commits)
|
||||||
* devel@riot-os.org (https://lists.riot-os.org/mailman/listinfo/devel)
|
* Github notifications: [notifications@riot-os.org](https://lists.riot-os.org/mailman/listinfo/notifications)
|
||||||
* RIOT OS users list
|
|
||||||
* users@riot-os.org (https://lists.riot-os.org/mailman/listinfo/users)
|
|
||||||
* RIOT commits
|
|
||||||
* commits@riot-os.org (https://lists.riot-os.org/mailman/listinfo/commits)
|
|
||||||
* Github notifications
|
|
||||||
* notifications@riot-os.org
|
|
||||||
(https://lists.riot-os.org/mailman/listinfo/notifications)
|
|
||||||
|
|
||||||
## LICENSE
|
## LICENSE
|
||||||
* Most of the code developed by the RIOT community is licensed under the GNU
|
* Most of the code developed by the RIOT community is licensed under the GNU
|
||||||
@ -123,7 +141,22 @@ For more information, see the RIOT website:
|
|||||||
https://www.riot-os.org
|
https://www.riot-os.org
|
||||||
|
|
||||||
|
|
||||||
|
[api-badge]: https://img.shields.io/badge/docs-API-informational.svg
|
||||||
|
[api-link]: https://doc.riot-os.org/
|
||||||
|
[license-badge]: https://img.shields.io/github/license/RIOT-OS/RIOT
|
||||||
|
[license-link]: https://github.com/RIOT-OS/RIOT/blob/master/LICENSE
|
||||||
[master-ci-badge]: https://ci.riot-os.org/RIOT-OS/RIOT/master/latest/badge.svg
|
[master-ci-badge]: https://ci.riot-os.org/RIOT-OS/RIOT/master/latest/badge.svg
|
||||||
[master-ci-link]: https://ci.riot-os.org/nightlies.html#master
|
[master-ci-link]: https://ci.riot-os.org/nightlies.html#master
|
||||||
[irc-badge]: https://img.shields.io/badge/IRC-join%20chat%20%E2%86%92-blue.svg
|
[matrix-badge]: https://img.shields.io/badge/chat-Matrix-brightgreen.svg
|
||||||
[irc-link]: https://webchat.freenode.net?channels=%23riot-os
|
[matrix-link]: https://matrix.to/#/#riot-os:matrix.org
|
||||||
|
[merge-chance-link]: https://merge-chance.info/target?repo=RIOT-OS/RIOT
|
||||||
|
[release-badge]: https://img.shields.io/github/release/RIOT-OS/RIOT.svg
|
||||||
|
[release-link]: https://github.com/RIOT-OS/RIOT/releases/latest
|
||||||
|
[stackoverflow-badge]: https://img.shields.io/badge/stackoverflow-%5Briot--os%5D-yellow
|
||||||
|
[stackoverflow-link]: https://stackoverflow.com/questions/tagged/riot-os
|
||||||
|
[twitter-badge]: https://img.shields.io/badge/social-Twitter-informational.svg
|
||||||
|
[twitter-link]: https://twitter.com/RIOT_OS
|
||||||
|
[wiki-badge]: https://img.shields.io/badge/docs-Wiki-informational.svg
|
||||||
|
[wiki-link]: https://github.com/RIOT-OS/RIOT/wiki
|
||||||
|
[hil-ci-link]: https://hil.riot-os.org/results/nightly/latest/overview
|
||||||
|
[hil-ci-badge]: https://img.shields.io/badge/CI-HiL-blue
|
||||||
|
66
SECURITY.md
Normal file
66
SECURITY.md
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# RIOT Security Policy
|
||||||
|
|
||||||
|
All security bugs reported will be silently fixed in `master` and backported
|
||||||
|
to the previous release.
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If a security issue is discovered, please report it to security@riot-os.org.
|
||||||
|
A response will be provided within one week.
|
||||||
|
The issue will be tracked in the [security mailing list](mailto:security@riot-os.org).
|
||||||
|
The original reporter will be included in the discussion of the issue.
|
||||||
|
You can encrypt your report using gpg key id
|
||||||
|
[44C6AE441172F88D3423E81F5F7964D0F4239033][security-gpg], also included at the
|
||||||
|
bottom of this file.
|
||||||
|
|
||||||
|
[security-gpg]: https://riot-os.org/assets/keys/security.asc
|
||||||
|
|
||||||
|
## Notification of a Vulnerability
|
||||||
|
|
||||||
|
After a fix is provided the security issue will be privately disclosed to the
|
||||||
|
original reporter, RIOT security maintainers, and "Trusted RIOT Users".
|
||||||
|
A public announcement of the security fix will be made two weeks after the
|
||||||
|
point release, though this may vary depending on the severity and ability of
|
||||||
|
trusted RIOT users to provide the fix.
|
||||||
|
|
||||||
|
## Trusted RIOT Users
|
||||||
|
|
||||||
|
To access the "Trusted RIOT Users" notifications on the
|
||||||
|
[RIOT forum](https://forum.riot-os.org) please send information
|
||||||
|
on the RIOT based service or product as well as your
|
||||||
|
[forum](https://forum.riot-os.org) username to the
|
||||||
|
[security mailing list](mailto:security@riot-os.org).
|
||||||
|
Early notification of security bugs will be available and should not be shared
|
||||||
|
publicly.
|
||||||
|
If done, it will result in access removal from the "Trusted RIOT Users"
|
||||||
|
notifications.
|
||||||
|
|
||||||
|
## RIOT community GPG key
|
||||||
|
|
||||||
|
```
|
||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mDMEYY4plhYJKwYBBAHaRw8BAQdALRZ/IJmifuwoSUYTVbKUy9z/m3y0ux6DLMD6
|
||||||
|
kMs13/+0J1JJT1QtT1Mgc2VjdXJpdHkgPHNlY3VyaXR5QHJpb3Qtb3Mub3JnPoiW
|
||||||
|
BBMWCAA+FiEERMauRBFy+I00I+gfX3lk0PQjkDMFAmGOKZYCGwMFCQPCZwAFCwkI
|
||||||
|
BwIGFQoJCAsCBBYCAwECHgECF4AACgkQX3lk0PQjkDMyggEA4lp3RDz+qj1K1veV
|
||||||
|
AlTh/L90rft7v7hZ9ROWD8mssD8BAI3sc+AESdkNf9lATsuH39/9jIi3CqLDdDxK
|
||||||
|
TJ9SQwcNiQIzBBABCAAdFiEEZi0l9uxO8DMbg2ZS/bt7xc+P5tsFAmGOKbkACgkQ
|
||||||
|
/bt7xc+P5tvQLA//fCVUg3B5N5J1gCOSGRlplzFO0DELNl8akecxxFuCUU74Hjyc
|
||||||
|
NSR4r8lQGhGvAVZLanBTprTWeYXtCuLAFfCwvNitbWXnmXRJawQ4k0TQfUXWNsbf
|
||||||
|
o84QHtKvxEEwLnubVfz+uATw0eahmU2beh2lEl1PKPnpnvc2q9eM019Ff7RV1poe
|
||||||
|
UD2ctDZ9yn1GDN6A1E9ejAqxowwPxZfafH6uvPcGnDtvBZ0SB2x+EXvFNDpdaFBm
|
||||||
|
GEqAOY+wBabk6XV9B5qhu0KeVy0ePHni8JaZQJZX+xo2Nzk14IG66nxBF0zz0qTj
|
||||||
|
2hntxygrS44lQffqkDl+W/Vyc31/k3vsemLQAaC+/ZV1ULxew1VCmBHKE201+8bS
|
||||||
|
VmQweoiVBa30HtftOhMtlSi+WHyzwG7KGiD148PJIuQx42Dj/iY0MLHCR5c32giF
|
||||||
|
tW0xJ6fDkVVC0LkLPfBbMJrKxpX5xyWnWVibWHyAXaI/Sh2oK9uIkvdPFh+rWNe7
|
||||||
|
Wr3Sokn3oUUE2BVkcOiZO9gMYngx6sDWazYwBMTaDxPISIdQofAPZ3LiW/f12wXq
|
||||||
|
V39RPXrlR3wDf8frhb8Jfxt1q0KHRbU3Drf8cGjpC42H/HazhH4QugbqfUv3BH0C
|
||||||
|
zJTYg+S79aDgIqUaW5ASxIi5e20jNKoaRnYg7Y1rYk4ttMtH72XylP1vuCK4OARh
|
||||||
|
jimWEgorBgEEAZdVAQUBAQdAQCSgXzft+sMtSz1vOEaT/s28u/LVmLjUoGtuAcns
|
||||||
|
in0DAQgHiH4EGBYIACYWIQRExq5EEXL4jTQj6B9feWTQ9COQMwUCYY4plgIbDAUJ
|
||||||
|
A8JnAAAKCRBfeWTQ9COQM+6YAP4w2R2qD9yO7ILcDWVyityM7+rmYrpqabbz07kh
|
||||||
|
CST7fgEAgvz7lVIT4bq7IqhdvcpOERC0Wu9c4AjyX9Y6KB3kIwI=
|
||||||
|
=3GfE
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
|
```
|
34
Vagrantfile
vendored
34
Vagrantfile
vendored
@ -5,28 +5,20 @@ require 'fileutils'
|
|||||||
|
|
||||||
RIOTBASE ||= "./"
|
RIOTBASE ||= "./"
|
||||||
|
|
||||||
Vagrant.configure(2) do |config|
|
Vagrant.configure("2") do |config|
|
||||||
# For a complete reference, please see the online documentation at https://docs.vagrantup.com.
|
config.vm.define "RIOT-VM"
|
||||||
|
config.vm.box = "RIOT/ubuntu1804"
|
||||||
|
config.ssh.username = "user"
|
||||||
|
config.vm.synced_folder RIOTBASE, "/home/user/RIOT"
|
||||||
|
|
||||||
config.vm.box = "RIOT/ubuntu1604"
|
if File.exists?(File.join(Dir.home, ".gitconfig"))
|
||||||
|
config.vm.provision "file", source: File.join(Dir.home, ".gitconfig"), destination: ".gitconfig"
|
||||||
|
end
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
config.vm.provider :virtualbox do |v, override|
|
||||||
vb.name = "RIOT-VM"
|
v.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", 0]
|
||||||
|
|
||||||
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-interval", 10000]
|
# additional USB passthrough entries
|
||||||
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-min-adjust", 100]
|
# v.customize ['usbfilter', 'add', '0', '--target', :id, '--name', '<custom_name>', '--vendorid', '<vID>', '--productid', '<pID>']
|
||||||
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", 1]
|
end
|
||||||
vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
|
|
||||||
|
|
||||||
# additional USB passthrough entries
|
|
||||||
# vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', '<custom_name>', '--vendorid', '<vID>', '--productid', '<pID>']
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.synced_folder RIOTBASE, "/home/vagrant/RIOT"
|
|
||||||
|
|
||||||
if File.exists?(File.join(Dir.home, ".gitconfig"))
|
|
||||||
config.vm.provision "file", source: File.join(Dir.home, ".gitconfig"), destination: ".gitconfig"
|
|
||||||
end
|
|
||||||
# use a custom provisioning script
|
|
||||||
# config.vm.provision "shell", path: "dist/tools/vagrant/bootstrap.sh"
|
|
||||||
end
|
end
|
||||||
|
15
boards/6lowpan-clicker/Kconfig
Normal file
15
boards/6lowpan-clicker/Kconfig
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "6lowpan-clicker" if BOARD_6LOWPAN_CLICKER
|
||||||
|
|
||||||
|
config BOARD_6LOWPAN_CLICKER
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select CPU_MODEL_P32MX470F512H
|
||||||
|
select HAS_PERIPH_TIMER
|
||||||
|
select HAS_PERIPH_UART
|
5
boards/6lowpan-clicker/Makefile.dep
Normal file
5
boards/6lowpan-clicker/Makefile.dep
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||||
|
USEMODULE += saul_gpio
|
||||||
|
endif
|
||||||
|
|
||||||
|
USEMODULE += newlib_syscalls_mips_uhi
|
6
boards/6lowpan-clicker/Makefile.features
Normal file
6
boards/6lowpan-clicker/Makefile.features
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
CPU = mips_pic32mx
|
||||||
|
CPU_MODEL = p32mx470f512h
|
||||||
|
|
||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
FEATURES_PROVIDED += periph_uart
|
15
boards/6lowpan-clicker/Makefile.include
Normal file
15
boards/6lowpan-clicker/Makefile.include
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# use pic32prog by default to program this board
|
||||||
|
PROGRAMMER ?= pic32prog
|
||||||
|
PROGRAMMERS_SUPPORTED += pic32prog
|
||||||
|
ifeq ($(PROGRAMMER),pic32prog)
|
||||||
|
# pic32prog
|
||||||
|
#
|
||||||
|
# For PICkit3:
|
||||||
|
#
|
||||||
|
# * Connect the chipKIT-Wi-Fire to USB
|
||||||
|
# * Connect the PICkit3 to ICSP holes
|
||||||
|
# * https://docs.creatordev.io/wifire/guides/wifire-programming/
|
||||||
|
# * The triangle `▶` goes into the port number 1 (a hole with a square around it)
|
||||||
|
# opposite side of the JP1 ICSP text.
|
||||||
|
FLASHFILE ?= $(HEXFILE)
|
||||||
|
endif
|
20
boards/6lowpan-clicker/clicker.c
Normal file
20
boards/6lowpan-clicker/clicker.c
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright(C) 2016,2017, Imagination Technologies Limited and/or its
|
||||||
|
* affiliated group companies.
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "periph/gpio.h"
|
||||||
|
|
||||||
|
extern void dummy(void);
|
||||||
|
|
||||||
|
void board_init(void)
|
||||||
|
{
|
||||||
|
/* Stop the linker from throwing away the PIC32 config register settings */
|
||||||
|
dummy();
|
||||||
|
}
|
95
boards/6lowpan-clicker/doc.txt
Normal file
95
boards/6lowpan-clicker/doc.txt
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
/**
|
||||||
|
@defgroup boards_6lowpan-clicker MikroE 6LoWPAN Clicker
|
||||||
|
@ingroup boards
|
||||||
|
@brief Support for the MikroE 6LoWPAN Clicker
|
||||||
|
@deprecated Will not be available after the 2022.07 release. This includes
|
||||||
|
all MIPS based boards and cpus.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The `6lowpan clicker` is an evaluation board by Mikroe featuring a
|
||||||
|
PIC32MX470F512H, a 6lowpan radio (CA810) by Cascoda and a Mikrobus
|
||||||
|
socket for expansion boards.
|
||||||
|
|
||||||
|
More general information on the board and related documentation can be found
|
||||||
|
[here](https://www.mikroe.com/clicker-6lowpan). Schematics for the board can be
|
||||||
|
found in the [manual](https://download.mikroe.com/documents/starter-boards/clicker/6lowpan/6lowpan-clicker-manual-v100.pdf).
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
### MCU
|
||||||
|
|
||||||
|
| MCU | PIC32MX470F512H |
|
||||||
|
|:---------- |:-------------------- |
|
||||||
|
| Family | PIC32MX (MIPS M4K) |
|
||||||
|
| Vendor | Microchip |
|
||||||
|
| RAM | 128KiB |
|
||||||
|
| Flash | 512KiB |
|
||||||
|
| Frequency | 120MHz |
|
||||||
|
| FPU | no |
|
||||||
|
| Timers | 5 (all 16-bit) |
|
||||||
|
| ADCs | 1x 28-channel 10-bit |
|
||||||
|
| USB 2.0 | 1 |
|
||||||
|
| UARTs | 4 |
|
||||||
|
| SPIs | 2 |
|
||||||
|
| I2Cs | 2 |
|
||||||
|
| RTC | yes |
|
||||||
|
| RNG | no |
|
||||||
|
| Vcc | 2.3V - 3.6V |
|
||||||
|
| Datasheet | [Datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/PIC32MX330350370430450470_Datasheet_DS60001185H.pdf) |
|
||||||
|
|
||||||
|
|
||||||
|
### User Interface
|
||||||
|
|
||||||
|
2 Buttons:
|
||||||
|
|
||||||
|
| NAME | T1 | T2 |
|
||||||
|
|:----- |:--- |:--- |
|
||||||
|
| Pin | RE7 | RB0 |
|
||||||
|
|
||||||
|
2 LEDs:
|
||||||
|
|
||||||
|
| NAME | LD1 | LD2 |
|
||||||
|
| ----- | --- | --- |
|
||||||
|
| Color | red | red |
|
||||||
|
| Pin | RB1 | RB2 |
|
||||||
|
|
||||||
|
## Implementation Status
|
||||||
|
|
||||||
|
| Device | ID | Supported | Comments |
|
||||||
|
|:---------------- |:--------------- |:--------- |:---------------------- |
|
||||||
|
| MCU | pic32mx470f512h | partly | |
|
||||||
|
| Low-level driver | GPIO | partly | gpio_irq not supported |
|
||||||
|
| | ADC | no | |
|
||||||
|
| | PWM | no | |
|
||||||
|
| | UART | yes | |
|
||||||
|
| | I2C | no | |
|
||||||
|
| | SPI | no | |
|
||||||
|
| | USB | no | |
|
||||||
|
| | RTT | no | |
|
||||||
|
| | RTC | no | |
|
||||||
|
| | Timer | no | |
|
||||||
|
|
||||||
|
## Using UART
|
||||||
|
|
||||||
|
This board doesn't open an UART or serial interface through the USB
|
||||||
|
automatically, and the USB device driver hasn't been implemented to RIOT.
|
||||||
|
Therefore, to open an UART interface one has to connect a usb/ttl converter to
|
||||||
|
the UART3 pins RF5 (RX) and RF4 (TX) available on the Mikrobus socket.
|
||||||
|
|
||||||
|
## Flashing the device
|
||||||
|
|
||||||
|
There are two ways to flash the MCU:
|
||||||
|
* Using MPLAB-IPE and a PICkit 3 (The RIOT build generates a hexfile
|
||||||
|
compatible with MPLAB-IPE)
|
||||||
|
* Using pic32prog and a PICkit 2 or a PICkit 3 (other devices might be
|
||||||
|
supported by pic32prog but were not tested). This is the preferred option
|
||||||
|
as it makes possible to flash the device using `make flash` command.
|
||||||
|
|
||||||
|
## Supported Toolchains
|
||||||
|
|
||||||
|
For using the 6lowpan-clicker board we strongly recommend the usage of the
|
||||||
|
[Codescape GNU Tools](https://codescape.mips.com) toolchain.
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
77
boards/6lowpan-clicker/include/board.h
Normal file
77
boards/6lowpan-clicker/include/board.h
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* Copyright(C) 2016,2017, Imagination Technologies Limited and/or its
|
||||||
|
* affiliated group companies.
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_6lowpan-clicker
|
||||||
|
* @details
|
||||||
|
* see:
|
||||||
|
* https://www.mikroe.com/clicker-6lowpan
|
||||||
|
* For more information on the board.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief board configuration for the MikroE 6LoWPAN Clicker
|
||||||
|
*
|
||||||
|
* @author Neil Jones <Neil.Jones@imgtec.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "periph_conf.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set how many increments of the count register per uS
|
||||||
|
* needed by the timer code.
|
||||||
|
*/
|
||||||
|
#define TICKS_PER_US (48)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LED pin configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LED1_PIN GPIO_PIN(PORT_B, 1)
|
||||||
|
#define LED2_PIN GPIO_PIN(PORT_B, 2)
|
||||||
|
|
||||||
|
#define LED1_MASK (1 << 1)
|
||||||
|
#define LED2_MASK (1 << 2)
|
||||||
|
|
||||||
|
#define LED1_ON (LATBSET = LED1_MASK)
|
||||||
|
#define LED1_OFF (LATBCLR = LED1_MASK)
|
||||||
|
#define LED1_TOGGLE (LATBINV = LED1_MASK)
|
||||||
|
|
||||||
|
#define LED2_ON (LATBSET = LED2_MASK)
|
||||||
|
#define LED2_OFF (LATBCLR = LED2_MASK)
|
||||||
|
#define LED2_TOGGLE (LATBINV = LED2_MASK)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Button pin configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define BTN0_PIN GPIO_PIN(PORT_E, 7)
|
||||||
|
#define BTN0_MODE GPIO_IN
|
||||||
|
|
||||||
|
#define BTN1_PIN GPIO_PIN(PORT_B, 0)
|
||||||
|
#define BTN1_MODE GPIO_IN
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
|
/** @} */
|
61
boards/6lowpan-clicker/include/gpio_params.h
Normal file
61
boards/6lowpan-clicker/include/gpio_params.h
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Francois Berder
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_6lowpan-clicker
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Configuration of SAUL mapped GPIO pins
|
||||||
|
*
|
||||||
|
* @author Francois Berder <fberder@outlook.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GPIO_PARAMS_H
|
||||||
|
#define GPIO_PARAMS_H
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "saul/periph.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GPIO configuration
|
||||||
|
*/
|
||||||
|
static const saul_gpio_params_t saul_gpio_params[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
.name = "LD1",
|
||||||
|
.pin = LED1_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "LD2",
|
||||||
|
.pin = LED2_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "T1",
|
||||||
|
.pin = BTN0_PIN,
|
||||||
|
.mode = BTN0_MODE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "T2",
|
||||||
|
.pin = BTN1_PIN,
|
||||||
|
.mode = BTN1_MODE,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GPIO_PARAMS_H */
|
||||||
|
/** @} */
|
82
boards/6lowpan-clicker/include/periph_conf.h
Normal file
82
boards/6lowpan-clicker/include/periph_conf.h
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright(C) 2016,2017, Imagination Technologies Limited and/or its
|
||||||
|
* affiliated group companies.
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_6lowpan-clicker
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief peripheral configuration for the MikroE 6LoWPAN Clicker
|
||||||
|
*
|
||||||
|
* @author Neil Jones <Neil.Jones@imgtec.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PERIPH_CONF_H
|
||||||
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "macros/units.h"
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Clock configurations
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief The peripheral clock is required for the UART Baud rate calculation
|
||||||
|
* It is configured by the 'config' registers (see pic32_config_settings.c)
|
||||||
|
* Note 120MHz is the max F for this device.
|
||||||
|
*/
|
||||||
|
#define PERIPHERAL_CLOCK MHZ(96)
|
||||||
|
|
||||||
|
#define CLOCK_CORECLOCK MHZ(120)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Timer definitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define TIMER_NUMOF (1)
|
||||||
|
#define TIMER_0_CHANNELS (3)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name UART Definitions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const uart_conf_t uart_config[] = {
|
||||||
|
{ /* UART port available on MikroBus */
|
||||||
|
.base = (volatile unsigned int *)_UART3_BASE_ADDRESS,
|
||||||
|
.clock = PERIPHERAL_CLOCK,
|
||||||
|
.rx_pin = GPIO_PIN(PORT_F, 5),
|
||||||
|
.tx_pin = GPIO_PIN(PORT_F, 4),
|
||||||
|
.rx_mux_reg = &U3RXR,
|
||||||
|
.tx_mux_reg = &RPF4R,
|
||||||
|
.rx_af = GPIO_AF2,
|
||||||
|
.tx_af = GPIO_AF1,
|
||||||
|
.vector = _UART_3_VECTOR,
|
||||||
|
.irq = _UART3_RX_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#define UART_0_ISR (isr_usart3)
|
||||||
|
#define UART_NUMOF ((unsigned int)ARRAY_SIZE(uart_config))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PERIPH_CONF_H */
|
||||||
|
/** @} */
|
@ -31,8 +31,6 @@ volatile uint32_t _DEVCFG3 __attribute__((used, section(".devcfg3"))) =
|
|||||||
| (_DEVCFG3_FUSBIDIO_MASK & 0 << _DEVCFG3_FUSBIDIO_POSITION)
|
| (_DEVCFG3_FUSBIDIO_MASK & 0 << _DEVCFG3_FUSBIDIO_POSITION)
|
||||||
| (_DEVCFG3_FVBUSONIO_MASK & 1 << _DEVCFG3_FVBUSONIO_POSITION);
|
| (_DEVCFG3_FVBUSONIO_MASK & 1 << _DEVCFG3_FVBUSONIO_POSITION);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Note this sets the PLL to 96MHz (8/2 * 24) which is only supported by 3xx
|
/* Note this sets the PLL to 96MHz (8/2 * 24) which is only supported by 3xx
|
||||||
* and 4xx parts and assumes an 8MHz XTAL.
|
* and 4xx parts and assumes an 8MHz XTAL.
|
||||||
*
|
*
|
||||||
@ -86,7 +84,6 @@ volatile uint32_t _DEVCFG1 __attribute__ ((used, section(".devcfg1"))) =
|
|||||||
& (~_DEVCFG1_FWDTEN_MASK | 0 << _DEVCFG1_FWDTEN_POSITION)
|
& (~_DEVCFG1_FWDTEN_MASK | 0 << _DEVCFG1_FWDTEN_POSITION)
|
||||||
& (~_DEVCFG1_FWDTWINSZ_MASK | 3 << _DEVCFG1_FWDTWINSZ_POSITION);
|
& (~_DEVCFG1_FWDTWINSZ_MASK | 3 << _DEVCFG1_FWDTWINSZ_POSITION);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DEVCFG0 @ 0x1FC02FFC
|
* DEVCFG0 @ 0x1FC02FFC
|
||||||
*
|
*
|
24
boards/Kconfig
Normal file
24
boards/Kconfig
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
#
|
||||||
|
config BOARD
|
||||||
|
string
|
||||||
|
help
|
||||||
|
Name of the currently selected board.
|
||||||
|
|
||||||
|
config MODULE_BOARD
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on TEST_KCONFIG
|
||||||
|
help
|
||||||
|
Module which holds all board-specific files.
|
||||||
|
|
||||||
|
config MODULE_BOARD_COMMON_INIT
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on TEST_KCONFIG
|
||||||
|
help
|
||||||
|
Common board initialization module
|
21
boards/acd52832/Kconfig
Normal file
21
boards/acd52832/Kconfig
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "acd52832" if BOARD_ACD52832
|
||||||
|
|
||||||
|
config BOARD_ACD52832
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select BOARD_COMMON_NRF52
|
||||||
|
select CPU_MODEL_NRF52832XXAA
|
||||||
|
select HAS_PERIPH_I2C
|
||||||
|
select HAS_PERIPH_SPI
|
||||||
|
select HAS_PERIPH_UART
|
||||||
|
|
||||||
|
select HAVE_SAUL_GPIO
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/nrf52xxxdk/Kconfig"
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2017 HAW Hamburg
|
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser
|
|
||||||
* General Public License v2.1. See the file LICENSE in the top level
|
|
||||||
* directory for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ingroup boards_acd52832
|
|
||||||
* @{
|
|
||||||
*
|
|
||||||
* @file
|
|
||||||
* @brief Board initialization for the ACD52832
|
|
||||||
*
|
|
||||||
* @author Dimitri Nahm <dimitri.nahm@haw-hamburg.de>
|
|
||||||
*
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "board.h"
|
|
||||||
#include "periph/gpio.h"
|
|
||||||
|
|
||||||
void board_init(void)
|
|
||||||
{
|
|
||||||
/* initialize the boards LEDs */
|
|
||||||
gpio_init(LED0_PIN, GPIO_OUT);
|
|
||||||
gpio_set(LED0_PIN);
|
|
||||||
|
|
||||||
/* initialize the CPU */
|
|
||||||
cpu_init();
|
|
||||||
}
|
|
@ -50,11 +50,6 @@ extern "C" {
|
|||||||
#define BTN0_MODE GPIO_IN_PU
|
#define BTN0_MODE GPIO_IN_PU
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
||||||
*/
|
|
||||||
void board_init(void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,7 +46,6 @@ static const saul_gpio_params_t saul_gpio_params[] =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -54,10 +54,11 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
static const spi_conf_t spi_config[] = {
|
static const spi_conf_t spi_config[] = {
|
||||||
{
|
{
|
||||||
.dev = NRF_SPI0,
|
.dev = NRF_SPIM0,
|
||||||
.sclk = 4,
|
.sclk = 4,
|
||||||
.mosi = 3,
|
.mosi = 3,
|
||||||
.miso = 13
|
.miso = 13,
|
||||||
|
.ppi = 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
28
boards/adafruit-clue/Kconfig
Normal file
28
boards/adafruit-clue/Kconfig
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "adafruit-clue" if BOARD_ADAFRUIT_CLUE
|
||||||
|
|
||||||
|
config BOARD_ADAFRUIT_CLUE
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select BOARD_COMMON_NRF52
|
||||||
|
select CPU_MODEL_NRF52840XXAA
|
||||||
|
select HAS_PERIPH_I2C
|
||||||
|
select HAS_PERIPH_SPI
|
||||||
|
select HAS_PERIPH_UART
|
||||||
|
select HAS_PERIPH_USBDEV
|
||||||
|
select HAS_HIGHLEVEL_STDIO
|
||||||
|
|
||||||
|
select HAVE_APDS9960
|
||||||
|
select HAVE_BMP280_I2C
|
||||||
|
select HAVE_ILI9341
|
||||||
|
select HAVE_LIS3MDL
|
||||||
|
select HAVE_SAUL_GPIO
|
||||||
|
select HAVE_SHT3X
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
14
boards/adafruit-clue/Makefile.dep
Normal file
14
boards/adafruit-clue/Makefile.dep
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||||
|
USEMODULE += saul_gpio
|
||||||
|
USEMODULE += apds9960
|
||||||
|
USEMODULE += bmp280_i2c
|
||||||
|
USEMODULE += lis3mdl
|
||||||
|
USEMODULE += sht3x
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter disp_dev,$(USEMODULE)))
|
||||||
|
USEMODULE += ili9341
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/nrf52/bootloader_nrfutil.dep.mk
|
||||||
|
include $(RIOTBOARD)/common/nrf52/Makefile.dep
|
18
boards/adafruit-clue/Makefile.features
Normal file
18
boards/adafruit-clue/Makefile.features
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
CPU_MODEL = nrf52840xxaa
|
||||||
|
|
||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_i2c
|
||||||
|
FEATURES_PROVIDED += periph_spi
|
||||||
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
FEATURES_PROVIDED += periph_usbdev
|
||||||
|
|
||||||
|
# Various other features (if any)
|
||||||
|
FEATURES_PROVIDED += highlevel_stdio
|
||||||
|
|
||||||
|
# This configuration enables modules that are only available when using Kconfig
|
||||||
|
# module modelling
|
||||||
|
ifeq (1,$(TEST_KCONFIG))
|
||||||
|
KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/nrf52/Makefile.features
|
25
boards/adafruit-clue/Makefile.include
Normal file
25
boards/adafruit-clue/Makefile.include
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Adafruit-nrfutil is the default programmer
|
||||||
|
PROGRAMMER ?= adafruit-nrfutil
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
PROGRAMMERS_SUPPORTED += adafruit-nrfutil
|
||||||
|
|
||||||
|
ifeq ($(PROGRAMMER),adafruit-nrfutil)
|
||||||
|
# The preinstalled bootloader must also be taken into account so
|
||||||
|
# ROM_OFFSET skips the space taken by such bootloader.
|
||||||
|
ROM_OFFSET = 0x26000
|
||||||
|
|
||||||
|
ifneq (,$(filter reset flash flash-only, $(MAKECMDGOALS)))
|
||||||
|
# Add 2 seconds delay before opening terminal: this is required when opening
|
||||||
|
# the terminal right after flashing. In this case, the stdio over USB needs
|
||||||
|
# some time after reset before being ready.
|
||||||
|
TERM_DELAY = 2
|
||||||
|
TERMDEPS += term-delay
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
term-delay:
|
||||||
|
sleep $(TERM_DELAY)
|
||||||
|
|
||||||
|
TESTRUNNER_CONNECT_DELAY ?= $(TERM_DELAY)
|
||||||
|
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
31
boards/adafruit-clue/board.c
Normal file
31
boards/adafruit-clue/board.c
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-clue
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board initialization for the Adafruit Clue
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "board.h"
|
||||||
|
|
||||||
|
#include "periph/gpio.h"
|
||||||
|
|
||||||
|
void board_init(void)
|
||||||
|
{
|
||||||
|
/* initialize the screen backlight, turn it off by default */
|
||||||
|
gpio_init(BACKLIGHT_PIN, GPIO_OUT);
|
||||||
|
gpio_clear(BACKLIGHT_PIN);
|
||||||
|
}
|
45
boards/adafruit-clue/doc.txt
Normal file
45
boards/adafruit-clue/doc.txt
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
@defgroup boards_adafruit-clue Adafruit Clue
|
||||||
|
@ingroup boards
|
||||||
|
@brief Support for the Adafruit Clue
|
||||||
|
|
||||||
|
### General information
|
||||||
|
|
||||||
|
The [Adafruit Clue](https://www.adafruit.com/clue) board
|
||||||
|
is an opensource, micro development kit using the nRF52840 SoC.
|
||||||
|
This board provides 802.15.4 and BLE connectivity.
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/adafruit/Adafruit-CLUE-PCB/master/assets/4500.jpg"
|
||||||
|
alt="Adafruit Clue" style="height:800px;"/>
|
||||||
|
|
||||||
|
### Schematics
|
||||||
|
|
||||||
|
The board detailed description and schematic is available
|
||||||
|
[here](https://github.com/adafruit/Adafruit-CLUE-PCB).
|
||||||
|
|
||||||
|
### Flash the board
|
||||||
|
|
||||||
|
The board is flashed using the `adafruit-nrfutil` Python package:
|
||||||
|
```
|
||||||
|
$ pip install --user adafruit-nrfutil
|
||||||
|
```
|
||||||
|
|
||||||
|
Example with `hello-world` application:
|
||||||
|
```
|
||||||
|
make BOARD=adafruit-clue -C examples/hello-world flash
|
||||||
|
```
|
||||||
|
|
||||||
|
### Accessing STDIO via UART
|
||||||
|
|
||||||
|
The STDIO is directly accessible via the USB port. On a Linux host, it's
|
||||||
|
generally mapped to `/dev/ttyACM0`.
|
||||||
|
|
||||||
|
Use the `term` target to connect to the board serial port<br/>
|
||||||
|
```
|
||||||
|
make BOARD=adafruit-clue -C examples/hello-world term
|
||||||
|
```
|
||||||
|
|
||||||
|
The `TERM_DELAY` environment variable can be used to add a delay (in second)
|
||||||
|
before opening the serial terminal. The default value is 2s which should be
|
||||||
|
enough in most of the situations.
|
||||||
|
*/
|
118
boards/adafruit-clue/include/board.h
Normal file
118
boards/adafruit-clue/include/board.h
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-clue
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific configuration for the Adafruit Clue board
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "board_common.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LEDs pin configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LED0_PIN GPIO_PIN(1, 1) /**< LED0 pin */
|
||||||
|
#define LED0_MASK (1 << 1) /**< LED0 mask */
|
||||||
|
#define LED0_ON (NRF_P1->OUTSET = LED0_MASK) /**< Turn LED0 on */
|
||||||
|
#define LED0_OFF (NRF_P1->OUTCLR = LED0_MASK) /**< Turn LED0 off */
|
||||||
|
#define LED0_TOGGLE (NRF_P1->OUT ^= LED0_MASK) /**< Toggle LED0 */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Buttons pin configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define BTN0_PIN GPIO_PIN(1, 2) /**< Button A pin */
|
||||||
|
#define BTN0_MODE GPIO_IN_PU /**< Button A mode */
|
||||||
|
|
||||||
|
#define BTN1_PIN GPIO_PIN(1, 10) /**< Button B pin */
|
||||||
|
#define BTN1_MODE GPIO_IN_PU /**< Button B mode */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name APDS9960 sensor configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define APDS99XX_PARAM_DEV I2C_DEV(1) /**< I2C device */
|
||||||
|
#define APDS99XX_PARAM_INT_PIN GPIO_PIN(0, 9) /**< Interrupt pin */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name BMP280 sensor configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define BMX280_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LIS3MDL 3-axis magnetometer
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LIS3MDL_PARAM_I2C I2C_DEV(1) /**< I2C device */
|
||||||
|
#define LIS3MDL_PARAM_ADDR (0x1C) /**< I2C address */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name STH31 temperature and humidity sensor
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define SHT3X_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
|
||||||
|
#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1) /**< I2C address */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Speaker pin
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define SPKR_PIN GPIO_PIN(1, 0) /**< Speaker pin */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Backlight control defines, default uses LCD_BACKLIGHT_LOW values
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define BACKLIGHT_PIN GPIO_PIN(1, 5) /**< Backlight pin */
|
||||||
|
#define BACKLIGHT_MASK (1 << 5) /**< Backlight pin mask */
|
||||||
|
#define BACKLIGHT_ON (NRF_P1->OUTSET = BACKLIGHT_MASK) /**< Turn backlight on */
|
||||||
|
#define BACKLIGHT_OFF (NRF_P1->OUTCLR = BACKLIGHT_MASK) /**< Turn backlight off */
|
||||||
|
/** @ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Display configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define ILI9341_PARAM_SPI SPI_DEV(1) /**< SPI device */
|
||||||
|
#define ILI9341_PARAM_CS GPIO_PIN(0, 12) /**< Chip select pin */
|
||||||
|
#define ILI9341_PARAM_DCX GPIO_PIN(0, 13) /**< DCX pin */
|
||||||
|
#define ILI9341_PARAM_RST GPIO_PIN(1, 3) /**< Reset pin */
|
||||||
|
#define ILI9341_PARAM_NUM_LINES (240U) /**< Number of screen lines */
|
||||||
|
#define ILI9341_PARAM_RGB (1) /**< RGB configuration */
|
||||||
|
#define ILI9341_PARAM_INVERTED (1) /**< Inversion configuration */
|
||||||
|
#define ILI9341_PARAM_ROTATION (ILI9341_ROTATION_HORZ_FLIP) /**< Rotation mode */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
|
/** @} */
|
58
boards/adafruit-clue/include/gpio_params.h
Normal file
58
boards/adafruit-clue/include/gpio_params.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-clue
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Configuration of SAUL mapped GPIO pins
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GPIO_PARAMS_H
|
||||||
|
#define GPIO_PARAMS_H
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "saul/periph.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LED configuration
|
||||||
|
*/
|
||||||
|
static const saul_gpio_params_t saul_gpio_params[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
.name = "LED0 (Red)",
|
||||||
|
.pin = LED0_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "Button A",
|
||||||
|
.pin = BTN0_PIN,
|
||||||
|
.mode = BTN0_MODE,
|
||||||
|
.flags = SAUL_GPIO_INVERTED,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "Button B",
|
||||||
|
.pin = BTN1_PIN,
|
||||||
|
.mode = BTN1_MODE,
|
||||||
|
.flags = SAUL_GPIO_INVERTED,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GPIO_PARAMS_H */
|
||||||
|
/** @} */
|
123
boards/adafruit-clue/include/periph_conf.h
Normal file
123
boards/adafruit-clue/include/periph_conf.h
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-clue
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Peripheral configuration for the Adafruit Clue board
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PERIPH_CONF_H
|
||||||
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
#include "cfg_clock_32_0.h"
|
||||||
|
#include "cfg_rtt_default.h"
|
||||||
|
#include "cfg_timer_default.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name UART configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief UART configuration.
|
||||||
|
*/
|
||||||
|
static const uart_conf_t uart_config[] = {
|
||||||
|
{
|
||||||
|
.dev = NRF_UARTE0,
|
||||||
|
.rx_pin = GPIO_PIN(0, 4),
|
||||||
|
.tx_pin = GPIO_PIN(0, 5),
|
||||||
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
|
.rts_pin = GPIO_UNDEF,
|
||||||
|
.cts_pin = GPIO_UNDEF,
|
||||||
|
#endif
|
||||||
|
.irqn = UARTE0_UART0_IRQn,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief UART 0 Interrupt Service Routine.
|
||||||
|
*/
|
||||||
|
#define UART_0_ISR (isr_uart0)
|
||||||
|
/**
|
||||||
|
* @brief Number of UART peripherals.
|
||||||
|
*/
|
||||||
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2C configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief I2C configuration.
|
||||||
|
*/
|
||||||
|
static const i2c_conf_t i2c_config[] = {
|
||||||
|
{ /* External connectors */
|
||||||
|
.dev = NRF_TWIM0,
|
||||||
|
.scl = GPIO_PIN(0, 0), /* D19 */
|
||||||
|
.sda = GPIO_PIN(0, 30), /* D20 */
|
||||||
|
.speed = I2C_SPEED_NORMAL
|
||||||
|
},
|
||||||
|
{ /* On board sensors */
|
||||||
|
.dev = NRF_TWIM1,
|
||||||
|
.scl = GPIO_PIN(0, 25),
|
||||||
|
.sda = GPIO_PIN(0, 24),
|
||||||
|
.speed = I2C_SPEED_NORMAL
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of I2C peripherals.
|
||||||
|
*/
|
||||||
|
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SPI configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief SPI configuration.
|
||||||
|
*/
|
||||||
|
static const spi_conf_t spi_config[] = {
|
||||||
|
{ /* External connectors */
|
||||||
|
.dev = NRF_SPIM0,
|
||||||
|
.sclk = GPIO_PIN(0, 23), /* D13 */
|
||||||
|
.mosi = GPIO_PIN(0, 21), /* D15 */
|
||||||
|
.miso = GPIO_PIN(0, 22), /* D14 */
|
||||||
|
},
|
||||||
|
{ /* TFT LCD screen */
|
||||||
|
.dev = NRF_SPIM1,
|
||||||
|
.sclk = GPIO_PIN(0, 14),
|
||||||
|
.mosi = GPIO_PIN(0, 15),
|
||||||
|
.miso = GPIO_PIN(0, 0),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of SPI peripherals.
|
||||||
|
*/
|
||||||
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PERIPH_CONF_H */
|
||||||
|
/** @} */
|
38
boards/adafruit-clue/reset.c
Normal file
38
boards/adafruit-clue/reset.c
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-clue
|
||||||
|
* @{
|
||||||
|
* @file
|
||||||
|
* @brief Implementation for managing the nrfutil bootloader
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef MODULE_USB_BOARD_RESET
|
||||||
|
|
||||||
|
#define USB_H_USER_IS_RIOT_INTERNAL
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "usb_board_reset.h"
|
||||||
|
|
||||||
|
/* Set the value used by the bootloader to select between boot in
|
||||||
|
application and boot in bootloader mode. */
|
||||||
|
#define NRF52_DOUBLE_TAP_MAGIC_NUMBER (0x4e)
|
||||||
|
|
||||||
|
void usb_board_reset_in_bootloader(void)
|
||||||
|
{
|
||||||
|
NRF_POWER->GPREGRET = NRF52_DOUBLE_TAP_MAGIC_NUMBER;
|
||||||
|
|
||||||
|
usb_board_reset_in_application();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MODULE_USB_BOARD_RESET */
|
31
boards/adafruit-itsybitsy-m4/Kconfig
Normal file
31
boards/adafruit-itsybitsy-m4/Kconfig
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Copyright (c) 2021 ML!PA Consulting GmbH
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "adafruit-itsybitsy-m4" if BOARD_ADAFRUIT_ITSYBITSY_M4
|
||||||
|
|
||||||
|
config BOARD_ADAFRUIT_ITSYBITSY_M4
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select CPU_MODEL_SAMD51G19A
|
||||||
|
select HAS_HIGHLEVEL_STDIO
|
||||||
|
select HAS_PERIPH_DAC
|
||||||
|
select HAS_PERIPH_ADC
|
||||||
|
select HAS_PERIPH_I2C
|
||||||
|
select HAS_PERIPH_RTC
|
||||||
|
select HAS_PERIPH_RTT
|
||||||
|
select HAS_PERIPH_PWM
|
||||||
|
select HAS_PERIPH_SPI
|
||||||
|
select HAS_PERIPH_TIMER
|
||||||
|
select HAS_PERIPH_UART
|
||||||
|
select HAS_PERIPH_USBDEV
|
||||||
|
select HAVE_SAUL_GPIO
|
||||||
|
|
||||||
|
select HAVE_MTD_SPI_NOR
|
||||||
|
# This specific board requires SPI_ON_QSPI for the MTD_SPI_NOR
|
||||||
|
select MODULE_PERIPH_SPI_ON_QSPI if MODULE_MTD_SPI_NOR
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"
|
5
boards/adafruit-itsybitsy-m4/Makefile
Normal file
5
boards/adafruit-itsybitsy-m4/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
MODULE = board
|
||||||
|
|
||||||
|
DIRS = $(RIOTBOARD)/common/samdx1-arduino-bootloader
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.base
|
11
boards/adafruit-itsybitsy-m4/Makefile.dep
Normal file
11
boards/adafruit-itsybitsy-m4/Makefile.dep
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||||
|
USEMODULE += saul_gpio
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter mtd,$(USEMODULE)))
|
||||||
|
FEATURES_REQUIRED += periph_spi_on_qspi
|
||||||
|
USEMODULE += mtd_spi_nor
|
||||||
|
endif
|
||||||
|
|
||||||
|
# setup the samd21 arduino bootloader related dependencies
|
||||||
|
include $(RIOTBOARD)/common/samdx1-arduino-bootloader/Makefile.dep
|
21
boards/adafruit-itsybitsy-m4/Makefile.features
Normal file
21
boards/adafruit-itsybitsy-m4/Makefile.features
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
CPU = samd5x
|
||||||
|
CPU_MODEL = samd51g19a
|
||||||
|
|
||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += highlevel_stdio
|
||||||
|
FEATURES_PROVIDED += periph_adc
|
||||||
|
FEATURES_PROVIDED += periph_dac
|
||||||
|
FEATURES_PROVIDED += periph_i2c
|
||||||
|
FEATURES_PROVIDED += periph_pwm
|
||||||
|
FEATURES_PROVIDED += periph_rtc
|
||||||
|
FEATURES_PROVIDED += periph_rtt
|
||||||
|
FEATURES_PROVIDED += periph_spi
|
||||||
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
FEATURES_PROVIDED += periph_usbdev
|
||||||
|
|
||||||
|
# This configuration enables modules that are only available when using Kconfig
|
||||||
|
# module modelling
|
||||||
|
ifeq (1, $(TEST_KCONFIG))
|
||||||
|
KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config
|
||||||
|
endif
|
6
boards/adafruit-itsybitsy-m4/Makefile.include
Normal file
6
boards/adafruit-itsybitsy-m4/Makefile.include
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
CFLAGS += -DBOOTLOADER_UF2
|
||||||
|
|
||||||
|
# Include all definitions for flashing with bossa other USB
|
||||||
|
include $(RIOTBOARD)/common/samdx1-arduino-bootloader/Makefile.include
|
||||||
|
# Include handling of serial and non-bossa programmers (if selected by user)
|
||||||
|
include $(RIOTMAKE)/boards/sam0.inc.mk
|
55
boards/adafruit-itsybitsy-m4/board.c
Normal file
55
boards/adafruit-itsybitsy-m4/board.c
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 ML!PA Consulting GmbH
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-m4
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific implementations for the Adafruit ItsyBitsy M4
|
||||||
|
*
|
||||||
|
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "periph/gpio.h"
|
||||||
|
#include "mtd_spi_nor.h"
|
||||||
|
#include "timex.h"
|
||||||
|
|
||||||
|
#ifdef MODULE_MTD
|
||||||
|
/* GD25x16 */
|
||||||
|
static const mtd_spi_nor_params_t _samd51_nor_params = {
|
||||||
|
.opcode = &mtd_spi_nor_opcode_default,
|
||||||
|
.wait_chip_erase = 15 * US_PER_SEC,
|
||||||
|
.wait_32k_erase = 150 * US_PER_MS,
|
||||||
|
.wait_64k_erase = 250 * US_PER_MS,
|
||||||
|
.wait_sector_erase = 50 * US_PER_MS,
|
||||||
|
.wait_chip_wake_up = 1 * US_PER_MS,
|
||||||
|
.clk = MHZ(54),
|
||||||
|
.flag = SPI_NOR_F_SECT_4K
|
||||||
|
| SPI_NOR_F_SECT_32K
|
||||||
|
| SPI_NOR_F_SECT_64K,
|
||||||
|
.spi = SPI_DEV(1),
|
||||||
|
.mode = SPI_MODE_0,
|
||||||
|
.cs = SAM0_QSPI_PIN_CS,
|
||||||
|
.wp = SAM0_QSPI_PIN_DATA_2,
|
||||||
|
.hold = SAM0_QSPI_PIN_DATA_3,
|
||||||
|
};
|
||||||
|
|
||||||
|
static mtd_spi_nor_t samd51_nor_dev = {
|
||||||
|
.base = {
|
||||||
|
.driver = &mtd_spi_nor_driver,
|
||||||
|
.page_size = 256,
|
||||||
|
.pages_per_sector = 16,
|
||||||
|
},
|
||||||
|
.params = &_samd51_nor_params,
|
||||||
|
};
|
||||||
|
|
||||||
|
mtd_dev_t *mtd0 = (mtd_dev_t *)&samd51_nor_dev;
|
||||||
|
#endif /* MODULE_MTD */
|
37
boards/adafruit-itsybitsy-m4/doc.txt
Normal file
37
boards/adafruit-itsybitsy-m4/doc.txt
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
@defgroup boards_adafruit-itsybitsy-m4 Adafruit-Itsybitsy-M4
|
||||||
|
@ingroup boards
|
||||||
|
@brief Support for the Adafruit-Itsybitsy-M4
|
||||||
|
|
||||||
|
### General information
|
||||||
|
|
||||||
|
![Adafruit-Itsybitsy-M4 compared to a quarter dollar](https://cdn-learn.adafruit.com/assets/assets/000/055/465/large1024/adafruit_products_3800_quarter_ORIG_2018_06.jpg?1529192175)
|
||||||
|
|
||||||
|
This is a small formfactor (only 1.4" long by 0.7" wide) SAM D51 board made by Adafruit.
|
||||||
|
|
||||||
|
The board features one red LED (LD1), one DotStar / APA102 RGB LED, a reset button as well as
|
||||||
|
21 configurable external pins(6 of which can be analog in).
|
||||||
|
|
||||||
|
### Links
|
||||||
|
|
||||||
|
- [Overview](https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4?view=all)
|
||||||
|
- [Schematics](https://learn.adafruit.com/assets/55481)
|
||||||
|
|
||||||
|
### Flash the board
|
||||||
|
|
||||||
|
The board is flashed using its on-board [boot loader](https://github.com/adafruit/uf2-samdx1).
|
||||||
|
|
||||||
|
The process is automated in the usual `make flash` target.
|
||||||
|
|
||||||
|
If RIOT is already running on the board, it will automatically reset the CPU and enter
|
||||||
|
the bootloader.
|
||||||
|
If some other firmware is running or RIOT crashed, you need to enter the bootloader
|
||||||
|
manually by double tapping the board's reset button.
|
||||||
|
|
||||||
|
Readiness of the bootloader is indicated by LD1 pulsing in red.
|
||||||
|
|
||||||
|
### Accessing STDIO
|
||||||
|
|
||||||
|
The usual way to obtain a console on this board is using an emulated USB serial port.
|
||||||
|
|
||||||
|
*/
|
73
boards/adafruit-itsybitsy-m4/include/board.h
Normal file
73
boards/adafruit-itsybitsy-m4/include/board.h
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 ML!PA Consulting GmbH
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-m4
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific definitions for the Adafruit ItsyBitsy M4
|
||||||
|
*
|
||||||
|
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "mtd.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LED pin definitions and handlers
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LED0_PIN GPIO_PIN(PA, 22)
|
||||||
|
|
||||||
|
#define LED_PORT PORT->Group[PA]
|
||||||
|
#define LED0_MASK (1 << 22)
|
||||||
|
|
||||||
|
#define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
|
||||||
|
#define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
|
||||||
|
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name APA102 / DotStar configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define APA102_PARAM_LED_NUMOF (1)
|
||||||
|
#define APA102_PARAM_DATA_PIN GPIO_PIN(PB, 3)
|
||||||
|
#define APA102_PARAM_CLK_PIN GPIO_PIN(PB, 2)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name MTD configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
extern mtd_dev_t *mtd0;
|
||||||
|
#define MTD_0 mtd0
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Xtimer configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define XTIMER_WIDTH (32)
|
||||||
|
#define XTIMER_HZ (1000000ul)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
|
/** @} */
|
46
boards/adafruit-itsybitsy-m4/include/gpio_params.h
Normal file
46
boards/adafruit-itsybitsy-m4/include/gpio_params.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 ML!PA Consulting GmbH
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-m4
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific configuration of direct mapped GPIOs
|
||||||
|
*
|
||||||
|
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GPIO_PARAMS_H
|
||||||
|
#define GPIO_PARAMS_H
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "saul/periph.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GPIO pin configuration
|
||||||
|
*/
|
||||||
|
static const saul_gpio_params_t saul_gpio_params[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
.name = "LED(red)",
|
||||||
|
.pin = LED0_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GPIO_PARAMS_H */
|
||||||
|
/** @} */
|
273
boards/adafruit-itsybitsy-m4/include/periph_conf.h
Normal file
273
boards/adafruit-itsybitsy-m4/include/periph_conf.h
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 ML!PA Consulting GmbH
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-m4
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Configuration of CPU peripherals for the Adafruit ItsyBitsy M4
|
||||||
|
*
|
||||||
|
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PERIPH_CONF_H
|
||||||
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name desired core clock frequency
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifndef CLOCK_CORECLOCK
|
||||||
|
#define CLOCK_CORECLOCK MHZ(120)
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name 32kHz Oscillator configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define EXTERNAL_OSC32_SOURCE 0
|
||||||
|
#define ULTRA_LOW_POWER_INTERNAL_OSC_SOURCE 1
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable the internal DC/DC converter
|
||||||
|
* The board is equipped with the necessary inductor.
|
||||||
|
*/
|
||||||
|
#define USE_VREG_BUCK (1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Timer peripheral configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const tc32_conf_t timer_config[] = {
|
||||||
|
{ /* Timer 0 - System Clock */
|
||||||
|
.dev = TC0,
|
||||||
|
.irq = TC0_IRQn,
|
||||||
|
.mclk = &MCLK->APBAMASK.reg,
|
||||||
|
.mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
|
||||||
|
.gclk_id = TC0_GCLK_ID,
|
||||||
|
.gclk_src = SAM0_GCLK_TIMER,
|
||||||
|
.flags = TC_CTRLA_MODE_COUNT32,
|
||||||
|
},
|
||||||
|
{ /* Timer 1 */
|
||||||
|
.dev = TC2,
|
||||||
|
.irq = TC2_IRQn,
|
||||||
|
.mclk = &MCLK->APBBMASK.reg,
|
||||||
|
.mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
|
||||||
|
.gclk_id = TC2_GCLK_ID,
|
||||||
|
.gclk_src = SAM0_GCLK_TIMER,
|
||||||
|
.flags = TC_CTRLA_MODE_COUNT32,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Timer 0 configuration */
|
||||||
|
#define TIMER_0_CHANNELS 2
|
||||||
|
#define TIMER_0_ISR isr_tc0
|
||||||
|
|
||||||
|
/* Timer 1 configuration */
|
||||||
|
#define TIMER_1_CHANNELS 2
|
||||||
|
#define TIMER_1_ISR isr_tc2
|
||||||
|
|
||||||
|
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name UART configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const uart_conf_t uart_config[] = {
|
||||||
|
{
|
||||||
|
.dev = &SERCOM3->USART,
|
||||||
|
.rx_pin = GPIO_PIN(PA, 16),
|
||||||
|
.tx_pin = GPIO_PIN(PA, 17),
|
||||||
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
|
.rts_pin = GPIO_UNDEF,
|
||||||
|
.cts_pin = GPIO_UNDEF,
|
||||||
|
#endif
|
||||||
|
.mux = GPIO_MUX_D,
|
||||||
|
.rx_pad = UART_PAD_RX_1,
|
||||||
|
.tx_pad = UART_PAD_TX_0,
|
||||||
|
.flags = UART_FLAG_NONE,
|
||||||
|
.gclk_src = SAM0_GCLK_PERIPH,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* interrupt function name mapping */
|
||||||
|
#define UART_0_ISR isr_sercom3_2
|
||||||
|
#define UART_0_ISR_TX isr_sercom3_0
|
||||||
|
|
||||||
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name PWM configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define PWM_0_EN 1
|
||||||
|
|
||||||
|
#if PWM_0_EN
|
||||||
|
/* PWM0 channels */
|
||||||
|
static const pwm_conf_chan_t pwm_chan0_config[] = {
|
||||||
|
/* GPIO pin, MUX value, TCC channel */
|
||||||
|
{ GPIO_PIN(PA, 22), GPIO_MUX_G, 2 },
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* PWM device configuration */
|
||||||
|
static const pwm_conf_t pwm_config[] = {
|
||||||
|
#if PWM_0_EN
|
||||||
|
{ .tim = TCC_CONFIG(TCC0),
|
||||||
|
.chan = pwm_chan0_config,
|
||||||
|
.chan_numof = ARRAY_SIZE(pwm_chan0_config),
|
||||||
|
.gclk_src = SAM0_GCLK_PERIPH,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
/* number of devices that are actually defined */
|
||||||
|
#define PWM_NUMOF ARRAY_SIZE(pwm_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SPI configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const spi_conf_t spi_config[] = {
|
||||||
|
{
|
||||||
|
.dev = &(SERCOM1->SPI),
|
||||||
|
.miso_pin = GPIO_PIN(PB, 23),
|
||||||
|
.mosi_pin = GPIO_PIN(PA, 0),
|
||||||
|
.clk_pin = GPIO_PIN(PA, 1),
|
||||||
|
.miso_mux = GPIO_MUX_C,
|
||||||
|
.mosi_mux = GPIO_MUX_D,
|
||||||
|
.clk_mux = GPIO_MUX_D,
|
||||||
|
.miso_pad = SPI_PAD_MISO_3,
|
||||||
|
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
|
||||||
|
.gclk_src = SAM0_GCLK_PERIPH,
|
||||||
|
#ifdef MODULE_PERIPH_DMA
|
||||||
|
.tx_trigger = SERCOM1_DMAC_ID_TX,
|
||||||
|
.rx_trigger = SERCOM1_DMAC_ID_RX,
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
#ifdef MODULE_PERIPH_SPI_ON_QSPI
|
||||||
|
{ /* QSPI in SPI mode */
|
||||||
|
.dev = QSPI,
|
||||||
|
.miso_pin = SAM0_QSPI_PIN_DATA_1,
|
||||||
|
.mosi_pin = SAM0_QSPI_PIN_DATA_0,
|
||||||
|
.clk_pin = SAM0_QSPI_PIN_CLK,
|
||||||
|
.miso_mux = SAM0_QSPI_MUX,
|
||||||
|
.mosi_mux = SAM0_QSPI_MUX,
|
||||||
|
.clk_mux = SAM0_QSPI_MUX,
|
||||||
|
.miso_pad = SPI_PAD_MISO_0, /* unused */
|
||||||
|
.mosi_pad = SPI_PAD_MOSI_0_SCK_1, /* unused */
|
||||||
|
.gclk_src = SAM0_GCLK_MAIN, /* unused */
|
||||||
|
#ifdef MODULE_PERIPH_DMA
|
||||||
|
.tx_trigger = QSPI_DMAC_ID_TX,
|
||||||
|
.rx_trigger = QSPI_DMAC_ID_RX,
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2C configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const i2c_conf_t i2c_config[] = {
|
||||||
|
{
|
||||||
|
.dev = &(SERCOM2->I2CM),
|
||||||
|
.speed = I2C_SPEED_NORMAL,
|
||||||
|
.scl_pin = GPIO_PIN(PA, 12),
|
||||||
|
.sda_pin = GPIO_PIN(PA, 13),
|
||||||
|
.mux = GPIO_MUX_C,
|
||||||
|
.gclk_src = SAM0_GCLK_PERIPH,
|
||||||
|
.flags = I2C_FLAG_NONE
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name RTT configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifndef RTT_FREQUENCY
|
||||||
|
#define RTT_FREQUENCY (32768U)
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name USB peripheral configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||||
|
{
|
||||||
|
.dm = GPIO_PIN(PA, 24),
|
||||||
|
.dp = GPIO_PIN(PA, 25),
|
||||||
|
.d_mux = GPIO_MUX_H,
|
||||||
|
.device = &USB->DEVICE,
|
||||||
|
.gclk_src = SAM0_GCLK_PERIPH,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name ADC Configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ADC Default values */
|
||||||
|
#define ADC_PRESCALER ADC_CTRLA_PRESCALER_DIV128
|
||||||
|
|
||||||
|
#define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG(0x18u)
|
||||||
|
#define ADC_REF_DEFAULT ADC_REFCTRL_REFSEL_INTVCC1
|
||||||
|
#define ADC_DEV ADC0
|
||||||
|
|
||||||
|
static const adc_conf_chan_t adc_channels[] = {
|
||||||
|
/* port, pin, muxpos */
|
||||||
|
{GPIO_PIN(PA, 2), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN0)},
|
||||||
|
{GPIO_PIN(PA, 5), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN5)},
|
||||||
|
{GPIO_PIN(PB, 8), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN2)},
|
||||||
|
{GPIO_PIN(PB, 9), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN3)},
|
||||||
|
{GPIO_PIN(PA, 4), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN4)},
|
||||||
|
{GPIO_PIN(PA, 6), ADC_INPUTCTRL_MUXPOS(ADC_INPUTCTRL_MUXPOS_AIN6)},
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name DAC configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/* Must not exceed 12 MHz */
|
||||||
|
#define DAC_CLOCK SAM0_GCLK_TIMER
|
||||||
|
/* Use external reference voltage on PA03 */
|
||||||
|
/* (You have to manually connect PA03 with Vcc) */
|
||||||
|
/* Internal reference only gives 1V */
|
||||||
|
#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PERIPH_CONF_H */
|
||||||
|
/** @} */
|
23
boards/adafruit-itsybitsy-nrf52/Kconfig
Normal file
23
boards/adafruit-itsybitsy-nrf52/Kconfig
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "adafruit-itsybitsy-nrf52" if BOARD_ADAFRUIT_ITSYBITSY_NRF52
|
||||||
|
|
||||||
|
config BOARD_ADAFRUIT_ITSYBITSY_NRF52
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select BOARD_COMMON_NRF52
|
||||||
|
select CPU_MODEL_NRF52840XXAA
|
||||||
|
select HAS_PERIPH_I2C
|
||||||
|
select HAS_PERIPH_SPI
|
||||||
|
select HAS_PERIPH_UART
|
||||||
|
select HAS_PERIPH_USBDEV
|
||||||
|
select HAS_HIGHLEVEL_STDIO
|
||||||
|
|
||||||
|
select HAVE_SAUL_GPIO
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
3
boards/adafruit-itsybitsy-nrf52/Makefile
Normal file
3
boards/adafruit-itsybitsy-nrf52/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MODULE = board
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.base
|
6
boards/adafruit-itsybitsy-nrf52/Makefile.dep
Normal file
6
boards/adafruit-itsybitsy-nrf52/Makefile.dep
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||||
|
USEMODULE += saul_gpio
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/nrf52/bootloader_nrfutil.dep.mk
|
||||||
|
include $(RIOTBOARD)/common/nrf52/Makefile.dep
|
18
boards/adafruit-itsybitsy-nrf52/Makefile.features
Normal file
18
boards/adafruit-itsybitsy-nrf52/Makefile.features
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
CPU_MODEL = nrf52840xxaa
|
||||||
|
|
||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_i2c
|
||||||
|
FEATURES_PROVIDED += periph_spi
|
||||||
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
FEATURES_PROVIDED += periph_usbdev
|
||||||
|
|
||||||
|
# Various other features (if any)
|
||||||
|
FEATURES_PROVIDED += highlevel_stdio
|
||||||
|
|
||||||
|
# This configuration enables modules that are only available when using Kconfig
|
||||||
|
# module modelling
|
||||||
|
ifeq (1,$(TEST_KCONFIG))
|
||||||
|
KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/nrf52/Makefile.features
|
31
boards/adafruit-itsybitsy-nrf52/Makefile.include
Normal file
31
boards/adafruit-itsybitsy-nrf52/Makefile.include
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# This board uses the vendor's serial bootloader
|
||||||
|
|
||||||
|
PROGRAMMER ?= nrfutil
|
||||||
|
|
||||||
|
ifeq (nrfutil,$(PROGRAMMER))
|
||||||
|
|
||||||
|
# For this board it is required to use Adafruit's implementation of nrfutil.
|
||||||
|
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
|
||||||
|
#
|
||||||
|
# This boards comes with Adafruit's bootloader:
|
||||||
|
# https://github.com/adafruit/Adafruit_nRF52_Bootloader
|
||||||
|
# In order to burn the application in the correct location, a offset of
|
||||||
|
# 0x26000 is required
|
||||||
|
|
||||||
|
ROM_OFFSET = 0x26000
|
||||||
|
ROM_LEN = 0xda000
|
||||||
|
|
||||||
|
FLASHFILE = $(HEXFILE)
|
||||||
|
FLASHDEPS += $(HEXFILE).zip
|
||||||
|
FLASHER = adafruit-nrfutil
|
||||||
|
FFLAGS = --verbose dfu serial -p ${PORT} -b 115200 --singlebank --package=$(HEXFILE).zip
|
||||||
|
|
||||||
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
%.hex.zip: %.hex
|
||||||
|
$(call check_cmd,$(FLASHER),Flash program and preparation tool)
|
||||||
|
$(FLASHER) dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application $< $@
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
PROGRAMMERS_SUPPORTED += nrfutil
|
50
boards/adafruit-itsybitsy-nrf52/doc.txt
Normal file
50
boards/adafruit-itsybitsy-nrf52/doc.txt
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
@defgroup boards_adafruit-itsybitsy-nrf52 Adafruit-Itsybitsy-nRF52
|
||||||
|
@ingroup boards
|
||||||
|
@brief Support for the Adafruit-Itsybitsy-nRF52
|
||||||
|
|
||||||
|
### General information
|
||||||
|
|
||||||
|
This is a small formfactor (only 1.4" long by 0.7" wide) nRF52840 board made by Adafruit.
|
||||||
|
|
||||||
|
The board features one LED (LD1: blue), a user (SW1) and a
|
||||||
|
reset button as well as 21 configurable external pins(6 of which can be analog in).
|
||||||
|
|
||||||
|
### Links
|
||||||
|
|
||||||
|
- [Overview](https://learn.adafruit.com/adafruit-itsybitsy-nrf52840-express?view=all)
|
||||||
|
- [Pinouts](https://learn.adafruit.com/adafruit-itsybitsy-nrf52840-express/pinouts)
|
||||||
|
|
||||||
|
### Flash the board
|
||||||
|
|
||||||
|
The board is flashed using its on-board [boot loader](https://github.com/adafruit/Adafruit_nRF52_Bootloader).
|
||||||
|
Adafruit has a special version of the [nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) that program needs to
|
||||||
|
be installed. It can turn the binary into a suitable zip file and send it to the DFU
|
||||||
|
bootloader.
|
||||||
|
|
||||||
|
The process is automated in the usual `make flash` target.
|
||||||
|
|
||||||
|
If RIOT is already running on the board, it will automatically reset the CPU and enter
|
||||||
|
the bootloader.
|
||||||
|
If some other firmware is running or RIOT crashed, you need to enter the bootloader
|
||||||
|
manually by double tapping the board's reset button.
|
||||||
|
|
||||||
|
Readiness of the bootloader is indicated by LD1 pulsing in blue.
|
||||||
|
|
||||||
|
Important to note that Adafruit's nrfutil is not compatible with Nordic's nrfutil.
|
||||||
|
|
||||||
|
#### nrfutil installation
|
||||||
|
|
||||||
|
On systems with Python 3, a recent version of pip is required to install all dependencies;
|
||||||
|
you may need to run `pip3 install --upgrade pip3` before being able to run `pip3 install adafruit-nrfutil` successfully.
|
||||||
|
|
||||||
|
### Accessing STDIO
|
||||||
|
|
||||||
|
The usual way to obtain a console on this board is using an emulated USB serial port.
|
||||||
|
|
||||||
|
|
||||||
|
### Todo
|
||||||
|
|
||||||
|
Add support for the mini DotStar RGB LED
|
||||||
|
|
||||||
|
*/
|
68
boards/adafruit-itsybitsy-nrf52/include/board.h
Normal file
68
boards/adafruit-itsybitsy-nrf52/include/board.h
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Bruno Chianca <brunobcf@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-nrf52
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific configuration for Adafruit ItsyBitsy nRF52840
|
||||||
|
*
|
||||||
|
* @author Bruno Chianca <brunobcf@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
#include "board_common.h"
|
||||||
|
#include "periph/gpio.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LED pin configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** @brief The LED labelled LD1 */
|
||||||
|
#define LED0_PIN GPIO_PIN(0, 6)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LED access macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Enable LD1 */
|
||||||
|
#define LED0_ON gpio_clear(LED0_PIN)
|
||||||
|
/** Disable LD1 */
|
||||||
|
#define LED0_OFF gpio_set(LED0_PIN)
|
||||||
|
/** Toggle LD1 */
|
||||||
|
#define LED0_TOGGLE gpio_toggle(LED0_PIN)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Button pin configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** @brief The button labelled SW1 */
|
||||||
|
#define BTN0_PIN GPIO_PIN(0, 29)
|
||||||
|
/** @brief The GPIO pin mode of the button labelled SW1 */
|
||||||
|
#define BTN0_MODE GPIO_IN_PU
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
|
/** @} */
|
54
boards/adafruit-itsybitsy-nrf52/include/gpio_params.h
Normal file
54
boards/adafruit-itsybitsy-nrf52/include/gpio_params.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Bruno Chianca <brunobcf@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-nrf52
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Configuration of SAUL mapped GPIO pins for the Adafruit
|
||||||
|
* ItsyBitsy nRF52840
|
||||||
|
*
|
||||||
|
* @author Bruno Chianca <brunobcf@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GPIO_PARAMS_H
|
||||||
|
#define GPIO_PARAMS_H
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "saul/periph.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief LED and button configuration for SAUL
|
||||||
|
*/
|
||||||
|
static const saul_gpio_params_t saul_gpio_params[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
.name = "LD 1",
|
||||||
|
.pin = LED0_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
.flags = SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "SW 1",
|
||||||
|
.pin = BTN0_PIN,
|
||||||
|
.mode = GPIO_IN_PU,
|
||||||
|
.flags = SAUL_GPIO_INVERTED,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GPIO_PARAMS_H */
|
||||||
|
/** @} */
|
93
boards/adafruit-itsybitsy-nrf52/include/periph_conf.h
Normal file
93
boards/adafruit-itsybitsy-nrf52/include/periph_conf.h
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Bruno Chianca <brunobcf@gmail.com>
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-nrf52
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Peripheral configuration for the Adafruit ItsyBitsy nRF52840
|
||||||
|
*
|
||||||
|
* @author Bruno Chianca <brunobcf@gmail.com>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PERIPH_CONF_H
|
||||||
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
#include "cfg_clock_32_1.h"
|
||||||
|
#include "cfg_rtt_default.h"
|
||||||
|
#include "cfg_timer_default.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name UART configuration
|
||||||
|
*
|
||||||
|
* This board does RX and TX defined as pins 0 and 1 on the board.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
static const uart_conf_t uart_config[] = {
|
||||||
|
{
|
||||||
|
.dev = NRF_UARTE0,
|
||||||
|
.rx_pin = GPIO_PIN(0, 25),
|
||||||
|
.tx_pin = GPIO_PIN(0, 24),
|
||||||
|
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||||
|
.rts_pin = GPIO_UNDEF,
|
||||||
|
.cts_pin = GPIO_UNDEF,
|
||||||
|
#endif
|
||||||
|
.irqn = UARTE0_UART0_IRQn,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#define UART_0_ISR isr_uart0
|
||||||
|
|
||||||
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SPI configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const spi_conf_t spi_config[] = {
|
||||||
|
{
|
||||||
|
.dev = NRF_SPIM0,
|
||||||
|
.sclk = GPIO_PIN(0, 13),
|
||||||
|
.mosi = GPIO_PIN(0, 15),
|
||||||
|
.miso = GPIO_PIN(0, 20),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2C configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const i2c_conf_t i2c_config[] = {
|
||||||
|
{
|
||||||
|
.dev = NRF_TWIM1,
|
||||||
|
.scl = GPIO_PIN(0, 14),
|
||||||
|
.sda = GPIO_PIN(0, 16),
|
||||||
|
.speed = I2C_SPEED_NORMAL
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PERIPH_CONF_H */
|
34
boards/adafruit-itsybitsy-nrf52/reset.c
Normal file
34
boards/adafruit-itsybitsy-nrf52/reset.c
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 Bruno Chianca
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_adafruit-itsybitsy-nrf52
|
||||||
|
* @{
|
||||||
|
* @file
|
||||||
|
* @brief Allows reboot into bootloader via prompt
|
||||||
|
*
|
||||||
|
* @author Bruno Chianca
|
||||||
|
*
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef MODULE_USB_BOARD_RESET
|
||||||
|
|
||||||
|
#include "periph/gpio.h"
|
||||||
|
#include "usb_board_reset.h"
|
||||||
|
|
||||||
|
#define NRF52_DOUBLE_TAP_MAGIC_NUMBER (0x4e)
|
||||||
|
|
||||||
|
void usb_board_reset_in_bootloader(void)
|
||||||
|
{
|
||||||
|
NRF_POWER->GPREGRET = NRF52_DOUBLE_TAP_MAGIC_NUMBER;
|
||||||
|
|
||||||
|
usb_board_reset_in_application();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MODULE_USB_BOARD_RESET */
|
21
boards/airfy-beacon/Kconfig
Normal file
21
boards/airfy-beacon/Kconfig
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "airfy-beacon" if BOARD_AIRFY_BEACON
|
||||||
|
|
||||||
|
config BOARD_AIRFY_BEACON
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select BOARD_COMMON_NRF51
|
||||||
|
select CPU_MODEL_NRF51X22XXAA
|
||||||
|
select HAS_PERIPH_ADC
|
||||||
|
select HAS_PERIPH_I2C
|
||||||
|
select HAS_PERIPH_SPI
|
||||||
|
select HAS_PERIPH_UART
|
||||||
|
select MODULE_BOARDS_COMMON_NRF51 if TEST_KCONFIG
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/nrf51/Kconfig"
|
@ -1 +1,4 @@
|
|||||||
|
# include common nrf51 boards module into the build
|
||||||
|
USEMODULE += boards_common_nrf51
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||||
|
@ -1,15 +1,10 @@
|
|||||||
# include common nrf51 boards module into the build
|
|
||||||
USEMODULE += boards_common_nrf51
|
|
||||||
|
|
||||||
# define the default port depending on the host OS
|
# define the default port depending on the host OS
|
||||||
PORT_LINUX ?= /dev/ttyUSB0
|
PORT_LINUX ?= /dev/ttyUSB0
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||||
|
|
||||||
# this board uses an ST-Link v2 debug adapter
|
# this board uses an ST-Link v2 debug adapter
|
||||||
DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
STLINK_VERSION ?= 2
|
STLINK_VERSION ?= 2
|
||||||
|
|
||||||
PROGRAMMER = openocd
|
|
||||||
|
|
||||||
# include nrf51 boards common configuration
|
# include nrf51 boards common configuration
|
||||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
@ -6,35 +6,35 @@
|
|||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The Airfy Beacon is utilizing a Nordics NRF51822QFAA SoC.
|
The Airfy Beacon is utilizing a Nordics NRF51822QFAA SoC.
|
||||||
The SoC features 16Kb of RAM, 256Kb of flash ROM and comes on top of the
|
The SoC features 16KiB of RAM, 256KiB of flash ROM and comes on top of the
|
||||||
usual micro-controller peripherals with a 2.4GHz radio that supports both
|
usual micro-controller peripherals with a 2.4GHz radio that supports both
|
||||||
Nordics proprietary ShockBurst as well as Bluetooth Low Energy (BLE).
|
Nordics proprietary ShockBurst as well as Bluetooth Low Energy (BLE).
|
||||||
|
|
||||||
The board was available via
|
The board was available via
|
||||||
[Indiegogo](https://www.indiegogo.com/projects/airfy-beacon-make-your-smart-
|
[Indiegogo]
|
||||||
home-even-smarter).
|
(https://www.indiegogo.com/projects/airfy-beacon-make-your-smart-home-even-smarter).
|
||||||
|
|
||||||
## Hardware
|
## Hardware
|
||||||
|
|
||||||
![airfy-beacon](https://raw.githubusercontent.com/wiki/RIOT-
|
![airfy-beacon]
|
||||||
OS/RIOT/images/airfy-beacon.jpg)
|
(https://raw.githubusercontent.com/wiki/RIOT-OS/RIOT/images/airfy-beacon.jpg)
|
||||||
|
|
||||||
| MCU | NRF51822QFAA |
|
|
||||||
|:------------- |:--------------------- |
|
|
||||||
| Family | ARM Cortex-M0 |
|
|
||||||
| Vendor | Nordic Semiconductor |
|
|
||||||
| RAM | 16Kb |
|
|
||||||
| Flash | 256Kb |
|
|
||||||
| Frequency | 16MHz |
|
|
||||||
| FPU | no |
|
|
||||||
| Timers | 3 (2x 16-bit, 1x 32-bit [TIMER0]) |
|
|
||||||
| ADCs | 1x 10-bit (8 channels) |
|
|
||||||
| UARTs | 1 |
|
|
||||||
| SPIs | 2 |
|
|
||||||
| I2Cs | 2 |
|
|
||||||
| Vcc | 1.8V - 3.6V |
|
|
||||||
| Reference Manual | [Reference Manual](http://www.100y.com.tw/pdf_file/39-Nordic-NRF51822.pdf) |
|
|
||||||
|
|
||||||
|
| MCU | NRF51822QFAA |
|
||||||
|
|:--------------------- |:--------------------------------- |
|
||||||
|
| Family | ARM Cortex-M0 |
|
||||||
|
| Vendor | Nordic Semiconductor |
|
||||||
|
| RAM | 16KiB |
|
||||||
|
| Flash | 256KiB |
|
||||||
|
| Frequency | 16MHz |
|
||||||
|
| FPU | no |
|
||||||
|
| Timers | 3 (2x 16-bit, 1x 32-bit [TIMER0]) |
|
||||||
|
| ADCs | 1x 10-bit (8 channels) |
|
||||||
|
| UARTs | 1 |
|
||||||
|
| SPIs | 2 |
|
||||||
|
| I2Cs | 2 |
|
||||||
|
| Vcc | 1.8V - 3.6V |
|
||||||
|
| Product Specification | [Product Specification](https://infocenter.nordicsemi.com/pdf/nRF51822_PS_v3.3.pdf) |
|
||||||
|
| Reference Manual | [Reference Manual](https://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf) |
|
||||||
|
|
||||||
## Unlocking the flash memory
|
## Unlocking the flash memory
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ registers. Just follow these steps:
|
|||||||
|
|
||||||
1. Follow the steps described above for manually flashing the device:
|
1. Follow the steps described above for manually flashing the device:
|
||||||
|
|
||||||
1. start openocd using the correct config file `openocd -f boards/airfy-
|
1. start openocd using the correct config file
|
||||||
beacon/dist/openocd.cfg`
|
`openocd -f boards/airfy-beacon/dist/openocd.cfg`
|
||||||
2. connect to openocd using telnet `telnet localhost 4444`
|
2. connect to openocd using telnet `telnet localhost 4444`
|
||||||
|
|
||||||
2. type `halt` to stop the device
|
2. type `halt` to stop the device
|
||||||
@ -92,8 +92,8 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \
|
|||||||
```
|
```
|
||||||
now replug the usb cable and flash.
|
now replug the usb cable and flash.
|
||||||
|
|
||||||
Have a look at the 'Setting up udev rules' section in this [README
|
Have a look at the 'Setting up udev rules' section in the
|
||||||
file](https://github.com/texane/stlink/blob/master/README) if you need help.
|
[README file](https://github.com/texane/stlink) if you need help.
|
||||||
|
|
||||||
Second you need to enable the standalone ST-Link mode of the discovery board
|
Second you need to enable the standalone ST-Link mode of the discovery board
|
||||||
by removing the two `CN2` jumpers, found somewhere in the upper left part of the
|
by removing the two `CN2` jumpers, found somewhere in the upper left part of the
|
||||||
@ -114,11 +114,12 @@ SWD data I/O: SWDIO <-----------> SWDIO (CN3, pin4)
|
|||||||
|
|
||||||
The following image shows the wiring for an SWD flasher board:
|
The following image shows the wiring for an SWD flasher board:
|
||||||
|
|
||||||
![airfy-beacon-flash-connect](https://raw.githubusercontent.com/wiki/RIOT-
|
![airfy-beacon-flash-connect]
|
||||||
OS/RIOT/images/airfy-beacon-flash-connect.jpg)
|
(https://raw.githubusercontent.com/wiki/RIOT-OS/RIOT/images/airfy-beacon-flash-connect.jpg)
|
||||||
|
|
||||||
### Software
|
### Software
|
||||||
Debugging and programming this module works well with [[OpenOCD]].
|
Debugging and programming this module works well with
|
||||||
|
[OpenOCD](http://openocd.org/).
|
||||||
|
|
||||||
We suggest to use a fairly recent version, best use the upstream version from
|
We suggest to use a fairly recent version, best use the upstream version from
|
||||||
their [git repository](http://sourceforge.net/p/openocd/code/ci/master/tree/).
|
their [git repository](http://sourceforge.net/p/openocd/code/ci/master/tree/).
|
||||||
|
@ -86,8 +86,9 @@ static const i2c_conf_t i2c_config[] = {
|
|||||||
* The configuration consists simply of a list of channels that should be used
|
* The configuration consists simply of a list of channels that should be used
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define ADC_CONFIG {3, 4, 5, 6}
|
static const adc_conf_t adc_config[] = {3, 4, 5, 6};
|
||||||
#define ADC_NUMOF (4)
|
|
||||||
|
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
30
boards/alientek-pandora/Kconfig
Normal file
30
boards/alientek-pandora/Kconfig
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# Copyright (C) 2021 Luo Jia (HUST IoT Security Lab)
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
#
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "alientek-pandora" if BOARD_ALIENTEK_PANDORA
|
||||||
|
|
||||||
|
config BOARD_ALIENTEK_PANDORA
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select CPU_MODEL_STM32L475VE
|
||||||
|
|
||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
select HAS_PERIPH_RTC
|
||||||
|
select HAS_PERIPH_RTT
|
||||||
|
select HAS_PERIPH_TIMER
|
||||||
|
select HAS_PERIPH_UART
|
||||||
|
|
||||||
|
# Put other features for this board (in alphabetical order)
|
||||||
|
select HAS_RIOTBOOT
|
||||||
|
|
||||||
|
# Clock configuration
|
||||||
|
select BOARD_HAS_LSE
|
||||||
|
|
||||||
|
select HAVE_SAUL_GPIO
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
3
boards/alientek-pandora/Makefile
Normal file
3
boards/alientek-pandora/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MODULE = board
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.base
|
3
boards/alientek-pandora/Makefile.dep
Normal file
3
boards/alientek-pandora/Makefile.dep
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||||
|
USEMODULE += saul_gpio
|
||||||
|
endif
|
11
boards/alientek-pandora/Makefile.features
Normal file
11
boards/alientek-pandora/Makefile.features
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CPU = stm32
|
||||||
|
CPU_MODEL = stm32l475ve
|
||||||
|
|
||||||
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += periph_rtc
|
||||||
|
FEATURES_PROVIDED += periph_rtt
|
||||||
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
|
# Put other features for this board (in alphabetical order)
|
||||||
|
FEATURES_PROVIDED += riotboot
|
13
boards/alientek-pandora/Makefile.include
Normal file
13
boards/alientek-pandora/Makefile.include
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# we use shared STM32 configuration snippets
|
||||||
|
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
||||||
|
|
||||||
|
# this board uses openocd with st-link
|
||||||
|
PROGRAMMER ?= openocd
|
||||||
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# This board can become un-flashable after a hardfault,
|
||||||
|
# use connect_assert_srst to always be able to flash or reset the board.
|
||||||
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
40
boards/alientek-pandora/doc.txt
Normal file
40
boards/alientek-pandora/doc.txt
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
@defgroup boards_alientek-pandora Alientek Pandora
|
||||||
|
@ingroup boards
|
||||||
|
@brief Support for the Alientek Pandora board
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The Alientek Pandora is a development board manufactured jointly by Alientek and RT-Thread company.
|
||||||
|
It is based on STM32L475VET6 and have on-board LCD, SD card and WiFi access.
|
||||||
|
Users may connect to its on board ST-Link 2.1 compatible debugger to flash or debug.
|
||||||
|
|
||||||
|
Documents of this board are available on its [Alientek official website](http://www.alientek.com/productinfo/716137.html).
|
||||||
|
It may require a translation software to read it in English.
|
||||||
|
Additional resources may be found on [RT-Thread bsp support page](https://gitee.com/rtthread/rt-thread/tree/master/bsp/stm32/stm32l475-atk-pandora).
|
||||||
|
|
||||||
|
### Flashing the board
|
||||||
|
|
||||||
|
To flash the board, use the on board ST-Link programmer/debugger.
|
||||||
|
Input the following command:
|
||||||
|
|
||||||
|
make BOARD=alientek-pandora -C examples/hello-world flash
|
||||||
|
|
||||||
|
The NRST pin is connected to the on board debugger, so users do not need to reset manually
|
||||||
|
every time it requires to flash.
|
||||||
|
|
||||||
|
If the operating system raised a fault, users may manually reset the chip by pressing the reset button.
|
||||||
|
This button has a black color and is located between the four keys and the LED light.
|
||||||
|
|
||||||
|
### STDIO
|
||||||
|
|
||||||
|
STDIO is connected to pins PA9 (TX) and PA10 (RX).
|
||||||
|
Before you begin, check that the both the jumper caps marked as 'USART1' is connected.
|
||||||
|
|
||||||
|
Use the `term` target to open a terminal:
|
||||||
|
|
||||||
|
make BOARD=alientek-pandora -C examples/hello-world term
|
||||||
|
|
||||||
|
An on-board ST-Link compatible debugger is used to transport serial STDIO message.
|
||||||
|
|
||||||
|
*/
|
79
boards/alientek-pandora/include/board.h
Normal file
79
boards/alientek-pandora/include/board.h
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 Luo Jia (HUST IoT Security Lab)
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_alientek-pandora
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific definitions for the Alientek Pandora board
|
||||||
|
*
|
||||||
|
* @author Luo Jia <luojia@hust.edu.cn>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "cpu.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name LED pin definitions and handlers
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define LED0_PIN GPIO_PIN(PORT_E, 7) /**< LED0 gpio pin */
|
||||||
|
#define LED0_MASK (1 << 7) /**< LED0 gpio mask */
|
||||||
|
|
||||||
|
#define LED0_ON (GPIOB->BSRR = LED0_MASK) /**< Turn on LED0 */
|
||||||
|
#define LED0_OFF (GPIOB->BSRR = (LED0_MASK << 16)) /**< Turn off LED0 */
|
||||||
|
#define LED0_TOGGLE (GPIOB->ODR ^= LED0_MASK) /**< Toggle LED0 */
|
||||||
|
|
||||||
|
#define LED1_PIN GPIO_PIN(PORT_E, 8) /**< LED1 gpio pin */
|
||||||
|
#define LED1_MASK (1 << 8) /**< LED1 gpio mask */
|
||||||
|
|
||||||
|
#define LED1_ON (GPIOE->BSRR = LED1_MASK) /**< Turn on LED1 */
|
||||||
|
#define LED1_OFF (GPIOE->BSRR = (LED1_MASK << 16)) /**< Turn off LED1 */
|
||||||
|
#define LED1_TOGGLE (GPIOE->ODR ^= LED1_MASK) /**< Toggle LED1 */
|
||||||
|
|
||||||
|
#define LED2_PIN GPIO_PIN(PORT_E, 9) /**< LED2 gpio pin */
|
||||||
|
#define LED2_MASK (1 << 9) /**< LED2 gpio mask */
|
||||||
|
|
||||||
|
#define LED2_ON (GPIOE->BSRR = LED2_MASK) /**< Turn on LED2 */
|
||||||
|
#define LED2_OFF (GPIOE->BSRR = (LED2_MASK << 16)) /**< Turn off LED2 */
|
||||||
|
#define LED2_TOGGLE (GPIOE->ODR ^= LED2_MASK) /**< Toggle LED2 */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Wake-up and key buttons
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define BTNWK_PIN GPIO_PIN(PORT_C, 13) /**< Wake button pin */
|
||||||
|
#define BTNWK_MODE GPIO_IN_PD /**< Wake button mode */
|
||||||
|
|
||||||
|
#define BTN0_PIN GPIO_PIN(PORT_D, 10) /**< Button 0 pin */
|
||||||
|
#define BTN0_MODE GPIO_IN_PD /**< Button 0 mode */
|
||||||
|
|
||||||
|
#define BTN1_PIN GPIO_PIN(PORT_D, 9) /**< Button 1 pin */
|
||||||
|
#define BTN1_MODE GPIO_IN_PD /**< Button 1 mode */
|
||||||
|
|
||||||
|
#define BTN2_PIN GPIO_PIN(PORT_D, 8) /**< Button 2 pin */
|
||||||
|
#define BTN2_MODE GPIO_IN_PD /**< Button 2 mode */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
|
/** @} */
|
84
boards/alientek-pandora/include/gpio_params.h
Normal file
84
boards/alientek-pandora/include/gpio_params.h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 Luo Jia (HUST IoT Security Lab)
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_alientek-pandora
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Board specific configuration of direct mapped GPIOs
|
||||||
|
*
|
||||||
|
* @author Luo Jia <luojia@hust.edu.cn>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GPIO_PARAMS_H
|
||||||
|
#define GPIO_PARAMS_H
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include "saul/periph.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GPIO pin configuration
|
||||||
|
*/
|
||||||
|
static const saul_gpio_params_t saul_gpio_params[] =
|
||||||
|
{
|
||||||
|
#ifndef MODULE_SAUL_PWM
|
||||||
|
{
|
||||||
|
.name = "LED Red",
|
||||||
|
.pin = LED0_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "LED Green",
|
||||||
|
.pin = LED1_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "LED Blue",
|
||||||
|
.pin = LED2_PIN,
|
||||||
|
.mode = GPIO_OUT,
|
||||||
|
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR),
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
.name = "Wakeup Key",
|
||||||
|
.pin = BTNWK_PIN,
|
||||||
|
.mode = BTNWK_MODE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "Key 0",
|
||||||
|
.pin = BTN0_PIN,
|
||||||
|
.mode = BTN0_MODE,
|
||||||
|
.flags = SAUL_GPIO_INVERTED
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "Key 1",
|
||||||
|
.pin = BTN1_PIN,
|
||||||
|
.mode = BTN1_MODE,
|
||||||
|
.flags = SAUL_GPIO_INVERTED
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "Key 2",
|
||||||
|
.pin = BTN2_PIN,
|
||||||
|
.mode = BTN2_MODE,
|
||||||
|
.flags = SAUL_GPIO_INVERTED
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GPIO_PARAMS_H */
|
||||||
|
/** @} */
|
89
boards/alientek-pandora/include/periph_conf.h
Normal file
89
boards/alientek-pandora/include/periph_conf.h
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 Luo Jia (HUST IoT Security Lab)
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_alientek-pandora
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Peripheral MCU configuration for the Alientek Pandora board
|
||||||
|
*
|
||||||
|
* @author Luo Jia <luojia@hust.edu.cn>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PERIPH_CONF_H
|
||||||
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
|
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||||
|
#ifndef CONFIG_BOARD_HAS_LSE
|
||||||
|
#define CONFIG_BOARD_HAS_LSE 1 /**< This board provides LSE */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
#include "clk_conf.h"
|
||||||
|
#include "cfg_rtt_default.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Timer configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** All timers on board */
|
||||||
|
static const timer_conf_t timer_config[] = {
|
||||||
|
{
|
||||||
|
.dev = TIM5,
|
||||||
|
.max = 0xffffffff,
|
||||||
|
.rcc_mask = RCC_APB1ENR1_TIM5EN,
|
||||||
|
.bus = APB1,
|
||||||
|
.irqn = TIM5_IRQn
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TIMER_0_ISR isr_tim5 /**< Timer 0 ISR number */
|
||||||
|
|
||||||
|
#define TIMER_NUMOF ARRAY_SIZE(timer_config) /**< Number of timers on this board */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name UART configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/** All UARTs on board */
|
||||||
|
static const uart_conf_t uart_config[] = {
|
||||||
|
{
|
||||||
|
.dev = USART1,
|
||||||
|
.rcc_mask = RCC_APB2ENR_USART1EN,
|
||||||
|
.rx_pin = GPIO_PIN(PORT_A, 10),
|
||||||
|
.tx_pin = GPIO_PIN(PORT_A, 9),
|
||||||
|
.rx_af = GPIO_AF7,
|
||||||
|
.tx_af = GPIO_AF7,
|
||||||
|
.bus = APB2,
|
||||||
|
.irqn = USART1_IRQn,
|
||||||
|
.type = STM32_USART,
|
||||||
|
.clk_src = 0, /* Use APB clock */
|
||||||
|
#ifdef UART_USE_DMA
|
||||||
|
.dma_stream = 6,
|
||||||
|
.dma_chan = 4
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#define UART_0_ISR (isr_usart1) /**< Usart1 ISR number */
|
||||||
|
|
||||||
|
#define UART_NUMOF ARRAY_SIZE(uart_config) /**< Number of uarts on this board */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PERIPH_CONF_H */
|
||||||
|
/** @} */
|
15
boards/arduino-due/Kconfig
Normal file
15
boards/arduino-due/Kconfig
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "arduino-due" if BOARD_ARDUINO_DUE
|
||||||
|
|
||||||
|
config BOARD_ARDUINO_DUE
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select BOARD_COMMON_ARDUINO_DUE
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/arduino-due/Kconfig"
|
17
boards/arduino-duemilanove/Kconfig
Normal file
17
boards/arduino-duemilanove/Kconfig
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
config BOARD_ARDUINO_DUEMILANOVE
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select BOARD_COMMON_ARDUINO_ATMEGA
|
||||||
|
select CPU_MODEL_ATMEGA328P
|
||||||
|
select MODULE_BOARDS_COMMON_ARDUINO-ATMEGA if TEST_KCONFIG
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "arduino-duemilanove" if BOARD_ARDUINO_DUEMILANOVE
|
||||||
|
|
||||||
|
source "$(RIOTBOARD)/common/arduino-atmega/Kconfig"
|
@ -3,14 +3,6 @@ PORT_LINUX ?= /dev/ttyUSB0
|
|||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||||
BAUD ?= 9600
|
BAUD ?= 9600
|
||||||
|
|
||||||
# PROGRAMMER defaults to arduino which is the internal flasher via USB
|
ARDUINO_DUEMILANOVE_BOOTLOADER ?= atmegaboot
|
||||||
# using avrdude. Can be overridden for debugging (which requires changes
|
|
||||||
# that require to use an ISP)
|
|
||||||
PROGRAMMER ?= arduino
|
|
||||||
# configure programmer speed in baud
|
|
||||||
FFLAGS_EXTRA += -b 57600
|
|
||||||
|
|
||||||
BOOTLOADER_SIZE ?= 2K
|
|
||||||
ROM_RESERVED ?= $(BOOTLOADER_SIZE)
|
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.include
|
include $(RIOTBOARD)/common/arduino-atmega/Makefile.include
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user