Merge branch 'apache:master' into boards/esp32/heltec_leds

This commit is contained in:
Shriyans406 2026-07-08 09:57:50 +05:30 committed by GitHub
commit db7ec405c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5960 changed files with 485910 additions and 484900 deletions

3925
.github/CODEOWNERS vendored

File diff suppressed because it is too large Load diff

16
.github/SECURITY.md vendored
View file

@ -4,6 +4,7 @@
| Version | Supported |
| ------- | ------------------ |
| 12.0.x | :heavy_check_mark: |
| 11.0.x | :heavy_check_mark: |
| 10.3.x | :heavy_check_mark: |
| 10.2.x | :heavy_check_mark: |
@ -14,8 +15,15 @@
## Reporting a Vulnerability
If you think you have found a possible vulnerability please reach out to the _private_ project mailing list
private@nuttx.apache.org or the Apache Security list security@apache.org.
If you think you have found a possible vulnerability please reach out
to the _security_ project mailing list security@nuttx.apache.org.
Please **DO NOT** create a GitHub issue or email the project dev list as they are public.
This project follows the Apache Vulnerability Handling Policy documented [here](https://www.apache.org/security/committers.html#vulnerability-handling).
Please **DO NOT** create a GitHub issue or email the project
dev list as they are public!
Please read the
[NuttX Security Documentation](https://nuttx.apache.org/docs/latest/security.html)
for more details.
This project follows the
[Apache Vulnerability Handling Policy](https://www.apache.org/security/committers.html#vulnerability-handling).

83
.github/membrowse-targets.json vendored Normal file
View file

@ -0,0 +1,83 @@
[
{
"target_name": "stm32-nucleo-f103rb",
"board_config": "nucleo-f103rb:nsh",
"elf": "nuttx",
"ld": "boards/arm/stm32f1/nucleo-f103rb/scripts/ld.script",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "arduino-mega2560",
"board_config": "arduino-mega2560:nsh",
"elf": "nuttx.elf",
"ld": "boards/avr/atmega/arduino-mega2560/scripts/flash.ld",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "qemu-armv8a",
"board_config": "qemu-armv8a:nsh",
"elf": "nuttx",
"ld": "",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "mirtoo",
"board_config": "mirtoo:nsh",
"elf": "nuttx",
"ld": "boards/mips/pic32mx/mirtoo/scripts/pinguino-debug.ld",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": "-d MIPS32_TOOLCHAIN_GNU_ELF -e MIPS32_TOOLCHAIN_PINGUINOL"
},
{
"target_name": "hifive1-revb",
"board_config": "hifive1-revb:nsh",
"elf": "nuttx",
"ld": "boards/risc-v/fe310/hifive1-revb/scripts/ld.script",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "rx65n-rsk2mb",
"board_config": "rx65n-rsk2mb:nsh",
"elf": "nuttx",
"ld": "boards/renesas/rx65n/rx65n-rsk2mb/scripts/linker_script.ld",
"map_file": "",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "s698pm-dkit",
"board_config": "s698pm-dkit:nsh",
"elf": "nuttx",
"ld": "",
"map_file": "",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "qemu-intel64",
"board_config": "qemu-intel64:nsh",
"elf": "nuttx",
"ld": "",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": ""
},
{
"target_name": "esp32-devkitc",
"board_config": "esp32-devkitc:nsh",
"elf": "nuttx",
"ld": "boards/xtensa/esp32/common/scripts/flat_memory.ld.tmp boards/xtensa/esp32/common/scripts/esp32_sections.ld.tmp",
"map_file": "nuttx.map",
"linker_vars": "",
"config_overrides": ""
}
]

View file

@ -95,7 +95,7 @@ jobs:
echo "apps_ref=$APPS_REF" >> $GITHUB_OUTPUT
- name: Checkout nuttx repo
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: apache/nuttx
ref: ${{ steps.gittargets.outputs.os_ref }}
@ -105,7 +105,7 @@ jobs:
run: git -C sources/nuttx fetch --tags
- name: Checkout apps repo
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: apache/nuttx-apps
ref: ${{ steps.gittargets.outputs.apps_ref }}
@ -172,7 +172,7 @@ jobs:
run: tar zxf sources.tar.gz
- name: Docker Login
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@ -267,7 +267,7 @@ jobs:
run: tar zxf sources.tar.gz
- name: Docker Login
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@ -327,7 +327,7 @@ jobs:
- name: Restore Tools Cache
id: cache-tools
uses: actions/cache@v5
uses: actions/cache@v6
env:
cache-name: ${{ runner.os }}-cache-tools
with:
@ -379,7 +379,7 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
@ -453,7 +453,7 @@ jobs:
if: ${{ needs.msvc-Arch.outputs.skip_all_builds != '1' }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
# Set up Python environment and install kconfiglib
- name: Set up Python and install kconfiglib
uses: actions/setup-python@v6

View file

@ -30,7 +30,7 @@ jobs:
steps:
- name: Checkout nuttx repo
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: apache/nuttx
path: nuttx

View file

@ -35,7 +35,7 @@ jobs:
build-html:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.10'

View file

@ -47,7 +47,7 @@ jobs:
IMAGE_TAG: ghcr.io/${{ github.repository }}/apache-nuttx-ci-linux
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Free Disk Space (Ubuntu)
uses: ./.github/actions/free-disk-space
@ -66,10 +66,10 @@ jobs:
swap-storage: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Log into registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@ -78,7 +78,7 @@ jobs:
run: |
df -h
- name: Push Linux image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: tools/ci/docker/linux
platforms: linux/amd64

View file

@ -33,7 +33,7 @@ jobs:
# Checkout one file from our trusted source: .github/labeler.yml
# Never checkout and execute any untrusted code from the PR.
- name: Checkout labeler config
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: apache/nuttx
ref: master

View file

@ -17,7 +17,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- run: mkdir super-linter.report

42
.github/workflows/membrowse-comment.yml vendored Normal file
View file

@ -0,0 +1,42 @@
name: MemBrowse PR Comment
on:
workflow_run:
workflows: [MemBrowse Memory Report]
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion != 'cancelled'
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install membrowse
run: pip install --no-cache-dir membrowse
- name: Post combined PR comment
if: ${{ env.MEMBROWSE_API_KEY != '' }}
env:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
MEMBROWSE_API_URL: ${{ vars.MEMBROWSE_API_URL }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
SUMMARY_ARGS=("$HEAD_SHA" --api-key "$MEMBROWSE_API_KEY" --json)
if [ -n "$MEMBROWSE_API_URL" ]; then
SUMMARY_ARGS+=(--api-url "$MEMBROWSE_API_URL")
fi
membrowse summary "${SUMMARY_ARGS[@]}" > /tmp/membrowse-summary.json
python -m membrowse.utils.github_comment --summary-json /tmp/membrowse-summary.json

98
.github/workflows/membrowse-onboard.yml vendored Normal file
View file

@ -0,0 +1,98 @@
name: Onboard to MemBrowse
on:
workflow_dispatch:
inputs:
num_commits:
description: 'Number of commits to process'
required: true
default: '100'
type: string
jobs:
load-targets:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v7
- id: set-matrix
run: echo "matrix=$(jq -c '.' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT
onboard:
needs: load-targets
runs-on: ubuntu-latest
container:
image: ghcr.io/apache/nuttx/apache-nuttx-ci-linux
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.load-targets.outputs.matrix) }}
steps:
- name: Checkout nuttx
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Clone nuttx-apps
run: |
git config --global --add safe.directory '*'
git clone --depth=1 https://github.com/apache/nuttx-apps.git ../apps
- name: Install membrowse
run: python3 -m pip install --no-cache-dir membrowse
- name: Fetch full git history
run: |
git fetch --unshallow || true
git fetch --all
- name: Run MemBrowse Onboard
env:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
MEMBROWSE_API_URL: ${{ vars.MEMBROWSE_API_URL }}
NUM_COMMITS: ${{ github.event.inputs.num_commits }}
TARGET_NAME: ${{ matrix.target_name }}
ELF: ${{ matrix.elf }}
LD: ${{ matrix.ld }}
MAP_FILE: ${{ matrix.map_file }}
LINKER_VARS: ${{ matrix.linker_vars }}
run: |
BUILD_SCRIPT=$(cat <<'BUILD_EOF'
./tools/configure.sh -l ${{ matrix.board_config }}
echo CONFIG_DEBUG_SYMBOLS=y >> .config
echo CONFIG_DEBUG_LINK_MAP=y >> .config
if [ -n "${{ matrix.config_overrides }}" ]; then
kconfig-tweak ${{ matrix.config_overrides }}
fi
make olddefconfig
find arch -name Makefile -exec sed -i '/DELFILE, $(addsuffix .tmp,$(ARCHSCRIPT))/d' {} +
trap 'git checkout -- arch/' EXIT
make -j$(nproc)
BUILD_EOF
)
ARGS=("$NUM_COMMITS" "$BUILD_SCRIPT" "$ELF" "$TARGET_NAME" "$MEMBROWSE_API_KEY")
if [ -n "$MEMBROWSE_API_URL" ]; then
ARGS+=(--api-url "$MEMBROWSE_API_URL")
fi
if [ -n "$LD" ]; then
ARGS+=(--ld-scripts "$LD")
fi
if [ -n "$LINKER_VARS" ]; then
set -f
for var in $LINKER_VARS; do
ARGS+=(--def "$var")
done
set +f
fi
if [ -n "$MAP_FILE" ]; then
ARGS+=(--map-file "$MAP_FILE")
fi
ARGS+=(--binary-search)
membrowse onboard "${ARGS[@]}"

252
.github/workflows/membrowse-report.yml vendored Normal file
View file

@ -0,0 +1,252 @@
name: MemBrowse Memory Report
on:
pull_request:
push:
branches:
- master
- "releases/*"
permissions:
contents: read
# Per-PR group so superseded PR pushes cancel; per-SHA on push so master
# commits never share a group. A shared refs/heads/master group lets a burst
# of pushes evict each other while pending (GitHub keeps only one pending run
# per group), leaving a commit with no report and breaking the MemBrowse
# parent chain for every commit that bases on it.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# Detect whether any source files (i.e. non-doc/CODEOWNERS) changed.
# When only docs/CODEOWNERS change we skip the build and post an "identical"
# MemBrowse report instead.
changes-filter:
runs-on: ubuntu-latest
outputs:
source: ${{ steps.filter.outputs.source }}
steps:
# Shallow checkout; the base commit needed for the diff is fetched
# explicitly below instead of cloning the repo's full history.
- uses: actions/checkout@v7
with:
fetch-depth: 2
# Detect whether any non-doc/CODEOWNERS source files changed.
# Implemented with plain git instead of a third-party paths-filter
# action, since Apache's GitHub Actions allowlist forbids actions that
# aren't GitHub-created or explicitly permitted.
- id: filter
env:
BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
run: |
# On the very first push to a branch, github.event.before is all-zeros.
if [ -z "$BASE_SHA" ] || [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then
echo "source=true" >> "$GITHUB_OUTPUT"
echo "No usable base SHA; treating as source change."
exit 0
fi
# The shallow checkout may not contain BASE_SHA (multi-commit pushes,
# long-lived PR branches). Fetch just that commit; fall back to a full
# unshallow only if the targeted fetch fails.
if ! git cat-file -e "$BASE_SHA^{commit}" 2>/dev/null; then
git fetch --depth=1 origin "$BASE_SHA" 2>/dev/null \
|| git fetch --unshallow origin 2>/dev/null \
|| git fetch --unshallow 2>/dev/null || true
fi
changed=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
echo "Changed files:"
echo "$changed"
# Drop paths that should NOT count as source changes; if anything
# survives, real source changed.
source=$(echo "$changed" | grep -vE \
-e '^AUTHORS$' \
-e '^CONTRIBUTING\.md$' \
-e '(^|/)CODEOWNERS$' \
-e '^Documentation/' \
-e '^tools/ci/docker/linux/' \
-e '^tools/codeowners/[^/]+$' \
|| true)
if [ -n "$source" ]; then
echo "source=true" >> "$GITHUB_OUTPUT"
else
echo "source=false" >> "$GITHUB_OUTPUT"
fi
load-targets:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v7
- id: set-matrix
run: echo "matrix=$(jq -c '.' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT
# Post an "identical" MemBrowse report when only docs/CODEOWNERS changed.
# Only runs on push events (master/releases/tags) to keep the baseline
# complete; PR events don't produce identical markers.
identical:
needs: [changes-filter, load-targets]
if: needs.changes-filter.outputs.source == 'false' && github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.load-targets.outputs.matrix) }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 2
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install membrowse
run: pip install --no-cache-dir membrowse
- name: Upload identical - ${{ matrix.target_name }}
env:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
MEMBROWSE_API_URL: ${{ vars.MEMBROWSE_API_URL }}
TARGET_NAME: ${{ matrix.target_name }}
# Base on the previous branch tip, not the (often unreported mid-PR)
# git parent.
BEFORE_SHA: ${{ github.event.before }}
run: |
ARGS=(--upload --github
--target-name "$TARGET_NAME"
--api-key "$MEMBROWSE_API_KEY"
--identical)
if [ -n "$MEMBROWSE_API_URL" ]; then
ARGS+=(--api-url "$MEMBROWSE_API_URL")
fi
# Override parent with previous tip; skip on branch creation (0s).
if [ -n "$BEFORE_SHA" ] && [ "$BEFORE_SHA" != "0000000000000000000000000000000000000000" ]; then
ARGS+=(--base-sha "$BEFORE_SHA")
fi
membrowse report "${ARGS[@]}"
# Build target with debug symbols + linker map, then upload MemBrowse report.
# Uses the NuttX CI Docker image so toolchains, kconfig-frontends, etc. are
# already installed.
analyze:
needs: [changes-filter, load-targets]
if: needs.changes-filter.outputs.source == 'true'
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.load-targets.outputs.matrix) }}
steps:
- name: Checkout nuttx repo
uses: actions/checkout@v7
with:
path: sources/nuttx
fetch-depth: 2
- name: Checkout nuttx-apps repo
uses: actions/checkout@v7
with:
repository: apache/nuttx-apps
path: sources/apps
fetch-depth: 1
- name: Docker Login
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Pull
run: docker pull ghcr.io/apache/nuttx/apache-nuttx-ci-linux
- name: Build ${{ matrix.target_name }}
uses: ./sources/nuttx/.github/actions/ci-container
with:
run: |
git config --global --add safe.directory /github/workspace/sources/nuttx
git config --global --add safe.directory /github/workspace/sources/apps
cd /github/workspace/sources/nuttx
./tools/configure.sh -l ${{ matrix.board_config }}
echo CONFIG_DEBUG_SYMBOLS=y >> .config
echo CONFIG_DEBUG_LINK_MAP=y >> .config
if [ -n "${{ matrix.config_overrides }}" ]; then
kconfig-tweak ${{ matrix.config_overrides }}
fi
make olddefconfig
# Preserve preprocessed linker scripts (.ld.tmp) so MemBrowse can
# read them. Arch Makefiles delete these immediately after linking.
find arch -name Makefile -exec sed -i '/DELFILE, $(addsuffix .tmp,$(ARCHSCRIPT))/d' {} +
make -j$(nproc)
# MemBrowse action runs from $GITHUB_WORKSPACE and discovers git via CWD,
# but nuttx is checked out to sources/nuttx/ (so apps can sit beside it).
# Expose the repo's .git at the workspace root so git metadata resolves.
- name: Expose nuttx .git to workspace root
run: ln -sfn sources/nuttx/.git .git
- name: Prefix linker script paths
id: ld
run: |
prefixed=""
for p in ${{ matrix.ld }}; do
prefixed="$prefixed sources/nuttx/$p"
done
paths=$(echo $prefixed | xargs)
echo "paths=$paths" >> "$GITHUB_OUTPUT"
echo "Resolved ld paths: [$paths]"
for p in $paths; do
if [ -e "$p" ]; then
echo " OK $p ($(stat -c '%s bytes, owner=%U:%G' "$p" 2>/dev/null))"
else
echo " MISS $p"
echo " ls dir:"
ls -la "$(dirname "$p")" 2>&1 | head -30
fi
done
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install membrowse
run: pip install --no-cache-dir membrowse
- name: MemBrowse analysis - ${{ matrix.target_name }}
env:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
MEMBROWSE_API_URL: ${{ vars.MEMBROWSE_API_URL }}
TARGET_NAME: ${{ matrix.target_name }}
ELF: sources/nuttx/${{ matrix.elf }}
LD_PATHS: ${{ steps.ld.outputs.paths }}
MAP_FILE: ${{ matrix.map_file != '' && format('sources/nuttx/{0}', matrix.map_file) || '' }}
LINKER_VARS: ${{ matrix.linker_vars }}
# Push only: base on the previous branch tip, not the (often
# unreported mid-PR) git parent. Empty on PRs (--github bases on the
# PR target tip).
BEFORE_SHA: ${{ github.event_name == 'push' && github.event.before || '' }}
run: |
set -o pipefail
ARGS=("$ELF" "$LD_PATHS"
--upload --github
--target-name "$TARGET_NAME"
--api-key "$MEMBROWSE_API_KEY")
if [ -n "$MEMBROWSE_API_URL" ]; then
ARGS+=(--api-url "$MEMBROWSE_API_URL")
fi
# Override parent with previous tip; skip on branch creation (0s).
if [ -n "$BEFORE_SHA" ] && [ "$BEFORE_SHA" != "0000000000000000000000000000000000000000" ]; then
ARGS+=(--base-sha "$BEFORE_SHA")
fi
if [ -n "$MAP_FILE" ]; then
ARGS+=(--map-file "$MAP_FILE")
fi
if [ -n "$LINKER_VARS" ]; then
set -f
for var in $LINKER_VARS; do
ARGS+=(--def "$var")
done
set +f
fi
membrowse --verbose INFO report "${ARGS[@]}"

View file

@ -24,11 +24,11 @@
},
"anyio": {
"hashes": [
"sha256:08b310f9e24a9594186fd75b4f73f4a4152069e3853f1ed8bfbf58369f4ad708",
"sha256:334b70e641fd2221c1505b3890c69882fe4a2df910cba14d97019b90b24439dc"
"sha256:b47c1f9ccf73e67021df785332508f99379c68fa7d0684e8e3492cb1d4b23f89",
"sha256:dd9b7a2a9799ed6552fde617b2c5df02b7fdd7d88392fc48101e51bae46164d9"
],
"markers": "python_version >= '3.10'",
"version": "==4.13.0"
"version": "==4.14.0"
},
"babel": {
"hashes": [
@ -633,12 +633,12 @@
},
"starlette": {
"hashes": [
"sha256:512399c5f1de7fac99c88572212ded9ddeddef2fb32afa82d724000e88b38f4f",
"sha256:7c0e69b2ee1c848bd54669d908500117a3ee13de603a21427e5c6fc1adf98dcd"
"sha256:05d0213193f2fbaae60e2ecb593b4add4262ad4e46536b54abe36f11a71724e0",
"sha256:c7372aae11c3c3f26a42df7bd626cec2f47d03483d261d369516a615a53714c6"
],
"index": "pypi",
"markers": "python_version >= '3.10'",
"version": "==1.0.1"
"version": "==1.3.1"
},
"urllib3": {
"hashes": [

View file

@ -0,0 +1,394 @@
NuttX-13.0.0
------------
What's New In This Release
Major Changes to Core OS
Sched
* [#18485](https://github.com/apache/nuttx/pull/18485) sched/critmon: Fix CPU load stats incorrect when using SCHED_CPULOAD_CRITMONITOR
* [#18486](https://github.com/apache/nuttx/pull/18486) sched/tickless: Fix CLOCK_MONOTONIC always 0 by updating sched ticks
* [#18592](https://github.com/apache/nuttx/pull/18592) sched/group_foreachchild.c: fix warning
* [#18672](https://github.com/apache/nuttx/pull/18672) sched/semaphore: check unmasked pending signals before blocking.
* [#18715](https://github.com/apache/nuttx/pull/18715) sched/nsh: Remove Hard-coded Default Password
* [#18731](https://github.com/apache/nuttx/pull/18731) sched/misc: Optimize thread saving order in coredump for easier gdb d…
* [#18826](https://github.com/apache/nuttx/pull/18826) sched/group: skip group_release for kernel thread group
Crypto
* [#18679](https://github.com/apache/nuttx/pull/18679) crypto: decouple curve25519 and idgen from random pool
* [#18608](https://github.com/apache/nuttx/pull/18608) crypto/cryptosoft: Add support for PBKDF2
libc
* [#18347](https://github.com/apache/nuttx/pull/18347) libc: Add C23 stdbit.h with optional Kconfig and generic implementation
* [#18572](https://github.com/apache/nuttx/pull/18572) libs/libbuiltin: Fix spacing style in gcov.c
* [#18844](https://github.com/apache/nuttx/pull/18844) libs/netdb: Fix dns_recv_response() to dns_answer_s size
various
* [#18643](https://github.com/apache/nuttx/pull/18643) guard include/cxx by LIBMINIABI, fix div_t conflicts with downloaded toolchains
* [#18660](https://github.com/apache/nuttx/pull/18660) include/debug.h: Move to include/nuttx/debug.h
* [#18839](https://github.com/apache/nuttx/pull/18839) include/errno.h: skip set_errno in interrupt context
Major Changes to the Build System
tools
* [#18856](https://github.com/apache/nuttx/pull/18856) tools: mksyscall fix compilation warning
* [#18538](https://github.com/apache/nuttx/pull/18538) tools: replace showstack.sh with stackusage.py
* [#18863](https://github.com/apache/nuttx/pull/18863) tools: Update note about first line of a block
* [#18426](https://github.com/apache/nuttx/pull/18426) tools/checkpatch: enforce blank line after subject and add breaking-change checks
* [#18868](https://github.com/apache/nuttx/pull/18868) tools/Config.mk: speed up builds by caching the prefix-detection shells
* [#18973](https://github.com/apache/nuttx/pull/18973) tools/espressif: Add UF2 output support
* [#18360](https://github.com/apache/nuttx/pull/18360) tools/mksyscall: fix union illegal type for cast
* [#19006](https://github.com/apache/nuttx/pull/19006) tools/nxstyle: Whitelist Micro XRCE-DDS uxrCustomTransport prefix
* [#19001](https://github.com/apache/nuttx/pull/19001) tools/nxstyle: Whitelist ROS 2 message type identifiers.
* [#18992](https://github.com/apache/nuttx/pull/18992) tools/rust: Fix aarch64 NuttX Rust target specs
* [#19003](https://github.com/apache/nuttx/pull/19003) tools/rust: Move NuttX Rust target specs into nuttx
* [#18547](https://github.com/apache/nuttx/pull/18547) tools/testbuild.sh: Added a break to the dotest Blacklist and CMake loop
* [#18735](https://github.com/apache/nuttx/pull/18735) tools/Unix.mk: fix Untracked files defconfig.tmp-e on macOS
cmake
* [#18768](https://github.com/apache/nuttx/pull/18768) arch/risc-v/cmake: fix linker option case in Toolchain.cmake.
* [#18702](https://github.com/apache/nuttx/pull/18702) arch/risc-v/espressif: Aligned Cmake with Make
* [#18940](https://github.com/apache/nuttx/pull/18940) arch/risc-v/espressif: Fix CMake build issues for new peripheral support
* [#18901](https://github.com/apache/nuttx/pull/18901) arch/risc-v/espressif: Fix CMake irq.h header ordering race
* [#18698](https://github.com/apache/nuttx/pull/18698) CMake: add -D__NuttX__ to preprocessor
* [#18661](https://github.com/apache/nuttx/pull/18661) CMake: add build support on RISC-V
* [#18706](https://github.com/apache/nuttx/pull/18706) CMake: added esp32c6-xiao and esp32p4-pico-wifi-wareshare boards
* [#18669](https://github.com/apache/nuttx/pull/18669) CMake: added Seeed Studio XIAO ESP32C3 board
* [#18523](https://github.com/apache/nuttx/pull/18523) CMake: added ViewTool stm32f107 board
* [#18665](https://github.com/apache/nuttx/pull/18665) CMake: added Waveshare ESP32-C3-Zero board
* [#18594](https://github.com/apache/nuttx/pull/18594) CMake: build implemented for Allwinner A64
* [#18565](https://github.com/apache/nuttx/pull/18565) CMake: build implemented for GigaDevice GD32F4xx Series
* [#18524](https://github.com/apache/nuttx/pull/18524) CMake: build implemented for MAX326xx Series
* [#18605](https://github.com/apache/nuttx/pull/18605) CMake: build implemented for HPMicro HPM6750
* [#18528](https://github.com/apache/nuttx/pull/18528) CMake: build implemented for NXP LPC54000 Series
* [#18537](https://github.com/apache/nuttx/pull/18537) CMake: build implemented for NXP i.MX 8M Plus family
* [#18539](https://github.com/apache/nuttx/pull/18539) CMake: build implemented for NXP LPC17xx/40xx family
* [#18545](https://github.com/apache/nuttx/pull/18545) CMake: build implemented for NuMicro NUC100 Series
* [#18546](https://github.com/apache/nuttx/pull/18546) CMake: build implemented for NXP LPC43xx
* [#18595](https://github.com/apache/nuttx/pull/18595) CMake: build implemented for NXP i.MX 8
* [#18597](https://github.com/apache/nuttx/pull/18597) CMake: build implemented for Rockchip RK3399
* [#18604](https://github.com/apache/nuttx/pull/18604) CMake: build implemented for SiFive FE310
* [#18957](https://github.com/apache/nuttx/pull/18957) CMake: Fix SIM_TOOLCHAIN using CMake on macOS.
* [#18743](https://github.com/apache/nuttx/pull/18743) CMake: Improvements to CMakeLists.txt file
* [#18964](https://github.com/apache/nuttx/pull/18964) CMake: nuttx_create_symlink: Remove warning for CMP0205
* [#18871](https://github.com/apache/nuttx/pull/18871) fix macOS sim cmake build and compiler-rt
* [#18858](https://github.com/apache/nuttx/pull/18858) openamp: fix CMake dcache option
* [#18773](https://github.com/apache/nuttx/pull/18773) sensors/Make.defs: Aligned Make with Cmake file
Architectural Support
New Architecture Support
* [#18739](https://github.com/apache/nuttx/pull/18739) arch/arm: add STM32H755XI chip
Architecture improvements
* [#18704](https://github.com/apache/nuttx/pull/18704) arch/*/Makefile: Avoid uncessary relinking of the nuttx binary.
ARM
* [#18734](https://github.com/apache/nuttx/pull/18734) arch/arm: Fix the compilation error
* [#18898](https://github.com/apache/nuttx/pull/18898) arch/arm: fix infinite loop in test and clean cache operations
* [#18824](https://github.com/apache/nuttx/pull/18824) arch/arm/include/arm*/irq.h: fix FPU context layout guard macro
* [#19194](https://github.com/apache/nuttx/pull/19194) arch/arm/armv7-a: Fix L1 page table entry double-offset in addrenv create region
* [#18600](https://github.com/apache/nuttx/pull/18600) arch/arm/cxd56xx: Fix DMA transfer for large memory size
* [#18930](https://github.com/apache/nuttx/pull/18930) arch/arm/imx9: Add SAR ADC support
* [#18727](https://github.com/apache/nuttx/pull/18727) arch/arm/imx9: eDMA5 don't enable all interrupts
* [#18713](https://github.com/apache/nuttx/pull/18713) arch/arm/nrf52|nrf53: add qencoder support
* [#18865](https://github.com/apache/nuttx/pull/18865) arch/arm/rp23xx: correct NVIC and PendSV priority initialisation
* [#18947](https://github.com/apache/nuttx/pull/18947) arch/arm/rp23xx: Fix PWM frequency, duty cycle and API migration.
* [#18621](https://github.com/apache/nuttx/pull/18621) arch/arm/samX/sam_gpioirq.c: fix pin base address calculation
* [#18494](https://github.com/apache/nuttx/pull/18494) arch/arm/samvX/sam_gpioirq.c: fix pin base address calculation
* [#18717](https://github.com/apache/nuttx/pull/18717) arch/arm/sarm/tm32f0l0g0: add qencoder support
* [#18878](https://github.com/apache/nuttx/pull/18878) arch/arm/stm32: chunk DMA exchanges to honor 16-bit NDTR for SPI
* [#18975](https://github.com/apache/nuttx/pull/18975) arch/arm/stm32: Support optional TX/RX UART GPIOs.
* [#18606](https://github.com/apache/nuttx/pull/18606) arch/arm/stm32*: Cleanup stm32 irq reporting
* [#18657](https://github.com/apache/nuttx/pull/18657) arch/arm/stm32*: Use PRIx32 format specifier where appropriate
* [#18753](https://github.com/apache/nuttx/pull/18753) arch/arm/stm32f0l0g0/stm32_serial_v2.c: fix compilation error
* [#18917](https://github.com/apache/nuttx/pull/18917) arch/arm/stm32f0l0g0: restore PWM mapping for single channel
* [#18922](https://github.com/apache/nuttx/pull/18922) arch/arm/stm32h5: Add ethernet hardware checksum
* [#18944](https://github.com/apache/nuttx/pull/18944) arch/arm/stm32h5: Add missing netdev_carrier calls
* [#18549](https://github.com/apache/nuttx/pull/18549) arch/arm/stm32h5: Add support for HW RNG.
* [#18748](https://github.com/apache/nuttx/pull/18748) arch/arm/stm32h5: Add support for USB host
* [#18935](https://github.com/apache/nuttx/pull/18935) arch/arm/stm32h5: Fix warning message about used but not initialized variables
* [#18761](https://github.com/apache/nuttx/pull/18761) arch/arm/stm32h5: Fixed Hub support
* [#18960](https://github.com/apache/nuttx/pull/18960) arch/arm/stm32h7: Add support for CRYP peripheral
* [#18787](https://github.com/apache/nuttx/pull/18787) arch/arm/stm32h7: Fix SPI RX DMA returning stale DCACHE data
* [#18691](https://github.com/apache/nuttx/pull/18691) arch/arm/stm32h7: fix stm32_mdio private structure use
* [#18526](https://github.com/apache/nuttx/pull/18526) arch/arm/stm32l5: enable LPUART1 console on ST-Link VCP. on nucleo-l552ze board
* [#18892](https://github.com/apache/nuttx/pull/18892) arch/arm/stm32n6: Add STM32N6 chip and Nucleo-N657X0-Q board support
ARM64
* [#18490](https://github.com/apache/nuttx/pull/18490) arch/arm64: handle fatal user exception
* [#18870](https://github.com/apache/nuttx/pull/18870) arch/arm64/imx9: Add SAR ADC support
* [#18501](https://github.com/apache/nuttx/pull/18501) arch/arm64/imx95-a55: add GPIO and eMMC (USDHC) support with partition table parsing
RISC-V
* [#18516](https://github.com/apache/nuttx/pull/18516) arch/risc-v/espressif/esp32p4: Support ESP32-P4 on NuttX
* [#18536](https://github.com/apache/nuttx/pull/18536) arch/risc-v/espressif: Add SHA accelerator features
* [#18540](https://github.com/apache/nuttx/pull/18540) arch/risc-v/k210: Add sysctl driver for clock and reset control.
* [#18544](https://github.com/apache/nuttx/pull/18544) arch/risc-v/espressif: Add AES accelerator support
* [#18550](https://github.com/apache/nuttx/pull/18550) arch/risc-v/k210: Add Watchdog Timer (WDT) driver support.
* [#18553](https://github.com/apache/nuttx/pull/18553) arch/risc-v/hpm6000: Use WDOGx naming for watchdog peripherals
* [#18577](https://github.com/apache/nuttx/pull/18577) arch/risc-v/k210: Remove QEMU support
* [#18611](https://github.com/apache/nuttx/pull/18611) arch/risc-v/espressif: select EFUSE when ESPRESSIF_EFUSE is enabled
* [#18694](https://github.com/apache/nuttx/pull/18694) arch/risc-v/esp32[-c3|-c6|-h2]: Add auto light sleep
* [#18640](https://github.com/apache/nuttx/pull/18640) arch/risc-v/espressif: Fix wrong C3 naming
* [#18644](https://github.com/apache/nuttx/pull/18644) arch/risc-v/qemu-rv: Configure PMP before booting secondary harts.
* [#18651](https://github.com/apache/nuttx/pull/18651) arch/risc-v/espressif: Add lpcore support for esp32p4
* [#18656](https://github.com/apache/nuttx/pull/18656) arch/risc-v/espressif: Add LPI2C support for esp32p4
* [#18686](https://github.com/apache/nuttx/pull/18686) arch/risc-v: migrate hr timer backend to HAL esp_timer adapter
* [#18707](https://github.com/apache/nuttx/pull/18707) arch/risc-v: Enable low power mode for ESP32-P4
* [#18733](https://github.com/apache/nuttx/pull/18733) arch/risc-v: fix linking process of Espressif devices
* [#18740](https://github.com/apache/nuttx/pull/18740) arch/risc-v/espressif: Fix Kconfig option for TWAI
* [#18741](https://github.com/apache/nuttx/pull/18741) arch/risc-v/espressif: Add DFS feature
* [#18827](https://github.com/apache/nuttx/pull/18827) arch/risc-v: Support the ethernet driver on ESP32-P4
* [#18757](https://github.com/apache/nuttx/pull/18757) arch/risc-v: update MCUboot slot sizes on Espressif devices
* [#18765](https://github.com/apache/nuttx/pull/18765) arch/risc-v/espressif: Fix auto light sleep enable flag
* [#18776](https://github.com/apache/nuttx/pull/18776) arch/[risc-v|xtensa]: Re-add `RMT_LOOP_TEST_MODE` Kconfig entry
* [#18791](https://github.com/apache/nuttx/pull/18791) arch/risc-v/espressif: Add LP_ADC support
* [#18792](https://github.com/apache/nuttx/pull/18792) arch/risc-v/espressif: Add ULP wakeup modes
* [#18814](https://github.com/apache/nuttx/pull/18814) arch/risc-v/espressif: Fix PM wakeup sources
* [#18854](https://github.com/apache/nuttx/pull/18854) arch/risc-v/espressif: Add BLE sleep
* [#18652](https://github.com/apache/nuttx/pull/18652) arch/risc-v/espressif: serialize Wi-Fi RX queue access.
* [#18926](https://github.com/apache/nuttx/pull/18926) arch/risc-v/espressif: Add Analog Comparator for esp32[-h2|-p4]
* [#18874](https://github.com/apache/nuttx/pull/18874) arch/risc-v: Allow BSS segments on PSRAM for ESP32-P4
* [#18893](https://github.com/apache/nuttx/pull/18893) arch/risc-v/espressif: Add LPSPI and SPI3 support
* [#18896](https://github.com/apache/nuttx/pull/18896) arch/risc-v/espressif: Add touch sensor support for esp32[-p4]
* [#18931](https://github.com/apache/nuttx/pull/18931) arch/risc-v: Enable setting cache line size for ESP32-P4
* [#18941](https://github.com/apache/nuttx/pull/18941) arch/risc-v: Clear BSS section for RISC-V-based Espressif SoCs
* [#18942](https://github.com/apache/nuttx/pull/18942) arch/risc-v: Fix Espressif timer registering ID
* [#18959](https://github.com/apache/nuttx/pull/18959) arch/risc-v/espressif: Add LP Mailbox support for esp32p4
* [#19204](https://github.com/apache/nuttx/pull/19204) arch/risc-v/rp23xx-rv: Fix PWM frequency and duty cycle calculation.
SIM
* [#18801](https://github.com/apache/nuttx/pull/18801) arch/sim: add simulated time ratio support
* [#18809](https://github.com/apache/nuttx/pull/18809) arch/sim: add host_set_timeratio stub for Windows
* [#18966](https://github.com/apache/nuttx/pull/18966) arch/sim: Add MM_FILL_ALLOCATIONS support to sim customized heap.
* [#18886](https://github.com/apache/nuttx/pull/18886) arch/sim: replace macOS C++ constructor runtime hack with post-link patch
* [#18887](https://github.com/apache/nuttx/pull/18887) arch/sim: rename nuttx libc memchr to avoid host glibc collision
* [#18956](https://github.com/apache/nuttx/pull/18956) arch/sim: Stop publishing stale X11 display during teardown.
TRICORE
* [#18391](https://github.com/apache/nuttx/pull/18391) arch/tricore: add support for tc4xx series chips and boards
* [#18525](https://github.com/apache/nuttx/pull/18525) arch/tricore: Fix `--help--` in Kconfig
* [#18899](https://github.com/apache/nuttx/pull/18899) arch/tricore: add TriCore up_backtrace() support
* [#18909](https://github.com/apache/nuttx/pull/18909) arch/tricore: Add up_perf function for tricore.
* [#18910](https://github.com/apache/nuttx/pull/18910) arch/tricore: Improve up_backtrace implementation
* [#18911](https://github.com/apache/nuttx/pull/18911) arch/tricore: Suspend stm when CPU stops.
* [#18927](https://github.com/apache/nuttx/pull/18927) arch/tricore: Support setjmp and longjmp.
* [#18936](https://github.com/apache/nuttx/pull/18936) arch/tricore: Add hardware debug breakpoint and watchpoint support.
X86_64
* [#18829](https://github.com/apache/nuttx/pull/18829) arch/x86: Add support to 256 color for qemu i486 VGA driver
* [#18602](https://github.com/apache/nuttx/pull/18602) arch/intel64: add CPU affinity support for irq
* [#18772](https://github.com/apache/nuttx/pull/18772) arch/intel64: fix broken ostest
XTENSA
* [#18610](https://github.com/apache/nuttx/pull/18610) arch/xtensa: Fix Kconfig style
* [#18688](https://github.com/apache/nuttx/pull/18688) arch/xtensa/esp32: Add support for hardware accelerated PBKDF2
* [#18695](https://github.com/apache/nuttx/pull/18695) arch/xtensa/esp32: Fix IRAM heap boot issue
* [#18728](https://github.com/apache/nuttx/pull/18728) arch/xtensa/esp32[|s3]: Fix ROM strdup heap issue in USER_HEAP mode
* [#18769](https://github.com/apache/nuttx/pull/18769) arch/xtensa: remove _info from startup of ESP32
* [#18770](https://github.com/apache/nuttx/pull/18770) arch/xtensa: Scope Wi-Fi disconnect case declarations.
* [#18778](https://github.com/apache/nuttx/pull/18778) arch/xtensa: properly set carrier on/off on espnow driver
Driver Support
New Driver Support
* [#18780](https://github.com/apache/nuttx/pull/18780) drivers/input: Add support to MPR121 Capacitive Keypad
* [#18904](https://github.com/apache/nuttx/pull/18904) drivers/mtd/mx25rxx.c: add support for MX25L12873G
* [#18807](https://github.com/apache/nuttx/pull/18807) drivers/sensors: Add support to mt6816 magnetic encoder
* [#18609](https://github.com/apache/nuttx/pull/18609) drivers/usbdev: add UVC gadget class driver
* [#17408](https://github.com/apache/nuttx/pull/17408) initial support for fixed-point data for sensors
Drivers With Improvements
* [#18985](https://github.com/apache/nuttx/pull/18985) drivers: Fix comment typos — 'register' → 'registered' across drivers.
* [#18980](https://github.com/apache/nuttx/pull/18980) drivers/analog: fix dead free and memory leak in mcp48xx and mcp47x6.
* [#18986](https://github.com/apache/nuttx/pull/18986) drivers/analog: Fix memory leak and dead code in mcp3008_initialize.
* [#18987](https://github.com/apache/nuttx/pull/18987) drivers/analog: Fix memory leak in ads1115_initialize.
* [#18996](https://github.com/apache/nuttx/pull/18996) drivers/analog/dac7554: Add NULL checks after kmm_malloc in dac7554_initialize
* [#18759](https://github.com/apache/nuttx/pull/18759) drivers/can: Fix close drain, write-only reader lifecycle, and STM32 RX header
* [#19192](https://github.com/apache/nuttx/pull/19192) drivers/clk: use uintptr_t for register addresses to fix GCC15 warnings
* [#19193](https://github.com/apache/nuttx/pull/19193) drivers/eeprom/i2c_xx24xx: Integer Overflow in I2C EEPROM ee24xx_seek()
* [#18505](https://github.com/apache/nuttx/pull/18505) drivers/lcd: Refactor ST7796 to use Kconfig and add Power Management
* [#18835](https://github.com/apache/nuttx/pull/18835) drivers/fb: Fix a symbol missing CONFIG_
* [#18552](https://github.com/apache/nuttx/pull/18552) drivers/mtd/ftl: honor O_DIRECT flag, remove bootloader write buffering
* [#18685](https://github.com/apache/nuttx/pull/18685) drivers/mtd/mx25rxx.c: use 4 byte address for large flash memories.
* [#18564](https://github.com/apache/nuttx/pull/18564) drivers/mtd/w25.c: ensure the device is not in power down mode
* [#18771](https://github.com/apache/nuttx/pull/18771) drivers/mtd/w25n: implement bad block management
* [#18984](https://github.com/apache/nuttx/pull/18984) drivers/net: Fix typo in lan9250_set_txavailable function name.
* [#18633](https://github.com/apache/nuttx/pull/18633) drivers/net/telnet: Ignore unsupported subnegotiation data.
* [#18638](https://github.com/apache/nuttx/pull/18638) drivers/net/telnet: Fix typo.
* [#18599](https://github.com/apache/nuttx/pull/18599) drivers/net/telnet: fix typo in telnet.c
* [#18933](https://github.com/apache/nuttx/pull/18933) drivers/usbhost_hidmouse: fix button detection in touchscreen example
* [#18997](https://github.com/apache/nuttx/pull/18997) drivers/rpmsg: Fix typo rpmsg_device_destory -> rpmsg_device_destroy
* [#18903](https://github.com/apache/nuttx/pull/18903) drivers/rpmsg and rptun: some compile error fix
* [#18491](https://github.com/apache/nuttx/pull/18491) drivers/rpmsg_virtio: add VIRTIO_RPMSG_F_BUFADDR to support specifying buffer address
* [#18742](https://github.com/apache/nuttx/pull/18742) drivers/sensors: fix misplaced endif in bmi160_base.c
* [#18848](https://github.com/apache/nuttx/pull/18848) drivers/timers: avoid 32-bit overflow in arch_timer current_usec
* [#18938](https://github.com/apache/nuttx/pull/18938) drivers/video: use spinlock to replace critical section for goldfish_…
* [#18897](https://github.com/apache/nuttx/pull/18897) drivers/video/vnc: fix typo in Kconfig
* [#18527](https://github.com/apache/nuttx/pull/18527) drivers/wireless/cc1101: Add MSK/4-FSK, dynamic PATABLE ramping, and fix IOCTL safety
Board Support
New Board Support
* [#17229](https://github.com/apache/nuttx/pull/17229) boards/arm/am67: Add support for T3 Gemstone O1 board
* [#18573](https://github.com/apache/nuttx/pull/18573) boards/arm/ht32f491x3: Add support for the HT32F49163 Starter Kit board
* [#18921](https://github.com/apache/nuttx/pull/18921) boards/arm/stm32h7: Add support for nucleo-h753zi board
* [#18475](https://github.com/apache/nuttx/pull/18475) boards/arm/stm32h7: Add support for the NUCLEO-H723ZG board
* [#18907](https://github.com/apache/nuttx/pull/18907) boards/arm64/am62x: add initial BeaglePlay and PocketBeagle2 bring-up
* [#18570](https://github.com/apache/nuttx/pull/18570) boards/risc-v/esp32: Added support for wareshare ESP32-P4-Pico-wifi.
* [#18730](https://github.com/apache/nuttx/pull/18730) boards/xtensa/esp32s3: New board WaveShare ESP32-S3-(Touch)-LCD-1.28.
Boards With Improvements
* [#18551](https://github.com/apache/nuttx/pull/18551) boards: add option to disable SPI Flash MTD automatic bringup on Espressif devices
* [#18744](https://github.com/apache/nuttx/pull/18744) boards: Fix modbus configs after moving it to apps/industry
* [#18750](https://github.com/apache/nuttx/pull/18750) boards: Increase `esp32h2-devkit:efuse` IDLETHREAD stack to 3072
* [#18918](https://github.com/apache/nuttx/pull/18918) boards: PWM support for nucleo-c091 and nucleo-c071
* [#18833](https://github.com/apache/nuttx/pull/18833) boards/config: Remove final mentions of `NSH_ARCHINIT`
ARM
* [#18838](https://github.com/apache/nuttx/pull/18838) boards/arm: Remove app-specific initialization
* [#18756](https://github.com/apache/nuttx/pull/18756) boards/arm/cxd56xx/spresense: Add ostest, coremark and getprime configs.
* [#18649](https://github.com/apache/nuttx/pull/18649) boards/arm/ht32f491x3: Add PWM support for the HT32F49163 Starter Kit board
* [#18714](https://github.com/apache/nuttx/pull/18714) boards/arm/nrf52/nrf52840-dk|nrf5340-dk: remove nrf52_timer.c
* [#18681](https://github.com/apache/nuttx/pull/18681) boards/arm/rp23xx: add hardware SHA-256 cryptodev support
* [#18823](https://github.com/apache/nuttx/pull/18823) boards/arm/stm32: add nucleo-f412zg ostest and coremark configs.
* [#18766](https://github.com/apache/nuttx/pull/18766) boards/arm/stm32: route nucleo-f412zg console through ST-LINK VCP.
* [#18634](https://github.com/apache/nuttx/pull/18634) boards/arm/stm32/nucleo-c0{71rb|92rc}: fix USART 1 pins
* [#18716](https://github.com/apache/nuttx/pull/18716) boards/arm/stm32/nucleo-c0XX: fix invalid ADC buff size
* [#18569](https://github.com/apache/nuttx/pull/18569) boards/arm/stm32*/: Align ARM STM32 idle stack
* [#18797](https://github.com/apache/nuttx/pull/18797) boards/arm/stm32f1: migrate to new pinmap
* [#18760](https://github.com/apache/nuttx/pull/18760) boards/arm/stm32f103-minimum: Add CAN bring-up, char/socket drivers, and …
* [#18796](https://github.com/apache/nuttx/pull/18796) boards/arm/stm32f2: migrate to new pinmap
* [#18799](https://github.com/apache/nuttx/pull/18799) boards/arm/stm32f3: migrate to new pinmap
* [#18798](https://github.com/apache/nuttx/pull/18798) boards/arm/stm32f4: migrate to new pinmap
* [#18534](https://github.com/apache/nuttx/pull/18534) boards/arm/stm32f4/stm32f4discovery: Add board config to LCD ST7567 and documentation
* [#18846](https://github.com/apache/nuttx/pull/18846) boards/arm/stm32f4/stm32f4discovery: Normalize mt6816 defconfig
* [#18795](https://github.com/apache/nuttx/pull/18795) boards/arm/stm32g4: migrate to new pinmap
* [#18509](https://github.com/apache/nuttx/pull/18509) boards/arm/stm32h7/nucleo-h743zi: Add nxboot bootloader support
* [#18503](https://github.com/apache/nuttx/pull/18503) boards/arm/stm32h7/nucleo-h723zg: Add support for 10BASE-T1S SPI Ethernet, remove untested/unsupported code, improve stability
* [#18850](https://github.com/apache/nuttx/pull/18850) boards/arm/stm32h7/weact-stm32h750: Don't disable compilation optimization
* [#18794](https://github.com/apache/nuttx/pull/18794) boards/arm/stm32l1: migrate to new pinmap
* [#18786](https://github.com/apache/nuttx/pull/18786) boards/arm/stm32l4: migrate to new pinmap
* [#18783](https://github.com/apache/nuttx/pull/18783) boards/arm/stm32l5: migrate to new pinmap
* [#18945](https://github.com/apache/nuttx/pull/18945) boards/arm/stm32n6/nucleo-n657x0-q: Add autoleds and userleds support
* [#18784](https://github.com/apache/nuttx/pull/18784) boards/arm/stm32wb: migrate to new pinmap
ARM64
* [#19002](https://github.com/apache/nuttx/pull/19002) boards/arm64/bcm2711/raspberrypi-4b: Add NXInit configuration
* [#18499](https://github.com/apache/nuttx/pull/18499) boards/arm64/bcm2711/raspberrypi-4b: Fix GPIO
* [#18861](https://github.com/apache/nuttx/pull/18861) boards/arm64/bcm2711/raspberrypi-4b: Implement SMP support
RISC-V
* [#18625](https://github.com/apache/nuttx/pull/18625) boards/risc-v: increase init stacksize for efuse defconfig on ESP32-C6
* [#18626](https://github.com/apache/nuttx/pull/18626) boards/risc-v: increase init stack size on esp32h2-devkit:efuse
* [#18596](https://github.com/apache/nuttx/pull/18596) boards/risc-v/k210/maix-bit: Add userled support
* [#18806](https://github.com/apache/nuttx/pull/18806) boards/risc-v/esp32c3-xiao: Add SMARTFS configuration
* [#18533](https://github.com/apache/nuttx/pull/18533) boards/risc-v/esp32c6: remove debug options from defconfig
* [#18943](https://github.com/apache/nuttx/pull/18943) boards/risc-v/esp32p4: Add defconfig for Python on ESP32-P4
* [#18889](https://github.com/apache/nuttx/pull/18889) boards/risc-v/esp32p4: Remove unnecessary `CONFIG_ESPRESSIF_MERGE_BINS`
* [#18860](https://github.com/apache/nuttx/pull/18860) boards/risc-v/esp32p4-function-ev-board: Normalize configuration
SIM
* [#18732](https://github.com/apache/nuttx/pull/18732) Fix NuttX simulator on macOS
* [#18736](https://github.com/apache/nuttx/pull/18736) boards/sim: Replaced message of the day (MOTD)
* [#18888](https://github.com/apache/nuttx/pull/18888) boards/sim: skip -no-pie on HOST_ARM64 to fix sim:nsh link on aarch64…
* [#18781](https://github.com/apache/nuttx/pull/18781) Prefer tmpfs for /tmp mount in SIM and update documentation
* [#18331](https://github.com/apache/nuttx/pull/18331) sim: Fix linker support and macOS host build issues
* [#18923](https://github.com/apache/nuttx/pull/18923) sim: pass no-pie through gcc driver
* [#18924](https://github.com/apache/nuttx/pull/18924) sim: resolve host symbols eagerly on Linux
* [#18745](https://github.com/apache/nuttx/pull/18745) sim/camera: add AVFoundation backend and multi-cam support
* [#18949](https://github.com/apache/nuttx/pull/18949) sim/keyboard: Translate X11 key codes to NuttX codec
TIVA
* [#18690](https://github.com/apache/nuttx/pull/18690) boards/tiva: change default toolchain for tm4c123g to GNU EABI
X86
* [#18822](https://github.com/apache/nuttx/pull/18822) boards/x86/qemu-i486: Add support to VGA framebuffer
* [#18834](https://github.com/apache/nuttx/pull/18834) boards/x86/qemu-i486: Fix the removal of qemu_appinit.c
XTENSA
* [#18559](https://github.com/apache/nuttx/pull/18559) boards/xtensa: fix optional item on spiflash config
* [#18852](https://github.com/apache/nuttx/pull/18852) boards/xtensa: Normalize configurations
* [#18925](https://github.com/apache/nuttx/pull/18925) boards/xtensa/esp32: increase MM_REGIONS for psram defconfig
* [#18502](https://github.com/apache/nuttx/pull/18502) boards/xtensa/esp32/Kconfig: Fix bug on ESP32, ESP32-S2 and ESP32-S3 GPIO IRQ
* [#18624](https://github.com/apache/nuttx/pull/18624) boards/xtensa/esp32s3: Fix MAC address byte order in LAN9250 driver
* [#18628](https://github.com/apache/nuttx/pull/18628) boards/xtensa/esp32s3: fix WiFi init by using CONFIG_ESPRESSIF_WIFI
* [#18535](https://github.com/apache/nuttx/pull/18535) boards/xtensa/esp32s3/lckfb-szpi-esp32s3: add sdmmc defconfig
* [#18813](https://github.com/apache/nuttx/pull/18813) boards/xtensa/esp32s3/lckfb-szpi-esp32s3: add vncviewer defconfig and documentation
* [#18650](https://github.com/apache/nuttx/pull/18650) boards/xtensa/esp32s3/lckfb-szpi-esp32s3: enable required IRQ vector table configs for uvc
File System
File System improvements
* [#18607](https://github.com/apache/nuttx/pull/18607) fs: Add Kernel-level VFS Performance Profiler
* [#18671](https://github.com/apache/nuttx/pull/18671) fs: rpmsgfs_client: process host message as ns_announcement
* [#18697](https://github.com/apache/nuttx/pull/18697) fs/fat: fix incorrect representation of SFN files created on Linux
* [#18782](https://github.com/apache/nuttx/pull/18782) fs/inode: add optional manual FD backtrace control via task group flag
* [#18872](https://github.com/apache/nuttx/pull/18872) fs/Kconfig: Add CONFIG_FS_PERMISSION option
* [#18884](https://github.com/apache/nuttx/pull/18884) fs/mnemofs: Add mnemofs version 1 support.
* [#18506](https://github.com/apache/nuttx/pull/18506) fs/mnemofs: Add portable bit primitives and cleanup hash functions
* [#18830](https://github.com/apache/nuttx/pull/18830) fs/vfs: allow NULL iov_base in KERNEL build with zero-based text
* [#18891](https://github.com/apache/nuttx/pull/18891) fs/vfs: enforce pseudoFS permissions on open()
* [#18876](https://github.com/apache/nuttx/pull/18876) fs/vfs: fix pseudoFS mode reporting
* [#18914](https://github.com/apache/nuttx/pull/18914) fs/vfs: validate chmod and chown callers in inode_chstat()
* [#18746](https://github.com/apache/nuttx/pull/18746) fs/vfs/fs_fstat.c: fix write capability check in proxy_fstat()
* [#18811](https://github.com/apache/nuttx/pull/18811) fs/vfs/fs_lock.c: Close stale locks unconditionally
Networking
Improvements
* [#18723](https://github.com/apache/nuttx/pull/18723) net: fix multiple bugs across network subsystem
* [#18847](https://github.com/apache/nuttx/pull/18847) net/bluetooth: fix BTPROTO_HCI socket device lookup
* [#18664](https://github.com/apache/nuttx/pull/18664) net/can,udp: fix conn unlock position in callback
* [#18764](https://github.com/apache/nuttx/pull/18764) net/devif: Reorder ipv4_input packet classification.
* [#18843](https://github.com/apache/nuttx/pull/18843) net/icmpv6: Discard Neighbor Discovery packet if optlen is 0
* [#18866](https://github.com/apache/nuttx/pull/18866) net/icmpv6/icmpv6_input.c: Dont increase d_pktsize from router advertise
* [#18738](https://github.com/apache/nuttx/pull/18738) net/ipforward: Forbid non-forwardable multicast scopes.
* [#18629](https://github.com/apache/nuttx/pull/18629) net/nat: g_nat_lock can be used recursively and nat_lock/unlock should be paired
* [#18812](https://github.com/apache/nuttx/pull/18812) net/nat: Let ICMP echo id zero be a valid NAT id.
* [#18674](https://github.com/apache/nuttx/pull/18674) net/nat: Unlock on outbound NAT entry creation failure.
* [#18670](https://github.com/apache/nuttx/pull/18670) net/netdb/dns: validate nameserver input in dns_add_nameserver
* [#18619](https://github.com/apache/nuttx/pull/18619) net/netdev/netdev_ioctl: log in hex mode for ioctl cmd
* [#18851](https://github.com/apache/nuttx/pull/18851) net/netdev/netdev_txnotify.c: add debug log with interface name
* [#18845](https://github.com/apache/nuttx/pull/18845) net/sixlowpan: Fix sixlowpan_uncompresshdr_hc06()
* [#18751](https://github.com/apache/nuttx/pull/18751) net/tcp: improve tcp_send_txnotify
* [#18689](https://github.com/apache/nuttx/pull/18689) net/udp: fix conn_unlock not called outside conditional block
Unsorted
* [#18417](https://github.com/apache/nuttx/pull/18417) kinetis/serial: Enable RTS as GPIO for RS485CONTROL
* [#18472](https://github.com/apache/nuttx/pull/18472) wireless/cc1101: Add standard RF IOCTL support
* [#18487](https://github.com/apache/nuttx/pull/18487) serial/uart_rpmsg: Remove redundant CONFIG_RPMSG_UART_CONSOLE macro check
* [#18510](https://github.com/apache/nuttx/pull/18510) wireless/cc1101: migrate to wlioc_rx_hdr_s and add operation modes
* [#18532](https://github.com/apache/nuttx/pull/18532) wireless/cc1101: Make SPI burst and single frequencies configurable
* [#18542](https://github.com/apache/nuttx/pull/18542) video/esp32s3: add GC0308 DVP camera support for lckfb-szpi-esp32s3
* [#18554](https://github.com/apache/nuttx/pull/18554) ioexpander/iso1i813t: add option to check errors during read
* [#18579](https://github.com/apache/nuttx/pull/18579) nucleo-l476rg: register userleds device driver if CONFIG_USERLED is set
* [#18588](https://github.com/apache/nuttx/pull/18588) add nxscope examples and doc
* [#18593](https://github.com/apache/nuttx/pull/18593) add adcscope example for nucleo-c071rb
* [#18598](https://github.com/apache/nuttx/pull/18598) stm32h5/adc: fix TROVS bit and watchdog threshold register writes
* [#18614](https://github.com/apache/nuttx/pull/18614) xtensa/espressif: Update common-source integration for Xtensa devices
* [#18618](https://github.com/apache/nuttx/pull/18618) serial/uart_rpmsg: Remove redundant CONFIG_RPMSG_UART_CONSOLE macro c…
* [#18622](https://github.com/apache/nuttx/pull/18622) esp_i2s: fix ESP32-S3 I2S RX DMA and add ES7210 4-ch ADC codec driver
* [#18631](https://github.com/apache/nuttx/pull/18631) nucleo-l476rg: register userleds device driver if CONFIG_USERLED is set
* [#18636](https://github.com/apache/nuttx/pull/18636) stm32h5/adc: fix TROVS bit and watchdog threshold register writes
* [#18637](https://github.com/apache/nuttx/pull/18637) nucleo-l476rg: fix ADC driver compilation
* [#18642](https://github.com/apache/nuttx/pull/18642) nucleo-l476rg/stm32_gpio.c: fix compilation error
* [#18654](https://github.com/apache/nuttx/pull/18654) espressif/rmt: replace rmtchar with arch-specific lirc adapter
* [#18667](https://github.com/apache/nuttx/pull/18667) graphics/nxglib: use putarea for lcd copyrectangle when available
* [#18683](https://github.com/apache/nuttx/pull/18683) Fix ARMv6-M/ARMv7-M SVCall register corruption in protected builds, fix `lm3s6965-ek:qemu-protected` boot, and add board documentation.
* [#18684](https://github.com/apache/nuttx/pull/18684) kinetis/dac: Implement basics DAC
* [#18692](https://github.com/apache/nuttx/pull/18692) xtensa/esp32s3: cam driver fixes and GC0308 DVP enhancements
* [#18699](https://github.com/apache/nuttx/pull/18699) arm/imx6: Fix IMX_IRQ definitions
* [#18703](https://github.com/apache/nuttx/pull/18703) xtensa/esp32s3: refactor cam driver to use cam_ll HAL layer
* [#18709](https://github.com/apache/nuttx/pull/18709) espressif: fix Wi-Fi IRQ issue during SPI Flash operations
* [#18718](https://github.com/apache/nuttx/pull/18718) Remove useless references to CONFIG_STM32_TIMx_QECLKOUT
* [#18724](https://github.com/apache/nuttx/pull/18724) video/fb: fix compilation errors
* [#18726](https://github.com/apache/nuttx/pull/18726) nuttx/nx: compilation error occurs
* [#18737](https://github.com/apache/nuttx/pull/18737) video/fb: guarantee fb read-write integrity to prevent display tearing
* [#18754](https://github.com/apache/nuttx/pull/18754) esp32p4: Implements PSRAM support for ESP32-P4
* [#18755](https://github.com/apache/nuttx/pull/18755) add nxmodbus doc and examples
* [#18779](https://github.com/apache/nuttx/pull/18779) remove legacy pinmap support for stm32h7, stm32f7 and stm32f0l0g0
* [#18785](https://github.com/apache/nuttx/pull/18785) Introduce dshot ESC protocol upperhalf and imx9 lowerhalf
* [#18788](https://github.com/apache/nuttx/pull/18788) Espressif: Update RMT peripheral testing application to `irtest`
* [#18789](https://github.com/apache/nuttx/pull/18789) cleanup after pinmap migration for stm32l5, stm32wb, stm32l4
* [#18810](https://github.com/apache/nuttx/pull/18810) syscall: fcntl param3 type to uintptr_t
* [#18815](https://github.com/apache/nuttx/pull/18815) Add USB CDC-ECM Host support
* [#18816](https://github.com/apache/nuttx/pull/18816) clock_settime: don't block when up_rtc_settime is called
* [#18817](https://github.com/apache/nuttx/pull/18817) i.MX95: ARM/CM7: LPI2C/Flexio backport and eDMA SG fix
* [#18853](https://github.com/apache/nuttx/pull/18853) kinetis/pit: Update Kconfig, implement oneshot PIT
* [#18855](https://github.com/apache/nuttx/pull/18855) arm: memcpy: add NEON paths for aligned copies
* [#18908](https://github.com/apache/nuttx/pull/18908) tricore: Add fpu init and fpucmp support.
* [#18937](https://github.com/apache/nuttx/pull/18937) golfish_gpu_fb: clear fb when initialization
* [#18968](https://github.com/apache/nuttx/pull/18968) Fix issues about watchdog timers on ESP32, ESP32-S2 and ESP32-S3
* [#18988](https://github.com/apache/nuttx/pull/18988) rtc/ptc85263A: Add handling of stop_enable flag.
* [#18999](https://github.com/apache/nuttx/pull/18999) bcm2711/fb: Use physical device resolution OR force resolution
* [#19203](https://github.com/apache/nuttx/pull/19203) syslog: avoid an infinite loop if one channel fails
Compatibility Concerns
* [#19191](https://github.com/apache/nuttx/pull/19191) !arch: unify all STM32 ports public API
* [#19202](https://github.com/apache/nuttx/pull/19202) !arch/arm/stm32: rename STM32F7/H7 QUADSPI Kconfig symbol to QSPI
* [#18800](https://github.com/apache/nuttx/pull/18800) !arch/arm/stm32: remove STM32_USE_LEGACY_PINMAP
* [#19136](https://github.com/apache/nuttx/pull/19136) !arch/arm/stm32: unify all Kconfig options for STM32 ports.
* [#18492](https://github.com/apache/nuttx/pull/18492) !arch/risc-v/espressif: Update common-source integration for RISC-V devices
* [#18408](https://github.com/apache/nuttx/pull/18408) !boards: Simplify NuttX initialization
* [#18832](https://github.com/apache/nuttx/pull/18832) !boards/boardctl: Remove BOARDIOC_INIT
* [#18864](https://github.com/apache/nuttx/pull/18864) !drivers/pwm: remove PWM_MULTICHAN option
* [#18916](https://github.com/apache/nuttx/pull/18916) !drivers: separate pulse count from PWM driver
* [#18840](https://github.com/apache/nuttx/pull/18840) !sched/clock: drop CONFIG_SYSTEM_TIME64 / CONFIG_HAVE_LONG_LONG / CONFIG_LIBC_LONG_LONG and sclock_t

View file

@ -1,3 +1,46 @@
=====================================
``lely-canopen`` Lely CANopen support
=====================================
`Lely CANopen <https://gitlab.com/lely_industries/lely-core>`_ is an
open-source CANopen (CiA 301/302/305/315) protocol stack.
The port configuration (``LELY_NO_*`` feature switches) is generated
from Kconfig in ``apps/include/canutils/lely/config.h``.
Feature selection
=================
``CONFIG_CANUTILS_LELYCANOPEN`` enables the build. The individual CANopen
services are selected with the ``CONFIG_CANUTILS_LELYCANOPEN_*`` options,
including:
- ``SDEV`` static device description support (selects ``OBJNAME``)
- ``MASTER`` NMT master support
- ``EMCY`` emergency (EMCY) objects
- ``CSDO`` / ``SSDO`` client / server SDO
- ``RPDO`` / ``TPDO`` / ``MPDO`` process data objects
- ``SYNC`` / ``TIME`` SYNC and TIME producers/consumers
- ``LSS`` layer setting services
- ``NG`` / ``NMTBOOT`` / ``NMTCFG`` node guarding and master boot/config
- ``OBJDEFAULT`` / ``OBJLIMITS`` / ``OBJNAME`` / ``OBJUPLOAD`` /
``OBJFILE`` object dictionary features
Tools
=====
``CONFIG_CANUTILS_LELYCANOPEN_TOOLS_COCTL`` builds ``coctl``, the Lely
CANopen control tool (an interactive ASCII gateway). It requires SocketCAN
(``NET_CAN``).
Examples
========
Two ready-to-run demos built on this library are provided:
- :doc:`/applications/examples/lely_slave/index` a CANopen slave node
- :doc:`/applications/examples/lely_master/index` a CANopen master node
Both can run on the simulator over the CAN character driver. See
:ref:`testing_lely_canopen_sim` for how to set up a virtual CAN network and
observe the traffic.

View file

@ -4,4 +4,4 @@
This examples has ports of several FTDI demos for the FTDI/BridgeTek FT80x GUI
chip. As an example configuration, see
``nuttx/boards/arm/stm32/viewtool-stm32f107/configs/ft80x/defconfig``.
``nuttx/boards/arm/stm32f1/viewtool-stm32f107/configs/ft80x/defconfig``.

View file

@ -0,0 +1,44 @@
===========================================
``lely_master`` Lely CANopen master example
===========================================
A minimal CANopen **master** node built on the `Lely CANopen
<https://gitlab.com/lely_industries/lely-core>`_ stack (see
:doc:`/applications/canutils/lely-canopen/index`).
The node is described by a static device description
(``sdev_master.c``, node-ID ``0x01``) and talks to the CAN bus through the
NuttX **CAN character driver** (``/dev/can0``) by default, or through
SocketCAN when the ``CONFIG_EXAMPLES_LELYMASTER_SOCKET`` backend is selected.
It registers the ``comaster`` NSH built-in command.
Once the slave has booted, the master drives a small CANopen network:
#. reads the slave's device type (object ``0x1000``) with a Client-SDO
upload;
#. commands the slave to OPERATIONAL with an NMT start;
#. produces SYNC (object ``0x1005``/``0x1006``) and receives the slave's
synchronous TPDO through an RPDO (object ``0x1400``/``0x1600``), printing
the streamed counter that lands in object ``0x2100``.
Configuration
=============
``CONFIG_EXAMPLES_LELYMASTER``
Enable the example. Requires ``CANUTILS_LELYCANOPEN`` with ``SDEV``,
``TIME``, ``OBJUPLOAD`` and ``MASTER`` support (the master services also
pull in ``EMCY``, ``CSDO``, ``RPDO``, ``TPDO`` and ``SYNC``).
``CONFIG_EXAMPLES_LELYMASTER_CHARDEV`` / ``CONFIG_EXAMPLES_LELYMASTER_SOCKET``
CAN backend selection (character driver or SocketCAN).
``CONFIG_EXAMPLES_LELYMASTER_DEVPATH``
CAN character device path (default ``/dev/can0``).
``CONFIG_EXAMPLES_LELYMASTER_INTF``
SocketCAN interface name (default ``can0``).
The ready-made ``sim:lely`` configuration builds this example together with
the :doc:`/applications/examples/lely_slave/index` demo for the simulator
with the CAN character driver enabled.

View file

@ -0,0 +1,39 @@
=========================================
``lely_slave`` Lely CANopen slave example
=========================================
A minimal CANopen **slave** node built on the `Lely CANopen
<https://gitlab.com/lely_industries/lely-core>`_ stack (see
:doc:`/applications/canutils/lely-canopen/index`).
The node is described by a static device description
(``sdev_slave.c``, node-ID ``0x02``) and talks to the CAN bus through the
NuttX **CAN character driver** (``/dev/can0``) by default, or through
SocketCAN when the ``CONFIG_EXAMPLES_LELYSLAVE_SOCKET`` backend is selected.
It registers the ``coslave`` NSH built-in command.
The slave answers the master's Client-SDO requests through its default
Server-SDO and, once the master has brought it to OPERATIONAL, streams an
incrementing counter (object ``0x2100``) in a synchronous TPDO (object
``0x1800``/``0x1a00``) on every SYNC.
Configuration
=============
``CONFIG_EXAMPLES_LELYSLAVE``
Enable the example. Requires ``CANUTILS_LELYCANOPEN`` with ``SDEV``,
``TIME`` and ``OBJUPLOAD`` support.
``CONFIG_EXAMPLES_LELYSLAVE_CHARDEV`` / ``CONFIG_EXAMPLES_LELYSLAVE_SOCKET``
CAN backend selection (character driver or SocketCAN).
``CONFIG_EXAMPLES_LELYSLAVE_DEVPATH``
CAN character device path (default ``/dev/can0``).
``CONFIG_EXAMPLES_LELYSLAVE_INTF``
SocketCAN interface name (default ``can0``).
The ready-made ``sim:lely`` configuration builds this example together with
the :doc:`/applications/examples/lely_master/index` demo for the simulator
with the CAN character driver enabled.

View file

@ -2,12 +2,72 @@
``lvglterm`` LVGL Terminal for NuttShell (NSH)
==============================================
LVGL application that executes NuttShell (NSH) commands entered with a
Touchscreen Keyboard and displays the NSH output. Prerequisite configuration
settings:
LVGL application that runs an interactive NuttShell (NSH) on the display. NSH
is started with its standard streams redirected through pipes, its output is
rendered in an LVGL text area, and the input comes from one of two sources
selected at build time.
- ``CONFIG_NSH_CONSOLE=y`` NSH must be configured to use a console.
- ``CONFIG_LIBC_EXECFUNCS=y`` posix_spawn() must be enabled.
- ``CONFIG_PIPES=y`` Pipes must be enabled.
- ``CONFIG_GRAPHICS_LVGL=y`` LVGL graphics must be enabled.
- ``CONFIG_LV_FONT_UNSCII_16=y`` LVGL font UNSCII 16 must be enabled.
The shared code lives in ``lvglterm.c`` (NSH startup, output rendering, main
loop); ``lvglterm_touch.c`` and ``lvglterm_kbd.c`` implement the two input
variants.
Input variants
==============
The input source is chosen with the *LVGL Terminal input source* Kconfig
choice (only one is built at a time):
On-screen keyboard (touch)
``CONFIG_EXAMPLES_LVGLTERM_INPUT_TOUCH`` (default). An LVGL keyboard
widget operated by touch; a command line is typed and submitted with
Enter. Suits touchscreen boards and keeps the original behaviour.
.. figure:: lvglterm-touch.png
:align: center
:width: 500px
:alt: LVGL Terminal with the on-screen touch keyboard
On-screen keyboard (touch) variant
Physical keyboard
``CONFIG_EXAMPLES_LVGLTERM_INPUT_KBD``. Key events are read from a
``/dev/kbdN`` keyboard device and streamed to the shell; the output fills
the whole screen. Requires ``CONFIG_INPUT_KEYBOARD``.
The device defaults to ``CONFIG_EXAMPLES_LVGLTERM_KBD_DEV``
(``/dev/kbd0``) and can be overridden at run time by passing the path as
the first argument (``lvglterm /dev/kbd1``) when more than one keyboard is
present. Keyboards that report the Fn navigation cluster as cursor keys
can scroll the output with Up/Down.
.. figure:: lvglterm-kbd.png
:align: center
:width: 500px
:alt: LVGL Terminal driven by a physical keyboard
Physical keyboard variant
Font
====
The monospaced terminal font is chosen with the *LVGL Terminal font* choice:
``CONFIG_EXAMPLES_LVGLTERM_FONT_UNSCII_16`` (default), or the smaller
``CONFIG_EXAMPLES_LVGLTERM_FONT_UNSCII_8`` for low-resolution displays where
UNSCII 16 shows too few columns.
Configuration
=============
- ``CONFIG_LIBC_EXECFUNCS=y`` -- ``posix_spawn()`` must be enabled.
- ``CONFIG_PIPES=y`` -- Pipes must be enabled.
- ``CONFIG_SYSTEM_NSH=y`` -- the NSH library must be enabled.
- ``CONFIG_GRAPHICS_LVGL=y`` and ``CONFIG_LV_USE_NUTTX=y`` -- LVGL with its
NuttX integration.
- A display (``CONFIG_LV_USE_NUTTX_LCD`` or a framebuffer). The touch variant
also needs a touchscreen input (``CONFIG_LV_USE_NUTTX_TOUCHSCREEN``); the
keyboard variant needs a keyboard driver (``CONFIG_INPUT_KEYBOARD``).
- The selected font (``CONFIG_LV_FONT_UNSCII_8`` or
``CONFIG_LV_FONT_UNSCII_16``) is enabled automatically by the font choice.
Reference: `NuttX RTOS for PinePhone: LVGL Terminal for NSH Shell
<https://lupyuen.github.io/articles/terminal>`_.

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

View file

@ -0,0 +1,118 @@
=============================
``rng90`` RNG90 TRNG Example
=============================
The ``rng90`` example is a simple NuttX application that opens an RNG90 device
node, reads random bytes, and prints them in hexadecimal format.
RNG90 is a dedicated hardware random number generator IC from Microchip. It can
be used as a companion device for microcontrollers that do not provide native
true random number generation (TRNG).
According to the Microchip RNG90 product page and linked validation artifacts,
the device is presented as a FIPS 140-3 compliant random number generator with
SP 800-90 A/B/C alignment, with references to NIST validation entries such as
entropy certificate E194 and DRBG validation A3013.
Microchip also positions this device for disposable/ecosystem-control
applications, which makes it a practical choice for cost-sensitive designs.
Configuration
=============
Enable this application in ``menuconfig``:
- ``Application Configuration -> Examples -> Microchip RNG90 TRNG example``
Required dependency:
- Enable the driver in ``menuconfig``:
``Device Drivers -> Cryptographic Device Drivers -> Enable Microchip RNG90 TRNG``
(``CONFIG_DEV_RNG90``)
Application options:
- ``CONFIG_EXAMPLES_RNG90``
- ``CONFIG_EXAMPLES_RNG90_PROGNAME`` (default: ``"rng90"``)
- ``CONFIG_EXAMPLES_RNG90_DEVPATH`` (default: ``"/dev/rng0"``)
- ``CONFIG_EXAMPLES_RNG90_PRIORITY``
- ``CONFIG_EXAMPLES_RNG90_STACKSIZE``
Usage
=====
From NSH::
rng90 [<devpath>] [<count>]
Arguments:
- ``<devpath>``: RNG90 device path (default from
``CONFIG_EXAMPLES_RNG90_DEVPATH``)
- ``<count>``: number of random bytes to read (``1..32``, default ``32``)
Examples::
rng90
rng90 /dev/rng0 16
Expected output
===============
::
RNG90 example: device /dev/rng0
Read 16 random byte(s):
3f a1 7c ...
Notes
=====
- Opening the device wakes up RNG90.
- Closing the device puts RNG90 back to sleep.
- If ``<count>`` is outside ``1..32``, the app clamps it to ``32``.
Hardware validation log
=======================
The following session was executed on real hardware to validate this example.
Test setup:
- Host: macOS
- Board: ``esp32c3-devkit``
- Serial port: ``/dev/cu.wchusbserial140``
- Serial settings: ``115200 8N1``
Console transcript::
nsh> uname -a
NuttX 12.6.0-RC1 4130050287-dirty Jun 7 2026 22:11:21 risc-v esp32c3-devkit
nsh> ls /dev/rng0
/dev/rng0
nsh> rng90
RNG90 example: device /dev/rng0
Read 32 random byte(s):
0d b2 71 d1 40 1f 3c 50 52 3d c6 2c a9 74 ec 60
44 ab 67 bb c4 34 1b ac 48 62 fe b9 fd 95 c9 cb
nsh> rng90 /dev/rng0 16
RNG90 example: device /dev/rng0
Read 16 random byte(s):
ef 82 5f b7 41 f1 48 13 5a 41 16 3a 67 1b 90 f2
nsh> rng90 /dev/rng0 64
Invalid count 64, clamping to 32
RNG90 example: device /dev/rng0
Read 32 random byte(s):
bb be 2f 20 7f c8 33 8d 18 90 c8 fb 94 db bc e6
84 41 17 6f 5a be 5a 06 c3 7b f1 30 ac f2 a6 f5
nsh>
References
==========
- Microchip product page:
https://www.microchip.com/en-us/product/RNG90
- NIST CMVP entropy certificate E194:
https://csrc.nist.gov/projects/cryptographic-module-validation-program/entropy-validations/certificate/194
- NIST CAVP DRBG validation A3013:
https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?validation=35623

View file

@ -0,0 +1,112 @@
.. _nuttx-webpanel:
====================================
``webpanel`` NuttX Web Panel
====================================
This guide explains how to run the NuttX Web Panel.
The NuttX Web Panel is a self-hosted web interface for device management. It
provides a browser-based dashboard with system information, an NSH terminal,
file management on SmartFS, and network configuration. The application is
implemented in ``apps/examples/webpanel/`` and is inspired by consumer IoT
management panels.
.. figure:: nuttx-webpanel-home.png
:align: center
:alt: NuttX Web Panel home page on ESP32-P4
NuttX Web Panel home page on ESP32-P4 (``esp32p4-function-ev-board:webpanel``)
How Does it Work?
=================
The web panel combines several NuttX components:
1. **THTTPD** serves static HTML/CSS/JavaScript from a ROMFS image mounted at
``/data/www``.
2. **BINFS** and **UNIONFS** expose built-in CGI programs under
``/data/www/cgi-bin`` for dynamic requests (system info, file listing,
upload, and DHCP renew).
3. **libwebsockets** provides a WebSocket server (TCP port 8080) that spawns
an NSH session over a POSIX pseudo-terminal for the browser terminal.
4. **mDNS** advertises the HTTP service as ``webpanel.local`` (``_http._tcp``
on port 80). The ``mdnsd_event`` application starts the mDNS daemon when
an IP address is assigned.
5. **SmartFS** on SPI flash (mounted at ``/mnt``) stores user files, including
uploaded Python scripts.
On boot, ``/etc/init.d/rcS`` (enabled via ``CONFIG_ETC_ROMFS``) sets the
hostname to ``webpanel``, starts ``webpanel`` in the background, and launches
``mdnsd_event`` to register the HTTP service once DHCP completes.
Building and Running the Web Panel
==================================
ESP32-P4-Function-EV-Board
--------------------------
For this example, use the ESP32-P4-Function-EV-Board with Ethernet connected
to the board PHY port. The ``esp32p4-function-ev-board:webpanel`` defconfig
requires **16 MB** flash (see ``CONFIG_ESPRESSIF_FLASH_16M``).
This defconfig includes the CPython interpreter and produces a large firmware
image. A full clean build may take several minutes.
Build and flash the board with the following commands:
.. code:: console
$ cd nuttx
$ make distclean
$ ./tools/configure.sh esp32p4-function-ev-board:webpanel
$ make -j$(nproc) flash ESPTOOL_PORT=/dev/ttyACM0
On **v1.5.2**, use ``/dev/ttyACM0`` (USB Serial/JTAG) for flashing. UART0
(GPIO37/GPIO38) remains the serial console; attach an external USB-to-UART
adapter to monitor NSH while the web panel runs.
After flashing, connect the Ethernet cable and wait for DHCP. Then open a browser
on the same LAN:
.. code:: text
http://webpanel.local
If mDNS is unavailable, check the assigned address on the serial console:
.. code:: console
nsh> ifconfig
eth0 Link encap:Ethernet HWaddr 30:ed:a0:ec:f1:60 at RUNNING mtu 1500
inet addr:10.0.10.50 DRaddr:10.0.10.1 Mask:255.255.255.0
and browse to ``http://<inet-addr>`` instead.
The interface provides four sections:
* **Home** — live system and network information
* **Terminal** — browser NSH shell over WebSocket
* **Files** — browse, upload, and run scripts on ``/mnt``
* **Network** — interface details and DHCP lease renewal
Python scripts can be uploaded through the **Files** tab and executed from the
**Terminal** tab or via the **Run** button for ``.py`` files. See also the
:doc:`Python Interpreter </applications/interpreters/python/index>` page.
Configuration
=============
The web panel is enabled with ``CONFIG_EXAMPLES_WEBPANEL``. The defconfig also
enables the dependencies selected by that option, including THTTPD,
libwebsockets (server mode), BINFS, UNIONFS, and pseudo-terminal support.
Key Kconfig options (under ``Application Configuration``
``Examples````Web Panel for device management``):
* ``CONFIG_EXAMPLES_WEBPANEL_NETIF`` — network interface name (default
``eth0``)
* ``CONFIG_EXAMPLES_WEBPANEL_WS_PORT`` — WebSocket terminal port (default
``8080``)
* ``CONFIG_EXAMPLES_MDNS_SERVICE`` / ``CONFIG_EXAMPLES_MDNS_SERVICE_PORT``
mDNS service type and port advertised by ``mdnsd_event``

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

View file

@ -0,0 +1,134 @@
======
NXDoom
======
This game is a port of the `Chocolate DOOM
<https://github.com/chocolate-doom/chocolate-doom>`_ DOOM port to NuttX. The
original Chocolate DOOM port is highly featured, and also adheres well to the
vanilla DOOM experience. NXDoom is tailored instead for embedded devices and
will likely have to forego some features or sacrifice some vanilla DOOM
experience for better memory/CPU performance.
NXDoom is maintained inside the NuttX source tree because it will diverge
heavily from the original Chocolate DOOM port in order to target embedded
devices. It is for this reason that we do not take the approach of downloading
Chocolate DOOM and apply patches (there would be too many large patches to
apply).
.. figure:: doom-on-sim.png
:figwidth: 60%
:align: center
:alt: The shareware version of DOOM being played on the NuttX simulator
The shareware version of DOOM being played on the NuttX simulator
.. warning::
Not all features are implemented for NXDoom. There is currently no support
for game sounds or music, nor does any of the networked logic for multiplayer
games work.
Some code was stripped during the initial port to simplify the port. If those
features are needed/desired later, they can be added back. This includes some
sound-library interfaces which are not available on NuttX, some input
options, etc.
It is recommended that if you are making any significant changes to the
source code, you try compiling with and without the sound/networking feature
flags enabled to catch any possible errors.
.. todo::
This port is a massive work in progress. Any contributions are welcome. Since
memory is the primary constraint for many of the embedded devices running
NuttX, memory optimizations are particularly welcome.
Sound support, multiplayer support, support for any of the wide array of
input devices NuttX can provide are also highly welcomed.
.. warning::
Currently, the only supported input device is keyboard input. However,
NuttX's keyboard codec is highly non-standard and therefore some things do
not work as intended. For instance, pressing CTRL to fire does nothing since
NuttX's codec has no concept of CTRL. The keyboard codec will need to be
amended before this works properly, but the port is upstreamed in the hopes
of encouraging those changes or getting more contributors to add different
input devices. The keyboard codec needs to be treated delicately since other
things in the kernel depend on it.
Minimum requirements
--------------------
The minimum requirements for playing NXDoom are:
* A device running NuttX
* A device with graphics output controlled via a frame buffer driver (320x240
screen minimum resolution)
* Some way of getting sufficient input for up/down/left/right/fire controls
(limited out-of-the-box input support is available)
* A pretty good amount of memory (I haven't verified the total amount required
yet, but the original DOOM needed 4MB of RAM and NXDoom isn't much better
optimized)
* Non-volatile memory sufficiently large for the WAD file you choose to play
.. note::
The NXDoom port was tested using the shareware version of DOOM, whose WAD
file is commonly named DOOM1.wad. You may find this online on various sites.
Other WAD files are available online but are not guaranteed to work (i.e.,
the `OTTAWAU.wad
<https://www.doomworld.com/files/file/1651-ottawauwad-ver-09-pre-release/>`_
file I tried did not run properly)
Playing
-------
To launch the game, just run:
.. code:: console
nsh> nxdoom -iwad /path/to/my/iwadfile.wad
and replace the path with your WAD file's path.
Other Notes
-----------
Translations
^^^^^^^^^^^^
The game does support different translations via headers with game strings. One
such example is ``src/doom/d_french``, which was my half-attempt at translating
the game strings to French (I stopped halfway). The main problem with
translations is that the game seems unable to render non-ASCII text (i.e. any
French words with accents have missing letters where the accents were). A way
around this would be great, and other translations are welcome.
Source Comments
^^^^^^^^^^^^^^^
I made an effort to preserve all the original comments from the Chocolate DOOM
source, which in turn seems to have made an effort to preserve the original DOOM
code comments. Some are quite vulgar.
Optimizations
^^^^^^^^^^^^^
DOOM uses 32-bit wide, signed fixed-point numbers for calculations. This should
be entirely compatible with the NuttX fixed-point library. However, in my
attempt to switch to the NuttX-native library, the textures began to render
strangely and I experienced periodic crashes. This would be one good
optimization.
Another useful optimization would be to eliminate the lookup tables used for
sine, cosine and tangent. These make the game logic fast, but they also take up
the most amount of memory in the binary. Removing them could save several
hundred KB. CPUs have come a long way since DOOM was written and the compute hit
might be worth it for the memory reduction on embedded.
Another good optimization would be to examine the use of 32-bit natural ``int``
variables and decided if smaller sizes could be used. I imagine this was
originally done for the native word-size optimizations on the computers of the
era, but it results in extra memory use on large internal arrays especially.

View file

@ -1,3 +1,92 @@
====================================
``scpi`` SCPI instrument side parser
====================================
Overview
========
The ``scpi`` application integrates the
`scpi-parser <https://github.com/j123b567/scpi-parser>`_ library with the
NuttX application build system. SCPI, the Standard Commands for Programmable
Instruments, is commonly used by test and measurement equipment to parse
instrument commands and responses.
The application provides the SCPI parser library for NuttX applications and can
optionally build the upstream interactive demo program.
Source Location
===============
The NuttX application wrapper is located in ``apps/industry/scpi``. It
downloads and builds ``scpi-parser`` version 2.2 unless an unpacked
``scpi-parser`` source tree is already present in that directory.
Basic Configuration
===================
Enable the parser with:
- ``CONFIG_SCPI_PARSER`` - Build the SCPI instrument-side parser library.
Optional demo support is controlled by:
- ``CONFIG_SCPI_PARSER_DEMO`` - Build the SCPI parser interactive demo program.
- ``CONFIG_SCPI_PARSER_DEMO_PRIORITY`` - Demo task priority.
- ``CONFIG_SCPI_PARSER_DEMO_STACKSIZE`` - Demo task stack size.
Unit Parser Configuration
=========================
``scpi-parser`` can include or exclude optional unit groups at compile time.
NuttX exposes these as Kconfig options and maps each option to the matching
upstream ``USE_UNITS_*`` compile-time define.
The following unit groups are configurable:
- ``CONFIG_SCPI_PARSER_UNITS_IMPERIAL`` - Imperial units.
- ``CONFIG_SCPI_PARSER_UNITS_ANGLE`` - Angle units.
- ``CONFIG_SCPI_PARSER_UNITS_PARTICLES`` - Particle units.
- ``CONFIG_SCPI_PARSER_UNITS_DISTANCE`` - Distance units.
- ``CONFIG_SCPI_PARSER_UNITS_MAGNETIC`` - Magnetic units.
- ``CONFIG_SCPI_PARSER_UNITS_LIGHT`` - Light units.
- ``CONFIG_SCPI_PARSER_UNITS_ENERGY_FORCE_MASS`` - Energy, force, and mass
units.
- ``CONFIG_SCPI_PARSER_UNITS_TIME`` - Time units.
- ``CONFIG_SCPI_PARSER_UNITS_TEMPERATURE`` - Temperature units.
- ``CONFIG_SCPI_PARSER_UNITS_RATIO`` - Ratio units.
- ``CONFIG_SCPI_PARSER_UNITS_POWER`` - Power units.
- ``CONFIG_SCPI_PARSER_UNITS_FREQUENCY`` - Frequency units.
- ``CONFIG_SCPI_PARSER_UNITS_ELECTRIC`` - Electric units.
- ``CONFIG_SCPI_PARSER_UNITS_ELECTRIC_CHARGE_CONDUCTANCE`` - Electric charge
and conductance units.
By default, ``CONFIG_SCPI_PARSER_UNITS_POWER``,
``CONFIG_SCPI_PARSER_UNITS_FREQUENCY``, and
``CONFIG_SCPI_PARSER_UNITS_ELECTRIC`` are enabled. The other optional unit
groups are disabled by default and may be enabled individually.
For example, enabling ``CONFIG_SCPI_PARSER_UNITS_TIME`` passes
``USE_UNITS_TIME=1`` to ``scpi-parser`` during compilation.
Example Configuration
=====================
A minimal parser configuration can enable only the library:
.. code-block:: text
CONFIG_SCPI_PARSER=y
To build the parser with time-unit support:
.. code-block:: text
CONFIG_SCPI_PARSER=y
CONFIG_SCPI_PARSER_UNITS_TIME=y
To include the interactive demo program:
.. code-block:: text
CONFIG_SCPI_PARSER=y
CONFIG_SCPI_PARSER_DEMO=y

View file

@ -0,0 +1,129 @@
=====================================
``dropbear`` SSH Server
=====================================
`Dropbear <https://matt.ucc.asn.au/dropbear/dropbear.html>`__ is a lightweight
SSH server well-suited for embedded environments. The NuttX port exposes an NSH
session over an encrypted SSH connection, enabling remote access to NuttX-based
hardware over a network.
Overview
--------
The port runs Dropbear as a persistent NuttX task, accepting successive SSH
connections without restarting. It can be used to open interactive NSH sessions
remotely, inspect system state, run commands, or integrate into automated
workflows that require secure shell access to an embedded target.
All cryptographic operations are routed through NuttX's native crypto stack,
replacing the bundled libtomcrypt modules and leveraging any available hardware
acceleration.
Prerequisites
-------------
Dropbear requires the board to have a reachable IP address. The underlying
network interface can be any transport supported by NuttX — Wi-Fi station mode,
Ethernet, or a point-to-point link — as long as the interface is up and has an
assigned address visible in ``ifconfig``::
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 84:f7:03:xx:xx:xx at RUNNING mtu 1504
inet addr:192.168.1.xx DRaddr:192.168.1.x Mask:255.255.255.0
The SSH client must be able to reach that address over TCP port 22 (or whichever
port is configured via ``CONFIG_NETUTILS_DROPBEAR_PORT``).
A persistent writable filesystem (e.g. SPIFFS or LittleFS) must be mounted and
accessible at the path used by ``CONFIG_NETUTILS_DROPBEAR_HOSTKEY_PATH`` and
``CONFIG_FSUTILS_PASSWD_PATH``. These files are created automatically on the
first run, but the filesystem must already be mounted.
Enabling Dropbear
-----------------
Enable the following options in ``menuconfig``::
CONFIG_NETUTILS_DROPBEAR=y
Key configuration options:
- ``CONFIG_NETUTILS_DROPBEAR_PORT`` — TCP port to listen on (default: ``22``).
- ``CONFIG_NETUTILS_DROPBEAR_HOSTKEY_PATH`` — path where the ECDSA host key is
stored (default: ``/data/dropbear_ecdsa_host_key``).
- ``CONFIG_NETUTILS_DROPBEAR_STACKSIZE`` — task stack size. A minimum of
``65536`` bytes is recommended;
- ``CONFIG_NETUTILS_DROPBEAR_PRIORITY`` — task priority.
The user database is read from the path configured by
``CONFIG_FSUTILS_PASSWD_PATH`` (default ``/data/passwd``).
Usage
-----
Once the network is up, the daemon starts automatically. The first run
generates an ECDSA host key and writes it to ``CONFIG_NETUTILS_DROPBEAR_HOSTKEY_PATH``.
Add a user account from the NSH console before connecting::
nsh> useradd <username> <password>
Check the board's IP address::
nsh> ifconfig
Then open an SSH session from a host on the same network::
$ ssh <username>@<ip_address>
<username>@<ip_address>'s password:
nsh>
Notes
-----
- The host key and the user database persist across reboots when stored on a
non-volatile partition (e.g. SPIFFS mounted at ``/data``).
- Only password authentication is supported; public-key authentication is
disabled.
- Only ECDSA P-256 host keys are supported.
- Enabled ciphers: ``chacha20-poly1305@openssh.com`` and ``aes128-ctr``.
- Port forwarding, agent forwarding, and X11 forwarding are disabled.
- Multiple clients can connect sequentially; the daemon re-enters the accept
loop after each session ends.
Troubleshooting
---------------
**Lost password / cannot log in**
The user database is stored in the file pointed to by ``CONFIG_FSUTILS_PASSWD_PATH``
on the persistent partition (e.g. ``/data/passwd`` on SPIFFS). If the password
is lost and the board can still be reached over a serial console, remove the
file and recreate the account::
nsh> rm /data/passwd
nsh> useradd <username> <new_password>
If the serial console is also inaccessible, the only recovery path is to erase
the persistent partition (or the full flash) and reflash the firmware.
**Host key mismatch after reflashing**
When the persistent partition is erased as part of a reflash, Dropbear generates
a new host key on the next boot. The SSH client on the host machine will then
refuse to connect because the key no longer matches the entry stored in
``~/.ssh/known_hosts``, printing a warning such as
``WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED``.
Remove the stale entry with::
$ ssh-keygen -R <ip_address>
Then reconnect normally. The client will prompt to accept the new host key.
**Connection refused**
Check that the board has obtained an IP address and that the Dropbear task is
running::
nsh> ifconfig
nsh> ps

View file

@ -1,3 +1,42 @@
==================================
``rexecd`` Remote Execution Server
==================================
``rexecd`` is the daemon that serves remote execution requests from the
``rexec`` client. For the IP families it listens on the rexec port
(``REXECD_PORT``, 512); for ``AF_RPMSG`` it listens on a corresponding
RPMsg socket name. It authenticates the request and runs the requested
command, piping its output back to the client.
By default ``rexecd`` spawns a detached worker thread per accepted
connection so that multiple sessions can run concurrently.
Usage
=====
.. code-block:: none
rexecd [-4|-6|-r] [-t]
Options
=======
``-4``
Specify the address family as ``AF_INET`` (IPv4). This is the default.
``-6``
Specify the address family as ``AF_INET6`` (IPv6).
``-r``
Specify the address family as ``AF_RPMSG``. This serves the daemon over
an RPMsg link instead of TCP/IP, allowing a remote processor in an AMP
system to execute commands. See :doc:`/components/drivers/special/rpmsg/concepts`
for details on RPMsg.
``-t``
Serve each connection inline in the main task instead of spawning a
per-connection worker thread. This avoids allocating the worker stack
(``CONFIG_NETUTILS_REXECD_STACKSIZE``) from the heap, which helps on
low-memory targets. With this option connections are served strictly
one at a time: a long-running or interactive command blocks the accept
loop until it finishes.

View file

@ -740,6 +740,50 @@ supported:
ifup eth0
.. _cmdid:
``id`` Show User and Group Identity
===================================
**Command Syntax**::
id
**Synopsis**. Print the real and effective user and group IDs for the
current NSH session in the form::
uid=<uid> euid=<euid> gid=<gid> egid=<egid>
File permission checks use the effective UID and GID.
On flat builds where NSH retains a real UID of zero, ``id`` may report
``uid=0`` even when the session is running as a non-root user. The
``euid`` and ``egid`` fields reflect the active session identity, and
the prompt marker (``#`` or ``$``) follows ``euid``.
This command is available only when ``CONFIG_SCHED_USER_IDENTITY`` is
enabled. It may be disabled with ``CONFIG_NSH_DISABLE_ID``.
**Related configuration**
=============================== =======================================
Option Purpose
=============================== =======================================
``CONFIG_SCHED_USER_IDENTITY`` Enable UID/GID tracking
``CONFIG_NSH_LOGIN_SETUID`` Set identity after login
``CONFIG_LIBC_PASSWD_FILE`` User database for name lookup
=============================== =======================================
**Example**::
nsh> su testuser
nsh$ id
uid=0 euid=1000 gid=0 egid=1000
nsh$ su root
Password:
nsh# id
uid=0 euid=0 gid=0 egid=0
.. _cmdinsmod:
``insmod`` Install an OS module
@ -1663,6 +1707,75 @@ NOTE: The ``shutdown`` command duplicates the behavior of the
**Synopsis**. Pause execution (sleep) for ``<sec>`` seconds.
.. _cmdsu:
``su`` Switch User Identity
===========================
**Command Syntax**::
su [<username>]
**Synopsis**. Switch the NSH session to the credentials of ``<username>``.
If no user name is provided, ``su`` defaults to ``root``.
Users with root privileges (effective UID or GID of zero) may switch to
any user without a password. Other users may switch to their own
identity without a password, or to another user after entering that
user's password (when login support is enabled).
When the real UID is still zero, NSH changes only the effective UID and
GID so that a later ``su root`` can restore root privileges after
password verification.
**Prompt update.** After a successful ``su``, NSH calls
``nsh_update_prompt()`` and changes the privilege marker in the prompt:
=================== ================================================
Marker Session
=================== ================================================
``#`` Effective UID is zero (root)
``$`` Effective UID is non-zero (non-root)
=================== ================================================
For the default prompt ``nsh>``, the marker replaces the character
before ``>`` (for example ``nsh$`` or ``nsh#``).
This command is available only when ``CONFIG_SCHED_USER_IDENTITY`` is
enabled. It may be disabled with ``CONFIG_NSH_DISABLE_SU``. User names
are looked up from the passwd database when ``CONFIG_LIBC_PASSWD_FILE``
is enabled. Password verification requires one of the NSH login options
(``CONFIG_NSH_LOGIN_PASSWD``, ``CONFIG_NSH_LOGIN_PLATFORM``, or
``CONFIG_NSH_LOGIN_FIXED``).
**Related configuration**
=============================== =======================================
Option Purpose
=============================== =======================================
``CONFIG_SCHED_USER_IDENTITY`` Enable UID/GID identity commands
``CONFIG_LIBC_PASSWD_FILE`` Resolve user names from ``/etc/passwd``
``CONFIG_NSH_LOGIN_SETUID`` Apply identity after login
``CONFIG_NSH_DISABLE_SU`` Disable the ``su`` command
=============================== =======================================
**Example**::
nsh> su testuser
nsh$ whoami
testuser
nsh$ su newuser
Password:
nsh$ whoami
newuser
nsh$ su root
Password:
nsh# whoami
root
nsh# su testuser
nsh$ whoami
testuser
.. _cmdtelnetd:
``telnetd`` Time Start the Telnet Daemon
@ -1933,6 +2046,37 @@ directory.
unless <local-path> is provided.
=================== =================================================
.. _cmdwhoami:
``whoami`` Show Effective User Name
===================================
**Command Syntax**::
whoami
**Synopsis**. Print the user name associated with the effective UID of
the current NSH session. If the name cannot be resolved from the passwd
database, ``whoami`` prints ``root`` when the effective UID is zero, or
the numeric UID otherwise.
The result should match the privilege marker shown in the NSH prompt
(``#`` for root, ``$`` for non-root) when
``CONFIG_SCHED_USER_IDENTITY`` is enabled.
This command is available only when ``CONFIG_SCHED_USER_IDENTITY`` is
enabled. It may be disabled with ``CONFIG_NSH_DISABLE_WHOAMI``.
**Example**::
nsh> su testuser
nsh$ whoami
testuser
nsh$ su root
Password:
nsh# whoami
root
.. _cmdxd:
``xd`` Hexadecimal Dump of Memory

View file

@ -25,6 +25,58 @@ login, the user will have access to the NSH session::
NuttShell (NSH)
nsh>
When ``CONFIG_NSH_LOGIN_SETUID`` is enabled (the default when
``CONFIG_SCHED_USER_IDENTITY`` is selected), NSH looks up the
authenticated user name in the passwd database and sets the session
identity after a successful login. See also ```id`` <#cmdid>`__,
```su`` <#cmdsu>`__, and ```whoami`` <#cmdwhoami>`__.
Session Identity and Prompt
===========================
When ``CONFIG_SCHED_USER_IDENTITY`` is enabled, NSH tracks the calling
task's real and effective UID/GID for the shell session. File
permission checks use the **effective** identity.
**Prompt markers.** After login or a successful ``su``, NSH updates the
command prompt to show the effective privilege level of the session:
=================== ================================================
Prompt marker Meaning
=================== ================================================
``#`` Effective UID is zero (root session)
``$`` Effective UID is non-zero (non-root session)
=================== ================================================
The marker replaces the character before the closing ``>`` in the
default prompt (for example, ``nsh>`` becomes ``nsh#`` or ``nsh$``), or
is appended when the configured prompt does not end with ``>``. The
prompt is refreshed by ``nsh_update_prompt()`` after ``su`` and after
login when ``CONFIG_NSH_LOGIN_SETUID`` is enabled.
**Flat builds.** NSH may retain a real UID of zero while only the
effective UID/GID are changed. In that case ``id`` can report
``uid=0 euid=1000`` after logging in as a normal user. Permission
checks and the prompt marker follow the effective identity.
**Example**::
login: testuser
password:
User Logged-in!
NuttShell (NSH)
nsh$ id
uid=0 euid=1000 gid=0 egid=1000
nsh$ whoami
testuser
nsh$ su root
Password:
nsh# id
uid=0 euid=0 gid=0 egid=0
nsh# whoami
root
After each failed login attempt, a delay can be set up. The purpose of
this delay is to discourage attempts to crack the password by brute
force. That delay is configured with::

View file

@ -0,0 +1,98 @@
==============================
``conntrack`` connection track
==============================
The ``conntrack`` command is used to display and monitor connection tracking
entries in the NuttX kernel. It is similar to Linux's ``conntrack`` tool.
Configuration
=============
- ``CONFIG_SYSTEM_CONNTRACK``
- ``CONFIG_NETLINK_NETFILTER``
The following additional options are available:
- ``CONFIG_SYSTEM_CONNTRACK_PRIORITY`` - Task priority
(default: 100)
- ``CONFIG_SYSTEM_CONNTRACK_STACKSIZE`` - Stack size
(default: ``DEFAULT_TASK_STACKSIZE``)
Usage
=====
.. code-block:: text
conntrack -L [-f family]
conntrack -E
Commands
========
``-L, --dump``
List all connection tracking entries.
``-E, --event``
Display a real-time event log of connection tracking changes.
Press Ctrl+C to stop monitoring.
Options
=======
``-f, --family PROTO``
Specify the L3 protocol family. Only valid with ``-L``.
Supported values:
- ``ipv4`` (default): Show IPv4 connection tracking entries.
- ``ipv6``: Show IPv6 connection tracking entries.
Output Format
=============
Each connection tracking entry is displayed in the following format:
.. code-block:: text
PROTO src=SRC_ADDR dst=DST_ADDR sport=SPORT dport=DPORT src=REPLY_SRC dst=REPLY_DST sport=REPLY_SPORT dport=REPLY_DPORT
For ICMP/ICMPv6 entries, the format uses ``type``, ``code``, and ``id``
instead of ``sport`` and ``dport``:
.. code-block:: text
icmp src=SRC_ADDR dst=DST_ADDR type=TYPE code=CODE id=ID src=REPLY_SRC dst=REPLY_DST type=REPLY_TYPE code=REPLY_CODE id=REPLY_ID
Event mode prefixes each entry with an event type:
- ``[NEW]``: A new connection tracking entry was created.
- ``[DESTROY]``: A connection tracking entry was removed.
Examples
========
List all IPv4 connection tracking entries:
.. code-block:: text
nsh> conntrack -L
List all IPv6 connection tracking entries:
.. code-block:: text
nsh> conntrack -L -f ipv6
Monitor connection tracking events in real-time:
.. code-block:: text
nsh> conntrack -E
[NEW] tcp src=10.0.0.1 dst=10.0.0.2 sport=12345 dport=80 src=10.0.0.2 dst=10.0.0.1 sport=80 dport=12345
[DESTROY] tcp src=10.0.0.1 dst=10.0.0.2 sport=12345 dport=80 src=10.0.0.2 dst=10.0.0.1 sport=80 dport=12345
See Also
========
- :doc:`../iptables/index`
- :doc:`../ip6tables/index`

View file

@ -0,0 +1,91 @@
====================================
``critmon`` critical section monitor
====================================
The ``critmon`` command displays critical section and pre-emption timing
information for all tasks and threads in the system. It reads from the
procfs ``critmon`` and ``status`` files for each process/thread.
Three commands are provided:
- ``critmon``: One-shot dump of critical section timing data.
- ``critmon_start``: Start the background monitoring daemon.
- ``critmon_stop``: Stop the background monitoring daemon.
The daemon periodically samples critical section usage at a configurable
interval (default: 2 seconds) and prints the timing information.
Configuration
=============
- ``CONFIG_SCHED_CRITMONITOR``: Enable the critical section monitor
in the kernel (required dependency).
- ``CONFIG_FS_PROCFS``: Enable procfs filesystem support.
- ``CONFIG_SYSTEM_CRITMONITOR``: Enable the critmon system tool.
The following additional options are available:
- ``CONFIG_SYSTEM_CRITMONITOR_DAEMON_STACKSIZE`` - Stack size for the
daemon task (default: 2048).
- ``CONFIG_SYSTEM_CRITMONITOR_DAEMON_PRIORITY`` - Priority for the
daemon task (default: 50).
- ``CONFIG_SYSTEM_CRITMONITOR_INTERVAL`` - Sampling interval in
seconds (default: 2).
- ``CONFIG_SYSTEM_CRITMONITOR_MOUNTPOINT`` - procfs mount point
(default: ``/proc``).
Usage
=====
.. code-block:: text
critmon
critmon_start
critmon_stop
Output Format
=============
The output shows a table with the following columns:
- **PRE-EMPTION CALLER**: The function that most recently enabled
pre-emption for this task.
- **CSECTION CALLER**: The function that most recently entered a
critical section.
- **RUN**: Maximum time spent in a critical section.
- **TIME**: Total accumulated critical section time.
- **PID**: Process/thread ID.
- **DESCRIPTION**: Task name (if ``CONFIG_TASK_NAME_SIZE > 0``).
Examples
========
One-shot dump of critical section timing:
.. code-block:: text
nsh> critmon
PRE-EMPTION CALLER CSECTION CALLER RUN TIME PID DESCRIPTION
nxtask_exit nxtask_init 0.000010000 0.000010000 0 Idle_Task
nxtask_init up_irq_save 0.000005000 0.000015000 1 hpwork 0x10001000
Start the monitoring daemon (prints every 2 seconds):
.. code-block:: text
nsh> critmon_start
Csection Monitor: Started: 5
Stop the monitoring daemon:
.. code-block:: text
nsh> critmon_stop
Csection Monitor: Stopping: 5
Csection Monitor: Stopped: 5
See Also
========
- :doc:`../stackmonitor/index`
- :doc:`../gprof/index`

View file

@ -0,0 +1,160 @@
==============================
``ip6tables`` IPv6 firewall
==============================
The ``ip6tables`` command is used to set up, maintain, and inspect the
tables of IPv6 packet filter rules in the NuttX kernel.
Configuration
=============
- ``CONFIG_SYSTEM_IP6TABLES``
- ``CONFIG_NET_IPTABLES``
- ``CONFIG_NET_IPv6``
The following additional options are available:
- ``CONFIG_SYSTEM_IPTABLES_PRIORITY`` - Task priority
(default: 100)
- ``CONFIG_SYSTEM_IPTABLES_STACKSIZE`` - Stack size
(default: ``DEFAULT_TASK_STACKSIZE``)
Usage
=====
.. code-block:: text
ip6tables -t table -[AD] chain rule-specification
ip6tables -t table -I chain [rulenum] rule-specification
ip6tables -t table -D chain rulenum
ip6tables -t table -P chain target
ip6tables -t table -[FL] [chain]
Commands
========
``-A, --append chain``
Append one or more rules to the end of the selected chain.
``-D, --delete chain [rulenum]``
Delete one or more rules from the selected chain. If ``rulenum`` is
specified, delete the rule at that position.
``-I, --insert chain [rulenum]``
Insert one or more rules at the given position in the selected chain.
If ``rulenum`` is not specified, the rule is inserted at position 1.
``-L, --list [chain]``
List all rules in the selected chain. If no chain is specified, all
chains in the table are listed.
``-F, --flush [chain]``
Delete all rules in the selected chain. If no chain is specified, all
chains in the table are flushed.
``-P, --policy chain target``
Set the policy for the built-in chain to the specified target. The
target must be ``ACCEPT`` or ``DROP``.
Options
=======
``-t, --table table``
Specify the table to manipulate. The default table is ``filter``.
Only the ``filter`` table is currently supported (requires
``CONFIG_NET_IPFILTER``).
``-j, --jump target``
Specify the target of the rule; i.e., what to do if the packet
matches it. The target can be ``ACCEPT``, ``DROP``, or a custom
target name.
``[!] -s, --source address[/mask]``
Source specification. ``address`` can be a network name, hostname,
network IPv6 address (with ``/mask``), or plain IPv6 address. The
mask is specified as a prefix length (e.g., ``/64``). The ``!``
argument inverts the match.
``[!] -d, --destination address[/mask]``
Destination specification. Same format as ``--source``.
``[!] -p, --protocol protocol``
Protocol of the rule or of the packet to check. The specified
protocol can be one of ``tcp``, ``udp``, ``icmp6``, ``icmpv6``,
``ipv6-icmp``, ``esp``, or ``all``, or a numeric protocol number.
The ``!`` argument inverts the match.
``[!] -i, --in-interface dev``
Name of an interface via which a packet was received. The ``!``
argument inverts the match.
``[!] -o, --out-interface dev``
Name of an interface via which a packet is going to be sent. The
``!`` argument inverts the match.
``[!] --sport, --source-port port[:port]``
Source port specification. Can be a single port or a port range
(e.g., ``1024:65535``). Only valid with ``-p tcp`` or ``-p udp``.
The ``!`` argument inverts the match.
``[!] --dport, --destination-port port[:port]``
Destination port specification. Same format as ``--source-port``.
``[!] --icmpv6-type type``
ICMPv6 type specification. Can be a numeric type (0-255). Only
valid with ``-p icmp6`` (or ``-p icmpv6``, ``-p ipv6-icmp``). The
``!`` argument inverts the match.
``!``
Inverts the following match criterion.
Examples
========
List all rules in the filter table:
.. code-block:: text
nsh> ip6tables -L
Append a rule to allow TCP traffic on port 22:
.. code-block:: text
nsh> ip6tables -A INPUT -p tcp --dport 22 -j ACCEPT
Insert a rule at position 1 to drop UDP traffic from a specific source:
.. code-block:: text
nsh> ip6tables -I INPUT 1 -s fc00::1 -p udp -j DROP
Delete a specific rule by rule number:
.. code-block:: text
nsh> ip6tables -D INPUT 1
Set the default policy for the INPUT chain to DROP:
.. code-block:: text
nsh> ip6tables -P INPUT DROP
Flush all rules in the INPUT chain:
.. code-block:: text
nsh> ip6tables -F INPUT
Use negation to match all protocols except TCP:
.. code-block:: text
nsh> ip6tables -A INPUT ! -p tcp -j ACCEPT
See Also
========
- :doc:`../iptables/index`

View file

@ -1,3 +1,168 @@
===============================
``iptables`` "iptables" command
===============================
=============================
``iptables`` IPv4 firewall
=============================
The ``iptables`` command is used to set up, maintain, and inspect the
tables of IPv4 packet filter rules in the NuttX kernel.
Configuration
=============
- ``CONFIG_SYSTEM_IPTABLES``
- ``CONFIG_NET_IPTABLES``
- ``CONFIG_NET_IPv4``
The following additional options are available:
- ``CONFIG_SYSTEM_IPTABLES_PRIORITY`` - Task priority
(default: 100)
- ``CONFIG_SYSTEM_IPTABLES_STACKSIZE`` - Stack size
(default: ``DEFAULT_TASK_STACKSIZE``)
- ``CONFIG_SYSTEM_IPTABLES_LOCK_FILE_PATH`` - Lock file
path to prevent concurrent overwrite (default: ``/tmp/iptables.lock``)
Usage
=====
.. code-block:: text
iptables -t table -[AD] chain rule-specification
iptables -t table -I chain [rulenum] rule-specification
iptables -t table -D chain rulenum
iptables -t table -P chain target
iptables -t table -[FL] [chain]
Commands
========
``-A, --append chain``
Append one or more rules to the end of the selected chain.
``-D, --delete chain [rulenum]``
Delete one or more rules from the selected chain. If ``rulenum`` is
specified, delete the rule at that position.
``-I, --insert chain [rulenum]``
Insert one or more rules at the given position in the selected chain.
If ``rulenum`` is not specified, the rule is inserted at position 1.
``-L, --list [chain]``
List all rules in the selected chain. If no chain is specified, all
chains in the table are listed.
``-F, --flush [chain]``
Delete all rules in the selected chain. If no chain is specified, all
chains in the table are flushed.
``-P, --policy chain target``
Set the policy for the built-in chain to the specified target. The
target must be ``ACCEPT`` or ``DROP``.
Options
=======
``-t, --table table``
Specify the table to manipulate. The default table is ``filter``.
The following tables are available:
- ``filter``: The default table for packet filtering (requires
``CONFIG_NET_IPFILTER``).
- ``nat``: Used for Network Address Translation (requires
``CONFIG_NET_NAT``). Only supports the
``MASQUERADE`` target with ``-o`` option.
``-j, --jump target``
Specify the target of the rule; i.e., what to do if the packet
matches it. The target can be ``ACCEPT``, ``DROP``, or a custom
target name.
``[!] -s, --source address[/mask]``
Source specification. ``address`` can be a network name, hostname,
network IP address (with ``/mask``), or plain IP address. The mask
can be a network prefix length (e.g., ``/24``) or a plain mask
(e.g., ``255.255.255.0``). The ``!`` argument inverts the match.
``[!] -d, --destination address[/mask]``
Destination specification. Same format as ``--source``.
``[!] -p, --protocol protocol``
Protocol of the rule or of the packet to check. The specified
protocol can be one of ``tcp``, ``udp``, ``icmp``, ``esp``, or
``all``, or a numeric protocol number. The ``!`` argument inverts
the match.
``[!] -i, --in-interface dev``
Name of an interface via which a packet was received. The ``!``
argument inverts the match.
``[!] -o, --out-interface dev``
Name of an interface via which a packet is going to be sent. The
``!`` argument inverts the match.
``[!] --sport, --source-port port[:port]``
Source port specification. Can be a single port or a port range
(e.g., ``1024:65535``). Only valid with ``-p tcp`` or ``-p udp``.
The ``!`` argument inverts the match.
``[!] --dport, --destination-port port[:port]``
Destination port specification. Same format as ``--source-port``.
``[!] --icmp-type type``
ICMP type specification. Can be a numeric type (0-255). Only valid
with ``-p icmp``. The ``!`` argument inverts the match.
``!``
Inverts the following match criterion.
Examples
========
List all rules in the filter table:
.. code-block:: text
nsh> iptables -L
Append a rule to allow TCP traffic on port 80:
.. code-block:: text
nsh> iptables -A INPUT -p tcp --dport 80 -j ACCEPT
Insert a rule at position 1 to drop UDP traffic from a specific source:
.. code-block:: text
nsh> iptables -I INPUT 1 -s 192.168.1.100 -p udp -j DROP
Delete a specific rule by rule number:
.. code-block:: text
nsh> iptables -D INPUT 1
Set the default policy for the INPUT chain to DROP:
.. code-block:: text
nsh> iptables -P INPUT DROP
Flush all rules in the INPUT chain:
.. code-block:: text
nsh> iptables -F INPUT
Use NAT with MASQUERADE on an output interface:
.. code-block:: text
nsh> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Use negation to match all protocols except TCP:
.. code-block:: text
nsh> iptables -A INPUT ! -p tcp -j ACCEPT

View file

@ -0,0 +1,212 @@
===============================
``sensortest`` sensor test tool
===============================
Reads data from a sensor driver via the uORB topic interface and prints the
output to the console. Useful for verifying that a sensor driver is working
correctly and producing valid data.
Configuration
=============
Enable the command with ``CONFIG_SYSTEM_SENSORTEST``. This option requires
``CONFIG_SENSORS`` and ``CONFIG_ENABLE_ALL_SIGNALS``.
The following configuration options are available:
``CONFIG_SYSTEM_SENSORTEST_PROGNAME``
Program name for the ``sensortest`` command. Default: ``sensortest``.
``CONFIG_SYSTEM_SENSORTEST_PRIORITY``
Task priority. Default: ``100``.
``CONFIG_SYSTEM_SENSORTEST_STACKSIZE``
Stack size. Default: ``DEFAULT_TASK_STACKSIZE``.
Usage
=====
.. code-block:: console
nsh> sensortest [-i <interval>] [-b <latency>] [-n <count>] <sensor_name>
Options
=======
``-i <interval>``
Data output period in microseconds. Controls how often the sensor is
polled for new data. Optional. Default: ``1000000`` (1 second).
``-b <latency>``
Maximum report latency in microseconds. When set to a non-zero value,
the sensor may batch multiple readings and deliver them at once.
Optional. Default: ``0`` (no batching).
``-n <count>``
Number of data samples to read before exiting. When set to ``0``,
the command runs continuously until interrupted. Optional.
Default: ``0`` (unlimited).
``-h``
Print help message and exit.
Commands
========
``<sensor_name>``
The sensor node name without the ``sensor_`` prefix and ``/dev/uorb/``
path. For example, use ``accel`` to read from ``/dev/uorb/sensor_accel``.
Supported Sensors
=================
The following sensor types are supported:
.. list-table::
:header-rows: 1
:widths: 25 25 50
* - Name
- Data Type
- Description
* - ``accel``
- vec3 (x, y, z)
- Accelerometer
* - ``baro``
- valf2
- Barometer (pressure, temperature)
* - ``cap``
- cap
- Capacitance
* - ``co2``
- valf
- CO2 concentration
* - ``dust``
- valf
- Dust particle concentration
* - ``ecg``
- ecg
- Electrocardiogram
* - ``force``
- force
- Force sensor
* - ``gnss``
- gnss
- GNSS position
* - ``gnss_satellite``
- gnss_satellite
- GNSS satellite info
* - ``gyro``
- vec3 (x, y, z)
- Gyroscope
* - ``hall``
- valb
- Hall effect sensor
* - ``hbeat``
- valf
- Heartbeat
* - ``hcho``
- valf
- Formaldehyde concentration
* - ``hrate``
- valf
- Heart rate
* - ``humi``
- valf
- Humidity
* - ``impd``
- valf2
- Impedance
* - ``ir``
- valf
- Infrared
* - ``light``
- valf
- Ambient light
* - ``mag``
- vec3 (x, y, z)
- Magnetometer
* - ``noise``
- valf
- Noise level
* - ``ots``
- vali2
- Optical tracking speed
* - ``ph``
- valf
- pH value
* - ``pm10``
- valf
- PM10 particulate matter
* - ``pm1p0``
- valf
- PM1.0 particulate matter
* - ``pm25``
- valf
- PM2.5 particulate matter
* - ``ppgd``
- ppgd
- PPG (photoplethysmography) data
* - ``ppgq``
- ppgq
- PPG quality
* - ``prox``
- valf
- Proximity
* - ``rgb``
- valf3
- RGB color sensor
* - ``velocity``
- velocity
- Velocity sensor
* - ``temp``
- valf
- Temperature
* - ``tvoc``
- valf
- Total volatile organic compounds
* - ``uv``
- valf
- Ultraviolet
Examples
========
Read accelerometer data at the default 1-second interval:
.. code-block:: console
nsh> sensortest accel
accel: timestamp:1234567890 x:0.12 y:-0.03 z:9.81, temperature:25.50
accel: timestamp:1235567890 x:0.11 y:-0.04 z:9.80, temperature:25.51
^C
Read gyroscope data at 100ms intervals, 10 samples:
.. code-block:: console
nsh> sensortest -i 100000 -n 10 gyro
gyro: timestamp:1234567890 x:0.01 y:0.02 z:0.00, temperature:26.00
...
Read temperature sensor with batching enabled:
.. code-block:: console
nsh> sensortest -b 5000000 temp
temp: timestamp:1234567890 value:25.50
...
Notes
=====
- The command reads from ``/dev/uorb/sensor_<name>`` using the uORB
subscriber interface. Ensure the corresponding sensor driver is
enabled and the uORB topic is published.
- The command runs continuously until interrupted with ``Ctrl-C``
(``SIGINT``) unless a sample count is specified with ``-n``.
- The ``-b`` (latency) option controls batching behavior. When set to
a non-zero value, the sensor driver may buffer multiple readings and
deliver them together, reducing the number of wake-ups.
- The timestamp field in the output is provided by the sensor driver
and uses the system monotonic clock.

View file

@ -1,3 +1,84 @@
===========================
``tcpdump`` tcpdump command
===========================
Captures network packets from a specified interface and writes them to a file
in `pcap <https://www.tcpdump.org/>`__ format. The resulting capture file can
be analyzed with tools such as Wireshark or ``tcpdump`` on a host machine.
Configuration
=============
Enable the command with ``CONFIG_SYSTEM_TCPDUMP``. This option requires
``CONFIG_NET_PKT`` (raw packet socket support) and automatically selects
``CONFIG_SYSTEM_ARGTABLE3`` for command-line argument parsing.
The following configuration options are available:
``CONFIG_SYSTEM_TCPDUMP_PROGNAME``
Program name for the ``tcpdump`` command. Default: ``tcpdump``.
``CONFIG_SYSTEM_TCPDUMP_PRIORITY``
Task priority. Default: ``100``.
``CONFIG_SYSTEM_TCPDUMP_STACKSIZE``
Stack size. Default: ``4096``.
Usage
=====
.. code-block:: console
nsh> tcpdump -i <interface> -w <file> [-s <snaplen>]
Options
=======
``-i <interface>``, ``--interface <interface>``
Network interface to capture from (e.g. ``eth0``). Required.
``-w <file>``
Path to the output pcap file. Required.
``-s <snaplen>``, ``--snapshot-length <snaplen>``
Maximum number of bytes to capture per packet. Optional.
Default: ``262144``.
Examples
========
Capture all packets on ``eth0`` and save to a file:
.. code-block:: console
nsh> tcpdump -i eth0 -w /tmp/capture.pcap
^C
Capture with a limited snapshot length:
.. code-block:: console
nsh> tcpdump -i eth0 -w /tmp/capture.pcap -s 1500
^C
Copy the capture file to a host machine for analysis with Wireshark:
.. code-block:: console
nsh> cp /tmp/capture.pcap /mnt/capture.pcap
Notes
=====
- The output file uses the pcap format (version 2.4, nanosecond resolution)
which is compatible with Wireshark, ``tcpdump``, and other standard capture
analysis tools.
- The command captures on the specified interface until interrupted with
``Ctrl-C`` (``SIGINT``).
- The link-layer type is detected automatically: ``LINKTYPE_ETHERNET`` (1)
for Ethernet interfaces, or ``LINKTYPE_RAW`` (101) for other interfaces
such as SLIP or tun.
- Packets are timestamped using ``CLOCK_REALTIME``. Ensure the system clock
is set correctly for meaningful timestamps in the capture file.
- The capture requires ``CONFIG_NET_PKT`` to be enabled for raw packet
socket support.

View file

@ -13,7 +13,7 @@ This function will be called by the ``system/usbmsc`` indirectly via the ``board
block device drivers. For examples of the implementation of
``board_usbmsc_initialize()`` see
``boards/arm/lpc214x/mcu123-lpc214x/src/up_usbmsc.c`` or
``boards/arm/stm32/stm3210e-eval/src/usbmsc.c``.
``boards/arm/stm32f1/stm3210e-eval/src/usbmsc.c``.
Configuration options:

View file

@ -62,6 +62,7 @@ Authentication and Hashing Algorithms
- CRYPTO_SHA1_HMAC
- SHA-2 HMAC:
- CRYPTO_SHA2_224_HMAC (224-bit)
- CRYPTO_SHA2_256_HMAC (256-bit)
- CRYPTO_SHA2_384_HMAC (384-bit)
- CRYPTO_SHA2_512_HMAC (512-bit)

View file

@ -62,7 +62,7 @@ kbd-codec layer.
``board_kmatrix_initialize("/dev/keypad0")``).
**Reference Implementation (STM32F4Discovery)**. The current reference
is in ``boards/arm/stm32/common/src/stm32_kmatrix_gpio.c``:
is in ``boards/arm/common/stm32/src/stm32_kmatrix_gpio.c``:
- Rows: ``BOARD_KMATRIX_ROW0..3`` (outputs)
- Columns: ``BOARD_KMATRIX_COL0..2`` (inputs with pull-up)

View file

@ -53,7 +53,7 @@ kbd-codec layer.
``board_mpr121_initialize(0, 1)`` for ``/dev/keymap0`` and ``i2c1``).
**Reference Implementation (STM32F4Discovery)**. The current reference
is in ``boards/arm/stm32/common/src/stm32_mpr121.c``:
is in ``boards/arm/common/stm32/src/stm32_mpr121.c``:
- Keymap: 4x3 keypad layout
- Registration: ``board_mpr121_initialize()`` calls

View file

@ -23,7 +23,7 @@ It uses a kind of "polymorphism" in C to allow the driver to get
access to the functions responsible to attach and enable the
interrupt and to get the status of the pin.
See ``include/nuttx/input/sbutton.h``
and ``boards/arm/stm32/common/src/stm32_sbutton.c`` to understand
and ``boards/arm/common/stm32/src/stm32_sbutton.c`` to understand
better how it works. But basically the board file (config data)
creates a struct when the first field (variable) is the config
struct used the but SButton driver (``drivers/input/sbutton.c``).

View file

@ -59,7 +59,7 @@ Files supporting USERLED can be found in the following locations:
Something important to note is that your board initialization code (normally named ``<arch>_bringup.c`` should call the function to register the driver.
For stm32f4discovery board this initialization code is placed at ``boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c`` and this is the block responsible to initialize the subsystem:
For stm32f4discovery board this initialization code is placed at ``boards/arm/stm32f4/stm32f4discovery/src/stm32_bringup.c`` and this is the block responsible to initialize the subsystem:
.. code-block:: C

View file

@ -35,11 +35,39 @@ Serial Device Drivers
Also, you can customize:
``TTY_LAUNCH_ARGS`` ``TTY_LAUNCH_PRIORITY`` ``TTY_LAUNCH_STACKSIZE``
- **Job control / controlling terminal**. When ``CONFIG_TTY_SIGINT``
or ``CONFIG_TTY_SIGTSTP`` is enabled, the TTY layer can generate
``SIGINT`` (Ctrl-C) and ``SIGTSTP`` (Ctrl-Z) for a foreground task.
NuttX does not implement POSIX sessions or process groups, so the
foreground process group is collapsed onto a single PID stored in
the driver (``pgrp == pid``, one member per group); the signal is
delivered with ``nxsig_kill(pid, signo)``.
The following terminal ``ioctl`` commands manage this PID:
- ``TIOCSCTTY`` makes the terminal the controlling terminal. The
``arg`` is treated as a flag: a value of ``0`` selects the
calling task (the POSIX convention used by, e.g., dropbear and
socat), while a positive value is honored as the target PID (the
NuttX convention used by NSH to register a foreground command it
has just spawned).
- ``TIOCNOTTY`` gives up the controlling terminal.
- ``TIOCGPGRP`` / ``TIOCGSID`` return the foreground process group /
session leader PID.
- ``TIOCSPGRP`` sets the foreground process group PID (a value of
``0`` selects the calling task).
The C library exposes these through ``tcgetpgrp()``, ``tcsetpgrp()``,
``tcgetsid()``, ``setsid()``, ``getsid()`` and ``setpgid()``. Because
sending a signal to a process group (``kill(-pgrp, signo)``) is not
supported, TTY signals always target the single foreground PID rather
than an entire group.
- **User Access**. Serial drivers are, ultimately, normal
`character drivers <#chardrivers>`__ and are accessed as other
character drivers.
- **Examples**: ``arch/arm/src/stm32/stm32_serial.c``,
- **Examples**: ``arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c``,
``arch/arm/src/lpc214x/lpc214x_serial.c``,
``arch/z16/src/z16f/z16f_serial.c``, etc.

View file

@ -109,7 +109,7 @@ To enable the capture driver, enable the following configuration options:
* ``CONFIG_CAPTURE`` - Enable the capture driver framework
* ``CONFIG_CAPTURE_NOTIFY`` - Enable signal notification support for edge events
* ``CONFIG_FAKE_CAPTURE`` - Enable fake capture driver for testing (generates 10Hz signal with 50% duty cycle)
* ``CONFIG_STM32H7_TIM4_CAP`` (for STM32H7 Timer 4, platform-specific)
* ``CONFIG_STM32_TIM4_CAP`` (for STM32H7 Timer 4, platform-specific)
The ``CONFIG_CAPTURE`` option enables the lower-half driver and registers
the ``/dev/capture`` device.

View file

@ -85,7 +85,7 @@ LCDs
Generic LCD driver for LCDs based on the Solomon Systech
SSD1289 LCD controller. Think of this as a template for an LCD driver
that you will probably have to customize for any particular LCD
hardware. (See also boards/arm/stm32/hymini-stm32v/src/ssd1289.c below).
hardware. (See also boards/arm/stm32f1/hymini-stm32v/src/ssd1289.c below).
- ``st7567.c``
@ -120,7 +120,7 @@ OLEDs
OLED Display Module, UUG-2864AMBAG01, Univision Technology Inc.
Based on the SH1101A controller. Example usage::
boards/arm/stm32/stm32f4discovery
boards/arm/stm32f4/stm32f4discovery
boards/arm/lpc214x/zp214xpa
- ``ug-9664hswag01.c``
@ -140,7 +140,7 @@ OLEDs
Densitron Technologies DD-12864WO-4A which is based on SSD1309 LCD
controller. Example usage::
boards/arm/stm32/stm32f4discovery
boards/arm/stm32f4/stm32f4discovery
boards/arm/sam34/sam4l-xplained
Segment LCDS (SLCDs)

View file

@ -29,7 +29,7 @@ SDIO Device Drivers
#. Provide that instance to the initialization method of the
higher level device driver.
- **Examples**: ``arch/arm/src/stm32/stm32_sdio.c`` and
- **Examples**: ``arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c`` and
``drivers/mmcsd/mmcsd_sdio.c``
Implementing an SDIO lower-half

View file

@ -19,7 +19,7 @@ USB Device-Side Drivers
``arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c``,
``arch/arm/src/lpc214x/lpc214x_usbdev.c``,
``arch/arm/src/lpc313x/lpc313x_usbdev.c``, and
``arch/arm/src/stm32/stm32_usbdev.c``.
``arch/arm/src/common/stm32/stm32_usbdev_m3m4_v1.c``.
- ``struct usbdevclass_driver_s``. Each USB device class
driver must implement an instance of

View file

@ -17,7 +17,7 @@ USB Host-Side Drivers
**Examples**: ``arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c``,
``arch/arm/src/stm32/stm32_otgfshost.c``,
``arch/arm/src/common/stm32/stm32_otgfshost_m3m4_v1.c``,
``arch/arm/src/sama5/sam_ohci.c``, and
``arch/arm/src/sama5/sam_ehci.c``.

View file

@ -18,7 +18,7 @@ well as file operations (``fopen()``, ``fclose()``, etc).
<https://github.com/apache/nuttx/issues/15840>`_.
..note::
.. note::
If your littlefs setup is experiencing crashes when you boot, try
troubleshooting by tweaking the ``BLOCK_SIZE_FACTOR`` options in Kconfig. A
@ -29,3 +29,31 @@ well as file operations (``fopen()``, ``fclose()``, etc).
The littlefs support on NuttX only works with mtd drivers, for storage
devices such as flash chips, SD cards and eMMC. Performance on SD cards and
eMMC devices is worse than flash.
User identity and permissions
=============================
When both ``CONFIG_FS_PERMISSION`` and ``CONFIG_FS_LITTLEFS_ATTR_UPDATE`` are
enabled, littlefs stores owner, group, and mode in per-file custom attributes.
This requires :ref:`user-identity` (``CONFIG_SCHED_USER_IDENTITY``).
**Metadata.** ``chmod``/``chown`` (via ``chstat``) update the stored mode,
UID, and GID. ``stat`` and ``ls -l`` read them back.
**Creation.** New files and directories are created with the effective UID and
GID of the creating task.
**Open checks.** ``open()`` enforces POSIX permission bits using the caller's
effective identity:
* Existing files: each path component must grant search (``X_OK``) permission;
the final component must grant the access requested by ``oflags``.
* ``O_CREAT`` on a non-existent file: the parent directory must grant write and
search permission.
**Directory reads.** ``opendir()`` requires read and search permission on the
target directory.
Files created before permission support was enabled, or without stored
attributes, default to mode ``0777`` until ``chmod``/``chown`` sets explicit
metadata.

View file

@ -227,7 +227,7 @@ squash before submitting the Pull Request:
.. code-block:: bash
arch/arm/stm32/: Add arch support for stm32 platform
arch/arm/stm32f4/: Add arch support for stm32f4 platform
This patch adds initial support for stm32 platform. Please read
the documentation included for more details how to wire the display.

View file

@ -12,4 +12,38 @@ the board configuration:
.. code-block:: c
CONFIG_ARCH_STACKDUMP=n
CONFIG_ARCH_STACKDUMP=n
Reducing the Crash Dump Verbosity
=================================
In addition to ``CONFIG_ARCH_STACKDUMP``, which controls whether the
architecture-specific stack dump is produced at all, two finer-grained
options are available to tune how verbose the assertion / crash output
from ``sched/misc/assert.c`` is. Disabling them is useful to reduce
flash usage on small targets and to keep the crash log short.
Both options default to ``y`` unless ``CONFIG_DEFAULT_SMALL`` is
selected, in which case they default to ``n``.
CONFIG_SCHED_DUMP_TASKS
-----------------------
Controls whether the per-task information table (task list with PID,
priority, scheduling policy, stack usage, state, etc.) is printed as
part of the crash dump.
.. code-block:: c
CONFIG_SCHED_DUMP_TASKS=n /* Omit the task table from the crash dump */
CONFIG_SCHED_DUMP_STACK
-----------------------
Controls whether the contents of each stack (IRQ / kernel / user) are
dumped as hex words. When disabled, only the base address and size of
each stack are printed; the stack memory itself is not dumped.
.. code-block:: c
CONFIG_SCHED_DUMP_STACK=n /* Omit the hex stack contents from the dump */

View file

@ -28,7 +28,7 @@ Custom Clock Configuration
The ``configs/vsn/`` configuration does something like you say. It skips the
initial clock configuration by defining
``CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y``. Then the normal clock
configuration logic in ``arch/arm/src/stm32/stm32_rcc.c`` is not executed.
configuration logic in ``arch/arm/src/stm32f4/stm32_rcc.c`` is not executed.
Instead, the "custom" clock initialization at ``configs/vsn/src/sysclock.c``
is called:
@ -83,7 +83,7 @@ are hardcoded in the board.h header file. So you have two options:
2. **Variable Peripheral Clocking**. You can make the peripheral clocking
variable. I had to do this for the SAMA5Dx family. Look at
``boards/arm/stm32/sama5d4-ek/include/board_sdram.h`` for example. Notice
``boards/arm/sama5/sama5d4-ek/include/board_sdram.h`` for example. Notice
that the frequencies are not constants, but function calls:
.. code-block:: c

View file

@ -96,3 +96,44 @@ They should be set to suit your board name and directory location.
.. Note::
If you subsequently run a ``make distclean`` operation, then these settings will be lost.
They should be added back before building, and/or before running ``make menuconfig``.
Kconfig flags
-------------
Some boards make using of Kconfig ``ARCH_HAVE_*`` flags in order to be able to
select certain features. For example, ``ARCH_HAVE_LEDS`` is a necessary flag for
enabling ``CONFIG_ARCH_LEDS=y`` because it tells the build system that the board
has LEDs. Selecting ``ARCH_HAVE_*`` flags happens inside the NuttX build
system, so it is not accessible to custom boards. If you need to enable these
flags, then you should select them manually with the ``BOARD_CUSTOM_*`` options:
* ``BOARD_CUSTOM_LEDS`` selects ``ARCH_HAVE_LEDS``
* ``BOARD_CUSTOM_BUTTONS`` selects ``ARCH_HAVE_BUTTONS``
* ``BOARD_CUSTOM_IRQBUTTONS`` selects ``ARCH_HAVE_IRQBUTTONS``
* ``BOARD_CUSTOM_INTERRUPT`` selects ``ARCH_PHY_INTERRUPT``
If there are any other ``ARCH_HAVE_*`` selectors you cannot access but need for
your custom board, please open an issue!
Kconfig file
------------
You may have noticed that in-tree boards typically surround their board-level
Kconfig logic with something like:
.. code:: kconfig
if ARCH_BOARD_BOARDNAME
endif # ARCH_BOARD_BOARDAME
You should **not** do this for custom boards; just write your Kconfig logic
without the guard. However, it is still good practice to prefix your custom
Kconfig options with the board name:
.. code:: kconfig
config BOARDNAME_MYOPTION
bool "My custom option"
default n
---help---
This is my custom option for my custom board.

View file

@ -86,7 +86,7 @@ behave as follows at Nuttx start-up time:
``CONFIG_ETC_ROMFS=y`` in the NuttX configuration file. They might
provide useful examples:
- ``boards/arm/stm32/hymini-stm32v/nsh2``
- ``boards/arm/stm32f1/hymini-stm32v/nsh2``
- ``boards/arm/dm320/ntosd-dm320/nsh``
- ``boards/sim/sim/sim/nsh``
- ``boards/sim/sim/sim/nsh2``

View file

@ -61,4 +61,5 @@ Guides
optee.rst
qemu_tips.rst
lwl.rst
stm32_ports.rst

View file

@ -218,7 +218,7 @@ Board Configurations
At present, there are three board configuration that are pre-configured to
use IPv6: ``nuttx/boards/arm/tiva/dk-tm4c129x/configs/ipv6``,
``nuttx/boards/arm/stm32/stm32f4discovery/ipv6``, and
``nuttx/boards/arm/stm32f4/stm32f4discovery/ipv6``, and
``nuttx/boards/arm/tiva/tm4c1294-launchpad/configs/ipv6``. These default
configurations have only IPv6 enabled. But the `README` files at in those
board directories describes how to enable `both` IPv4 and IPv6 simultaneously.
@ -345,4 +345,4 @@ the network utils (``netutils``).
* Netutils: The network utilities in ``apps/netutils`` have been adapted to
work with IPv6: DHCP, FTP, TFTP, Telnet, etc. Support for managing IPv6
address have been included in the ``netlib``, but nothing else has yet been
updated.
updated.

View file

@ -45,7 +45,7 @@ must be satisfied:
are implemented for Atmel SAM4/4, SAMA5 families, and for the STMicro STM32.
See ``nuttx/arch/arm/src/sam34/sam_emac.c``,
``nuttx/arch/arm/src/sam34/sam_emaca.c``, ``sam_emacb.c``, and ``sam_gmac.c``,
and ``nuttx/arch/arm/src/stm32/stm32_eth.c``.
and ``nuttx/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c``.
- ``CONFIG_ARCH_PHY_INTERRUPT``
This is not a user-selectable option. Rather, it is set when selecting a board
that supports PHY interrupts. In most architectures, the PHY interrupt is not

View file

@ -52,7 +52,7 @@ Precautions
1.If you need to implement the ofloader on a different board,
you will need to read the `wiki <https://wiki.segger.com/SEGGER_Flash_Loader>`
and refer to the implementation of "ofloader.ld" linker script located
in the "boards/arm/stm32/stm32f429i-disco/scripts" directory.
in the "boards/arm/stm32f4/stm32f429i-disco/scripts" directory.
This linker script defines how the different sections of the NuttX image are placed in memory.
You should configure the corresponding sections to be located in RAM,
where the J-Link can write the image correctly.

View file

@ -40,7 +40,7 @@ compatible with the example provided here:
In this example, let's illustrate this using an STM32F4-Discovery
configuration. We will assume that you have modified the
``boards/arm/stm32/stm32fdiscovery/src/stm32_bringup.c`` file, adding the
``boards/arm/stm32f4/stm32f4discovery/src/stm32_bringup.c`` file, adding the
following:
.. code-block:: c

View file

@ -191,7 +191,7 @@ An Example
There is a good example in the STM32 Ethernet driver. The STM32 F7
Ethernet driver (``arch/arm/src/stm32f7/stm32_ethernet.c``) derives
directly from the STM32 F4 Ethernet driver
(``arch/arm/src/stm32/stm32_eth.c``). These two Ethernet MAC peripherals
(``arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c``). These two Ethernet MAC peripherals
are nearly identical. Only changes that are a direct consequence of the
STM32 F7 D-Cache were required to make the driver work on the STM32 F7.
Those changes are summarized below.
@ -262,7 +262,7 @@ the buffers to the Cortex-M7 D-Cache line size:
#define DMA_ALIGN_UP(n) (((n) + DMA_BUFFER_MASK) & ~DMA_BUFFER_MASK)
#define DMA_ALIGN_DOWN(n) ((n) & ~DMA_BUFFER_MASK)
#ifndef CONFIG_STM32F7_ETH_ENHANCEDDESC
#ifndef CONFIG_STM32_ETH_ENHANCEDDESC
# define RXDESC_SIZE 16
# define TXDESC_SIZE 16
#else
@ -274,10 +274,10 @@ the buffers to the Cortex-M7 D-Cache line size:
#define TXDESC_PADSIZE DMA_ALIGN_UP(TXDESC_SIZE)
#define ALIGNED_BUFSIZE DMA_ALIGN_UP(ETH_BUFSIZE)
#define RXTABLE_SIZE (STM32F7_NETHERNET * CONFIG_STM32F7_ETH_NRXDESC)
#define TXTABLE_SIZE (STM32F7_NETHERNET * CONFIG_STM32F7_ETH_NTXDESC)
#define RXTABLE_SIZE (STM32F7_NETHERNET * CONFIG_STM32_ETH_NRXDESC)
#define TXTABLE_SIZE (STM32F7_NETHERNET * CONFIG_STM32_ETH_NTXDESC)
#define RXBUFFER_SIZE (CONFIG_STM32F7_ETH_NRXDESC * ALIGNED_BUFSIZE)
#define RXBUFFER_SIZE (CONFIG_STM32_ETH_NRXDESC * ALIGNED_BUFSIZE)
#define RXBUFFER_ALLOC (STM32F7_NETHERNET * RXBUFFER_SIZE)
#define TXBUFFER_SIZE (STM32_ETH_NFREEBUFFERS * ALIGNED_BUFSIZE)
@ -366,8 +366,8 @@ Here is an example where the RX descriptors are invalidated:
for (i = 0;
(rxdesc->rdes0 & ETH_RDES0_OWN) == 0 &&
i < CONFIG_STM32F7_ETH_NRXDESC &&
priv->inflight < CONFIG_STM32F7_ETH_NTXDESC;
i < CONFIG_STM32_ETH_NRXDESC &&
priv->inflight < CONFIG_STM32_ETH_NTXDESC;
i++)
{
...

View file

@ -177,10 +177,10 @@ Files and Directories
Here is a summary of directories and files used by the STM32F4Discovery
protected build:
* ``boards/arm/stm32/stm32f4discovery/configs/kostest``. This is the kernel
* ``boards/arm/stm32f4/stm32f4discovery/configs/kostest``. This is the kernel
mode OS test configuration. The two standard configuration files
can be found in this directory: (1) ``defconfig`` and (2) ``Make.defs``.
* ``boards/arm/stm32/stm32f4discovery/kernel``. This is the first past
* ``boards/arm/stm32f4/stm32f4discovery/kernel``. This is the first past
build directory. The Makefile in this directory is invoked to
produce the pass1 object (``nuttx_user.elf`` in this case). The
second pass object is created by ``arch/arm/src/Makefile``. Also
@ -188,7 +188,7 @@ protected build:
contains a header that includes information need by the kernel
blob in order to interface with the user-code. That header is
defined in by this file.
* ``boards/arm/stm32/stm32f4discovery/scripts``. Linker scripts for
* ``boards/arm/stm32f4/stm32f4discovery/scripts``. Linker scripts for
the kernel mode build are found in this directory. This includes
(1) ``memory.ld`` which hold the common memory map, (2) ``user-space.ld``
that is used for linking the pass1 user-mode blob, and (3)
@ -314,11 +314,11 @@ Comparing the "Flat" Build Configuration with the Protected Build Configuration
===============================================================================
Compare, for example the configuration
``boards/arm/stm32/stm32f4discovery/configs/ostest`` and the
configuration ``boards/arm/stm32/stm32f4discovery/configs/kostest``.
``boards/arm/stm32f4/stm32f4discovery/configs/ostest`` and the
configuration ``boards/arm/stm32f4/stm32f4discovery/configs/kostest``.
These two configurations are identical except that one builds a
"flat" version of OS test and the other builds a kernel version
of the OS test. See the file ``boards/arm/stm32/stm32f4discovery/README.txt``
of the OS test. See the file ``boards/arm/stm32f4/stm32f4discovery/README.txt``
for more details about those configurations.
The configurations can be compared using the ``cmpconfig`` tool:
@ -328,7 +328,7 @@ The configurations can be compared using the ``cmpconfig`` tool:
cd tools
make -f Makefile.host cmpconfig
cd ..
tools/cmpconfig boards/arm/stm32/stm32f4discovery/configs/ostest/defconfig boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig
tools/cmpconfig boards/arm/stm32f4/stm32f4discovery/configs/ostest/defconfig boards/arm/stm32f4/stm32f4discovery/configs/kostest/defconfig
Here is a summary of the meaning of all of the important differences in the
configurations. This should be enough information for you to convert any
@ -337,7 +337,7 @@ configuration from a "flat" to a protected build:
* ``CONFIG_BUILD_2PASS=y``. This enables the two pass build.
* ``CONFIG_BUILD_PROTECTED=y``. This option enables the "two pass"
protected build.
* ``CONFIG_PASS1_BUILDIR="boards/arm/stm32/stm32f4discovery/kernel"``.
* ``CONFIG_PASS1_BUILDIR="boards/arm/stm32f4/stm32f4discovery/kernel"``.
This tells the build system the (relative) location of the pass1 build directory.
* ``CONFIG_PASS1_OBJECT=""``. In some "two pass" build configurations,
the build system need to know the name of the first pass object.
@ -382,7 +382,7 @@ configuration from a "flat" to a protected build:
These includes such things as initializing device drivers.
These same initialization steps must be performed in kernel
mode for the protected build and ``CONFIG_BOARD_LATE_INITIALIZE``.
See ``boards/arm/stm32/stm32f4discovery/src/up_boot.c`` for an
See ``boards/arm/stm32f4/stm32f4discovery/src/up_boot.c`` for an
example of such board initialization code.
Architecture-Specific Options:
@ -409,8 +409,8 @@ Size Expansion
The protected build will, or course, result in a FLASH image that is
larger than that of the corresponding "flat" build. How much larger?
I don't have the numbers in hand, but you can build
``boards/arm/stm32/stm32f4discovery/configs/nsh`` and
``boards/arm/stm32/stm32f4discovery/configs/kostest`` and compare
``boards/arm/stm32f4/stm32f4discovery/configs/nsh`` and
``boards/arm/stm32f4/stm32f4discovery/configs/kostest`` and compare
the resulting binaries for yourself using the ``size`` command.
Increases in size are expected because:

View file

@ -119,7 +119,7 @@ nucleo-h743zi
=============
Renode doesn't support ``PWR_CSR1_ACTVOSRDY`` bit so we have to disable
it with ``CONFIG_STM32H7_PWR_IGNORE_ACTVOSRDY=y``.
it with ``CONFIG_STM32_PWR_IGNORE_ACTVOSRDY=y``.
Renode script::

View file

@ -202,7 +202,7 @@ Most ARMv7-M architectures support two mechanism for handling interrupts:
``CONFIG_ARMV7M_CMNVECTOR=y`` that can be found in
``arch/arm/src/armv7-m/``, and
* MCU-specific interrupt handling logic. For the
STM32, this logic can be found at ``arch/arm/src/stm32/gnu/stm32_vectors.S``.
STM32, this logic can be found at ``arch/arm/src/stm32f4/gnu/stm32_vectors.S``.
The `common` vector logic is slightly more efficient,
the MCU-specific logic is slightly more flexible.
@ -229,7 +229,7 @@ This technical approach requires changes to three files:
define ``only`` the small set of 20 ``mapped`` IRQ numbers in
the range from 0 through 19. It would also set ``NR_IRQS``
to the value 20.
* A new header file at ``arch/arm/src/stm32/hardware``, say
* A new header file at ``arch/arm/src/stm32f4/hardware``, say
``xyz_vector.h``. It would be similar to the other vector
definitions files in that directory: It will consist
of a sequence of 100 ``VECTOR`` and ``UNUSED`` macros. It will
@ -248,7 +248,7 @@ This has all been replaced with the common vector handling at
Vector Definitions
==================
In ``arch/arm/src/stm32/gnu/stm32_vector.S``, notice that the
In ``arch/arm/src/stm32f4/gnu/stm32_vectors.S``, notice that the
``xyz_vector.h`` file will be included twice. Before each
inclusion, the macros ``VECTOR`` and ``UNUSED`` are defined.
@ -290,7 +290,7 @@ file like this:
...
Where the value of ``STM32_IRQ_USART1`` was defined to
be 12 in the ``arch/arm/include/stm32/xyz_irq.h`` header
be 12 in the ``arch/arm/include/stm32f4/xyz_irq.h`` header
file. When ``xyz_vector.h`` is included by ``stm32_vectors.S``
with the above definitions for ``VECTOR`` and ``UNUSED``, the
following would result:
@ -349,7 +349,7 @@ second time the ``xzy_vector.h`` is included by ``stm32_vectors.S``:
In the above USART1 example, a single handler would be
generated that will provide the IRQ number 12. Remember
that 12 is the expansion of the macro ``STM32_IRQ_USART1``
that is provided in the ``arch/arm/include/stm32/xyz_irq.h``
that is provided in the ``arch/arm/include/stm32f4/xyz_irq.h``
header file:
.. code-block:: asm

View file

@ -0,0 +1,975 @@
===========
STM32 ports
===========
This page records the STM32 families supported by the NuttX ARM port and the
peripheral IP-core selections used by the common STM32 implementation. The
goal of this inventory is to keep shared STM32 code selected by peripheral IP
version, not by family name.
Family status
=============
============ ================ =========== ===========================
Family CPU core Status NuttX source directory
============ ================ =========== ===========================
STM32C0 Cortex-M0+ supported ``arch/arm/src/stm32c0``
STM32C5 Cortex-M33 unsupported none
STM32F0 Cortex-M0 supported ``arch/arm/src/stm32f0``
STM32F1 Cortex-M3 supported ``arch/arm/src/stm32f1``
STM32F2 Cortex-M3 supported ``arch/arm/src/stm32f2``
STM32F3 Cortex-M4 supported ``arch/arm/src/stm32f3``
STM32F4 Cortex-M4 supported ``arch/arm/src/stm32f4``
STM32F7 Cortex-M7 supported ``arch/arm/src/stm32f7``
STM32G0 Cortex-M0+ supported ``arch/arm/src/stm32g0``
STM32G4 Cortex-M4 supported ``arch/arm/src/stm32g4``
STM32H5 Cortex-M33 supported ``arch/arm/src/stm32h5``
STM32H7 Cortex-M7 supported ``arch/arm/src/stm32h7``
STM32L0 Cortex-M0+ supported ``arch/arm/src/stm32l0``
STM32L1 Cortex-M3 supported ``arch/arm/src/stm32l1``
STM32L4 Cortex-M4 supported ``arch/arm/src/stm32l4``
STM32L5 Cortex-M33 supported ``arch/arm/src/stm32l5``
STM32MP1 Cortex-A7 unsupported none
STM32MP1 Cortex-M4 unsupported none
STM32MP2 Cortex-A35 unsupported none
STM32MP2 Cortex-M33 unsupported none
STM32N6 Cortex-M55 supported ``arch/arm/src/stm32n6``
STM32U0 Cortex-M0+ unsupported none
STM32U3 Cortex-M33 unsupported none
STM32U5 Cortex-M33 supported ``arch/arm/src/stm32u5``
STM32WB Cortex-M4 supported ``arch/arm/src/stm32wb``
STM32WB Cortex-M0+ unsupported none
STM32WB0 Cortex-M0+ unsupported none
STM32WBA Cortex-M33 unsupported none
STM32WL3 Cortex-M0+ unsupported none
STM32WL5 Cortex-M4 supported ``arch/arm/src/stm32wl5``
STM32WL5 Cortex-M0+ unsupported none
STM32WLE Cortex-M4 unsupported none
============ ================ =========== ===========================
Migration to NuttX 13.0
=======================
Release 13.0 normalizes every STM32 port onto a single, consistent Kconfig
namespace, public API and source tree. All of the changes below are breaking.
Each entry states what changed and the exact migration step; almost every
migration is a mechanical search-and-replace that can be scripted (``sed``,
IDE refactor, etc.).
Apply the steps in this order so that each replacement stays unambiguous:
#. Chip family selectors (``CONFIG_ARCH_CHIP_*``).
#. Kconfig options (``CONFIG_STM32xx_*`` to ``CONFIG_STM32_*``).
#. Hardware definition macros (``STM32xx_*`` to ``STM32_*``).
#. Public API names (``stm32xx_*`` to ``stm32_*``) and family includes.
#. Out-of-tree source / include / board paths.
Chip family selectors split
---------------------------
PR `#19067 <https://github.com/apache/nuttx/pull/19067>`__.
The combined ``CONFIG_ARCH_CHIP_STM32`` selector was replaced by one concrete
selector per legacy sub-family. Update out-of-tree defconfigs::
CONFIG_ARCH_CHIP_STM32 -> one of:
CONFIG_ARCH_CHIP_STM32F1
CONFIG_ARCH_CHIP_STM32F2
CONFIG_ARCH_CHIP_STM32F3
CONFIG_ARCH_CHIP_STM32F4
CONFIG_ARCH_CHIP_STM32G4
CONFIG_ARCH_CHIP_STM32L1
Kconfig options unified to ``CONFIG_STM32_*``
---------------------------------------------
PR `#19136 <https://github.com/apache/nuttx/pull/19136>`__.
All family-prefixed Kconfig options were renamed to the common
``CONFIG_STM32_*`` namespace (common options now live in
``arch/arm/src/common/stm32``). Replace the family prefix with
``CONFIG_STM32_`` for every affected family::
CONFIG_STM32F0L0G0_ -> CONFIG_STM32_
CONFIG_STM32F7_ -> CONFIG_STM32_
CONFIG_STM32L4_ -> CONFIG_STM32_
CONFIG_STM32L5_ -> CONFIG_STM32_
CONFIG_STM32U5_ -> CONFIG_STM32_
CONFIG_STM32H5_ -> CONFIG_STM32_
CONFIG_STM32H7_ -> CONFIG_STM32_
CONFIG_STM32WB_ -> CONFIG_STM32_
CONFIG_STM32WL5_ -> CONFIG_STM32_
CONFIG_STM32N6_ -> CONFIG_STM32_
Board clock-config options are normalized too::
CONFIG_ARCH_BOARD_STM32F0L0G0_CUSTOM_CLOCKCONFIG -> CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
CONFIG_ARCH_BOARD_STM32H5_CUSTOM_CLOCKCONFIG -> CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG -> CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
QUADSPI was also renamed to QSPI on F7/H7 (the IP block is the same;
PR `#19069 <https://github.com/apache/nuttx/pull/19069>`__). The QUADSPI
register/pin/DMA hardware macros are unchanged::
CONFIG_STM32F7_QUADSPI -> CONFIG_STM32_QSPI
CONFIG_STM32H7_QUADSPI -> CONFIG_STM32_QSPI
Hardware definition macros unified to ``STM32_*``
-------------------------------------------------
PR `#19114 <https://github.com/apache/nuttx/pull/19114>`__.
Non-standard hardware definition macros (IRQ numbers, peripheral counts, SRAM
and related) were renamed to the common ``STM32_*`` prefix. Replace the family
prefix in out-of-tree code (do this *after* the Kconfig migration so a plain
prefix replace is safe)::
STM32L4_ -> STM32_
STM32L5_ -> STM32_
STM32F7_ -> STM32_
STM32H5_ -> STM32_
STM32H7_ -> STM32_
STM32U5_ -> STM32_
STM32WB_ -> STM32_
STM32WL5_ -> STM32_
STM32N6_ -> STM32_
Board timer input clock unified to ``STM32_TIMn_CLKIN``
-------------------------------------------------------
The board-provided timer input clock frequency macros were unified to a
single convention: every board defines ``STM32_TIMn_CLKIN`` for the TIM
peripherals, ``STM32_LPTIMn_CLKIN`` for the LPTIM peripherals and
``STM32_HRTIM1_CLKIN`` for HRTIM. The APB bus is no longer encoded in the
macro name. Update out-of-tree board headers and drivers (drop the bus
from the name, keep the value)::
STM32_APBx_TIMn_CLKIN -> STM32_TIMn_CLKIN
BOARD_TIMn_FREQUENCY -> STM32_TIMn_CLKIN
STM32_APBx_LPTIMn_CLKIN -> STM32_LPTIMn_CLKIN
BOARD_LPTIMn_FREQUENCY -> STM32_LPTIMn_CLKIN
STM32_LPTIMn_FREQUENCY -> STM32_LPTIMn_CLKIN
STM32_APB1_THRTIM1_CLKIN -> STM32_HRTIM1_CLKIN
BOARD_HRTIM1_FREQUENCY -> STM32_HRTIM1_CLKIN
Public API names unified to ``stm32_*``
---------------------------------------
PR `#19125 <https://github.com/apache/nuttx/pull/19125>`__.
Public STM32 interfaces (functions and API-facing types, including the
timer / lptimer / dma / freerun APIs) were renamed from ``stm32<family>_*`` to
canonical ``stm32_*`` for F7, H5, H7, L4, L5, WB and WL5. The per-family root
header ``stm32<family>.h`` was renamed to ``stm32.h``. Migrate out-of-tree
code (the same rule applies to ``stm32f7_``, ``stm32h5_``, ``stm32h7_``,
``stm32l5_``, ``stm32wb_`` and ``stm32wl5_``)::
stm32l4_ -> stm32_
#include "stm32l4.h" -> #include "stm32.h"
Common sources moved to ``common/stm32``
----------------------------------------
PR `#19143 <https://github.com/apache/nuttx/pull/19143>`__.
Shared STM32 code was relocated so that all families build from one tree.
Out-of-tree code that references family-local common source/include paths must
point at the new common locations::
arch source and private headers -> arch/arm/src/common/stm32
board common sources -> boards/arm/common/stm32
Per-family directory split
--------------------------
PR `#19143 <https://github.com/apache/nuttx/pull/19143>`__.
The two combined super-directories were split into one directory per chip
family. Out-of-tree boards, include paths, source paths and defconfigs must
move to the matching family directory::
arch/arm/src/stm32f0l0g0 -> stm32f0, stm32l0, stm32g0, stm32c0
boards/arm/stm32f0l0g0 -> boards/arm/stm32{f0,l0,g0,c0}
arch/arm/src/stm32 -> stm32f1, stm32f2, stm32f3, stm32f4, stm32g4, stm32l1
boards/arm/stm32 -> boards/arm/stm32{f1,f2,f3,f4,g4,l1}
Family peripheral inventory
===========================
Each family table records every peripheral group currently tracked by this
inventory. ``unsupported`` means the peripheral is not available in that
family or is intentionally not implemented by the NuttX family port.
``to be done`` means the peripheral exists or needs confirmation, but the
exact IP core version has not been documented yet.
STM32C0
-------
============ ============ =================================================
Peripheral Core version Driver
============ ============ =================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m0_v1.c
AES/CRYP v1 not supported
CAN/FDCAN FDCAN arch/arm/src/common/stm32/stm32_fdcan_m0_v1.c
CRC to be done not supported
DAC v1 not supported
DBGMCU v1 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m0_v1_7ch.c
DMAMUX v1 7ch arch/arm/src/common/stm32/stm32_dma_m0_v1_7ch.c
EXTI v2 arch/arm/src/common/stm32/stm32_exti_gpio_m0_v1.c
FLASH G0/C0 arch/arm/src/common/stm32/stm32_flash_m0_g0c0.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m0_v1.c
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m0_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m0_v1.c
PWR G0 arch/arm/src/common/stm32/stm32_pwr_m0_g0.c
RCC to be done arch/arm/src/stm32c0/stm32_rcc.c
RTC RTCC M0 not supported
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m0_v1.c
SYSCFG to be done not supported
TIM v1 arch/arm/src/common/stm32/stm32_tim_m0_v1.c
USART/LPUART v4 arch/arm/src/common/stm32/stm32_serial_m0_v4.c
USB device not supported
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m0_v1.c
============ ============ =================================================
STM32F0
-------
============ ============ =================================================
Peripheral Core version Driver
============ ============ =================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m0_v1.c
CAN/FDCAN bxCAN not supported
CRC to be done not supported
DAC v1 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m0_v1_7ch.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m0_v1.c
FLASH M0 v1 not supported
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m0_v1.c
HDMI-CEC to be done not supported
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m0_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m0_v1.c
PWR v1 arch/arm/src/common/stm32/stm32_pwr_m0_v1.c
RCC to be done arch/arm/src/stm32f0/stm32_rcc.c
RTC RTCC M0 not supported
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m0_v1.c
SYSCFG to be done not supported
TIM v1 arch/arm/src/common/stm32/stm32_tim_m0_v1.c
USART/LPUART v3 arch/arm/src/common/stm32/stm32_serial_m0_v3.c
USB device arch/arm/src/common/stm32/stm32_usbdev_m0_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m0_v1.c
============ ============ =================================================
STM32F1
-------
============ ============= =======================================================
Peripheral Core version Driver
============ ============= =======================================================
ADC v1 basic arch/arm/src/common/stm32/stm32_adc_m3m4_v1v2.c
CAN/FDCAN bxCAN arch/arm/src/common/stm32/stm32_can_m3m4_v1.c
CRC to be done not supported
DAC v1 arch/arm/src/common/stm32/stm32_dac_m3m4_v1.c
DBGMCU v1 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c
ETH to be done arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.c
FLASH F1/F3 arch/arm/src/common/stm32/stm32_flash_m3m4_f1f3.c
FSMC v1 arch/arm/src/common/stm32/stm32_fsmc_m3m4_v1.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m3m4_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m3m4_v1.c
PWR v1 arch/arm/src/common/stm32/stm32_pwr_m3m4_v1.c
RCC to be done arch/arm/src/stm32f1/stm32_rcc.c
RTC counter arch/arm/src/common/stm32/stm32_rtc_m3m4_v1_lowerhalf.c
SDIO v1 arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c
SPI/I2S v1 arch/arm/src/common/stm32/stm32_i2s_m3m4_v1.c
TIM v1 arch/arm/src/common/stm32/stm32_tim_m3m4_v1v2v3.c
USART/LPUART v1 arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c
USB device/OTG FS arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m3m4_v1.c
============ ============= =======================================================
STM32F2
-------
============ ============ =======================================================
Peripheral Core version Driver
============ ============ =======================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m3m4_v1v2.c
CAN/FDCAN bxCAN arch/arm/src/common/stm32/stm32_can_m3m4_v1.c
CRYP v1 arch/arm/src/common/stm32/stm32_aes_m3m4_v1.c
DAC v1 arch/arm/src/common/stm32/stm32_dac_m3m4_v1.c
DMA v2 arch/arm/src/common/stm32/stm32_dma_m3m4_v2_stream.c
ETH to be done arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.c
FLASH F2/F4 arch/arm/src/common/stm32/stm32_flash_m3m4_f2f4.c
FSMC v1 arch/arm/src/common/stm32/stm32_fsmc_m3m4_v1.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c
HASH to be done not supported
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m3m4_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m3m4_v1.c
RCC to be done arch/arm/src/stm32f2/stm32_rcc.c
RNG v1 arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c
RTC RTCC v1 arch/arm/src/common/stm32/stm32_rtc_m3m4_v1_lowerhalf.c
SDIO v1 arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
TIM v1 arch/arm/src/common/stm32/stm32_tim_m3m4_v1v2v3.c
USART/LPUART v2 arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c
USB OTG FS/HS arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m3m4_v1.c
============ ============ =======================================================
STM32F3
-------
============ ============== =======================================================
Peripheral Core version Driver
============ ============== =======================================================
ADC v1 basic or v2 arch/arm/src/common/stm32/stm32_adc_m3m4_v1v2.c
CAN/FDCAN bxCAN arch/arm/src/common/stm32/stm32_can_m3m4_v1.c
COMP v1 arch/arm/src/common/stm32/stm32_comp_m3m4_v1.c
DAC v1 arch/arm/src/common/stm32/stm32_dac_m3m4_v1.c
DBGMCU v2 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.c
FLASH F1/F3 arch/arm/src/common/stm32/stm32_flash_m3m4_f1f3.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c
HRTIM v1 arch/arm/src/common/stm32/stm32_hrtim_m3m4_v1.c
I2C v2 arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m3m4_v1.c
OPAMP v1 arch/arm/src/common/stm32/stm32_opamp_m3m4_v1.c
RCC to be done arch/arm/src/stm32f3/stm32_rcc.c
RTC RTCC v1 arch/arm/src/common/stm32/stm32_rtc_m3m4_v1_lowerhalf.c
SDADC v1 arch/arm/src/common/stm32/stm32_sdadc_m3m4_v1.c
SPI/I2S v3 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
SYSCFG v1 not supported
TIM v1 or v2 arch/arm/src/common/stm32/stm32_tim_m3m4_v1v2v3.c
USART/LPUART v3 arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c
USB device arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m3m4_v1.c
============ ============== =======================================================
STM32F4
-------
============ ============ ======================================================
Peripheral Core version Driver
============ ============ ======================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m3m4_v1v2.c
CAN/FDCAN bxCAN arch/arm/src/common/stm32/stm32_can_m3m4_v1.c
CRYP v1 arch/arm/src/common/stm32/stm32_aes_m3m4_v1.c
DAC v1 arch/arm/src/common/stm32/stm32_dac_m3m4_v1.c
DMA v2 arch/arm/src/common/stm32/stm32_dma_m3m4_v2_stream.c
DMA2D v1 arch/arm/src/common/stm32/stm32_dma2d_m3m4_v1.c
ETH to be done arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.c
FLASH F2/F4 arch/arm/src/common/stm32/stm32_flash_m3m4_f2f4.c
FMC/FSMC v1 arch/arm/src/common/stm32/stm32_fmc_m3m4_v1.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c
HASH to be done not supported
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m3m4_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m3m4_v1.c
LTDC v1 arch/arm/src/common/stm32/stm32_ltdc_m3m4_v1.c
QUADSPI to be done not supported
RCC to be done arch/arm/src/stm32f4/stm32_rcc.c
RNG v1 arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c
RTC RTCC F4 arch/arm/src/common/stm32/stm32_rtcc_m3m4_f4.c
SDIO v1 arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
TIM v1 arch/arm/src/common/stm32/stm32_tim_m3m4_v1v2v3.c
USART/LPUART v2 arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c
USB OTG FS/HS arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m3m4_v1.c
============ ============ ======================================================
STM32G4
-------
============ ============ =======================================================
Peripheral Core version Driver
============ ============ =======================================================
ADC v2 arch/arm/src/common/stm32/stm32_adc_m3m4_v1v2.c
AES v1 arch/arm/src/common/stm32/stm32_aes_m3m4_v1.c
CAN/FDCAN FDCAN arch/arm/src/common/stm32/stm32_can_m3m4_v1.c
COMP v2 arch/arm/src/common/stm32/stm32_comp_m3m4_v2.c
CORDIC v1 arch/arm/src/common/stm32/stm32_cordic_m3m4_v1.c
DAC v2 arch/arm/src/common/stm32/stm32_dac_m3m4_v1.c
DMA v1 arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c
DMAMUX v1 8ch arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c
EXTI v2 arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.c
FLASH G4 arch/arm/src/common/stm32/stm32_flash_m3m4_g4.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c
HRTIM v1 arch/arm/src/common/stm32/stm32_hrtim_m3m4_v1.c
I2C v2 arch/arm/src/common/stm32/stm32_i2c_m3m4_v2.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m3m4_v1.c
OPAMP v1 arch/arm/src/common/stm32/stm32_opamp_m3m4_v1.c
RCC to be done arch/arm/src/stm32g4/stm32_rcc.c
RNG v1 arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c
RTC RTCC v1 arch/arm/src/common/stm32/stm32_rtc_m3m4_v1_lowerhalf.c
SPI/I2S v3 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
TIM v3 arch/arm/src/common/stm32/stm32_tim_m3m4_v1v2v3.c
USART/LPUART v4 arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c
USB device arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m3m4_v1.c
============ ============ =======================================================
STM32L4
-------
============ ============ =========================================
Peripheral Core version Driver
============ ============ =========================================
ADC to be done arch/arm/src/stm32l4/stm32l4_adc.c
CAN/FDCAN bxCAN arch/arm/src/stm32l4/stm32l4_can.c
COMP to be done arch/arm/src/stm32l4/stm32l4_comp.c
DAC to be done arch/arm/src/stm32l4/stm32l4_dac.c
DFSDM to be done arch/arm/src/stm32l4/stm32l4_dfsdm.c
DMA v1+DMAMUX arch/arm/src/stm32l4/stm32l4_dma.c
EXTI to be done arch/arm/src/stm32l4/stm32l4_exti_gpio.c
FLASH to be done arch/arm/src/stm32l4/stm32l4_flash.c
GPIO to be done arch/arm/src/stm32l4/stm32l4_gpio.c
I2C to be done arch/arm/src/stm32l4/stm32l4_i2c.c
IWDG v1 arch/arm/src/stm32l4/stm32l4_iwdg.c
LPTIM to be done arch/arm/src/stm32l4/stm32l4_lptim.c
PWR to be done arch/arm/src/stm32l4/stm32l4_pwr.c
QSPI to be done arch/arm/src/stm32l4/stm32l4_qspi.c
RCC to be done arch/arm/src/stm32l4/stm32l4_rcc.c
RNG to be done arch/arm/src/stm32l4/stm32l4_rng.c
RTC to be done arch/arm/src/stm32l4/stm32l4_rtc.c
SAI to be done arch/arm/src/stm32l4/stm32l4_sai.c
SDMMC to be done arch/arm/src/stm32l4/stm32l4_sdmmc.c
SPI/I2S to be done arch/arm/src/stm32l4/stm32l4_spi.c
TIM to be done arch/arm/src/stm32l4/stm32l4_tim.c
USART/LPUART v3 arch/arm/src/stm32l4/stm32l4_serial.c
USB OTG FS arch/arm/src/stm32l4/stm32l4_otgfsdev.c
PULSECOUNT n/a arch/arm/src/stm32l4/stm32l4_pulsecount.c
PWM n/a arch/arm/src/stm32l4/stm32l4_pwm.c
QENCODER n/a arch/arm/src/stm32l4/stm32l4_qencoder.c
USB host n/a arch/arm/src/stm32l4/stm32l4_otgfshost.c
============ ============ =========================================
STM32F7
-------
============ ============ =======================================
Peripheral Core version Driver
============ ============ =======================================
ADC to be done arch/arm/src/stm32f7/stm32_adc.c
CAN/FDCAN bxCAN arch/arm/src/stm32f7/stm32_can.c
DAC to be done not supported
DMA v2 style arch/arm/src/stm32f7/stm32_dma.c
DMA2D v1 arch/arm/src/stm32f7/stm32_dma2d.c
ETH to be done arch/arm/src/stm32f7/stm32_ethernet.c
EXTI to be done arch/arm/src/stm32f7/stm32_exti_gpio.c
FLASH to be done arch/arm/src/stm32f7/stm32_flash.c
FMC/FSMC to be done arch/arm/src/stm32f7/stm32_fmc.c
GPIO to be done arch/arm/src/stm32f7/stm32_gpio.c
I2C to be done arch/arm/src/stm32f7/stm32_i2c.c
IWDG v1 not supported
LTDC to be done arch/arm/src/stm32f7/stm32_ltdc.c
PWR to be done arch/arm/src/stm32f7/stm32_pwr.c
QUADSPI to be done arch/arm/src/stm32f7/stm32_qspi.c
RCC to be done arch/arm/src/stm32f7/stm32_rcc.c
RNG to be done arch/arm/src/stm32f7/stm32_rng.c
RTC to be done arch/arm/src/stm32f7/stm32_rtc.c
SDMMC to be done arch/arm/src/stm32f7/stm32_sdmmc.c
SPI/I2S to be done arch/arm/src/stm32f7/stm32_i2s.c
TIM to be done arch/arm/src/stm32f7/stm32_tim.c
USART/LPUART v3 arch/arm/src/stm32f7/stm32_serial.c
USB OTG FS/HS arch/arm/src/stm32f7/stm32_otgdev.c
WWDG v1 not supported
BBSRAM n/a arch/arm/src/stm32f7/stm32_bbsram.c
CAPTURE n/a arch/arm/src/stm32f7/stm32_capture.c
FOC n/a arch/arm/src/stm32f7/stm32_foc.c
PULSECOUNT n/a arch/arm/src/stm32f7/stm32_pulsecount.c
PWM n/a arch/arm/src/stm32f7/stm32_pwm.c
QENCODER n/a arch/arm/src/stm32f7/stm32_qencoder.c
SAI n/a arch/arm/src/stm32f7/stm32_sai.c
USB host n/a arch/arm/src/stm32f7/stm32_otghost.c
============ ============ =======================================
STM32G0
-------
============ ============ =================================================
Peripheral Core version Driver
============ ============ =================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m0_v1.c
AES v1 arch/arm/src/common/stm32/stm32_aes_m0_v1.c
CAN/FDCAN FDCAN not supported
DAC v1 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m0_v1_7ch.c
DMAMUX v1 7ch arch/arm/src/common/stm32/stm32_dma_m0_v1_7ch.c
EXTI v2 arch/arm/src/common/stm32/stm32_exti_gpio_m0_v1.c
FLASH G0/C0 not supported
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m0_v1.c
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m0_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m0_v1.c
PWR G0 not supported
RCC to be done arch/arm/src/stm32g0/stm32_rcc.c
RNG v1 arch/arm/src/common/stm32/stm32_rng_m0_v1.c
RTC RTCC M0 not supported
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m0_v1.c
SYSCFG to be done not supported
TIM v1 arch/arm/src/common/stm32/stm32_tim_m0_v1.c
USART/LPUART v4 arch/arm/src/common/stm32/stm32_serial_m0_v4.c
USB device arch/arm/src/common/stm32/stm32_usbdev_m0_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m0_v1.c
============ ============ =================================================
STM32H5
-------
============ ============ =======================================
Peripheral Core version Driver
============ ============ =======================================
ADC to be done arch/arm/src/stm32h5/stm32_adc.c
AES/CRYP to be done not supported
CAN/FDCAN FDCAN arch/arm/src/stm32h5/stm32_fdcan.c
DAC to be done not supported
DTS to be done arch/arm/src/stm32h5/stm32_dts.c
ETH to be done arch/arm/src/stm32h5/stm32_ethernet.c
EXTI to be done not supported
FLASH to be done arch/arm/src/stm32h5/stm32_flash.c
GPIO to be done arch/arm/src/stm32h5/stm32_gpio.c
GPDMA to be done arch/arm/src/stm32h5/stm32_dma.c
I2C to be done arch/arm/src/stm32h5/stm32_i2c.c
ICACHE to be done arch/arm/src/stm32h5/stm32_icache.c
OCTOSPI to be done arch/arm/src/stm32h5/stm32_qspi.c
PWR to be done arch/arm/src/stm32h5/stm32_pwr.c
RCC to be done arch/arm/src/stm32h5/stm32_rcc.c
SPI/I2S to be done arch/arm/src/stm32h5/stm32_spi.c
TIM to be done arch/arm/src/stm32h5/stm32_tim.c
USART/LPUART v3 arch/arm/src/stm32h5/stm32_serial.c
USB FS arch/arm/src/stm32h5/stm32_usbfs.c
PULSECOUNT n/a arch/arm/src/stm32h5/stm32_pulsecount.c
PWM n/a arch/arm/src/stm32h5/stm32_pwm.c
RNG n/a arch/arm/src/stm32h5/stm32_rng.c
USB host n/a arch/arm/src/stm32h5/stm32_usbdrdhost.c
============ ============ =======================================
STM32H7
-------
============ ============ =======================================
Peripheral Core version Driver
============ ============ =======================================
ADC to be done arch/arm/src/stm32h7/stm32_adc.c
BDMA to be done arch/arm/src/stm32h7/stm32_dma.c
CAN/FDCAN FDCAN arch/arm/src/stm32h7/stm32_fdcan_sock.c
DAC to be done not supported
DMA v2 style arch/arm/src/stm32h7/stm32_dma.c
DMA2D to be done not supported
ETH to be done arch/arm/src/stm32h7/stm32_ethernet.c
EXTI to be done arch/arm/src/stm32h7/stm32_exti_gpio.c
FLASH to be done arch/arm/src/stm32h7/stm32_flash.c
FMC/FSMC to be done arch/arm/src/stm32h7/stm32_fmc.c
GPIO to be done arch/arm/src/stm32h7/stm32_gpio.c
HSEM to be done not supported
I2C to be done arch/arm/src/stm32h7/stm32_i2c.c
IWDG v1 arch/arm/src/stm32h7/stm32_iwdg.c
LTDC to be done arch/arm/src/stm32h7/stm32_ltdc.c
MDMA to be done arch/arm/src/stm32h7/stm32_dma.c
PWR to be done arch/arm/src/stm32h7/stm32_pwr.c
QUADSPI to be done arch/arm/src/stm32h7/stm32_qspi.c
RCC to be done arch/arm/src/stm32h7/stm32_rcc.c
RNG to be done arch/arm/src/stm32h7/stm32_rng.c
RTC to be done arch/arm/src/stm32h7/stm32_rtc.c
SDMMC to be done arch/arm/src/stm32h7/stm32_sdmmc.c
SPI/I2S to be done arch/arm/src/stm32h7/stm32_spi.c
TIM to be done arch/arm/src/stm32h7/stm32_tim.c
USART/LPUART v4 arch/arm/src/stm32h7/stm32_serial.c
USB OTG FS/HS arch/arm/src/stm32h7/stm32_otgdev.c
WWDG v1 arch/arm/src/stm32h7/stm32_wwdg.c
AES/CRYP n/a arch/arm/src/stm32h7/stm32_aes.c
BBSRAM n/a arch/arm/src/stm32h7/stm32_bbsram.c
CAPTURE n/a arch/arm/src/stm32h7/stm32_capture.c
LPTIM n/a arch/arm/src/stm32h7/stm32_lptim.c
PULSECOUNT n/a arch/arm/src/stm32h7/stm32_pulsecount.c
PWM n/a arch/arm/src/stm32h7/stm32_pwm.c
QENCODER n/a arch/arm/src/stm32h7/stm32_qencoder.c
USB host n/a arch/arm/src/stm32h7/stm32_otghost.c
============ ============ =======================================
STM32L0
-------
============ ============ =================================================
Peripheral Core version Driver
============ ============ =================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m0_v1.c
AES v1 arch/arm/src/common/stm32/stm32_aes_m0_v1.c
DAC v1 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m0_v1_7ch.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m0_v1.c
FLASH M0 v1 not supported
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m0_v1.c
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m0_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m0_v1.c
PWR v1 arch/arm/src/common/stm32/stm32_pwr_m0_v1.c
RCC to be done arch/arm/src/stm32l0/stm32_rcc.c
RNG v1 arch/arm/src/common/stm32/stm32_rng_m0_v1.c
RTC RTCC M0 not supported
SPI/I2S v1 arch/arm/src/common/stm32/stm32_spi_m0_v1.c
TIM v1 arch/arm/src/common/stm32/stm32_tim_m0_v1.c
USART/LPUART v3 arch/arm/src/common/stm32/stm32_serial_m0_v3.c
USB device arch/arm/src/common/stm32/stm32_usbdev_m0_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m0_v1.c
============ ============ =================================================
STM32L1
-------
============ ============ ======================================================
Peripheral Core version Driver
============ ============ ======================================================
ADC v1 arch/arm/src/common/stm32/stm32_adc_m3m4_v1v2.c
AES v1 arch/arm/src/common/stm32/stm32_aes_m3m4_v1.c
DAC v1 arch/arm/src/common/stm32/stm32_dac_m3m4_v1.c
DBGMCU v2 not supported
DMA v1 arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c
EXTI v1 arch/arm/src/common/stm32/stm32_exti_gpio_m3m4_v1v2.c
FLASH L1 arch/arm/src/common/stm32/stm32_flash_m3m4_l1.c
FSMC v1 arch/arm/src/common/stm32/stm32_fsmc_m3m4_v1.c
GPIO v1 arch/arm/src/common/stm32/stm32_gpio_m3m4_v1v2.c
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m3m4_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg_m3m4_v1.c
LCD to be done not supported
PWR v1 arch/arm/src/common/stm32/stm32_pwr_m3m4_v1.c
RCC to be done arch/arm/src/stm32l1/stm32_rcc.c
RTC RTCC L1 arch/arm/src/common/stm32/stm32_rtcc_m3m4_l1.c
SDIO v1 arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c
SPI/I2S v1 arch/arm/src/common/stm32/stm32_i2s_m3m4_v1.c
TIM v1 arch/arm/src/common/stm32/stm32_tim_m3m4_v1v2v3.c
USART/LPUART v2 arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c
USB device arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
WWDG v1 arch/arm/src/common/stm32/stm32_wwdg_m3m4_v1.c
============ ============ ======================================================
STM32L5
-------
============ ============ ========================================
Peripheral Core version Driver
============ ============ ========================================
ADC to be done not supported
DAC to be done not supported
DMA/DMAMUX to be done not supported
EXTI to be done arch/arm/src/stm32l5/stm32l5_exti_gpio.c
FLASH to be done arch/arm/src/stm32l5/stm32l5_flash.c
GPIO to be done arch/arm/src/stm32l5/stm32l5_gpio.c
GTZC to be done not supported
HASH to be done not supported
I2C to be done not supported
OCTOSPI to be done not supported
PWR to be done arch/arm/src/stm32l5/stm32l5_pwr.c
RCC to be done arch/arm/src/stm32l5/stm32l5_rcc.c
RNG to be done not supported
RTC to be done not supported
SDMMC to be done not supported
SPI/I2S to be done arch/arm/src/stm32l5/stm32l5_spi.c
TIM/LPTIM to be done arch/arm/src/stm32l5/stm32l5_tim.c
USART/LPUART v3 arch/arm/src/stm32l5/stm32l5_serial.c
USB device not supported
============ ============ ========================================
STM32N6
-------
============ ============ ===================================
Peripheral Core version Driver
============ ============ ===================================
ADC to be done not supported
CAN/FDCAN to be done not supported
DAC to be done not supported
ETH to be done not supported
EXTI to be done not supported
GPIO to be done arch/arm/src/stm32n6/stm32_gpio.c
GPDMA to be done not supported
I2C to be done not supported
PWR to be done arch/arm/src/stm32n6/stm32_pwr.c
RCC to be done arch/arm/src/stm32n6/stm32_rcc.c
SPI/I2S to be done not supported
TIM to be done not supported
USART/LPUART v4 arch/arm/src/stm32n6/stm32_serial.c
USB device not supported
XSPI to be done not supported
============ ============ ===================================
STM32U5
-------
============ ============ ======================================
Peripheral Core version Driver
============ ============ ======================================
ADC to be done not supported
DAC to be done not supported
DCACHE to be done not supported
EXTI to be done arch/arm/src/stm32u5/stm32_exti_gpio.c
FLASH to be done arch/arm/src/stm32u5/stm32_flash.c
GPIO to be done arch/arm/src/stm32u5/stm32_gpio.c
GPDMA to be done not supported
HASH to be done not supported
I2C to be done arch/arm/src/stm32u5/stm32_i2c.c
ICACHE to be done not supported
OCTOSPI to be done not supported
PWR to be done arch/arm/src/stm32u5/stm32_pwr.c
RCC to be done arch/arm/src/stm32u5/stm32_rcc.c
RNG to be done not supported
RTC to be done not supported
SAES/AES to be done not supported
SDMMC to be done not supported
SPI/I2S to be done arch/arm/src/stm32u5/stm32_spi.c
TAMP to be done not supported
TIM/LPTIM to be done arch/arm/src/stm32u5/stm32_tim.c
USART/LPUART v3 arch/arm/src/stm32u5/stm32_serial.c
USB device not supported
============ ============ ======================================
STM32WB
-------
============ ============ ========================================
Peripheral Core version Driver
============ ============ ========================================
ADC to be done not supported
AES to be done not supported
DAC to be done not supported
DMA to be done arch/arm/src/stm32wb/stm32wb_dma.c
EXTI to be done arch/arm/src/stm32wb/stm32wb_exti_gpio.c
FLASH to be done arch/arm/src/stm32wb/stm32wb_flash.c
GPIO to be done arch/arm/src/stm32wb/stm32wb_gpio.c
I2C to be done arch/arm/src/stm32wb/stm32wb_i2c.c
IPCC to be done arch/arm/src/stm32wb/stm32wb_ipcc.c
PWR to be done arch/arm/src/stm32wb/stm32wb_pwr.c
Radio to be done not supported
RCC to be done arch/arm/src/stm32wb/stm32wb_rcc.c
RNG to be done not supported
RTC to be done arch/arm/src/stm32wb/stm32wb_rtc.c
SPI/I2S to be done arch/arm/src/stm32wb/stm32wb_spi.c
TIM/LPTIM to be done arch/arm/src/stm32wb/stm32wb_tim.c
USART/LPUART v4 arch/arm/src/stm32wb/stm32wb_serial.c
USB device not supported
============ ============ ========================================
STM32WL5
--------
============ ============ ==========================================
Peripheral Core version Driver
============ ============ ==========================================
ADC to be done not supported
AES to be done not supported
DAC to be done not supported
DMA to be done not supported
EXTI to be done arch/arm/src/stm32wl5/stm32wl5_exti_gpio.c
FLASH to be done arch/arm/src/stm32wl5/stm32wl5_flash.c
GPIO to be done arch/arm/src/stm32wl5/stm32wl5_gpio.c
I2C to be done not supported
IPCC to be done arch/arm/src/stm32wl5/stm32wl5_ipcc.c
PWR to be done arch/arm/src/stm32wl5/stm32wl5_pwr.c
Radio to be done not supported
RCC to be done arch/arm/src/stm32wl5/stm32wl5_rcc.c
RNG to be done not supported
RTC to be done not supported
SPI/I2S to be done arch/arm/src/stm32wl5/stm32wl5_spi.c
TIM/LPTIM to be done arch/arm/src/stm32wl5/stm32wl5_tim.c
USART/LPUART v3 arch/arm/src/stm32wl5/stm32wl5_serial.c
USB to be done not supported
============ ============ ==========================================
Kconfig option organization
===========================
STM32 common Kconfig symbols are split into three layers, each with a fixed
home so contributors always know where a given option belongs:
================================= ============================ ====================
Layer Symbol form File
================================= ============================ ====================
Capability flags (hidden) ``STM32_HAVE_*`` ``Kconfig.have``
Instance feature flags (hidden) ``STM32_<INSTANCE>_HAVE_*`` ``Kconfig.<periph>``
Peripheral selection ``STM32_<PERIPH>`` ``Kconfig.periph``
Peripheral options ``STM32_<PERIPH>_*`` ``Kconfig.<periph>``
================================= ============================ ====================
All ``STM32_HAVE_*`` and ``STM32_HAVE_IP_*`` symbols are defined in the single
file ``arch/arm/src/common/stm32/Kconfig.have`` — the authoritative description
of what hardware exists. The ``STM32_HAVE_IP_*`` selectors listed above are a
subset of it. The rules for these capability flags are:
* They are prompt-less ``bool`` symbols, defined exactly once. Never give a
capability flag a prompt.
* Family Kconfig files (``arch/arm/src/stm32<family>/Kconfig``) ``select`` these
symbols to describe the silicon of each chip.
* Presence and feature flags may use ``default y if <STM32_HAVE_IP_* flag>`` so
the right instances and features light up automatically once a family selects
its IP-core version.
* User-visible options in ``Kconfig.periph`` and ``Kconfig.<periph>`` should
``depends on`` the capability flags rather than on family names.
The ``STM32_HAVE_`` prefix is reserved for **chip capabilities** — things the
silicon *has*, independent of any single peripheral instance. Those live in
``Kconfig.have``. A flag that instead describes a feature of one **specific
peripheral instance** ("ADC3 *has* a DMA path", "USART1 *supports* RX DMA") is
not a chip capability: it must be named ``STM32_<INSTANCE>_HAVE_<FEATURE>``
(``HAVE`` *after* the instance) and defined in that peripheral's
``Kconfig.<periph>`` file, never in ``Kconfig.have``. It is still a prompt-less
``bool`` ``select``-ed by the family Kconfig files, just homed with the rest of
its peripheral's options. For example:
============================ ============================ ====================
Wrong (chip-capability form) Correct (instance-feature) Home
============================ ============================ ====================
``STM32_HAVE_ADC3_DMA`` ``STM32_ADC3_HAVE_DMA`` ``Kconfig.adc``
``STM32_HAVE_SDADC1_DMA`` ``STM32_SDADC1_HAVE_DMA`` ``Kconfig.sdadc``
``STM32_HAVE_USART1_RXDMA`` ``STM32_USART1_HAVE_RXDMA`` ``Kconfig.uart``
``STM32_HAVE_PHY_POLLED`` ``STM32_PHY_HAVE_POLLED`` ``Kconfig.eth``
============================ ============================ ====================
Capability-flag naming:
* IP-core version selectors: ``STM32_HAVE_IP_<PERIPH>_<CORE>_V<N>`` (see
`IP-core naming convention`_; the version number resets per core).
* Per-instance presence: ``STM32_HAVE_<INSTANCE>`` (for example
``STM32_HAVE_ADC2`` or ``STM32_HAVE_USART3``).
* Feature capability (chip-wide, **no** instance number): ``STM32_HAVE_<FEATURE>``
(for example ``STM32_HAVE_ADC_OVERSAMPLE``). A feature tied to a specific
instance is **not** written this way — see ``STM32_<INSTANCE>_HAVE_<FEATURE>``
above.
* Per-instance feature: ``STM32_<INSTANCE>_HAVE_<FEATURE>`` (for example
``STM32_ADC3_HAVE_DMA``), defined in ``Kconfig.<periph>``.
Source naming rules
===================
IP-core naming convention
-------------------------
STM32 common files use a ``<core>_<version>`` naming convention that
encodes the CPU core family and peripheral IP version in filenames and
Kconfig symbols. Version numbers are reset per core: the first version
of a peripheral on a given core is ``V1``.
**Header file naming** (under ``arch/arm/src/common/stm32/``):
- Facade headers: ``stm32_<periph>.h`` — dispatch on Kconfig IP symbols
- M0-core variants: ``stm32_<periph>_m0_v1.h``
- M3/M4-core variants: ``stm32_<periph>_m3m4_v1.h``, ``stm32_<periph>_m3m4_v2.h``
- Combined variants: ``stm32_<periph>_m3m4_v1v2.h``, ``stm32_<periph>_m3m4_v1v2v3.h``
**Source file naming** (``.c`` files):
- Follow the same convention as headers: ``stm32_gpio_m3m4_v1v2.c``,
``stm32_adc_m0_v1.c``, ``stm32_tim_m0_v1.c``, ``stm32_pwm_m3m4_v1v2v3.c``
**Kconfig symbol naming** (``CONFIG_STM32_HAVE_IP_<PERIPH>_<CORE>_<VERSION>``):
- M0: ``CONFIG_STM32_HAVE_IP_GPIO_M0_V1``, ``CONFIG_STM32_HAVE_IP_ADC_M0_V1``
- M3/M4: ``CONFIG_STM32_HAVE_IP_GPIO_M3M4_V1``,
``CONFIG_STM32_HAVE_IP_ADC_M3M4_V1``, ``CONFIG_STM32_HAVE_IP_ADC_M3M4_V2``,
``CONFIG_STM32_HAVE_IP_TIMERS_M3M4_V1``, ``CONFIG_STM32_HAVE_IP_TIMERS_M3M4_V2``,
``CONFIG_STM32_HAVE_IP_TIMERS_M3M4_V3``
Note that in the future the core prefix may be dropped and a single
version number space used across all cores. For now the core prefix is
kept to make migration of families into common code simpler.
Common STM32 files should follow these rules:
* Files shared by more than one family are placed under
``arch/arm/src/common/stm32``.
* Board-facing public headers use stable peripheral names such as
``stm32_adc.h``, ``stm32_gpio.h``, and ``stm32_uart.h``. Boards and
drivers should not include IP-versioned public headers directly.
* Public STM32 symbols must use canonical ``stm32_*`` names, not
family-prefixed names (for example, use ``stm32_tim_init``,
``stm32_dmachannel``, and ``stm32_caninitialize`` rather than
``stm32l4_*``/``stm32h7_*`` forms).
* Public API-facing type names must also use canonical ``stm32_*`` forms
(for example, ``struct stm32_tim_dev_s``, ``struct stm32_dmaregs_s``,
and ``struct stm32_freerun_s``).
* When an equivalent STM32 API already exists, new family code must reuse
the exact public function name and compatible prototype/type signature.
* Family root aggregation headers should use ``stm32.h`` and family code
should include ``<stm32.h>`` for that root header include path.
* Hardware register selectors keep the ``hardware/stm32_<peripheral>.h``
public name and may include hardware-version headers when those headers
describe real register layouts.
* Private common implementation selectors may be split only when the API,
register map, or reusable hardware shape really differs. Prefer capability
names over family names for these splits.
* Common STM32 source and hardware header names must not encode composite
family groups. If a reusable distinction is still named after a family, the
next cleanup step is to map that distinction to an IP-core version or a
hardware feature.
* Public compatibility selectors such as ``stm32_adc.h`` and
``hardware/stm32_adc.h`` keep their public include names while selecting the
proper common implementation internally.
Hardware definition naming convention
--------------------------------------
All STM32 hardware definitions (IRQ vectors, peripheral counts, SRAM sizes)
must use the standard ``STM32_`` prefix rather than family-specific prefixes.
Family-specific prefixes prevent common code from referencing hardware
definitions across families and create unnecessary differences between ports.
**IRQ vectors** must use ``STM32_IRQ_`` (not ``STM32L4_IRQ_``,
``STM32WB_IRQ_``, etc.).
**Peripheral count macros** (``NATIM``, ``NADC``, ``NSPI``, etc.) and SRAM
size macros must use ``STM32_`` prefix (not ``STM32F7_``, ``STM32H5_``, etc.).
**Per-family hardware register definitions** (in ``arch/arm/src/<family>/hardware/``)
must use ``STM32_XXX_`` (not ``STM32L4_XXX_``, ``STM32WB4_XXX_``, etc.).
Next steps
==========
The goal is for all STM32 families to follow the rules above, so that shared
code is selected by peripheral IP version instead of family name and code
duplication is limited. The remaining work is:
Architecture
------------
* Migrate the remaining families to use the common ``arch/arm/src/common/stm32``
code.
* Review every family's selectors so they use the correct IP cores and select
only the peripherals each family actually supports.
* Remove all family-specific options that were left for later, and simplify the
complex Kconfig conditions.
* Unify the remaining peripheral-driver public headers so the API is the same
for all families.
* Better organize the CMake and Make build files for common STM32. Now it's a mess.
* Unify all supported features across families.
Boards
------
* Move all families to shared ``boards/common/stm32`` board code, including
boards that do not yet use the recently added common code.
* Unify all supported features across boards of the same class (such as the
Nucleo boards) so they follow the same patterns.
Kconfig simplification
----------------------
Many Kconfig conditions are still long, mix normalized ``STM32_HAVE_IP_*``
flags with family names, and rely on composite family-group symbols
(``STM32_COMMON_LEGACY``, ``STM32_COMMON_F7_H7``, ``STM32_COMMON_L4_L5_U5``,
``STM32_COMMON_L4_H5_L5_U5``, …) that the naming rules forbid. These are the
most likely to need rework and should be reduced to depend on capability flags
only:
* ``Kconfig.tim`` and ``Kconfig.uart`` hold the bulk of the family-name
conditions (hundreds of lines each) and are the biggest cleanup.
* ``Kconfig.adc``, ``Kconfig.periph`` and ``Kconfig.have`` carry many mixed
family/IP ``||`` chains (for example ``(STM32_HAVE_IP_ADC_M3M4_V1 ||
STM32_HAVE_IP_ADC_M3M4_V2) || ARCH_CHIP_STM32F7``), where F7/H5/L4 are patched
in by family name only because they have no IP flag yet.
* Replace the composite ``STM32_COMMON_*`` family-group symbols with per-IP-core
or per-feature flags.

View file

@ -34,7 +34,7 @@ This memory allocator is automatically enabled when the following options are se
* ``CONFIG_MM_MULTIHEAP`` Support for multiple heaps is enabled.
Under those conditions, the CCM memory allocator is enabled and the allocator
interfaces prototyped in the ``arch/arm/src/stm32/stm32_ccm.h`` are available.
interfaces prototyped in the ``arch/arm/src/common/stm32/stm32_ccm.h`` are available.
NOTE: These interfaces are, technically, not prototyped since they are really
provided via C pre-processor macros.

View file

@ -52,7 +52,7 @@ In order to build the task into the OS as a kernel thread, you simply have to:
(1) place the kernel thread code in your board source code directory, and (2)
start it with ``kthread_create()`` in your board bring-up logic. There a few
examples of this in the NuttX source tree. Here is one:
`https://github.com/apache/nuttx/blob/master/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c <https://github.com/apache/nuttx/blob/master/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c>`_
`https://github.com/apache/nuttx/blob/master/boards/arm/stm32f1/viewtool-stm32f107/src/stm32_highpri.c <https://github.com/apache/nuttx/blob/master/boards/arm/stm32f1/viewtool-stm32f107/src/stm32_highpri.c>`_
So that is another trick that you can use to architecture optimal solutions:
Create parts of your applications as kernel threads: They need to reside in

View file

@ -302,8 +302,8 @@ You can find an example that tests the high priority, nested interrupts in the N
* :doc:`/platforms/arm/stm32f1/boards/viewtool-stm32f107/index` Description of
the configuration
* ``nuttx/boards/arm/stm32/viewtool-stm32f107/highpri`` Test configuration
* ``nuttx/boards/arm/stm32f1/viewtool-stm32f107/highpri`` Test configuration
* ``nuttx/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri`` Test
* ``nuttx/boards/arm/stm32f1/viewtool-stm32f107/src/stm32_highpri`` Test
driver.

View file

@ -12,16 +12,16 @@ If you wonder about the purpose of the two ``chip.h`` files in each arm chip.
.. code:: sh
$ find arch/arm -name chip.h | grep stm32
arch/arm/include/stm32/chip.h
arch/arm/src/stm32/chip.h
arch/arm/include/stm32f4/chip.h
arch/arm/src/stm32f4/chip.h
The reason behind ``arch/arm/src/stm32/chip.h`` file was a bad idea
The reason behind ``arch/arm/src/stm32f4/chip.h`` file was a bad idea
that happened a long time ago.
Right now, I believe that its only required when ``CONFIG_ARMV7M_CMNVECTOR``
is selected in the configuration. In that case, ``arch/arm/src/stm32/chip.h``
is selected in the configuration. In that case, ``arch/arm/src/stm32f4/chip.h``
is included by ``arch/arm/src/armv7-m/up_vectors.c`` in order provide
the number of interrupt vectors. In stm32, ``arch/arm/src/stm32/chip.h``
the number of interrupt vectors. In stm32, ``arch/arm/src/stm32f4/chip.h``
provides the number of vectors indirectly by including the correct,
chip-specific vectors.h file.
This function is a little more obvious in ``arch/arm/srch/lpc43xx/chip.h``.

View file

@ -0,0 +1,90 @@
===
CRC
===
Overview
========
NuttX provides CRC (Cyclic Redundancy Check) implementations for CRC8, CRC16,
and CRC32 in ``libs/libc/misc/``. Each family offers multiple polynomial
variants, following a consistent naming convention.
CRC32 Variants
==============
NuttX ships several CRC32 variants that differ in polynomial, init value,
and final XOR. The two most commonly used are ``crc32()`` and ``crc32_ieee()``.
crc32() — NuttX Native
-----------------------
The original NuttX CRC32 implementation using the standard ISO 3309 / ITU-T
V.42 polynomial (0xEDB88320 reflected). It uses **init value 0** with
**no final XOR**:
.. code-block:: c
uint32_t crc32(FAR const uint8_t *src, size_t len);
uint32_t crc32part(FAR const uint8_t *src, size_t len, uint32_t crc32val);
This is the default CRC32 used by internal NuttX subsystems (bbsram, sbram,
etc.) and is maintained for backward compatibility.
crc32_ieee() — Linux/zlib Compatible
-------------------------------------
An IEEE-standard CRC32 compatible with Linux ``crc32()`` (from zlib). It uses
the same polynomial but with **init value 0xFFFFFFFF** and **final XOR
0xFFFFFFFF**:
.. code-block:: c
uint32_t crc32_ieee(FAR const uint8_t *src, size_t len);
uint32_t crc32_ieeepart(FAR const uint8_t *src, size_t len, uint32_t crc32val);
Use this variant when interoperating with Linux systems, e.g., for CRC
checksums in network protocols, file transfers, or UART communication layers.
Comparison
----------
============== ============ ========== ==========
Function Init Value Final XOR Polynomial
============== ============ ========== ==========
crc32() 0x00000000 None 0xEDB88320
crc32_ieee() 0xFFFFFFFF 0xFFFFFFFF 0xEDB88320
============== ============ ========== ==========
Example: computing CRC32 of the string ``"123456789"``:
- ``crc32("123456789", 9)`` returns ``0x2DFD2D88``
- ``crc32_ieee("123456789", 9)`` returns ``0xCBF43926`` (matches Linux/zlib)
Incremental Calculation
-----------------------
Both variants support incremental (chunked) CRC calculation via the ``_part``
functions. For ``crc32_ieee``, the first call should pass ``0`` as the initial
value:
.. code-block:: c
uint32_t crc = 0;
crc = crc32_ieeepart(chunk1, len1, crc);
crc = crc32_ieeepart(chunk2, len2, crc);
/* crc now contains the final CRC of chunk1+chunk2 */
Other CRC32 Variants
--------------------
NuttX also provides CRC32 variants using different polynomials:
- ``crc32h04c11db7()`` / ``crc32h04c11db7_part()`` — Castagnoli (CRC-32C)
- ``crc32hf4acfb13()`` / ``crc32hf4acfb13_part()`` — CRC-32Q
CRC16 and CRC8
==============
CRC16 and CRC8 follow the same naming pattern with multiple variant functions.
See ``include/nuttx/crc16.h`` and ``include/nuttx/crc8.h`` for available
variants.

View file

@ -135,7 +135,7 @@ Detached File Helpers
Once the file structure has been detached from its file descriptor,
you can no longer use the standard VFS functions ``read()``, ``write()``,
``ioctl()``, etc. Fortunately, there are a parallel set of interfaces
that can be used with detached files. These are decribed in detail
that can be used with detached files. These are described in detail
in ``include/nuttx/fs/fs.h`` and only listed here below:
.. code-block:: c
@ -153,8 +153,8 @@ in ``include/nuttx/fs/fs.h`` and only listed here below:
int file_vfcntl(FAR struct file *filep, int cmd, va_list ap);
The SYLOG Device: A Case Study
==============================
The SYSLOG Device: A Case Study
===============================
This technique is used for the SYSLOG device. Originally, NuttX used
file descriptor ``1`` for SYSLOG output by default. For most task groups,
@ -179,7 +179,7 @@ Other Examples
There are some other examples in analog joystick lower half drivers
that use the ADC character driver to read joystick positions::
boards/arm/stm32/nucleo-f4x1re/src/stm32_ajoystick.c:
boards/arm/stm32f4/nucleo-f411re/src/stm32_ajoystick.c:
ret = file_detach(fd, &g_adcfile);
boards/arm/stm32l4/nucleo-l476rg/src/stm32_ajoystick.c:

View file

@ -10,6 +10,7 @@ Implementation Details
cancellation_points.rst
chip_h.rst
context_switches.rst
crc.rst
critical_sections.rst
device_drivers.rst
device_nodes.rst
@ -38,4 +39,5 @@ Implementation Details
tasks_vs_threads.rst
tickless_os.rst
tls.rst
user_identity.rst
usb.rst

View file

@ -87,7 +87,7 @@ two address spaces: The kernel address space and the user address space.
But all applications still share the same user address spaces.
As a result ``.text`` along with ``.data`` and ``.bss`` are naturally shared.
This requires using two copies of the the module logic: One residing in kernel
This requires using two copies of the module logic: One residing in kernel
address space and using the kernel symbol table and one residing in user space
using the user space symbol table.
The first provides only kernel module support; the second only PROTECTED mode
@ -139,7 +139,7 @@ In the PROTECTED build, this would require some special start-up logic
in the user address space as the initial steps of the newly started task.
Some kind of dynamic loader, such as ``ld.so``, would have to integrate
with ``crt0`` logic to automatically bind user space tasks to shared libraries
as they are loaded into and memory before the programs ``main()`` function
as they are loaded into memory before the programs ``main()`` function
is called.
@ -147,7 +147,7 @@ KERNEL Build
============
The KERNEL build, however, is a completely different creature.
In that build, the kernel and each process has its own adress space.
In that build, the kernel and each process has its own address space.
This means that a shared library in the kernel build has to be considerably
more complex: In order to be shared, the ``.text`` portion of the module

View file

@ -35,7 +35,7 @@ to any supported architecture.
Here is the map of initialization function calls::
__start()-arch/arm/src/stm32/stm32_start.c
__start()-arch/arm/src/common/stm32/stm32_start_m3m4_v1.c
|
+--*Set stack limit
+--stm32_clockconfig()
@ -45,7 +45,7 @@ Here is the map of initialization function calls::
+--showprogress('A')
+--
+--
+--stm32_boardinitialize()-boards/arm/stm32/stm32f4discovery/src/stm32_boot.c
+--stm32_boardinitialize()-boards/arm/stm32f4/stm32f4discovery/src/stm32_boot.c
| |
| +--stm32_spidev_initialize()-stm32_spi.c:ONLY CHIP SELECTS
| +--stm32_usbinitialize()-
@ -196,7 +196,7 @@ There are few important things to note about this file.
``.section .vectors, ax``. This pseudo operation will place all of the
vectors into a special section call ``.vectors``.
On of the STM32 F4 linker scripts is located at
``nuttx/boards/arm/stm32/stm32f4discovery/scripts/ld.script``.
``nuttx/boards/arm/stm32f4/stm32f4discovery/scripts/ld.script``.
In that file, you can see that section ``.vectors`` is forced to lie
at the very beginning of FLASH memory.
The STM32 F4 can be configured to boot in different ways via strapping.
@ -229,7 +229,7 @@ nuttx/arch/arm/src/stm32_start.c
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The reset vector ``__start`` lies in the file
``nuttx/arch/arm/src/stm32/stm32_start.c`` and does the real,
``nuttx/arch/arm/src/common/stm32/stm32_start_m3m4_v1.c`` and does the real,
low-level architecture-specific initialization. This initialization includes:
1. ``stm32_clockconfig()`` - Initialize the PLLs and peripheral clocking
@ -262,7 +262,7 @@ low-level architecture-specific initialization. This initialization includes:
7. ``stm32_boardinitialize()`` - Board-specific logic is initialized by
calling this function. For the case of the STM32F4Discovery board,
this logic can be found at
``nuttx/boards/arm/stm32/stm32f4discovery/src/stm32_boot.c`` and does
``nuttx/boards/arm/stm32f4/stm32f4discovery/src/stm32_boot.c`` and does
the following operations:
a. ``stm32_spidev_initialize()`` - Initialize SPI chip selects
@ -351,19 +351,19 @@ file and in that case those operations are not performed:
``nx_start()``. However, if the board supports multiple, discontiguous
memory regions, any addition memory regions can be added to the heap
by this function. For the STM32 F4, ``up_addregion()`` is implemented
in ``nuttx/arch/arm/src/stm32/stm32_allocateheap.c``.
in ``nuttx/arch/arm/src/common/stm32/stm32_allocateheap_m3m4_v1.c``.
* ``arm_pminitialize()`` - If ``CONFIG_PM`` is defined, the function must
initialize the power management subsystem. This MCU-specific function
must be called very early in the intialization sequence before any other
must be called very early in the initialization sequence before any other
device drivers are initialized (since they may attempt to register with
the power management subsystem). There is no implementation
of ``up_pminitialize()`` for any STM32 platform.
* ``arm_dmainitialize()`` - Initialize the DMA subsystem.
For the STM32 F4, this DMA initialization can be found in
``nuttx/arch/arm/src/stm32/stm32_dma.c`` (which includes
``nuttx/arch/arm/src/stm32f4xxx_dma.c``).
``nuttx/arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c`` (which includes
``nuttx/arch/arm/src/common/stm32/stm32_dma_m3m4_v1_8ch.c``).
* ``devnull_register()`` - Registers the standard ``/dev/null``.
@ -378,14 +378,14 @@ file and in that case those operations are not performed:
* ``note_register()`` - Registers the standard ``/dev/note``.
* ``arm_serialinit()`` - Initialize the **standard** serial driver
(found at ``nuttx/arch/arm/src/stm32/stm32_serial.c`` STM32 F4).
(found at ``nuttx/arch/arm/src/common/stm32/stm32_serial_m3m4_v1v2v3v4.c`` STM32 F4).
* ``arm_netinitialize()`` - Initialize the network. For the STM32 F4,
this function is in ``nuttx/arch/arm/src/stm32/stm32_eth.c``.
this function is in ``nuttx/arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c``.
* ``arm_usbinitialize()`` - Initialize USB (host or device).
For the STM32 F4, this function is in
``nuttx/arch/arm/src/stm32/stm32_otgfsdev.c``.
``nuttx/arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c``.
* ``arm_l2ccinitialize()`` - Initialize the L2 cache if present
and selected.
@ -448,7 +448,7 @@ This function performed the following specific operations:
for a variety of purposes like misc garbage clean-up.
* ``nx_create_initthread()`` - Once the operating system has been initialized,
this funcions either directly calls ``nx_start_application()`` or creates
this functions either directly calls ``nx_start_application()`` or creates
a thread for running it
* ``nx_start_application()`` - If set in the NuttX configuration,
@ -640,7 +640,7 @@ The resulting ROMFS file system can be found in
* ``board_app_initialize()`` - For the STM32F4Discovery, this architecture
specific initialization can be found at
``boards/arm/stm32/stm32f4discovery/src/stm32_appinit.c``.
``boards/arm/stm32f4/stm32f4discovery/src/stm32_appinit.c``.
This it does things like:
1. Initialize SPI devices.

View file

@ -69,6 +69,8 @@ reside within the task group structure struct ``task_group_s``:
* Opened message queues.
* ``pthread`` keys.
* Support data for ``atexit()``, ``on_exit()``, and/or ``waitpid()``.
* User and group identity when ``CONFIG_SCHED_USER_IDENTITY`` is enabled
(see :ref:`user-identity`).
The exception is the PIC address space used with NXFLAT.
It currently has its own data structure (struct ``dspace_s``,

View file

@ -0,0 +1,71 @@
.. _user-identity:
=======================
User and Group Identity
=======================
When ``CONFIG_SCHED_USER_IDENTITY`` is enabled, each task group maintains POSIX
process credentials. All threads within a task group share the same credentials
(see :ref:`tasks-vs-threads`).
Credentials
===========
The full POSIX three-field credential model is stored in ``struct task_group_s``
(``include/nuttx/sched.h``):
* ``tg_uid`` / ``tg_gid`` — real user and group IDs.
* ``tg_euid`` / ``tg_egid`` — effective IDs used for permission checks.
* ``tg_suid`` / ``tg_sgid`` — saved set-IDs that allow a non-root process to
restore a previously held effective ID.
All six fields are zero-initialized at task creation, so the initial task runs
as root (UID/GID 0) unless explicitly changed.
Inheritance
===========
When a new task is created, ``group_inherit_identity()`` in
``sched/group/group_create.c`` copies all six credential fields from the parent
task group to the child task group.
Privilege Transitions
=====================
``setuid()`` and ``setgid()``
-----------------------------
When the effective ID is zero (root):
* ``setuid(uid)`` sets ``tg_uid``, ``tg_euid``, and ``tg_suid`` to ``uid``.
* ``setgid(gid)`` sets ``tg_gid``, ``tg_egid``, and ``tg_sgid`` to ``gid``.
When the effective ID is non-zero:
* The caller may only set the effective ID to the current real or saved value.
* Any other value causes the function to return ``-1`` with ``errno`` set to
``EPERM``.
``seteuid()`` and ``setegid()``
-------------------------------
When the effective ID is zero, any value may be assigned as the new effective
ID.
When the effective ID is non-zero, the requested value must equal the real or
the saved ID. Otherwise the function returns ``-1`` with ``errno`` set to
``EPERM``.
This implements the standard POSIX pattern of temporarily dropping privileges
with ``seteuid()`` or ``setegid()`` and later restoring them to the saved value.
Configuration
=============
``CONFIG_SCHED_USER_IDENTITY``
Enables per-task-group credential tracking. Without this option, stub
root-only versions of all credential interfaces are provided.
``CONFIG_FS_PERMISSION``
Enables filesystem ownership and permission enforcement. Requires
``CONFIG_SCHED_USER_IDENTITY``.

View file

@ -1,116 +0,0 @@
README
======
Spresense is a compact development board based on Sonys power-efficient
multicore microcontroller CXD5602. It allows developers to create IoT
applications in a very short time and is supported by the Arduino IDE as well
as the more advanced NuttX based SDK.
- Integrated GPS
The embedded GNSS with support for GPS, QZSS and GLONASS enables applications
where tracking is required.
- Hi-res audio output and multi mic inputs
Advanced 192kHz/24 bit audio codec and amplifier for audio output, and
support for up to 8 mic input channels.
- Multicore microcontroller
Spresense is powered by Sony's CXD5602 microcontroller (ARM® Cortex®-M4F × 6
cores), with a clock speed of 156 MHz.
Refer to https://developer.sony.com/develop/spresense/ for further information
about this board.
NOTICE:
To run the nuttx, bootloader for Spresense SDK 2.1.0 or later must be installed.
Configuration sub-directories
-----------------------------
elf
This is a configuration to test apps/examples/elf.
module
This is a configuration to test apps/examples/module.
posix_spawn
This is a configuration to test apps/examples/posix_spawn.
smp
This is a configuration to run Spresense in SMP mode.
wifi
This is a configuration for Spresense + Wi-Fi addon (Telit GS2200M) module.
With this configuration, (1) you can connect Spresense to an existing Wi-Fi
access point (2.4GHz 802.11b/g/n are supported) or (2) you can make
Spresense as a Wi-Fi access point. In both cases, you can login to the
Spresense with telnet, also access to a webserver (NOTE: this case you need
an extension board with microSDHC card)
(1) Station (STA) mode
To run the module in Station mode (i.e. to connect to an existing Wi-Fi
access point), You need to specify SSID with passcode.
nsh> gs2200m ssid-to-connect passcode &
If the connection succeeded, IP address is statically assigned.
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:95:09:00:69:92 at UP
inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
Then, you can run DHCP client (renew command) to obtain IP address as well
as DNS server information. (NOTE: In current configuration, DHCP client on
GS2200M is disabled. If you enable the internal DHCP client, you can not
use DNS client on NuttX)
nsh> renew wlan0 &
renew [6:100]
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:95:09:00:69:92 at UP
inet addr:192.168.1.101 DRaddr:192.168.1.1 Mask:255.255.255.0
Now, you can run telnetd and webserver on Spresense.
nsh> telnetd &
telnetd [7:100]
nsh> webserver &
webserver [9:100]
nsh> Starting webserver
Also, you can run NTP client to adjust the RTC on Spresense. (NOTE: we
assume your network can access to pool.ntp.org, otherwise, you can specify
CONFIG_NETUTILS_NTPCLIENT_SERVER)
nsh> date
Jan 01 00:00:36 1970
nsh> ntpcstart
Started the NTP daemon as PID=11
nsh> date
Jul 30 06:42:13 2019
(2) Access Point (AP) mode
To run the module in AP mode, you need to specify SSID to advertise and
WPA2-PSK passphrase or WEP-key. (NOTE: in AP mode, you can also specify
channel number to use. Also, you need to set CONFIG_WL_GS2200M_ENABLE_WEP=y
if you want to use WEP instead of WPA2-PSK)
nsh> gs2200m -a ssid-to-advertise 8-to-63-wpa2-psk-passphrase &
or
nsh> gs2200m -a ssid-to-advertise 10-hex-digits-wep-key &
If the module was initialized in AP mode, you can see a new IP address is
assigned.
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:95:09:00:69:93 at UP
inet addr:192.168.11.1 DRaddr:192.168.11.1 Mask:255.255.255.0
Now you can connect your PC to the AP with the above SSID and WPA2-PSK
passphrase or WEP-key which you specified.

View file

@ -2,6 +2,333 @@
Sony Spresense
==============
.. include:: README.txt
:literal:
.. tags:: chip:cxd56xx, chip:cxd5602
The `Spresense <https://developer.sony.com/develop/spresense/>`_ is a compact
development board based on Sony's power-efficient multicore microcontroller
CXD5602. It allows developers to create IoT applications in a very short time
and is supported by the Arduino IDE as well as the more advanced NuttX based
SDK.
Key features:
- **Integrated GNSS**: the embedded GNSS with support for GPS, QZSS and
GLONASS enables applications where tracking is required.
- **Hi-res audio output and multi mic inputs**: advanced 192 kHz/24 bit audio
codec and amplifier for audio output, and support for up to 8 mic input
channels.
- **Multicore microcontroller**: Spresense is powered by Sony's CXD5602
microcontroller (ARM® Cortex®-M4F × 6 cores), with a clock speed of 156 MHz.
.. figure:: sony.png
:align: center
Spresense main board pinout (functional, Arduino-compatible and CXD5602
pin names)
Extension Board
===============
The Spresense extension board exposes the main board signals on an
Arduino-compatible header layout and adds a microSD card slot, a headphone
jack and multiple microphone inputs.
.. figure:: sony-base-board.png
:align: center
Spresense extension (base) board pinout
Camera Board
============
The CXD5602PWBCAM2 camera board connects to the dedicated camera connector on
the main board and is supported by the ``video``/``imager`` drivers.
.. figure:: sony-camera.png
:align: center
Spresense camera board (CXD5602PWBCAM2)
Features
========
- Sony CXD5602 microcontroller (ARM® Cortex®-M4F × 6 cores @ 156 MHz)
- 8 MB SPI-Flash (main board), 1.5 MB SRAM
- Integrated GNSS (GPS, QZSS, GLONASS)
- Hi-res audio codec, up to 8 mic input channels
- Camera interface (CXD5602PWBCAM2 support)
- Arduino Uno compatible pin layout (via extension board)
- microSD card slot (via extension board)
- 4 user LEDs and Reset / Boot Recovery buttons
.. note::
To run NuttX, the bootloader for Spresense SDK 2.1.0 or later must be
installed on the board. See `Flashing the bootloader`_ below.
Serial Console
==============
The default serial console is **UART2**, exposed on the ``D00`` (RX) and
``D01`` (TX) Arduino-compatible pins and routed to the USB connector through
the on-board USB-to-serial bridge. It shows up on the host as
``/dev/ttyUSB0`` (Linux) or ``/dev/cu.SLAB_USBtoUART`` (macOS) at 115200 baud,
8N1.
Buttons and LEDs
================
The main board provides four user LEDs (``LED0`` .. ``LED3``), a power LED, a
Reset button and a Boot Recovery button. The user LEDs are available to
software through the standard NuttX user LED interface.
Flashing the bootloader
=======================
Before flashing any NuttX image, the Spresense loader/bootloader binaries must
be installed. Download the loader package matching your SDK version from the
`Spresense firmware download page
<https://developer.spresense.sony-semicon.com/downloads/main-board#firmware>`_
and flash **all** of its files at once with ``flash_writer.py``::
./tools/flash_writer.py -s -c /dev/ttyUSB0 -d -b 115200 -n \
/path/to/spresense-binaries/*.espk \
/path/to/spresense-binaries/*.spk
The ``-n`` (``--no-set-bootable``) option is used because these are loader
components, not the bootable application. The tool relies on the Python
``xmodem`` module (``pip install xmodem`` or ``apt install python3-xmodem``).
Building and Flashing
=====================
Once the bootloader is in place, configure, build and flash any of the
board configurations below. Replace ``<example>`` with the configuration
name you want (e.g. ``wifi``, ``smp``, ``elf``)::
$ ./tools/configure.sh spresense:<example>
$ make -j
$ ./tools/flash_writer.py -s -c /dev/ttyUSB0 -d -b 115200 nuttx.spk
The resulting ``nuttx.spk`` is flashed **without** ``-n`` so it is marked as
the bootable application. Adjust ``/dev/ttyUSB0`` to match the serial port of
your board.
Configurations
==============
Each of the following can be selected as ``<example>`` in the
`Building and Flashing`_ step above.
audio
-----
Audio playback and capture using the CXD5602 on-chip audio subsystem
(``CONFIG_AUDIO_CXD56``).
audio_sdk
---------
Audio configuration using the SDK audio stack with microSD storage
(``CONFIG_AUDIO`` together with SDIO/MMCSD).
camera
------
Camera capture using the ISX012/ISX019 image sensors through the NuttX video
stream interface.
charger
-------
Battery charger example (``apps/examples/charger``) exercising the CXD5602
power-management/charger interface.
coremark
--------
EEMBC CoreMark CPU benchmark (``CONFIG_BENCHMARK_COREMARK``).
elf
---
Tests ``apps/examples/elf`` (loading and running ELF programs).
example_camera
--------------
Camera capture example with live preview on an attached LCD
(``apps/examples/camera``).
example_lcd
-----------
NX graphics demos (``nxdemo``, ``nxhello``, ``nxlines``) rendered on an
attached LCD.
fmsynth
-------
FM sound synthesizer example (``apps/examples/fmsynth``).
getprime
--------
``getprime`` timing/stress test (``apps/testing/getprime``).
lcd
---
LCD support together with a USB composite device (CDC/ACM + mass storage).
lte
---
LTE connectivity using the Spresense LTE extension board (Altair ALT1250
modem).
module
------
Tests ``apps/examples/module`` (loadable kernel modules).
mpy
---
Peripheral demonstration enabling the on-chip ADC, PWM, the camera interface
and microSD automount, started from the board ``spresense_main`` entry point.
nsh
---
Basic NuttShell (NSH) console over the serial port.
nsh_automount
-------------
NSH with automatic mounting of an inserted microSD card.
nsh_trace
---------
NSH with the system trace subsystem enabled for scheduler/syscall tracing.
ostest
------
Standard NuttX OS test suite (``apps/testing/ostest``).
posix_spawn
-----------
Tests ``apps/examples/posix_spawn``.
rndis
-----
USB RNDIS Ethernet gadget with networking examples (FTP client/server, web
server and tcpblaster).
rndis_composite
---------------
Same as ``rndis`` but exposed as part of a USB composite device.
rndis_smp
---------
Same as ``rndis`` but running in SMP mode across the CXD5602 cores.
smp
---
Runs Spresense in SMP (symmetric multiprocessing) mode.
usbmsc
------
USB Mass Storage device example, exposing a microSD card as a USB drive via a
composite (CDC/ACM + MSC) gadget.
usbnsh
------
NuttShell console over USB CDC/ACM instead of the physical UART.
wifi
----
This is a configuration for Spresense + Wi-Fi add-on (Telit GS2200M) module.
With this configuration you can either (1) connect Spresense to an existing
Wi-Fi access point (2.4 GHz 802.11b/g/n are supported) or (2) make Spresense
act as a Wi-Fi access point. In both cases you can log in to the Spresense over
telnet and access a web server (NOTE: for this you need an extension board with
a microSDHC card).
**(1) Station (STA) mode**
To run the module in Station mode (i.e. to connect to an existing Wi-Fi access
point), specify the SSID with its passcode::
nsh> gs2200m ssid-to-connect passcode &
If the connection succeeded, an IP address is statically assigned::
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:95:09:00:69:92 at UP
inet addr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
You can then run the DHCP client (``renew`` command) to obtain an IP address as
well as DNS server information. (NOTE: in the current configuration the DHCP
client on the GS2200M is disabled. If you enable the internal DHCP client you
cannot use the DNS client on NuttX)::
nsh> renew wlan0 &
renew [6:100]
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:95:09:00:69:92 at UP
inet addr:192.168.1.101 DRaddr:192.168.1.1 Mask:255.255.255.0
Now you can run ``telnetd`` and the web server on Spresense::
nsh> telnetd &
telnetd [7:100]
nsh> webserver &
webserver [9:100]
nsh> Starting webserver
You can also run the NTP client to adjust the RTC on Spresense. (NOTE: this
assumes your network can reach pool.ntp.org, otherwise specify
``CONFIG_NETUTILS_NTPCLIENT_SERVER``)::
nsh> date
Jan 01 00:00:36 1970
nsh> ntpcstart
Started the NTP daemon as PID=11
nsh> date
Jul 30 06:42:13 2019
**(2) Access Point (AP) mode**
To run the module in AP mode, specify the SSID to advertise and a WPA2-PSK
passphrase or WEP key. (NOTE: in AP mode you can also specify the channel number
to use. Also, set ``CONFIG_WL_GS2200M_ENABLE_WEP=y`` if you want to use WEP
instead of WPA2-PSK)::
nsh> gs2200m -a ssid-to-advertise 8-to-63-wpa2-psk-passphrase &
or
nsh> gs2200m -a ssid-to-advertise 10-hex-digits-wep-key &
If the module was initialized in AP mode, a new IP address is assigned::
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:95:09:00:69:93 at UP
inet addr:192.168.11.1 DRaddr:192.168.11.1 Mask:255.255.255.0
Now you can connect your PC to the AP with the above SSID and WPA2-PSK
passphrase or WEP key that you specified.
wifi_smp
--------
Same as `wifi`_ but running in SMP mode across the CXD5602 cores.

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

View file

@ -167,19 +167,21 @@ Flashing locked device
1. Unlock the network core::
nrfjprog --recover --coprocessor CP_NETWORK
nrfutil device recover --core network
2. Unlock the application core::
nrfjprog --recover
nrfutil device recover --core application
3. Flash the network core::
nrfjprog --coprocessor CP_NETWORK --program nuttx_net.hex --verify --chiperase
nrfutil device erase --core network
nrfutil device program --firmware nuttx_net.hex --core network
4. Flash the application core::
nrfjprog --program nuttx_app.hex --verify --chiperase
nrfutil device erase --core application
nrfutil device program --firmware nuttx_app.hex --core application
Supported Boards

View file

@ -113,13 +113,14 @@ To get this configuration working with miniboot bootloader follow these steps:
#. flash bootloader::
nrfjprog --program build_boot/nuttx.hex --chiperase --verify
nrfutil device erase
nrfutil device program --firmware build_boot/nuttx.hex
#. flash modem image::
nrfjprog --program build_modem/nuttx.hex
nrfutil device program --firmware build_modem/nuttx.hex
#. reset chip::
nrfjprog --reset
nrfutil device reset

View file

@ -19,14 +19,14 @@ GPS No
Buttons Yes
LEDs No
COEX No
PMIC No
PMIC (ADP5360) No I2C 0x46
Battery monitoring No
Buzzer No
EEPROM (24CW160) No
Low power accelerometer (ADXL362) No
Hi G accelerometer (ADXL372) No
Air quality sensor (HBME680) No
Color sensor (BH1749NUC) No
EEPROM (24CW160) No I2C 0x50
Low power accelerometer (ADXL362) No SPI
Hi G accelerometer (ADXL372) No SPI
Air quality sensor (BME680) No I2C 0x76
Color sensor (BH1749NUC) No I2C 0x38
================================== ======= =============
Serial Console
@ -39,7 +39,11 @@ Serial Console
Configurations
==============
TODO
thingy91_rtt
------------
Configuration with a console over RTT, enabling available peripherals
on the board (WIP).
Flash & Debug
=============

View file

@ -100,11 +100,22 @@ nsh
Basic NuttShell configuration (console enabled in UART0, at 115200 bps).
userled
-------
userleds
--------
This is an nsh configuration with added support for user LEDs.
gpio
----
Basic nsh configuration with GPIO driver support and the :doc:`gpio example
</applications/examples/gpio/index>`.
ws2812
------
Basic nsh configuration with WS2812 driver and example enabled.
usbnsh
------

View file

@ -0,0 +1,124 @@
============
RTL8720F EVB
============
.. tags:: chip:rtl8720f, arch:arm, vendor:realtek
.. todo::
Add a photo of the RTL8720F EVB board here as ``rtl8720f_evb.png`` in this
directory, referenced with a ``.. figure::`` directive.
The RTL8720F EVB is a Realtek RTL8720F evaluation board built around the
RTL8720FBF (QFN40, 4 MB NOR flash). NuttX runs on the KM4TZ application core —
an Arm Cortex-M55-compatible core running at up to 320 MHz. See the
:doc:`RTL8720F chip documentation <../../index>` for the full SoC
specifications and the vendor-SDK dependency.
Features
========
* RTL8720FBF: Arm Cortex-M55-compatible KM4TZ core up to 320 MHz, 512 KB SRAM,
4 MB NOR flash
* Wi-Fi 6 (802.11 b/g/n/ax), 2.4 GHz station and SoftAP
* SPI NOR flash (XIP)
* LOG-UART console
Supported in this NuttX port:
* NSH shell over the LOG-UART console
* littlefs persistent storage mounted at ``/data`` (a dedicated SPI NOR flash
partition), backing the Wi-Fi key-value store
* Wi-Fi station and SoftAP through the ``wapi`` tool
* DHCP client (STA) and DHCP server (SoftAP)
Buttons and LEDs
================
This NuttX port does not wire any user buttons or LEDs.
Configurations
==============
.. code:: console
$ ./tools/configure.sh rtl8720f_evb:<config-name>
nsh
---
Networking-enabled NSH with littlefs at ``/data`` and the ``wapi`` Wi-Fi tool.
The console is the LOG-UART at 1500000 8N1 (the rate is configured by the
bootloader and inherited by NuttX). The Wi-Fi examples below are available from
this configuration.
Wi-Fi
=====
Station (connect to an AP)::
nsh> wapi psk wlan0 <password> 3
nsh> wapi essid wlan0 <ssid> 1
nsh> renew wlan0
SoftAP (become an access point, with a DHCP server for clients)::
nsh> wapi mode wlan0 3
nsh> wapi psk wlan0 <password> 3
nsh> wapi essid wlan0 <ssid> 1
nsh> ifconfig wlan0 192.168.4.1 netmask 255.255.255.0
nsh> dhcpd_start wlan0
Stop the SoftAP with ``wapi essid wlan0 <ssid> 0``.
Building and Flashing
=====================
The build auto-fetches the Realtek ``ameba-rtos`` SDK on first use and a
Realtek ``arm-none-eabi`` toolchain must be on ``PATH``; see the
:doc:`chip documentation <../../index>` for both.
.. code:: console
$ ./tools/configure.sh rtl8720f_evb:nsh
$ make
This produces the two flashable images in the build directory: ``app.bin``
(the NuttX application image, which also bundles the prebuilt Wi-Fi firmware)
and ``boot.bin`` (the bootloader).
After a successful build, flash via one of these methods:
**CLI (Linux/macOS)** — connect a USB-UART adapter (PL2303) and use the
built-in ``make flash`` target:
.. code:: console
$ make flash AMEBA_PORT=/dev/ttyUSB0
The baud rate defaults to 1500000; override with ``AMEBA_BAUD`` if needed.
**GUI (Windows)** — use the Realtek AmebaImageTool (``AmebaImageTool.exe``
under ``tools/ameba/ImageTool/`` in the SDK tree) to select ``boot.bin`` and
``app.bin``.
See the `Realtek Ameba ImageTool guide
<https://aiot.realmcu.com/en/latest/tools/image_tool/index.html>`_ for the
Windows GUI tool and download-mode entry (hold the download button /
power-cycle with the ``UART_LOG_TX`` line asserted).
**Serial console** — after flashing, connect to the LOG-UART at 1500000 8N1::
$ picocom -b 1500000 /dev/ttyUSB0
Other tools: ``screen /dev/ttyUSB0 1500000`` or ``minicom -b 1500000 -D /dev/ttyUSB0``.
License Exceptions
==================
This board depends on Realtek vendor code that is not part of NuttX and is
subject to its own license:
* The prebuilt Wi-Fi / Bluetooth firmware image and the Realtek ``ameba-rtos``
SDK libraries/headers linked into the image. See the SDK's own license; the
SDK is auto-fetched and is not redistributed in the NuttX tree.

View file

@ -0,0 +1,77 @@
================
Realtek RTL8720F
================
The Realtek RTL8720F is a low-power multi-protocol wireless SoC from the
Realtek Ameba IoT family, combining 2.4 GHz Wi-Fi 6, Bluetooth LE and Thread
(IEEE 802.15.4) connectivity, and 2.4 GHz Wi-Fi radar sensing.
NuttX runs on the **KM4TZ application core** — an Arm Cortex-M55-compatible
core (Real-M300, Armv8.1-M) running at up to **320 MHz**, with a
single-precision FPU, DSP extensions and Arm TrustZone-M.
Highlights
==========
- **CPU:** Arm Cortex-M55-compatible application core, up to 320 MHz, with
FPU + DSP instructions, TrustZone-M and instruction/data caches.
- **Memory:** 512 KB on-chip SRAM; external QSPI NOR flash (up to 104 MHz)
and/or DDR PSRAM (up to 200 MHz), depending on the part number.
- **Wireless:** Wi-Fi 6 (802.11 b/g/n/ax), 2.4 GHz, up to 114.7 Mbps,
WPA/WPA2/WPA3; Bluetooth LE 5.x; Thread (IEEE 802.15.4); and 2.4 GHz Wi-Fi
radar sensing (CSI/RSSI).
- **Peripherals:** UART, SPI, I2C, I2S, SDIO, PWM, ADC, IR, GDMA, RTC and
watchdogs (count varies by package); some I/O groups support 5 V levels.
- **Security:** Secure Boot, TrustZone-M, AES/SHA and ECDSA/RSA crypto
engines, Flash decryption, OTP, and a true random number generator.
- **Package:** QFN40.
Memory
======
============ ============= =======
Block Start Address Length
============ ============= =======
SRAM 0x2000_0000 512 KB
============ ============= =======
The on-chip SRAM holds the system heap and application. The flash is an SPI
NOR accessed through the SDK XIP path. The exact flash / PSRAM size depends on
the part number — for example the RTL8720FBF has 4 MB of NOR flash and no
PSRAM.
Vendor SDK Dependency
=====================
The build depends on Realtek's open ``ameba-rtos`` SDK, which is **not** part
of the NuttX tree. It provides the Wi-Fi / Bluetooth firmware and the
low-level chip libraries. The first build auto-fetches the pinned revision (a
shallow ``git clone`` of ``https://github.com/Ameba-AIoT/ameba-rtos.git``) into
``arch/arm/src/common/ameba/ameba-rtos`` (git-ignored) and builds against it
unmodified. To use a local checkout instead of auto-fetching, export
``AMEBA_SDK`` to its path.
Toolchain
=========
A matching Realtek ARM toolchain (``arm-none-eabi`` from the Realtek asdk
release) is required and is fetched automatically by the board build. NuttX
links its own libc / libm and reuses the SDK's ``app_start()`` as the image
entry point.
Supported Features
==================
- NSH over the LOG-UART console
- littlefs persistent storage at ``/data`` on the SPI NOR flash
- Wi-Fi station (scan / connect) and SoftAP via the ``wapi`` tool
- Networking on NuttX's own TCP/IP stack, with DHCP client and DHCP server
Boards
======
.. toctree::
:glob:
:maxdepth: 1
boards/*/*

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,126 @@
==========
PKE8721DAF
==========
.. tags:: chip:rtl8721dx, arch:arm, vendor:realtek
.. figure:: PKE8721DAF.png
:scale: 50 %
:align: center
:alt: Realtek PKE8721DAF development board
The PKE8721DAF development board.
The PKE8721DAF is a Realtek RTL8721Dx development board built around the
RTL8721DAF (QFN48, 4 MB NOR flash). NuttX runs on the KM4 application core —
an Arm Cortex-M55-compatible core running at up to 345 MHz. See the
:doc:`RTL8721Dx chip documentation <../../index>` for the full SoC
specifications and the vendor-SDK dependency.
Features
========
* RTL8721DAF: Arm Cortex-M55-compatible KM4 core up to 345 MHz, 512 KB SRAM,
4 MB NOR flash
* Wi-Fi 4 dual-band (2.4 / 5 GHz) station and SoftAP
* SPI NOR flash (XIP)
* LOG-UART console
Supported in this NuttX port:
* NSH shell over the LOG-UART console
* littlefs persistent storage mounted at ``/data`` (a dedicated SPI NOR flash
partition), backing the Wi-Fi key-value store
* Wi-Fi station and SoftAP through the ``wapi`` tool
* DHCP client (STA) and DHCP server (SoftAP)
Buttons and LEDs
================
This NuttX port does not wire any user buttons or LEDs.
Configurations
==============
.. code:: console
$ ./tools/configure.sh pke8721daf:<config-name>
nsh
---
Networking-enabled NSH with littlefs at ``/data`` and the ``wapi`` Wi-Fi tool.
The console is the LOG-UART at 1500000 8N1 (the rate is configured by the
bootloader and inherited by NuttX). The Wi-Fi examples below are available from
this configuration.
Wi-Fi
=====
Station (connect to an AP)::
nsh> wapi psk wlan0 <password> 3
nsh> wapi essid wlan0 <ssid> 1
nsh> renew wlan0
SoftAP (become an access point, with a DHCP server for clients)::
nsh> wapi mode wlan0 3
nsh> wapi psk wlan0 <password> 3
nsh> wapi essid wlan0 <ssid> 1
nsh> ifconfig wlan0 192.168.4.1 netmask 255.255.255.0
nsh> dhcpd_start wlan0
Stop the SoftAP with ``wapi essid wlan0 <ssid> 0``.
Building and Flashing
=====================
The build auto-fetches the Realtek ``ameba-rtos`` SDK on first use and a
Realtek ``arm-none-eabi`` toolchain must be on ``PATH``; see the
:doc:`chip documentation <../../index>` for both.
.. code:: console
$ ./tools/configure.sh pke8721daf:nsh
$ make
This produces the two flashable images in the build directory: ``app.bin``
(the NuttX application image, which also bundles the prebuilt Wi-Fi firmware)
and ``boot.bin`` (the bootloader).
After a successful build, flash via one of these methods:
**CLI (Linux/macOS)** — connect a USB-UART adapter (PL2303) and use the
built-in ``make flash`` target:
.. code:: console
$ make flash AMEBA_PORT=/dev/ttyUSB0
The baud rate defaults to 1500000; override with ``AMEBA_BAUD`` if needed.
**GUI (Windows)** — use the Realtek AmebaImageTool (``AmebaImageTool.exe``
under ``tools/ameba/ImageTool/`` in the SDK tree) to select ``boot.bin`` and
``app.bin``.
See the `Realtek Ameba ImageTool guide
<https://aiot.realmcu.com/en/latest/tools/image_tool/index.html>`_ for the
Windows GUI tool and download-mode entry (hold the download button /
power-cycle with the ``UART_LOG_TX`` line asserted).
**Serial console** — after flashing, connect to the LOG-UART at 1500000 8N1::
$ picocom -b 1500000 /dev/ttyUSB0
Other tools: ``screen /dev/ttyUSB0 1500000`` or ``minicom -b 1500000 -D /dev/ttyUSB0``.
License Exceptions
==================
This board depends on Realtek vendor code that is not part of NuttX and is
subject to its own license:
* The prebuilt Wi-Fi / Bluetooth firmware image and the Realtek ``ameba-rtos``
SDK libraries/headers linked into the image. See the SDK's own license; the
SDK is auto-fetched and is not redistributed in the NuttX tree.

View file

@ -0,0 +1,79 @@
=================
Realtek RTL8721Dx
=================
The Realtek RTL8721Dx is a low-power dual-band Wi-Fi and Bluetooth LE SoC from
the Realtek Ameba IoT family, targeting smart-home control, wireless audio,
battery-powered cameras, smart locks and other IoT products.
NuttX runs on the **KM4 application core** — an Arm Cortex-M55-compatible core
(Real-M300, Armv8.1-M) running at up to **345 MHz**, with a single-precision
FPU, DSP extensions and Arm TrustZone-M.
Highlights
==========
- **CPU:** Arm Cortex-M55-compatible application core, up to 345 MHz, with
FPU + DSP instructions, TrustZone-M, and 16 KB I-Cache + 16 KB D-Cache.
- **Memory:** 512 KB on-chip SRAM; external QSPI NOR flash (up to 104 MHz)
and/or DDR PSRAM (up to 200 MHz), depending on the part number.
- **Wireless:** Wi-Fi 4 (802.11 a/b/g/n), dual-band 2.4 GHz / 5 GHz, 1T1R, up
to 150 Mbps, WPA/WPA2/WPA3; Bluetooth LE 5.0.
- **Peripherals:** UART x4, I2C x2, SPI x2, QSPI/OSPI, I2S x2, DMIC x2,
PWM x8, ADC + cap-touch, USB 2.0 full-speed device, SDIO device, IR, RTC,
independent/system watchdogs, GDMA, and up to 64 GPIO (count varies by
package).
- **Security:** Secure Boot, TrustZone-M, AES/SHA hardware crypto engine, OTP,
and a true random number generator (PSA Level 2).
- **Packages:** QFN48, QFN68 and BGA100.
Memory
======
============ ============= =======
Block Start Address Length
============ ============= =======
SRAM 0x2000_0000 512 KB
============ ============= =======
The on-chip SRAM holds the system heap and application. The flash is an SPI
NOR accessed through the SDK XIP path. The exact flash / PSRAM size depends on
the part number — for example the RTL8721DAF has 4 MB of NOR flash and no
PSRAM.
Vendor SDK Dependency
=====================
The build depends on Realtek's open ``ameba-rtos`` SDK, which is **not** part
of the NuttX tree. It provides the Wi-Fi / Bluetooth firmware and the
low-level chip libraries. The first build auto-fetches the pinned revision (a
shallow ``git clone`` of ``https://github.com/Ameba-AIoT/ameba-rtos.git``) into
``arch/arm/src/common/ameba/ameba-rtos`` (git-ignored) and builds against it
unmodified. To use a local checkout instead of auto-fetching, export
``AMEBA_SDK`` to its path.
Toolchain
=========
A matching Realtek ARM toolchain (``arm-none-eabi`` from the Realtek asdk
release) is required and is fetched automatically by the board build. NuttX
links its own libc / libm and reuses the SDK's ``app_start()`` as the image
entry point.
Supported Features
==================
- NSH over the LOG-UART console
- littlefs persistent storage at ``/data`` on the SPI NOR flash (a dedicated
partition), backing the Wi-Fi key-value store
- Wi-Fi station (scan / connect) and SoftAP via the ``wapi`` tool
- Networking on NuttX's own TCP/IP stack, with DHCP client and DHCP server
Boards
======
.. toctree::
:glob:
:maxdepth: 1
boards/*/*

View file

@ -228,13 +228,13 @@ OpenOCD
=======
I have also used OpenOCD with the M3 Wildfire. In this case, I used
the Olimex USB ARM OCD. See the script in boards/arm/stm32/fire-stm32v2/tools/oocd.sh
the Olimex USB ARM OCD. See the script in boards/arm/stm32f1/fire-stm32v2/tools/oocd.sh
for more information. Using the script:
- Start the OpenOCD GDB server::
cd <nuttx-build-directory>
boards/arm/stm32/fire-stm32v2/tools/oocd.sh $PWD
boards/arm/stm32f1/fire-stm32v2/tools/oocd.sh $PWD
- Load NuttX::
@ -324,7 +324,7 @@ M3 Wildfire-specific Configuration Options
CONFIG_ARCH_CHIP_name - For use in C code to identify the exact chip:
CONFIG_ARCH_CHIP_STM32
CONFIG_ARCH_CHIP_STM32F1
CONFIG_ARCH_CHIP_STM32F103VE
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock

View file

@ -517,7 +517,7 @@ NOTES:
ADC_IN8 (PB0) CON5 CN14 Pin2
ADC_IN9 (PB1) CON5 CN14 Pin1
The signal selection is hard-coded in boards/arm/stm32/shenzhou/src/up_adc.c: The
The signal selection is hard-coded in boards/arm/stm32f1/shenzhou/src/up_adc.c: The
potentiometer input (only) is selected.
These selections will enable sampling the potentiometer input at 100Hz using

View file

@ -87,13 +87,13 @@ OpenOCD
=======
I have also used OpenOCD with the STM3210E-EVAL. In this case, I used
the Olimex USB ARM OCD. See the script in boards/arm/stm32/stm3210e-eval/tools/oocd.sh
the Olimex USB ARM OCD. See the script in boards/arm/stm32f1/stm3210e-eval/tools/oocd.sh
for more information. Using the script:
- Start the OpenOCD GDB server::
cd <nuttx-build-directory>
boards/arm/stm32/stm3210e-eval/tools/oocd.sh $PWD
boards/arm/stm32f1/stm3210e-eval/tools/oocd.sh $PWD
- Load NuttX::
@ -171,7 +171,7 @@ More complex temperature sensor operations are also available. See the
IOCTL commands enumerated in include/nuttx/sensors/lm75.h. Also read the
descriptions of the stm32_lm75initialize() and stm32_lm75attach()
interfaces in the arch/board/board.h file (sames as
boards/arm/stm32/stm3210e-eval/include/board.h).
boards/arm/stm32f1/stm3210e-eval/include/board.h).
NSH Command Line Application
----------------------------
@ -812,7 +812,7 @@ NOTES:
CONFIG_ARCH_CUSTOM_PMINIT=y
CONFIG_ARCH_CUSTOM_PMINIT moves the PM initialization from
arch/arm/src/stm32/stm32_pminitialiaze.c to boards/arm/stm32/stm3210-eval/src/stm32_pm.c.
arch/arm/src/common/stm32/stm32_pminitialize_m3m4_v1.c to boards/arm/stm32f1/stm3210e-eval/src/stm32_pm.c.
This allows us to support board-specific PM initialization.::
CONFIG_ARCH_IDLE_CUSTOM=y
@ -824,8 +824,8 @@ NOTES:
management.
The configuration CONFIG_ARCH_IDLE_CUSTOM allows us to "steal" the
normal STM32 IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace
this with our own custom IDLE loop (at boards/arm/stm32/stm3210-eval/src/up_idle.c).
normal STM32 IDLE loop (of arch/arm/src/common/stm32/stm32_idle_m3m4_v1.c) and replace
this with our own custom IDLE loop (at boards/arm/stm32f1/stm3210e-eval/src/up_idle.c).
4. Here are some additional things to note in the configuration::

View file

@ -186,7 +186,7 @@ instead of 64KiB as documented in the datasheet and reported by its internal
register.
In order to enable 128KiB you need modify the linker script to reflect this
new size. Open the boards/arm/stm32/stm32f103-minimum/scripts/ld.script and replace::
new size. Open the boards/arm/stm32f1/stm32f103-minimum/scripts/ld.script and replace::
flash (rx) : ORIGIN = 0x08000000, LENGTH = 64K
@ -358,7 +358,7 @@ enable/disable these options using "make menuconfig" ::
Memory Management --->
[*] Small memory model
Also change the boards/arm/stm32/stm32f103-minimum/scripts/ld.script file to use 128KB
Also change the boards/arm/stm32f1/stm32f103-minimum/scripts/ld.script file to use 128KB
of Flash instead 64KB (since this board has a hidden 64KB flash) :
MEMORY

View file

@ -12,7 +12,7 @@ LEDs
It is assumed that STMicro STM32F100RB generic board board has one LED on PA0.
You should configure the port and pin number in
boards/arm/stm32/stm32vldiscovery/src/stm32vldiscovery.h. This LED is not used by
boards/arm/stm32f1/stm32vldiscovery/src/stm32vldiscovery.h. This LED is not used by
the board port unless CONFIG_ARCH_LEDS is defined. In that case, the usage by
the board port is defined in include/board.h and src/up_leds.c. The LED is used
to encode OS-related events as follows::

View file

@ -79,7 +79,7 @@ Using JTAG
The Clicker2 comes with the mikroBootloader installed. That bootloader
has not been used and is possibly incompatible with the Clicker2-STM32
linker script at boards/arm/stm32/clicker2-stm32/scripts/flash.ld. Often code must
linker script at boards/arm/stm32f4/clicker2-stm32/scripts/flash.ld. Often code must
be built to execute at an offset in to FLASH when a bootloader is used.
Certainly that is the case for the ST-Micro DFU bootloader but I am not
aware of the requirements for use with the mikroBootloader.

View file

@ -79,6 +79,6 @@ package as flexible as, say, an STM32F4 Discovery board.
Build Instructions
==================
The boards/arm/stm32/omnibusf4/nsh/defconfig file creates a basic setup, and
The boards/arm/stm32f4/omnibusf4/nsh/defconfig file creates a basic setup, and
includes drivers for all supported onboard chips. The console and
command prompt are sent to USART3.

View file

@ -517,7 +517,7 @@ MAPPING TO STM32 F4::
4 Also the reset pin for the CS43L22 audio Codec.
NOTE: The configuration to test this LCD configuration is available at
boards/arm/stm32/stm32f4discovery/nxlines. As of this writing, I have not seen the
boards/arm/stm32f4/stm32f4discovery/nxlines. As of this writing, I have not seen the
LCD working so I probably have some things wrong.
I might need to use a bit-banging interface. Below is the pin configuration
@ -613,7 +613,7 @@ that I am using::
Darcy Gong recently added support for the UG-2864HSWEG01 OLED which is also
an option with this configuration. I have little technical information about
the UG-2864HSWEG01 interface (see boards/arm/stm32/stm32f4discovery/src/up_ug2864hsweg01.c).
the UG-2864HSWEG01 interface (see boards/arm/stm32f4/stm32f4discovery/src/up_ug2864hsweg01.c).
NiceRF LoRa (2AD66-LoRa V2)
===========================
@ -639,7 +639,7 @@ connect the CS to PA4, connect RST to PE1 and finally connect INT to PE4.
The next step is to enable the ENC28J60 in the menuconfig ("make menuconfig")
and the necessary Network configuration, you can use the
boards/arm/stm32/fire-stm32v2/configs/nsh/defconfig as reference.
boards/arm/stm32f1/fire-stm32v2/configs/nsh/defconfig as reference.
HCI UART
========
@ -1202,7 +1202,7 @@ NOTES:
The HCI UART selection can be changed by re-configuring and assigning
the different U[S]ART to the HCI. The U[S]ART pin selections can be
changed by modifying the disambiguation definitions in
boards/arm/stm32/stm32f4discovery/include/board.h
boards/arm/stm32f4/stm32f4discovery/include/board.h
I have been testing with the DVK_BT960_SA board via J10 as follows::
@ -2021,7 +2021,7 @@ NOTES:
CONFIG_ARCH_CUSTOM_PMINIT=y
CONFIG_ARCH_CUSTOM_PMINIT moves the PM initialization from
arch/arm/src/stm32/stm32_pminitialiaze.c to boards/arm/stm32/stm3210-eval/src/stm32_pm.c.
arch/arm/src/common/stm32/stm32_pminitialize_m3m4_v1.c to boards/arm/stm32f1/stm3210e-eval/src/stm32_pm.c.
This allows us to support board-specific PM initialization.::
CONFIG_ARCH_IDLE_CUSTOM=y
@ -2033,8 +2033,8 @@ NOTES:
management.
The configuration CONFIG_ARCH_IDLE_CUSTOM allows us to "steal" the
normal STM32 IDLE loop (of arch/arm/src/stm32/stm32_idle.c) and replace
this with our own custom IDLE loop (at boards/arm/stm32/stm3210-eval/src/up_idle.c).
normal STM32 IDLE loop (of arch/arm/src/common/stm32/stm32_idle_m3m4_v1.c) and replace
this with our own custom IDLE loop (at boards/arm/stm32f1/stm3210e-eval/src/up_idle.c).
3. Here are some additional things to note in the configuration::

View file

@ -389,7 +389,7 @@ Here are a few tips before you start that effort:
on the command line.
Startup files will probably cause you some headaches. The NuttX startup file
is arch/arm/src/stm32/stm32_vectors.S. With RIDE, I have to build NuttX
is arch/arm/src/stm32f4/gnu/stm32_vectors.S. With RIDE, I have to build NuttX
one time from the Cygwin command line in order to obtain the pre-built
startup object needed by RIDE.

View file

@ -177,7 +177,7 @@ You must use a 3.3 TTL to RS-232 converter or a USB to 3.3V TTL
Use make menuconfig to configure USART6 as the console::
CONFIG_STM32F7_USART6=y
CONFIG_STM32_USART6=y
CONFIG_USARTs_SERIALDRIVER=y
CONFIG_USARTS_SERIAL_CONSOLE=y
CONFIG_USART6_RXBUFSIZE=256
@ -213,7 +213,7 @@ You must use a 3.3 TTL to RS-232 converter or a USB to 3.3V TTL::
Use make menuconfig to configure USART8 as the console::
CONFIG_STM32F7_UART8=y
CONFIG_STM32_UART8=y
CONFIG_UART8_SERIALDRIVER=y
CONFIG_UART8_SERIAL_CONSOLE=y
CONFIG_UART8_RXBUFSIZE=256

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