Compare commits

...

26 commits

Author SHA1 Message Date
Gregory Nutt
725bdfb0e8 tools/sethost.sh: Correct error in setting a different host.
In an older PR, the standard kconfig-tweak calls were replaced with sed edit.  This is an incorrect change and results in invalid configurations.  This change restores the use of kconfig-tweak and always generates correct configurations.

This change resolves issue #386

sed edits do not handle all of the dependencies correct and generates invalid configurations.  Most defconfig files specify Linux by default, so you will only see the effect of the corruped configuration when sethost changes changes to a different configuration.  Then, when 'make olddefconfig' is subsequentyly run, the corruption in the defconfig file is reflected by warnings such as:

   $ tools/configure.sh -c stm32f4discovery:nsh
      Copy files
      Select CONFIG_HOST_WINDOWS=y
      Select CONFIG_WINDOWS_CYGWIN=y
      Refreshing...
    .config:62:warning: override: reassigning to symbol HOST_WINDOWS
    .config:62:warning: override: HOST_WINDOWS changes choice state

Those warnings are eliminated by this changed.

Tested by repeatedly doing:

  tools/configure.sh -c stm32f4discovery:nsh
2020-04-28 00:09:09 +01:00
Gregory Nutt
3eaba41ab9 tools/incdir.sh: Correct error in select of include path
Commit 3b9efc95a2 introduced an error in the generation of include file paths.  The logic that determined if cygpath should be called to create a Windows native path for the case of Cygwin using a native toolchain was incorrect.  This corrects this warning:

 ./tools/configure.sh -c sim:nsh
$ make
<CUT>
make[1]: Entering directory '/home/btashton/apache/apps'
make[2]: Entering directory '/home/btashton/apache/apps/builtin'
./exec_builtin.c:54:10: fatal error: builtin/builtin.h: No such file or directory
   54 | #include "builtin/builtin.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ERROR: cc failed: 1
       command: cc -MT ./exec_builtin.home.btashton.apache.apps.builtin.o  -M -Wall -Wstrict-prototypes -Wshadow -Wundef -g -fno-builtin -fno-common -I. -isystem /home/btashton/apache/nuttx/include -D__KERNEL__ -pipe -I C:\cygwin64\home\btashton\apache\apps\include ./exec_builtin.c
make[2]: *** [/home/btashton/apache/apps/Application.mk:224: .depend] Error 1
make[2]: Leaving directory '/home/btashton/apache/apps/builtin'
make[1]: *** [Makefile:67: /home/btashton/apache/apps/builtin_depend] Error 2

In this case a Cygwin POSIX toolchain is being used by the path in the CFLAGS to apps/include is incorrectly a Windows native path.  This error is corrected by this change to tools/incdir.sh
2020-04-27 11:01:26 -06:00
Ouss4
9cf7649d76 Update disclaimer 2020-04-25 16:00:02 -06:00
Ouss4
932c2f3b6f Update the disclaimer to note that some ASF files don't have correct ASF header 2020-04-25 21:15:09 +01:00
Gregory Nutt
c5f306a087 Remove the obsolete ChangeLog file
We do not intend to update the ChangeLog file for releases past 8.2.  It used to be a stepping stone between the 'git log' and the ReleaseNotes.  However, it no longer serves that purpose.  In fact it has no purpose at all; all of the change history is in the 'git log'.  That is where people look for historical information, not in the obsolete ChangeLog.
2020-04-24 22:07:11 +01:00
Gregory Nutt
253034356e Remove tools/logparser.c
Remove tools/logparser.c.  This tool converted 'git log' output into the format used by the obsoleted ChangeLog files.  Since the ChangeLog files are obsoleted, the tool servers no purpose.
2020-04-24 22:07:11 +01:00
Gregory Nutt
0335c5251e Fix a typo in PR860
README.txt. Should be incubator-nuttx-apps, not incubator-apps.
2020-04-24 19:31:26 +01:00
Ouss4
07f0d7f3ee NOTICE: Move "This product includes software developed at the ASF” to the top 2020-04-24 15:11:01 -03:00
Gregory Nutt
479fbdb234 Remove improper uImage file
Remove boards/arm/sama5/sama5d3-xplained/boot/uImage that can in inadvertantly with a PR merge.

Also, change "/uImage" to just "uImage" in the top-level .gitignore file so that all occurences of uImage will be ignored, not just versions in the nuttx/ top-level directory.
2020-04-24 18:16:39 +01:00
Nathan Hartman
8f01ded09d README.txt: Address issues raised in -RC0 review
* Add INTRODUCTION section with a brief summary of Apache NuttX
    (Incubating), a link to documentation at the project wiki, and
    a note about the project's incubation status. Most of this
    text is copied from the project website, with some minor edits
    for this README format.

  * Add COMMUNITY section with information on Getting Help, the
    project's Mailing Lists, Issue Tracker, Source Code, and
    Website Source Code. Like the text in INTRODUCTION, most of
    this text is copied from the project website, with some minor
    edits for this README format.

  * Update download and GIT locations.
2020-04-24 17:01:54 +01:00
Masayuki Ishikawa
4401e5b280 mm: Fix heap corruption in protected build
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-23 17:49:14 -06:00
Brennan Ashton
ca367a259b CI: Add logic for determining which branches of OS App and Testing repos should be used 2020-04-23 17:04:29 -06:00
Xiang Xiao
ac880be495 build.yaml: Change arm-11 to arm-12
since arm-12 finish more quickly than arm-11

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-23 17:04:29 -06:00
Xiang Xiao
60ec2b408c build.yml: Remove the tail space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-23 17:04:29 -06:00
Brennan Ashton
a1f1c53856 Add retry to pull docker image
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-04-23 17:04:29 -06:00
liuhaitao
0b8fe43a69 CI: refine checkpatch commits in check.yml
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-23 17:04:29 -06:00
Ouss4
cb16dfbc30 Update release notes in preparation for the 9.0.0 release. 2020-04-19 20:02:46 -06:00
Gregory Nutt
4817a71d40 TODO: Remove simulator SMP bug
My understanding is the Xiao Xiang has corrected this problem so it should no longer be carried as a bug
2020-04-19 20:02:46 -06:00
Ouss4
8d3f953a31 tools/: Update version generation tools to account for the patch number. 2020-04-19 20:02:46 -06:00
Xiang Xiao
666d1d612f Fix typo in boards/arm/cxd56xx/drivers/camera/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 20:02:46 -06:00
Nathan Hartman
db52820e7c kinetis: Fix typos
arch/arm/include/kinetis/kinetis_pmc.h:

    * Fix several typos in comments.
    * Rewrap some comment lines.
    * Fix define KINETIS_PMC_VERSION_UKN: Put -1 in
      parenthesis for safety.
    * Fix nxstyle complaint regarding long line.
2020-04-18 09:09:56 -06:00
YAMAMOTO Takashi
8b4cfbbd85 doc: Update a few wiki references
It's my best guess because the old wiki URLs don't work anymore.
2020-04-18 09:09:40 -06:00
YAMAMOTO Takashi
028e03c99c doc: Fix semaphore related function names 2020-04-18 09:09:12 -06:00
liuhaitao
e4d5363935 Fix sixlowpan_framer.c build warnings under macos
sixlowpan/sixlowpan_framer.c:104:20: warning: unused function 'sixlowpan_saddrnull'
      [-Wunused-function]
static inline bool sixlowpan_saddrnull(FAR const uint8_t *saddr)
                   ^
sixlowpan/sixlowpan_framer.c:124:20: warning: unused function 'sixlowpan_eaddrnull'
      [-Wunused-function]
static inline bool sixlowpan_eaddrnull(FAR const uint8_t *eaddr)
                   ^
2 warnings generated.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-17 19:45:59 -03:00
liuhaitao
a5540fdfb6 Fix sixlowpan_utils.c nxstyle complaints
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-17 19:45:59 -03:00
liuhaitao
c269a6e7ad Fix sixlowpan build break with -Werror option under macos
sixlowpan/sixlowpan_utils.c:535:20: error: unused function 'sixlowpan_issaddrbased' [-Werror,-Wunused-function]
static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr,
                   ^
sixlowpan/sixlowpan_utils.c:543:20: error: unused function 'sixlowpan_iseaddrbased' [-Werror,-Wunused-function]
static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr,
                   ^
2 errors generated.
make[1]: *** [sixlowpan_utils.o] Error 1

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-17 19:45:59 -03:00
29 changed files with 787 additions and 28604 deletions

View file

@ -14,101 +14,201 @@ name: Build
on:
pull_request:
push:
branches:
- master
- 'releases/*'
tags:
jobs:
Fetch-Source:
runs-on: ubuntu-latest
steps:
- name: Determine Target Branches
id: gittargets
shell: bash
run: |
TESTING_REF="master" # Always use master for testing
OS_REF=""
APPS_REF=""
REF=$GITHUB_REF
# If a base ref is set this is a PR and we will want to use
# the base ref instead of the ref that triggered the event
if [ ${GITHUB_BASE_REF} ]; then
REF=refs/heads/$GITHUB_BASE_REF
fi
echo "Working with ref: $REF"
# We modify for all tags and release branches
if [[ $REF =~ refs/heads/releases/*|refs/tags/* ]]; then
if [[ $REF =~ refs/heads/* ]]
then
REF_NAME=${REF##refs/heads/}
echo "Working with a branch: $REF_NAME"
else
REF_NAME=${REF##refs/tags/}
echo "Working with a tag: $REF_NAME"
fi
# Determine the repo and leave that unset to use the normal checkout behavior
# of using the merge commit instead of HEAD
case $GITHUB_REPOSITORY in
"apache/incubator-nuttx")
# OS
echo "Triggered by change in OS"
APPS_REF=$REF_NAME
;;
"apache/incubator-nuttx-apps" )
# APPS
OS_REF=$REF_NAME
echo "Triggered by change in APPS"
;;
*)
echo "Trigger by change on $GITHUB_REPOSITORY. This is unexpected."
;;
esac
fi
echo ::set-output name=os_ref::$OS_REF
echo ::set-output name=apps_ref::$APPS_REF
echo ::set-output name=testing_ref::$TESTING_REF
- name: Checkout nuttx repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx
ref: ${{ steps.gittargets.outputs.os_ref }}
path: sources/nuttx
fetch-depth: 1
- name: Checkout apps repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx-apps
ref: ${{ steps.gittargets.outputs.apps_ref }}
path: sources/apps
fetch-depth: 1
- name: Checkout testing repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx-testing
ref: ${{ steps.gittargets.outputs.testing_ref }}
path: sources/testing
fetch-depth: 1
- name: Create Source Bundle
run: tar -czf sources.tar.gz sources
- name: Archive Source Bundle
uses: actions/upload-artifact@v1
with:
name: source-bundle
path: sources.tar.gz
- name: Cache Source
id: cache-source
uses: actions/cache@v1
with:
path: sources
key: build-sources-${{ github.run_id }}
Linux:
runs-on: ubuntu-18.04
needs: Fetch-Source
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
strategy:
matrix:
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, mips-riscv-x86-xtensa, sim]
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, mips-riscv-x86-xtensa, sim]
steps:
- name: Checkout nuttx repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx
path: nuttx
fetch-depth: 0
- name: Fetch Cached Source
id: cache-source
uses: actions/cache@v1
with:
path: sources-cache
key: build-sources-${{ github.run_id }}
- name: Prevent Updating Source Cache
if: steps.cache-source.outputs.cache-hit == 'true'
run: mv sources-cache sources
- name: Download Source Artifact
if: steps.cache-source.outputs.cache-hit != 'true'
uses: actions/download-artifact@v1
with:
name: source-bundle
path: ./
- name: Extract Source Artifact
if: steps.cache-source.outputs.cache-hit != 'true'
run: tar -xf sources.tar.gz
- name: Fetch nuttx tags
run: |
cd nuttx
git fetch --tags
- name: Checkout apps repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx-apps
path: apps
fetch-depth: 0
- name: Checkout testing repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx-testing
path: testing
- name: Docker Login
uses: azure/docker-login@v1
with:
login-server: docker.pkg.github.com
username: ${GITHUB_ACTOR}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run builds
uses: ./testing/.github/actions/ci-container
env:
BLOBDIR: /tools/blobs
with:
run: |
cd testing
./cibuild.sh -x -G testlist/${{matrix.boards}}.dat
- name: Docker Login
uses: azure/docker-login@v1
with:
login-server: docker.pkg.github.com
username: ${GITHUB_ACTOR}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Pull
uses: nick-invision/retry@v1
with:
timeout_minutes: 10
max_attempts: 3
retry_wait_seconds: 10
command: docker pull docker.pkg.github.com/apache/incubator-nuttx-testing/nuttx-ci-linux
- name: Run builds
uses: ./sources/testing/.github/actions/ci-container
env:
BLOBDIR: /tools/blobs
with:
run: |
git -C sources/nuttx fetch --tags
cd sources/testing
./cibuild.sh -x -G testlist/${{matrix.boards}}.dat
macOS:
runs-on: macos-10.15
needs: Fetch-Source
strategy:
matrix:
boards: [arm-11, mips-riscv-x86-xtensa, sim]
boards: [arm-12, mips-riscv-x86-xtensa, sim]
steps:
- name: Checkout nuttx repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx
path: nuttx
fetch-depth: 0
- name: Fetch Cached Source
id: cache-source
uses: actions/cache@v1
with:
path: sources-cache
key: build-sources-${{ github.run_id }}
- name: Prevent Updating Source Cache
if: steps.cache-source.outputs.cache-hit == 'true'
run: mv sources-cache sources
- name: Download Source Artifact
if: steps.cache-source.outputs.cache-hit != 'true'
uses: actions/download-artifact@v1
with:
name: source-bundle
path: ./
- name: Extract Source Artifact
if: steps.cache-source.outputs.cache-hit != 'true'
run: tar -xf sources.tar.gz
- name: Fetch nuttx tags
run: |
cd nuttx
git fetch --tags
- name: Restore Tools Cache
id: cache-tools
uses: actions/cache@v1
env:
cache-name: ${{ runner.os }}-cache-tools
with:
path: prebuilt
key: ${{ runner.os }}-tools-${{ hashFiles('./sources/testing/cibuild.sh') }}
- name: Checkout apps repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx-apps
path: apps
fetch-depth: 0
- name: Checkout testing repo
uses: actions/checkout@v2
with:
repository: apache/incubator-nuttx-testing
path: testing
- name: Restore cache
id: cache-tools
uses: actions/cache@v1
env:
cache-name: ${{ runner.os }}-cache-tools
with:
path: prebuilt
key: ${{ runner.os }}-tools-${{ hashFiles('./testing/cibuild.sh') }}
- name: Run builds
run: |
cd testing
./cibuild.sh -i -x -G testlist/${{matrix.boards}}.dat
- name: Run Builds
run: |
git -C sources/nuttx fetch --tags
cd sources/testing
./cibuild.sh -i -x -G testlist/${{matrix.boards}}.dat

View file

@ -30,8 +30,7 @@ jobs:
- name: Check Pull Request
run: |
cd nuttx
ranges=`git log -1 --merges --pretty=format:%P | awk -F" " '{ print $1 ".." $2 }'`
git log --oneline $ranges
commits=`git log --reverse --format=format:%H $ranges`
commits=`git log -1 --merges --pretty=format:%P | awk -F" " '{ print $1 ".." $2 }'`
git log --oneline $commits
echo "../nuttx/tools/checkpatch.sh -g $commits"
../nuttx/tools/checkpatch.sh -g $commits

1
.gitignore vendored
View file

@ -8,6 +8,7 @@ Make.dep
.swp
.*.swp
core
uImage
/.gdbinit
/cscope.*
/.config

27615
ChangeLog

File diff suppressed because it is too large Load diff

View file

@ -11,6 +11,8 @@ a list of known issues the project is currently aware of (note that this list, b
is likely to be incomplete):
* Releases may have incomplete licensing conditions.
* Some ASF files still have BSD headers. Most of the top contributors have signed an ICLA and
we are working on updating the headers and getting approvals from other copyright holders.
If you are planning to incorporate this work into your product/project, please be aware that
you will need to conduct a thorough licensing review to determine the overall implications of

View file

@ -104,7 +104,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: November 21, 2019</p>
<p>Last Updated: April 16, 2020</p>
</td>
</tr>
</table>
@ -120,7 +120,7 @@
<p>
<b>Goals</b>.
NuttX is a real timed embedded operating system (RTOS).
NuttX is a real time embedded operating system (RTOS).
Its goals are:
<p>
<center><table width="90%">
@ -1450,11 +1450,13 @@
<h2>Released Versions</h2>
<p>
In addition to the ever-changing GIT repository, there are frozen released versions of NuttX available.
The current release is NuttX 8.2.
NuttX 8.2 is the 133<sup>rd</sup> release of NuttX.
It was released on November 16, 2019, and is available for download from the
<a href="https://bitbucket.org/nuttx/nuttx/downloads/">Bitbucket.org</a> website.
Note that the release consists of two tarballs: <code>nuttx-8.2.tar.gz</code> and <code>apps-8.2.tar.gz</code>.
The current release is NuttX 9.0.
NuttX 9.0 is the 134<sup>rd</sup> release of NuttX.
It was released on April 30, 2020, and is available for download from the
<a href="https://nuttx.apache.org/">nuttx.apache.org</a> website.
Note that the release consists of two tarballs:
<code>apache-nuttx-9.0.x-incubating.tar.gz</code> and
<code>apache-nuttx-apps-9.0.x-incubating.tar.gz</code>.
Both may be needed (see the top-level <code>nuttx/README.txt</code> file for build information).
</p>
@ -1463,17 +1465,23 @@
<ul>
<li><b>nuttx</b>.
<ul><p>
Release notes for NuttX 8.2 are available <a href="https://bitbucket.org/nuttx/nuttx/downloads/">here</a>.
Release notes for all released versions on NuttX are available in the <a href="https://bitbucket.org/nuttx/nuttx/src/master/ReleaseNotes" target="_blank">Bitbucket GIT</a>.
The ChangeLog for all releases of NuttX is available in the ChangeLog file that can viewed in the <a href="https://bitbucket.org/nuttx/nuttx/src/master/ChangeLog" target="_blank">Bitbucket GIT</a>.
Release notes for all released versions on NuttX are available in <a href="https://github.com/apache/incubator-nuttx/blob/master/ReleaseNotes" target="_blank">GitHub</a>.
The ReleaseNotes for the current release is at the bottom of that file.
The ChangeLog for all releases of NuttX is available in the ChangeLog file
that can viewed in <a href="https://github.com/apache/incubator-nuttx/blob/master/ChangeLog" target="_blank">GitHub</a>.
The ChangeLog for the current release is at the bottom of that file.
</p>
</li></ul>
<li><b>apps</b>.
<ul><p>
Release notes for NuttX 8.2 are available <a href="https://bitbucket.org/nuttx/apps/downloads/">here</a>.
Release notes for all released versions on NuttX are available in the <a href="https://bitbucket.org/nuttx/nuttx/src/master/ReleaseNotes" target="_blank">Bitbucket GIT</a>
The ChangeLog for the all releases of <code>apps/</code> is available in the ChangeLog file that can viewed in the <a href="https://bitbucket.org/nuttx/apps/src/master/ChangeLog.txt" target="_blank">Bitbucket GIT</a>.
Release notes for all released versions on NuttX are available in <a
href="https://github.com/apache/incubator-nuttx/blob/master/ReleaseNotes"
target="_blank">GitHub</a>
The ReleaseNotes for the current release is at the bottom of that file.
The ChangeLog for all releases of <code>apps/</code> is available in the
ChangeLog file that can viewed in the <a
href="https://github.com/apache/incubator-nuttx/blob/master/ChangeLog"
target="_blank">GitHub</a>.
The ChangeLog for the current release is at the bottom of that file.
</p>
</li></ul>
@ -1524,7 +1532,7 @@
<li><a href="#armcortexm0">ARM Cortex-M0/M0+</a> (13)</li>
<li><a href="#armcortexm3">ARM Cortex-M3</a> (39)</li>
<li><a href="#armcortexm4">ARM Cortex-M4</a> (59)</li>
<li><a href="#armcortexm7">ARM Cortex-M7</a> (14)</li>
<li><a href="#armcortexm7">ARM Cortex-M7</a> (15)</li>
</ul>
<li>Atmel AVR
<ul>
@ -1575,6 +1583,8 @@
<ul>
<li><a href="#nr5mxx"> NEXT RISC-V NR5Mxx</a> (1)</li>
<li><a href="#gwgap8">GreenWaves GAP8 (1)</a></li>
<li><a href="#k210">Kendryte K210 (1)</a></li>
<li><a href="#artya7">Litex (1)</a></li>
</ul>
</li>
<li>Xtensa LX6:
@ -1585,7 +1595,7 @@
<li>ZiLOG
<ul>
<li><a href="#zilogz16f">ZiLOG ZNEO Z16F</a> (2)</li>
<li><a href="#zilogez80acclaim">ZiLOG eZ80 Acclaim!</a> (1)</li>
<li><a href="#zilogez80acclaim">ZiLOG eZ80 Acclaim!</a> (4)</li>
<li><a href="#zilogz8encore">ZiLOG Z8Encore!</a> (2)</li>
<li><a href="#zilogz180">ZiLOG Z180</a> (1)</li>
<li><a href="#zilogz80">ZiLOG Z80</a> (2)</li>
@ -2477,6 +2487,11 @@
While not ready for prodcution use, the Beaglebone Black port is functional and will be the basis for a more extensive development.
Additional work in progress to extend this port and more capable is anticipated in NuttX-7.29.
</li>
<li>
<b>NuttX-9.0</b>
CAN support was added.
Clock Configuration was added.
</li>
<li>
<b>NuttX-7.31</b>.
An LCD driver was added in NuttX-7.31.
@ -2932,6 +2947,9 @@ nsh>
Current development efforts are focused on porting the NuttX window system (NX)
to work with the Evaluation Kits OLED display.
</p>
<p>
NuttX-9.0 added protected build support to the LM3S6965-ek.
</p>
<p><small>
<b>NOTE</b>: As it is configured now, you MUST have a network connected.
Otherwise, the NSH prompt will not come up because the Ethernet
@ -3338,6 +3356,10 @@ nsh>
<b>NuttX-8.2</b>
Added PWM and TIM drivers for the G0. From Daniel Pereira Volpato.
</li>
<li>
<b>NuttX-9.0</b>
Added I2C support for F0, L0 and G0.
</li>
</p>
</td>
</tr>
@ -5814,6 +5836,10 @@ Mem: 29232 5920 23312 23312
These unverfied drivers include: SPI, I2C, DMA, USB.
Also refer to the NuttX board <a href="https://bitbucket.org/nuttx/nuttx/src/master/boards/arm/samd5e5/metro-m4/README.txt" target="_blank">README</a> file for further information about the current state of the port.
</p>
<p>
Nuttx-9.0 added basic support for Microchip SAME54 Xplained Pro board.
An ethernet driver was also added to the SAME5x familly.
</p>
</td>
</tr>
@ -5907,6 +5933,12 @@ Mem: 29232 5920 23312 23312
From Eduard Niesner contributed a PWM driver.
Added UID access from Valmantas Paliksa.
USB High speed driver was added for STM32F7 series by Ramtin Amin.
</p>
</li>
<li>
<p><b>NuttX-9.0</b>.
Added serial DMA support.
</p>
</li>
</ul>
</td>
@ -6034,6 +6066,11 @@ Mem: 29232 5920 23312 23312
Added support for SDMMC and FLASH progmem. From David Sidrane.
</p>
</li>
<li>
<p><b>NuttX-9.0</b>.
Added QSPI support for the STM32H7.
</p>
</li>
</p>
</td>
</tr>
@ -6112,6 +6149,9 @@ Mem: 29232 5920 23312 23312
<p><b>NuttX-8.2</b>.
An LCD drivers was added in NuttX-8.2 by Fabio Balzano.
</p>
<p><b>NuttX-9.0</b>.
Added USB Device support.
</p>
</li>
</ul>
</td>
@ -6429,6 +6469,25 @@ Mem: 29232 5920 23312 23312
This is a great, stable starting point for anyone interested in fleshing out the x86 port!
Refer to the NuttX <a href="https://bitbucket.org/nuttx/nuttx/src/master/boards/x86/qemu/qemu-i486/README.txt" target="_blank">README</a> file for further information.
</p>
<p>
<b>QEMU/Intel64</b>
An x86_64 flat address port was ported in NuttX-9.0.
It consists of the following feautres:
<ul>
<li> - Runs in x86_64 long mode.</li>
<li> - Configurable SSE/AVX support.</li>
<li>- IRQs are managed by LAPIC(X2APIC) and IOAPIC.</li>
<li>- Used TSC_DEADLINE or APIC timer for systick.</li>
<li>- Pages are now maps the kernel at 4GB~, but changeable.</li>
</ul>
</p>
<p>
This kernel with ostest have been tested with
<ul>
<li>Qemu/KVM on a Xeon 2630v4 machine.</li>
<li>Bochs with broadwell_ult emulation.</li>
</ul>
</p>
</ul>
</td>
</tr>
@ -6662,6 +6721,10 @@ Mem: 29232 5920 23312 23312
<b>NuttX-7.31</b>.
Abdelatif Guettouche contributed DMA support.
</p>
<p>
<b>NuttX-9.0</b>.
Cache operations were implemented.
</p>
</ul>
</p>
Refer to the NuttX board <a href="https://bitbucket.org/nuttx/nuttx/src/master/boards/mips/pic32mz/pic32mz-starterkit/README.txt" target="_blank">README</a> file for further information.
@ -6779,6 +6842,9 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
<ul>
<li><b>NuttX-8.2</b></li>
Basic support for the RX65N family was released by Anjana with support for two boards: The RSK RX65N-2MB and the GR-Rose.
<li><b>NuttX-9.0</b>
RTC driver for the RX65N was added.
</li>
</ul>
</td>
</tr>
@ -6805,6 +6871,15 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
The GAP8 features a RI5CY core called Fabric Controller(FC), and a cluster of 8 RI5CY cores that runs at a bit slower speed.
The GAP8 is an implementation of the opensource PULP platform, a Parallel-Ultra-Low-Power design.
</p>
<p>
<li><a href="#k210">Sipeed Maix bit</a></li>
Initial support for the Sipeed Maix bit board was added in Nuttx-9.0.
</p>
<p>
<a name="artya7"><b>Litex ARTY_A7</b></a>.
Support for the Digilent ARTY_A7 board along with CPU VexRiscV SOC were added
in NuttX-9.0.
</p>
</td>
</tr>
@ -6876,12 +6951,13 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
<td>
<p>
<b>Zilog eZ80Acclaim! Microcontroller</b>.
There are three eZ80Acclaim! ports:
There are four eZ80Acclaim! ports:
</p>
<ul>
<li>The ZiLOG ez80f0910200kitg development kit.
<li>The ZiLOG ez80f0910200zcog-d development kit.
<li>The MakerLisp CPU board.
<li>The Z20x DIY computing system.
</ul>
<p>
All three boards are based on the eZ80F091 part and all use the Zilog ZDS-II
@ -6912,6 +6988,14 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
A USB keyboard adapter provides for standard keyboard input.
Data storage and interchange is accomplished by a SPI-based micro-SD card.
</p>
<p>
<b>NuttX-9.0:</b>
Support for the Z20X board was added. The port includes:
- Initial support to have a functional nsh.
- Support for SPI and W25 FLASH.
- A bootloader capable of writing code to the W25 FLASH and load it to the
SRAM to be executed.
</p>
</ul>
</td>
</tr>

View file

@ -2223,7 +2223,7 @@ priority of the calling task is returned.
<b>NOTE:</b>
Behavior of features related to <i>task group</i>s depend of NuttX configuration settings.
See the discussion of &quot;Parent and Child Tasks,&quot; below.
See also the <a href="http://www.nuttx.org/doku.php?id=wiki:nxinternal:nxtasking">NuttX Threading Wiki</a> page and the <a href="http://www.nuttx.org/doku.php?id=wiki:nxinternal:tasksnthreads">Tasks vs. Threads FAQ</a> for additional information on tasks and threads in NuttX.
See also the <a href="https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Tasking">NuttX Tasking</a> page and the <a href="https://cwiki.apache.org/confluence/display/NUTTX/Tasks+vs.+Threads+FAQ">Tasks vs. Threads FAQ</a> for additional information on tasks and threads in NuttX.
</small></blockquote>
<p>
A <i>task group</i> terminates when the last thread within the group exits.
@ -3920,7 +3920,7 @@ interface of the same name.
<pre>
#include &lt;semaphore.h&gt;
#include &lt;time.h&gt;
int sem_wait(sem_t *sem, const struct timespec *abstime);
int sem_timedwait(sem_t *sem, const struct timespec *abstime);
</pre>
<p>
@ -3948,7 +3948,7 @@ interface of the same name.
<li>0 (<code>OK</code>), or -1 (<code>ERROR</code>) is unsuccessful
</ul>
<p>
If <code>sem_wait</code> returns -1 (<code>ERROR</code>) then the cause of the failure
If <code>sem_timedwait</code> returns -1 (<code>ERROR</code>) then the cause of the failure
will be indicated by the thread-specific <a href="#ErrnoAccess"><code>errno</code></a>.
The following lists the possible values for <a href="#ErrnoAccess"><code>errno</code></a>:
<p>
@ -4006,7 +4006,7 @@ returns without blocking.
<ul>
<li>0 (<code>OK</code>) or -1 (<code>ERROR</code>) if unsuccessful
</ul>
If <code>sem_wait</code> returns -1 (<code>ERROR</code>) then the cause of the failure
If <code>sem_trywait</code> returns -1 (<code>ERROR</code>) then the cause of the failure
will be indicated by the thread-specific <a href="#ErrnoAccess"><code>errno</code></a>.
The following lists the possible values for <a href="#ErrnoAccess"><code>errno</code></a>:
<p>
@ -4165,7 +4165,7 @@ Otherwise, an -1 (<code>ERROR</code>) will be returned and the <code>errno</code
<b>Returned Value:</b>
</p>
<p>
If successful, the <code>sem_getprotocol()</code> function will return zero (<code>OK</code>).
If successful, the <code>sem_setprotocol()</code> function will return zero (<code>OK</code>).
Otherwise, an -1 (<code>ERROR</code>) will be returned and the <code>errno</code> value will be set to indicate the nature of the error.
</p>
<p>
@ -4936,7 +4936,7 @@ interface of the same name.
<blockquote><small>
<b>NOTE:</b>
Behavior of features related to <i>task group</i>s depend of NuttX configuration settings.
See the <a href="http://www.nuttx.org/doku.php?id=wiki:nxinternal:nxtasking">NuttX Threading Wiki</a> page and the <a href="http://www.nuttx.org/doku.php?id=wiki:nxinternal:tasksnthreads">Tasks vs. Threads FAQ</a> for additional information on tasks and threads in NuttX.
See also the <a href="https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Tasking">NuttX Tasking</a> page and the <a href="https://cwiki.apache.org/confluence/display/NUTTX/Tasks+vs.+Threads+FAQ">Tasks vs. Threads FAQ</a> for additional information on tasks and threads in NuttX.
</small></blockquote>
<p>
<b>Signaling Multi-threaded Task Groups</b>.
@ -5750,7 +5750,7 @@ be sent.
<blockquote><small>
<b>NOTE:</b>
Behavior of features related to <i>task group</i>s depend of NuttX configuration settings.
See the <a href="http://www.nuttx.org/doku.php?id=wiki:nxinternal:nxtasking">NuttX Threading Wiki</a> page and the <a href="http://www.nuttx.org/doku.php?id=wiki:nxinternal:tasksnthreads">Tasks vs. Threads FAQ</a> for additional information on tasks and threads in NuttX.
See also the <a href="https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Tasking">NuttX Tasking</a> page and the <a href="https://cwiki.apache.org/confluence/display/NUTTX/Tasks+vs.+Threads+FAQ">Tasks vs. Threads FAQ</a> for additional information on tasks and threads in NuttX.
</small></blockquote>
<p>
The following pthread interfaces are supported in some form by NuttX:

6
NOTICE
View file

@ -1,6 +1,9 @@
Apache NuttX
Copyright 2020 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
FAT Long File Names
===================
@ -55,6 +58,3 @@ NXP Restriction for SPIFI code
is used in conjunction with NXP Semiconductors microcontrollers. This
copyright, permission, and disclaimer notice must appear in all copies of
this code.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

View file

@ -1,6 +1,14 @@
README
^^^^^^
APACHE NUTTX (INCUBATING)
^^^^^^^^^^^^^^^^^^^^^^^^^
o Introduction
- Incubation Status
o Community
- Getting Help
- Mailing Lists
- Issue Tracker
- Source Code
- Website Source Code
o Environments
- Installing Cygwin
- Ubuntu Bash under Windows 10
@ -38,6 +46,132 @@ README
- Window Native Toolchain Issues
o Documentation
INTRODUCTION
^^^^^^^^^^^^
Apache NuttX (Incubating) is a real-time operating system (RTOS) with an
emphasis on standards compliance and small footprint. Scalable from 8-bit
to 32-bit microcontroller environments, the primary governing standards in
NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and
other common RTOSs (such as VxWorks) are adopted for functionality not
available under these standards, or for functionality that is not
appropriate for deeply-embedded environments (such as fork()).
Extensive documentation can be found on the project wiki:
https://cwiki.apache.org/NUTTX/Nuttx
Incubation Status
-----------------
Apache NuttX (Incubating) is an effort undergoing Incubation at The Apache
Software Foundation (ASF), sponsored by the Incubator. For more on our
incubation effort, please see the file DISCLAIMER-WIP, in the same
directory as this README.
For brevity, the rest of this file will refer to it as Apache NuttX or
simply NuttX.
COMMUNITY
^^^^^^^^^
Every volunteer project obtains its strength from the people involved in
it. We invite you to participate as much or as little as you choose.
We encourage you to:
- Use our project and provide feedback.
- Provide us with use-cases.
- Report bugs and submit patches.
- Contribute code or documentation.
Getting Help
------------
The best place to get help is the developer's mailing list. Please see
the following section:
Mailing Lists
-------------
Get help using NuttX or contribute to the project on our mailing lists:
dev@nuttx.apache.org is for people who want to contribute code to NuttX.
- To subscribe, send an email to dev-subscribe@nuttx.apache.org.
- To unsubscribe, send an email to dev-unsubscribe@nuttx.apache.org.
- View the archives at:
https://www.mail-archive.com/dev@nuttx.apache.org/
commits@nuttx.apache.org is a read-only list that notifies subscribers
about commit messages and patches to NuttX.
- To subscribe, send an email to commits-subscribe@nuttx.apache.org.
- To unsubscribe, send an email to commits-unsubscribe@nuttx.apache.org.
- View the archives at:
https://www.mail-archive.com/commits@nuttx.apache.org/
Issue Tracker
-------------
Bug Reports:
Found bug? Send an email to the dev list dev@nuttx.apache.org.
Before submitting an issue, please:
- Verify that the bug does in fact exist.
- Search the mailing list archives to verify there is no existing issue
reporting the bug you've found.
- Consider tracking down the bug yourself in the NuttX source code and
submitting a patch along with your bug report. This is a great time
saver for the NuttX developers and helps ensure the bug will be fixed
quickly.
Feature Requests:
Enhancement requests for new features are also welcome. The more concrete
and rational the request is, the greater the chance it will incorporated
into future releases.
Source Code
-----------
The project sources are in two Git repositories. The core OS is in
incubator-nuttx and the apps repository is in incubator-nuttx-apps. These
are housed in GitBox on ASF servers and also mirrored at GitHub. These
are kept in sync, so you can use whichever option you prefer.
- NuttX core OS repository:
Primary:
https://gitbox.apache.org/repos/asf?p=incubator-nuttx.git
GitHub Mirror:
https://github.com/apache/incubator-nuttx
- Apps repository:
Primary:
https://gitbox.apache.org/repos/asf?p=incubator-nuttx-apps.git
GitHub Mirror:
https://github.com/apache/incubator-nuttx-apps
Website Source Code
-------------------
The project website sources are accessible via the website source code
repository which is also mirrored in GitHub:
Primary:
https://gitbox.apache.org/repos/asf?p=incubator-nuttx-website.git
GitHub Mirror:
https://github.com/apache/incubator-nuttx-website
ENVIRONMENTS
^^^^^^^^^^^^
@ -412,9 +546,9 @@ INSTALLATION
^^^^^^^^^^^^
There are two ways to get NuttX: You may download released, stable
tarballs from either the Bitbucket or Sourceforge download locations.
Or you may get NuttX by cloning the Bitbucket GIT repositories. Let's
consider the released tarballs first:
tarballs from either the project website. Or you may get NuttX by
cloning the GIT repositories. Let's consider the released tarballs
first:
Download and Unpack
-------------------
@ -426,7 +560,11 @@ Download and Unpack
match the various instructions in the documentation and some scripts
in the source tree.
Download locations:
Download location:
https://nuttx.apache.org/download/
Legacy download locations:
https://bitbucket.org/nuttx/nuttx/downloads
https://sourceforge.net/projects/nuttx/files/nuttx/
@ -501,13 +639,17 @@ Downloading from Repositories
The current NuttX du jour is available in from a GIT repository. Here are
instructions for cloning the core NuttX RTOS (corresponding to the nuttx
tarball discussed above)::
tarball discussed above):
git clone https://bitbucket.org/nuttx/nuttx.git nuttx
git clone https://gitbox.apache.org/repos/asf/incubator-nuttx.git nuttx
-or-
git clone https://github.com/apache/incubator-nuttx.git nuttx
And the semi-optional apps/ application directory and be cloned like:
git clone https://bitbucket.org/nuttx/apps.git apps
git clone https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git apps
-or-
git clone https://github.com/apache/incubator-nuttx-apps.git apps
That will give you the same directory structure like this:
@ -550,7 +692,9 @@ Related Repositories
These are standalone repositories:
* https://bitbucket.org/nuttx/apps
* https://gitbox.apache.org/repos/asf/incubator-nuttx-apps
or
https://github.com/apache/incubator-nuttx-apps.git
This directory holds an optional package of applications and libraries
can be used with the NuttX RTOS. There is a README.txt file there that

View file

@ -26618,3 +26618,151 @@ information):
fixes the violation of the portable POSIX OS interface, but also
permits use of ROM disks in PROTECTED and KERNEL modes. From
Gregory Nutt.
NuttX-9.0.0 Release Notes
-------------------------
This is the first release of NuttX as Apache NuttX (Incubating) and represents our first major milestone as a Podling of the Apache Software Foundation's Incubator. This release is the culmination of nearly 6 months of hard work and includes several new architectures and drivers, and numerous improvements and bug fixes to the core RTOS, drivers, and networking subsystems.
* Major Changes to Core OS
* Bugfixes
- nxsem_wait_uninterruptible() now returns if the task is canceled.
- Fix a bug in pthread_condwait() that was improperly re-initializing the mutex.
- In sched_setpriority(), fix functions called inside a DEBUGASSERT that were eliminated when assertions are disable
* Compatibility Concerns
- The configuration option CONFIG_CAN_PASS_STRUCT is now removed. Previously, it was used (at the cost of breaking standards support) to support older versions of the SDCC compiler that couldn't pass structs/unions as functions' parameters. A newer version of the compiler has resolved the issue.
* Major Changes to Build System
- Add a post-build function that allows extending the build with CPU/board-specific logic.
- Add build tools to simplify ZDS-II tool usage.
- mkexport.sh: Deal with ARCHSCRIPT containing multiple files.
- Various nxstyle improvements.
* Architectural Support
* New architecture support
- Add support for RISCV-64
- Add support for x86_64 (tested on QEMU)
- Add support for ELF64
- Add a port to the NUCLEO-F429ZI board
- Add support for the STM32H747I-DISCO board
- Add Z20X board support and bootloader to upload code from the W25 flash to SRAM
- Add initial support for Litex with softcore CPU VexRiscV SoC
- Add support for the Digilent ARTY_A7 board to test the Litex port
- Added initial support for Sipeed Maix Bit board with Kendryte K210 processor
- New architectural support: ez80f92
- Flat address x86_64 port of Nuttx
- Support to run NuttX on ESP32 QEMU
- Initial support for Sipeed Maix Bit board with Kendryte K210 processor
- Add initial support for Kendryte K210 processor in SMP mode
- NXP S32K11x (Cortex-M0+) and S32K14x (Cortext-M4F): Add support for NXP automotive boards.
- XMC 4700 (Cortex-M4F)
* Architectures with significant improvements
- ESP32 loadable modules support
- i.MX RT: FLEXIO clock config logic.
- Fix the clock configuration for the i.MX RT family
- i.MX RT: Add ability to run from OCRAM
- SAMA5D27 peripheral support - USB Host working
- z20x: Add W25 bootloader
- i.MX RT: Add USB Device support
- STM32, STM32F7, STM32H7 add SPI DMATHRESHOLD
- Improve the simulator timer
- 64-bit modules on macOS simulator
- z20x: Add XTP2046 SPI support; add timer support
- RX65N RTC Driver added
- NXP Freedom K28F Board SD-Card support
- STM32H7: support SDRAM via FMC peripheral
- LM3S6965-ek: Add PROTECTED build support
- STM32H7: Added IWDG and WWDG, power management (sleep/stop/standby), WKUP pin configuration
- SAMV71: Add read UID implementation and move flash functions to RAM
- i.MX RT: Fix interrupts storm (serial & I2C)
- Various fixes and cosmetic changes to the CxD56xx architecture
- Fix SiFive FE310 related code (comments, improve serial irq handling, initial int status)
- Implement QSPI for STM32H7
- Improvements for the nRF52 port: I2C, SPI, GPIO support
- Updates for LPC17xx/40xx serial
- Adds basic support for Microchip SAM E54 Xplained Pro board
- Adds an Ethernet driver for the SAME5x family (based on the SAMA5 GMAC driver)
- Add CDC ECM Ethernet over USB 2.0 High Speed (tested on SAMA5D36-Xplained board)
- Simulator: Reimplement simulator uart on top of serial driver framework
- NXP S32K1XX peripheral clock fixes
- Fix syscall stack alignment on armv7-m
- Fix flash_erase(page) when page >= 256 for STM32L4 family
- Add partial support for the NETLINK poll() operation.
- Add serial DMA support for STM32F7
- Add AM335x Clock Configuration
- Add I2C support for AM335x
- Add configuration to fine tune LPI2C Timeout for iMXRT
- Add CAN support to AM335x
- Add I2C support to STM32F0/L0/G0
- Kinetis LPC SDCard improvements
- Replace the busy polling with work_queue in the ethernet driver of simulator
- Fix Xtensa's SMP support to follow same logic from other SMP archs
- PIC32MZ: SPI transfers can be configured to use DMA.
- PIC32MZ: Implement cache operations.
* Driver Support
* New drivers
- New driver for the ADS7828 I2C analog to digital converter
- driver/ioexpander: New driver for PCA9538 I2C I/O expander
- New driver type for battery monitor ICs.
- Driver for the BQ769x0 battery monitor IC.
- Add Support for Quectel EC20 4G LTE Module USB CDC/ACM
- Add QSPI-based Winbond NOR FLASH driver
* Drivers with significant improvements
- Update all the drivers to check return value of nxsem_wait_uninterruptible().
- MCP9844 shutdown mode support
- fcntl: add O_CLOEXEC flag, add O_CLOEXEC/FD_CLOEXEC support
- CDC-ECM Ethernet over USB 2.0 HS
- smartfs improvements: Handling of duplicate sectors, support fsck to check and repair the smartfs file system, and recover SPI Flash from initial error state.
- Various fixes for USBDEV driver: Remove unnecessary reset logic, fix descriptor type mismatch when dual speed is enabled, fix invalid/unsupported command processing, and fix string ID calculation.
- Handle size zero in umm_malloc.c and umm_realloc.c, which causes a system freeze in kernel mode.
- Fixed compilation issue with poll fds notification.
- Report POLLHUP and POLLERR in 'revents' regardless the requested 'events' set.
* Networking
- Telnet: Fix/Refine CTRL+C to work on telnet
- TCP: Fix of faulty TCP sequence increments
- netdb: Fix netdb to query IPv4 and IPv6 addresses regardless the server address type
- Netlink sockets may be set to non-blocking
- Improve TUN and SLIP, refine Control+C Handling in Telnet
- Sockets: Add socket MSG_DONTWAIT support
- Network Loopback Driver: Add a configuration option to control packet size
- Network IOCTLs: Add FIONBIO network IOCTL support
- NFS: Support IPv4 and TCP
- Sockets: Add IP and TCP socket options needed by iperf3
- Netlink: Add support for asynchronous Netlink responses
- TCP: Monitor TCP_POLL/TCP_NEWDATA/TCP_BACKLOG per the request like UDP counterpart
- TCP: Minor design improvement to TCP delayed ACKs
- DNS IPv4/IPv6 Dual Host Support: When IPv4/IPv6 Dual Stack is enabled, queries both types of addresses regardless of whether the DNS server is accessed via IPv4 or IPv6. As a result, getaddrinfo() may return a mixed (IPv4/IPv6) address list.
* Applications
* Improvements
- Extend netutils and netinit to work with only Netlink sockets enabled
- Add getprime program to check multi-thread performance
- Improve zmodem send performance
- Add simple HTS221, LSM303 and LSM6DSL examples
- Improve to gs2200m wiki performance
- Improve telnet server and enable it to listen on both IPv4 and IPv6
- Improve ntpclient logic
- Improve wapi to save configuration to file system
- Improve wapi to skip associate if ssid is invalid
- Improve cmd_nfsmount to use IPv4 and IPv6
- Improve ostest for SMP and non-SMP configurations
- Improve UDP to avoid using standard symbols
- Improve dhcpd to include configurable timeout and retry count
* Bugfixes
- Correct format when printing ARP tablet entries
- Ensure /bin/ping and ping work at the same time
- Correct backward conditional logic in dhcpd_leaseexpired()
- Fix several problems on ftpd
- Fix dhcpd issue reported on Issue #17
- Fix sendmail example to run on a local SMTP server
- Fix buffer overflow on netlib
- Fix compile errors in loopback mode of the tcpblaster
- Fix stack corruption in ELF task test
- Fix errors in NoBlockRecv and BlockRecv tests of usrsocktest
- Fix ipforward IP Header issue for IPv4
- Fix wrongly swapped parity options of CU program
- Fix slcd to avoid using priv->fd before initializing it
- Fix (tcp, udp)blaster to build on macOS
- Correct the buffer type of base64 program

67
TODO
View file

@ -1,4 +1,4 @@
NuttX TODO List (Last updated January 3, 2019)
NuttX TODO List (Last updated April 18, 2020)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@ -27,7 +27,7 @@ nuttx/:
(12) File system/Generic drivers (fs/, drivers/)
(10) Graphics Subsystem (graphics/)
(1) Build system / Toolchains
(3) Linux/Cygwin simulation (arch/sim)
(2) Linux/Cygwin simulation (arch/sim)
(5) ARM (arch/arm/)
apps/ and other Add-Ons:
@ -2556,69 +2556,6 @@ o Linux/Cygwin simulation (arch/sim)
Status: Open
Priority: Low
Title: SMP SIMULATION ISSUES
Description: The configuration has basic support SMP testing. The simulation
supports the emulation of multiple CPUs by creating multiple
pthreads, each run a copy of the simulation in the same process
address space.
At present, the SMP simulation is not fully functional: It does
operate on the simulated CPU threads for a few context switches
then fails during a setjmp() operation. I suspect that this is
not an issue with the NuttX SMP logic but more likely some chaos
in the pthread controls. I have seen similar such strange behavior
other times that I have tried to use setjmp/longmp from a signal
handler! Like when I tried to implement simulated interrupts
using signals.
Apparently, if longjmp is invoked from the context of a signal
handler, the result is undefined:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1318.htm
You can enable SMP for ostest configuration by enabling:
-# CONFIG_EXPERIMENTAL is not set
+CONFIG_EXPERIMENTAL=y
+CONFIG_SPINLOCK=y
+CONFIG_SMP=y
+CONFIG_SMP_NCPUS=2
+CONFIG_SMP_IDLETHREAD_STACKSIZE=2048
You also must enable near-realtime-performance otherwise even long
timeouts will expire before a CPU thread even has a chance to
execute.
-# CONFIG_SIM_WALLTIME is not set
+CONFIG_SIM_WALLTIME=y
And you can enable some additional debug output with:
-# CONFIG_DEBUG_SCHED is not set
+CONFIG_DEBUG_SCHED=y
-# CONFIG_SCHED_INSTRUMENTATION is not set
+CONFIG_SCHED_INSTRUMENTATION=y
The NSH configuration can also be forced to run SMP, but
suffers from the same quirky behavior. I can be made
reliable if you modify arch/sim/src/up_idle.c so that
the IDLE loop only runs for CPU0. Otherwise, often
simuart_post() will be called from CPU1 and it will try
to restart NSH on CPU0 and, again, the same quirkiness
occurs.
But for example, this command:
nsh> sleep 1 &
will execute the sleep command on CPU1 which has worked
every time that I have tried it (which is not too many
times).
Status: Open
Priority: Low, SMP is important, but SMP on the simulator is not
o ARM (arch/arm/)
^^^^^^^^^^^^^^^

View file

@ -83,8 +83,8 @@
* a way to label the versions we are using
*/
#define KINETIS_PMC_VERSION_UKN -1 /* What was in nuttx prior to 2/22/2017 */
#define KINETIS_PMC_VERSION_01 1 /* Verified Document Number: K60P144M150SF3RM Rev. 3, November 2014 */
#define KINETIS_PMC_VERSION_UKN (-1) /* What was in nuttx prior to 2/22/2017 */
#define KINETIS_PMC_VERSION_01 1 /* Verified to Document Number: K60P144M150SF3RM Rev. 3, November 2014 */
#define KINETIS_PMC_VERSION_04 4 /* Verified to Document Numbers:
* K20P64M72SF1RM Rev. 1.1, Dec 2012
* K64P144M120SF5RM Rev. 2, January 2014
@ -136,13 +136,13 @@
/* PMC Register Configuration */
# define KINETIS_PMC_HAS_REGSC 1 /* SoC has REGSC Register */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC has REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC has REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC has REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC does not have REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC does not have REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC does not have REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC does not have REGSC[TRAMPO] */
# undef KINETIS_PMC_HAS_HVDSC1 /* SoC does not have HVDSC1 Register */
# undef KINETIS_PMC_HAS_SRAMCTL /* SoC does not have SRAMCTL Register */
@ -160,20 +160,20 @@
#elif defined(CONFIG_ARCH_CHIP_MK28FN2M0VMI15) || defined(CONFIG_ARCH_CHIP_MK28FN2M0CAU15R)
/* Verified to Document Number: Verified to Document Number: K28P210M150SF5RM Rev. 4, August 2017 */
/* Verified to Document Number: K28P210M150SF5RM Rev. 4, August 2017 */
# define KINETIS_PMC_VERSION KINETIS_PMC_VERSION_05
/* PMC Register Configuration */
# define KINETIS_PMC_HAS_REGSC 1 /* SoC has REGSC Register */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC has REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC has REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC has REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC does not have REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC does not have REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC does not have REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC does not have REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_HVDSC1 1 /* SoC has HVDSC1 Register */
# define KINETIS_PMC_HAS_SRAMCTL 1 /* SoC has SRAMCTL Register */
@ -268,13 +268,13 @@
/* PMC Register Configuration */
# define KINETIS_PMC_HAS_REGSC 1 /* SoC has REGSC Register */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC has REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC has REGSC[REGFPM] */
# undef KINETIS_PMC_HAS_REGSC_BGEN /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC has REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC does not have REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC does not have REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC does not have REGSC[REGFPM] */
# undef KINETIS_PMC_HAS_REGSC_BGEN /* SoC does not have REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC does not have REGSC[TRAMPO] */
# undef KINETIS_PMC_HAS_HVDSC1 /* SoC does not have HVDSC1 Register */
# undef KINETIS_PMC_HAS_SRAMCTL /* SoC does not have SRAMCTL Register */
@ -291,13 +291,13 @@
/* PMC Register Configuration */
# define KINETIS_PMC_HAS_REGSC 1 /* SoC has REGSC Register */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC has REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC has REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC has REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC does not have REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC does not have REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC does not have REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC does not have REGSC[TRAMPO] */
# undef KINETIS_PMC_HAS_HVDSC1 /* SoC does not have HVDSC1 Register */
# undef KINETIS_PMC_HAS_SRAMCTL /* SoC does not have SRAMCTL Register */
@ -317,20 +317,20 @@
#elif defined(CONFIG_ARCH_CHIP_MK66FN2M0VMD18) || defined(CONFIG_ARCH_CHIP_MK66FX1M0VMD18) || \
defined(CONFIG_ARCH_CHIP_MK66FN2M0VLQ18) || defined(CONFIG_ARCH_CHIP_MK66FX1M0VLQ18)
/* Verified to Document Number: Document Number: K66P144M180SF5RMV2 Rev. 2, May 2015 */
/* Verified to Document Number: K66P144M180SF5RMV2 Rev. 2, May 2015 */
# define KINETIS_PMC_VERSION KINETIS_PMC_VERSION_04
/* PMC Register Configuration */
# define KINETIS_PMC_HAS_REGSC 1 /* SoC has REGSC Register */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC has REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC has REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC has REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# define KINETIS_PMC_HAS_REGSC_ACKISO 1 /* SoC has REGSC[ACKISO] */
# undef KINETIS_PMC_HAS_REGSC_VLPRS /* SoC does not have REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC does not have REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC does not have REGSC[REGFPM] */
# define KINETIS_PMC_HAS_REGSC_BGEN 1 /* SoC has REGSC[BGEN] */
# undef KINETIS_PMC_HAS_REGSC_TRAMPO /* SoC does not have REGSC[TRAMPO] */
# undef KINETIS_PMC_HAS_HVDSC1 /* SoC does not have HVDSC1 Register */
# undef KINETIS_PMC_HAS_SRAMCTL /* SoC does not have SRAMCTL Register */
@ -339,20 +339,22 @@
# error "Unsupported Kinetis chip"
#endif
/* Use the catch all configuration for the PMC based on the implementations in nuttx prior 2/3/2017 */
/* Use the catch all configuration for the PMC based on the implementations in
* NuttX prior to 2/3/2017
*/
#if KINETIS_PMC_VERSION == KINETIS_PMC_VERSION_UKN
/* PMC Register Configuration */
# define KINETIS_PMC_HAS_REGSC 1 /* SoC has REGSC Register */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# undef KINETIS_PMC_HAS_REGSC_ACKISO /* SoC has REGSC[ACKISO] */
# define KINETIS_PMC_HAS_REGSC_VLPRS 1 /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC has REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC has REGSC[REGFPM] */
# undef KINETIS_PMC_HAS_REGSC_BGEN /* SoC has REGSC[BGEN] */
# define KINETIS_PMC_HAS_REGSC_TRAMPO 1 /* SoC has REGSC[TRAMPO] */
# define KINETIS_PMC_HAS_REGSC_REGONS 1 /* SoC has REGSC[REGONS] */
# undef KINETIS_PMC_HAS_REGSC_ACKISO /* SoC does not have REGSC[ACKISO] */
# define KINETIS_PMC_HAS_REGSC_VLPRS 1 /* SoC has REGSC[VLPRS] */
# undef KINETIS_PMC_HAS_REGSC_VLPO /* SoC does not have REGSC[VLPO] */
# undef KINETIS_PMC_HAS_REGSC_REGFPM /* SoC does not have REGSC[REGFPM] */
# undef KINETIS_PMC_HAS_REGSC_BGEN /* SoC does not have REGSC[BGEN] */
# define KINETIS_PMC_HAS_REGSC_TRAMPO 1 /* SoC has REGSC[TRAMPO] */
# undef KINETIS_PMC_HAS_HVDSC1 /* SoC does not have HVDSC1 Register */
# undef KINETIS_PMC_HAS_SRAMCTL /* SoC does not have SRAMCTL Register */

View file

@ -18,7 +18,7 @@
#
############################################################################
ifeq ($(VIDEO_ISX012),y)
ifeq ($(CONFIG_VIDEO_ISX012),y)
CSRCS += isx012.c
endif

View file

@ -211,12 +211,10 @@ struct mm_freenode_s
FAR struct mm_freenode_s *blink;
};
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
struct mm_delaynode_s
{
struct mm_delaynode_s *flink;
};
#endif
/* What is the size of the freenode? */
@ -258,11 +256,9 @@ struct mm_heap_s
struct mm_freenode_s mm_nodelist[MM_NNODES];
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
/* Free delay list, for some situation can't do free immdiately */
struct mm_delaynode_s *mm_delaylist;
#endif
};
/****************************************************************************

View file

@ -175,11 +175,9 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR void *heapstart,
heap->mm_nregions = 0;
#endif
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
/* Initialize mm_delaylist */
heap->mm_delaylist = NULL;
#endif
/* Initialize the node array */

View file

@ -53,6 +53,7 @@
#ifdef CONFIG_NET_6LOWPAN
#ifdef CONFIG_WIRELESS_IEEE802154
/****************************************************************************
* Public Functions
****************************************************************************/
@ -150,7 +151,6 @@ static inline bool sixlowpan_eaddrnull(FAR const uint8_t *eaddr)
*
****************************************************************************/
#ifdef CONFIG_WIRELESS_IEEE802154
int sixlowpan_meta_data(FAR struct radio_driver_s *radio,
FAR const struct ieee802_txmetadata_s *pktmeta,
FAR struct ieee802154_frame_meta_s *meta)

View file

@ -113,17 +113,18 @@
* sixlowpan_eaddrfromip() handle short and extended addresses,
* respectively.
*
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address IEEE 48-bit MAC
* xxxx 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
* xxxx 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address 48-bit MAC
* xxxx 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address 48-bit MAC
* xxxx 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address EUI-64
*
****************************************************************************/
#ifndef CONFIG_NET_STARPOINT
#ifdef HAVE_BYTEADDR
static void sixlowpan_baddrfromip(const net_ipv6addr_t ipaddr, FAR uint8_t *baddr)
static void sixlowpan_baddrfromip(const net_ipv6addr_t ipaddr,
FAR uint8_t *baddr)
{
/* Big-endian uint16_t to byte order */
@ -132,7 +133,8 @@ static void sixlowpan_baddrfromip(const net_ipv6addr_t ipaddr, FAR uint8_t *badd
#endif
#ifdef HAVE_SADDR
static void sixlowpan_saddrfromip(const net_ipv6addr_t ipaddr, FAR uint8_t *saddr)
static void sixlowpan_saddrfromip(const net_ipv6addr_t ipaddr,
FAR uint8_t *saddr)
{
/* Big-endian uint16_t to byte order */
@ -142,7 +144,8 @@ static void sixlowpan_saddrfromip(const net_ipv6addr_t ipaddr, FAR uint8_t *sadd
#endif
#ifdef HAVE_EADDR
static void sixlowpan_eaddrfromip(const net_ipv6addr_t ipaddr, FAR uint8_t *eaddr)
static void sixlowpan_eaddrfromip(const net_ipv6addr_t ipaddr,
FAR uint8_t *eaddr)
{
FAR uint8_t *eptr = eaddr;
int i;
@ -169,10 +172,10 @@ static void sixlowpan_eaddrfromip(const net_ipv6addr_t ipaddr, FAR uint8_t *eadd
*
* Description:
* sixlowpan_nexthopaddr(): If the destination is on-link, extract the
* IEEE 802.15.14 destination address from the destination IP address. If the
* destination is not reachable directly, use the routing table (if available)
* or fall back to the default router IP address and use the router IP address
* to derive the IEEE 802.15.4 MAC address.
* IEEE 802.15.14 destination address from the destination IP address.
* If the destination is not reachable directly, use the routing table
* (if available) or fall back to the default router IP address and use
* the router IP address to derive the IEEE 802.15.4 MAC address.
*
****************************************************************************/
@ -230,13 +233,13 @@ int sixlowpan_nexthopaddr(FAR struct radio_driver_s *radio,
* handles a tagged address union which may either a short or and
* extended destination address.
*
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* ffxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx Multicast address (RFC 3513)
* ff02 0000 0000 0000 0000 0000 0000 0001 All nodes multicast group
* xxxx 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address IEEE 48-bit MAC
* xxxx 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
* xxxx 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* ffxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx Multicast address (RFC 3513)
* ff02 0000 0000 0000 0000 0000 0000 0001 All nodes multicast group
* xxxx 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address 48-bit MAC
* xxxx 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address 48-bit MAC
* xxxx 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address EUI-64
*
* In the case there the IEEE 802.15.4 node functions as an endpoint in a
* start topology, the destination address will, instead, be the address
@ -310,8 +313,9 @@ int sixlowpan_destaddrfromip(FAR struct radio_driver_s *radio,
/* Otherwise, the destination MAC address is encoded in the IP address */
/* If the address is link-local, or matches the prefix of the local address,
* the interface identifier can be extracted from the lower bits of the address.
/* If the address is link-local, or matches the prefix of the local
* address, the interface identifier can be extracted from the lower
* bits of the address.
*/
if (!sixlowpan_islinklocal(ipaddr) &&
@ -414,11 +418,11 @@ int sixlowpan_destaddrfromip(FAR struct radio_driver_s *radio,
* address from an IEEE802.15.4 short address (saddr), extended address
* (eaddr), or other variable length radio addresses.
*
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address IEEE 48-bit MAC
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address 48-bit MAC
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address 48-bit MAC
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address EUI-64
*
****************************************************************************/
@ -514,11 +518,11 @@ void sixlowpan_ipfromaddr(FAR const struct netdev_varaddr_s *addr,
* IEEE802.15.4 MAC addresses. sixlowpan_destaddrfromip() is intended to
* handle a tagged address or any size.
*
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address IEEE 48-bit MAC
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
* 128 112 96 80 64 48 32 16
* ---- ---- ---- ---- ---- ---- ---- ----
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address 48-bit MAC
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address 48-bit MAC
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address EUI-64
*
****************************************************************************/
@ -532,6 +536,7 @@ static inline bool sixlowpan_isbytebased(const net_ipv6addr_t ipaddr,
}
#endif
#ifdef HAVE_SADDR
static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr,
FAR const uint8_t *saddr)
{
@ -539,7 +544,9 @@ static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr,
ipaddr[6] == HTONS(0xfe00) &&
ipaddr[7] == *(uint16_t *)saddr);
}
#endif
#ifdef HAVE_EADDR
static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr,
FAR const uint8_t *eaddr)
{
@ -554,6 +561,7 @@ static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr,
ipaddr[6] == *(uint16_t *)(eaddr + 4) &&
ipaddr[7] == *(uint16_t *)(eaddr + 6));
}
#endif
bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr,
FAR const struct netdev_varaddr_s *addr)
@ -649,7 +657,9 @@ int sixlowpan_src_panid(FAR struct radio_driver_s *radio,
return ret;
}
/* MAC802154 gives us PAN ID in Little Endinan Order, but we need it in Network Order */
/* MAC802154 gives us PAN ID in Little Endinan Order, but we need
* it in Network Order.
*/
panid[0] = arg.u.getreq.attrval.mac.panid[1];
panid[1] = arg.u.getreq.attrval.mac.panid[0];

View file

@ -1,36 +1,20 @@
############################################################################
# tools/Makefile.host
#
# Copyright (C) 2007, 2008, 2011-2012, 2015, 2017-2018 Gregory Nutt. All
# rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# http://www.apache.org/licenses/LICENSE-2.0
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
@ -79,15 +63,15 @@ all: b16$(HOSTEXEEXT) bdf-converter$(HOSTEXEEXT) cmpconfig$(HOSTEXEEXT) \
configure$(HOSTEXEEXT) mkconfig$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT) \
mksymtab$(HOSTEXEEXT) mksyscall$(HOSTEXEEXT) mkversion$(HOSTEXEEXT) \
cnvwindeps$(HOSTEXEEXT) nxstyle$(HOSTEXEEXT) initialconfig$(HOSTEXEEXT) \
logparser$(HOSTEXEEXT) gencromfs$(HOSTEXEEXT) convert-comments$(HOSTEXEEXT) \
lowhex$(HOSTEXEEXT) detab$(HOSTEXEEXT) rmcr$(HOSTEXEEXT)
gencromfs$(HOSTEXEEXT) convert-comments$(HOSTEXEEXT) lowhex$(HOSTEXEEXT) \
detab$(HOSTEXEEXT) rmcr$(HOSTEXEEXT)
default: mkconfig$(HOSTEXEEXT) mksyscall$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT) \
cnvwindeps$(HOSTEXEEXT)
ifdef HOSTEXEEXT
.PHONY: b16 bdf-converter cmpconfig clean configure kconfig2html mkconfig \
mkdeps mksymtab mksyscall mkversion cnvwindeps nxstyle initialconfig \
logparser gencromfs convert-comments lowhex detab rmcr
gencromfs convert-comments lowhex detab rmcr
else
.PHONY: clean
endif
@ -193,15 +177,6 @@ ifdef HOSTEXEEXT
initialconfig: initialconfig$(HOSTEXEEXT)
endif
# logparser - Convert a git log to ChangeLog format.
logparser$(HOSTEXEEXT): logparser.c
$(Q) $(HOSTCC) $(HOSTCFLAGS) -o logparser$(HOSTEXEEXT) logparser.c
ifdef HOSTEXEEXT
logparser: logparser$(HOSTEXEEXT)
endif
# gencromfs - Generate a CROMFS file system
gencromfs$(HOSTEXEEXT): gencromfs.c
@ -285,8 +260,6 @@ clean:
$(call DELFILE, gencromfs.exe)
$(call DELFILE, initialconfig)
$(call DELFILE, initialconfig.exe)
$(call DELFILE, logparser)
$(call DELFILE, logparser.exe)
$(call DELFILE, lowhex)
$(call DELFILE, lowhex.exe)
$(call DELFILE, Make.dep)

View file

@ -50,7 +50,7 @@ ifneq ($(GIT_DIR),y)
# In case the version file does not exist
CONFIG_VERSION_STRING ?= "0.0"
CONFIG_VERSION_STRING ?= "0.0.0"
CONFIG_VERSION_BUILD ?= "0"
VERSION_ARG = -v $(CONFIG_VERSION_STRING) -b $(CONFIG_VERSION_BUILD)

View file

@ -44,9 +44,10 @@ include $(TOPDIR)\tools\Config.mk
# In case .version file does not exist
CONFIG_VERSION_STRING ?= "0.0"
CONFIG_VERSION_STRING ?= "0.0.0"
CONFIG_VERSION_MAJOR ?= 0
CONFIG_VERSION_MINOR ?= 0
CONFIG_VERSION_PATCH ?= 0
CONFIG_VERSION_BUILD ?= "0"
# Control build verbosity
@ -255,6 +256,7 @@ $(TOPDIR)\.version:
$(Q) echo CONFIG_VERSION_STRING="0" > .version
$(Q) echo CONFIG_VERSION_MAJOR=0 >> .version
$(Q) echo CONFIG_VERSION_MINOR=0 >> .version
$(Q) echo CONFIG_VERSION_PATCH=0 >> .version
$(Q) echo CONFIG_VERSION_BUILD="0" >> .version
include\nuttx\version.h: $(TOPDIR)\.version tools\mkversion$(HOSTEXEEXT)

View file

@ -207,11 +207,11 @@ mkconfigvars.sh
$ tools/mkconfigvars.sh -h
tools/mkconfigvars.sh is a tool for generation of configuration variable documentation
USAGE: tools/mkconfigvars.sh [-d|h] [-v <major.minor>]
USAGE: tools/mkconfigvars.sh [-d|h] [-v <major.minor.patch>]
Where:
-v <major.minor>
The NuttX version number expressed as a major and minor number separated
-v <major.minor.patch>
The NuttX version number expressed as a major, minor and patch number separated
by a period
-d
Enable script debug
@ -745,15 +745,6 @@ link.sh, link.bat, copydir.sh, copydir.bat, unlink.sh, and unlink.bat
NTFS mklink.exe command instead of copying files. That logic, however,
has not been verified as of this writing.
logparser.c
-----------
Convert a git log to ChangeLog format. Recommended usage:
git log --date-order --reverse <rev1>..<rev2>|HEAD >_git_log.tmp
logparser _git_log.tmp >_changelog.txt
rm -f _git_log.tmp
Makefile.host
-------------
@ -1129,11 +1120,11 @@ zipme.sh
Any VCS files or directories are excluded from the final tarballs.
$ ./tools/zipme.sh -h
USAGE="USAGE: ./tools/zipme.sh [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] <major.minor>"
USAGE="USAGE: ./tools/zipme.sh [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] <major.minor.patch>"
Examples:
./tools/zipme.sh -s 9.0
Create version 9.0 tarballs and sign them.
./tools/zipme.sh -s -k XXXXXX 9.0
./tools/zipme.sh -s 9.0.0
Create version 9.0.0 tarballs and sign them.
./tools/zipme.sh -s -k XXXXXX 9.0.0
Same as above but use the key-id XXXXXX to sign the tarballs
./tools/zipme.sh -e "*.swp tmp" 9.0
Create the tarballs but exclude any *.swp file and the "tmp" directory.
./tools/zipme.sh -e "*.swp tmp" 9.0.0
Create the tarballs but exclude any .swp file and the "tmp" directory.

View file

@ -200,8 +200,10 @@ for dir in $dirlist; do
fi
# Check if the path needs to be extended for Windows-based tools under Cygwin
# windows=yes: We are building for a windows platform
# wintool=y: The platform is Cygwin and we are using a windows native tool
if [ "X$windows" = "Xyes" ]; then
if [ "X$windows" = "Xyes" -a "X$wintool" == "Xy" ]; then
path=`cygpath -w $dir`
else
path=$dir

View file

@ -1,576 +0,0 @@
/****************************************************************************
* tools/logparser.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#define _GNU_SOURCE 1
#include <stdbool.h>
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define LINESIZE (PATH_MAX > 4096 ? PATH_MAX : 4096)
/****************************************************************************
* Private Types
****************************************************************************/
enum parse_state_e
{
STATE_IDLE = 0, /* Finished last, ready to start next */
STATE_HEADER, /* Started next, parsing header */
STATE_ENDHEADER, /* Finished the header looking for the start of the body */
STATE_BODY, /* Parsing the body */
};
/****************************************************************************
* Private Data
****************************************************************************/
static char g_line[LINESIZE+1];
static unsigned long g_lineno;
/****************************************************************************
* Private Functions
****************************************************************************/
/* Skip over any spaces */
static char *skip_space(char *ptr)
{
while (*ptr && isspace((int)*ptr)) ptr++;
return ptr;
}
/* Find the end of a variable string */
static void trim_end(char *startptr, char *endptr)
{
while (endptr != startptr && isspace((int)*endptr))
{
*endptr = '\0';
endptr--;
}
}
/* check for a blank line */
static bool blank_line(void)
{
char *ptr = g_line;
while (*ptr != '\0')
{
if (!isspace((int)*ptr))
{
return false;
}
ptr++;
}
return true;
}
/* Convert git log date string */
static char *parse_date(char *ptr)
{
char *next;
char *endptr;
char *alloc;
unsigned int mon;
unsigned long date;
unsigned long year;
/* Form: DOW MON DD HH:MM:SS YYYY GMT
* Eg. Mon Jan 29 07:17:17 2018 -0600
*/
/* Skip the day of the week */
next = strchr(ptr, ' ');
if (next == NULL)
{
fprintf(stderr, "ERROR line %ld: Did not find day of the week\n", g_lineno);
exit(EXIT_FAILURE);
}
ptr = skip_space(next);
/* Get the month */
next = strchr(ptr, ' ');
if (next == NULL)
{
fprintf(stderr, "ERROR line %ld: Did not find month\n", g_lineno);
exit(EXIT_FAILURE);
}
endptr = next;
next = skip_space(next);
trim_end(ptr, endptr);
if (strncmp(ptr, "Jan", 3) == 0)
{
mon = 1;
}
else if (strncmp(ptr, "Feb", 3) == 0)
{
mon = 2;
}
else if (strncmp(ptr, "Mar", 3) == 0)
{
mon = 3;
}
else if (strncmp(ptr, "Apr", 3) == 0)
{
mon = 4;
}
else if (strncmp(ptr, "May", 3) == 0)
{
mon = 5;
}
else if (strncmp(ptr, "Jun", 3) == 0)
{
mon = 6;
}
else if (strncmp(ptr, "Jul", 3) == 0)
{
mon = 7;
}
else if (strncmp(ptr, "Aug", 3) == 0)
{
mon = 8;
}
else if (strncmp(ptr, "Sep", 3) == 0)
{
mon = 9;
}
else if (strncmp(ptr, "Oct", 3) == 0)
{
mon = 10;
}
else if (strncmp(ptr, "Nov", 3) == 0)
{
mon = 11;
}
else if (strncmp(ptr, "Dec", 3) == 0)
{
mon = 12;
}
else
{
fprintf(stderr, "ERROR line %ld: Unrecognized month %s\n", g_lineno, ptr);
exit(EXIT_FAILURE);
}
/* Get the day of the month */
ptr = next;
next = strchr(ptr, ' ');
if (next == NULL)
{
fprintf(stderr, "ERROR line %ld: Did not find day of the month\n", g_lineno);
exit(EXIT_FAILURE);
}
endptr = next;
next = skip_space(next);
trim_end(ptr, endptr);
date = strtoul(ptr, &endptr, 10);
if (*endptr != '\0' || date > 31)
{
fprintf(stderr, "ERROR line %ld: Invalid date\n", g_lineno);
exit(EXIT_FAILURE);
}
/* Skip over the time */
ptr = next;
next = strchr(ptr, ' ');
if (next == NULL)
{
fprintf(stderr, "ERROR line %ld: Did not find day of the month\n", g_lineno);
exit(EXIT_FAILURE);
}
/* Get the year */
ptr = skip_space(next);
next = strchr(ptr, ' ');
if (next == NULL)
{
fprintf(stderr, "ERROR line %ld: Did not find year\n", g_lineno);
exit(EXIT_FAILURE);
}
trim_end(ptr, next);
year = strtoul(ptr, &endptr, 10);
if (*endptr != '\0' || year < 2007 || year >= 3000)
{
fprintf(stderr, "ERROR line %ld: Invalid year: %s\n", g_lineno, ptr);
exit(EXIT_FAILURE);
}
/* Then create the final date string */
asprintf(&alloc, "(%04lu-%02u-%02lu)", year, mon, date);
if (alloc == NULL)
{
fprintf(stderr, "ERROR line %ld: asprintf failed\n", g_lineno);
exit(EXIT_FAILURE);
}
return alloc;
}
/* Parse the entire file */
static void parse_file(FILE *stream)
{
enum parse_state_e state;
bool lastblank;
bool firstline;
bool consumed;
bool merge;
char *name;
char *date;
char *ptr;
/* Loop until the entire file has been parsed. */
g_lineno = 0;
state = STATE_IDLE;
name = NULL;
date = NULL;
consumed = true;
firstline = true;
merge = false;
for (; ; )
{
/* Read the next line from the file (unless it was not consumed on the
* previous pass through the loop.
*/
if (consumed)
{
g_line[LINESIZE] = '\0';
if (!fgets(g_line, LINESIZE, stream))
{
/* Check if the body was terminated with the end of file */
if (state == STATE_BODY)
{
/* End of body. Add author, date, and final newline */
printf(" From %s %s.\n", name, date);
free(name);
free(date);
}
else if (state != STATE_IDLE)
{
fprintf(stderr, "ERROR line %ld: Unexpected EOF in state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
return;
}
g_lineno++;
consumed = false;
}
ptr = g_line;
/* Process the line depending upon the state of the parser */
switch (state)
{
case STATE_IDLE: /* Finished last, ready to start next */
if (blank_line())
{
consumed = true;
break;
}
if (isspace(g_line[0]))
{
fprintf(stderr, "ERROR line %lu: Unexpected whitespace in state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
/* Change state and fall through */
state = STATE_HEADER;
case STATE_HEADER: /* Started next, parsing header */
if (!isspace(g_line[0]))
{
if (strncmp(g_line, "commit ", 7) == 0)
{
/* Skip commit line */
}
else if (strncmp(g_line, "Merge: ", 6) == 0)
{
/* Skip merges */
merge = true;
}
else if (strncmp(g_line, "Author: ", 8) == 0)
{
char *endptr;
/* Extract the name */
ptr += 7;
ptr = skip_space(ptr);
endptr = strchr(ptr, '<');
if (endptr == NULL)
{
fprintf(stderr, "ERROR line %lu: No email address after name, state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
if (name != NULL)
{
fprintf(stderr, "ERROR line %lu: Duplicate name, state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
/* Copy and save the name string */
trim_end(ptr, endptr - 1);
name = strdup(ptr);
if (name == NULL)
{
fprintf(stderr, "ERROR line %lu: Failed to duplicate name, state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
}
else if (strncmp(g_line, "Date: ", 6) ==0)
{
if (date != NULL)
{
fprintf(stderr, "ERROR line %lu: Duplicate date, state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
/* Extract the date */
ptr += 6;
ptr = skip_space(ptr);
date = parse_date(ptr);
}
else
{
fprintf(stderr, "ERROR line %lu: Unrecognized header line in state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
consumed = true;
break;
}
/* Change state and fall through */
if (name == NULL || date == NULL)
{
fprintf(stderr, "ERROR line %lu: name or date not found in header. State %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
state = STATE_ENDHEADER;
case STATE_ENDHEADER: /* Finished the header looking for the start of the body */
if (blank_line())
{
consumed = true;
break;
}
if (!isspace(g_line[0]))
{
fprintf(stderr, "ERROR line %lu: Unexpected in state %d\n",
g_lineno, state);
exit(EXIT_FAILURE);
}
/* Change state and fall through */
state = STATE_BODY;
lastblank = false;
case STATE_BODY: /* Parsing the body */
if (blank_line())
{
lastblank = true;
consumed = true;
break;
}
if (isspace(g_line[0]))
{
char *endptr;
char *tmp;
/* Remove the newline from the end */
ptr = skip_space(ptr);
endptr = &ptr[strlen(ptr) - 1];
trim_end(ptr, endptr);
/* Change leading "* " to "- " */
tmp = ptr;
if (ptr[0] == '*' && ptr[1] == ' ')
{
*ptr = '-';
tmp = ptr + 2;
}
/* Skip over certain crap body lines added by GIT; Skip over
* merge entries altogether.
*/
if (strncmp(tmp, "Merged in ", 10) != 0 &&
strncmp(tmp, "Approved-by: ", 13) != 0 &&
strncmp(tmp, "Signed-off-by: ", 15) != 0 &&
!merge)
{
/* Is this the first paragraph in the body? */
if (firstline)
{
printf("\t* %s", ptr);
}
else
{
/* This paragraph is not the first, was it separated
* from the previous paragraph by a blank line?
*/
if (lastblank)
{
putchar('\n');
}
printf("\n\t %s", ptr);
}
firstline = false;
lastblank = false;
}
consumed = true;
break;
}
/* End of body. Add author, date, and final newline */
if (!merge)
{
printf(" From %s %s.\n", name, date);
}
/* Revert to IDLE state */
free(name);
name = NULL;
free(date);
date = NULL;
state = STATE_IDLE;
firstline = true;
merge = false;
break;
default:
fprintf(stderr, "ERROR line %lu: Bad state %d\n", g_lineno, state);
exit(EXIT_FAILURE);
}
}
}
static void show_usage(const char *progname)
{
fprintf(stderr, "USAGE: %s <abs path to git log file>\n", progname);
exit(EXIT_FAILURE);
}
/****************************************************************************
* Public Functions
****************************************************************************/
int main(int argc, char **argv, char **envp)
{
FILE *stream;
if (argc != 2)
{
fprintf(stderr, "Unexpected number of arguments\n");
show_usage(argv[0]);
}
stream = fopen(argv[1], "r");
if (!stream)
{
fprintf(stderr, "open %s failed: %s\n", argv[1], strerror(errno));
return EXIT_FAILURE;
}
parse_file(stream);
fclose(stream);
return EXIT_SUCCESS;
}

View file

@ -32,7 +32,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#
USAGE="USAGE: $0 [-d|h] [-v <major.minor>]"
USAGE="USAGE: $0 [-d|h] [-v <major.minor.patch>]"
ADVICE="Try '$0 -h' for more information"
unset VERSION
@ -52,8 +52,8 @@ while [ ! -z "$1" ]; do
echo $USAGE
echo ""
echo "Where:"
echo " -v <major.minor>"
echo " The NuttX version number expressed as a major and minor number separated"
echo " -v <major.minor.patch>"
echo " The NuttX version number expressed as a major, minor and patch number separated"
echo " by a period"
echo " -d"
echo " Enable script debug"

View file

@ -88,7 +88,7 @@ int main(int argc, char **argv, char **envp)
exit(2);
}
stream= fopen(filepath, "r");
stream = fopen(filepath, "r");
if (!stream)
{
fprintf(stderr, "open %s failed: %s\n", filepath, strerror(errno));
@ -99,7 +99,9 @@ int main(int argc, char **argv, char **envp)
printf("#ifndef __INCLUDE_NUTTX_VERSION_H\n");
printf("#define __INCLUDE_NUTTX_VERSION_H\n\n");
generate_definitions(stream);
printf("\n#define CONFIG_VERSION ((CONFIG_VERSION_MAJOR << 8) | (CONFIG_VERSION_MINOR))\n\n");
printf("\n#define CONFIG_VERSION ((CONFIG_VERSION_MAJOR << 16) |\\\n"
" (CONFIG_VERSION_MINOR << 8) |\\\n"
" (CONFIG_VERSION_PATCH))\n\n");
printf("#endif /* __INCLUDE_NUTTX_VERSION_H */\n");
fclose(stream);

View file

@ -1,35 +1,20 @@
#!/usr/bin/env bash
# tools/sethost.sh
#
# Copyright (C) 2016-2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# http://www.apache.org/licenses/LICENSE-2.0
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
progname=$0
@ -142,76 +127,59 @@ fi
if [ "X$host" == "Xlinux" -o "X$host" == "Xmacos" ]; then
# Disable Windows (to suppress warnings from Window Environment selections)
kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_WINDOWS
# Enable Linux or macOS
if [ "X$host" == "Xlinux" ]; then
echo " Select CONFIG_HOST_LINUX=y"
echo "CONFIG_HOST_LINUX=y" >> $nuttx/.config
sed -i -e "/CONFIG_HOST_MACOS/d" $nuttx/.config
kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_MACOS
kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_LINUX
else
echo " Select CONFIG_HOST_MACOS=y"
sed -i -e "/CONFIG_HOST_LINUX/d" $nuttx/.config
echo "CONFIG_HOST_MACOS=y" >> $nuttx/.config
kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_LINUX
kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_MACOS
fi
# Disable all Windows options
# Enable the System V ABI
sed -i -e "/CONFIG_HOST_WINDOWS/d" $nuttx/.config
sed -i -e "/CONFIG_SIM_X8664_MICROSOFT/d" $nuttx/.config
echo "CONFIG_SIM_X8664_SYSTEMV=y" >> $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_CYGWIN/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_MSYS/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_OTHER/d" $nuttx/.config
kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_X8664_SYSTEMV
else
echo " Select CONFIG_HOST_WINDOWS=y"
# Enable Windows
kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_LINUX
kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_MACOS
echo "CONFIG_HOST_WINDOWS=y" >> $nuttx/.config
sed -i -e "/CONFIG_HOST_LINUX/d" $nuttx/.config
sed -i -e "/CONFIG_HOST_MACOS/d" $nuttx/.config
# Enable Windows and the Microsoft ABI
echo "CONFIG_SIM_X8664_MICROSOFT=y" >> $nuttx/.config
sed -i -e "/CONFIG_SIM_X8664_SYSTEMV/d" $nuttx/.config
kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_WINDOWS
kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_X8664_MICROSOFT
# Enable Windows environment
sed -i -e "/CONFIG_WINDOWS_OTHER/d" $nuttx/.config
if [ "X$wenv" == "Xcygwin" ]; then
echo " Select CONFIG_WINDOWS_CYGWIN=y"
echo "CONFIG_WINDOWS_CYGWIN=y" >> $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_MSYS/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" $nuttx/.config
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN
else
sed -i -e "/CONFIG_WINDOWS_CYGWIN/d" $nuttx/.config
if [ "X$wenv" == "Xmsys" ]; then
echo " Select CONFIG_WINDOWS_MSYS=y"
echo "CONFIG_WINDOWS_MSYS=y" >> $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" $nuttx/.config
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_MSYS
else
sed -i -e "/CONFIG_WINDOWS_MSYS/d" $nuttx/.config
if [ "X$wenv" == "Xubuntu" ]; then
echo " Select CONFIG_WINDOWS_UBUNTU=y"
echo "CONFIG_WINDOWS_UBUNTU=y" >> $nuttx/.config
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" $nuttx/.config
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_UBUNTU
else
echo " Select CONFIG_WINDOWS_NATIVE=y"
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" $nuttx/.config
echo "CONFIG_WINDOWS_NATIVE=y" $nuttx/.config
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE
fi
fi
fi
fi
sed -i -e "/CONFIG_HOST_OTHER/d" $nuttx/.config
echo " Refreshing..."
if grep -q "V=1" <<< "$*" ; then

View file

@ -36,7 +36,7 @@ WD=`pwd`
# Get command line parameters
USAGE="USAGE: $0 [-d|-h] [-b <build>] [-v <major.minor>] <outfile-path>"
USAGE="USAGE: $0 [-d|-h] [-b <build>] [-v <major.minor.patch>] <outfile-path>"
ADVICE="Try '$0 -h' for more information"
unset VERSION
@ -69,9 +69,9 @@ while [ ! -z "$1" ]; do
echo " Enable script debug"
echo " -h"
echo " show this help message and exit"
echo " -v <major.minor>"
echo " The NuttX version number expressed as a major and minor number separated"
echo " by a period"
echo " -v <major.minor.patch>"
echo " The NuttX version number expressed as a major, minor and patch"
echo " number seperated by a period"
echo " <outfile-path>"
echo " The full path to the version file to be created"
exit 0
@ -87,6 +87,12 @@ OUTFILE=$1
if [ -z ${VERSION} ] ; then
VERSION=`git tag --sort=taggerdate | tail -1 | cut -d'-' -f2`
# Earlier tags used the format "major.minor", append a "0" for a patch.
if [[ ${VERSION} =~ ^([0-9]+[\.][0-9]+)$ ]] ; then
VERSION=${VERSION}.0
fi
fi
# Make sure we know what is going on
@ -102,19 +108,27 @@ if [ -z ${OUTFILE} ] ; then
echo "Missing path to the output file"
echo $USAGE
echo $ADVICE
exit 1
exit 2
fi
# Get the major and minor version numbers
# Get the major, minor and patch version numbers
MAJOR=`echo ${VERSION} | cut -d'.' -f1`
if [ "X${MAJOR}" = "X${VERSION}" ]; then
echo "Missing minor version number"
echo $USAGE
echo $ADVICE
exit 2
exit 3
fi
MINOR=`echo ${VERSION} | cut -d'.' -f2`
if [ "X${MAJOR}.${MINOR}" = "X${VERSION}" ]; then
echo "Missing patch version number"
echo $USAGE
echo $ADVICE
exit 4
fi
PATCH=`echo ${VERSION} | cut -d'.' -f3`
# Get GIT information (if not provided on the command line)
@ -122,7 +136,7 @@ if [ -z "${BUILD}" ]; then
BUILD=`git log --oneline -1 | cut -d' ' -f1 2>/dev/null`
if [ -z "${BUILD}" ]; then
echo "GIT version information is not available"
exit 3
exit 5
fi
if [ -n "`git diff-index --name-only HEAD | head -1`" ]; then
BUILD=${BUILD}-dirty
@ -137,4 +151,5 @@ echo "" >>${OUTFILE}
echo "CONFIG_VERSION_STRING=\"${VERSION}\"" >>${OUTFILE}
echo "CONFIG_VERSION_MAJOR=${MAJOR}" >>${OUTFILE}
echo "CONFIG_VERSION_MINOR=${MINOR}" >>${OUTFILE}
echo "CONFIG_VERSION_PATCH=${PATCH}" >>${OUTFILE}
echo "CONFIG_VERSION_BUILD=\"${BUILD}\"" >>${OUTFILE}

View file

@ -50,7 +50,7 @@ EXCLPAT="
"
# Get command line parameters
USAGE="USAGE: $0 [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] <major.minor>"
USAGE="USAGE: $0 [-d|h|v|s] [-b <build]> [-e <exclude>] [-k <key-id>] <major.minor.patch>"
ADVICE="Try '$0 -h' for more information"
unset VERSION
@ -104,8 +104,8 @@ while [ ! -z "$1" ]; do
echo " PGP sign the final tarballs and create digests."
echo " -k"
echo " PGP key ID. If not provided the default ID will be used."
echo " <major.minor>"
echo " The NuttX version number expressed as a major and minor number separated"
echo " <major.minor.patch>"
echo " The NuttX version number expressed as a major, minor and patch number separated"
echo " by a period"
exit 0
;;