Compare commits

..

No commits in common. "master" and "2022.01-devel" have entirely different histories.

2617 changed files with 14319 additions and 51498 deletions

1
.gitattributes vendored
View File

@ -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
View 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!
-->

View File

@ -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
View File

@ -35,7 +35,6 @@
- "doc/**/*"
- "**/*.md"
- "**/*.txt"
- "**/*.cff"
"Area: drivers":
- "drivers/**/*"

View File

@ -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
@ -142,13 +142,13 @@ jobs:
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" \
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 }}"

View File

@ -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

View File

@ -75,7 +75,3 @@ jobs:
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

5
.gitignore vendored
View File

@ -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

283
.murdock
View File

@ -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,10 @@
: ${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
remote-revb
"}
: ${TEST_KCONFIG_ENFORCE_APP_GROUPS:="
@ -89,55 +33,13 @@ 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"}
export RIOT_CI_BUILD=1
@ -146,10 +48,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 +66,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 +87,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 +172,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 +225,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 +253,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 +316,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,118 +415,14 @@ 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
}
get_non_compile_jobs() {
[ "$STATIC_TESTS" = "1" ] && \
echo "$0 static_tests"
}

View File

@ -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.

View File

@ -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
@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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,6 +57,7 @@ BINDIR ?= $(BINDIRBASE)/$(BOARD)
PKGDIRBASE ?= $(RIOTBASE)/build/pkg
DLCACHE ?= $(RIOTTOOLS)/dlcache/dlcache.sh
DLCACHE_DIR ?= $(RIOTBASE)/.dlcache
WARNING_EXTERNAL_MODULE_DIRS ?= 1
RIOT_VERSION_DUMMY_CODE ?= RIOT_VERSION_NUM\(2042,5,23,0\)
# include CI info such as BOARD_INSUFFICIENT_MEMORY, if existing
@ -115,6 +115,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 +224,6 @@ ifeq (,$(TOOLCHAIN))
override TOOLCHAIN := gnu
endif
include $(RIOTMAKE)/cargo-settings.inc.mk
GLOBAL_GOALS += buildtest \
buildtest-indocker \
info-boards-features-blacklisted \
@ -225,7 +231,6 @@ GLOBAL_GOALS += buildtest \
info-boards-features-missing \
info-boards-supported \
info-buildsizes info-buildsizes-diff \
create-Makefile.ci \
#
ifneq (, $(filter $(GLOBAL_GOALS), $(MAKECMDGOALS)))
@ -386,17 +391,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 +399,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 +408,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
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
@ -574,8 +551,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)
@ -775,30 +752,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
@ -1049,8 +1027,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

View File

@ -4,6 +4,7 @@
[![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]
@ -149,6 +150,7 @@ https://www.riot-os.org
[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

View File

@ -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-----
```

View File

@ -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();
}

View File

@ -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

View File

@ -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"

View File

@ -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();
}

View File

@ -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"

View File

@ -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

View File

@ -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 */

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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();
}

View File

@ -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"

View File

@ -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

View File

@ -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();
}

View File

@ -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"

View File

@ -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"

View File

@ -1,3 +0,0 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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.
*/

View File

@ -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 */
/** @} */

View File

@ -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 */
/** @} */

View File

@ -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 */
/** @} */

View File

@ -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

View File

@ -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"

View File

@ -25,5 +25,7 @@ void led_init(void);
void board_init(void)
{
avr8_stdio_init();
cpu_init();
led_init();
}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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 */

View File

@ -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"

View File

@ -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

View File

@ -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();
}

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -18,6 +18,3 @@ config BOARD_ATXMEGA_A1_XPLAINED
select HAS_PERIPH_UART
select HAVE_SAUL_GPIO
select MODULE_BOARDS_COMMON_ATXMEGA if TEST_KCONFIG
source "$(RIOTBOARD)/common/atxmega/Kconfig"

View File

@ -18,6 +18,3 @@ config BOARD_ATXMEGA_A1U_XPRO
select HAS_PERIPH_UART
select HAVE_SAUL_GPIO
select MODULE_BOARDS_COMMON_ATXMEGA if TEST_KCONFIG
source "$(RIOTBOARD)/common/atxmega/Kconfig"

View File

@ -18,6 +18,3 @@ config BOARD_ATXMEGA_A3BU_XPLAINED
select HAS_PERIPH_UART
select HAVE_SAUL_GPIO
select MODULE_BOARDS_COMMON_ATXMEGA if TEST_KCONFIG
source "$(RIOTBOARD)/common/atxmega/Kconfig"

View File

@ -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"

View File

@ -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

View File

@ -103,6 +103,7 @@ extern "C" {
* @name User button configuration
* @{
*/
#define MODULE_ATMEGA_PCINT0
#define BTN0_PIN GPIO_PIN(PORT_B, 0)
#define BTN0_MODE GPIO_IN
/** @} */

View File

@ -32,6 +32,4 @@ config BOARD_B_L072Z_LRWAN1
# Clock configuration
select BOARD_HAS_LSE
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/stm32/Kconfig"

View File

@ -23,6 +23,9 @@
void board_init(void)
{
/* initialize the CPU */
cpu_init();
#if defined(MODULE_SX1276)
/* Enable TCXO */
gpio_init(RADIO_TCXO_VCC_PIN, GPIO_OUT);

View File

@ -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

View File

@ -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
},
};

View File

@ -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,

View File

@ -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"

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -47,8 +47,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,
.flags = SAUL_GPIO_INVERTED
}
};

View File

@ -27,7 +27,6 @@
#include "periph_cpu.h"
#include "clk_conf.h"
#include "cfg_rtt_default.h"
#include "cfg_usb_otg_fs.h"
#ifdef __cplusplus
extern "C" {
@ -146,7 +145,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_A, 5),
.cs_pin = SPI_CS_UNDEF,
.cs_pin = GPIO_UNDEF,
.mosi_af = GPIO_AF5,
.miso_af = GPIO_AF5,
.sclk_af = GPIO_AF5,

View File

@ -1,3 +0,0 @@
MODULE = board
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +0,0 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += hts221
USEMODULE += lps22hh
endif

View File

@ -1,9 +0,0 @@
CPU = stm32
CPU_MODEL = stm32u585ai
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
# Put other features for this board (in alphabetical order)

View File

@ -1,13 +0,0 @@
# we use shared STM32 configuration snippets
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# this board has an on-board ST-link adapter
PROGRAMMER ?= openocd
OPENOCD_DEBUG_ADAPTER ?= stlink
# Add openocd as supported programmer
PROGRAMMERS_SUPPORTED += openocd
# The board can become un-flashable after some execution,
# use connect_assert_srst to always be able to flash or reset the board.
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1

View File

@ -1,33 +0,0 @@
/*
* Copyright (C) 2021 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_b-u585i-iot02a
* @{
*
* @file
* @brief Board specific implementations for the ST B-U585I-IOT02A board
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
* @}
*/
#include "board.h"
#include "periph/gpio.h"
void board_init(void)
{
#ifdef AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
gpio_init(LED0_PIN, GPIO_OUT);
#endif
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
}

View File

@ -1,43 +0,0 @@
/**
@defgroup boards_b-u585i-iot02a STM32 B-U585I-IOT02A
@ingroup boards
@brief Support for the STM32 B-U585I-IOT02A
## Flashing the device
The ST B-U585I-IOT02A board includes an on-board ST-LINK programmer and can be
flashed using OpenOCD.
@note The latest release (v0.11) of OpenOCD doesn't contain yet support for this board,
so the source code version from upstream master must be cloned and built:
```
$ git clone https://git.code.sf.net/p/openocd/code openocd
$ cd openocd
$ ./bootstrap
$ ./configure --prefix=<installation directory>
$ make -j
$ sudo make install
```
Once the patched OpenOCD is built and installed, you can flash the board simply
by typing
```
make BOARD=b-u585i-iot02a flash
```
and debug via GDB by simply typing
```
make BOARD=b-u585i-iot02a debug
```
## Supported Toolchains
For using the ST B-U585I-IOT02A board we recommend the usage of the
[GNU Tools for ARM Embedded Processors](https://launchpad.net/gcc-arm-embedded)
toolchain.
**Important notice:** With GCC 10, the `tests/malloc` application doesn't work.
To use malloc, prefer GCC 9 which seems to work better.
*/

View File

@ -1,88 +0,0 @@
/*
* Copyright (C) 2021 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_b-u585i-iot02a
* @{
*
* @file
* @brief Board specific definitions for the ST B-U585I-IOT02A board
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#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, 13)
#define LED0_MASK (1 << 13)
#define LED0_ON (GPIOE->BSRR = LED0_MASK)
#define LED0_OFF (GPIOE->BSRR = (LED0_MASK << 16))
#define LED0_TOGGLE (GPIOE->ODR ^= LED0_MASK)
#define LED1_PIN GPIO_PIN(PORT_H, 6)
#define LED1_MASK (1 << 6)
#define LED1_ON (GPIOH->BSRR = LED1_MASK)
#define LED1_OFF (GPIOH->BSRR = (LED1_MASK << 16))
#define LED1_TOGGLE (GPIOH->ODR ^= LED1_MASK)
#define LED2_PIN GPIO_PIN(PORT_H, 7)
#define LED2_MASK (1 << 7)
#define LED2_ON (GPIOH->BSRR = LED2_MASK)
#define LED2_OFF (GPIOH->BSRR = (LED2_MASK << 16))
#define LED2_TOGGLE (GPIOH->ODR ^= LED2_MASK)
/** @} */
/**
* @name Button pin configuration
* @{
*/
#define BTN0_PIN GPIO_PIN(PORT_C, 13)
#define BTN0_MODE GPIO_IN_PU
/** @} */
/**
* @name HTS221 temperature/humidity sensor configuration
* @{
*/
#define HTS221_PARAM_I2C I2C_DEV(1)
/** @} */
/**
* @name LPS22HH pressure/temperature sensor configuration
* @{
*/
#define LPSXXX_PARAM_I2C I2C_DEV(1)
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/
void board_init(void);
#ifdef __cplusplus
}
#endif
#endif /* BOARD_H */
/** @} */

View File

@ -1,67 +0,0 @@
/*
* Copyright (C) Inria 2021
*
* 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_b-u585i-iot02a
* @{
*
* @file
* @brief Board specific configuration of direct mapped GPIOs
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#ifndef GPIO_PARAMS_H
#define GPIO_PARAMS_H
#include "board.h"
#include "saul/periph.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief GPIO pin configuration
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
{
.name = "LD2", /* Blue LED (Arduino D13) */
.pin = LED0_PIN,
.mode = GPIO_OUT
},
#endif
{
.name = "LD6", /* Red LED */
.pin = LED1_PIN,
.mode = GPIO_OUT,
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR),
},
{
.name = "LD7", /* Green LED */
.pin = LED2_PIN,
.mode = GPIO_OUT,
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR),
},
{
.name = "Button(B1 User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE,
}
};
#ifdef __cplusplus
}
#endif
#endif /* GPIO_PARAMS_H */
/** @} */

View File

@ -1,186 +0,0 @@
/*
* Copyright (C) 2021 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_b-u585i-iot02a
* @{
*
* @file
* @brief Peripheral MCU configuration for the ST B-U585I-IOT02A board
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#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
#endif
#include "periph_cpu.h"
#include "clk_conf.h"
#include "cfg_timer_tim5.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name UART configuration
* @{
*/
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 */
},
{ /* Connected to Arduino D0/D1 and STMOD+2 */
.dev = USART3,
.rcc_mask = RCC_APB1ENR1_USART3EN,
.rx_pin = GPIO_PIN(PORT_D, 9),
.tx_pin = GPIO_PIN(PORT_D, 8),
.rx_af = GPIO_AF7,
.tx_af = GPIO_AF7,
.bus = APB1,
.irqn = USART3_IRQn,
.type = STM32_USART,
.clk_src = 0, /* Use APB clock */
},
{ /* Connected to STMOD+1 */
.dev = USART2,
.rcc_mask = RCC_APB1ENR1_USART2EN,
.rx_pin = GPIO_PIN(PORT_A, 3),
.tx_pin = GPIO_PIN(PORT_A, 2),
.rx_af = GPIO_AF7,
.tx_af = GPIO_AF7,
.bus = APB1,
.irqn = USART2_IRQn,
.type = STM32_USART,
.clk_src = 0, /* Use APB clock */
},
{ /* Connected to Wireless */
.dev = UART4,
.rcc_mask = RCC_APB1ENR1_UART4EN,
.rx_pin = GPIO_PIN(PORT_C, 11),
.tx_pin = GPIO_PIN(PORT_C, 10),
.rx_af = GPIO_AF7,
.tx_af = GPIO_AF7,
.bus = APB1,
.irqn = UART4_IRQn,
.type = STM32_USART,
.clk_src = 0, /* Use APB clock */
},
};
#define UART_0_ISR (isr_usart1)
#define UART_1_ISR (isr_usart3)
#define UART_2_ISR (isr_usart2)
#define UART_3_ISR (isr_uart4)
#define UART_NUMOF ARRAY_SIZE(uart_config)
/** @} */
/**
* @name SPI configuration
* @{
*/
static const spi_conf_t spi_config[] = {
{
.dev = SPI1,
.mosi_pin = GPIO_PIN(PORT_E, 15), /* Arduino D11 */
.miso_pin = GPIO_PIN(PORT_E, 14), /* Arduino D12 */
.sclk_pin = GPIO_PIN(PORT_E, 13), /* Arduino D13 */
.cs_pin = GPIO_UNDEF,
.mosi_af = GPIO_AF5,
.miso_af = GPIO_AF5,
.sclk_af = GPIO_AF5,
.cs_af = GPIO_AF5,
.rccmask = RCC_APB2ENR_SPI1EN,
.apbbus = APB2,
},
{ /* Connected to wireless */
.dev = SPI2,
.mosi_pin = GPIO_PIN(PORT_D, 4),
.miso_pin = GPIO_PIN(PORT_D, 3),
.sclk_pin = GPIO_PIN(PORT_D, 1),
.cs_pin = GPIO_PIN(PORT_B, 12),
.mosi_af = GPIO_AF5,
.miso_af = GPIO_AF5,
.sclk_af = GPIO_AF5,
.cs_af = GPIO_AF5,
.rccmask = RCC_APB1ENR1_SPI2EN,
.apbbus = APB1,
},
{ /* Connected to STMOD+ 2 */
.dev = SPI3,
.mosi_pin = GPIO_PIN(PORT_D, 6),
.miso_pin = GPIO_PIN(PORT_G, 10),
.sclk_pin = GPIO_PIN(PORT_G, 9),
.cs_pin = GPIO_PIN(PORT_G, 12),
.mosi_af = GPIO_AF5,
.miso_af = GPIO_AF5,
.sclk_af = GPIO_AF5,
.cs_af = GPIO_AF5,
.rccmask = RCC_APB3ENR_SPI3EN,
.apbbus = APB3,
},
};
#define SPI_NUMOF ARRAY_SIZE(spi_config)
/** @} */
/**
* @name I2C configuration
* @{
*/
static const i2c_conf_t i2c_config[] = {
{
.dev = I2C1,
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PORT_B, 8),
.sda_pin = GPIO_PIN(PORT_B, 9),
.scl_af = GPIO_AF4,
.sda_af = GPIO_AF4,
.bus = APB1,
.rcc_mask = RCC_APB1ENR1_I2C1EN,
.irqn = I2C1_ER_IRQn,
},
{
.dev = I2C2,
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PORT_H, 4),
.sda_pin = GPIO_PIN(PORT_H, 5),
.scl_af = GPIO_AF4,
.sda_af = GPIO_AF4,
.bus = APB1,
.rcc_mask = RCC_APB1ENR1_I2C2EN,
.irqn = I2C2_ER_IRQn,
},
};
#define I2C_0_ISR isr_i2c1_er
#define I2C_1_ISR isr_i2c2_er
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
/** @} */

View File

@ -21,6 +21,3 @@ config BOARD_BASTWAN
select HAS_PERIPH_USBDEV
select HAS_RIOTBOOT
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
select HAVE_SX1276

View File

@ -15,9 +15,3 @@ FEATURES_PROVIDED += periph_usbdev
# Put other features for this board (in alphabetical order)
FEATURES_PROVIDED += riotboot
FEATURES_PROVIDED += highlevel_stdio
# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1, $(TEST_KCONFIG))
KCONFIG_BOARD_CONFIG += $(BOARDDIR)/bastwan.config
endif

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -31,6 +31,9 @@
void board_init(void)
{
/* initialize the CPU */
cpu_init();
/* initialize the boards LED */
gpio_init(LED0_PIN, GPIO_OUT);

View File

@ -91,6 +91,7 @@ static const uart_conf_t uart_config[] = {
*/
/* SERCOM5 does not support DMA at the moment. See Datasheet samr34, Figure 4-2 */
static const spi_conf_t spi_config[] = {
{
.dev = &(SERCOM5->SPI),
.miso_pin = GPIO_PIN(PA, 23),

View File

@ -13,6 +13,5 @@ config BOARD_BLACKPILL_128KIB
default y
select BOARD_COMMON_BLXXXPILL
select CPU_MODEL_STM32F103CB
select MODULE_BOARDS_COMMON_BLXXXPILL if TEST_KCONFIG
source "$(RIOTBOARD)/common/blxxxpill/Kconfig"

View File

@ -13,6 +13,5 @@ config BOARD_BLACKPILL
default y
select BOARD_COMMON_BLXXXPILL
select CPU_MODEL_STM32F103C8
select MODULE_BOARDS_COMMON_BLXXXPILL if TEST_KCONFIG
source "$(RIOTBOARD)/common/blxxxpill/Kconfig"

View File

@ -13,6 +13,5 @@ config BOARD_BLUEPILL_128KIB
default y
select BOARD_COMMON_BLXXXPILL
select CPU_MODEL_STM32F103CB
select MODULE_BOARDS_COMMON_BLXXXPILL if TEST_KCONFIG
source "$(RIOTBOARD)/common/blxxxpill/Kconfig"

View File

@ -21,5 +21,3 @@ config BOARD_BLUEPILL_STM32F030C8
select HAS_PERIPH_UART
select HAS_PERIPH_SPI
select HAS_PERIPH_RTC
select HAVE_SAUL_GPIO

View File

@ -24,6 +24,7 @@
void board_init(void)
{
cpu_init();
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}

View File

@ -13,6 +13,5 @@ config BOARD_BLUEPILL
default y
select BOARD_COMMON_BLXXXPILL
select CPU_MODEL_STM32F103C8
select MODULE_BOARDS_COMMON_BLXXXPILL if TEST_KCONFIG
source "$(RIOTBOARD)/common/blxxxpill/Kconfig"

View File

@ -16,8 +16,4 @@ config BOARD_CALLIOPE_MINI
select HAS_PERIPH_UART
select HAS_PERIPH_PWM
select HAVE_SAUL_GPIO
select HAVE_BMX055
source "$(RIOTBOARD)/common/microbit/Kconfig"
source "$(RIOTBOARD)/common/nrf51/Kconfig"

Some files were not shown because too many files have changed in this diff Show More