Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f402ad469 | ||
|
|
dea0e3addd | ||
|
|
9151c26c09 | ||
|
|
7b54240499 | ||
|
|
1a4b35a503 | ||
|
|
38c987354d | ||
|
|
2714035e03 | ||
|
|
e024d6dadc | ||
|
|
db69969df2 | ||
|
|
67374dacac | ||
|
|
60364b256f | ||
|
|
26afb55700 | ||
|
|
0c586d86ac | ||
|
|
a20bd7cba6 | ||
| efd80adc84 | |||
|
|
ddeca04823 | ||
|
|
ecbafcdaab | ||
|
|
0262c36960 | ||
|
|
3978f51166 | ||
|
|
b490a66e9e | ||
|
|
71cdbd5501 | ||
|
|
34cb17d531 | ||
|
|
a0c9828b20 | ||
|
|
e7dd2e0fc0 | ||
|
|
4963df259a | ||
| 6a871b1fd2 | |||
| 8a1da6ffde |
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,6 +1,5 @@
|
||||
*.a binary
|
||||
*.patch binary
|
||||
Cargo.lock binary
|
||||
# Default conflict marker size is 7 which causes some of the headings in
|
||||
# release-notes.txt to trigger git diff --check: 'leftover conflict marker'
|
||||
# when the heading is exactly 7 characters long.
|
||||
|
||||
12
.github/ISSUE_TEMPLATE/security_bug.md
vendored
Normal file
12
.github/ISSUE_TEMPLATE/security_bug.md
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
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.
|
||||
Therefore, before describing what your contribution is about, we would like
|
||||
you to make sure that your modifications are compliant with the RIOT
|
||||
coding conventions, see https://github.com/RIOT-OS/RIOT/blob/master/CODING_CONVENTIONS.md.
|
||||
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
|
||||
-->
|
||||
|
||||
### Contribution description
|
||||
|
||||
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@ -35,7 +35,6 @@
|
||||
- "doc/**/*"
|
||||
- "**/*.md"
|
||||
- "**/*.txt"
|
||||
- "**/*.cff"
|
||||
|
||||
"Area: drivers":
|
||||
- "drivers/**/*"
|
||||
|
||||
24
.github/workflows/release-test.yml
vendored
24
.github/workflows/release-test.yml
vendored
@ -97,10 +97,10 @@ jobs:
|
||||
path: RIOT
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.riot_version }}
|
||||
- name: Set up Python 3.8
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.x
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@ -139,16 +139,16 @@ jobs:
|
||||
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" \
|
||||
APPKEY="${{ secrets.CI_TTN_APPKEY }}" \
|
||||
NWKSKEY="${{ secrets.CI_TTN_NWKSKEY_ABP }}" \
|
||||
APPSKEY="${{ secrets.CI_TTN_APPSKEY_ABP }}" \
|
||||
LORAWAN_DL_KEY="${{ secrets.CI_TTN_APPID_KEY }}" \
|
||||
DEVEUI="009E40529364FBE6" \
|
||||
APPEUI="70B3D57ED003B26A" \
|
||||
DEVADDR="26011EB0" \
|
||||
TTN_APP_ID="11-lorawan" \
|
||||
TTN_DEV_ID="riot_lorawan_1" \
|
||||
TTN_DEV_ID_ABP="riot_lorawan_1_abp" \
|
||||
RIOTBASE=${RIOTBASE} \
|
||||
$(which tox) -e test -- ${TOX_ARGS} \
|
||||
${K} "${{ github.event.inputs.filter }}" -m "${{ matrix.pytest_mark }}"
|
||||
|
||||
16
.github/workflows/test-on-iotlab.yml
vendored
16
.github/workflows/test-on-iotlab.yml
vendored
@ -33,10 +33,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
boards:
|
||||
- riot: dwm1001
|
||||
iotlab:
|
||||
archi: dwm1001:dw1000
|
||||
site: saclay
|
||||
- riot: iotlab-m3
|
||||
iotlab:
|
||||
archi: m3:at86rf231
|
||||
@ -57,18 +53,10 @@ jobs:
|
||||
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
|
||||
@ -82,6 +70,10 @@ jobs:
|
||||
env:
|
||||
IOTLAB_NODE: auto
|
||||
BUILD_IN_DOCKER: 1
|
||||
# Force .bin files generation because these files are used to flash on IoT-LAB and
|
||||
# because compile_and_test_for_board forces RIOT_CI_BUILD which skip .bin
|
||||
# files generation
|
||||
DOCKER_ENVIRONMENT_CMDLINE: -e BUILD_FILES=\$$\(BINFILE\)
|
||||
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
|
||||
|
||||
8
.github/workflows/tools-buildtest.yml
vendored
8
.github/workflows/tools-buildtest.yml
vendored
@ -71,11 +71,3 @@ jobs:
|
||||
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
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@ -9,9 +9,8 @@ doc/doxygen/man
|
||||
doc/doxygen/*.log
|
||||
doc/doxygen/*.db
|
||||
doc/doxygen/*.tmp
|
||||
# bin (e.g.:build directory) and .bin files
|
||||
bin
|
||||
*.bin
|
||||
# Built binaries
|
||||
*bin
|
||||
# Build directory
|
||||
/build
|
||||
# AFL findings
|
||||
@ -22,8 +21,6 @@ fuzzing/**/findings/
|
||||
.*.swn
|
||||
.*.swo
|
||||
.*.swp
|
||||
*.save
|
||||
*.rej
|
||||
\#*\#
|
||||
cachegrind.out*
|
||||
# Eclipse workspace files
|
||||
@ -90,6 +87,3 @@ keys/
|
||||
|
||||
# clangd language server
|
||||
.clangd/
|
||||
|
||||
# custom clang-tidy flags, also used when using clangd language server
|
||||
.clang-tidy
|
||||
|
||||
288
.murdock
288
.murdock
@ -1,11 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# uncomment and change this to limit builds, e.g.,
|
||||
#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
|
||||
@ -14,60 +8,9 @@
|
||||
: ${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-heltec-lora32-v2
|
||||
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
|
||||
waspmote-pro
|
||||
weact-f401ce
|
||||
z1
|
||||
nucleo-f103rb
|
||||
"}
|
||||
|
||||
: ${TEST_KCONFIG_ENFORCE_APP_GROUPS:="
|
||||
@ -89,53 +32,9 @@ tests/driver_t*
|
||||
tests/driver_u*
|
||||
tests/driver_v*
|
||||
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
|
||||
esp32-wrover-kit
|
||||
esp8266-esp-12x
|
||||
esp8266-olimex-mod
|
||||
esp8266-sparkfun-thing
|
||||
limifrog-v1
|
||||
lora-e5-dev
|
||||
msbiot
|
||||
msb-430h
|
||||
nucleo-l011k4
|
||||
nucleo-wl55jc
|
||||
omote
|
||||
openmote-b
|
||||
pic32-wifire
|
||||
pyboard
|
||||
remote-pa
|
||||
samd10-xmini
|
||||
stk3200
|
||||
stm32f030f4-demo
|
||||
stm32f3discovery
|
||||
stm32mp157c-dk2
|
||||
"}
|
||||
|
||||
# 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"}
|
||||
@ -146,10 +45,6 @@ export STATIC_TESTS=0
|
||||
export CFLAGS_DBG=""
|
||||
export DLCACHE_DIR=${DLCACHE_DIR:-~/.dlcache}
|
||||
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
|
||||
# some features of RIOT and of murdock. The result is that ccache is
|
||||
@ -168,25 +63,16 @@ FULL_BUILD=${FULL_BUILD:-${NIGHTLY}}
|
||||
# It is only the combination of these three factors which causes this bug.
|
||||
export OPTIONAL_CFLAGS_BLACKLIST="-gz"
|
||||
|
||||
NIGHTLY=${NIGHTLY:-0}
|
||||
RUN_TESTS=${RUN_TESTS:-${NIGHTLY}}
|
||||
|
||||
DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS -E ENABLE_TEST_CACHE
|
||||
-E TEST_HASH -E CI_PULL_LABELS -ECI_BASE_BRANCH -ECI_BASE_COMMIT
|
||||
-EPKG_USE_MIRROR -EAPPS_CHANGED -EBOARDS_CHANGED -ESTATIC_TESTS"
|
||||
|
||||
if [ ${NIGHTLY} -eq 1 ]; then
|
||||
export PKG_USE_MIRROR=0
|
||||
fi
|
||||
|
||||
CFCR_ARGS="--upstreambranch ${CI_BASE_COMMIT}"
|
||||
-E TEST_HASH -E CI_PULL_LABELS"
|
||||
|
||||
get_supported_kconfig_board_app() {
|
||||
local board=$1
|
||||
local appdir=$2
|
||||
if is_in_list "${board}" "${TEST_KCONFIG_BOARD_BLOCKLIST}"; then
|
||||
return 1
|
||||
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
|
||||
@ -198,20 +84,6 @@ get_supported_kconfig_board_app() {
|
||||
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() {
|
||||
local label="${1}"
|
||||
[ -z "${CI_PULL_LABELS}" ] && return 1
|
||||
@ -297,36 +169,8 @@ get_apps() {
|
||||
# Only print for boards in $BOARDS.
|
||||
get_supported_boards() {
|
||||
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)"
|
||||
|
||||
export BOARDS="${BOARDS_}"
|
||||
|
||||
if [ "$boards" = broken ]; then
|
||||
echo "makefile_broken"
|
||||
return
|
||||
@ -378,10 +222,7 @@ get_app_board_toolchain_pairs() {
|
||||
# use dwqc to create full "appdir board toolchain" compile job list
|
||||
get_compile_jobs() {
|
||||
check_label "CI: skip compile test" && return
|
||||
update_changed_modules || return
|
||||
|
||||
get_apps | \
|
||||
maybe_filter_changed_apps | \
|
||||
dwqc ${DWQ_ENV} -s \
|
||||
${DWQ_JOBID:+--subjob} \
|
||||
"$0 get_app_board_toolchain_pairs \${1} $0 compile"
|
||||
@ -409,11 +250,11 @@ test_hash_calc() {
|
||||
|
||||
test_cache_get() {
|
||||
test "${ENABLE_TEST_CACHE}" = "1" || return 1
|
||||
test -n "$(redis-cli -h ${MURDOCK_REDIS_HOST} get $1)" > /dev/null
|
||||
test -n "$(redis-cli get $1)" > /dev/null
|
||||
}
|
||||
|
||||
test_cache_put() {
|
||||
redis-cli -h ${MURDOCK_REDIS_HOST} set "$1" ok
|
||||
redis-cli set "$1" ok
|
||||
}
|
||||
|
||||
# compile one app for one board with one toolchain. delete intermediates.
|
||||
@ -472,9 +313,8 @@ compile() {
|
||||
|
||||
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 "Hashes of binaries with and without Kconfig mismatch for ${appdir}";
|
||||
echo "Please check that all used modules are modelled in Kconfig and enabled";
|
||||
kconfig_module_packages_diff ${board} ${appdir}
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
@ -572,119 +412,15 @@ run_test() {
|
||||
return $RES
|
||||
}
|
||||
|
||||
basename_list () {
|
||||
for path in $*; do
|
||||
basename $path
|
||||
done
|
||||
}
|
||||
|
||||
# calls out to can_fast_ci_run.py.
|
||||
#
|
||||
# returns 1 if nothing should be built.
|
||||
# or, returns 0, potentially meddling with BOARDS, APPS, BOARDS_CHANGED, APPS_CHANGED.
|
||||
update_changed_modules() {
|
||||
# early out if there's no base commit info
|
||||
if [ -z "${CI_BASE_COMMIT}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 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
|
||||
./dist/tools/ci/static_tests.sh
|
||||
}
|
||||
|
||||
get_non_compile_jobs() {
|
||||
echo "$0 static_tests"
|
||||
[ "$STATIC_TESTS" = "1" ] && \
|
||||
echo "$0 static_tests"
|
||||
}
|
||||
|
||||
get_jobs() {
|
||||
|
||||
49
CITATION.cff
49
CITATION.cff
@ -1,49 +0,0 @@
|
||||
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.
|
||||
10
CODEOWNERS
10
CODEOWNERS
@ -40,8 +40,8 @@
|
||||
/core/ @kaspar030
|
||||
|
||||
/cpu/arm7_common/ @kaspar030 @maribu
|
||||
/cpu/avr8_common/ @kYc0o @maribu @nandojve
|
||||
/cpu/atmega*/ @kYc0o @maribu
|
||||
/cpu/avr8_common/ @kYc0o @roberthartung @maribu @nandojve
|
||||
/cpu/atmega*/ @kYc0o @roberthartung @maribu
|
||||
/cpu/atxmega/ @nandojve
|
||||
/cpu/cc2538/ @hexluthor @smlng @fjmolinas
|
||||
/cpu/cc26x0/ @hexluthor @smlng
|
||||
@ -82,7 +82,6 @@
|
||||
/drivers/ccs811/ @gschorcht
|
||||
/drivers/enc28j60/ @haukepetersen
|
||||
/drivers/dcf77/ @daexel
|
||||
/drivers/dht/ @wosym
|
||||
/drivers/dose/ @jue89
|
||||
/drivers/ds18/ @leandrolanzieri
|
||||
/drivers/itg320x/ @gschorcht
|
||||
@ -127,7 +126,7 @@
|
||||
/sys/net/gnrc/netif/ @miri64 @jia200x
|
||||
/sys/net/gnrc/routing/rpl/ @cgundogan @emmanuelsearch
|
||||
/sys/net/ @miri64 @haukepetersen @PeterKietzmann @cgundogan
|
||||
/sys/pm_layered/ @kaspar030
|
||||
/sys/pm_layered/ @roberthartung @kaspar030
|
||||
/sys/random/fortuna/ @basilfx
|
||||
/sys/riotboot/ @kaspar030 @fjmolinas
|
||||
/sys/suit @kaspar030 @fjmolinas @bergzand
|
||||
@ -142,7 +141,6 @@
|
||||
/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
|
||||
@ -152,4 +150,4 @@
|
||||
|
||||
# KConfig maintainers will be notified about all KConfig changes
|
||||
Kconfig @leandrolanzieri @jia200x @cgundogan
|
||||
pm.c @kaspar030
|
||||
pm.c @roberthartung @kaspar030
|
||||
|
||||
@ -158,6 +158,15 @@ void my_class::do_something_else() {
|
||||
- Keywords are always followed by a whitespace: `if (...)`, `template <...>`,
|
||||
`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:
|
||||
|
||||
```cpp
|
||||
|
||||
7
Kconfig
7
Kconfig
@ -50,10 +50,3 @@ config TEST_KCONFIG
|
||||
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.
|
||||
|
||||
@ -42,15 +42,6 @@ This way, their names are never removed from the RIOT repository.
|
||||
|
||||
# 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>
|
||||
@ -271,14 +262,6 @@ Reason for removal:
|
||||
- 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
|
||||
@ -307,4 +290,3 @@ Reason for removal:
|
||||
[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
|
||||
|
||||
@ -18,7 +18,7 @@ _MOD := $(shell basename $(CURDIR))
|
||||
MODULE ?= $(_MOD)
|
||||
|
||||
.PHONY: all clean $(DIRS:%=ALL--%) $(DIRS:%=CLEAN--%) $(MODULE).module \
|
||||
compile-commands $(DIRS:%=COMPILE-COMMANDS--%) $(MODULE).cleanup
|
||||
compile-commands $(DIRS:%=COMPILE-COMMANDS--%)
|
||||
|
||||
all: $(MODULE).module ..nothing
|
||||
|
||||
@ -45,11 +45,7 @@ ifeq (1, $(SUBMODULES))
|
||||
BASE_MODULE ?= $(MODULE)
|
||||
|
||||
# for each $(BASE_MODULE)_<name> in USEMODULE, add <name>.c to SRC
|
||||
# unless in SUBMODULES_NO_SRC
|
||||
SRC += $(wildcard \
|
||||
$(filter-out $(SUBMODULES_NO_SRC),\
|
||||
$(patsubst $(BASE_MODULE)_%,%.c,\
|
||||
$(filter $(BASE_MODULE)_%,$(USEMODULE)))))
|
||||
SRC += $(wildcard $(patsubst $(BASE_MODULE)_%,%.c,$(filter $(BASE_MODULE)_%,$(USEMODULE))))
|
||||
|
||||
# remove duplicates
|
||||
SRC := $(sort $(SRC))
|
||||
@ -97,8 +93,8 @@ compile-commands: | $(DIRS:%=COMPILE-COMMANDS--%)
|
||||
$(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)
|
||||
# include makefile snippets for packages in $(USEPKG) that modify GENSRC:
|
||||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.gensrc)
|
||||
|
||||
GENOBJC := $(GENSRC:%.c=%.o)
|
||||
OBJC_LTO := $(SRC:%.c=$(BINDIR)/$(MODULE)/%.o)
|
||||
@ -117,20 +113,9 @@ include $(RIOTMAKE)/tools/fixdep.inc.mk
|
||||
$(BINDIR)/$(MODULE)/:
|
||||
$(Q)mkdir -p $@
|
||||
|
||||
OLD_OBJECTS = $(wildcard $(BINDIR)/$(MODULE)/*.o)
|
||||
|
||||
# do not clean objects from bindist modules
|
||||
ifeq (,$(filter $(MODULE),$(BIN_USEMODULE)))
|
||||
OBJECTS_TO_REMOVE = $(filter-out $(OBJ),$(OLD_OBJECTS))
|
||||
endif
|
||||
|
||||
$(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)
|
||||
$(MODULE).module: $(OBJ) | $(DIRS:%=ALL--%)
|
||||
|
||||
CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
|
||||
CCASFLAGS = $(filter-out $(CCASUWFLAGS), $(CFLAGS)) $(CCASEXFLAGS)
|
||||
|
||||
10
Makefile.dep
10
Makefile.dep
@ -20,7 +20,7 @@ include $(RIOTBASE)/drivers/Makefile.dep
|
||||
-include $(sort $(USEMODULE:%=$(RIOTBASE)/drivers/%/Makefile.dep))
|
||||
|
||||
# pull dependencies from packages
|
||||
-include $(PKG_PATHS:%=%Makefile.dep)
|
||||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep)
|
||||
|
||||
ifneq (,$(filter mpu_stack_guard,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += cortexm_mpu
|
||||
@ -42,7 +42,7 @@ endif
|
||||
ifneq (,$(filter random,$(USEMODULE)))
|
||||
# select default prng if no prng is selected
|
||||
ifeq (,$(filter prng_%,$(USEMODULE)))
|
||||
USEMODULE += prng_musl_lcg
|
||||
USEMODULE += prng_tinymt32
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -93,6 +93,12 @@ ifneq (1, $(RIOTBOOT_BUILD))
|
||||
FEATURES_OPTIONAL += periph_pm
|
||||
endif
|
||||
|
||||
# always select provided architecture features
|
||||
FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED))
|
||||
|
||||
# always select CPU core features
|
||||
FEATURES_REQUIRED += $(filter cpu_core_%,$(FEATURES_PROVIDED))
|
||||
|
||||
# don't use idle thread if architecture has needed support
|
||||
FEATURES_OPTIONAL += no_idle_thread
|
||||
|
||||
|
||||
115
Makefile.include
115
Makefile.include
@ -47,7 +47,6 @@ RIOTCPU ?= $(RIOTBASE)/cpu
|
||||
RIOTBOARD ?= $(RIOTBASE)/boards
|
||||
EXTERNAL_BOARD_DIRS ?=
|
||||
RIOTMAKE ?= $(RIOTBASE)/makefiles
|
||||
RIOTKCONFIG ?= $(RIOTBASE)/kconfigs
|
||||
RIOTPKG ?= $(RIOTBASE)/pkg
|
||||
RIOTTOOLS ?= $(RIOTBASE)/dist/tools
|
||||
RIOTPROJECT ?= $(shell git rev-parse --show-toplevel 2>/dev/null || pwd)
|
||||
@ -58,7 +57,7 @@ BINDIR ?= $(BINDIRBASE)/$(BOARD)
|
||||
PKGDIRBASE ?= $(RIOTBASE)/build/pkg
|
||||
DLCACHE ?= $(RIOTTOOLS)/dlcache/dlcache.sh
|
||||
DLCACHE_DIR ?= $(RIOTBASE)/.dlcache
|
||||
RIOT_VERSION_DUMMY_CODE ?= RIOT_VERSION_NUM\(2042,5,23,0\)
|
||||
WARNING_EXTERNAL_MODULE_DIRS ?= 1
|
||||
|
||||
# include CI info such as BOARD_INSUFFICIENT_MEMORY, if existing
|
||||
-include Makefile.ci
|
||||
@ -115,6 +114,14 @@ ifneq ($(RIOT_CI_BUILD),1)
|
||||
$(warning Using BOARDSDIR is deprecated use EXTERNAL_BOARD_DIRS instead)
|
||||
$(info EXTERNAL_BOARD_DIRS can contain multiple folders separated by space)
|
||||
endif
|
||||
|
||||
# API change warning for EXTERNAL_MODULE_DIRS, remove by 2021.10
|
||||
ifneq (,$(EXTERNAL_MODULE_DIRS))
|
||||
ifeq (1,$(WARNING_EXTERNAL_MODULE_DIRS))
|
||||
$(info Warning! EXTERNAL_MODULE_DIRS is a search folder since 2021.07-branch, see \
|
||||
https://doc.riot-os.org/creating-modules.html#modules-outside-of-riotbase)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -216,8 +223,6 @@ ifeq (,$(TOOLCHAIN))
|
||||
override TOOLCHAIN := gnu
|
||||
endif
|
||||
|
||||
include $(RIOTMAKE)/cargo-settings.inc.mk
|
||||
|
||||
GLOBAL_GOALS += buildtest \
|
||||
buildtest-indocker \
|
||||
info-boards-features-blacklisted \
|
||||
@ -225,7 +230,6 @@ GLOBAL_GOALS += buildtest \
|
||||
info-boards-features-missing \
|
||||
info-boards-supported \
|
||||
info-buildsizes info-buildsizes-diff \
|
||||
create-Makefile.ci \
|
||||
#
|
||||
|
||||
ifneq (, $(filter $(GLOBAL_GOALS), $(MAKECMDGOALS)))
|
||||
@ -280,16 +284,6 @@ else
|
||||
Q=
|
||||
endif
|
||||
|
||||
# Set this to 1 to enable pretty-printing the assert location in addition
|
||||
# to the address of the failing assert.
|
||||
# This saves you to resolve the address manually with addr2line at the cost
|
||||
# of greater ROM consumption.
|
||||
VERBOSE_ASSERT ?= 0
|
||||
ifeq ($(VERBOSE_ASSERT),1)
|
||||
CFLAGS += -DDEBUG_ASSERT_VERBOSE
|
||||
DEVELHELP := 1
|
||||
endif
|
||||
|
||||
# Set this to 1 to enable code in RIOT that does safety checking
|
||||
# which is not needed in a production environment but helps in the
|
||||
# development process:
|
||||
@ -333,35 +327,35 @@ APPLICATION := $(strip $(APPLICATION))
|
||||
|
||||
ifeq (,$(and $(DOWNLOAD_TO_STDOUT),$(DOWNLOAD_TO_FILE)))
|
||||
ifeq (,$(WGET))
|
||||
ifeq (0,$(shell which wget > /dev/null 2>&1 ; echo $$?))
|
||||
WGET = $(call memoized,WGET,$(shell which wget))
|
||||
ifeq (0,$(shell which wget 2>&1 > /dev/null ; echo $$?))
|
||||
WGET := $(shell which wget)
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(CURL))
|
||||
ifeq (0,$(shell which curl > /dev/null 2>&1 ; echo $$?))
|
||||
CURL = $(call memoized,CURL,$(shell which curl))
|
||||
ifeq (0,$(shell which curl 2>&1 > /dev/null ; echo $$?))
|
||||
CURL := $(shell which curl)
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(WGET)$(CURL))
|
||||
$(warning Neither wget nor curl is installed!)
|
||||
$(error Neither wget nor curl is installed!)
|
||||
endif
|
||||
|
||||
ifeq (,$(DOWNLOAD_TO_STDOUT))
|
||||
DOWNLOAD_TO_STDOUT ?= $(if $(CURL),$(CURL) -s,$(WGET) -q -O-)
|
||||
DOWNLOAD_TO_STDOUT := $(if $(CURL),$(CURL) -s,$(WGET) -q -O-)
|
||||
endif
|
||||
ifeq (,$(DOWNLOAD_TO_FILE))
|
||||
DOWNLOAD_TO_FILE ?= $(if $(WGET),$(WGET) -nv -c -O,$(CURL) -s -o)
|
||||
DOWNLOAD_TO_FILE := $(if $(WGET),$(WGET) -nv -c -O,$(CURL) -s -o)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(UNZIP_HERE))
|
||||
ifeq (0,$(shell which unzip > /dev/null 2>&1 ; echo $$?))
|
||||
UNZIP_HERE = $(call memoized,UNZIP_HERE,$(shell which unzip) -q)
|
||||
ifeq (0,$(shell which unzip 2>&1 > /dev/null ; echo $$?))
|
||||
UNZIP_HERE := $(shell which unzip) -q
|
||||
else
|
||||
ifeq (0,$(shell which 7z > /dev/null 2>&1 ; echo $$?))
|
||||
UNZIP_HERE = $(call memoized,UNZIP_HERE,$(shell which 7z) x -bd)
|
||||
ifeq (0,$(shell which 7z 2>&1 > /dev/null ; echo $$?))
|
||||
UNZIP_HERE := $(shell which 7z) x -bd
|
||||
else
|
||||
$(warning Neither unzip nor 7z is installed.)
|
||||
$(error Neither unzip nor 7z is installed.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -386,17 +380,6 @@ ifneq (,$(IOTLAB_NODE))
|
||||
PROGRAMMER ?= iotlab
|
||||
# iotlab uses ELFFILE by default for flashing boards.
|
||||
FLASHFILE ?= $(ELFFILE)
|
||||
# RIOT_CI_BUILD disables the build of BINFILE which is required for flashing
|
||||
# on IoT-LAB
|
||||
ifeq (1,$(RIOT_CI_BUILD))
|
||||
BUILD_FILES += $(BINFILE)
|
||||
endif
|
||||
# Disable IOTLAB_NODE if inside Docker to avoid including the
|
||||
# iotlab.single.inc.mk file which is useless there: it's only useful for
|
||||
# flashing and this is done outside of Docker.
|
||||
ifeq (1,$(INSIDE_DOCKER))
|
||||
IOTLAB_NODE :=
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add standard include directories
|
||||
@ -405,12 +388,6 @@ INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBAS
|
||||
# process provided features
|
||||
include $(RIOTBASE)/Makefile.features
|
||||
|
||||
ifneq ($(RIOT_CI_BUILD),1)
|
||||
# Warn about used deprecated boards
|
||||
include $(RIOTMAKE)/deprecated_boards.inc.mk
|
||||
include $(RIOTMAKE)/deprecated_cpus.inc.mk
|
||||
endif
|
||||
|
||||
# mandatory includes!
|
||||
include $(RIOTMAKE)/pseudomodules.inc.mk
|
||||
include $(RIOTMAKE)/defaultmodules.inc.mk
|
||||
@ -420,23 +397,12 @@ include $(RIOTMAKE)/kconfig.mk
|
||||
|
||||
# For testing, use TEST_KCONFIG as a switch between Makefile.dep and Kconfig
|
||||
ifeq (1,$(TEST_KCONFIG))
|
||||
ifneq ($(RIOT_CI_BUILD),1)
|
||||
$(info === [ATTENTION] Testing Kconfig dependency modelling ===)
|
||||
endif
|
||||
$(info === [ATTENTION] Testing Kconfig dependency modelling ===)
|
||||
KCONFIG_MODULES := $(call lowercase,$(patsubst CONFIG_MODULE_%,%,$(filter CONFIG_MODULE_%,$(.VARIABLES))))
|
||||
USEMODULE := $(KCONFIG_MODULES)
|
||||
KCONFIG_PACKAGES := $(call lowercase,$(patsubst CONFIG_PACKAGE_%,%,$(filter CONFIG_PACKAGE_%,$(.VARIABLES))))
|
||||
USEPKG := $(KCONFIG_PACKAGES)
|
||||
|
||||
# Locate used packages in $(RIOTPKG).
|
||||
PKG_PATHS := $(sort $(foreach dir,$(RIOTPKG),\
|
||||
$(foreach pkg,$(USEPKG),$(dir $(wildcard $(dir)/$(pkg)/Makefile)))))
|
||||
else
|
||||
# always select provided architecture features
|
||||
FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED))
|
||||
# always select CPU core features
|
||||
FEATURES_REQUIRED += $(filter cpu_core_%,$(FEATURES_PROVIDED))
|
||||
|
||||
# check if required features are provided and update $(FEATURES_USED)
|
||||
include $(RIOTMAKE)/features_check.inc.mk
|
||||
|
||||
@ -510,8 +476,6 @@ endif
|
||||
# set some settings useful for continuous integration builds
|
||||
ifeq ($(RIOT_CI_BUILD),1)
|
||||
RIOT_VERSION ?= buildtest
|
||||
# set a dummy version number
|
||||
RIOT_VERSION_CODE ?= $(RIOT_VERSION_DUMMY_CODE)
|
||||
ifneq ($(filter $(BOARD_INSUFFICIENT_MEMORY), $(BOARD)),)
|
||||
$(info CI-build: skipping link step)
|
||||
RIOTNOLINK:=1
|
||||
@ -540,11 +504,9 @@ include $(RIOTMAKE)/cflags.inc.mk
|
||||
|
||||
# Include VERSION for releases
|
||||
-include $(RIOTBASE)/VERSION
|
||||
-include $(RIOTBASE)/EXTRAVERSION
|
||||
|
||||
include $(RIOTMAKE)/git_version.inc.mk
|
||||
RIOT_VERSION ?= $(or $(GIT_VERSION),'UNKNOWN (builddir: $(RIOTBASE))')
|
||||
RIOT_EXTRAVERSION ?= 0
|
||||
|
||||
# Deprecate using RIOT_VERSION_OVERRIDE but currently keep the behavior
|
||||
ifneq (,$(RIOT_VERSION_OVERRIDE))
|
||||
@ -552,11 +514,6 @@ ifneq (,$(RIOT_VERSION_OVERRIDE))
|
||||
RIOT_VERSION = $(RIOT_VERSION_OVERRIDE)
|
||||
endif
|
||||
|
||||
# Generate machine readable RIOT VERSION macro
|
||||
RIOT_VERSION_CODE ?= $(shell echo $(RIOT_VERSION) | \
|
||||
sed -E 's/([0-9]+)\.([0-9]+)\.?([0-9]+)?.*/RIOT_VERSION_NUM\\\(\1,\2,0\3,$(RIOT_EXTRAVERSION)\\\)/' | \
|
||||
grep RIOT_VERSION_NUM || echo "$(RIOT_VERSION_DUMMY_CODE)")
|
||||
|
||||
# Set module by prepending APPLICATION name with 'application_'.
|
||||
# It prevents conflict with application and modules with the same name.
|
||||
APPLICATION_MODULE ?= application_$(APPLICATION)
|
||||
@ -574,8 +531,8 @@ include $(RIOTBASE)/sys/Makefile.include
|
||||
# include Makefile.includes of each driver modules if they exist
|
||||
-include $(USEMODULE:%=$(RIOTBASE)/drivers/%/Makefile.include)
|
||||
|
||||
# include Makefile.includes for packages in $(PKG_PATHS)
|
||||
-include $(PKG_PATHS:%=%Makefile.include)
|
||||
# include Makefile.includes for packages in $(USEPKG)
|
||||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.include)
|
||||
|
||||
# include external modules configuration
|
||||
-include $(EXTERNAL_MODULE_PATHS:%=%/Makefile.include)
|
||||
@ -757,7 +714,7 @@ endef
|
||||
# This is not the case on MacOSX, so it must be built on the fly
|
||||
ifeq ($(OS),Darwin)
|
||||
ifneq (,$(filter debug, $(MAKECMDGOALS)))
|
||||
ifneq (0,$(shell command -v setsid > /dev/null 2>&1 ; echo $$?))
|
||||
ifneq (0,$(shell command -v setsid 2>&1 > /dev/null ; echo $$?))
|
||||
SETSID = $(RIOTTOOLS)/setsid/setsid
|
||||
$(call target-export-variables,debug,$(SETSID))
|
||||
DEBUGDEPS += $(SETSID)
|
||||
@ -775,30 +732,31 @@ endif
|
||||
# The `clean` needs to be serialized before everything else.
|
||||
all $(BASELIBS) $(ARCHIVES) $(BUILDDEPS) ..in-docker-container: | $(CLEAN)
|
||||
|
||||
.PHONY: pkg-prepare pkg-build
|
||||
.PHONY: pkg-prepare pkg-build pkg-build-%
|
||||
pkg-prepare:
|
||||
-@$(foreach dir,$(PKG_PATHS),"$(MAKE)" -C $(dir) prepare $(NEWLINE))
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i prepare ; done
|
||||
|
||||
pkg-build: $(BUILDDEPS)
|
||||
$(foreach dir,$(PKG_PATHS),$(QQ)"$(MAKE)" -C $(dir) $(NEWLINE))
|
||||
pkg-build: $(USEPKG:%=pkg-build-%)
|
||||
pkg-build-%: $(BUILDDEPS)
|
||||
$(QQ)"$(MAKE)" -C $(RIOTPKG)/$*
|
||||
|
||||
clean:
|
||||
ifndef MAKE_RESTARTS
|
||||
-@$(foreach dir,$(PKG_PATHS),"$(MAKE)" -C $(dir) clean $(NEWLINE))
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i clean ; done
|
||||
-@rm -rf $(BINDIR)
|
||||
-@rm -rf $(SCANBUILD_OUTPUTDIR)
|
||||
endif
|
||||
|
||||
# Remove intermediates, but keep the .elf, .hex and .map etc.
|
||||
clean-intermediates:
|
||||
-@$(foreach dir,$(PKG_PATHS),"$(MAKE)" -C $(dir) distclean $(NEWLINE))
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i distclean ; done
|
||||
-@rm -rf $(BINDIR)/*.a $(BINDIR)/*/
|
||||
|
||||
clean-pkg:
|
||||
-@$(foreach dir,$(PKG_PATHS),"$(MAKE)" -C $(dir) distclean $(NEWLINE))
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i distclean ; done
|
||||
|
||||
distclean:
|
||||
-@$(foreach dir,$(PKG_PATHS),"$(MAKE)" -C $(dir) distclean $(NEWLINE))
|
||||
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i distclean ; done
|
||||
-@rm -rf $(BINDIRBASE)
|
||||
|
||||
# Include PROGRAMMER_FLASH/PROGRAMMER_RESET variables
|
||||
@ -886,8 +844,6 @@ objdump:
|
||||
$(call check_cmd,$(OBJDUMP),Objdump program)
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $(ELFFILE) | less
|
||||
|
||||
# inlcude clang-tidy
|
||||
include $(RIOTMAKE)/clang_tidy.inc.mk
|
||||
# Support Eclipse IDE.
|
||||
include $(RIOTMAKE)/eclipse.inc.mk
|
||||
|
||||
@ -1022,7 +978,6 @@ $(RIOTBUILD_CONFIG_HEADER_C).in: FORCE | $(CLEAN)
|
||||
|
||||
CFLAGS_WITH_MACROS += $(CFLAGS)
|
||||
CFLAGS_WITH_MACROS += -DRIOT_VERSION=\"$(RIOT_VERSION)\"
|
||||
CFLAGS_WITH_MACROS += -DRIOT_VERSION_CODE=$(RIOT_VERSION_CODE)
|
||||
# MODULE_NAME defines. Declared in 'makefiles/modules.inc.mk'
|
||||
CFLAGS_WITH_MACROS += $(EXTDEFINES)
|
||||
|
||||
@ -1049,8 +1004,6 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
include $(RIOTMAKE)/cargo-targets.inc.mk
|
||||
|
||||
# include RIOT_MAKEFILES_GLOBAL_POST configuration files
|
||||
# allows setting user specific system wide configuration parsed after the body
|
||||
# of $(RIOTBASE)/Makefile.include
|
||||
|
||||
10
README.md
10
README.md
@ -1,14 +1,13 @@
|
||||
[![Nightly CI status master][master-ci-badge]][master-ci-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]
|
||||
[![Merge chance][merge-chance-badge]][merge-chance-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
|
||||
ZZZZZZZZZZZZ
|
||||
ZZZZZZZZZZZZZZZZ
|
||||
@ -33,7 +32,7 @@
|
||||
ZZZZZZ ZZZZZZ ZZZZZ 777 7777777777 777
|
||||
ZZZZZZZZZZZZZZZ ZZZZ 777 77777777 777
|
||||
ZZZZZZZZZZZ Z
|
||||
ZZZZZ --></p>
|
||||
ZZZZZ
|
||||
|
||||
The friendly Operating System for IoT!
|
||||
|
||||
@ -142,13 +141,14 @@ https://www.riot-os.org
|
||||
|
||||
|
||||
[api-badge]: https://img.shields.io/badge/docs-API-informational.svg
|
||||
[api-link]: https://doc.riot-os.org/
|
||||
[api-link]: https://riot-os.org/api/
|
||||
[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-link]: https://ci.riot-os.org/nightlies.html#master
|
||||
[matrix-badge]: https://img.shields.io/badge/chat-Matrix-brightgreen.svg
|
||||
[matrix-link]: https://matrix.to/#/#riot-os:matrix.org
|
||||
[merge-chance-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fmerge-chance.info%2Fbadge%3Frepo%3DRIOT-OS/RIOT&color=informational
|
||||
[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
|
||||
@ -158,5 +158,3 @@ https://www.riot-os.org
|
||||
[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
|
||||
|
||||
37
SECURITY.md
37
SECURITY.md
@ -7,13 +7,8 @@ to the previous release.
|
||||
|
||||
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 issue will be tracked in the [security mailing list](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
|
||||
|
||||
@ -34,33 +29,3 @@ 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-----
|
||||
```
|
||||
|
||||
@ -21,6 +21,9 @@ void board_init(void)
|
||||
LED1_OFF;
|
||||
LED2_OFF;
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* Stop the linker from throwing away the PIC32 config register settings */
|
||||
dummy();
|
||||
}
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
@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
|
||||
|
||||
|
||||
@ -78,5 +78,6 @@ void board_init(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* BOARD_H */
|
||||
/** @} */
|
||||
|
||||
@ -22,26 +22,19 @@
|
||||
#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)
|
||||
/** @} */
|
||||
#define PERIPHERAL_CLOCK (96000000) /* Hz */
|
||||
|
||||
/**
|
||||
* @name Timer definitions
|
||||
|
||||
@ -31,6 +31,8 @@ volatile uint32_t _DEVCFG3 __attribute__((used, section(".devcfg3"))) =
|
||||
| (_DEVCFG3_FUSBIDIO_MASK & 0 << _DEVCFG3_FUSBIDIO_POSITION)
|
||||
| (_DEVCFG3_FVBUSONIO_MASK & 1 << _DEVCFG3_FVBUSONIO_POSITION);
|
||||
|
||||
|
||||
|
||||
/* Note this sets the PLL to 96MHz (8/2 * 24) which is only supported by 3xx
|
||||
* and 4xx parts and assumes an 8MHz XTAL.
|
||||
*
|
||||
@ -84,6 +86,7 @@ volatile uint32_t _DEVCFG1 __attribute__ ((used, section(".devcfg1"))) =
|
||||
& (~_DEVCFG1_FWDTEN_MASK | 0 << _DEVCFG1_FWDTEN_POSITION)
|
||||
& (~_DEVCFG1_FWDTWINSZ_MASK | 3 << _DEVCFG1_FWDTWINSZ_POSITION);
|
||||
|
||||
|
||||
/*
|
||||
* DEVCFG0 @ 0x1FC02FFC
|
||||
*
|
||||
|
||||
@ -16,6 +16,4 @@ config BOARD_ACD52832
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf52xxxdk/Kconfig"
|
||||
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
||||
|
||||
@ -26,4 +26,7 @@ void board_init(void)
|
||||
/* initialize the boards LEDs */
|
||||
gpio_init(LED0_PIN, GPIO_OUT);
|
||||
gpio_set(LED0_PIN);
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
}
|
||||
|
||||
@ -46,6 +46,7 @@ static const saul_gpio_params_t saul_gpio_params[] =
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -18,11 +18,4 @@ config BOARD_ADAFRUIT_CLUE
|
||||
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"
|
||||
|
||||
@ -9,10 +9,4 @@ 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,6 +25,9 @@
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* initialize the boards LEDs */
|
||||
gpio_init(LED0_PIN, GPIO_OUT); /* Red LED */
|
||||
|
||||
|
||||
@ -30,84 +30,81 @@ extern "C" {
|
||||
* @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 */
|
||||
#define LED0_PIN GPIO_PIN(1, 1)
|
||||
#define LED0_MASK (1 << 1)
|
||||
#define LED0_ON (NRF_P1->OUTSET = LED0_MASK)
|
||||
#define LED0_OFF (NRF_P1->OUTCLR = LED0_MASK)
|
||||
#define LED0_TOGGLE (NRF_P1->OUT ^= LED0_MASK)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Buttons pin configuration
|
||||
* @name Button pin configuration
|
||||
* @{
|
||||
*/
|
||||
#define BTN0_PIN GPIO_PIN(1, 2) /**< Button A pin */
|
||||
#define BTN0_MODE GPIO_IN_PU /**< Button A mode */
|
||||
#define BTN0_PIN GPIO_PIN(1, 2) /* Button A */
|
||||
#define BTN0_MODE GPIO_IN_PU
|
||||
|
||||
#define BTN1_PIN GPIO_PIN(1, 10) /**< Button B pin */
|
||||
#define BTN1_MODE GPIO_IN_PU /**< Button B mode */
|
||||
#define BTN1_PIN GPIO_PIN(1, 10) /* Button B */
|
||||
#define BTN1_MODE GPIO_IN_PU
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name APDS9960 sensor configuration
|
||||
* @{
|
||||
*/
|
||||
#define APDS99XX_PARAM_DEV I2C_DEV(1) /**< I2C device */
|
||||
#define APDS99XX_PARAM_INT_PIN GPIO_PIN(0, 9) /**< Interrupt pin */
|
||||
#define APDS99XX_PARAM_DEV I2C_DEV(1)
|
||||
#define APDS99XX_PARAM_INT_PIN GPIO_PIN(0, 9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name BMP280 sensor configuration
|
||||
* @{
|
||||
*/
|
||||
#define BMX280_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
|
||||
#define BMX280_PARAM_I2C_DEV I2C_DEV(1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name LIS3MDL 3-axis magnetometer
|
||||
* @{
|
||||
* @name LIS3MDL 3-axis magnetometer I2C address
|
||||
*/
|
||||
#define LIS3MDL_PARAM_I2C I2C_DEV(1) /**< I2C device */
|
||||
#define LIS3MDL_PARAM_ADDR (0x1C) /**< I2C address */
|
||||
#define LIS3MDL_PARAM_I2C I2C_DEV(1)
|
||||
#define LIS3MDL_PARAM_ADDR (0x1C)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name STH31 temperature and humidity sensor
|
||||
* @{
|
||||
* @name STH31 temperature and humidity sensor I2C address
|
||||
*/
|
||||
#define SHT3X_PARAM_I2C_DEV I2C_DEV(1) /**< I2C device */
|
||||
#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1) /**< I2C address */
|
||||
#define SHT3X_PARAM_I2C_DEV I2C_DEV(1)
|
||||
#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Speaker pin
|
||||
* @{
|
||||
*/
|
||||
#define SPKR_PIN GPIO_PIN(1, 0) /**< Speaker pin */
|
||||
/** @} */
|
||||
#define SPKR_PIN GPIO_PIN(1, 0)
|
||||
/** @ */
|
||||
|
||||
/**
|
||||
* @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 */
|
||||
#define BACKLIGHT_PIN GPIO_PIN(1, 5)
|
||||
#define BACKLIGHT_MASK (1 << 5)
|
||||
#define BACKLIGHT_ON (NRF_P1->OUTSET = BACKLIGHT_MASK)
|
||||
#define BACKLIGHT_OFF (NRF_P1->OUTCLR = BACKLIGHT_MASK)
|
||||
/** @ */
|
||||
|
||||
/**
|
||||
* @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 */
|
||||
#define ILI9341_PARAM_SPI SPI_DEV(1)
|
||||
#define ILI9341_PARAM_CS GPIO_PIN(0, 12)
|
||||
#define ILI9341_PARAM_DCX GPIO_PIN(0, 13)
|
||||
#define ILI9341_PARAM_RST GPIO_PIN(1, 3)
|
||||
#define ILI9341_PARAM_NUM_LINES (240U)
|
||||
#define ILI9341_PARAM_RGB (1)
|
||||
#define ILI9341_PARAM_INVERTED (1)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "cfg_clock_32_0.h"
|
||||
#include "cfg_clock_32_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
#include "cfg_timer_default.h"
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
* @name UART configuration
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief UART configuration.
|
||||
*/
|
||||
static const uart_conf_t uart_config[] = {
|
||||
{
|
||||
.dev = NRF_UARTE0,
|
||||
@ -49,13 +46,8 @@ static const uart_conf_t uart_config[] = {
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief UART 0 Interrupt Service Routine.
|
||||
*/
|
||||
#define UART_0_ISR (isr_uart0)
|
||||
/**
|
||||
* @brief Number of UART peripherals.
|
||||
*/
|
||||
|
||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||
/** @} */
|
||||
|
||||
@ -63,9 +55,6 @@ static const uart_conf_t uart_config[] = {
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief I2C configuration.
|
||||
*/
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
{ /* External connectors */
|
||||
.dev = NRF_TWIM0,
|
||||
@ -81,9 +70,6 @@ static const i2c_conf_t i2c_config[] = {
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Number of I2C peripherals.
|
||||
*/
|
||||
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||
/** @} */
|
||||
|
||||
@ -91,9 +77,6 @@ static const i2c_conf_t i2c_config[] = {
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief SPI configuration.
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{ /* External connectors */
|
||||
.dev = NRF_SPIM0,
|
||||
@ -109,9 +92,6 @@ static const spi_conf_t spi_config[] = {
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Number of SPI peripherals.
|
||||
*/
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
@ -120,4 +100,3 @@ static const spi_conf_t spi_config[] = {
|
||||
#endif
|
||||
|
||||
#endif /* PERIPH_CONF_H */
|
||||
/** @} */
|
||||
|
||||
@ -22,10 +22,3 @@ config BOARD_ADAFRUIT_ITSYBITSY_M4
|
||||
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"
|
||||
|
||||
@ -13,9 +13,3 @@ 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
|
||||
|
||||
@ -60,4 +60,7 @@ void board_init(void)
|
||||
/* initialize the on-board LED */
|
||||
gpio_init(LED0_PIN, GPIO_OUT);
|
||||
LED0_OFF;
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
}
|
||||
|
||||
@ -18,6 +18,4 @@ config BOARD_ADAFRUIT_ITSYBITSY_NRF52
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_HIGHLEVEL_STDIO
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
||||
|
||||
@ -9,10 +9,4 @@ 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
|
||||
|
||||
@ -27,4 +27,7 @@ void board_init(void)
|
||||
/* initialize the board's single LED */
|
||||
gpio_init(LED0_PIN, GPIO_OUT);
|
||||
gpio_set(LED0_PIN);
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
}
|
||||
|
||||
@ -16,6 +16,5 @@ config BOARD_AIRFY_BEACON
|
||||
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,30 +0,0 @@
|
||||
# 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"
|
||||
@ -1,3 +0,0 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
@ -1,11 +0,0 @@
|
||||
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
|
||||
@ -1,13 +0,0 @@
|
||||
# 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
|
||||
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* 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 implementations for the Alientek Pandora board
|
||||
*
|
||||
* @author Luo Jia <luojia@hust.edu.cn>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include "board.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* initialize LEDs */
|
||||
gpio_init(LED0_PIN, GPIO_OUT);
|
||||
gpio_init(LED1_PIN, GPIO_OUT);
|
||||
gpio_init(LED2_PIN, GPIO_OUT);
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
/**
|
||||
@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.
|
||||
|
||||
*/
|
||||
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* 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 */
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
||||
*/
|
||||
void board_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BOARD_H */
|
||||
/** @} */
|
||||
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* 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 */
|
||||
/** @} */
|
||||
@ -1,89 +0,0 @@
|
||||
/*
|
||||
* 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 */
|
||||
/** @} */
|
||||
@ -9,7 +9,6 @@ config BOARD_ARDUINO_DUEMILANOVE
|
||||
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
|
||||
|
||||
@ -12,6 +12,5 @@ config BOARD_ARDUINO_LEONARDO
|
||||
default y
|
||||
select BOARD_COMMON_ARDUINO_ATMEGA
|
||||
select CPU_MODEL_ATMEGA32U4
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-ATMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/arduino-atmega/Kconfig"
|
||||
|
||||
@ -20,10 +20,21 @@
|
||||
|
||||
#include "board.h"
|
||||
#include "cpu.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
#ifndef CPU_ATMEGA_CLK_SCALE_INIT
|
||||
#define CPU_ATMEGA_CLK_SCALE_INIT CPU_ATMEGA_CLK_SCALE_DIV1
|
||||
#endif
|
||||
|
||||
void led_init(void);
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* disable usb interrupt */
|
||||
PRR1 |= 1<<PRUSB;
|
||||
|
||||
atmega_set_prescaler(CPU_ATMEGA_CLK_SCALE_INIT);
|
||||
avr8_stdio_init();
|
||||
cpu_init();
|
||||
led_init();
|
||||
}
|
||||
|
||||
@ -12,6 +12,5 @@ config BOARD_ARDUINO_MEGA2560
|
||||
default y
|
||||
select CPU_MODEL_ATMEGA2560
|
||||
select BOARD_COMMON_ARDUINO_ATMEGA
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-ATMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/arduino-atmega/Kconfig"
|
||||
|
||||
@ -11,6 +11,5 @@ config BOARD_ARDUINO_MKR1000
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_ARDUINO_MKR
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"
|
||||
|
||||
@ -11,6 +11,5 @@ config BOARD_ARDUINO_MKRFOX1200
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_ARDUINO_MKR
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"
|
||||
|
||||
@ -11,6 +11,5 @@ config BOARD_ARDUINO_MKRWAN1300
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_ARDUINO_MKR
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"
|
||||
|
||||
@ -11,6 +11,5 @@ config BOARD_ARDUINO_MKRZERO
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_ARDUINO_MKR
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"
|
||||
|
||||
@ -18,6 +18,4 @@ config BOARD_ARDUINO_NANO_33_BLE
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_HIGHLEVEL_STDIO
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf52/Kconfig"
|
||||
|
||||
@ -9,10 +9,4 @@ 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,6 +25,9 @@
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* initialize the boards LEDs */
|
||||
gpio_init(LED0_PIN, GPIO_OUT); /* Orange LED */
|
||||
gpio_init(LED1_PIN, GPIO_OUT); /* Red LED */
|
||||
|
||||
@ -21,7 +21,3 @@ config BOARD_ARDUINO_NANO_33_IOT
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_HIGHLEVEL_STDIO
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"
|
||||
|
||||
@ -14,9 +14,3 @@ FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += highlevel_stdio
|
||||
|
||||
# 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
|
||||
|
||||
@ -25,4 +25,7 @@ void board_init(void)
|
||||
{
|
||||
/* initialize the on-board "Yellow" LED */
|
||||
gpio_init(LED0_PIN, GPIO_OUT);
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@ config BOARD_ARDUINO_NANO
|
||||
default y
|
||||
select BOARD_COMMON_ARDUINO_ATMEGA
|
||||
select CPU_MODEL_ATMEGA328P
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-ATMEGA if TEST_KCONFIG
|
||||
|
||||
config BOARD
|
||||
default "arduino-nano" if BOARD_ARDUINO_NANO
|
||||
|
||||
@ -9,7 +9,6 @@ config BOARD_ARDUINO_UNO
|
||||
default y
|
||||
select CPU_MODEL_ATMEGA328P
|
||||
select BOARD_COMMON_ARDUINO_ATMEGA
|
||||
select MODULE_BOARDS_COMMON_ARDUINO-ATMEGA if TEST_KCONFIG
|
||||
|
||||
config BOARD
|
||||
default "arduino-uno" if BOARD_ARDUINO_UNO
|
||||
|
||||
@ -19,7 +19,3 @@ config BOARD_ATMEGA1284P
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_BOARDS_COMMON_ATMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atmega/Kconfig"
|
||||
|
||||
@ -18,9 +18,3 @@ config BOARD_ATMEGA256RFR2_XPRO
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_AT30TSE75X
|
||||
select MODULE_BOARDS_COMMON_ATMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atmega/Kconfig"
|
||||
|
||||
@ -22,6 +22,3 @@ config BOARD_ATMEGA328P_XPLAINED_MINI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
# Various other features (if any)
|
||||
select MODULE_BOARDS_COMMON_ATMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atmega/Kconfig"
|
||||
|
||||
@ -21,6 +21,3 @@ config BOARD_ATMEGA328P
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
# Various other features (if any)
|
||||
select MODULE_BOARDS_COMMON_ATMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atmega/Kconfig"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
# Copyright (c) 2020 HAW Hamburg
|
||||
# Copyright (c) 2021 Gerson Fernando Budle
|
||||
#
|
||||
# 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 "atxmega-a1-xplained" if BOARD_ATXMEGA_A1_XPLAINED
|
||||
|
||||
config BOARD_ATXMEGA_A1_XPLAINED
|
||||
bool
|
||||
default y
|
||||
select CPU_MODEL_XMEGA128A1
|
||||
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select MODULE_BOARDS_COMMON_ATXMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atxmega/Kconfig"
|
||||
@ -1,5 +0,0 @@
|
||||
MODULE = board
|
||||
|
||||
DIRS = $(RIOTBOARD)/common/atxmega
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
@ -1,5 +0,0 @@
|
||||
USEMODULE += boards_common_atxmega
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
@ -1,7 +0,0 @@
|
||||
CPU_MODEL = atxmega128a1
|
||||
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
include $(RIOTBOARD)/common/atxmega/Makefile.features
|
||||
@ -1,4 +0,0 @@
|
||||
override RAM_LEN = 65536
|
||||
override EXP_RAM = 1
|
||||
|
||||
include $(RIOTBOARD)/common/atxmega/Makefile.include
|
||||
@ -1,52 +0,0 @@
|
||||
/**
|
||||
@defgroup boards_atxmega-a1-xplained ATxmega-A1 Xplained board
|
||||
@ingroup boards
|
||||
@brief Support for the ATxmega-A1 Xplained board
|
||||
|
||||
## Overview
|
||||
|
||||
The ATxmega-A1 Xplained is an old reference to develop with XMEGA's.
|
||||
|
||||
### MCU
|
||||
| MCU | ATxmega128A1 |
|
||||
|:------------- |:--------------------------------------------- |
|
||||
| Family | AVR/ATxmega |
|
||||
| Vendor | Microchip (previously Atmel) |
|
||||
| Flash | 128KiB |
|
||||
| RAM | 8KiB |
|
||||
| EBI | 16MiB SRAM, 128MiB SDRAM |
|
||||
| EEPROM | 2KiB |
|
||||
| Frequency | up to 32MHz |
|
||||
| Timers | 8 16bit (32 bit combining 2 x 16 bit) |
|
||||
| ACs | 4 Analog Comparators |
|
||||
| ADCs | 2 - 16 channels - 12 bit - 2msps |
|
||||
| ADCs | 2 - 2 channels - 12 bit - 1msps |
|
||||
| UARTs | 8 (can be used in SPI mode) with 1 IrDA |
|
||||
| SPIs | 4 |
|
||||
| I2Cs | 4 (called TWI) |
|
||||
| DMA | 4 Channels |
|
||||
| Event System | 8 Channels |
|
||||
| Ext. INT | All GPIOs |
|
||||
| Crypto | AES/DES, CRC-16, CRC-32 |
|
||||
| Vcc | 2.7V - 5.5V (when clocked at 8MHz) |
|
||||
| Datasheet | [Datasheet](https://ww1.microchip.com/downloads/en/DeviceDoc/ATxmega128A1U-64A1U-Data-Sheet-DS40002058A.pdf) |
|
||||
| Xmega Manual | [Manual](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8331-8-and-16-bit-AVR-Microcontroller-XMEGA-AU_Manual.pdf) |
|
||||
| Guide | [AVR1924 PDF](http://ww1.microchip.com/downloads/en/AppNotes/doc8370.pdf) |
|
||||
| Schematic | [AVR1924 ZIP](https://ww1.microchip.com/downloads/en/AppNotes/AVR1924.zip) |
|
||||
|
||||
## Flashing the Device
|
||||
|
||||
The ATxmega-A1 Xplained needs an external programmer like atmelice.
|
||||
|
||||
In order to flash the ATxmega128A1, simple run:
|
||||
|
||||
make BOARD=atxmega-a1-xplained flash
|
||||
|
||||
## Serial Terminal
|
||||
|
||||
The CDC-ACM will enumerate a /dev/ttyACM device. The STDIO at CDC-ACM shares
|
||||
with J4 pins 2/3.
|
||||
|
||||
make BOARD=atxmega-a1-xplained term
|
||||
|
||||
*/
|
||||
@ -1,186 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Gerson Fernando Budke
|
||||
*
|
||||
* 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_atxmega-a1-xplained
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Board specific definitions for the ATxmegaA1 Xplained board.
|
||||
*
|
||||
* @author Gerson Fernando Budke <nandojve@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef BOARD_H
|
||||
#define BOARD_H
|
||||
|
||||
#include "cpu.h"
|
||||
#include "macros/units.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Clock configuration
|
||||
*/
|
||||
#define CLOCK_CORECLOCK MHZ(32)
|
||||
|
||||
/**
|
||||
* @brief Use the UART-2 for STDIO on this board
|
||||
*/
|
||||
#define STDIO_UART_DEV UART_DEV(2)
|
||||
|
||||
/**
|
||||
* @name Baudrate for STDIO terminal
|
||||
*
|
||||
* The standard configuration for STDIO in cpu/atxmega/periph/uart.c
|
||||
* is to use double speed.
|
||||
*
|
||||
* For 32MHz F_CPU following Baudrate have good error rates
|
||||
* 115200
|
||||
*
|
||||
* Matches this with BAUD in Board/Makefile.include
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#ifndef STDIO_UART_BAUDRATE
|
||||
#define STDIO_UART_BAUDRATE (115200U)
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name LED pin definitions and handlers
|
||||
* @{
|
||||
*/
|
||||
#define LED_PORT PORTE
|
||||
|
||||
#define LED0_PIN GPIO_PIN(PORT_E, 0)
|
||||
#define LED0_MODE GPIO_OUT
|
||||
#define LED0_MASK (PIN0_bm)
|
||||
#define LED0_ON (LED_PORT.OUTCLR = LED0_MASK)
|
||||
#define LED0_OFF (LED_PORT.OUTSET = LED0_MASK)
|
||||
#define LED0_TOGGLE (LED_PORT.OUTTGL = LED0_MASK)
|
||||
|
||||
#define LED1_PIN GPIO_PIN(PORT_E, 1)
|
||||
#define LED1_MODE GPIO_OUT
|
||||
#define LED1_MASK (PIN1_bm)
|
||||
#define LED1_ON (LED_PORT.OUTCLR = LED1_MASK)
|
||||
#define LED1_OFF (LED_PORT.OUTSET = LED1_MASK)
|
||||
#define LED1_TOGGLE (LED_PORT.OUTTGL = LED1_MASK)
|
||||
|
||||
#define LED2_PIN GPIO_PIN(PORT_E, 2)
|
||||
#define LED2_MODE GPIO_OUT
|
||||
#define LED2_MASK (PIN2_bm)
|
||||
#define LED2_ON (LED_PORT.OUTCLR = LED2_MASK)
|
||||
#define LED2_OFF (LED_PORT.OUTSET = LED2_MASK)
|
||||
#define LED2_TOGGLE (LED_PORT.OUTTGL = LED2_MASK)
|
||||
|
||||
#define LED3_PIN GPIO_PIN(PORT_E, 3)
|
||||
#define LED3_MODE GPIO_OUT
|
||||
#define LED3_MASK (PIN3_bm)
|
||||
#define LED3_ON (LED_PORT.OUTCLR = LED3_MASK)
|
||||
#define LED3_OFF (LED_PORT.OUTSET = LED3_MASK)
|
||||
#define LED3_TOGGLE (LED_PORT.OUTTGL = LED3_MASK)
|
||||
|
||||
#define LED4_PIN GPIO_PIN(PORT_E, 4)
|
||||
#define LED4_MODE GPIO_OUT
|
||||
#define LED4_MASK (PIN4_bm)
|
||||
#define LED4_ON (LED_PORT.OUTCLR = LED4_MASK)
|
||||
#define LED4_OFF (LED_PORT.OUTSET = LED4_MASK)
|
||||
#define LED4_TOGGLE (LED_PORT.OUTTGL = LED4_MASK)
|
||||
|
||||
#define LED5_PIN GPIO_PIN(PORT_E, 5)
|
||||
#define LED5_MODE GPIO_OUT
|
||||
#define LED5_MASK (PIN5_bm)
|
||||
#define LED5_ON (LED_PORT.OUTCLR = LED5_MASK)
|
||||
#define LED5_OFF (LED_PORT.OUTSET = LED5_MASK)
|
||||
#define LED5_TOGGLE (LED_PORT.OUTTGL = LED5_MASK)
|
||||
|
||||
#define LED6_PIN GPIO_PIN(PORT_E, 6)
|
||||
#define LED6_MODE GPIO_OUT
|
||||
#define LED6_MASK (PIN6_bm)
|
||||
#define LED6_ON (LED_PORT.OUTCLR = LED6_MASK)
|
||||
#define LED6_OFF (LED_PORT.OUTSET = LED6_MASK)
|
||||
#define LED6_TOGGLE (LED_PORT.OUTTGL = LED6_MASK)
|
||||
|
||||
#define LED7_PIN GPIO_PIN(PORT_E, 7)
|
||||
#define LED7_MODE GPIO_OUT
|
||||
#define LED7_MASK (PIN7_bm)
|
||||
#define LED7_ON (LED_PORT.OUTCLR = LED7_MASK)
|
||||
#define LED7_OFF (LED_PORT.OUTSET = LED7_MASK)
|
||||
#define LED7_TOGGLE (LED_PORT.OUTTGL = LED7_MASK)
|
||||
|
||||
#define LED_PORT_MASK (LED0_MASK | LED1_MASK | LED2_MASK | LED3_MASK | \
|
||||
LED4_MASK | LED5_MASK | LED6_MASK | LED7_MASK)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Button pin configuration
|
||||
* @{
|
||||
*/
|
||||
#define BTN0_PIN GPIO_PIN(PORT_D, 0)
|
||||
#define BTN0_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN0_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN1_PIN GPIO_PIN(PORT_D, 1)
|
||||
#define BTN1_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN1_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN2_PIN GPIO_PIN(PORT_D, 2)
|
||||
#define BTN2_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN2_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN3_PIN GPIO_PIN(PORT_D, 3)
|
||||
#define BTN3_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN3_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN4_PIN GPIO_PIN(PORT_D, 4)
|
||||
#define BTN4_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN4_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN5_PIN GPIO_PIN(PORT_D, 5)
|
||||
#define BTN5_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN5_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN6_PIN GPIO_PIN(PORT_R, 0)
|
||||
#define BTN6_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN6_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
|
||||
#define BTN7_PIN GPIO_PIN(PORT_R, 1)
|
||||
#define BTN7_MODE (GPIO_IN | GPIO_OPC_PU | GPIO_SLEW_RATE)
|
||||
#define BTN7_INT_FLANK (GPIO_ISC_FALLING | GPIO_LVL_LOW)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name xtimer configuration values
|
||||
* if XTIMER_HZ > 1MHz then (XTIMER_HZ != (1000000ul << XTIMER_SHIFT))
|
||||
* if XTIMER_HZ < 1MHz then ((XTIMER_HZ << XTIMER_SHIFT) != 1000000ul)
|
||||
*
|
||||
* 32MHz Core Clock
|
||||
* XTIMER_HZ 4000000 (clkdiv 8 ) XTIMER_SHIFT 2
|
||||
* XTIMER_HZ 1000000 () XTIMER_SHIFT 0
|
||||
* XTIMER_HZ 500000 (clkdiv 64) XTIMER_SHIFT 1
|
||||
* XTIMER_HZ 250000 (clkdiv 128) XTIMER_SHIFT 2
|
||||
* XTIMER_HZ 31250 (clkdiv 1024) XTIMER_SHIFT 5
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#define XTIMER_DEV TIMER_DEV(0)
|
||||
#define XTIMER_CHAN (0)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#define XTIMER_HZ KHZ(500)
|
||||
#define XTIMER_BACKOFF (150)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BOARD_H */
|
||||
/** @} */
|
||||
@ -1,137 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Gerson Fernando Budke
|
||||
*
|
||||
* 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_atxmega-a1-xplained
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Configuration of SAUL mapped GPIO pins
|
||||
*
|
||||
* @author Gerson Fernando Budke <nandojve@gmail.com>
|
||||
*/
|
||||
|
||||
#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 = "SW0",
|
||||
.pin = BTN0_PIN,
|
||||
.mode = BTN0_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW1",
|
||||
.pin = BTN1_PIN,
|
||||
.mode = BTN1_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW2",
|
||||
.pin = BTN2_PIN,
|
||||
.mode = BTN2_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW3",
|
||||
.pin = BTN3_PIN,
|
||||
.mode = BTN3_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW4",
|
||||
.pin = BTN4_PIN,
|
||||
.mode = BTN4_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW5",
|
||||
.pin = BTN5_PIN,
|
||||
.mode = BTN5_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW6",
|
||||
.pin = BTN6_PIN,
|
||||
.mode = BTN6_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "SW7",
|
||||
.pin = BTN7_PIN,
|
||||
.mode = BTN7_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED0",
|
||||
.pin = LED0_PIN,
|
||||
.mode = LED0_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED1",
|
||||
.pin = LED1_PIN,
|
||||
.mode = LED1_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED2",
|
||||
.pin = LED2_PIN,
|
||||
.mode = LED2_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED3",
|
||||
.pin = LED3_PIN,
|
||||
.mode = LED3_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED4",
|
||||
.pin = LED4_PIN,
|
||||
.mode = LED4_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED5",
|
||||
.pin = LED5_PIN,
|
||||
.mode = LED5_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED6",
|
||||
.pin = LED6_PIN,
|
||||
.mode = LED6_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
{
|
||||
.name = "LED7",
|
||||
.pin = LED7_PIN,
|
||||
.mode = LED7_MODE,
|
||||
.flags = SAUL_GPIO_INVERTED,
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GPIO_PARAMS_H */
|
||||
/** @} */
|
||||
@ -1,242 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Gerson Fernando Budke
|
||||
*
|
||||
* 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_atxmega-a1-xplained
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Peripheral MCU configuration for the ATxmegaA1 Xplained board.
|
||||
*
|
||||
* @author Gerson Fernando Budke <nandojve@gmail.com>
|
||||
*/
|
||||
#include "mutex.h"
|
||||
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <avr/io.h>
|
||||
|
||||
#include "periph_cpu.h"
|
||||
|
||||
/**
|
||||
* @name Timer peripheral configuration
|
||||
* @{
|
||||
*/
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.dev = (void *)&TCC1,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_C, PR_TC1_bm),
|
||||
.type = TC_TYPE_1,
|
||||
.int_lvl = { CPU_INT_LVL_LOW,
|
||||
CPU_INT_LVL_OFF,
|
||||
CPU_INT_LVL_OFF,
|
||||
CPU_INT_LVL_OFF },
|
||||
},
|
||||
{
|
||||
.dev = (void *)&TCC0,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_C, PR_TC0_bm),
|
||||
.type = TC_TYPE_0,
|
||||
.int_lvl = { CPU_INT_LVL_LOW,
|
||||
CPU_INT_LVL_LOW,
|
||||
CPU_INT_LVL_LOW,
|
||||
CPU_INT_LVL_LOW },
|
||||
}
|
||||
};
|
||||
|
||||
#define TIMER_0_ISRA TCC1_CCA_vect
|
||||
|
||||
#define TIMER_1_ISRA TCC0_CCA_vect
|
||||
#define TIMER_1_ISRB TCC0_CCB_vect
|
||||
#define TIMER_1_ISRC TCC0_CCC_vect
|
||||
#define TIMER_1_ISRD TCC0_CCD_vect
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name UART configuration
|
||||
* @{
|
||||
*/
|
||||
static const uart_conf_t uart_config[] = {
|
||||
{ /* J1 */
|
||||
.dev = &USARTF0,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_F, PR_USART0_bm),
|
||||
.rx_pin = GPIO_PIN(PORT_F, 2),
|
||||
.tx_pin = GPIO_PIN(PORT_F, 3),
|
||||
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||
.rts_pin = GPIO_UNDEF,
|
||||
.cts_pin = GPIO_UNDEF,
|
||||
#endif
|
||||
.rx_int_lvl = CPU_INT_LVL_LOW,
|
||||
.tx_int_lvl = CPU_INT_LVL_LOW,
|
||||
.dre_int_lvl = CPU_INT_LVL_OFF,
|
||||
},
|
||||
{ /* J3 - Shared with SAUL */
|
||||
.dev = &USARTD0,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_D, PR_USART0_bm),
|
||||
.rx_pin = GPIO_PIN(PORT_D, 2),
|
||||
.tx_pin = GPIO_PIN(PORT_D, 3),
|
||||
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||
.rts_pin = GPIO_UNDEF,
|
||||
.cts_pin = GPIO_UNDEF,
|
||||
#endif
|
||||
.rx_int_lvl = CPU_INT_LVL_LOW,
|
||||
.tx_int_lvl = CPU_INT_LVL_LOW,
|
||||
.dre_int_lvl = CPU_INT_LVL_OFF,
|
||||
},
|
||||
{ /* J4 */
|
||||
.dev = &USARTC0,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_C, PR_USART0_bm),
|
||||
.rx_pin = GPIO_PIN(PORT_C, 2),
|
||||
.tx_pin = GPIO_PIN(PORT_C, 3),
|
||||
#ifdef MODULE_PERIPH_UART_HW_FC
|
||||
.rts_pin = GPIO_UNDEF,
|
||||
.cts_pin = GPIO_UNDEF,
|
||||
#endif
|
||||
.rx_int_lvl = CPU_INT_LVL_LOW,
|
||||
.tx_int_lvl = CPU_INT_LVL_LOW,
|
||||
.dre_int_lvl = CPU_INT_LVL_OFF,
|
||||
},
|
||||
};
|
||||
|
||||
/* interrupt function name mapping */
|
||||
#define UART_0_RXC_ISR USARTF0_RXC_vect /* Reception Complete Interrupt */
|
||||
#define UART_0_DRE_ISR USARTF0_DRE_vect /* Data Register Empty Interrupt */
|
||||
#define UART_0_TXC_ISR USARTF0_TXC_vect /* Transmission Complete Interrupt */
|
||||
|
||||
#define UART_1_RXC_ISR USARTD0_RXC_vect
|
||||
#define UART_1_DRE_ISR USARTD0_DRE_vect
|
||||
#define UART_1_TXC_ISR USARTD0_TXC_vect
|
||||
|
||||
#define UART_2_RXC_ISR USARTC0_RXC_vect
|
||||
#define UART_2_DRE_ISR USARTC0_DRE_vect
|
||||
#define UART_2_TXC_ISR USARTC0_TXC_vect
|
||||
|
||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name I2C configuration
|
||||
* @{
|
||||
*/
|
||||
static const i2c_conf_t i2c_config[] = {
|
||||
{
|
||||
.dev = &TWIF,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_F, PR_TWI_bm),
|
||||
.sda_pin = GPIO_PIN(PORT_F, 0),
|
||||
.scl_pin = GPIO_PIN(PORT_F, 1),
|
||||
.speed = I2C_SPEED_NORMAL,
|
||||
.int_lvl = CPU_INT_LVL_LOW,
|
||||
},
|
||||
{
|
||||
.dev = &TWIC,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_C, PR_TWI_bm),
|
||||
.sda_pin = GPIO_PIN(PORT_C, 0),
|
||||
.scl_pin = GPIO_PIN(PORT_C, 1),
|
||||
.speed = I2C_SPEED_NORMAL,
|
||||
.int_lvl = CPU_INT_LVL_LOW,
|
||||
},
|
||||
};
|
||||
|
||||
#define I2C_0_ISR TWIF_TWIM_vect
|
||||
#define I2C_1_ISR TWIC_TWIM_vect
|
||||
|
||||
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{
|
||||
.dev = &SPIF,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_F, PR_SPI_bm),
|
||||
.sck_pin = GPIO_PIN(PORT_F, 7),
|
||||
.miso_pin = GPIO_PIN(PORT_F, 6),
|
||||
.mosi_pin = GPIO_PIN(PORT_F, 5),
|
||||
.ss_pin = GPIO_PIN(PORT_F, 4),
|
||||
},
|
||||
{
|
||||
.dev = &SPIC,
|
||||
.pwr = PWR_RED_REG(PWR_PORT_C, PR_SPI_bm),
|
||||
.sck_pin = GPIO_PIN(PORT_C, 7),
|
||||
.miso_pin = GPIO_PIN(PORT_C, 6),
|
||||
.mosi_pin = GPIO_PIN(PORT_C, 5),
|
||||
.ss_pin = GPIO_PIN(PORT_C, 4),
|
||||
},
|
||||
};
|
||||
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name EBI configuration
|
||||
*
|
||||
* For more information, see ebi_conf_t structure.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
static const ebi_conf_t ebi_config = {
|
||||
.addr_bits = 12,
|
||||
.flags = (EBI_PORT_SDRAM | EBI_PORT_3PORT),
|
||||
.sram_ale = 0,
|
||||
.lpc_ale = 0,
|
||||
.sdram = {
|
||||
0,
|
||||
1024,
|
||||
6400,
|
||||
EBI_CS_SDMODE_NORMAL_gc,
|
||||
EBI_SDRAM_CAS_LAT_3CLK,
|
||||
EBI_SDRAM_ROW_BITS_12,
|
||||
EBI_SDCOL_10BIT_gc,
|
||||
EBI_MRDLY_2CLK_gc,
|
||||
EBI_ROWCYCDLY_7CLK_gc,
|
||||
EBI_RPDLY_7CLK_gc,
|
||||
EBI_WRDLY_1CLK_gc,
|
||||
EBI_ESRDLY_7CLK_gc,
|
||||
EBI_ROWCOLDLY_7CLK_gc,
|
||||
},
|
||||
.cs = { { EBI_CS_MODE_DISABLED_gc,
|
||||
0,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
},
|
||||
{ EBI_CS_MODE_DISABLED_gc,
|
||||
0,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
},
|
||||
{ EBI_CS_MODE_DISABLED_gc,
|
||||
0,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
},
|
||||
{ EBI_CS_MODE_SDRAM_gc,
|
||||
EBI_CS_ASIZE_8MB_gc,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
},
|
||||
},
|
||||
};
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "periph_conf_common.h"
|
||||
|
||||
#endif /* PERIPH_CONF_H */
|
||||
/** @} */
|
||||
@ -12,12 +12,15 @@ config BOARD_ATXMEGA_A1U_XPRO
|
||||
bool
|
||||
default y
|
||||
select CPU_MODEL_XMEGA128A1U
|
||||
|
||||
select HAS_PERIPH_CPUID
|
||||
select HAS_PERIPH_GPIO
|
||||
select HAS_PERIPH_GPIO_IRQ
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_NVM
|
||||
select HAS_PERIPH_PM
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_TIMER_PERIODIC
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select MODULE_BOARDS_COMMON_ATXMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atxmega/Kconfig"
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
CPU_MODEL = atxmega128a1u
|
||||
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
include $(RIOTBOARD)/common/atxmega/Makefile.features
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
AVRDUDE_PROGRAMMER = xplainedpro_pdi
|
||||
DEBUGPROTO = -X
|
||||
|
||||
override RAM_LEN = 65536
|
||||
override EXP_RAM = 1
|
||||
|
||||
include $(RIOTBOARD)/common/atxmega/Makefile.include
|
||||
|
||||
@ -130,44 +130,6 @@ static const spi_conf_t spi_config[] = {
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name EBI configuration
|
||||
*
|
||||
* For more information, see ebi_conf_t structure.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
static const ebi_conf_t ebi_config = {
|
||||
.addr_bits = 18, /* A0-A17 */
|
||||
.flags = (EBI_PORT_LPC | EBI_PORT_CS2),
|
||||
.sram_ale = 0,
|
||||
.lpc_ale = 2,
|
||||
.sdram = { 0 },
|
||||
.cs = { /* Reserved A16 */
|
||||
{ EBI_CS_MODE_DISABLED_gc,
|
||||
0,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
}, /* Reserved A17 */
|
||||
{ EBI_CS_MODE_DISABLED_gc,
|
||||
0,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
}, /* CS2 - 256K SRAM */
|
||||
{ EBI_CS_MODE_LPC_gc,
|
||||
EBI_CS_ASPACE_256KB_gc,
|
||||
EBI_CS_SRWS_1CLK_gc,
|
||||
0x0UL,
|
||||
}, /* Reserved LCD */
|
||||
{ EBI_CS_MODE_DISABLED_gc,
|
||||
0,
|
||||
EBI_CS_SRWS_0CLK_gc,
|
||||
0x0UL,
|
||||
},
|
||||
},
|
||||
};
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -12,12 +12,15 @@ config BOARD_ATXMEGA_A3BU_XPLAINED
|
||||
bool
|
||||
default y
|
||||
select CPU_MODEL_XMEGA256A3BU
|
||||
|
||||
select HAS_PERIPH_CPUID
|
||||
select HAS_PERIPH_GPIO
|
||||
select HAS_PERIPH_GPIO_IRQ
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_NVM
|
||||
select HAS_PERIPH_PM
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_TIMER_PERIODIC
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select MODULE_BOARDS_COMMON_ATXMEGA if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/atxmega/Kconfig"
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
CPU_MODEL = atxmega256a3bu
|
||||
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
include $(RIOTBOARD)/common/atxmega/Makefile.features
|
||||
|
||||
@ -18,12 +18,3 @@ config BOARD_AVR_RSS2
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_BOARDS_COMMON_ATMEGA if TEST_KCONFIG
|
||||
select MODULE_ATMEGA_PCINT0 if TEST_KCONFIG
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_BME280_I2C
|
||||
select HAVE_AT24MAC
|
||||
|
||||
|
||||
source "$(RIOTBOARD)/common/atmega/Kconfig"
|
||||
|
||||
@ -1,16 +1,9 @@
|
||||
USEMODULE += boards_common_atmega
|
||||
|
||||
# enable pin change interrupts bank 0
|
||||
USEMODULE += atmega_pcint0
|
||||
|
||||
ifneq (,$(filter eui_provider,$(USEMODULE)))
|
||||
USEMODULE += at24mac
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mtd,$(USEMODULE)))
|
||||
USEMODULE += mtd_at24cxxx at24mac
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += bme280_i2c
|
||||
USEMODULE += saul_gpio
|
||||
|
||||
@ -58,6 +58,7 @@ extern "C" {
|
||||
#define LED1_ON (LED_PORT &= ~LED1_MASK)
|
||||
#define LED1_TOGGLE (LED_PORT ^= LED1_MASK)
|
||||
|
||||
|
||||
/**
|
||||
* @name Usage of LED to turn on when a kernel panic occurs.
|
||||
* @{
|
||||
@ -65,6 +66,7 @@ extern "C" {
|
||||
#define LED_PANIC LED0_ON
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* @name DS18 pins OW_BUS_0
|
||||
* @{
|
||||
@ -103,6 +105,7 @@ extern "C" {
|
||||
* @name User button configuration
|
||||
* @{
|
||||
*/
|
||||
#define MODULE_ATMEGA_PCINT0
|
||||
#define BTN0_PIN GPIO_PIN(PORT_B, 0)
|
||||
#define BTN0_MODE GPIO_IN
|
||||
/** @} */
|
||||
|
||||
@ -42,6 +42,7 @@ static inline int _at24mac_get_eui64(uint8_t index, eui64_t *addr)
|
||||
#define EUI64_PROVIDER_INDEX 0
|
||||
/** @} */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
ifneq (,$(filter netdev_default,$(USEMODULE)))
|
||||
USEMODULE += cc1100
|
||||
USEMODULE += cc110x_868mhz
|
||||
endif
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief avsextrem board initialization
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup boards_avsextrem
|
||||
* @{
|
||||
@ -18,6 +19,7 @@
|
||||
* @author Zakaria Kasmi
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOARD_H
|
||||
#define BOARD_H
|
||||
|
||||
|
||||
@ -32,6 +32,4 @@ config BOARD_B_L072Z_LRWAN1
|
||||
# Clock configuration
|
||||
select BOARD_HAS_LSE
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
||||
@ -21,8 +21,12 @@
|
||||
#include "board.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
#if defined(MODULE_SX1276)
|
||||
/* Enable TCXO */
|
||||
gpio_init(RADIO_TCXO_VCC_PIN, GPIO_OUT);
|
||||
|
||||
@ -84,12 +84,9 @@ extern "C" {
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name User button pin configuration
|
||||
* @{
|
||||
* @brief User button
|
||||
*/
|
||||
#define BTN0_PIN GPIO_PIN(PORT_B, 2) /**< User button pin */
|
||||
#define BTN0_MODE GPIO_IN_PU /**< User button pin mode */
|
||||
/** @} */
|
||||
#define BTN_B1_PIN GPIO_PIN(PORT_B, 2)
|
||||
|
||||
/**
|
||||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
||||
|
||||
@ -55,8 +55,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
|
||||
},
|
||||
{
|
||||
.name = "Button(B1 User)",
|
||||
.pin = BTN0_PIN,
|
||||
.mode = BTN0_MODE
|
||||
.pin = BTN_B1_PIN,
|
||||
.mode = GPIO_IN_PU
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ static const spi_conf_t spi_config[] = {
|
||||
.mosi_pin = GPIO_PIN(PORT_B, 15),
|
||||
.miso_pin = GPIO_PIN(PORT_B, 14),
|
||||
.sclk_pin = GPIO_PIN(PORT_B, 13),
|
||||
.cs_pin = SPI_CS_UNDEF,
|
||||
.cs_pin = GPIO_UNDEF,
|
||||
.mosi_af = GPIO_AF0,
|
||||
.miso_af = GPIO_AF0,
|
||||
.sclk_af = GPIO_AF0,
|
||||
@ -128,7 +128,7 @@ static const spi_conf_t spi_config[] = {
|
||||
.mosi_pin = GPIO_PIN(PORT_A, 7),
|
||||
.miso_pin = GPIO_PIN(PORT_A, 6),
|
||||
.sclk_pin = GPIO_PIN(PORT_B, 3),
|
||||
.cs_pin = SPI_CS_UNDEF,
|
||||
.cs_pin = GPIO_UNDEF,
|
||||
.mosi_af = GPIO_AF0,
|
||||
.miso_af = GPIO_AF0,
|
||||
.sclk_af = GPIO_AF0,
|
||||
|
||||
@ -22,7 +22,6 @@ config BOARD_B_L475E_IOT01A
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
@ -30,10 +29,4 @@ config BOARD_B_L475E_IOT01A
|
||||
# Clock configuration
|
||||
select BOARD_HAS_LSE
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_HTS221
|
||||
select HAVE_LIS3MDL
|
||||
select HAVE_LPS22HB
|
||||
select HAVE_LSM6DSL
|
||||
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
||||
@ -10,7 +10,6 @@ FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
||||
@ -23,6 +23,9 @@
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
#ifdef AUTO_INIT_LED0
|
||||
/* The LED pin is also used for SPI, so we enable it
|
||||
only if explicitly wanted by the user */
|
||||
|
||||
@ -47,12 +47,9 @@ extern "C" {
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name User button pin configuration
|
||||
* @{
|
||||
* @brief User button
|
||||
*/
|
||||
#define BTN0_PIN GPIO_PIN(PORT_C, 13) /**< User button pin */
|
||||
#define BTN0_MODE GPIO_IN_PU /**< User button pin mode */
|
||||
/** @} */
|
||||
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
|
||||
|
||||
/**
|
||||
* @name HTS221 temperature/humidity sensor configuration
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user