Compare commits

..

103 commits

Author SHA1 Message Date
Jukka Laitinen
925b8b0904 drivers/bch/bchdev_driver.c: Fix BIOC_FLUSH
Don't fail if the lowerhalf mtd driver doesn't support BIOC_FLUSH;
This is normal - if the lowerhalf has nothing to do, it doesn't handle
the IOCTL.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-12-19 19:22:22 +08:00
wangmingrong1
1200d49b83 gcov: Disable stack checking
When enable CONFIG_STACK_CANARIES, in general, the stack check in the __gcov_fork function is:
" return fork();
18: e59f3020 ldr r3, [pc, #32] @ 40 <__gcov_fork+0x40>
1c: e5932000 ldr r2, [r3]
20: e59d3004 ldr r3, [sp, #4]
24: e0332002 eors r2, r3, r2
28: e3a03000 mov r3, #0
2c: 1a000002 bne 3c <__gcov_fork+0x3c>"
r3 is obtained by taking the value of sp offset. But after opening thumb, the second comparison value in
"8c6: 4a06 ldr r2, [pc, #24] @ (8e0 <__gcov_fork+0x30>)
8c8: 6811 ldr r1, [r2, #0]
8ca: 687a ldr r2, [r7, #4]
8cc: 4051 eors r1, r2"
is obtained through r7. Since r7 stores the stack address at this time, which stores the address of the parent process, the stack out of bounds will occur in the child process

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-19 19:22:12 +08:00
wangmingrong1
2c37282f46 gcov: Prevent pile insertion recursion
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-19 19:22:12 +08:00
wangmingrong1
dad9ad949d gcov: Fix gcov fork() issue
After code coverage is enabled, fork will be replaced by __gcov_fork

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-19 19:22:12 +08:00
YAMAMOTO Takashi
658d767b81 Explicitly enable CONFIG_LUA_LUV_MODULE's dependencies where it's enabled
In order to replace CONFIG_LUA_LUV_MODULE's "select" items
with "depends on".
2024-12-19 19:21:27 +08:00
anjiahao
22b12e17a6 procfs:add missing ',' to end of line
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
3e889039c4 imx_gpio: use small lock in arch/arm/src/imx6/imx_gpio.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
82874a5ad1 cxd: use small lock
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
15c80e68a0 modifyreg16: use small lock in modifyreg16
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
d48583604c at32_serial: use small lock in arch/arm/src/at32/at32_serial.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
2852064501 remove big lock in arch_phy_irq
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
366332a948 bt_buf: use small lock in wireless/bluetooth/bt_buf.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
hujun5
dbeedf9229 bt_buf: use small lock to protect bt_bufferlist_s
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-19 19:20:19 +08:00
Alin Jerpelea
11bc75a9d9 crypto/xform.c: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

NOTE
The code was reported as GPL by FOSS ID
and Xiaomi scanned the file xform.c with Black Duck Security and it showed
that the license was BSD-3-Clause and no risk was reported.

Since there is no clause on the license it was concluded as 0BSD

Refference
https://github.com/apache/nuttx/pull/15252

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 19:18:13 +08:00
chao an
cdef7da956 arm64/cache: add i/dcache check to avoid build break
arch/arm64/src/common/arm64_cache.c:344:35: error: macro "up_get_icache_linesize" passed 1 arguments, but takes just 0
  344 | size_t up_get_icache_linesize(void)
      |                                   ^

Feishu-Id: 4956395133

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-19 16:28:44 +08:00
Alin Jerpelea
476d1d4e3c arch/x86_64: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
Alin Jerpelea
7465fefd1b arch/xtensa: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
Alin Jerpelea
ecdad3af2f include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
Alin Jerpelea
b8a33af866 drivers/usbhost/hid_parser: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
Alin Jerpelea
5c1becab24 arch/arm: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
Alin Jerpelea
47df393ea6 drivers/input/uinput: migrate to ASF license
Xiaomi has submitted the SGA and the license can be migrated to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
Alin Jerpelea
24b791bdfc drivers/mtd/mtd_config_fs: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:29:10 +08:00
hujun5
ad42a06060 some replacements were omitted.
fix regression from https://github.com/apache/nuttx/pull/15219

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 12:02:36 +08:00
hujun5
3025212c2c fix compile error
Create version.h
CC:  chip/tm4c/tm4c_gpio.c chip/tm4c/tm4c_gpio.c: In function 'tiva_configgpio':
chip/tm4c/tm4c_gpio.c:793:11: warning: implicit declaration of function 'spin_lock_irqsave' [-Wimplicit-function-declaration]
  793 |   flags = spin_lock_irqsave(&g_configgpio_lock);
      |           ^~~~~~~~~~~~~~~~~
CC:  nsh_parse.c chip/tm4c/tm4c_gpio.c:844:3: warning: implicit declaration of function 'spin_unlock_irqrestore' [-Wimplicit-function-declaration]
  844 |   spin_unlock_irqrestore(&g_configgpio_lock, flags);

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 11:54:37 +08:00
Filipe Cavalcanti
64aa1972af arch/risc-v/esp32c6: fix memcpy on AP password 2024-12-18 11:54:15 +08:00
Filipe Cavalcanti
aca36a1784 arch/xtensa: fix memcpy on AP password 2024-12-18 11:54:15 +08:00
YAMAMOTO Takashi
14edf1385c sim: Fix build errors on macOS
macOS 15.2
x86-64
Xcode 16.1
```
ld: warning: disabling chained fixups because of unaligned pointers
ld: illegal text-relocation in '_main'+0x1F (/Users/yamamoto/git/nuttx/nuttx/arc
h/sim/src/nuttx.rel) to '_g_argc'
```
2024-12-17 18:15:00 +08:00
Alin Jerpelea
9692409b2f libs/libc/stdlib: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 18:14:31 +08:00
Alin Jerpelea
661917e84d libs/libc/stdlib: remove BSD-4 clause
remove the advertising clause
3. All advertising materials mentioning features or use of this software must
display the following acknowledgement: This product includes software
developed by the University of California, Berkeley and its contributors.

permitted by Berkley amendment
https://ipira.berkeley.edu/sites/default/files/amendment_of_4-clause_bsd_software_license.pdf

following example from NETBSD and OPENBSD
eb7c1594f1
6580fee329

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 18:14:31 +08:00
hujun5
9c3fc91304 fs: fix comment in https://github.com/apache/nuttx/pull/15163
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:14:18 +08:00
hujun5
40e62f4d43 use atomic to protect f_refs
fix regresion from https://github.com/apache/nuttx/pull/14801

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:14:18 +08:00
YAMAMOTO Takashi
0028f0cae9 enable CONFIG_PIPES where CONFIG_LIBUV is enabled
after running the following script, reverted a few
unrelated modifications manually.
```
git grep -l CONFIG_LIBUV|grep defconfig|while read FILE;do
DIR=$(dirname $FILE)
./tools/configure.sh -E $DIR
kconfig-tweak -e CONFIG_PIPES
kconfig-tweak -d CONFIG_HOST_MACOS
make savedefconfig
cp defconfig $FILE
done
```

cf. https://github.com/apache/nuttx/issues/14773
2024-12-17 18:13:48 +08:00
hujun5
bff9935948 fix a typo
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:13:35 +08:00
hujun5
42d2a27621 esp32s3_rtc: use small lock in arch/xtensa/src/esp32s3/esp32s3_rtc.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:13:35 +08:00
hujun5
9f449d2da4 lc823450_rtc: use small lock in arch/arm/src/lc823450/lc823450_rtc.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:13:35 +08:00
hujun5
6bcf698615 esp32c3_rtc: use small lock in arch/risc-v/src/esp32c3-legacy/esp32c3_rtc.c
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:13:35 +08:00
hujun5
9ae786ca95 max32660_rtc: change spinlock name g_lock -> g_rtc_lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-17 18:13:35 +08:00
zhangyuan29
2b6282ea04 tools/ci: change sem_init_6_1 to support skip result
After SEM_VALUE_MAX change to INT_MAX, need to support
skip result.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
zhangyuan29
8eb8472eed arm/lpc17xx: disable mqueue sysv
mqueue sysv not used, remove to reduce sram usage

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
zhangyuan29
eae46b0823 sem: change sem wait to atomic operation
Add sem_wait fast operations, use atomic to ensure
atomicity of semcount operations, and do not depend
on critical section.

Test with robot:
before modify:
nxmutex_lock cost: 78 ns
nxmutex_unlock cost: 82 ns

after modify:
nxmutex_lock cost: 28 ns
nxmutex_unlock cost: 14 ns

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
zhangyuan29
77091a2296 atomic: Unify the compare_exchange functions of nx and stdatomic
define nx_atomic_compare_exchange_weak and nx_atomic_compare_exchange_strong function

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
chenrun1
9138e8af01 lib_pathbuffer.c:Use atomic instead of locks
Summary:
  Use atomic_cmpxchg to ensure that in multithreaded situations, if someone releases the buffer, it can be applied for in time. And use atomic_ulong to save free_bitmap

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-12-17 09:33:50 +08:00
chao an
4c379ecc98 libs/libc: rename LIBC_MAX_PATHBUFFER to LIBC_PATHBUFFER_MAX
Unified naming style:

if LIBC_PATHBUFFER
config LIBC_PATHBUFFER_MAX
...
config LIBC_PATHBUFFER_MALLOC
...
endif # LIBC_PATHBUFFER

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 09:33:50 +08:00
chao an
cf060b6bf2 libs/libc: add a option to disable path buffer by default
If the current platform does not require a large PATH_MAX size support and toolchain supports alloca(),
we could turn off this option to improve performance.

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 09:33:50 +08:00
YAMAMOTO Takashi
1f65af208a libxx: Make LIBCXXABI default for sim/macOS
Fix build errors like:
https://github.com/apache/nuttx/issues/14774
2024-12-17 09:25:24 +08:00
zhaohaiyang1
bb7562c380 nuttx/can.h: delete "begin_packed_struct" and "end_packed_struct" qualifier
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-12-17 09:25:02 +08:00
YAMAMOTO Takashi
63a9e1ff89 fs/littlefs/Make.defs: fix a littlefs unpack regression
Note that $(CONFIG_FS_LITTLEFS_VERSION).tar.gz is expanded to
eg. "v2.5.1".tar.gz. The extra quotes break make's file existence
checks.

Fixes: https://github.com/apache/nuttx/issues/15148

The regression was caused by https://github.com/apache/nuttx/pull/14903
2024-12-17 09:24:28 +08:00
Alin Jerpelea
58bc6d5ec3 arch/esp32c3-legacy/esp32c3_ice40: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Copyright and Author information is missing from the License and was filled with
commit authorship
    Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
0bfa46497d drivers/spi/ice40: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Copyright and Author information is missing from the License and was filled with
commit authorship
    Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
1e85f0c195 arch/arm/xmc4: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
62306849ca boards/arm/s32k1xx: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
e5272996f7 include/crypto/sha1: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
11183f68ab include/crypto/rijndael: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
b95414e6ba include/crypto/poly1305: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
8ba848a12b include/crypto/md5: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
438caa767a include/crypto/cast: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
0f2337e175 include/search: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
a9e3614eaa crypto/sha1: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
fea44435d4 crypto/rijndael: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
97827ab26b crypto/poly1305: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
568add3259 crypto/md5: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
861f81d9d7 crypto/chacha: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
ef0045ba0d crypto/cast: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
9ea488fd60 tools/macar-qcs.sh: migrate license to ASF
Xiaomi has signed the SGA and we can migrate the license to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
1a21acf5a4 arch/esp32c3-legacy/hardware: migrate license to ASF
the author has submitted the CLA and the license can be migrated to ASF
    Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Alin Jerpelea
d19c0b8444 arch/esp32c3-legacy/hardware: migrate license to ASF
both co-authors have submitted the CLA and the license can be migrated to ASF
 Co-authored-by: Dong Heng <dongheng@espressif.com>
 Co-authored-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00
Andre Heinemans
f4e650352e sensors: fix Make.defs for bmm150 2024-12-16 10:27:21 +08:00
simbit18
97371c5b45 windows native: fixed FAILED: System.map
fixed

[1025/1027] Generating System.map
FAILED: System.map C:/nuttxgit/nuttx/build/System.map
cmd.exe /C "cd /D C:\nuttxgit\nuttx\build && arm-none-eabi-nm nuttx | grep -v '(compiled)|($)|( [aUw] )|(..ng$)|(LASH[RL]DI)' | sort > System.map"
2024-12-16 10:27:06 +08:00
Andre Heinemans
84ab0a3785 lpuart: fix build errors for SINGLEWIRE and INVERT without SERIAL_TERMIOS 2024-12-16 10:26:48 +08:00
Andre Heinemans
a0f0252e92 arm64/imx9: tpm: fix TPM_FILTER_CHXFVAL_MASK macro 2024-12-16 09:56:55 +08:00
Tiago Medicci Serrano
0da4e44e48 rv-virt/citest: Increase init task stack size to 3072
After https://github.com/apache/nuttx/pull/15075, the size of the
stack size has decreased 8 bytes and the init stack size for the
rv-virt:citest defconfig was near its full capacity, which lead to
crashing the `ps` command. The init stack size for this defconfig
was increased from 2048 to 3072 to avoid stack overflow.
2024-12-13 18:19:54 +08:00
SPRESENSE
957516105f arch: cxd56xx: Fix not restart after TX error
Fix a bug that I2C driver can not transfer after TX abort error.
It caused by remaining NO_STOP flag status.
2024-12-13 18:19:49 +08:00
chao an
6825f66fd6 sched/clock: cleanup g_system_ticks reference if arch timer is enabled
continue work of: https://github.com/apache/nuttx/pull/15139

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-13 18:19:44 +08:00
ligd
1463a49396 sched/clock: call up_timer_gettime() to get higher resolution
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-12-13 18:19:44 +08:00
Windrow14
90870ae62e fs/fat/fs_fat32util.c: fix potential exception due to dividing zero during mounting when fat is corrupted
Check fs_fatsecperclus' value when read from eMMC device. Return an error if it is zero.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-12-13 18:19:38 +08:00
Jukka Laitinen
1a74a44022 fs/shm/shmfs_alloc.c: Allocate zero-initialized memory in flat build
POSIX requires that the shm objects are zero-initialized. This has been broken
in some earlier commits (starting from 9af5fc5d09)

Also fix the flat build memory allocation to allocate both object data and payload
in the same chunk (as the comment also suggests). This saves allocations and memory
in a system with lots of shm objects.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-12-13 18:19:38 +08:00
chao an
200015d514 binfmt/exec: initialize binary_s to empty to avoid invaild access
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-13 18:19:13 +08:00
chao an
c6dfdbad41 binfmt/loadable: move binary_s to stack to avoid access allocator
Improve performance by reducing allocator accesses

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-13 18:19:13 +08:00
chao an
5abcc49789 mps2-an500/knsh: disable SPINLOCK to avoid build break
workaround for remove libc depends from kernel api

build break on phase 2 userspace link:

| arm-none-eabi-ld -o nuttx_user.elf --undefined=nsh_main --entry=nsh_main -T /nuttx/boards/arm/mps/mps2-an500/scripts/memory.ld \
| -T /nuttx/boards/arm/mps/mps2-an500/scripts/user-space.ld -L/nuttx/staging/ -L/nuttx/staging/ -L/nuttx/staging/ -L/nuttx/staging/ \
| -L/nuttx/staging/ -L/nuttx/staging/ mps_userspace.o --start-group -lproxies -lc -lmm -larch -lxx -lapps --end-group \
| "prebuilts/linux/gcc/arm/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a"
|
| arm-none-eabi-ld: /nuttx/staging//libc.a(lib_pathbuffer.o): in function `spin_unlock_wo_note':
| /nuttx/include/nuttx/spinlock.h:380:(.text.lib_get_pathbuffer+0x298): undefined reference to `g_irq_spin_count'
| arm-none-eabi-ld: /nuttx/include/nuttx/spinlock.h:380:(.text.lib_get_pathbuffer+0x29c): undefined reference to `g_irq_spin'
| arm-none-eabi-ld: /nuttx/staging//libc.a(lib_pathbuffer.o): in function `lib_put_pathbuffer':
| /nuttx/libs/libc/misc/lib_pathbuffer.c:147:(.text.lib_put_pathbuffer+0x210): undefined reference to `g_irq_spin_count'
| arm-none-eabi-ld: /nuttx/libs/libc/misc/lib_pathbuffer.c:147:(.text.lib_put_pathbuffer+0x214): undefined reference to `g_irq_spin'
| make[1]: *** [Makefile:61: nuttx_user.elf] Error 1
| make[1]: Leaving directory '/nuttx/boards/arm/mps/mps2-an500/kernel'
| make: *** [tools/Unix.mk:540: nuttx] Error 2

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 22:00:45 +08:00
chao an
2ccdd947a1 libc/chdir: replace heap alloc to path buffer to improve performance
realloc path buffer to avoid alloc from realpath()

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 22:00:45 +08:00
chao an
bf27e4d75d esp/mcpwm: fix unpaired spin lock
N/A

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 22:00:28 +08:00
Tiago Medicci Serrano
6eb9b09960 xtensa/esp32s3: Update the reserved size for struct __lock
After https://github.com/apache/nuttx/pull/15075, the static
assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c`
was being triggered when building any of the ESP32-S3's defconfigs.
This commit updates the reserved size to reflect the changes
introduced by the related PR.
2024-12-12 22:00:07 +08:00
Jouni Ukkonen
75ef5ea11e arch/arm64/imx9: Fix usdhc dma receive
Invalidate cache when dma transfer is ready

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-12-12 21:58:39 +08:00
anjiahao
5e4c14d8e8 procfs:fix cmdline overflow
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-12-12 21:58:23 +08:00
chao an
a94264ea00 arm/cxd56xx: Add g_ prefix to rtc spin lock
continue work of a68b00206b

| commit a68b00206b
| Author: hujun5 <hujun5@xiaomi.com>
| Date:   Mon Dec 9 20:48:09 2024 +0800
|
|     cxd56_rtc.c: use small lock in arch/arm/src/cxd56xx/cxd56_rtc.c
|
|     reason:
|     We hope to remove all instances of spin_lock_irqsave(NULL).
|
|     Signed-off-by: hujun5 <hujun5@xiaomi.com>

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-11 20:35:45 +08:00
buxiasen
52c4408db9 document/drivertest: add more information in drivertest
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-12-11 20:35:28 +08:00
Nathan Hartman
532bf64515 Documentation: Tweak text about Zero Latency Interrupts
This is a follow-up to 366c8a5d94 (PR-15102).

* Documentation/guides/zerolatencyinterrupts.rst
  (Title): Make title case consistent.
  (Getting Back into the Game, Maskable Nested Interrupts): Clarify discussion
   about priorities.
  (Cortex-M3/4 Implementation): The first half of a sentence was deleted in
   366c8a5d9 because the Kconfig that was described there no longer exists:
   CONFIG_ARMV7M_USEBASEPRI. Write a new beginning for this sentence that
   matches current implementation.
  (Disabling the High Priority Interrupt): Change "cannot" to "must not be
   allowed to" to improve clarity.
  (Configuring High Priority Interrupts): Change "to NVIC" to "in NVIC" to
   improve clarity.
2024-12-11 20:35:28 +08:00
Xiang Xiao
34d1a7fd54 Documentation: Remove CONFIG_ARMV7M_USEBASEPRI from code base
since the basepri is always used without any configuraion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-12-11 20:35:28 +08:00
chao an
32ab151712 libc/chdir: chdir/fchdir should not depend on environment variables
This PR will still allow basic shell operations such as cd/ls/pwd to be used even when the environment is disabled.

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-11 20:35:00 +08:00
meijian
3fdcd065cf net/tcp_timer: fix tcp RTO abnormally large after retransmission occurs
when tcp retransmission only double conn->timer in Karn(tcp_timer.c L602), after retransmission in Jacobson
M is is now rtt test will become a negative value.
```
  signed char m;
  m = conn->rto - conn->timer; // M is now rtt test

  /* This is taken directly from VJs original code in his paper */

  m = m - (conn->sa >> 3);
  conn->sa += m;              //conn->sa is a negative value
  if (m < 0)
	{
	  m = -m;
	}

  m = m - (conn->sv >> 2);
  conn->sv += m;
  conn->rto = (conn->sa >> 3) + conn->sv; //rto
```
For example,we lost one ack packet, we will set conn->timer = 6 by backoff,conn->rto still 3.
After retransmission we will Do RTT estimation, then will get
```
conn->sa = 253
conn->rto = 46
```
Then if any packets lost it will wait for a long time before triggering a retransmission.

Test method.
We can reproduce this issue by adding drop ACK packets in tcp_input, and debug conn->rto after Jacobson.

Signed-off-by: meijian <meijian@xiaomi.com>
2024-12-11 20:34:23 +08:00
hujun5
3063f2c0e0 litex_serial: use small lock in arch/risc-v/src/litex/litex_serial.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-11 00:52:20 +08:00
hujun5
7e5088f4ea cxd56_rtc.c: use small lock in arch/arm/src/cxd56xx/cxd56_rtc.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-10 21:59:17 +08:00
hujun5
ecab220c39 max32660_rtc: use small lock in arch/arm/src/max326xx/max32660/max32660_rtc.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-10 21:59:06 +08:00
simbit18
6b7722cfb4 build(CMAKE): fix pac sim elf ONLY in Linux platform
avoid SIM compilation post build issues on other platforms

same fix for build with make
https://github.com/apache/nuttx/pull/14800
2024-12-10 21:57:55 +08:00
hujun5
c8bdfb537e lc823450_dma: use small lock in arch/arm/src/lc823450/lc823450_dma.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-10 21:57:44 +08:00
hujun5
bae0b64da3 s32k3xx_serial: use small lock in arch/arm/src/s32k3xx/s32k3xx_serial.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-10 21:57:34 +08:00
simbit18
eec97064d7 fix nxstyle
Removed extra spaces from .h and .c files
2024-12-10 21:57:22 +08:00
Alan Carvalho de Assis
0164e09339 Doc: Fix kernel thread API
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-10 21:57:09 +08:00
Alan Carvalho de Assis
e268b2a5b9 Fix small typo in rp2040_adc.c 2024-12-10 21:57:09 +08:00
chao an
01e76ddcd9 limits/path: replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency
replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-10 21:56:57 +08:00
wangjianyu3
7562aff615 fs/tmpfs: Skip any slash at the beginning of relpath
`tmpfs_stat()` fails when relpath start with slash.

Log

  Host
    $ adb -s 1234 pull /tmp/subdir
    adb: warning: skipping special file '/tmp/subdir/uname' (mode = 0o0)
    /tmp/subdir/: 0 files pulled. 1 file skipped.

  Device
    state_process_list (411): stat failed </tmp/subdir//uname> -1 22

Ref: https://github.com/apache/nuttx/blame/master/libs/libc/stdlib/lib_realpath.c#L111
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-09 21:20:20 +08:00
hujun5
16b63ed837 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881
reason:
svc call may trigger hardfault

Background
    The origin of this issue is our desire to eliminate the function of storing
"regs" in g_current_regs and instead utilize (*running_task)->xcp.regs for storage.
The benefits of this approach include faster storage speed and
avoiding multiple accesses to g_current_regs during context switching,
thus ensuring that whether returning from an interrupt or an exception,
we consistently use this_task()->xcp.regs

Issue Encountered
    However, when storing registers, we must ensure that (running_task)->xcp.regs is invalid
so that it can be safely overwritten.
According to the existing logic, the only scenario where (running_task)->xcp.regs
is valid is during restore_context. We must accurately identify this scenario.
Initially, we used the condition (running_task)==NULL for this purpose, but we deemed
this approach unsatisfactory as it did not align well with the actual logic.
(running_task) should not be NULL. Consequently, we adopted other arch-specific methods for judgment,
but due to special logic in some arch, the judgment was not accurate, leading to this issue.

Solution:
    For armv6-m, we haven't found a more suitable solution, so we are sticking with (*running_task)==NULL.
    For armv7-m/armv8-m, by removing support for primask, we can achieve accurate judgment.

    PRIMASK is a design in armv6-m, that's why arm introduce BASEPRI from armv7-m.
It's wrong to provide this option for armv7-m/armv8-m arch.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-09 21:20:06 +08:00
hujun5
702affa63b armv6m: fix regresion from https://github.com/apache/nuttx/pull/14881
reason:
svc call may trigger hardfalt

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-09 21:20:06 +08:00
1568 changed files with 7987 additions and 95319 deletions

View file

@ -173,14 +173,21 @@ jobs:
# If Not a Simple PR: Build all targets
if [[ "$quit" == "1" ]]; then
# If PR was Created or Modified: Include all boards
# If PR was Created or Modified: Exclude some boards
pr=${{github.event.pull_request.number}}
if [[ "$pr" != "" ]]; then
echo "Include all boards"
echo "Excluding arm-0[1249], arm-1[124-9], risc-v-04..06, sim-03, xtensa-02"
boards=$(
echo '${{ inputs.boards }}' |
jq --compact-output \
'.'
'map(
select(
test("arm-0[1249]") == false and test("arm-1[124-9]") == false and
test("risc-v-0[4-9]") == false and
test("sim-0[3-9]") == false and
test("xtensa-0[2-9]") == false
)
)'
)
fi
echo "selected_builds=$boards" | tee -a $GITHUB_OUTPUT

4
.gitignore vendored
View file

@ -42,8 +42,6 @@
/.config-*
/.config\ *
/.cproject
/.cache
/.clang-format
/.gdbinit
/.gdb_history
/.project
@ -82,4 +80,4 @@ SAVEMake.defs
SAVEconfig
.aider*
imx9-norimage.img
config.txt

View file

@ -87,7 +87,7 @@ find_program(KCONFIGLIB olddefconfig)
if(NOT KCONFIGLIB)
message(
FATAL_ERROR "Kconfig environment depends on kconfiglib, Please install:
$ sudo pip3 install kconfiglib")
$ sudo apt install python3-kconfiglib")
endif()
# BOARD CONFIG can be set to directory path, or <board-name>[/:]<config-name>
@ -727,7 +727,6 @@ else()
OUTPUT nuttx.rel
COMMAND
${CMAKE_C_COMPILER} ARGS -r $<$<BOOL:${CONFIG_SIM_M32}>:-m32>
$<$<BOOL:${CONFIG_HOST_LINUX}>:-Wl,-z,noexecstack>
$<TARGET_OBJECTS:sim_head> $<$<NOT:$<BOOL:${APPLE}>>:-Wl,--start-group>
${nuttx_libs_paths} $<$<NOT:$<BOOL:${APPLE}>>:-Wl,--end-group> -o
nuttx.rel

View file

@ -566,7 +566,7 @@ Drivers With Improvements
* [#10778](https://github.com/apache/nuttx/pull/10778) mmcsd: add get emmc cid register interface.
* [#10168](https://github.com/apache/nuttx/pull/10168) mmcsd: fix byte_block_count error in byte mode
* [#10440](https://github.com/apache/nuttx/pull/10440) mmcsd: fix regression causing emmcsd not working
* [#9937](https://github.com/apache/nuttx/pull/9937) mmcsd: mmcsd_sdio: config timeout to write one data block
* [#9937](https://github.com/apache/nuttx/pull/9937) mmcsd: mmcsd_sdio: config timout to write one data block
* [#10560](https://github.com/apache/nuttx/pull/10560) mmcsd: Rename mmc_rpmb_frame_s to rpmb_frame
* [#10732](https://github.com/apache/nuttx/pull/10732) mmcsd: support dump cid and csd with mmc-utils
* [#10672](https://github.com/apache/nuttx/pull/10672) mmcsd: update cid reg layout
@ -774,7 +774,7 @@ Boards With Improvements
* [#9884](https://github.com/apache/nuttx/pull/9884) xtensa: esp32: esp32-devkitc: Refresh wifi_smp_rmt config
* [#9709](https://github.com/apache/nuttx/pull/9709) xtensa: esp32: esp32-devkitc: wamr_wasi_debug: enable wasi-threads
* [#9752](https://github.com/apache/nuttx/pull/9752) xtensa: esp32s2: Add basic support to SPIFLASH
* [#9868](https://github.com/apache/nuttx/pull/9868) xtensa: esp32s3: Do not include specific board in commom
* [#9868](https://github.com/apache/nuttx/pull/9868) xtensa: esp32s3: Do not include specfic board in commom
* [#9870](https://github.com/apache/nuttx/pull/9870) xtensa: esp32s3: Some follow-up changes for ESP32s3 32M flash support
* [#10748](https://github.com/apache/nuttx/pull/10748) xtensa: esp32s3: esp32s3-devkit:disable esp32s3-devkit:ksta_softap spinlock config
* [#10588](https://github.com/apache/nuttx/pull/10588) xtensa: esp32s3: esp32s3-devkit:Add board GPIO support

View file

@ -448,7 +448,7 @@ Improvements
* [#11197](https://github.com/apache/nuttx/pull/11197) igmp: call IFF_SET_IPv4 when igmp_send
* [#11384](https://github.com/apache/nuttx/pull/11384) ipv6: Fix source address with many addresses in same network
* [#11378](https://github.com/apache/nuttx/pull/11378) ipv6: Move xxx_ipv6multicast from arch to common code
* [#10894](https://github.com/apache/nuttx/pull/10894) netdb: When set a dns nameserver which already exists, return OK
* [#10894](https://github.com/apache/nuttx/pull/10894) netdb: When set a dns nameserver which already exists, retrun OK
* [#11076](https://github.com/apache/nuttx/pull/11076) netconfig: Enable SOCK_CLOEXEC for ioctl sockets
* [#11396](https://github.com/apache/nuttx/pull/11396) netdev: Modify the logic for setting the IFF_RUNNING status of interfaces.
* [#11110](https://github.com/apache/nuttx/pull/11110) Simplify getting value for different domain

View file

@ -1,771 +0,0 @@
NuttX-12.7.0
------------
What's New In This Release
Core OS
Sched
* [#13395](https://github.com/apache/nuttx/pull/13395) Critmon optimize, make possible open cpuload based on critmon and disable critical section & sched_lock to save cost.
* [#12691](https://github.com/apache/nuttx/pull/12691) sched.h: add SCHED_BATCH and SCHED_IDLE definition
* [#12584](https://github.com/apache/nuttx/pull/12584) sched.h: CPU_XXX macros can also be used without CONFIG_SMP
* [#12703](https://github.com/apache/nuttx/pull/12703) sched.h: Update doc link for tcbinfo_s
* [#13274](https://github.com/apache/nuttx/pull/13274) sched: add DEBUGASSERT to assure that affinity not zero
* [#13341](https://github.com/apache/nuttx/pull/13341) sched: adjust the scheduling strategy
* [#13105](https://github.com/apache/nuttx/pull/13105) sched: change pthread_mutex implementation from sem to mutex
* [#12742](https://github.com/apache/nuttx/pull/12742) sched: Improve Kconfig help of INIT_ENTRYPOINT
* [#13525](https://github.com/apache/nuttx/pull/13525) sched: move DUMP_ON_EXIT to sched
* [#13211](https://github.com/apache/nuttx/pull/13211) sched: replace up_cpu_index with this_cpu
* [#13271](https://github.com/apache/nuttx/pull/13271) sched: use this_task replace nxsched_self
* [#13263](https://github.com/apache/nuttx/pull/13263) sched/event: clear pending events before enable the scheduler
* [#13329](https://github.com/apache/nuttx/pull/13329) sched/group/setuptask_file: duplicate idle task fd for kernel thread
* [#13083](https://github.com/apache/nuttx/pull/13083) sched/irq: correct critical section to spin lock
* [#12802](https://github.com/apache/nuttx/pull/12802) sched/nxevent: add support of kernel event group
* [#13264](https://github.com/apache/nuttx/pull/13264) sched/policy: move g_policy from data to rodata
* [#13017](https://github.com/apache/nuttx/pull/13017) sched/sched: simplify the implementation of the function nxsched_readytorun_setpriority
* [#13134](https://github.com/apache/nuttx/pull/13134) sched/signal: fix pthread_kill use after free
* [#13530](https://github.com/apache/nuttx/pull/13530) sched/signal: Simplified Implementation for SIGEV_THREAD_TID
* [#12283](https://github.com/apache/nuttx/pull/12283) sched/signal: There is no need to use sched_[un]lock
* [#12553](https://github.com/apache/nuttx/pull/12553) sched/tcb: amend pull/12320
MM
* [#12550](https://github.com/apache/nuttx/pull/12550) mm: add mm_initialize_pool, make pool more flexible
* [#12556](https://github.com/apache/nuttx/pull/12556) mm: mm_threshold perfer from init
* [#12501](https://github.com/apache/nuttx/pull/12501) mm/iob: Simplify IOB alloc/free logic
* [#12923](https://github.com/apache/nuttx/pull/12923) mm/map/vm_region.c: Fix usage of void* arithmetics
* [#12946](https://github.com/apache/nuttx/pull/12946) mm/mempool: rename the mempool_alloc and mempool_free function
* [#12659](https://github.com/apache/nuttx/pull/12659) mm_ubsan: add dummy to bypass runtime actions
* [#12646](https://github.com/apache/nuttx/pull/12646) mm_ubsan: add implement for dynamic_type_cache_miss
libc
* [#12672](https://github.com/apache/nuttx/pull/12672) add rint and expm1 function to cmath from libm
* [#13420](https://github.com/apache/nuttx/pull/13420) Add dummy implementations for `shm_open` `pthread_setaffinity_np` and `RLIMIT_RTPRIO`
* [#13429](https://github.com/apache/nuttx/pull/13429) arm64_task/pthread_start: Convert the C / inline ASM code to assembly
* [#13366](https://github.com/apache/nuttx/pull/13366) arm64/task/pthread_start: Fix rare issue with context register location
* [#13011](https://github.com/apache/nuttx/pull/13011) lib_getcwd:Fix the Name in the function description.
* [#12966](https://github.com/apache/nuttx/pull/12966) lib_remove:Repair the logical judgment
* [#12890](https://github.com/apache/nuttx/pull/12890) libc: Add macro restrictions to code that uses floating point numbers
* [#13111](https://github.com/apache/nuttx/pull/13111) libc: compile stackchk function by default
* [#12953](https://github.com/apache/nuttx/pull/12953) libs: fix the default value of process-shared attribute
* [#12975](https://github.com/apache/nuttx/pull/12975) libs: fix the default value of process-shared attribute
* [#12605](https://github.com/apache/nuttx/pull/12605) libc: scanf, printf %z change switch const to if
* [#12585](https://github.com/apache/nuttx/pull/12585) libc/execinfo: extract a common backtrace format function
* [#13013](https://github.com/apache/nuttx/pull/13013) libc/msic: Implement get_nprocs API
* [#13381](https://github.com/apache/nuttx/pull/13381) libc/misc/crc32: crc32 add slow mode, optional decrease size
* [#13441](https://github.com/apache/nuttx/pull/13441) libc/netdb: Remove unnecessary CONFIG_LIBC_NETDB checks
* [#13025](https://github.com/apache/nuttx/pull/13025) libc/netdb: Separate IPv4 and IPv6 cache size limit
* [#13220](https://github.com/apache/nuttx/pull/13220) libc/sysconf: add _SC_GETPW_R_SIZE_MAX
* [#13479](https://github.com/apache/nuttx/pull/13479) libc/time: add g_lcl_lock to protect local context in localsub
* [#13080](https://github.com/apache/nuttx/pull/13080) libc/time: remove lib_strptime
* [#12693](https://github.com/apache/nuttx/pull/12693) libc/unistd: added an implementation of the lib_flock function
* [#12609](https://github.com/apache/nuttx/pull/12609) libc/x86_64: port string functions from bionic
* [#13110](https://github.com/apache/nuttx/pull/13110) libcxxabi: libcxxabi enables exceptions by default
* [#13079](https://github.com/apache/nuttx/pull/13079) libs/libc/obstack: correctly append null byte at the end of string
* [#13482](https://github.com/apache/nuttx/pull/13482) libs/libc/obstack: implement ptr and int growing functions
* [#13495](https://github.com/apache/nuttx/pull/13495) libs/libc/obstack: revert invalid null byte append to obstack_vprintf
* [#13185](https://github.com/apache/nuttx/pull/13185) libs/libc/stdio/*printf *scanf:Add string serialization and deserialization functions
* [#13294](https://github.com/apache/nuttx/pull/13294) libs/libm: fix epsilon relaxation in log and logf
* [#13307](https://github.com/apache/nuttx/pull/13307) libs/libm/libm: apply epsilon relax factor only if epsilon is small
* [#12568](https://github.com/apache/nuttx/pull/12568) libm{libm|newlib}: fix broken sincos optimization for GCC
* [#12811](https://github.com/apache/nuttx/pull/12811) libm/copysign: respect signed zero/NaN handling in copysign
* [#13174](https://github.com/apache/nuttx/pull/13174) syscall: delete getrandom in syscall because it have moved to lib
* [#13428](https://github.com/apache/nuttx/pull/13428) gdb plugin: Encapsulate the gdb native command gcore as nxgcore
* [#12557](https://github.com/apache/nuttx/pull/12557) gdbstub: fix typo
* [#12549](https://github.com/apache/nuttx/pull/12549) gdbstub: support gdbstub_debugpoint_add/remove smp call
* [#13339](https://github.com/apache/nuttx/pull/13339) nuttx/pthread: export priority protect in pthread with ceiling priority in semaphore
* [#12561](https://github.com/apache/nuttx/pull/12561) pthread: add pthread_self/pthread_gettid_np function
* [#13462](https://github.com/apache/nuttx/pull/13462) pthread_mutx: remove unused critical_secton lock
* [#13456](https://github.com/apache/nuttx/pull/13456) pthread_mutex: add deadlock assert
tools
* [#12701](https://github.com/apache/nuttx/pull/12701) Feature/mcuboot toolchain support
* [#13021](https://github.com/apache/nuttx/pull/13021) tools: add improved pre-commit tool
* [#12794](https://github.com/apache/nuttx/pull/12794) tools: nxstyle if statement check
* [#12651](https://github.com/apache/nuttx/pull/12651) tools/imx9: prepare bootable bootloader image
* [#12838](https://github.com/apache/nuttx/pull/12838) tools/[Rust|D]: Fix build break for RISC-V
* [#12854](https://github.com/apache/nuttx/pull/12854) tools/[Rust|D]: Fix the Rust and D Builds for QEMU RISC-V
* [#12983](https://github.com/apache/nuttx/pull/12983) tools/parsetrace.py:fix parsetrace script error
* [#13321](https://github.com/apache/nuttx/pull/13321) greenhills support: add ghs linker script for mps2-an500 platform
* [#12884](https://github.com/apache/nuttx/pull/12884) greenhills support: add Kconfig, makefile, make.defs support for ghs compiler
* [#12887](https://github.com/apache/nuttx/pull/12887) greenhills support: add new platform of qemu cortex-m7
* [#13146](https://github.com/apache/nuttx/pull/13146) greenhills support: add the "__sync_synchronize" func impl
* [#12877](https://github.com/apache/nuttx/pull/12877) greenhills support: add up_getsp() implementation to adapting greenhills compiler
* [#12883](https://github.com/apache/nuttx/pull/12883) greenhills support: fix the asm build error for adapting to greenhills compiler
* [#12885](https://github.com/apache/nuttx/pull/12885) greenhills support: fix the build and link error specific to ghs platform
* [#13144](https://github.com/apache/nuttx/pull/13144) greenhills support: fix the build options warning
* [#13207](https://github.com/apache/nuttx/pull/13207) greenhills support: fix the build option warning
* [#13145](https://github.com/apache/nuttx/pull/13145) greenhills support: fix the build warning while support greenhills build
* [#12886](https://github.com/apache/nuttx/pull/12886) greenhills support: fix the build warning for ghs platform
* [#13533](https://github.com/apache/nuttx/pull/13533) greenhills support: fix the enumerated type mixed using warning
* [#13322](https://github.com/apache/nuttx/pull/13322) greenhills support: fix the ghs build warning
* [#13502](https://github.com/apache/nuttx/pull/13502) greenhills support: fix the greenhills compile warning on sizeof operand
* [#13195](https://github.com/apache/nuttx/pull/13195) greenhills support: fix the pointless comparison build warning
various
* [#12552](https://github.com/apache/nuttx/pull/12552) compiler.h: rename CMSE extension attribute macros
* [#12874](https://github.com/apache/nuttx/pull/12874) fix stm32wl5_rcc.h: Add the missing argument to RCC_PLLCFG_PLLP define.
* [#13148](https://github.com/apache/nuttx/pull/13148) include/fcntl.h: add O_LARGEFILE flags
* [#13324](https://github.com/apache/nuttx/pull/13324) include/sensors: import public definitions types and to uorb.h
* [#12690](https://github.com/apache/nuttx/pull/12690) ioctl.h: add SIOCATMARK definition to resolve compilation errors
* [#13314](https://github.com/apache/nuttx/pull/13314) ip6_tables.h: fix gcc 14 errors
* [#13257](https://github.com/apache/nuttx/pull/13257) socketlin : add lin.h and lin bus-type
* [#12692](https://github.com/apache/nuttx/pull/12692) sysinfo.h: add get_nprocs_conf/get_nprocs definition
* [#13149](https://github.com/apache/nuttx/pull/13149) sys/shm.h: add macro define for posix
* [#12594](https://github.com/apache/nuttx/pull/12594) x86_64/irq.h: use 32bit operations in up_cpu_index(
Build System
New Features
* [#12904](https://github.com/apache/nuttx/pull/12904) [Cross-Platform] Remove Unix-specific code in savedefconfig and replace it with cmake script
* [#12910](https://github.com/apache/nuttx/pull/12910) [cmake] add_application supports only registration but not compilation
* [#12964](https://github.com/apache/nuttx/pull/12964) [cmake] split the archive process to avoid parameter too long problems
* [#13019](https://github.com/apache/nuttx/pull/13019) [cmake] add nuttx_post and app_context inter targets for timing control
* [#12908](https://github.com/apache/nuttx/pull/12908) [Win32 sim] enable win32 native platfrom sim compilation by CMake fix compilation error
* [#12900](https://github.com/apache/nuttx/pull/12900) arch/sim/src/cmake/Toolchain.cmake: macOS fix unknown options: --gc-sections
* [#12856](https://github.com/apache/nuttx/pull/12856) build: Fix libc/pwd CMakeLists.txt
* [#13347](https://github.com/apache/nuttx/pull/13347) build: fix memory manager compile options for CMake
* [#12859](https://github.com/apache/nuttx/pull/12859) build: Fix Toolchain.cmake for CONFIG_SIM_ASAN enabled
* [#12880](https://github.com/apache/nuttx/pull/12880) build: set CMake policy to allow FetchContent_Populate
* [#12784](https://github.com/apache/nuttx/pull/12784) build/cmake: add user_ldscript preprocessing
* [#12866](https://github.com/apache/nuttx/pull/12866) build/cmake: fix system include dir for PROTECTED mode
* [#13143](https://github.com/apache/nuttx/pull/13143) board/maix-bit: initial cmake support
* [#13090](https://github.com/apache/nuttx/pull/13090) board/qemu-armv7a: add CMake support
* [#12868](https://github.com/apache/nuttx/pull/12868) boards/rv-virt: cmake for pnsh and nsbi
* [#13175](https://github.com/apache/nuttx/pull/13175) Cmake: [arch arm] added initial support for MSYS2
* [#13389](https://github.com/apache/nuttx/pull/13389) cmake: add support for PCI
* [#12516](https://github.com/apache/nuttx/pull/12516) cmake: reuse OpenAMP own CMake script for CMake build
* [#12592](https://github.com/apache/nuttx/pull/12592) cmake: refine sim cmake redefine symbols
* [#13449](https://github.com/apache/nuttx/pull/13449) cmake: Refactor extra_lib tagert,build include_arch path,refine sim link script target
* [#12667](https://github.com/apache/nuttx/pull/12667) cmake: strip file full path to save the code size
* [#13451](https://github.com/apache/nuttx/pull/13451) cmake: support openlibm,dhara,libmcs,lic regex CMake build scripts
* [#12608](https://github.com/apache/nuttx/pull/12608) cmake/add_library: enable library install by default
* [#12714](https://github.com/apache/nuttx/pull/12714) cmake/boards: fix build break on custom board
* [#13085](https://github.com/apache/nuttx/pull/13085) CMakeLists.txt: warning D9002 on Windows + msvc
* [#13253](https://github.com/apache/nuttx/pull/13253) cmake/nuttx_kconfig.cmake: fixed the correct .config path in the buid folder
* [#13276](https://github.com/apache/nuttx/pull/13276) cmake/tricore: filter out nostdlib in linker phase to avoid build break
* [#13499](https://github.com/apache/nuttx/pull/13499) libc: add missing preadv/pwritev in CMakeLists.txt
* [#12700](https://github.com/apache/nuttx/pull/12700) riscv/cmake: fix Toolchain.cmake
* [#12694](https://github.com/apache/nuttx/pull/12694) riscv/k230: fix apps ROMFS cmake
* [#12996](https://github.com/apache/nuttx/pull/12996) riscv/qemu-rv: add RPTUN cmake
* [#12634](https://github.com/apache/nuttx/pull/12634) sim/cmake: enable garbage collection of unused input sections
* [#12721](https://github.com/apache/nuttx/pull/12721) tools/testbuild.sh: add option -N use CMake with Ninja
* [#12805](https://github.com/apache/nuttx/pull/12805) tools/testbuild.sh: added store compilation artifacts for cmake
* [#12724](https://github.com/apache/nuttx/pull/12724) tricore/cmake: add support of cmake build for tricore
Bug Fixes
* [#12558](https://github.com/apache/nuttx/pull/12558) [bugfix] cmake:fix a few issues during CMake build
* [#12915](https://github.com/apache/nuttx/pull/12915) [bugfix] fix CMake build block when enable LTO
* [#12582](https://github.com/apache/nuttx/pull/12582) Fix cmake for cxd56xx
* [#12581](https://github.com/apache/nuttx/pull/12581) cmake: Fix build failure when -DNUTTX_APPS_DIR is specified
* [#13171](https://github.com/apache/nuttx/pull/13171) CMake: fix CMake compile errors during the protected build mode
* [#13081](https://github.com/apache/nuttx/pull/13081) cmake: fix invalid syntax when generating version.h from tags
Architectural Support
unsorted
* [#12827](https://github.com/apache/nuttx/pull/12827) Additional encoder for F7 and added functions for TimerHook for F745 …
* [#12924](https://github.com/apache/nuttx/pull/12924) Bugfix/esp spi fix
* [#12770](https://github.com/apache/nuttx/pull/12770) Enable SMPS for STM32H745I-DISCO by default
* [#12574](https://github.com/apache/nuttx/pull/12574) arch: Add --whole-archive linker option for some of architectures
* [#13200](https://github.com/apache/nuttx/pull/13200) arch: cxd56xx: Add logic for i2c reset
* [#13496](https://github.com/apache/nuttx/pull/13496) arch: cxd56xx: Fix issue by update of inode reference
* [#13201](https://github.com/apache/nuttx/pull/13201) arch: cxd56xx: Fix SCU sensor data format
* [#12962](https://github.com/apache/nuttx/pull/12962) arch: inline this_task to improve performence
* [#13270](https://github.com/apache/nuttx/pull/13270) arch: remove unused up_cpu_pausereq waiting
* [#13423](https://github.com/apache/nuttx/pull/13423) arch: use up_current_regs/up_set_current_regs replace CURRENT_REGS
* [#13041](https://github.com/apache/nuttx/pull/13041) arch/EXTRA_LIBS: link all staging library.
* [#12624](https://github.com/apache/nuttx/pull/12624) arch/sim: add custom data section support
* [#12909](https://github.com/apache/nuttx/pull/12909) arch/sim/Kconfig: set SIM_FBBPP to 32 by default
* [#12845](https://github.com/apache/nuttx/pull/12845) arch/stm32h7: add defines for USART clock selection
* [#13292](https://github.com/apache/nuttx/pull/13292) arch/xmc4 : Add input pin DX0 selection for multiple SPI channel
* [#12823](https://github.com/apache/nuttx/pull/12823) arch/xmc4 : Fixed critical section in i2c_transfer
* [#12761](https://github.com/apache/nuttx/pull/12761) arch/xmc4 : i2c master lower-half driver
* [#12545](https://github.com/apache/nuttx/pull/12545) BL808: Add support for UARTs 0-2 and serial configuration
* [#12575](https://github.com/apache/nuttx/pull/12575) BL808: Replace courier with M0 interrupt controller
* [#12795](https://github.com/apache/nuttx/pull/12795) elf: Enable ELF loader if text heap read is word-aligned and enable ELF loader for ESP32-S3
* [#12620](https://github.com/apache/nuttx/pull/12620) esp32: add simple boot support
* [#12616](https://github.com/apache/nuttx/pull/12616) ESP32: emac initialization adding cpu id
* [#13249](https://github.com/apache/nuttx/pull/13249) esp32: enable APP_CPU cache earlier
* [#13244](https://github.com/apache/nuttx/pull/13244) esp32: cache_sram_mmu_set: update the correct register bits
* [#13222](https://github.com/apache/nuttx/pull/13222) esp32: fix a crash with PSRAM + SMP
* [#13243](https://github.com/apache/nuttx/pull/13243) esp32: fix seemingly wrong calculations
* [#13250](https://github.com/apache/nuttx/pull/13250) esp32: psram_set_cs_timing: sync with esp-idf
* [#13311](https://github.com/apache/nuttx/pull/13311) esp32: Port the bootloader patch
* [#12572](https://github.com/apache/nuttx/pull/12572) esp32[c3|c6|h2]: Add I2C master support
* [#12573](https://github.com/apache/nuttx/pull/12573) esp32[c3|c6|h2]: Add GDMA support
* [#13298](https://github.com/apache/nuttx/pull/13298) esp32c6: PCNT Quadrature Encoder driver
* [#13269](https://github.com/apache/nuttx/pull/13269) esp32s2: fix SPI flash and file system mounting
* [#12647](https://github.com/apache/nuttx/pull/12647) esp32s3-devkit: add a config for qemu
* [#12851](https://github.com/apache/nuttx/pull/12851) esp32s3-devkit/toywasm: enable ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK
* [#12725](https://github.com/apache/nuttx/pull/12725) esp32s3_textheap.c: fix a build error w/o CONFIG_ESP32S3_SPIRAM
* [#12565](https://github.com/apache/nuttx/pull/12565) esp32s3/wifi: Fix bug related to IOB off-loading with SMP
* [#12789](https://github.com/apache/nuttx/pull/12789) esp32s3/i2s: Fix faulty initialization when SMP is enabled
* [#13265](https://github.com/apache/nuttx/pull/13265) esp32_psram.c: Remove a seemingly stale comment
* [#12669](https://github.com/apache/nuttx/pull/12669) Feature/esp mcuboot support
* [#12776](https://github.com/apache/nuttx/pull/12776) Feature/esp spi dma
* [#12775](https://github.com/apache/nuttx/pull/12775) Feature/esp temperature sensor
* [#12604](https://github.com/apache/nuttx/pull/12604) fix(esp32-qemu-openeth): allocate buffers in internal memory
* [#13193](https://github.com/apache/nuttx/pull/13193) gd32f4xx_at24: Fix uninitialized use of local variables i2c and at24
* [#13401](https://github.com/apache/nuttx/pull/13401) Imx9 ethernet fixes
* [#12632](https://github.com/apache/nuttx/pull/12632) Imx9 support flexspi m25p nor
* [#13399](https://github.com/apache/nuttx/pull/13399) imx9/edma: Fix function prototypes
* [#13400](https://github.com/apache/nuttx/pull/13400) imx9/LPUART fixes
* [#12921](https://github.com/apache/nuttx/pull/12921) imx93: Add more base addresses
* [#12623](https://github.com/apache/nuttx/pull/12623) imxrt: Correctly update PLL, bit has to toggled instead of being set
* [#12562](https://github.com/apache/nuttx/pull/12562) imxrt: imxrt11xx set core clock to 1p15v regardless of ocotp
* [#12821](https://github.com/apache/nuttx/pull/12821) k230_start.c: Fix condition for k230_copy_init_data()
* [#12894](https://github.com/apache/nuttx/pull/12894) mps3-an547:support mps3-an547 reset
* [#12989](https://github.com/apache/nuttx/pull/12989) nuttx/sim:By default, stack-use-after-return is not checked when enabling SIM_ASAN.
* [#13043](https://github.com/apache/nuttx/pull/13043) nuttx/sim:By default, stack-use-after-return is not checked when enabling SIM_ASAN.
* [#13548](https://github.com/apache/nuttx/pull/13548) nrf91: Update GPS to GNSS
* [#12612](https://github.com/apache/nuttx/pull/12612) refactor(esp32-qemu-openeth): use lower half driver interface
* [#12660](https://github.com/apache/nuttx/pull/12660) refresh esp32s3-devkit:qemu_debug
* [#12707](https://github.com/apache/nuttx/pull/12707) rp2040 Rename the RP2040-specific PWM_MULTICHAN definition
* [#12610](https://github.com/apache/nuttx/pull/12610) rp2040: Add support to MAX6675
* [#13318](https://github.com/apache/nuttx/pull/13318) rp2040: Support pico-sdk 2.0.0
* [#13070](https://github.com/apache/nuttx/pull/13070) Sync the modifications of the WiFi function in simulator.
* [#12697](https://github.com/apache/nuttx/pull/12697) s32k1xx: FlexIO i2c driver
* [#12678](https://github.com/apache/nuttx/pull/12678) samv7: fix compile warning in PWM driver
* [#12627](https://github.com/apache/nuttx/pull/12627) samv7/sam_mcan.c: fix TSEG1, TSEG2 and SJW compile warnings for MCAN1
* [#12622](https://github.com/apache/nuttx/pull/12622) sim: make possible keep ubsan and bypass feature
* [#13034](https://github.com/apache/nuttx/pull/13034) sim: read the second buffer
* [#13097](https://github.com/apache/nuttx/pull/13097) sim: Support to use of non-consecutive framebuffers
* [#13355](https://github.com/apache/nuttx/pull/13355) sim_offload: add lame library to apps/audioutils/lame
* [#12870](https://github.com/apache/nuttx/pull/12870) sim/login: remove login restrictions to improve the experience for green hands
* [#13534](https://github.com/apache/nuttx/pull/13534) sim/minmea: Fix defconfig warning
* [#13042](https://github.com/apache/nuttx/pull/13042) simwifi: Add the netlink event of connect/disconnect.
* [#12778](https://github.com/apache/nuttx/pull/12778) Small improvements to nrf91
* [#13282](https://github.com/apache/nuttx/pull/13282) smp: enable smp_call in all smp arch
* [#12566](https://github.com/apache/nuttx/pull/12566) STM32G47XXX: Added basic HRTIM support.
* [#12600](https://github.com/apache/nuttx/pull/12600) tee smp support
* [#12640](https://github.com/apache/nuttx/pull/12640) Userleds support to seed-xiao-rp2040
* [#13032](https://github.com/apache/nuttx/pull/13032) wifi_sim.c:fix compile warning
Architecture Improvements
arm
* [#12626](https://github.com/apache/nuttx/pull/12626) arch/arm/stm32: Fix EXTI lines definitions for STM32G47XX.
* [#12664](https://github.com/apache/nuttx/pull/12664) arch/armv8-r: new config to set SPIs Configuration to edge-triggered
* [#12666](https://github.com/apache/nuttx/pull/12666) arch/armv8-r: update g_running_tasks before context switch
* [#13472](https://github.com/apache/nuttx/pull/13472) arch/arm-m: Clear lr before jump to __start
* [#13284](https://github.com/apache/nuttx/pull/13284) arch/arm: support kernel heap in BUILD_FLAT mode
* [#13416](https://github.com/apache/nuttx/pull/13416) arm generate busfault & recursive bug fix
* [#13268](https://github.com/apache/nuttx/pull/13268) arm: armv7-a/r and armv8-r up_cpu_index inline
* [#13024](https://github.com/apache/nuttx/pull/13024) arm: Fix DS1307 initialization for common STM32 logic
* [#12888](https://github.com/apache/nuttx/pull/12888) arm: Select ram vector on armv6m
* [#13505](https://github.com/apache/nuttx/pull/13505) arm_addrenv:fix app crash when enable shm in kernel mode
* [#12787](https://github.com/apache/nuttx/pull/12787) arm_backtrace_unwind:Make the backtrace search the entire stack as much as possible
* [#12954](https://github.com/apache/nuttx/pull/12954) arm/armv[7|8]-m: add syn barrier for MPU ops
* [#12925](https://github.com/apache/nuttx/pull/12925) arm/armv8-r: invalidate d-cache on boot
* [#12928](https://github.com/apache/nuttx/pull/12928) arm/armv8-r: add cp15 ops for mpu
* [#13529](https://github.com/apache/nuttx/pull/13529) arm/cortex-a,r: replace cp15 instruct to macros to align operation
* [#13239](https://github.com/apache/nuttx/pull/13239) arm/giv3: add g_ prefix to some global variables
* [#13262](https://github.com/apache/nuttx/pull/13262) arm/gicv3: set routing affinity before enable IRQ
* [#13240](https://github.com/apache/nuttx/pull/13240) arm/linum-stm32h753bi: Add support to RFID MFRC522
* [#12873](https://github.com/apache/nuttx/pull/12873) arm/lm3s6965-ek: Disable NTPC for lm3s6965 to fix maximum flash space…
* [#13557](https://github.com/apache/nuttx/pull/13557) arm/qemu: Add mounting of tmpfs
* [#13117](https://github.com/apache/nuttx/pull/13117) arm/qemu: enable WFI in `up_idle`
* [#13131](https://github.com/apache/nuttx/pull/13131) arm/spinlock: up_testset() sould not depends on SMP
* [#12879](https://github.com/apache/nuttx/pull/12879) arm/stm32f401rc-rs485: Add support to BMP280 sensor
* [#13565](https://github.com/apache/nuttx/pull/13565) arm/stm32f401rc-rs485: Add support to LCD 16x2 with I2C Backpack
* [#12839](https://github.com/apache/nuttx/pull/12839) arm/stm32f401rc-rs485: Add support to RFID MFRC522
* [#12860](https://github.com/apache/nuttx/pull/12860) arm/stm32h7/stm32h745i-disco: Add STM32H745I-DISCO Per Core Support
* [#12902](https://github.com/apache/nuttx/pull/12902) arm/stm32h7x3x_rcc.c: Add External Power Supply option to stm32h7x3x …
* [#12679](https://github.com/apache/nuttx/pull/12679) arm/xmc4: pwm driver
* [#13466](https://github.com/apache/nuttx/pull/13466) armv7-a gic related update
* [#13176](https://github.com/apache/nuttx/pull/13176) armv7-a timer:fix timer overflow.
* [#12956](https://github.com/apache/nuttx/pull/12956) armv7a/irq: enable fiq in tee, enable irq in ap
* [#13453](https://github.com/apache/nuttx/pull/13453) armv8-m:arch libc function need save ip register use pacbti
* [#13237](https://github.com/apache/nuttx/pull/13237) armv8-r/gicv3: correct cpu index of irouter
* [#13275](https://github.com/apache/nuttx/pull/13275) armv8-r/r52: add neon support into compiler lin
arm64
* [#12633](https://github.com/apache/nuttx/pull/12633) arch/arm64/src/imx9/imx9_lowputc.c: Fix an arithmetic sign error in d…
* [#12648](https://github.com/apache/nuttx/pull/12648) arch/arm64: allow to use custom up_idle
* [#13397](https://github.com/apache/nuttx/pull/13397) arch/arm64/src/imx9/imx9_lpi2c.c: Cleanups and error fixes
* [#13402](https://github.com/apache/nuttx/pull/13402) arch/arm64/imx9: Change Kconfig logic
* [#13403](https://github.com/apache/nuttx/pull/13403) arch/arm64/imx9: Add system reset controller
* [#13427](https://github.com/apache/nuttx/pull/13427) arch/arm64/src/imx9/imx9_lpi2c.c: Ignore spurious RX interrupts
* [#13218](https://github.com/apache/nuttx/pull/13218) arch/arm64: Move ELF_64BIT selection to arch/Kconfig
* [#12681](https://github.com/apache/nuttx/pull/12681) arm64: add initial support for ZYNQ MPSOC and ZCU111 Evaluation Kit
* [#12580](https://github.com/apache/nuttx/pull/12580) arm64: inline up_cpu_index
* [#13560](https://github.com/apache/nuttx/pull/13560) arm64_addrenv: Add support for 4 level MMU translations
* [#13363](https://github.com/apache/nuttx/pull/13363) arm64_addrenv_pgmap.c: Revoke user execution access to kernel mmap'd pages
* [#13364](https://github.com/apache/nuttx/pull/13364) arm64_addrenv.c: Flush kernel page table copy to user mappings
* [#13204](https://github.com/apache/nuttx/pull/13204) arm64_checkstack.c: Fix traversing of user stack when ARCH_ADDRENV=Y
* [#13361](https://github.com/apache/nuttx/pull/13361) arm64_syscall.c: Don't need to set register context during syscall
* [#13365](https://github.com/apache/nuttx/pull/13365) arm64_vector_table.S: Remove unnecessary instruction
* [#12695](https://github.com/apache/nuttx/pull/12695) arm64/arm64_boot.c: Fix exception caused by accesses to ICC_SRE_EL3 when GICv3 was not implemented
* [#13373](https://github.com/apache/nuttx/pull/13373) arm64/crt0.c: Fix stack alignment when executing signal trampoline
* [#12649](https://github.com/apache/nuttx/pull/12649) arm64/imx9: ccm: add default clk init
* [#13205](https://github.com/apache/nuttx/pull/13205) arm64/imx9: Force 64-bit ELF format
* [#13360](https://github.com/apache/nuttx/pull/13360) arm64/mmu: Fixes for MMU driver
* [#13362](https://github.com/apache/nuttx/pull/13362) arm64/syscall: (Re-)enable interrupts only if they were previously enable
tricore
* [#12682](https://github.com/apache/nuttx/pull/12682) arch/tricore: add support of tricore gcc toolchain
* [#12706](https://github.com/apache/nuttx/pull/12706) arch/tricore: synchronize instruction/data following MTCR/MFC
risc-v
* [#12961](https://github.com/apache/nuttx/pull/12961) arch: inline up_testset in arm arm64 riscv xtensa
* [#12579](https://github.com/apache/nuttx/pull/12579) arch/riscv: add all region in NAPOT
* [#12881](https://github.com/apache/nuttx/pull/12881) arch/riscv: add cluster local hartid
* [#12906](https://github.com/apache/nuttx/pull/12906) arch/riscv: fix IRQ_SOFT for non-SMP
* [#12546](https://github.com/apache/nuttx/pull/12546) arch/riscv: fix NuttSBI PMP config
* [#12717](https://github.com/apache/nuttx/pull/12717) arch/riscv: fix trap sp restore logic
* [#13430](https://github.com/apache/nuttx/pull/13430) arch/riscv: Fixed hardware timer warps-around issue
* [#13278](https://github.com/apache/nuttx/pull/13278) arch/riscv: revert pull#12864
* [#12864](https://github.com/apache/nuttx/pull/12864) arch/riscv: unify in-kernel syscall
* [#12619](https://github.com/apache/nuttx/pull/12619) arch/risc-v: add support for capture driver on ESP32C6 and ESP32H2.
* [#12726](https://github.com/apache/nuttx/pull/12726) arch/risc-v: make common up_allocate_heap weak symbol
* [#12732](https://github.com/apache/nuttx/pull/12732) arch/risc-v: does not clear IPI address in S mode
* [#12460](https://github.com/apache/nuttx/pull/12460) arch/risc-v/common: provide architecture specific perfmon bindings.
* [#13353](https://github.com/apache/nuttx/pull/13353) arch/risc-v/litex: Fix the litex arty_a7 build
* [#13382](https://github.com/apache/nuttx/pull/13382) arch/risc-v/src/litex: Claim all pending PLIC interrupts.
* [#13547](https://github.com/apache/nuttx/pull/13547) arch/risc-v/src/litex_ticked: Set initial tick count to known value.
* [#12804](https://github.com/apache/nuttx/pull/12804) arch/risc-v: introduce AIA support
* [#12843](https://github.com/apache/nuttx/pull/12843) arch/risc-v: add support for DC motor control on ESP32|C6|H2|
* [#12586](https://github.com/apache/nuttx/pull/12586) riscv_exception.c: Add missing comma in exception reasons array
* [#13408](https://github.com/apache/nuttx/pull/13408) riscv_mtimer: modify riscv_mtimer_current to reduce precision lost
* [#12643](https://github.com/apache/nuttx/pull/12643) riscv_tcbinfo: Fix register ordering for PC
* [#13564](https://github.com/apache/nuttx/pull/13564) riscv: add a return value to riscv_swint
* [#13561](https://github.com/apache/nuttx/pull/13561) riscv: g_current_regs is only used to determine if we are in irq
* [#12812](https://github.com/apache/nuttx/pull/12812) riscv: Fix fork() system call
* [#13354](https://github.com/apache/nuttx/pull/13354) riscv: Unify the extended context save/restore
* [#12554](https://github.com/apache/nuttx/pull/12554) riscv: Initial support for debug trigger module
* [#12559](https://github.com/apache/nuttx/pull/12559) riscv: Improve exception and irq mapping
* [#12809](https://github.com/apache/nuttx/pull/12809) riscv/debug: Add support for steppoint
* [#12819](https://github.com/apache/nuttx/pull/12819) riscv/espressif: Mark private data as static in esp_spi.c
* [#12861](https://github.com/apache/nuttx/pull/12861) riscv/fork: fix fp/gp handling
* [#12589](https://github.com/apache/nuttx/pull/12589) riscv/k230: revise canmv230:nsbi
* [#12677](https://github.com/apache/nuttx/pull/12677) riscv/k230: updates for nsh and pnsh
* [#12744](https://github.com/apache/nuttx/pull/12744) riscv/nsbi: fix k230 AMP confs
* [#12799](https://github.com/apache/nuttx/pull/12799) riscv/qemu-rv: skip reloading mhartid
* [#12807](https://github.com/apache/nuttx/pull/12807) riscv/qemu-rv: Add BUILD_PROTECTED target for rv-virt
* [#12944](https://github.com/apache/nuttx/pull/12944) riscv/qemu-rv: add RPTUN support
* [#12772](https://github.com/apache/nuttx/pull/12772) riscv/rv-virt: use RAM_START in ld.script
* [#12816](https://github.com/apache/nuttx/pull/12816) riscv/qemu-rv: add NuttSBI target for rv-virt
* [#12831](https://github.com/apache/nuttx/pull/12831) riscv/qemu-rv: revise PROTECTED mode
* [#12840](https://github.com/apache/nuttx/pull/12840) riscv/nsbi: fix up_udelay for rv32
* [#13510](https://github.com/apache/nuttx/pull/13510) risc-v: Add a new option to control exception reason
* [#12722](https://github.com/apache/nuttx/pull/12722) risc-v/bl808, sg2000: Configure MMU to cache Kernel Text, Data and Heap (T-Head C906)
* [#12571](https://github.com/apache/nuttx/pull/12571) risc-v/bl808: Add GPIO Driver
* [#12621](https://github.com/apache/nuttx/pull/12621) risc-v/bl808: Add GPADC character driver
* [#12663](https://github.com/apache/nuttx/pull/12663) risc-v/bl808: Add SPI driver
* [#12771](https://github.com/apache/nuttx/pull/12771) risc-v/bl808: Add watchdog driver
* [#12752](https://github.com/apache/nuttx/pull/12752) risc-v/bl808: Add timer driver
* [#12614](https://github.com/apache/nuttx/pull/12614) risc-v/ox64: Add LED Driver
* [#12762](https://github.com/apache/nuttx/pull/12762) risc-v/qemu-rv: Add LED Driver for QEMU RISC-V 32-bit and 64-bit
xtensa
* [#13223](https://github.com/apache/nuttx/pull/13223) Add spi slave dev to esp32 xtensa
* [#13225](https://github.com/apache/nuttx/pull/13225) espressif: Fix build with RTC
* [#13255](https://github.com/apache/nuttx/pull/13255) espressif: Fix deadlock in RT timer caused by critical section
* [#12560](https://github.com/apache/nuttx/pull/12560) espressif: Fix error while evaluating Wi-Fi task ID
* [#13368](https://github.com/apache/nuttx/pull/13368) espressif: Update external libraries to fix GPIO interrupt bug
* [#13236](https://github.com/apache/nuttx/pull/13236) espressif: Update HAL library reference to include debug assert
* [#13022](https://github.com/apache/nuttx/pull/13022) espressif: Update internal libraries reference
* [#12551](https://github.com/apache/nuttx/pull/12551) xtensa: add support for capture driver on ESP32 and ESP32|S3|
* [#12781](https://github.com/apache/nuttx/pull/12781) xtensa: add support for motor control driver
* [#12967](https://github.com/apache/nuttx/pull/12967) xtensa_cache:add up_get_cachesize api
* [#12865](https://github.com/apache/nuttx/pull/12865) xtensa/esp32: replace nxsig_usleep() with up_udelay()
* [#12750](https://github.com/apache/nuttx/pull/12750) xtensa/esp32s3: Add peripheral DMA request return value and optimize DMA initialization
* [#13277](https://github.com/apache/nuttx/pull/13277) xtensa/esp32s3: Add timing delay set interface for QSPI
* [#13291](https://github.com/apache/nuttx/pull/13291) xtensa/esp32s2: add WiFi support
* [#13454](https://github.com/apache/nuttx/pull/13454) xtensa/esp32s3: Adjust I2C clock timing
* [#12720](https://github.com/apache/nuttx/pull/12720) xtensa/esp32s3: Deinitialize ESP32-S3 QSPI GDMA engine.
* [#12871](https://github.com/apache/nuttx/pull/12871) xtensa/esp32s3: Update the rtc code to fix system blocking issue
* [#12919](https://github.com/apache/nuttx/pull/12919) xtensa/esp32s3: partition name duplicate and free
* [#12918](https://github.com/apache/nuttx/pull/12918) xtensa/esp32s3: reserve memory for a mutex struct depending on the OS
* [#12932](https://github.com/apache/nuttx/pull/12932) xtensa/esp32s3: Separate address and command flag for QSPI DMA transfer
* [#13165](https://github.com/apache/nuttx/pull/13165) xtensa/esp32s3/esp32s3_sdmmc.c: wait for command done event also on error response
x86_64
* [#13391](https://github.com/apache/nuttx/pull/13391) Add MSI/MSI-X support for intel64
* [#12583](https://github.com/apache/nuttx/pull/12583) arch/intel64: add cpu specific data and per-cpu interrupt stacks
* [#12803](https://github.com/apache/nuttx/pull/12803) arch/intel64: add support for HPET as system clock
* [#12588](https://github.com/apache/nuttx/pull/12588) arch/intel64: add support for inter-processor signaling
* [#12570](https://github.com/apache/nuttx/pull/12570) arch/intel64: get TSC frequency only when not provided from Kconfig
* [#12801](https://github.com/apache/nuttx/pull/12801) arch/intel64/irq.h: rename rdtsc macros
* [#13392](https://github.com/apache/nuttx/pull/13392) intel64: Improvements for HPET
* [#12567](https://github.com/apache/nuttx/pull/12567) arch/x86_64: addrenv should add offset only for RAM region
* [#12577](https://github.com/apache/nuttx/pull/12577) arch/x86_64/intel64/intel64_rtc.c: fix compilation
* [#12591](https://github.com/apache/nuttx/pull/12591) arch/x86_64: add SMP support
* [#13417](https://github.com/apache/nuttx/pull/13417) arch/x86_64: Add ARCH_INTEL64_DISABLE_CET
* [#13409](https://github.com/apache/nuttx/pull/13409) arch/x86_64: Add ARCH_X86_64_IDLE_NOP and ARCH_X86_64_IDLE_MWAIT
* [#13436](https://github.com/apache/nuttx/pull/13436) arch/x86_64: add basic support for R_X86_64_REX_GOTPCRELX relocation
* [#13422](https://github.com/apache/nuttx/pull/13422) arch/x86_64: Add elf32 multiboot1 wrapper for NuttX binary
* [#13313](https://github.com/apache/nuttx/pull/13313) arch/x86_64: convert all asm() to __asm__
* [#13317](https://github.com/apache/nuttx/pull/13317) arch/x86_64: Fix wrong RDTSCP implementation
* [#13316](https://github.com/apache/nuttx/pull/13316) arch/x86_64: Support QEMU PVH ELF loader
* [#13426](https://github.com/apache/nuttx/pull/13426) arch/x86_64/intel64: fix compilation errors in intel64_oneshot_lower.c
* [#12800](https://github.com/apache/nuttx/pull/12800) arch/x86_64/intel64/intel64_cpu.c: remove workaround for spin_lock
* [#13390](https://github.com/apache/nuttx/pull/13390) qemu-intel64: restore functionality of PCI test configs
* [#13315](https://github.com/apache/nuttx/pull/13315) qemu-intel64: simplify linker script
* [#12597](https://github.com/apache/nuttx/pull/12597) x86_64: add AVX support
* [#12613](https://github.com/apache/nuttx/pull/12613) x86_64: addrenv support
* [#12569](https://github.com/apache/nuttx/pull/12569) x86_64: hide --whole-archive behind Kconfig option
Driver Support
New Driver Support
* [#12829](https://github.com/apache/nuttx/pull/12829) Add amg88xx driver
* [#13396](https://github.com/apache/nuttx/pull/13396) Add Intel e1000 and igc support
* [#13393](https://github.com/apache/nuttx/pull/13393) Add support for 16550 compatible PCI serial cards
* [#12715](https://github.com/apache/nuttx/pull/12715) Add support for the Sensirion SHT4x temperature and humidity sensor
* [#12824](https://github.com/apache/nuttx/pull/12824) Add thermal framework
* [#11605](https://github.com/apache/nuttx/pull/11605) Coresight: add init coresight driver framework
* [#13082](https://github.com/apache/nuttx/pull/13082) driver/mem: add Mem Driver.
* [#12834](https://github.com/apache/nuttx/pull/12834) driver/ssd1680: Add support for 1.54 inch e-paper display
* [#12938](https://github.com/apache/nuttx/pull/12938) drivers/video: add goldfish gpu fb
* [#13470](https://github.com/apache/nuttx/pull/13470) drivers/pinctl: add pinctrl framework
* [#13471](https://github.com/apache/nuttx/pull/13471) drivers/goldfish-pipe: implement goldfish pipe
* [#13553](https://github.com/apache/nuttx/pull/13553) Pci ep framework
Drivers Improvements
* [#12998](https://github.com/apache/nuttx/pull/12998) [driver][bcm43xxx] reset tx_seq of sido-bus when ifdown wlan-if
* [#13154](https://github.com/apache/nuttx/pull/13154) can/sja1000: drop driver dependency on __builtin functions
* [#13524](https://github.com/apache/nuttx/pull/13524) can: Add g_ prefix to can_dlc_to_len and len_to_can_dlc.
* [#13141](https://github.com/apache/nuttx/pull/13141) can: Merge netpacket/can.h into nuttx/can.h
* [#12676](https://github.com/apache/nuttx/pull/12676) driver/net/lan9250: Add lan9250_ioctl and lan9250_uninitialize APIs
* [#13464](https://github.com/apache/nuttx/pull/13464) driver/ftl: Read the consecutive eraseblocks
* [#13320](https://github.com/apache/nuttx/pull/13320) driver/usbdev: support userspace to access ep0
* [#12641](https://github.com/apache/nuttx/pull/12641) drivers: add API for drivers early initialization
* [#13492](https://github.com/apache/nuttx/pull/13492) drivers: fix gcc14 errors for virtio
* [#13107](https://github.com/apache/nuttx/pull/13107) drivers/audio: fix samp rate conversion issue
* [#13323](https://github.com/apache/nuttx/pull/13323) drivers/bch: fix uint32 overflow issue
* [#12564](https://github.com/apache/nuttx/pull/12564) drivers/net/ksz9477: Add port mirroring support
* [#12765](https://github.com/apache/nuttx/pull/12765) drivers/drivers_initialize.c: check if only one console is selected
* [#13411](https://github.com/apache/nuttx/pull/13411) drivers/fb: add panbuffer clear ioctl
* [#13468](https://github.com/apache/nuttx/pull/13468) drivers/gpio: support poll gpio device and optimize code to save memory
* [#12976](https://github.com/apache/nuttx/pull/12976) drivers/input: enable touch/kbd/mouse for virtio input
* [#13060](https://github.com/apache/nuttx/pull/13060) drivers/modem/alt1250: Disable the PIN feature in ALT1250
* [#13327](https://github.com/apache/nuttx/pull/13327) drivers/mtd/bch: fix size_t overflow when offset > 4GB
* [#13480](https://github.com/apache/nuttx/pull/13480) drivers/pty: support pty write to kill signal, like serial driver
* [#12830](https://github.com/apache/nuttx/pull/12830) drivers/serial: Make the 16550 rx trigger level configurable
* [#13202](https://github.com/apache/nuttx/pull/13202) drivers/regmap: add exit function interface.
* [#13469](https://github.com/apache/nuttx/pull/13469) drivers/reset: support rpmsg reset
* [#13328](https://github.com/apache/nuttx/pull/13328) drivers/rwbuffer: Bug fix: Set nblocks 0 after direct using wrflush
* [#13434](https://github.com/apache/nuttx/pull/13434) drivers/serial
* [#13576](https://github.com/apache/nuttx/pull/13576) drivers/syslog: compile syslog_device.c if console/char/file channel enabled
* [#12857](https://github.com/apache/nuttx/pull/12857) drivers/touchscreen: add grab for touchscreen
* [#13481](https://github.com/apache/nuttx/pull/13481) drivers/usbdev: minor update for cdcacm
* [#12930](https://github.com/apache/nuttx/pull/12930) drivers/virtio-net: Support VIRTIO_F_ANY_LAYOUT
* [#13170](https://github.com/apache/nuttx/pull/13170) drivers: Fix goldfish events x64 unresponsive interrupt issue
* [#13531](https://github.com/apache/nuttx/pull/13531) Fix build error of drivers/sensors/usensor.c
* [#13325](https://github.com/apache/nuttx/pull/13325) Input/ff: new driver frameworks for vibrator(haptic)
* [#13078](https://github.com/apache/nuttx/pull/13078) video: fix warning & update sim camera
* [#12760](https://github.com/apache/nuttx/pull/12760) virtio/serial: initial CONSOLE support
* [#12971](https://github.com/apache/nuttx/pull/12971) mmcsd_sdio:Fix performing read and write in irq
* [#12949](https://github.com/apache/nuttx/pull/12949) mmcsd: add support of getting ext_csd reg data
* [#13157](https://github.com/apache/nuttx/pull/13157) mmcsd: add write ext csd reg support
* [#13528](https://github.com/apache/nuttx/pull/13528) mmcsd: fix a logic error
* [#13215](https://github.com/apache/nuttx/pull/13215) mmcsd: make a compatibility change for cmd12 and cmd23
* [#13380](https://github.com/apache/nuttx/pull/13380) mtd:ramtron MB85RS256B address length is 2
* [#13136](https://github.com/apache/nuttx/pull/13136) mtd:use part->name as partition name when CONFIG_MTD_PARTITION_NAMES set
* [#12796](https://github.com/apache/nuttx/pull/12796) mtd/Kconfig: fix W25_SLOWREAD menu item.
* [#13252](https://github.com/apache/nuttx/pull/13252) mtd/nvs: fix align size
* [#13219](https://github.com/apache/nuttx/pull/13219) nuttx/drivers:Modify errcode returned by relay_ioctl
* [#12848](https://github.com/apache/nuttx/pull/12848) Optimize iic and spi parts and add iic slave drivers
* [#13344](https://github.com/apache/nuttx/pull/13344) pci ivshmem related driveres support
* [#13337](https://github.com/apache/nuttx/pull/13337) Revert "Fix unwanted flush in the SPI slave driver"
* [#13251](https://github.com/apache/nuttx/pull/13251) rndis: correct usb descriptor
* [#13538](https://github.com/apache/nuttx/pull/13538) sensor:Fixed the problem of user information lag in cross-core communication "stublist".
* [#13539](https://github.com/apache/nuttx/pull/13539) sensor_rpmsg.c:Fix that "stub" will be created when local core only has subscribers.
* [#12927](https://github.com/apache/nuttx/pull/12927) serial/uart_16550: include stdint.h in uart_16550.h
* [#13383](https://github.com/apache/nuttx/pull/13383) serial/uart_16550: remove up_putc spinlock
* [#13384](https://github.com/apache/nuttx/pull/13384) serial/uart_pl011: default syslog needs to check flow control in up_putc
* [#13509](https://github.com/apache/nuttx/pull/13509) serial/pci_16550: make sure that interrupts are disabled during init
* [#13102](https://github.com/apache/nuttx/pull/13102) syslog_rpmsg: Ensure the syslog ept is ready when rpmsg_send
* [#13184](https://github.com/apache/nuttx/pull/13184) timer driver:support poll.
* [#13075](https://github.com/apache/nuttx/pull/13075) usb_cdcmbim: add mbim device driver
* [#13367](https://github.com/apache/nuttx/pull/13367) usbdev: Add fastboot boardctl
* [#12914](https://github.com/apache/nuttx/pull/12914) usbdev: add USB cdcncm device driver
* [#12745](https://github.com/apache/nuttx/pull/12745) usbdev: delete unsigned comparison with 0
* [#13216](https://github.com/apache/nuttx/pull/13216) usbdev: extend the usb req len to unit32_t
* [#13190](https://github.com/apache/nuttx/pull/13190) USB 3.0 device side suppor
Board Support
New Boards
* [#13248](https://github.com/apache/nuttx/pull/13248) arm: Add support for CSK6011A SOC and CSK6011A-NANO board
* [#11709](https://github.com/apache/nuttx/pull/11709) at32uc3a0: Initial work for SimpleMachines' Mizar32-A
* [#12813](https://github.com/apache/nuttx/pull/12813) boards/esp32s3: Add initial support to the ESP32-S3-Korvo-2 board
* [#13467](https://github.com/apache/nuttx/pull/13467) boards/esp32s3: add support to esp32s3-lhcbit board
Boards Improvements
* [#13532](https://github.com/apache/nuttx/pull/13532) [Bugfix]Kconfig:ensure compatibility between kconfig-frontend and kconfiglib in kernel build
* [#12698](https://github.com/apache/nuttx/pull/12698) Add defconfig to use the ws2812 driver
* [#12878](https://github.com/apache/nuttx/pull/12878) arm/stm32f103-minimum: Use common board MFRC522
* [#12922](https://github.com/apache/nuttx/pull/12922) arm64: Initial implementation of CONFIG_BUILD_KERNEL
* [#13376](https://github.com/apache/nuttx/pull/13376) arm64/Kconfig: Make the ARM64_PA/VA_BITS a true Kconfig variable
* [#12973](https://github.com/apache/nuttx/pull/12973) board/arm/rp2040/seeed-xiao-studio-rp2040 GPIO configuration
* [#12738](https://github.com/apache/nuttx/pull/12738) board/linum-stm32h753bi: Add support to external sdram
* [#12882](https://github.com/apache/nuttx/pull/12882) board/lm3s6965-ek: restore 128K kflash
* [#12699](https://github.com/apache/nuttx/pull/12699) board/stm32f401rc-rs485: Add support to Device Configuration over Telnet
* [#12737](https://github.com/apache/nuttx/pull/12737) board/stm32f401rc-rs485: Add support to MAX7219 8x8 LED Matrix
* [#13516](https://github.com/apache/nuttx/pull/13516) boards: Update EXAMPLES_SOTEST_DEVMINOR to EXAMPLES_SOTEST_DEVMINOR_MAX
* [#12743](https://github.com/apache/nuttx/pull/12743) boards/arm/rp2040: Userled configuration to Seeed-Stdio RP2040
* [#13142](https://github.com/apache/nuttx/pull/13142) boards/arm/stm32/stm32f4discovery: Add support to RFID MFRC522
* [#13440](https://github.com/apache/nuttx/pull/13440) boards/arm/stm32h7/stm32h745i-disco: Add RPTUN support
* [#12825](https://github.com/apache/nuttx/pull/12825) boards/armv5: Make ARMv5 boards work again
* [#12593](https://github.com/apache/nuttx/pull/12593) boards/stm32: DRV8825 driver
* [#12673](https://github.com/apache/nuttx/pull/12673) boards/esp32[c3|c6|h2|s2|s3]: Ignore etctmp in common board
* [#13124](https://github.com/apache/nuttx/pull/13124) boards/esp32s3_lan9250: deinitialize the ethernet device lan9250
* [#12716](https://github.com/apache/nuttx/pull/12716) boards/esp32s3: Increse the default stack size for usbnsh
* [#12763](https://github.com/apache/nuttx/pull/12763) boards/imx93-evk: add sdimage cleanup
* [#12876](https://github.com/apache/nuttx/pull/12876) boards/lm3s6965-ek: fix memory.ld for PROTECTED
* [#12598](https://github.com/apache/nuttx/pull/12598) boards/MIMXRT1020-EVK: Fix board I2C code to adapt to last IMXRT I2C/pi…
* [#13137](https://github.com/apache/nuttx/pull/13137) boards/risc-v/esp32c6/esp32c6-devkitm: Add support to RFID MFRC522
* [#12869](https://github.com/apache/nuttx/pull/12869) boards/rv-virt: unify RV32 config names
* [#13226](https://github.com/apache/nuttx/pull/13226) boards/sim: Defconfigs for nand and mnemofs
* [#12898](https://github.com/apache/nuttx/pull/12898) boards/xtensa/esp32s3: ESP32S3 Emmc Support
* [#13478](https://github.com/apache/nuttx/pull/13478) boardctl: add board control api to start slave core
* [#13273](https://github.com/apache/nuttx/pull/13273) boardcrtl: change BOARDCTL_TESTSET to BOARDIOC_SPINLOCK
* [#12747](https://github.com/apache/nuttx/pull/12747) Change nucleof429zi nsh defconfig
* [#13059](https://github.com/apache/nuttx/pull/13059) defconfig: add SYSTEM_TELNETD related config
* [#13334](https://github.com/apache/nuttx/pull/13334) esp32: fix a way to test a config
* [#13563](https://github.com/apache/nuttx/pull/13563) esp32s3: Fix faulty `esp32s3-devkit:stack` example
* [#13234](https://github.com/apache/nuttx/pull/13234) imx9_usdhc.c: Fix build error when CONFIG_ARM64_DCACHE_DISABLE=y
* [#12867](https://github.com/apache/nuttx/pull/12867) LTDC for Linum board
* [#12780](https://github.com/apache/nuttx/pull/12780) nrf9160-dk: disable FPU for modem example
* [#13476](https://github.com/apache/nuttx/pull/13476) nucleo-h745zi: fix potential bl jump to app failed issue
* [#13069](https://github.com/apache/nuttx/pull/13069) nucleo-l432kc: Revert the USART2 config to be use by virtual COM port
* [#12987](https://github.com/apache/nuttx/pull/12987) nuttx/boards:Uniform initialization format for init_array.
* [#13208](https://github.com/apache/nuttx/pull/13208) risc-v/bl808: Configure MMU to cache User Text, Data and Heap
* [#13199](https://github.com/apache/nuttx/pull/13199) risc-v/mmu: Configure T-Head MMU to cache User Text, Data and Heap
* [#12862](https://github.com/apache/nuttx/pull/12862) risc-v/qemu-rv: Add Build Config for leds64_rust
* [#13186](https://github.com/apache/nuttx/pull/13186) risc-v/qemu-rv: Add Build Config for leds64_zig
* [#12896](https://github.com/apache/nuttx/pull/12896) risc-v/qemu-rv: add cluster PLIC/CLINT configs
* [#12544](https://github.com/apache/nuttx/pull/12544) riscv/nuttsbi: add MTVAL argument
* [#12645](https://github.com/apache/nuttx/pull/12645) stm32h7/linum-stm32h753bi: add support to qencoder
* [#12739](https://github.com/apache/nuttx/pull/12739) stm32f777zit6-meadow: Add support for two USB CDC/ACM
* [#12637](https://github.com/apache/nuttx/pull/12637) Usbnsh to seed-xiao-rp2040 board
* [#12713](https://github.com/apache/nuttx/pull/12713) zynq_mpsoc/zcu111: add support for gpio and board auto led
* [#12806](https://github.com/apache/nuttx/pull/12806) zynq-mpsoc/zcu111: independent JTAG configs from normal nsh configs
* [#12797](https://github.com/apache/nuttx/pull/12797) w25c: add W25_DEBUG sub-menu config option and update debug traces.
File System
New FS
* [#13001](https://github.com/apache/nuttx/pull/13001) V9FS For NuttX
FS Improvements
* [#13514](https://github.com/apache/nuttx/pull/13514) add sched note for littlefs/romfs/rpmsgfs
* [#12863](https://github.com/apache/nuttx/pull/12863) Fix the location of tmpfs pwrite write and Fixed some code check warnings
* [#13500](https://github.com/apache/nuttx/pull/13500) fs.h: fix a comment in file_operations
* [#12532](https://github.com/apache/nuttx/pull/12532) fs: add backtrace to where file opens
* [#13150](https://github.com/apache/nuttx/pull/13150) fs: add fs_heap, support shm/tmpfs/pseudofile with indepent heap
* [#12587](https://github.com/apache/nuttx/pull/12587) Fs: backtrace tweak
* [#13512](https://github.com/apache/nuttx/pull/13512) fs: Dump the list of files when the file description runs out
* [#13194](https://github.com/apache/nuttx/pull/13194) fs: nfs: Fix nfsmount error
* [#12978](https://github.com/apache/nuttx/pull/12978) fs: Rename node with inode.
* [#12969](https://github.com/apache/nuttx/pull/12969) Fslock optimize
* [#12937](https://github.com/apache/nuttx/pull/12937) fs/mnemofs: Fix journal log rw issue, rw size issue
* [#12945](https://github.com/apache/nuttx/pull/12945) fs/hostfs: Replace strcpy with memcpy
* [#13443](https://github.com/apache/nuttx/pull/13443) fs_inode:Change the type of i_crefs to atomic_int
* [#13458](https://github.com/apache/nuttx/pull/13458) fs_dup2 bug fix, memleak
* [#13573](https://github.com/apache/nuttx/pull/13573) fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore othjer bits
* [#12931](https://github.com/apache/nuttx/pull/12931) fs/epoll: Optimize implementation details
* [#12615](https://github.com/apache/nuttx/pull/12615) fs/fat: Fix Fseek Bug When File Size Is Multiple of Cluster Size
* [#12548](https://github.com/apache/nuttx/pull/12548) fs/fat/fs_fat32.c Return EOF when reading past the end of the file.
* [#13521](https://github.com/apache/nuttx/pull/13521) fs/dump: correct SCHED_DUMP_ON_EXIT to DUMP_ON_EXIT
* [#12990](https://github.com/apache/nuttx/pull/12990) fs/mmap: Fix build warning with [-Wmaybe-uninitialized].
* [#13132](https://github.com/apache/nuttx/pull/13132) fs/procfs: Supports any number of thread displays
* [#13123](https://github.com/apache/nuttx/pull/13123) fs/shmfs:Avoid an integer overflow
* [#12790](https://github.com/apache/nuttx/pull/12790) fs/spiffs: Return OK on `spiffs_fstat` success
* [#13407](https://github.com/apache/nuttx/pull/13407) fs/mmap: Add MADV_HUGEPAGE definitions
* [#13406](https://github.com/apache/nuttx/pull/13406) fs/mmap: Ensure anonymous pages are initialized to zero
* [#12661](https://github.com/apache/nuttx/pull/12661) fs/mnemofs: Adds Block Allocator
* [#12668](https://github.com/apache/nuttx/pull/12668) fs/mnemofs: Add parent iterator and path methods.
* [#12680](https://github.com/apache/nuttx/pull/12680) fs/mnemofs: Add LRU and CTZ methods
* [#12683](https://github.com/apache/nuttx/pull/12683) fs/mnemofs: Add journal methods.
* [#12702](https://github.com/apache/nuttx/pull/12702) fs/mnemofs: Add master node and r/w methods
* [#12943](https://github.com/apache/nuttx/pull/12943) fs/mnemofs: Autoformat
* [#12808](https://github.com/apache/nuttx/pull/12808) fs/mnemofs: Refactoring path logic, direntry size bug fix, open free bug fix
* [#12658](https://github.com/apache/nuttx/pull/12658) fs/mnemofs: Setup and VFS methods
* [#13475](https://github.com/apache/nuttx/pull/13475) fs/mount: add ftl proxy to mount block filesystem on mtd device
* [#13258](https://github.com/apache/nuttx/pull/13258) fs/mq_open: revise comments
* [#13326](https://github.com/apache/nuttx/pull/13326) fs/files_extend: Bug Fix
* [#13331](https://github.com/apache/nuttx/pull/13331) fs/inode: using inode reference to indicate unlink and simply code
* [#13077](https://github.com/apache/nuttx/pull/13077) Fsnotify
* [#12942](https://github.com/apache/nuttx/pull/12942) Hostfs support get filepath by ioctl
* [#12817](https://github.com/apache/nuttx/pull/12817) procfs/meminfo: free delaylist before reporting
* [#13058](https://github.com/apache/nuttx/pull/13058) procfs/mempool: fix did not remove when pool not enabled
* [#13092](https://github.com/apache/nuttx/pull/13092) rpmsgfs: fix out of bounds access caused by data transmission farmat
* [#13063](https://github.com/apache/nuttx/pull/13063) rpmsgfs: set fs type to rpmsgfs when mount through rpmsgfs
* [#13348](https://github.com/apache/nuttx/pull/13348) smartfs procfs: fix double declare g_smartfs_operations
* [#12939](https://github.com/apache/nuttx/pull/12939) rpmsgfs_client:Fix error return exception
* [#12941](https://github.com/apache/nuttx/pull/12941) rpmsgfs: support filelock
* [#13098](https://github.com/apache/nuttx/pull/13098) tmpfs: old data was loaded when SEEK_SET beyond end of the file
* [#13490](https://github.com/apache/nuttx/pull/13490) vfs:fix a type mismatch issue and a typo
Networking
Improvements
* [#13385](https://github.com/apache/nuttx/pull/13385) Fix the bug that netlink receive wait does not hang up
* [#13053](https://github.com/apache/nuttx/pull/13053) icmp:add net_lock to protect icmp connection
* [#13336](https://github.com/apache/nuttx/pull/13336) local_socket: add SO_SNDBUF & SO_RCVBUF support
* [#13045](https://github.com/apache/nuttx/pull/13045) localsocket improvment
* [#12639](https://github.com/apache/nuttx/pull/12639) net: Enable ICMP by default if IPv4 is enabled
* [#13028](https://github.com/apache/nuttx/pull/13028) net_chksum.c:mod process of generating sum to solve checksum error
* [#12991](https://github.com/apache/nuttx/pull/12991) net/icmpv6/icmpv6_input.c: fix undefined build error
* [#13093](https://github.com/apache/nuttx/pull/13093) net/netdev: Add periodic log for netdev statistics
* [#12689](https://github.com/apache/nuttx/pull/12689) net/netfilter: fix windows compile error
* [#12688](https://github.com/apache/nuttx/pull/12688) net/pkt: correct PF_PACKET family sending errors
* [#12995](https://github.com/apache/nuttx/pull/12995) net/pkt: fix issue that set nonblock by fcntl does not take effect
* [#13010](https://github.com/apache/nuttx/pull/13010) net/pkt: fix raw socket send data length is insufficient
* [#13120](https://github.com/apache/nuttx/pull/13120) net/tcp_timer: fix tcp_timer idle loop and retransmission bug
* [#13051](https://github.com/apache/nuttx/pull/13051) net/tcp: reset the dupack counter.
* [#12899](https://github.com/apache/nuttx/pull/12899) net/tun: Remove unused variables in read & write
* [#13191](https://github.com/apache/nuttx/pull/13191) net/tun: Support changing carrier state of TUN/TAP
* [#13350](https://github.com/apache/nuttx/pull/13350) net/udp: Fixed the issue of sending ICMP error when the destination address is broadcast/multicast.
* [#13037](https://github.com/apache/nuttx/pull/13037) netdev_upperhalf: add polling mode support for tx/rx
* [#13046](https://github.com/apache/nuttx/pull/13046) netdev/ioctl: Setting log level to warning on SIOCGIFHWADDR failure
* [#13007](https://github.com/apache/nuttx/pull/13007) netdev/lower: Add reclaim callback and use it in virtio-net
* [#13343](https://github.com/apache/nuttx/pull/13343) netdev/statistics: Add bytes for netdev statistics
* [#13008](https://github.com/apache/nuttx/pull/13008) netdev/upper: Delay replied packets to prevent TX quota become negated
* [#12992](https://github.com/apache/nuttx/pull/12992) netinet/in.h: add macro definitions to resolve compilation errors
* [#12994](https://github.com/apache/nuttx/pull/12994) netlib/route: add length for add/del route-func to reduce caller stack usage
* [#13335](https://github.com/apache/nuttx/pull/13335) netdb: Make NETDB_DNSSERVER_NAMESERVERS effective for NETDB_RESOLVCONF
* [#13038](https://github.com/apache/nuttx/pull/13038) netdb: netdb code support ffmpeg rtsp(getaddrinfo & getnameinfo)
* [#13049](https://github.com/apache/nuttx/pull/13049) Modify the IPV6 address acquisition method and the gateway settings.
* [#13125](https://github.com/apache/nuttx/pull/13125) modify for offload checksum and add macro with tcp/icmp/icmpv6/igmp checksum
* [#13026](https://github.com/apache/nuttx/pull/13026) modify the type of the ipv6 parameters to solve runtime error
* [#13029](https://github.com/apache/nuttx/pull/13029) solve Problem of tcp parameter calculation exceeding the boundary
* [#13156](https://github.com/apache/nuttx/pull/13156) sys/socket: implement compiler agnostic sockaddr_storage alignment
* [#13158](https://github.com/apache/nuttx/pull/13158) tcp_close.c:when tcp socket stays in TCP_FIN_WAIT_1 or TCP_FIN_WAIT_2,calling tcp_close_eventhandler releases received packets
* [#12999](https://github.com/apache/nuttx/pull/12999) tcp_input: if tcp->req > recvreq, send ack only when state is TCP_ESTABLISHED
Unsorted
Improvements
* [#13448](https://github.com/apache/nuttx/pull/13448) [Bug-Fix] Resource leaks
* [#13100](https://github.com/apache/nuttx/pull/13100) [BugFix]Command "critmon" error
* [#13002](https://github.com/apache/nuttx/pull/13002) 12K sample rate support
* [#13486](https://github.com/apache/nuttx/pull/13486) Accelerate access to interrupt status
* [#12980](https://github.com/apache/nuttx/pull/12980) add fb_vsync_pollnotify
* [#12959](https://github.com/apache/nuttx/pull/12959) Add goldfish events
* [#12951](https://github.com/apache/nuttx/pull/12951) Add irq disable func
* [#13130](https://github.com/apache/nuttx/pull/13130) Add memory pressure monitoring
* [#13089](https://github.com/apache/nuttx/pull/13089) api:add lib_realpath function
* [#12947](https://github.com/apache/nuttx/pull/12947) assert: add compile_assert macro
* [#13020](https://github.com/apache/nuttx/pull/13020) assert: check COMPILE_TIME_ASSERT before define
* [#13087](https://github.com/apache/nuttx/pull/13087) Audio upstream
* [#13044](https://github.com/apache/nuttx/pull/13044) Basic Atomic for NuttX
* [#13099](https://github.com/apache/nuttx/pull/13099) bch: alloc bch->buffer when offset not aligned
* [#13513](https://github.com/apache/nuttx/pull/13513) BCH: Add readonly configuration for BCH devices
* [#12853](https://github.com/apache/nuttx/pull/12853) binfmt/elf_loadfile: Set sh_addr even if SHF_ALLOC == 0
* [#12965](https://github.com/apache/nuttx/pull/12965) boot: fix potential bl jump to app failed issue
* [#13094](https://github.com/apache/nuttx/pull/13094) Bugfix hcreate
* [#13300](https://github.com/apache/nuttx/pull/13300) can: Before we use pstate, we should check if it is NULL.
* [#13570](https://github.com/apache/nuttx/pull/13570) can: Add g_ prefix to can_dlc_to_len and len_to_can_dlc.
* [#13048](https://github.com/apache/nuttx/pull/13048) can: CAN code optimization
* [#12656](https://github.com/apache/nuttx/pull/12656) can: fixes and tweaks for CAN FD support
* [#13126](https://github.com/apache/nuttx/pull/13126) Capture adds the function of edges counting
* [#12934](https://github.com/apache/nuttx/pull/12934) clk: fix reg operation not compatible with 64bit
* [#13210](https://github.com/apache/nuttx/pull/13210) cdcacm: align cdcacm_epconfigure function parameters
* [#13189](https://github.com/apache/nuttx/pull/13189) Controlling rgb led bp
* [#12889](https://github.com/apache/nuttx/pull/12889) Coredump enhancement, optimized prompt statements
* [#13474](https://github.com/apache/nuttx/pull/13474) coredump: just save latest core file
* [#12958](https://github.com/apache/nuttx/pull/12958) coredump: refine coredump info analyse
* [#13066](https://github.com/apache/nuttx/pull/13066) crypto: import the ability to clone session
* [#13109](https://github.com/apache/nuttx/pull/13109) crypto/bn: Provide software algorithms to calculate inverse elements and greatest common divisor
* [#13431](https://github.com/apache/nuttx/pull/13431) crypto/rsa: add exp mod in software crypto
* [#12970](https://github.com/apache/nuttx/pull/12970) Disable clean/flush optimization in case of SMP restriction
* [#12777](https://github.com/apache/nuttx/pull/12777) dlfcn: Add stub for dladdr
* [#12779](https://github.com/apache/nuttx/pull/12779) dlfcn: Fix indent issue in lib_dlclose.c
* [#13159](https://github.com/apache/nuttx/pull/13159) dynamically create work queues
* [#13489](https://github.com/apache/nuttx/pull/13489) enable O_CLOEXEC explicitly to avoid fd leak
* [#13118](https://github.com/apache/nuttx/pull/13118) Enhance ASSERT
* [#13424](https://github.com/apache/nuttx/pull/13424) Enhance Kasan
* [#13559](https://github.com/apache/nuttx/pull/13559) Enhance Kasan's global variable out of bounds detection
* [#13388](https://github.com/apache/nuttx/pull/13388) Expose IPTOS_xxx to the application layer
* [#12963](https://github.com/apache/nuttx/pull/12963) fdcheck: fix race condition in fdcheck
* [#13096](https://github.com/apache/nuttx/pull/13096) fb:add select overlay FB_NO_OVERLAY
* [#13296](https://github.com/apache/nuttx/pull/13296) filep Reference count
* [#12578](https://github.com/apache/nuttx/pull/12578) Fix allocated memory test
* [#13461](https://github.com/apache/nuttx/pull/13461) Fix dev_mem related
* [#13555](https://github.com/apache/nuttx/pull/13555) Fix greater-than-or-equal-to-zero issue
* [#12741](https://github.com/apache/nuttx/pull/12741) Fix pin LTDC_B0, should be PJ12 instead of PF0
* [#13129](https://github.com/apache/nuttx/pull/13129) Fix task_setup race condition
* [#13054](https://github.com/apache/nuttx/pull/13054) Fix the compilation warnings
* [#12955](https://github.com/apache/nuttx/pull/12955) fix the potential bug of putwc, fgetwc, ungetwc, wcsstr, fputwc
* [#13095](https://github.com/apache/nuttx/pull/13095) fix:uart_rpmsg_dmareceive
* [#13477](https://github.com/apache/nuttx/pull/13477) ftl: should pre-allocate eblock for car case
* [#13000](https://github.com/apache/nuttx/pull/13000) getrlimit: implement RLIMIT_STACK return limit stack size
* [#13459](https://github.com/apache/nuttx/pull/13459) GNSS: Add support for constellation, measurement, clock and geofence
* [#13504](https://github.com/apache/nuttx/pull/13504) goldfish:add kernel mode support
* [#13330](https://github.com/apache/nuttx/pull/13330) group/filelist: add reference to protect filelist of group
* [#13554](https://github.com/apache/nuttx/pull/13554) i2c: Optimize access to private data
* [#13233](https://github.com/apache/nuttx/pull/13233) Increase the chance for _assert to work early in the boot
* [#13306](https://github.com/apache/nuttx/pull/13306) init: add OSINIT_TASK_READY
* [#13228](https://github.com/apache/nuttx/pull/13228) inline restore_critical_section and add parameters to restore_critical_section
* [#12981](https://github.com/apache/nuttx/pull/12981) input: fix goldfish input and lvgl input device name mismatch problem
* [#13108](https://github.com/apache/nuttx/pull/13108) input: fix touchevent race condition
* [#13073](https://github.com/apache/nuttx/pull/13073) inode: call inode_release when close success
* [#13198](https://github.com/apache/nuttx/pull/13198) Introduce new PCI framework
* [#13442](https://github.com/apache/nuttx/pull/13442) input/ff: modify FF_MAX to support 64-bit machine
* [#13387](https://github.com/apache/nuttx/pull/13387) ipfrag: fix warnig
* [#13163](https://github.com/apache/nuttx/pull/13163) ipfrag: remove assert for actual product reasons
* [#13012](https://github.com/apache/nuttx/pull/13012) irq: add [enter|leave]_critical_section_nonirq
* [#13018](https://github.com/apache/nuttx/pull/13018) irq: add isr thread
* [#13242](https://github.com/apache/nuttx/pull/13242) irq: dynaminc create g_irqmap
* [#13256](https://github.com/apache/nuttx/pull/13256) irq: irq with the same priority share the same wqueue
* [#12595](https://github.com/apache/nuttx/pull/12595) irq: remove g_cpu_nestcount in restore_critical_section
* [#12935](https://github.com/apache/nuttx/pull/12935) irq: remove restore_critical_section in irq
* [#12596](https://github.com/apache/nuttx/pull/12596) irq: remove restore_critical_section in irq
* [#13369](https://github.com/apache/nuttx/pull/13369) irq: simplify code by using OSINIT_TASK_READY
* [#13119](https://github.com/apache/nuttx/pull/13119) Kasan enhance
* [#12893](https://github.com/apache/nuttx/pull/12893) kasan:fix bug write error is recognized as read error
* [#13133](https://github.com/apache/nuttx/pull/13133) Keep the log level consistent with assert
* [#12590](https://github.com/apache/nuttx/pull/12590) libmetal/atomic: enable 64-bit atomic by toolchain builtin flags
* [#13543](https://github.com/apache/nuttx/pull/13543) lilygo_tbeam_lora_gps/gps: Enable GNSSUTILS_MINMEA_LIB for EXAMPLES_GPS
* [#13549](https://github.com/apache/nuttx/pull/13549) lzf:Add macro judgment to header file reference.
* [#12929](https://github.com/apache/nuttx/pull/12929) make/disassembly: generate disassembly file
* [#13179](https://github.com/apache/nuttx/pull/13179) memset:optimizate speed.
* [#12985](https://github.com/apache/nuttx/pull/12985) minidumpserver: fix parsing bug
* [#13287](https://github.com/apache/nuttx/pull/13287) mksymtab.c support for structure
* [#13452](https://github.com/apache/nuttx/pull/13452) modify BUILD_LOADABLE to MODULES which backwards-compatible Kernel
* [#12968](https://github.com/apache/nuttx/pull/12968) MPU update
* [#13460](https://github.com/apache/nuttx/pull/13460) New Rpmsg Transports: Rpmsg Port SPI, Rpmsg Port Uart and Rpmsg Router Transport Support
* [#13104](https://github.com/apache/nuttx/pull/13104) nxmutex api enhance
* [#13047](https://github.com/apache/nuttx/pull/13047) nuttx-names.in:add popen & pclose assign to glibc interface
* [#13006](https://github.com/apache/nuttx/pull/13006) nuttx/audio: add AUDIOIOC_GETPOSITION ioctl
* [#13005](https://github.com/apache/nuttx/pull/13005) nuttx/audio: add offload buffer size config
* [#13340](https://github.com/apache/nuttx/pull/13340) nuttx/crypto: export asymmetric algorithms about ecdh and ecc256 via /dev/crypto
* [#13138](https://github.com/apache/nuttx/pull/13138) nuttx/crypto: fix wrong implementation in crypto module
* [#13173](https://github.com/apache/nuttx/pull/13173) nuttx/crypto: support new algorithm about crc32 and aes-cmac
* [#13084](https://github.com/apache/nuttx/pull/13084) nuttx/crypto: support poly1305 and ripemd160 algorithm
* [#12986](https://github.com/apache/nuttx/pull/12986) nuttx/note: fix missing the last character when printing custom labels.
* [#12730](https://github.com/apache/nuttx/pull/12730) NVS: fix align size
* [#13187](https://github.com/apache/nuttx/pull/13187) nvs: modify nvs block size and block numbers
* [#12601](https://github.com/apache/nuttx/pull/12601) queue: inline queue
* [#13435](https://github.com/apache/nuttx/pull/13435) pci/pci_uio_ivshmem: pci uio ivshmem msix interrupt support
* [#13178](https://github.com/apache/nuttx/pull/13178) pl031:change mktime to timegm.
* [#13057](https://github.com/apache/nuttx/pull/13057) pm_runtime: fix missing header
* [#13064](https://github.com/apache/nuttx/pull/13064) pm_activity: fix deadlock with spinlock and critcal_section
* [#13055](https://github.com/apache/nuttx/pull/13055) pm: add pm_idle, up_idle only handle pm state execution
* [#12933](https://github.com/apache/nuttx/pull/12933) pm: add debug_assert for cb register/unregister api
* [#13072](https://github.com/apache/nuttx/pull/13072) pm: update document, add pm_idle interface for not-smp case
* [#13279](https://github.com/apache/nuttx/pull/13279) poll: fix thread_cancel() caused poll used after free
* [#13074](https://github.com/apache/nuttx/pull/13074) Private requirement for wapi
* [#13168](https://github.com/apache/nuttx/pull/13168) protected build: userspace threads will unexpectly work in privileged mode after syscall
* [#13153](https://github.com/apache/nuttx/pull/13153) pty: use mutex to protect alloc minor
* [#13295](https://github.com/apache/nuttx/pull/13295) psram_cache_init: remove cosmetic differences between PRO/APP
* [#13438](https://github.com/apache/nuttx/pull/13438) ramlog bug fix
* [#13283](https://github.com/apache/nuttx/pull/13283) Refactor wdog module
* [#12891](https://github.com/apache/nuttx/pull/12891) Reimplemented the mempool traversal function and fixed some existing bugs in the mempool
* [#13463](https://github.com/apache/nuttx/pull/13463) rename, strtoul & sscanf
* [#13309](https://github.com/apache/nuttx/pull/13309) Restore ASSERT/VERIFY semantics
* [#13485](https://github.com/apache/nuttx/pull/13485) Revert "irq: add [enter|leave]_critical_section_nonirq"
* [#12607](https://github.com/apache/nuttx/pull/12607) Revert "irq: remove restore_critical_section in irq"
* [#13432](https://github.com/apache/nuttx/pull/13432) Rpmsg VirtIO Transport support and releated patches
* [#13183](https://github.com/apache/nuttx/pull/13183) rpmsg_rtc:Update g_basetime from rpmsg.
* [#13169](https://github.com/apache/nuttx/pull/13169) rpmsg.c: move onceinit judge logic to common part
* [#13404](https://github.com/apache/nuttx/pull/13404) rpmsgblk: split multi_cmd only when it is too large to be placed into…
* [#13465](https://github.com/apache/nuttx/pull/13465) rpmsgdev: Support server export and oneway polling
* [#13172](https://github.com/apache/nuttx/pull/13172) rptun.c: fix rptun.c format follow rpmsg virtio
* [#13203](https://github.com/apache/nuttx/pull/13203) rtc alarm:fix doesn't call nxsig_notification
* [#13515](https://github.com/apache/nuttx/pull/13515) shm: remove useless macro
* [#13280](https://github.com/apache/nuttx/pull/13280) smp: smp call handler add up_cpu_paused_[save|restore]
* [#13405](https://github.com/apache/nuttx/pull/13405) spi_slave: change length to nwords
* [#12599](https://github.com/apache/nuttx/pull/12599) spin_lock: inline spin_lock
* [#12837](https://github.com/apache/nuttx/pull/12837) spinlock: add support of spin_trylock_irqsave()
* [#12836](https://github.com/apache/nuttx/pull/12836) spinlock: inline no trace implement to remove duplicate logic
* [#13272](https://github.com/apache/nuttx/pull/13272) spinlock: spin_initialize should add memory barrier
* [#13457](https://github.com/apache/nuttx/pull/13457) stack recored bug fix
* [#13386](https://github.com/apache/nuttx/pull/13386) stream/syslograw: remove support for iob buffer in syslog
* [#13511](https://github.com/apache/nuttx/pull/13511) Support msync
* [#13196](https://github.com/apache/nuttx/pull/13196) support rss/arfs with device
* [#13106](https://github.com/apache/nuttx/pull/13106) suppress libasan checks
* [#13031](https://github.com/apache/nuttx/pull/13031) Synchronize the modification of the WiFi problems in QEMU.
* [#13113](https://github.com/apache/nuttx/pull/13113) Swift embedded support
* [#12820](https://github.com/apache/nuttx/pull/12820) task_fork.c: Fix vfork for BUILD_KERNEL
* [#12754](https://github.com/apache/nuttx/pull/12754) up_backtrace: fix maybe backtrace the exiting thread
* [#13293](https://github.com/apache/nuttx/pull/13293) Update clock speed
* [#13410](https://github.com/apache/nuttx/pull/13410) Update posix timer
* [#12611](https://github.com/apache/nuttx/pull/12611) Upgrade Segger SystemView to V3.54
* [#12705](https://github.com/apache/nuttx/pull/12705) V4l2m2m openh264 x264 to builtin
* [#13030](https://github.com/apache/nuttx/pull/13030) video/fb: changed circbuf_write assert to warning
* [#13433](https://github.com/apache/nuttx/pull/13433) VirtIO PCI Transport Support for NuttX
* [#13338](https://github.com/apache/nuttx/pull/13338) virtio-blk: support called read/write in interrupt
* [#13437](https://github.com/apache/nuttx/pull/13437) wqueue bug fix
* [#13241](https://github.com/apache/nuttx/pull/13241) wqueue: add interface work_queue_priority_wq and work_queue_priority

View file

@ -1,930 +0,0 @@
NuttX-12.8.0
------------
What's New In This Release
Major Changes to Core OS
Sched
* [#14080](https://github.com/apache/nuttx/pull/14080) Revert "sched/group/setuptask_file: duplicate idle task fd for kernelthreads
* [#14190](https://github.com/apache/nuttx/pull/14190) Revert "sched/spinlock: remove nesting spinlock support"
* [#14804](https://github.com/apache/nuttx/pull/14804) Revert "sem: change sem wait to atomic operation"
* [#14497](https://github.com/apache/nuttx/pull/14497) Revert "shced:sem: replace mutex with spinlock"
* [#14203](https://github.com/apache/nuttx/pull/14203) Reapply "sched/spinlock: remove nesting spinlock support"
* [#14761](https://github.com/apache/nuttx/pull/14761) Reapply "SYSLOG_DEFAULT: wrap up_putc/up_nputs calls with critical section" with a fix
* [#13950](https://github.com/apache/nuttx/pull/13950) sched note enhance
* [#13901](https://github.com/apache/nuttx/pull/13901) Sched note wdog
* [#14164](https://github.com/apache/nuttx/pull/14164) sched_backtrace: fix when dump running thread in other-core
* [#14875](https://github.com/apache/nuttx/pull/14875) sched_unlock: remove redundant/stale logic and comment
* [#14631](https://github.com/apache/nuttx/pull/14631) sched: add header irq.h to exit.c
* [#14183](https://github.com/apache/nuttx/pull/14183) sched: delete the dump file list when the thread exits
* [#13962](https://github.com/apache/nuttx/pull/13962) sched: export sched_getcpu API in AMP mode
* [#14243](https://github.com/apache/nuttx/pull/14243) sched: fix nxsched_process_delivered did not call hook
* [#14083](https://github.com/apache/nuttx/pull/14083) sched: fix nxsched_suspend_scheduler regression
* [#14026](https://github.com/apache/nuttx/pull/14026) sched: fix omitted merging the pending queue regression
* [#14059](https://github.com/apache/nuttx/pull/14059) sched: inline nxsched_select_cpu nxsched_add_prioritized 
* [#14272](https://github.com/apache/nuttx/pull/14272) sched: modify CONFIG_DUMP_ON_EXIT to CONFIG_SCHED_DUMP_ON_EXIT
* [#14286](https://github.com/apache/nuttx/pull/14286) sched: remove duplicate functions
* [#13995](https://github.com/apache/nuttx/pull/13995) sched: remove param in nxsched_remove_readytorun
* [#14954](https://github.com/apache/nuttx/pull/14954) sched: replace up_cpu_index with this_cpu
* [#14051](https://github.com/apache/nuttx/pull/14051) sched: support backtrace record
* [#14048](https://github.com/apache/nuttx/pull/14048) sched: There is no need to use sched_[un]lock
* [#14340](https://github.com/apache/nuttx/pull/14340) sched: Use spinlock repalce sched_[un]lock in some place
* [#14863](https://github.com/apache/nuttx/pull/14863) sched/addrenv.c: Fix usage of atomic_fetch_sub
* [#14061](https://github.com/apache/nuttx/pull/14061) sched/cpuload: fix SMP situation CPULOAD statistics are inaccurate
* [#14504](https://github.com/apache/nuttx/pull/14504) sched/cpuload: move g_cpuload_wdog to private chapter
* [#14069](https://github.com/apache/nuttx/pull/14069) sched/group: clear tcb group after group_release
* [#13957](https://github.com/apache/nuttx/pull/13957) sched/group: There is no need to use sched_[un]lock
* [#14186](https://github.com/apache/nuttx/pull/14186) sched/instrument: rename stack_record.c to stack_monitor.c
* [#14941](https://github.com/apache/nuttx/pull/14941) sched/lockcount: replace all lockcount check to nxsched_islocked_tcb()
* [#14815](https://github.com/apache/nuttx/pull/14815) sched/misc/assert.c: don't compile dump_assert_info logic if CONFIG_DEBUG_ALERT=n
* [#14614](https://github.com/apache/nuttx/pull/14614) sched/misc/assert.c: don't compile dump_task logic if CONFIG_DEBUG_ALERT=n
* [#14191](https://github.com/apache/nuttx/pull/14191) sched/pthread: Remove unused pthread_sem_xxx functions
* [#14032](https://github.com/apache/nuttx/pull/14032) sched/pthread: save pid before task activate
* [#14089](https://github.com/apache/nuttx/pull/14089) sched/pthread: There is no need to use sched_[un]lock
* [#14627](https://github.com/apache/nuttx/pull/14627) sched/sched: change the judgment condition for nxsched_set_affinity
* [#13896](https://github.com/apache/nuttx/pull/13896) sched/signal: change pthread_exit to nx_pthread_exit
* [#13934](https://github.com/apache/nuttx/pull/13934) sched/signal: Fix compilation errors for MSVC.
* [#14079](https://github.com/apache/nuttx/pull/14079) sched/spinlock: remove nesting spinlock support
* [#14454](https://github.com/apache/nuttx/pull/14454) sched/task_exit.c: Refresh current CPU instead of relying on stale value
* [#14402](https://github.com/apache/nuttx/pull/14402) sched/timer: Simplify setitimer implementation.
* [#14013](https://github.com/apache/nuttx/pull/14013) sched/wdog: Fix code style
* [#14003](https://github.com/apache/nuttx/pull/14003) sched/wdog: Revert wd_cancel semantics
* [#14629](https://github.com/apache/nuttx/pull/14629) sched/wqueue: fix work_notifier_setup() false failure
* [#14569](https://github.com/apache/nuttx/pull/14569) nuttx/semaphore: Move define CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h
* [#14129](https://github.com/apache/nuttx/pull/14129) nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling v…
* [#14581](https://github.com/apache/nuttx/pull/14581) pthread_cond remove csection  and sched_lock
* [#14786](https://github.com/apache/nuttx/pull/14786) pthread_cond_broadcast use wait_count for judement
* [#14626](https://github.com/apache/nuttx/pull/14626) pthread: remove enter_critical_section in pthread_barrier_wait
* [#14161](https://github.com/apache/nuttx/pull/14161) pthread: We should not directly include arch/spinlock.h
MM
* [#14314](https://github.com/apache/nuttx/pull/14314) Revert "mm/iob: Replace the critical section with spin lock"
* [#14370](https://github.com/apache/nuttx/pull/14370) `mempool` backtrace fix and de-init fix
* [#15060](https://github.com/apache/nuttx/pull/15060) mm_grantable.c: Fix infinite loop due to memory fragmentation
* [#14572](https://github.com/apache/nuttx/pull/14572) mm: Complete remaining unused macros instead of memory to fill tags
* [#14588](https://github.com/apache/nuttx/pull/14588) mm: fix tlsf compiler error
* [#13893](https://github.com/apache/nuttx/pull/13893) mm: Resolve a series of issues caused by opening the software tag kasan
* [#14858](https://github.com/apache/nuttx/pull/14858) mm/gran: Speed optimize gran_match
* [#13849](https://github.com/apache/nuttx/pull/13849) mm/heap: hold heap lock before access mm_nregions
* [#14054](https://github.com/apache/nuttx/pull/14054) mm/heap: memory alignment before executing kasan_register
* [#14764](https://github.com/apache/nuttx/pull/14764) mm/iob: remove csection
* [#14506](https://github.com/apache/nuttx/pull/14506) mm/kasan: extern kasan API only MM_KASAN is enabled
* [#14294](https://github.com/apache/nuttx/pull/14294) mm/Kconfig: adjust config options order and fix typos
* [#14105](https://github.com/apache/nuttx/pull/14105) mm/Kconfig: fix build error when MM_BACKTRACE > 0 and disable mempool
* [#14091](https://github.com/apache/nuttx/pull/14091) mm/kconfig: Remove unnecessary dependencies
* [#13891](https://github.com/apache/nuttx/pull/13891) mm/kconfig: set the default alignment of global variable out-of-bounds detection is 1
* [#14575](https://github.com/apache/nuttx/pull/14575) mm/mm_gran: fix compile warnings
* [#14144](https://github.com/apache/nuttx/pull/14144) mm/mm_heap: Optimizing heap performance changing the mm_size2ndx and…
* [#14547](https://github.com/apache/nuttx/pull/14547) mm/mm_memalign: add debugging log
* [#14114](https://github.com/apache/nuttx/pull/14114) mm/sw_tags: add config for no longer checking for tags 0
Libc
* [#14218](https://github.com/apache/nuttx/pull/14218) Revert "libc/atomic: decoupling atomic and spinlock to avoid recursion"
* [#14313](https://github.com/apache/nuttx/pull/14313) Revert "libs/libc:Openlibm adds exp10 and exp10f function implementat…
* [#14153](https://github.com/apache/nuttx/pull/14153) lib_memoryregion: fix the comments about the memory flags
* [#14799](https://github.com/apache/nuttx/pull/14799) lib_pathbuffer: change nxmutex -> spinlock
* [#14316](https://github.com/apache/nuttx/pull/14316) lib_stdoutstream:need return write size
* [#14148](https://github.com/apache/nuttx/pull/14148) lib_uuid_create: try use hardware random number generators first
* [#14292](https://github.com/apache/nuttx/pull/14292) lib/stdatomic: include stddef.h in atomic.h
* [#14661](https://github.com/apache/nuttx/pull/14661) libbuiltin: Simplify makefile writing
* [#14782](https://github.com/apache/nuttx/pull/14782) libbuiltin/kconfig: Modify coverage function dependencies
* [#14679](https://github.com/apache/nuttx/pull/14679) libbuiltin/Makefile: Modify the libbuiltin makefile to standard
* [#14715](https://github.com/apache/nuttx/pull/14715) libbuitin/compiler_rt: Supports separate builtin rt.builtins or rt.profile
* [#14451](https://github.com/apache/nuttx/pull/14451) libc string:Separate code.
* [#13969](https://github.com/apache/nuttx/pull/13969) libc: add CRC-8-ROHC support
* [#14296](https://github.com/apache/nuttx/pull/14296) libc: Add debug assert to prevent tls allocation failure
* [#14523](https://github.com/apache/nuttx/pull/14523) libc: Fix lib_arc4random.c:111:(.text.arc4random_buf+0x26): undefined reference to `clock_systime_ticks'
* [#14388](https://github.com/apache/nuttx/pull/14388) libc: Fix typo in libc/string/Kconfig.
* [#14365](https://github.com/apache/nuttx/pull/14365) libc: Make getcwd() work even CONFIG_DISABLE_ENVIRON is enabled
* [#14509](https://github.com/apache/nuttx/pull/14509) libc: Refine the arc4random_buf implementation
* [#14198](https://github.com/apache/nuttx/pull/14198) libc/atomic: decoupling atomic and spinlock to avoid recursion
* [#14057](https://github.com/apache/nuttx/pull/14057) libc/lib_utsname: Store version number for debugging and preventing optimization
* [#14753](https://github.com/apache/nuttx/pull/14753) libc/libc.csv: Fix signature of getpass
* [#14050](https://github.com/apache/nuttx/pull/14050) libc/machine: Fix the error caused by tag kasan
* [#14605](https://github.com/apache/nuttx/pull/14605) libc/machine/CMakeLists: should alaways build arch_atomic.c
* [#14798](https://github.com/apache/nuttx/pull/14798) libc/misc: do not sanitize backtrace_format
* [#14297](https://github.com/apache/nuttx/pull/14297) libc/modlib: Make modlib selectable from defconfig
* [#14154](https://github.com/apache/nuttx/pull/14154) libc/newlib:Declaration of adding depth
* [#15000](https://github.com/apache/nuttx/pull/15000) libc/puts: newline was omitted for empty string
* [#14589](https://github.com/apache/nuttx/pull/14589) libc/unistd: fixed tasking build issue
* [#14459](https://github.com/apache/nuttx/pull/14459) libcxx: fix compile error
* [#14431](https://github.com/apache/nuttx/pull/14431) libcxx: Ignore compile warnings.
* [#14244](https://github.com/apache/nuttx/pull/14244) libcxx: optional localization.
* [#15017](https://github.com/apache/nuttx/pull/15017) libcxx/CMakeLists.txt: Remove unnecessary flags.
* [#15057](https://github.com/apache/nuttx/pull/15057) libcxxabi: Soft link the libcxxabi header file to nuttx/include
* [#14884](https://github.com/apache/nuttx/pull/14884) libcxxmini: Add missing runtime related classes.
* [#15036](https://github.com/apache/nuttx/pull/15036) libm: Do not link the toolchain's libm unless explicitly selected
* [#15037](https://github.com/apache/nuttx/pull/15037) libm: Do not link the toolchain's libm unless explicitly selected [2]
* [#14783](https://github.com/apache/nuttx/pull/14783) libm: fix typo caused compile failed
* [#15022](https://github.com/apache/nuttx/pull/15022) libm/newlib: Add arch-specific source code first to CSRCS
* [#14101](https://github.com/apache/nuttx/pull/14101) libm/newlib: remove -Wno-maybe-uninitialized
* [#14838](https://github.com/apache/nuttx/pull/14838) libs: add gcov framework support
* [#14291](https://github.com/apache/nuttx/pull/14291) libs: remove lib_libbsprintf automatic line wrapping
* [#14570](https://github.com/apache/nuttx/pull/14570) libs/arch_libc:Add kasan protection for memset and other mm api
* [#14136](https://github.com/apache/nuttx/pull/14136) libs/libc: Optimize the stack space of lib_vsprintf by splitting argl…
* [#14142](https://github.com/apache/nuttx/pull/14142) libs/libc:Openlibm adds exp10 and exp10f function implementations
* [#13961](https://github.com/apache/nuttx/pull/13961) libs/libc/fdt/Make.defs: cannot move due to directory not empty bugfix
* [#14559](https://github.com/apache/nuttx/pull/14559) libs/libc/obstack: fix allocated chunk overrun due to invalid limit
* [#14328](https://github.com/apache/nuttx/pull/14328) libs/libxx: uClibc depends on CONFIG_ALLOW_GPL_COMPONENTS=y
* [#14284](https://github.com/apache/nuttx/pull/14284) libs/misc/memoryregion: remove unused memory_region
* [#14600](https://github.com/apache/nuttx/pull/14600) libs/modlib: Load data using `up_textheap_data_address`
* [#14364](https://github.com/apache/nuttx/pull/14364) libs/modlib.c: Set VMA for empty and unallocated sections
* [#14705](https://github.com/apache/nuttx/pull/14705) libs/uClibc++: Fix the Download URL for uClibc++
* [#14706](https://github.com/apache/nuttx/pull/14706) libs/uClibc++: Fix the Download URL for uClibc++ (CMake)
* [#13988](https://github.com/apache/nuttx/pull/13988) libs/x86_64:Add the setjmp/longjmp function
* [#14145](https://github.com/apache/nuttx/pull/14145) libs/xxx/CMakeLists.txt: add cmake compile support
* [#14668](https://github.com/apache/nuttx/pull/14668) libxx: All cxx libraries move down one level
* [#14471](https://github.com/apache/nuttx/pull/14471) libxx: C++ low level library select LIBSUPCXX by default.
* [#14250](https://github.com/apache/nuttx/pull/14250) libxx: Globally reference the header file of libcxxabi.
* [#14586](https://github.com/apache/nuttx/pull/14586) libxx/patch: Remove jira information and change-id 
* [#14238](https://github.com/apache/nuttx/pull/14238) nuttx/libc:Add _dl_find_object and dl_iterate_phdr function.
* [#14085](https://github.com/apache/nuttx/pull/14085) nuttx/libcxxtest: Fix build error.
Tools
* [#13959](https://github.com/apache/nuttx/pull/13959) [bugfix]checkpatch.sh:Fix checking for wrong cmake files
* [#13958](https://github.com/apache/nuttx/pull/13958) [bugfix]tools/mkdeps.c:add options for gen full path object target
* [#14723](https://github.com/apache/nuttx/pull/14723) [darwin] CI macos-14 : updated toolchains for macOS Apple Silicon
* [#14892](https://github.com/apache/nuttx/pull/14892) [MSYS2] CMake+Ninja Fix arm-none-eabi-ar: Argument list too long
* [#14539](https://github.com/apache/nuttx/pull/14539) toolchain/tasking: fix build break on tasking toolchain
* [#14620](https://github.com/apache/nuttx/pull/14620) toolchains: Compiler versioning adds --print-memory-usage
* [#14387](https://github.com/apache/nuttx/pull/14387) tools: fix parsetrace.py output
* [#14046](https://github.com/apache/nuttx/pull/14046) tools: gcov.sh supports generating device-side code coverage
* [#14289](https://github.com/apache/nuttx/pull/14289) tools: Rename apps-or-nuttx-Make.defs to Make.defs
* [#14399](https://github.com/apache/nuttx/pull/14399) tools/checkpatch: fix isort doesn't return error
* [#14691](https://github.com/apache/nuttx/pull/14691) tools/ci/platforms/darwin.sh: Port NuttX CI Job to macOS-14
* [#14121](https://github.com/apache/nuttx/pull/14121) tools/configure.sh: add relative path
* [#14438](https://github.com/apache/nuttx/pull/14438) tools/esp32s3/Config.mk: fix "printf:`\': invalid format character"
* [#14393](https://github.com/apache/nuttx/pull/14393) tools/esp32s3/Config.mk: fix "unterminated call to function" error
* [#14267](https://github.com/apache/nuttx/pull/14267) tools/espressif: add esptool version check to Espressif build system
* [#14933](https://github.com/apache/nuttx/pull/14933) tools/gdb: Add a singleton class for macros
* [#14902](https://github.com/apache/nuttx/pull/14902) tools/imx9: Add norimage support to bootloader
* [#14565](https://github.com/apache/nuttx/pull/14565) tools/mkdeps: increase MAX_BUFFER from 16384 to 65536
* [#14709](https://github.com/apache/nuttx/pull/14709) tools/rp2040: Building picotool if necessary
* [#14147](https://github.com/apache/nuttx/pull/14147) tools/showsize.sh: support pass custom nuttx executable
* [#14047](https://github.com/apache/nuttx/pull/14047) tools/Unix.mk: allow defconfig to overwrite old config
Various
* [#13919](https://github.com/apache/nuttx/pull/13919) OpenAMP Upgrade Part1: prepare for the OpenAMP Upgrade
* [#14155](https://github.com/apache/nuttx/pull/14155) openamp/libmetal: use config OPENAMP_CACHE to control lib metal cache…
* [#14843](https://github.com/apache/nuttx/pull/14843) GDB Plugin Upgrade Part1 - Thread related commands
* [#14851](https://github.com/apache/nuttx/pull/14851) GDB Plugin Upgrade part2: memory leak detection and other memory tools
* [#14854](https://github.com/apache/nuttx/pull/14854) GDB Plugin Upgrade part3: fs related tools
* [#14899](https://github.com/apache/nuttx/pull/14899) GDB Plugin Upgrade part4: net related tools
* [#14920](https://github.com/apache/nuttx/pull/14920) gdb/debug: add debugpy to debug python code
* [#14315](https://github.com/apache/nuttx/pull/14315) gdbserver.py optimization
* [#14486](https://github.com/apache/nuttx/pull/14486) gdbstub:remove ARCH_HAVE_DEBUG depends
* [#14789](https://github.com/apache/nuttx/pull/14789) gdbstub:typo fix
* [#13903](https://github.com/apache/nuttx/pull/13903) gdbstub:we can use uart to debug with gdb when crash
* [#14309](https://github.com/apache/nuttx/pull/14309) include: queue.h: Make flink clear after sq_rem
* [#14536](https://github.com/apache/nuttx/pull/14536) include/netinet/if_ether.h: add ethhdr definition
* [#14193](https://github.com/apache/nuttx/pull/14193) include/nuttx/arch.h: MSI alloc API should be always available
* [#15015](https://github.com/apache/nuttx/pull/15015) include/usbdev_trace: Fix argument number and return value of macro `usbtrace_enumerate()`
* [#14187](https://github.com/apache/nuttx/pull/14187) nuttx:move "#define STRINGIFY(x)" to nuttx/macro.h
* [#14537](https://github.com/apache/nuttx/pull/14537) nuttx/atomic.h:Add use condition for using stdatomic.h
* [#14233](https://github.com/apache/nuttx/pull/14233) nuttx/elf.h: Fix build error with unknown type name 'bool'.
* [#14665](https://github.com/apache/nuttx/pull/14665) nuttx/uorb.h: Add GNSS firmware version for `struct sensor_gnss`
* [#14913](https://github.com/apache/nuttx/pull/14913) nuttxgdb list function enhancement
* [#14916](https://github.com/apache/nuttx/pull/14916) nuttxgdb memory commands performance optimization
* [#15001](https://github.com/apache/nuttx/pull/15001) nuttxgdb minor fix
* [#14914](https://github.com/apache/nuttx/pull/14914) nuttxgdb net module update
* [#14912](https://github.com/apache/nuttx/pull/14912) nuttxgdb utils module update
* [#14915](https://github.com/apache/nuttx/pull/14915) nuttxgdb utils value update
* [#14919](https://github.com/apache/nuttx/pull/14919) nuttxgdb: add error hint to gdbinit
* [#14921](https://github.com/apache/nuttx/pull/14921) nuttxgdb: minor fix to diagnose command and thread module
* [#14976](https://github.com/apache/nuttx/pull/14976) nuttxgdb/rpmsg.py:dump rpmsg_service message
* [#14347](https://github.com/apache/nuttx/pull/14347) coredump bug fix
* [#14262](https://github.com/apache/nuttx/pull/14262) coredump: add architecture-specific registers dump including NVIC an…
* [#14485](https://github.com/apache/nuttx/pull/14485) coredump: coredump_add_memory_region need use flags
* [#14150](https://github.com/apache/nuttx/pull/14150) coredump: do not dump non-writeable memory segment
* [#14254](https://github.com/apache/nuttx/pull/14254) coredump: fix bug that memsegs got invalid value
* [#14295](https://github.com/apache/nuttx/pull/14295) coredump.c: del multiple behavior
* [#14553](https://github.com/apache/nuttx/pull/14553) coredump.py:bug fix python file not have rename
Build System
Improvements
* [#15053](https://github.com/apache/nuttx/pull/15053) kasan/globals: fix compile error
* [#15056](https://github.com/apache/nuttx/pull/15056) kasan/lto: Turn off lto by default anyway
* [#14327](https://github.com/apache/nuttx/pull/14327) clang: support gcov ARM LLVM clang supports code coverage detection
* [#14472](https://github.com/apache/nuttx/pull/14472) clang:libclang_rt.builtins-xxx.a supports builtin
* [#14637](https://github.com/apache/nuttx/pull/14637) clang/cmake: Fix clang cmake can't find libgcc align with makefile
* [#14877](https://github.com/apache/nuttx/pull/14877) Clang/gcov: Enhance clang gcov dump
* [#14544](https://github.com/apache/nuttx/pull/14544) clang/ld.lld: clang17's ld.lld and above support the option --print-memory-usage
* [#14095](https://github.com/apache/nuttx/pull/14095) common/Toolchain.defs: support CONFIG_DEBUG_NOOPT for x86_64
* [#14127](https://github.com/apache/nuttx/pull/14127) common/Toolchain.defs: support CONFIG_DEBUG_NOOPT for x86_64
* [#14123](https://github.com/apache/nuttx/pull/14123) Compile warning fix & header file adjust
* [#15032](https://github.com/apache/nuttx/pull/15032) gcc/gcov: Add instrumentation function
* [#14970](https://github.com/apache/nuttx/pull/14970) gcov: Add gcov gcc implementation and toolchain to ci compilation
* [#14890](https://github.com/apache/nuttx/pull/14890) gcov: Add toolchain gcov dependency option
* [#14946](https://github.com/apache/nuttx/pull/14946) gcov: Add usage documentation
* [#14538](https://github.com/apache/nuttx/pull/14538) gcov: Fix typographical errors
* [#14557](https://github.com/apache/nuttx/pull/14557) gcov: Support for the most streamlined profile of LLVM-embedded-toolchain-for-Arm
* [#13965](https://github.com/apache/nuttx/pull/13965) gcov:adjust gcov configuration name and delete non-existent dependencie
* [#14251](https://github.com/apache/nuttx/pull/14251) cmake: add newly added sources to cmake
* [#14615](https://github.com/apache/nuttx/pull/14615) cmake: don't include syslog files if CONFIG_SYSLOG=n
* [#14404](https://github.com/apache/nuttx/pull/14404) cmake: fix the fdiagnostics-color handle issue
* [#14401](https://github.com/apache/nuttx/pull/14401) cmake: Renamed savedefconfig with refreshsilent
* [#14756](https://github.com/apache/nuttx/pull/14756) cmake:bugfix kconfig menu in cmake cannot be generated recursively
* [#14592](https://github.com/apache/nuttx/pull/14592) cmake:implement CMake build of xtensa arch
* [#14576](https://github.com/apache/nuttx/pull/14576) cmake(bugfix): add host mkdeps&incdir tool CMake build and fix X86_64 compile error
* [#14206](https://github.com/apache/nuttx/pull/14206) cmake(bugfix):add dependencies for nuttx_post ensure time order
* [#14746](https://github.com/apache/nuttx/pull/14746) cmake(bugfix):add missing source file for driver/serial and keep romfs cmake intermediate 
* [#14607](https://github.com/apache/nuttx/pull/14607) cmake(bugfix):add xtensa libc machine function build
* [#14210](https://github.com/apache/nuttx/pull/14210) cmake(bugfix):disable proxy and service source in open-amp
* [#15064](https://github.com/apache/nuttx/pull/15064) cmake(bugfix):fix CMake build break on MacOS
* [#14703](https://github.com/apache/nuttx/pull/14703) cmake(bugfix):fix directory not being successfully added when adding romfs
* [#14780](https://github.com/apache/nuttx/pull/14780) cmake(bugfix):fix libcxx build error cause by layout changed
* [#14427](https://github.com/apache/nuttx/pull/14427) cmake(bugfix):Fixed the issue that the host toolchain version cannot be specified
* [#14624](https://github.com/apache/nuttx/pull/14624) cmake(bugfix):make sure the extra_lib only added once
* [#14757](https://github.com/apache/nuttx/pull/14757) cmake(bugfix):remove no need target_link_library in static target
* [#13971](https://github.com/apache/nuttx/pull/13971) cmake(bugfix):Synchronize the compilation differences between CMake and Makefile in nuttx repo
* [#14612](https://github.com/apache/nuttx/pull/14612) cmake(build):add the specified armclang compiler to the cmake  Toolchain file
* [#14265](https://github.com/apache/nuttx/pull/14265) cmake(clear warning):toolchain file do not need set parent scope
* [#14747](https://github.com/apache/nuttx/pull/14747) cmake(enhance):add NuttX CMake extensions module
* [#14907](https://github.com/apache/nuttx/pull/14907) cmake(enhance):enhance NuttX cmake target_dependencies and link_library modules
* [#15009](https://github.com/apache/nuttx/pull/15009) cmake(enhance):Enhance romfs so that RAWS files can be added in any location
* [#13955](https://github.com/apache/nuttx/pull/13955) cmake(Enhancement):enhance compile options for custom toolchainimplement the REVERSE opt of `add_compile_options()`
* [#14175](https://github.com/apache/nuttx/pull/14175) cmake(refine):fix cmake options typo and add EXTRA_FLAGS support
* [#13890](https://github.com/apache/nuttx/pull/13890) Cmake/kasan:  cmake supports multiple link global variables out of bounds
* [#14540](https://github.com/apache/nuttx/pull/14540) CMake/preprocess: fix typo PREPROCES -> PREPROCESS
Architectural Support
New Architecture Support
* [#14599](https://github.com/apache/nuttx/pull/14599) Adding STM32H5 arch files
* [#14831](https://github.com/apache/nuttx/pull/14831) Raspberry Pico 2 porting
Architecture Improvements
* [#13876](https://github.com/apache/nuttx/pull/13876) arch/irq: add the up_getusrpc macro to get the PC of the interrupted …
* [#14491](https://github.com/apache/nuttx/pull/14491) arch/Kconfig: remove ARCH_MATH_H if LIBCXX
* [#13967](https://github.com/apache/nuttx/pull/13967) arch/libc: Integrate vfork into fork and vfork directly call up_fork
* [#14058](https://github.com/apache/nuttx/pull/14058) arch/perf: modify the return value of up_perf_gettime to clock_t
* [#14779](https://github.com/apache/nuttx/pull/14779) arch/toolchain: Add toolchain gcc
* [#14170](https://github.com/apache/nuttx/pull/14170) Revert "nuttx/arch:Enabling ARCH_MATH_H is required when compiling sim with the 13.2 version of the toolchain"
* [#14803](https://github.com/apache/nuttx/pull/14803) arch_atomic : Introduce CONFIG_LIBC_ARCH_ATOMIC
* [#14827](https://github.com/apache/nuttx/pull/14827) arch_atomic: support nx atomic function
* [#14880](https://github.com/apache/nuttx/pull/14880) arch_atomic: use small lock in libs/libc/machine/arch_atomic.c
* [#14312](https://github.com/apache/nuttx/pull/14312) select ARM_HAVE_MVE and ARCH_HAVE_FPU for mps platform
ARM
* [#14221](https://github.com/apache/nuttx/pull/14221) Arm qemu
* [#14107](https://github.com/apache/nuttx/pull/14107) arm_gicv2_dump: optimize gic dump
* [#14434](https://github.com/apache/nuttx/pull/14434) arm: fix dataabort on qemu-armv7a:knsh
* [#14865](https://github.com/apache/nuttx/pull/14865) arm: remove up_set_current_regs/up_current_regs
* [#14134](https://github.com/apache/nuttx/pull/14134) arm/armv8-r: add implements of arm_get_mpid()
* [#14498](https://github.com/apache/nuttx/pull/14498) arm/armv8-r: fix unable to switch context in ISR context
* [#14496](https://github.com/apache/nuttx/pull/14496) arm/armv8-r: init HSCTLR and HACTLR for EL2
* [#14502](https://github.com/apache/nuttx/pull/14502) arm/armv8-r: optimize generic timer initialization
* [#14474](https://github.com/apache/nuttx/pull/14474) arm/build: suppress LOAD RWX linker warning
* [#14173](https://github.com/apache/nuttx/pull/14173) arm/cmake: fix cmake compile error
* [#14363](https://github.com/apache/nuttx/pull/14363) arm/cxd56: use chip specific vectors to allow smpcall update regs
* [#14846](https://github.com/apache/nuttx/pull/14846) arm/efm32: fix regression by PR#14810
* [#14503](https://github.com/apache/nuttx/pull/14503) arm/gicv3: replace this_cpu() to up_cpu_index()
* [#14219](https://github.com/apache/nuttx/pull/14219) arm/goldfish: add memory map for DDR region
* [#14959](https://github.com/apache/nuttx/pull/14959) arm/isr: move up_set_interrupt_context() to chip define
* [#14748](https://github.com/apache/nuttx/pull/14748) arm/olimex-stm32-p407: Fix kmodule board profile
* [#14712](https://github.com/apache/nuttx/pull/14712) arm/phy6222: Fix the garbled Linker Script
* [#14277](https://github.com/apache/nuttx/pull/14277) arm/riscv: remove redundant judgment
* [#14750](https://github.com/apache/nuttx/pull/14750) arm/rp2040: Add support for Waveshare RP2040 Zero board
* [#14197](https://github.com/apache/nuttx/pull/14197) arm/stm32f401rc-rs485: Add support to WS2812 addressable LED
* [#14887](https://github.com/apache/nuttx/pull/14887) armv6-m: fix the incorrect stub-function entry address of svc call
* [#14307](https://github.com/apache/nuttx/pull/14307) armv7-a:adjust gdb register order
* [#15058](https://github.com/apache/nuttx/pull/15058) armv7-a/armv7-r/armv8-r: percpu reg store this_task
* [#14301](https://github.com/apache/nuttx/pull/14301) armv8-m: set fpscr when do exception_direct
* [#14360](https://github.com/apache/nuttx/pull/14360) armv8-r/cp15: fix the problem of op1 operand confusion in ICC_SGI1R
* [#14160](https://github.com/apache/nuttx/pull/14160) armv8-r/gicv3: disable 64bits access gic 64bits registers
* [#14929](https://github.com/apache/nuttx/pull/14929) armv8-r/gicv3: support fiq
* [#14928](https://github.com/apache/nuttx/pull/14928) armv8-r/libc: optimize libc string apis with asm
* [#14495](https://github.com/apache/nuttx/pull/14495) armv8m/clang.cmake: add armv8m clang config
* [#13877](https://github.com/apache/nuttx/pull/13877) arch: fix the sched parameter update when exiting
* [#14135](https://github.com/apache/nuttx/pull/14135) arch: set current regs firstly in undefinedinsn
* [#13886](https://github.com/apache/nuttx/pull/13886) arch: support customized up_cpu_index() in AMP mode
* [#14881](https://github.com/apache/nuttx/pull/14881) arch/arm: syscall SYS_switch_context and SYS_restore_context use 0 para
* [#14264](https://github.com/apache/nuttx/pull/14264) arch/armv7:fix a typo
* [#13861](https://github.com/apache/nuttx/pull/13861) arch: cxd56xx: Add SD card 4-bit capability
* [#14847](https://github.com/apache/nuttx/pull/14847) arch: cxd56xx: Fix compile error of cxd56_gnss.c
* [#14842](https://github.com/apache/nuttx/pull/14842) arch: cxd56xx: Fix cxd56xx for SMP
* [#14993](https://github.com/apache/nuttx/pull/14993) arch: cxd56xx: use small lock in arch/arm/src/cxd56xx/cxd56_clock.c
* [#15031](https://github.com/apache/nuttx/pull/15031) arch: cxd56xx: use small lock in arch/arm/src/cxd56xx/cxd56_nxaudio_src.c
* [#15033](https://github.com/apache/nuttx/pull/15033) rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
* [#15062](https://github.com/apache/nuttx/pull/15062) s32k1xx_serial: arch/arm/src/s32k1xx/s32k1xx_serial.c
* [#14795](https://github.com/apache/nuttx/pull/14795) arch/arm/src/samv7/sam_afec.c: AFEC1 actually has 12 physical inputs
* [#14436](https://github.com/apache/nuttx/pull/14436) sam_sfc.c incorrect EFUSEIOC name used
* [#14322](https://github.com/apache/nuttx/pull/14322) SAMA5 fix compiler warning in sam_adc.c
* [#14128](https://github.com/apache/nuttx/pull/14128) SAMA5D2. Fix DEBUGASSERT triggered in sam_updhs.c
* [#15013](https://github.com/apache/nuttx/pull/15013) samv7: fix bytes to words calculation in user signature read
* [#14425](https://github.com/apache/nuttx/pull/14425) samv7: fix QSPI build
* [#14512](https://github.com/apache/nuttx/pull/14512) arch/arm/stm32: convert error to warning when CCM is not enabled
* [#13870](https://github.com/apache/nuttx/pull/13870) arch/arm/stm32{|f7}/socketcan: fix debugassert for extid frames
* [#14527](https://github.com/apache/nuttx/pull/14527) arch/arm/stm32/Kconfig: fix Kconfig error
* [#14534](https://github.com/apache/nuttx/pull/14534) arch/arm/stm32/stm32_dumpgpio.c: fix print warnings
* [#14768](https://github.com/apache/nuttx/pull/14768) arch/stm32h5: Add ADC hardware register file
* [#14860](https://github.com/apache/nuttx/pull/14860) arch/stm32h5: add basic ADC support
* [#14692](https://github.com/apache/nuttx/pull/14692) arch/stm32h5: Add ethernet hardware support files
* [#14883](https://github.com/apache/nuttx/pull/14883) arch/stm32h5: Add timer register hardware file
* [#14676](https://github.com/apache/nuttx/pull/14676) arch/stm32h5: H5 add ethernet options to Kconfig
* [#14813](https://github.com/apache/nuttx/pull/14813) arch/stm32h5: Simplify PLL configuration.
* [#14336](https://github.com/apache/nuttx/pull/14336) STM32G4 Flash Driver
* [#14769](https://github.com/apache/nuttx/pull/14769) STM32H5 I2C Driver
* [#14675](https://github.com/apache/nuttx/pull/14675) STM32H5 RCC Fixes
* [#15021](https://github.com/apache/nuttx/pull/15021) Add STM32H5 FDCAN Hardware File
* [#14515](https://github.com/apache/nuttx/pull/14515) arch/arm/stm32h7: add workaround for Renode
* [#14995](https://github.com/apache/nuttx/pull/14995) imxrt_serial: use small lock in arch/arm/src/imxrt/imxrt_serial.c
ARM64
* [#14770](https://github.com/apache/nuttx/pull/14770) Add arm64 support for gdbserver.py tool
* [#13978](https://github.com/apache/nuttx/pull/13978) Arm64 arch
* [#14280](https://github.com/apache/nuttx/pull/14280) Arm64 board
* [#13985](https://github.com/apache/nuttx/pull/13985) ARM64 bug fix
* [#14074](https://github.com/apache/nuttx/pull/14074) ARM64 CONTEXT REGS number is 36
* [#14940](https://github.com/apache/nuttx/pull/14940) arm64: change name saved_reg to saved_regs
* [#14991](https://github.com/apache/nuttx/pull/14991) arm64: change some format
* [#14829](https://github.com/apache/nuttx/pull/14829) arm64: fix compile failed 'tpidr_el1' undeclared
* [#14628](https://github.com/apache/nuttx/pull/14628) arm64: fix compile failed when build ELF apps
* [#14476](https://github.com/apache/nuttx/pull/14476) arm64: fix fvp smp faild to boot
* [#14171](https://github.com/apache/nuttx/pull/14171) arm64: fix the cmake break in kernel mode
* [#14980](https://github.com/apache/nuttx/pull/14980) arm64: remove g_running_tasks[this_cpu()] = NULL
* [#14824](https://github.com/apache/nuttx/pull/14824) arm64: remove unused code
* [#14905](https://github.com/apache/nuttx/pull/14905) arm64: remove up_set_current_regs/up_current_regs
* [#14911](https://github.com/apache/nuttx/pull/14911) arm64: syscall SYS_switch_context and SYS_restore_context use 0 para
* [#15026](https://github.com/apache/nuttx/pull/15026) arm64/imx8: fix build break
* [#14787](https://github.com/apache/nuttx/pull/14787) arm64/imx9: add imx93-evk ddr training
* [#15054](https://github.com/apache/nuttx/pull/15054) arm64/lto: Fix link error after opening lto
* [#14771](https://github.com/apache/nuttx/pull/14771) arm64/mcount.c: Add to nuttx compilation
* [#14978](https://github.com/apache/nuttx/pull/14978) arm64/mte: Add support for arm64 mte
* [#15029](https://github.com/apache/nuttx/pull/15029) arm64/qemu: Add 9pfs configuration
* [#14983](https://github.com/apache/nuttx/pull/14983) arm64/toolchain: Cmake alignment makefile writing
* [#15052](https://github.com/apache/nuttx/pull/15052) arm64/toolchain: Fix toolchain judgment after opening lto
* [#14470](https://github.com/apache/nuttx/pull/14470) arm64/toolchains:Add the following kasan compilation options
* [#14455](https://github.com/apache/nuttx/pull/14455) arhc/arm64: vector table may be far away form arm64_fatal_handle
* [#14648](https://github.com/apache/nuttx/pull/14648) arch/arm64: add have fork config
* [#14235](https://github.com/apache/nuttx/pull/14235) arch/arm64: add support to config SPI interrupt affinity routing to CPU0 by default
* [#14730](https://github.com/apache/nuttx/pull/14730) arch/arm64: bug fixarm64_fatal_handler need regs parms
* [#14247](https://github.com/apache/nuttx/pull/14247) arch/arm64: fix build warnings
* [#14689](https://github.com/apache/nuttx/pull/14689) arch/arm64: Optimized SGI to avoid VM exit.
* [#14381](https://github.com/apache/nuttx/pull/14381) arch/arm64: Remove arm64_copystate.c
* [#14242](https://github.com/apache/nuttx/pull/14242) arch/arm64: remove struct regs_context
* [#14063](https://github.com/apache/nuttx/pull/14063) arch/arm64: rename register names to align with arm32
* [#14739](https://github.com/apache/nuttx/pull/14739) arch/arm64: syscall SYS_switch_context and SYS_restore_context use tcb as parm
* [#14986](https://github.com/apache/nuttx/pull/14986) arch/arm64/imx9: Boot move mmu init to correct place
* [#14972](https://github.com/apache/nuttx/pull/14972) arch/arm64/imx9: Clear DMA channel interrupts on init
* [#14653](https://github.com/apache/nuttx/pull/14653) arch/arm64/imx9: Clear edma4 mux conf before set
* [#14868](https://github.com/apache/nuttx/pull/14868) arch/arm64/imx9: Fix cntrfrq_el0 to correct value
* [#14688](https://github.com/apache/nuttx/pull/14688) arch/arm64/imx9: Reset rx fifo in mode change
* [#14973](https://github.com/apache/nuttx/pull/14973) arch/arm64/imx9/imx9_flexspi: Replace memcpy by while loop
* [#14864](https://github.com/apache/nuttx/pull/14864) arch/arm64/imx9/lspi: improve spi initialization
* [#14671](https://github.com/apache/nuttx/pull/14671) arch/arm64/src/common/arm64_fatal.c: Fix compilation warning with -We…
* [#14577](https://github.com/apache/nuttx/pull/14577) arch/arm64/src/imx9/imx9_lpuart.c: Fix parity get in TCGETS
* [#14306](https://github.com/apache/nuttx/pull/14306) imx8qm-mek: Resolve boot issue for non-EL3 environments
* [#14684](https://github.com/apache/nuttx/pull/14684) Imx9 flexspi updates
* [#14870](https://github.com/apache/nuttx/pull/14870) Imx9 lpi2c fixes
* [#14478](https://github.com/apache/nuttx/pull/14478) Imx9 lpspi fixes
* [#14545](https://github.com/apache/nuttx/pull/14545) Imx9 uart cleanups and flow control
* [#14685](https://github.com/apache/nuttx/pull/14685) imx9/flexcan: Add disable/enable cycle
* [#14373](https://github.com/apache/nuttx/pull/14373) imx9/flexcan: Make self reception disable to be configurable
RISC_V
* [#14741](https://github.com/apache/nuttx/pull/14741) arch/risc-v: Add ARCH_HAVE_RAMFUNCS option for ESP32-C3
* [#14878](https://github.com/apache/nuttx/pull/14878) arch/risc-v: Minor document improvement
* [#14961](https://github.com/apache/nuttx/pull/14961) arch/risc-v/src/cmake/Toolchain.cmake: Msys2 CMake fixed nuttx/config.h: No such file or directory
* [#14841](https://github.com/apache/nuttx/pull/14841) arch/risc-v/src/mpfs/mpfs_irq.c: Default global interrupt priorities
* [#14329](https://github.com/apache/nuttx/pull/14329) arch/riscv: Add cpuid mapping (hartid↔cpuid)
* [#14994](https://github.com/apache/nuttx/pull/14994) MPFS boot enhancements
* [#14345](https://github.com/apache/nuttx/pull/14345) mpfs/opnsbi: refine config for for insufficient envm capacity
* [#14561](https://github.com/apache/nuttx/pull/14561) mpfs/smp: Add riscv_macros to mpfs_shead
* [#14326](https://github.com/apache/nuttx/pull/14326) mps/bringup: Add initialization of tmpfs
* [#14530](https://github.com/apache/nuttx/pull/14530) mps/clang: Add a defconfig for mps to support clang compilation
* [#14143](https://github.com/apache/nuttx/pull/14143) mps/cmake: add cmake build
* [#14305](https://github.com/apache/nuttx/pull/14305) mps2-an500: add missing source file
* [#14270](https://github.com/apache/nuttx/pull/14270) mps2-an521: remove the unnecessary -pipe build options
* [#14776](https://github.com/apache/nuttx/pull/14776) mps3-an547:ap: Disable cmd_wait() as it depends on procfs currently
* [#14398](https://github.com/apache/nuttx/pull/14398) ricv/riscv_cpuid: Return meaningful values for CPU/Hart ID when SMP=no
* [#14754](https://github.com/apache/nuttx/pull/14754) risc-v and xtensa Kconfig : Remove LIBC_ARCH_ATOMIC
* [#14984](https://github.com/apache/nuttx/pull/14984) risc-v: remove g_running_tasks[this_cpu()] = NULL
* [#14064](https://github.com/apache/nuttx/pull/14064) risc-v:Unify module compilation options
* [#14432](https://github.com/apache/nuttx/pull/14432) risc-v/esp32: Fixed path of File-system mount point 
* [#14563](https://github.com/apache/nuttx/pull/14563) risc-v/esp32c3: linker script fix for mcuboot and wifi usage 
* [#14020](https://github.com/apache/nuttx/pull/14020) risc-v/espressif: Fix alert message in `esp_setup_irq()`
* [#14201](https://github.com/apache/nuttx/pull/14201) risc-v/mpfs: enable DEFAULT_SMALL for insufficient envm capacity
* [#14857](https://github.com/apache/nuttx/pull/14857) risc-v/up_testset: Implement test-and-set with AMOSWAP
* [#14384](https://github.com/apache/nuttx/pull/14384) riscv_cpuindex.c: Fix usage of CONFIG_ARCH_RV_HARTID_BASE
* [#14379](https://github.com/apache/nuttx/pull/14379) riscv_cpustart.c: Fix reading of interrupt status
* [#14700](https://github.com/apache/nuttx/pull/14700) riscv_syscall.S: Fix a massive bug in syscall dispatch logic
* [#14962](https://github.com/apache/nuttx/pull/14962) riscv: remove up_set_current_regs/up_current_regs
* [#15030](https://github.com/apache/nuttx/pull/15030) riscv: Some judgments are missing
* [#14724](https://github.com/apache/nuttx/pull/14724) riscv: Suppress LOAD RWX linker warning
* [#14981](https://github.com/apache/nuttx/pull/14981) riscv: syscall SYS_switch_context and SYS_restore_context use 0 para
* [#14642](https://github.com/apache/nuttx/pull/14642) riscv/common/espressif: Fix spi slave driver
* [#14366](https://github.com/apache/nuttx/pull/14366) riscv/cpustart: Ensure we receive Soft IRQ / IPI before booting CPU
* [#14765](https://github.com/apache/nuttx/pull/14765) riscv/espressif/bootloader/mcuboot: Sign image with MCUBoot version
* [#14397](https://github.com/apache/nuttx/pull/14397) riscv/mpfs: Add boilerplate code for SMP
* [#14967](https://github.com/apache/nuttx/pull/14967) riscv/riscv_ipi.h: Do not write to CSR_MIP.MSIP as it is read-only
* [#14562](https://github.com/apache/nuttx/pull/14562) riscv/syscall: Fix sched_note instrumentation for BUILD_KERNEL
* [#14876](https://github.com/apache/nuttx/pull/14876) riscv/syscall.h: Update comment for syscall
SIM
* [#14466](https://github.com/apache/nuttx/pull/14466) nuttx/sim: Fix m64 build error.
* [#14647](https://github.com/apache/nuttx/pull/14647) nuttx/sim: Remove math.h in sim.
* [#14228](https://github.com/apache/nuttx/pull/14228) nuttx/sim:Remove asan check in up_irq_save().
* [#14826](https://github.com/apache/nuttx/pull/14826) Revert "sim/m64:Fix ld error."
* [#14850](https://github.com/apache/nuttx/pull/14850) Revert "sim/make: fix macos sim:nsh make break no -mcmodel in clang"
* [#14119](https://github.com/apache/nuttx/pull/14119) Revert "sim/note: add note related configuration"
* [#13878](https://github.com/apache/nuttx/pull/13878) sim bug fix
* [#14361](https://github.com/apache/nuttx/pull/14361) sim_camera: modify sim camera init videosize using imgsensor extend p…
* [#14449](https://github.com/apache/nuttx/pull/14449) sim_uart: rm LF to CRLF convertion
* [#14693](https://github.com/apache/nuttx/pull/14693) sim: add defconfig for testing cmake compilation of quickjs
* [#14587](https://github.com/apache/nuttx/pull/14587) sim: add note related configuration
* [#13966](https://github.com/apache/nuttx/pull/13966) sim: disable sim uart output processing
* [#14462](https://github.com/apache/nuttx/pull/14462) sim: fix asan address space conflict
* [#14109](https://github.com/apache/nuttx/pull/14109) sim: fix crash caused by function recursion
* [#14908](https://github.com/apache/nuttx/pull/14908) sim: Fix sim m32 start up crash issue.
* [#13933](https://github.com/apache/nuttx/pull/13933) sim: fix sim smp boot regression
* [#14024](https://github.com/apache/nuttx/pull/14024) sim: only POSIX implementation (ARCH_HAVE_MULTICPU) is provided
* [#14767](https://github.com/apache/nuttx/pull/14767) sim:nsh: Enable `PIPES` to make nsh pipeline available
* [#14658](https://github.com/apache/nuttx/pull/14658) sim(feat):support sim elf and dynamic libs package in post build
* [#14341](https://github.com/apache/nuttx/pull/14341) sim/alsa: add ptr check in _stop
* [#14343](https://github.com/apache/nuttx/pull/14343) sim/alsa: clear AUDIO_APB_FINAL flag before DEQUEUE
* [#14344](https://github.com/apache/nuttx/pull/14344) sim/alsa: fix runtime warning.
* [#14797](https://github.com/apache/nuttx/pull/14797) sim/configs/rpserver/rpproxy_virtio: Change the sim 32bit to 64bit compilation
* [#14348](https://github.com/apache/nuttx/pull/14348) sim/heap: malloc returns a valid pointer when allocating 0 bytes.
* [#14852](https://github.com/apache/nuttx/pull/14852) sim/m64: Fix ld error.
* [#14230](https://github.com/apache/nuttx/pull/14230) sim/m64:Fix ld error.
* [#14982](https://github.com/apache/nuttx/pull/14982) sim/nsh: enable SIM_HOSTFS by default
* [#14988](https://github.com/apache/nuttx/pull/14988) sim/tflm: add tflite-micro demo into ci build
* [#15007](https://github.com/apache/nuttx/pull/15007) sim/tflm: enable tflm hello world
* [#14440](https://github.com/apache/nuttx/pull/14440) arch/sim/cmake: remove the host specific -U when HOSTSRCS. remove the bzero implement use macro to memset
x86_64
* [#14957](https://github.com/apache/nuttx/pull/14957) Add kernel build support for X86_64
* [#14036](https://github.com/apache/nuttx/pull/14036) x64: add acrn ioapic init support
* [#14081](https://github.com/apache/nuttx/pull/14081) x64: modify addr limit to support 64 bits addr backtrace
* [#14073](https://github.com/apache/nuttx/pull/14073) X86_64: Add libcxx availability macros.
* [#14132](https://github.com/apache/nuttx/pull/14132) x86_64: align some code
* [#14633](https://github.com/apache/nuttx/pull/14633) x86_64: fix compile warning
* [#13888](https://github.com/apache/nuttx/pull/13888) x86_64: fix regression
* [#14035](https://github.com/apache/nuttx/pull/14035) x86_64:Fix ld error.
* [#14900](https://github.com/apache/nuttx/pull/14900) x86-64: Added KASan compilation options
* [#14885](https://github.com/apache/nuttx/pull/14885) x86: Support symbol table and kasan global variables cross-border detection
* [#14099](https://github.com/apache/nuttx/pull/14099) x86/x86_64: change the build result from nuttx.elf to nuttx
* [#14209](https://github.com/apache/nuttx/pull/14209) x86/x86_64:Adjust the position of the nm command to execute it after NuttX is generated
* [#13983](https://github.com/apache/nuttx/pull/13983) arch/x68_64: properly align ap boot stack for vector operations
* [#13973](https://github.com/apache/nuttx/pull/13973) arch/x86_64: add support for thread_local
* [#13937](https://github.com/apache/nuttx/pull/13937) arch/x86_64: Add vfork support
* [#14040](https://github.com/apache/nuttx/pull/14040) arch/x86_64: cache convert all asm() to __asm__()
* [#14019](https://github.com/apache/nuttx/pull/14019) arch/x86_64: cpuid expect 32 bit variables
* [#14087](https://github.com/apache/nuttx/pull/14087) arch/x86_64: Fix SMP startup for ACRN Hypervisor
* [#14178](https://github.com/apache/nuttx/pull/14178) arch/x86_64: Fix SMP startup for ACRN Hypervisor
* [#14045](https://github.com/apache/nuttx/pull/14045) arch/x86_64: Fix up_timer_start.
* [#14021](https://github.com/apache/nuttx/pull/14021) arch/x86_64: idle convert all asm() to __asm__()
* [#13989](https://github.com/apache/nuttx/pull/13989) arch/x86_64: Map the new page table with read-write permissions
* [#13982](https://github.com/apache/nuttx/pull/13982) arch/x86_64: Resolve weak symbol compilation relocation errors
* [#14350](https://github.com/apache/nuttx/pull/14350) arch/x86_64: Resolving NUC Boot Failure Issue
* [#14349](https://github.com/apache/nuttx/pull/14349) arch/x86_64: The AP retrieves this_task after storing the CPU private…
* [#13980](https://github.com/apache/nuttx/pull/13980) arch/x86_64:Add allsymbol functionality
* [#13939](https://github.com/apache/nuttx/pull/13939) arch/x86_64:Add check stack function
* [#14084](https://github.com/apache/nuttx/pull/14084) arch/x86_64:Add configuration to disable vectorization optimization
* [#14237](https://github.com/apache/nuttx/pull/14237) arch/x86_64:Add CXX configuration for enabling x86_64 support for C++ applications.
* [#14405](https://github.com/apache/nuttx/pull/14405) arch/x86_64:Add CXX configuration for enabling x86_64 support for C++…
* [#14056](https://github.com/apache/nuttx/pull/14056) arch/x86_64:Add macros related to CPUID
* [#14015](https://github.com/apache/nuttx/pull/14015) arch/x86_64:Add nanosecond delay interface to TSC
* [#14016](https://github.com/apache/nuttx/pull/14016) arch/x86_64:Add perf tool
* [#14111](https://github.com/apache/nuttx/pull/14111) arch/x86_64:Change extern g_intstackalloc to g_isrstackalloc
* [#14133](https://github.com/apache/nuttx/pull/14133) arch/x86_64:Code style is consistent
* [#13993](https://github.com/apache/nuttx/pull/13993) arch/x86_64:Configure arch delay using CONFIG_ALARM_ARCH
* [#14075](https://github.com/apache/nuttx/pull/14075) arch/x86_64:Fix build cxx warning.
* [#14473](https://github.com/apache/nuttx/pull/14473) arch/x86_64:Fix variable used before assignment
* [#14017](https://github.com/apache/nuttx/pull/14017) arch/x86_64:Use the checkstack function
* [#14955](https://github.com/apache/nuttx/pull/14955) arch/x86_64/intel64: fix revoke_low_memory
* [#14958](https://github.com/apache/nuttx/pull/14958) arch/x86_64/intel64: up_disable_irq should work from any CPU
* [#14060](https://github.com/apache/nuttx/pull/14060) arch/x86_64/intel64/intel64_irq.c: fix busy irq logic
* [#14245](https://github.com/apache/nuttx/pull/14245) arch/intel64: optimise context switch
* [#14793](https://github.com/apache/nuttx/pull/14793) intel64: add mutliboot framebuffer support
* [#14234](https://github.com/apache/nuttx/pull/14234) nuttx/x86_64:Add _sinit and _einit initialization.
XTENSA
* [#15055](https://github.com/apache/nuttx/pull/15055) xtensa: inline up_switch_context
* [#14964](https://github.com/apache/nuttx/pull/14964) xtensa: remove g_running_tasks[this_cpu()] = NULL
* [#14960](https://github.com/apache/nuttx/pull/14960) xtensa: remove up_set_current_regs/up_current_regs
* [#15010](https://github.com/apache/nuttx/pull/15010) xtensa: syscall SYS_switch_context and SYS_restore_context use 0 para
* [#14760](https://github.com/apache/nuttx/pull/14760) xtensa: use up_interrupt_context() to determine if in interrupt context
* [#14855](https://github.com/apache/nuttx/pull/14855) xtensa/esp32: Remove duplicate board Make.defs
* [#14541](https://github.com/apache/nuttx/pull/14541) xtensa/esp32s3: add esp32s3 reset reasons interface
* [#14215](https://github.com/apache/nuttx/pull/14215) xtensa/esp32s3: add support for getting country code
* [#14542](https://github.com/apache/nuttx/pull/14542) xtensa/esp32s3: enable encrypted flag based on partition and device
* [#13991](https://github.com/apache/nuttx/pull/13991) xtensa/esp32s3: fix missing peripheral initialization for watchdog timer
* [#14214](https://github.com/apache/nuttx/pull/14214) xtensa/esp32s3: inspect if partition mapped as text
* [#14701](https://github.com/apache/nuttx/pull/14701) arch/esp32s3: lcd add fb pandisplay
* [#14963](https://github.com/apache/nuttx/pull/14963) nuttx/arch: remove the custom board check in up_testset implementation
* [#14088](https://github.com/apache/nuttx/pull/14088) nuttx/arch:Enabling ARCH_MATH_H is required when compiling sim with the 13.2 version of the toolchain
* [#14805](https://github.com/apache/nuttx/pull/14805) arch/xtensa: use arch atomic when enable iram heap
Driver Support
New Driver Support
* [#14358](https://github.com/apache/nuttx/pull/14358) drivers/power/battery: add charge/battery health interface support
* [#13880](https://github.com/apache/nuttx/pull/13880) Add goldfish timer driver support
* [#14895](https://github.com/apache/nuttx/pull/14895) draft driver for STUSB4500
Drivers With Improvements
* [#13925](https://github.com/apache/nuttx/pull/13925) driver: add GOLDFISH_GPU_FB_PRIORITY for goldfish_gpu_fb_vsync_thread
* [#14194](https://github.com/apache/nuttx/pull/14194) driver/i2c/ipcc: Post sempahore only when it's value is smaller than one
* [#14510](https://github.com/apache/nuttx/pull/14510) driver/serial: remove return value of up_putc()
* [#14603](https://github.com/apache/nuttx/pull/14603) drivers: Fix the missing headers.
* [#14817](https://github.com/apache/nuttx/pull/14817) drivers/adc: Rename up_ads1255initialize to ads1255_initialize
* [#15011](https://github.com/apache/nuttx/pull/15011) drivers/audio/wm8994.c: Include nuttx/arch.h to fix compilation (up_m…
* [#13979](https://github.com/apache/nuttx/pull/13979) drivers/battery: Fix Goldfish Battery x64 unresponsive interrupt issue
* [#13911](https://github.com/apache/nuttx/pull/13911) drivers/coresight: ETM4 set up
* [#13947](https://github.com/apache/nuttx/pull/13947) drivers/devicetree/fdt: get 'reg' property
* [#13916](https://github.com/apache/nuttx/pull/13916) drivers/fb: use ENOTTY to replace assert
* [#14790](https://github.com/apache/nuttx/pull/14790) Drivers/input
* [#14177](https://github.com/apache/nuttx/pull/14177) drivers/input: fix complie err about undefined
* [#14728](https://github.com/apache/nuttx/pull/14728) drivers/misc: fix rpmsg dev poll assert crash
* [#14729](https://github.com/apache/nuttx/pull/14729) drivers/misc: fix rpmsgdev read overflow
* [#15047](https://github.com/apache/nuttx/pull/15047) drivers/net: change netdev_lower_quota_load to macro
* [#13860](https://github.com/apache/nuttx/pull/13860) drivers/net: Register "/dev/net/tun" as tun node too
* [#13872](https://github.com/apache/nuttx/pull/13872) drivers/note: suport rpmsg transfer channel for notesome note api
* [#14185](https://github.com/apache/nuttx/pull/14185) drivers/optee: Return error if optee_recv return prematurely
* [#14165](https://github.com/apache/nuttx/pull/14165) drivers/pci: fix pci framework warning in 32bit chip
* [#14248](https://github.com/apache/nuttx/pull/14248) drivers/rpmsgdev: support get more battery info by rpmsgdev
* [#14078](https://github.com/apache/nuttx/pull/14078) drivers/rptun: minor fix about rptun
* [#14256](https://github.com/apache/nuttx/pull/14256) drivers/segger: inline note_sysview_get_timestamp
* [#14979](https://github.com/apache/nuttx/pull/14979) drivers/sensors/gnss: Add suffix to macro of geofence index
* [#14999](https://github.com/apache/nuttx/pull/14999) drivers/sensors/gnss: Different nbuffer for each topic
* [#14298](https://github.com/apache/nuttx/pull/14298) drivers/serial: fix cmsdk serial driver warning
* [#14411](https://github.com/apache/nuttx/pull/14411) drivers/spi_slave: call SPIS_DEV_NOTIFY when rx or tx complete for all spi slave driver
* [#14810](https://github.com/apache/nuttx/pull/14810) drivers/syslog: remove implement of syslog_putc()
* [#15038](https://github.com/apache/nuttx/pull/15038) drivers/timers: export arch timer api to support higher resolution
* [#13992](https://github.com/apache/nuttx/pull/13992) drivers/timers:Arch_alarm and arch_timer add up_ndelay interface
* [#14304](https://github.com/apache/nuttx/pull/14304) audio: add offload underflow msg state
* [#14342](https://github.com/apache/nuttx/pull/14342) audio: remove started from audio_complete
* [#14385](https://github.com/apache/nuttx/pull/14385) bluetooth: Fix the incompatibility made by https://github.com/apache/nuttx/pull/14224
* [#14549](https://github.com/apache/nuttx/pull/14549) Bluetooth: improved pairing process and host layer now successfully receives ACL packets
* [#14224](https://github.com/apache/nuttx/pull/14224) bluetooth: upload bt local bug fix and features
* [#14985](https://github.com/apache/nuttx/pull/14985) bt_atomic: use atomic macro to replace wireless/bluetooth/bt_atomic.c
* [#13943](https://github.com/apache/nuttx/pull/13943) misc/assert: add backtrace dump support for mutex hold task
* [#13952](https://github.com/apache/nuttx/pull/13952) misc/dev_mem: fix compile error in aarch64
* [#13981](https://github.com/apache/nuttx/pull/13981) misc/rpmsgdev: fix block mode read/write bug in rpmsgdev
* [#14076](https://github.com/apache/nuttx/pull/14076) misc/rpmsgdev: The private data should be freed only when endpoint is released
* [#13874](https://github.com/apache/nuttx/pull/13874) mmcsd: add multi partitions prototype implementation
* [#14293](https://github.com/apache/nuttx/pull/14293) mmcsd: add multi partitions support
* [#13990](https://github.com/apache/nuttx/pull/13990) mmcsd: refine emmc capacity calculate
* [#14492](https://github.com/apache/nuttx/pull/14492) mmcsd: SDIO_CAPS_4BIT_ONLY set buswidth MMCSD_SCR_BUSWIDTH_4BIT
* [#14266](https://github.com/apache/nuttx/pull/14266) mmcsd:add postsleep fields for mmc_ioc_cmd
* [#14249](https://github.com/apache/nuttx/pull/14249) mmcsd:add reset card to idle state (CMD0) support
* [#14246](https://github.com/apache/nuttx/pull/14246) mmcsd:add STATUS_SEND (CMD13) support
* [#14113](https://github.com/apache/nuttx/pull/14113) note enhance
* [#13948](https://github.com/apache/nuttx/pull/13948) note: change sched_note_counter to a macro
* [#14926](https://github.com/apache/nuttx/pull/14926) note: Remove enter_critical_section from the sched_note module
* [#13949](https://github.com/apache/nuttx/pull/13949) note: support asynchronous sched_note_printf output
* [#13892](https://github.com/apache/nuttx/pull/13892) notesnap_driver.c: modify struct notesnap_s member type
* [#14382](https://github.com/apache/nuttx/pull/14382) nuttx ai driver update
* [#14009](https://github.com/apache/nuttx/pull/14009) nuttx/drivers: add ept_release_cb for destroy server resource
* [#14207](https://github.com/apache/nuttx/pull/14207) nuttx/can: support to Send message priority sorting function.
* [#14096](https://github.com/apache/nuttx/pull/14096) nuttx/can.h: support timestamp for can frame.
* [#13866](https://github.com/apache/nuttx/pull/13866) Rpmsg fs: rpmsgfs bug fix and enhancement
* [#14023](https://github.com/apache/nuttx/pull/14023) Rpmsg ping: improve the rpmsg ping
* [#13887](https://github.com/apache/nuttx/pull/13887) rpmsg services: should release the tx buffer when rpmsg_send_nocopy failed
* [#13853](https://github.com/apache/nuttx/pull/13853) Rpmsg syslog: update rpmsg syslog
* [#14077](https://github.com/apache/nuttx/pull/14077) Rpmsg virtio: update rpmsg virtio and add sim config to verify rpmsg virtio
* [#14106](https://github.com/apache/nuttx/pull/14106) rpmsg_port_spi_slave: fix compile error when enable RPMSG_PORT_SPI_SL…
* [#14118](https://github.com/apache/nuttx/pull/14118) rpmsg_sockif: add some modifaction for rpsocket
* [#13854](https://github.com/apache/nuttx/pull/13854) rpmsgblk.c: fix compile warning
* [#13851](https://github.com/apache/nuttx/pull/13851) rptun: Remove include/nuttx/rptun/openamp.h
* [#15008](https://github.com/apache/nuttx/pull/15008) video/fb: fix integer overflow issue
* [#15043](https://github.com/apache/nuttx/pull/15043) virtio: Add virtio version check
* [#15074](https://github.com/apache/nuttx/pull/15074) virtio: fix compile error
* [#15045](https://github.com/apache/nuttx/pull/15045) virtio: Fix the problem of incorrect setting of virtio queue address under label kasan
* [#15061](https://github.com/apache/nuttx/pull/15061) wm8776: use small lock in drivers/audio/wm8776.c
* [#13945](https://github.com/apache/nuttx/pull/13945) usensor.c:fix container_of member error.
* [#14258](https://github.com/apache/nuttx/pull/14258) usb: Fix issue with the calculation descriptor length error
* [#13960](https://github.com/apache/nuttx/pull/13960) usb: If usb3.0 set the ep0 sssize to cfgdescsize
* [#13920](https://github.com/apache/nuttx/pull/13920) usbdev/cdcacm: Fix read queue counter in shutdown
* [#14033](https://github.com/apache/nuttx/pull/14033) uart_16550:fix bug regincr is used multiple times
* [#13871](https://github.com/apache/nuttx/pull/13871) uart_rpmsg: some bugs fixed
* [#13879](https://github.com/apache/nuttx/pull/13879) timer & nx_start small bug fix
* [#14571](https://github.com/apache/nuttx/pull/14571) timer_create:Checks whether the signo provided by the user is valid
* [#14619](https://github.com/apache/nuttx/pull/14619) timers: Replace DEBUGASSERT with the error code reopen from #12484
* [#14722](https://github.com/apache/nuttx/pull/14722) SYSLOG_DEFAULT: wrap up_putc/up_nputs calls with critical section
* [#14362](https://github.com/apache/nuttx/pull/14362) syslog: convert \n to \r\n in syslog framework layer
* [#14456](https://github.com/apache/nuttx/pull/14456) syslog: Don't allow blocking when in signal handler
* [#14421](https://github.com/apache/nuttx/pull/14421) syslog: enable LF to CRLF config as default
* [#14409](https://github.com/apache/nuttx/pull/14409) syslog: fix ramlog not work issue with cmake
* [#14874](https://github.com/apache/nuttx/pull/14874) syslog.rst: mention the correct kconfig option
* [#13994](https://github.com/apache/nuttx/pull/13994) support syslog redirection to sched_note
* [#14212](https://github.com/apache/nuttx/pull/14212) serial: remove 'TIOCSLINID'
* [#14104](https://github.com/apache/nuttx/pull/14104) serial: use nxsig_tgkill instead of nxsig_kill
* [#13914](https://github.com/apache/nuttx/pull/13914) serial:update some bug fixand functional improvements
Board Support
New Board Support
* [#14659](https://github.com/apache/nuttx/pull/14659) NSH support for Nucleo-H563ZI.
Boards With Improvements
* [#13908](https://github.com/apache/nuttx/pull/13908) board_reset: flush cache before reset
* [#14520](https://github.com/apache/nuttx/pull/14520) board: refresh boards after update LIBCANUTILS dependency
* [#13895](https://github.com/apache/nuttx/pull/13895) board/arm/nrf52: fix use up_interrupt_context to is_nesting_interrupt
* [#15025](https://github.com/apache/nuttx/pull/15025) board/nucleo-h563zi: Add HSE option
* [#14162](https://github.com/apache/nuttx/pull/14162) board/qemu-armv7a: use fdt_virtio_mmio_devices_register() to register mmio devices
* [#14287](https://github.com/apache/nuttx/pull/14287) boards: Enable LTO option for same70-xplained/mcuboot-loader
* [#15070](https://github.com/apache/nuttx/pull/15070) boards: Update configs about system/usbmsc
* [#14839](https://github.com/apache/nuttx/pull/14839) boards/arm/stm32/nucleo-f4x1re/src/stm32_adc.c: fix typo
* [#14840](https://github.com/apache/nuttx/pull/14840) boards/arm/stm32/nucleo-f4x1re/stm32_adc.c: remove dependency on AJOYSTICK
* [#14439](https://github.com/apache/nuttx/pull/14439) boards/arm/stm32f7: fix nucleo boards break for cmake
* [#14437](https://github.com/apache/nuttx/pull/14437) boards/arm/stm32f7: removed extra endif() from cmakefile for nucleo-f746zg nucleo-f722ze nucleo-f767zi
* [#14414](https://github.com/apache/nuttx/pull/14414) boards/arm/stm32f7: separate nucleo-144 board into individual boards
* [#13976](https://github.com/apache/nuttx/pull/13976) stm32f429i-disco: disable TM32_FB_CMAP
* [#14225](https://github.com/apache/nuttx/pull/14225) stm32f4discovery/testlibcxx: Enable tls to fix build error.
* [#14223](https://github.com/apache/nuttx/pull/14223) boards/arm64: Add an impls section to the link script
* [#14687](https://github.com/apache/nuttx/pull/14687) boards/arm64/imx9/imx93-evk: add trdc header
* [#14720](https://github.com/apache/nuttx/pull/14720) boards/esp32c3-legacy: Add missing include to esp32c3_boot.c
* [#14947](https://github.com/apache/nuttx/pull/14947) boards/esp32s3: Add ESP32-S3-WROOM-1-N8R8 depends for ESP32S3_DEVKIT
* [#14481](https://github.com/apache/nuttx/pull/14481) boards/esp32s3: Merge MCUboot and "simple-boot" linker scripts
* [#15027](https://github.com/apache/nuttx/pull/15027) boards/mte: Dependencies changed so need to delete it now
* [#14708](https://github.com/apache/nuttx/pull/14708) boards/nucleo-f302r8: fix LED1 pin
* [#14408](https://github.com/apache/nuttx/pull/14408) boards/nucleo-l432kc: Add internal DAC code.
* [#14055](https://github.com/apache/nuttx/pull/14055) boards/qemu: Open kasan on qemu
* [#15012](https://github.com/apache/nuttx/pull/15012) boards/qemu64:  Deleted test program of kasantest config
* [#14482](https://github.com/apache/nuttx/pull/14482) boards/risc-v: Remove ref to riscv_internal.h
* [#14261](https://github.com/apache/nuttx/pull/14261) boards/same70-xplained: refine config for insufficient flash capacity
* [#14853](https://github.com/apache/nuttx/pull/14853) boards/stm32: split nucleo-f4x1re into separate boards
* [#14762](https://github.com/apache/nuttx/pull/14762) boards/stm32f103-minimum: fix unaligned pointer to .data section in ld.script
* [#13915](https://github.com/apache/nuttx/pull/13915) boards/stm32f7/stm32f746g-disco: fix FMC pin
* [#14791](https://github.com/apache/nuttx/pull/14791) boards/x86_64/intel64/qemu-intel64: add jumbo configuration
* [#14949](https://github.com/apache/nuttx/pull/14949) boards/xtensa/esp32s3: Treat return value that greater than zero as succ
* [#14508](https://github.com/apache/nuttx/pull/14508) esp32: Fix a heap corruption bug with SPIRAM
* [#14068](https://github.com/apache/nuttx/pull/14068) esp32[c3]: Add BLE support
* [#14213](https://github.com/apache/nuttx/pull/14213) ESP32C6-DevKit C/M Add necessary Import to compilation
* [#14442](https://github.com/apache/nuttx/pull/14442) esp32c6-devkit: Remove -Werror to fix compile error
* [#14871](https://github.com/apache/nuttx/pull/14871) esp32s3_partition.c: Appease a compiler warning (-Wdiscarded-qualifiers)
* [#14832](https://github.com/apache/nuttx/pull/14832) esp32s3-devkit doc: Update the procedure after simple boot
* [#14906](https://github.com/apache/nuttx/pull/14906) esp32s3-devkit: Add configuration for ADB
* [#15003](https://github.com/apache/nuttx/pull/15003) esp32s3-devkit/usbmsc: Add bind for MTD
* [#14975](https://github.com/apache/nuttx/pull/14975) esp32s3: don't clear pending interrupts on eg. up_putc
* [#14501](https://github.com/apache/nuttx/pull/14501) esp32s3: Increase the init task stask size when using NSH
* [#14942](https://github.com/apache/nuttx/pull/14942) espressif/mcpwm: fix compile error
File System
Improvements
* [#14071](https://github.com/apache/nuttx/pull/14071) binfmt/libelf: Fix return code
* [#14039](https://github.com/apache/nuttx/pull/14039) fs poll optimize
* [#14752](https://github.com/apache/nuttx/pull/14752) fs_automount:fix ci break
* [#14184](https://github.com/apache/nuttx/pull/14184) fs_file.c: modify files_countlist comments
* [#14137](https://github.com/apache/nuttx/pull/14137) fs_heap_strdup/asprintf
* [#13907](https://github.com/apache/nuttx/pull/13907) fs_open:Adjust the definition of the open path
* [#14461](https://github.com/apache/nuttx/pull/14461) fs: add fs_heap_strndup replace strndup with fs_heap_strndup
* [#14673](https://github.com/apache/nuttx/pull/14673) fs: add merge partitions support
* [#13926](https://github.com/apache/nuttx/pull/13926) fs: fix compile break
* [#14609](https://github.com/apache/nuttx/pull/14609) fs: Fix mtd/sector512.c:554:19: error: incomplete definition of type 'struct partition_info_s'
* [#13928](https://github.com/apache/nuttx/pull/13928) fs: fix wrong config for FS_SHMFS
* [#14903](https://github.com/apache/nuttx/pull/14903) fs/littlefs: Add a kconfig to override littlefs version
* [#14935](https://github.com/apache/nuttx/pull/14935) fs/littlefs: make CONFIG_FS_LITTLEFS_VERSION include the "v" prefix
* [#14956](https://github.com/apache/nuttx/pull/14956) fs/littlefs: stop applying local patches for unknown versions of littlefs
* [#14445](https://github.com/apache/nuttx/pull/14445) fs/mnemofs: Add logs to bind and unbind.
* [#14463](https://github.com/apache/nuttx/pull/14463) fs/mnemofs: Fix extra log unused value error.
* [#14533](https://github.com/apache/nuttx/pull/14533) fs/mnemofs: Fix mkdir for depth > 3 bug better logs
* [#14604](https://github.com/apache/nuttx/pull/14604) fs/mnemofs: Fix open and rmdir return value and seek out of bounds.
* [#14528](https://github.com/apache/nuttx/pull/14528) fs/nfs: fix offset in append mode and attributes after create
* [#14429](https://github.com/apache/nuttx/pull/14429) fs/nxffs: Fix syslog formats compile error
* [#14948](https://github.com/apache/nuttx/pull/14948) fs/partition/txtable: Fix panic when no txtable was found in last eraseblock
* [#14763](https://github.com/apache/nuttx/pull/14763) fs/procfs: The procfsversion should be under control of `FS_PROCFS_EXCLUDE_VERSION`
* [#14359](https://github.com/apache/nuttx/pull/14359) fs/rpmsgfs[bug fix]: return real err value when open failed
* [#13931](https://github.com/apache/nuttx/pull/13931) fs/semaphore: fix a minor issue with goto label
* [#14582](https://github.com/apache/nuttx/pull/14582) fs/shm: support shm_open with flags O_TRUNC
* [#13929](https://github.com/apache/nuttx/pull/13929) fs/vfs: Avoid calling stat with oldrelpath twice in mountptrename
* [#14702](https://github.com/apache/nuttx/pull/14702) fs/vfs: Fix initialization of `g_pseudofile_ops`
* [#13918](https://github.com/apache/nuttx/pull/13918) nuttx/fs:Rename node with inode.
* [#13900](https://github.com/apache/nuttx/pull/13900) zipfs:zipfs not need mtd drivers
Networking
Improvements
* [#14535](https://github.com/apache/nuttx/pull/14535) arp.h: make struct arpreq four-byte aligned
* [#14556](https://github.com/apache/nuttx/pull/14556) arp.h: make struct arpreq four-byte aligned
* [#14650](https://github.com/apache/nuttx/pull/14650) net: fix inet #14634 regression
* [#14634](https://github.com/apache/nuttx/pull/14634) net: inet.h match inet_sockif.c definition
* [#14886](https://github.com/apache/nuttx/pull/14886) net: Move NET_TCP/UDP_HAVE_STACK to netconfig.h
* [#14727](https://github.com/apache/nuttx/pull/14727) net:Compatible with cellular network cards of lladdr generation
* [#14092](https://github.com/apache/nuttx/pull/14092) net/can: Save simple options to socket_conn_s
* [#14643](https://github.com/apache/nuttx/pull/14643) net/igc: Support Intel I226V.
* [#14018](https://github.com/apache/nuttx/pull/14018) net/local: fix the return address is incorrect when accept
* [#14447](https://github.com/apache/nuttx/pull/14447) net/local: fix used after free
* [#14630](https://github.com/apache/nuttx/pull/14630) net/netlink: fix netlink poll return value on success
* [#13905](https://github.com/apache/nuttx/pull/13905) net/rpmsg: add SO_SNDBUF and SO_RCVBUF support
* [#14573](https://github.com/apache/nuttx/pull/14573) net/rpmsg: Don't set POLLHUP if rpmsg channel has not been established
* [#14216](https://github.com/apache/nuttx/pull/14216) net/tcp: Reset the conn when receiving a ACK in the SYN_SENT state.
* [#14529](https://github.com/apache/nuttx/pull/14529) net/usrsock: usrsock supports offload netlink
* [#14163](https://github.com/apache/nuttx/pull/14163) net/vsock: add AF_VSOCK address family
* [#14138](https://github.com/apache/nuttx/pull/14138) netdb: fix may add duplicate DNS servers
* [#14192](https://github.com/apache/nuttx/pull/14192) netdev:In netdev_defaultIf there is only one loopback network devices it returns NULL
* [#14636](https://github.com/apache/nuttx/pull/14636) netinet/if_ether.h: move #define ETH_XXX into if_ether.h
* [#13859](https://github.com/apache/nuttx/pull/13859) Netlink minor fix
* [#14554](https://github.com/apache/nuttx/pull/14554) DNS: Implement TCP fallback
* [#14867](https://github.com/apache/nuttx/pull/14867) IPV6 macro
* [#13906](https://github.com/apache/nuttx/pull/13906) local_sock: fix accept use-after-free
* [#14103](https://github.com/apache/nuttx/pull/14103) local_socket: corrent send/recv return value after shutdown
* [#14574](https://github.com/apache/nuttx/pull/14574) tcp_input: if tcp->req > recvreq send ack only when state is TCP_ESTABLISHED
* [#14698](https://github.com/apache/nuttx/pull/14698) tcp: fix tcp can not retransmit timely when ACK with TCP_NEWDATA
* [#14595](https://github.com/apache/nuttx/pull/14595) sys/socket: fix struct sockaddr_storage alignment issue
Unsorted
* [#14278](https://github.com/apache/nuttx/pull/14278) add  lin status changes the format of the reported frame and add the …
* [#14112](https://github.com/apache/nuttx/pull/14112) add #define CPU_SETSIZE in sched.h
* [#14332](https://github.com/apache/nuttx/pull/14332) add a flag of lin internal sleep/wakeup state
* [#14303](https://github.com/apache/nuttx/pull/14303) Add AI engine driver for heterogeneous NPU backends.
* [#13904](https://github.com/apache/nuttx/pull/13904) Add base64 support to coredump to reduce syslog output size
* [#14130](https://github.com/apache/nuttx/pull/14130) Add GCCVER define to Toolchain.
* [#13999](https://github.com/apache/nuttx/pull/13999) add gprof support
* [#13847](https://github.com/apache/nuttx/pull/13847) Add heap note support
* [#14339](https://github.com/apache/nuttx/pull/14339) Add imx9 socketcan
* [#14125](https://github.com/apache/nuttx/pull/14125) add lin error flags to lin.h
* [#14801](https://github.com/apache/nuttx/pull/14801) add spinlock_type.h and use small lock to protect filelist
* [#14321](https://github.com/apache/nuttx/pull/14321) Add strptime
* [#13964](https://github.com/apache/nuttx/pull/13964) Add support fchstat and chstat  function for littlefs
* [#14866](https://github.com/apache/nuttx/pull/14866) Add tls cleanup to protect tcp
* [#14951](https://github.com/apache/nuttx/pull/14951) Add TXTABLE support for esp32s3
* [#14966](https://github.com/apache/nuttx/pull/14966) Add USB MSC support for esp32s3
* [#13951](https://github.com/apache/nuttx/pull/13951) Adding partitioning support for OTA
* [#15035](https://github.com/apache/nuttx/pull/15035) addrenv: Ensure that the transmission parameter of addrenv_switch is not NULL
* [#14859](https://github.com/apache/nuttx/pull/14859) addrenv/addrenv.c: Use atomic_ functions to handle the reference counter
* [#14065](https://github.com/apache/nuttx/pull/14065) assert: change the do-while of assert to a conditional expression
* [#14879](https://github.com/apache/nuttx/pull/14879) assert: in assert we use small spinlock replace enter_critical_section
* [#14353](https://github.com/apache/nuttx/pull/14353) bug/fix: Makefile expression error caused
* [#14420](https://github.com/apache/nuttx/pull/14420) Bugfix/fix esp spi slave receive data
* [#14211](https://github.com/apache/nuttx/pull/14211) Bugfix/samv7 rswdt
* [#13865](https://github.com/apache/nuttx/pull/13865) cache: do cache_invalidate_all before enable dcache
* [#14809](https://github.com/apache/nuttx/pull/14809) can/sja100: leave critical section properly
* [#13953](https://github.com/apache/nuttx/pull/13953) case SIOCGIWNAME: add filter out non-802.11 interfaces
* [#14241](https://github.com/apache/nuttx/pull/14241) Change the judgment of GCCVER version to greater equal.
* [#14182](https://github.com/apache/nuttx/pull/14182) Changed the i3c_priv_xfer's member to flags from rnw
* [#14300](https://github.com/apache/nuttx/pull/14300) circbuf: fix circbuf_get_read/writeptr return *size = 0 when circbuf full
* [#13848](https://github.com/apache/nuttx/pull/13848) circbuf: Move from mm/circbuf to libs/libc/misc
* [#14713](https://github.com/apache/nuttx/pull/14713) com/can: Remove unnecessary judgment logic
* [#15051](https://github.com/apache/nuttx/pull/15051) configs: Add defconfigs for esp-sparrow-kit
* [#14131](https://github.com/apache/nuttx/pull/14131) Contributing and PR template fix.
* [#14792](https://github.com/apache/nuttx/pull/14792) cosmetic changes in drivers/pci and drivers/sensors
* [#14179](https://github.com/apache/nuttx/pull/14179) cpuinfo: Decouple the fetch cpuinfo from up_perf_getfreq
* [#14997](https://github.com/apache/nuttx/pull/14997) crashdump change to choice add coredump to mtd support based on mtdout stream.
* [#14674](https://github.com/apache/nuttx/pull/14674) crypto/se05x: Allow set_enable_pin to be NULL and fix error handling
* [#13899](https://github.com/apache/nuttx/pull/13899) Deadlock detect fix
* [#15042](https://github.com/apache/nuttx/pull/15042) debug symbol level: Use config instead
* [#14378](https://github.com/apache/nuttx/pull/14378) Discourage the use of LIBC_PRINT_EXTENSION
* [#14094](https://github.com/apache/nuttx/pull/14094) dump more information when CONFIG_MM_DUMP_DETAILS_ON_FAILURE enabled flush log before coredump
* [#13902](https://github.com/apache/nuttx/pull/13902) e1000: add polling mode support for tx/rx
* [#14646](https://github.com/apache/nuttx/pull/14646) Enable DEV_PIPE_NPOLLWAITERS default value 4 for adapte APP
* [#14318](https://github.com/apache/nuttx/pull/14318) Expand samplerate bits from 8 to 32 enchance encode capacity in sim offload.
* [#14310](https://github.com/apache/nuttx/pull/14310) external/ffmpeg: add offloding audio recording with amr format.
* [#13867](https://github.com/apache/nuttx/pull/13867) Fdt mmio: add common fdt mmio virtio device register function
* [#14591](https://github.com/apache/nuttx/pull/14591) Feature/esp i2c bitbang
* [#14590](https://github.com/apache/nuttx/pull/14590) Feature/esp spi bitbang
* [#14008](https://github.com/apache/nuttx/pull/14008) Feature/esp temp sensor uorb support
* [#14597](https://github.com/apache/nuttx/pull/14597) file_readv_compat/file_writev_compat: Fix partial success handling
* [#13921](https://github.com/apache/nuttx/pull/13921) files_getlist:Handling the situation when tcb's grouplist is empty
* [#15019](https://github.com/apache/nuttx/pull/15019) First commit of STM32H5 SPI Hardware file.
* [#13875](https://github.com/apache/nuttx/pull/13875) Fix #13873
* [#14861](https://github.com/apache/nuttx/pull/14861) Fix ALIGN_UP duplicate definition error
* [#14396](https://github.com/apache/nuttx/pull/14396) fix bmi160 some issue
* [#14938](https://github.com/apache/nuttx/pull/14938) fix build error
* [#14392](https://github.com/apache/nuttx/pull/14392) fix build error shift-count-overflow
* [#14500](https://github.com/apache/nuttx/pull/14500) Fix CDCNCM driver printf formatter compiler warning
* [#14945](https://github.com/apache/nuttx/pull/14945) Fix compilation errors
* [#15004](https://github.com/apache/nuttx/pull/15004) Fix compile error
* [#15014](https://github.com/apache/nuttx/pull/15014) fix compile error
* [#14716](https://github.com/apache/nuttx/pull/14716) fix compiler error when CONFIG_CLOCK_TIMEKEEPING=y
* [#14552](https://github.com/apache/nuttx/pull/14552) Fix config repeat define in include deconfig mode
* [#14356](https://github.com/apache/nuttx/pull/14356) Fix disable msi when msi capability not exist issue
* [#14610](https://github.com/apache/nuttx/pull/14610) Fix Error: implicit declaration of function 'enter_critical_section'
* [#14433](https://github.com/apache/nuttx/pull/14433) fix GCCVER cmake define.
* [#14188](https://github.com/apache/nuttx/pull/14188) fix igmp group issue
* [#14453](https://github.com/apache/nuttx/pull/14453) Fix Kconfig style
* [#14882](https://github.com/apache/nuttx/pull/14882) Fix Kconfig style
* [#14606](https://github.com/apache/nuttx/pull/14606) fix macos sim nsh break fix no -mcmodel=medium in clang.
* [#14422](https://github.com/apache/nuttx/pull/14422) Fix make warn as error in pci drivers
* [#14820](https://github.com/apache/nuttx/pull/14820) Fix minor ld script error
* [#14965](https://github.com/apache/nuttx/pull/14965) fix nxstyle
* [#14977](https://github.com/apache/nuttx/pull/14977) fix nxstyle
* [#14944](https://github.com/apache/nuttx/pull/14944) Fix path Error
* [#14971](https://github.com/apache/nuttx/pull/14971) Fix path error
* [#14611](https://github.com/apache/nuttx/pull/14611) fix regression caused by remove sync pause
* [#14001](https://github.com/apache/nuttx/pull/14001) fix runtime pm pm_wakelock_uninit problem decrease charger log regulator possible no action when boot
* [#13917](https://github.com/apache/nuttx/pull/13917) fix snprintf truncation warnings
* [#14458](https://github.com/apache/nuttx/pull/14458) Fix some build error
* [#14925](https://github.com/apache/nuttx/pull/14925) fix some build error
* [#14837](https://github.com/apache/nuttx/pull/14837) fix some comment in https://github.com/apache/nuttx/pull/14764
* [#13909](https://github.com/apache/nuttx/pull/13909) Fix some compile warnings in net directory
* [#14873](https://github.com/apache/nuttx/pull/14873) Fix some minor style issues
* [#14677](https://github.com/apache/nuttx/pull/14677) Fix STM32H5 Serial APB Clock Sources
* [#14108](https://github.com/apache/nuttx/pull/14108) Fix system crash when set CONFIG_PRIORITY_INHERITANCE=y
* [#14818](https://github.com/apache/nuttx/pull/14818) Fix timers/arch_alarm.c:109:3: error: 'now' may be used uninitialized
* [#13977](https://github.com/apache/nuttx/pull/13977) Fix to compile parameters not taking effect When cmake version is greater than 3.18
* [#14072](https://github.com/apache/nuttx/pull/14072) fix typo error
* [#14737](https://github.com/apache/nuttx/pull/14737) Fix typo errors in include/nuttx/clock.h
* [#14489](https://github.com/apache/nuttx/pull/14489) Fix xtensa build error with choice LIBSUPCXX by default.
* [#14828](https://github.com/apache/nuttx/pull/14828) fix: remove duplicated statistics of upd.drop
* [#14889](https://github.com/apache/nuttx/pull/14889) fix(rp2350): should copy data before init clock
* [#15024](https://github.com/apache/nuttx/pull/15024) float.h: Define FLT_ROUNDS if not defined by toolchain previously
* [#14869](https://github.com/apache/nuttx/pull/14869) getifaddrs support returning multiple IPv6 addresses
* [#14037](https://github.com/apache/nuttx/pull/14037) Getline support backspace
* [#14232](https://github.com/apache/nuttx/pull/14232) gnu++20:fix ld error.
* [#14098](https://github.com/apache/nuttx/pull/14098) goldfish add gicv2m support
* [#14090](https://github.com/apache/nuttx/pull/14090) goldfish fix forget clear interrrpt add in cmake
* [#14122](https://github.com/apache/nuttx/pull/14122) goldfish: sync with qemu do rpmsg_syslog init at goldfish
* [#14725](https://github.com/apache/nuttx/pull/14725) gprof: Add a configuration dependency
* [#14740](https://github.com/apache/nuttx/pull/14740) gprof: move gprof function from sched to libbuiltin/libgcc
* [#14717](https://github.com/apache/nuttx/pull/14717) GreenHills Support: add __ARM_ARCH __ARM_FEATURE_DSP macro definition when build with ghs compiler
* [#14825](https://github.com/apache/nuttx/pull/14825) GreenHills support: add thumb mode detection support for ghs compiler
* [#14269](https://github.com/apache/nuttx/pull/14269) greenhills support: fix the build warning with ghs compiler
* [#14719](https://github.com/apache/nuttx/pull/14719) GreenHills support: fix the naked_function attr cannot handle warning with old version GHS compiler
* [#14718](https://github.com/apache/nuttx/pull/14718) GreenHills support: fix the naked_function function non-compatible issue with arm_svcall
* [#14836](https://github.com/apache/nuttx/pull/14836) group_signal_handler: Remove a redundant check
* [#13944](https://github.com/apache/nuttx/pull/13944) group: access group in critical section
* [#14766](https://github.com/apache/nuttx/pull/14766) icjx: disable interrupts in interrupt worker
* [#14443](https://github.com/apache/nuttx/pull/14443) Implement ADC driver interface for MCP3008
* [#14285](https://github.com/apache/nuttx/pull/14285) Implement Position-Independent-Code (PIC) loading
* [#14812](https://github.com/apache/nuttx/pull/14812) in smp_call handle we only change TCB_FLAG_CPU_LOCKED bit of tcb->flag
* [#13869](https://github.com/apache/nuttx/pull/13869) inotify: support truncate and close calls
* [#15002](https://github.com/apache/nuttx/pull/15002) install kconfiglib using apt repo
* [#14567](https://github.com/apache/nuttx/pull/14567) irq: force inline up_interrupt_context
* [#14199](https://github.com/apache/nuttx/pull/14199) irq: irq_attach_wqueue replace irq_attach_thread
* [#14856](https://github.com/apache/nuttx/pull/14856) irq/irq.h: Remove extern of non-existent global
* [#14686](https://github.com/apache/nuttx/pull/14686) isrthread: add configuring the stack of an isrthread as static
* [#14452](https://github.com/apache/nuttx/pull/14452) kconfig: Add link parameters that can print remaining memory information
* [#14325](https://github.com/apache/nuttx/pull/14325) Kconfig:Add an option to disable compilation of floating point
* [#15005](https://github.com/apache/nuttx/pull/15005) lc823450_usbdev: use small lock in arch/arm/src/lc823450/lc823450_usbdev.c
* [#14893](https://github.com/apache/nuttx/pull/14893) lm3s6965-ek/qemu: Using default max command line length
* [#14000](https://github.com/apache/nuttx/pull/14000) long double need use the format of 'Lf'
* [#14635](https://github.com/apache/nuttx/pull/14635) macos: fix “sed: -I or -i may not be used with stdin”
* [#15048](https://github.com/apache/nuttx/pull/15048) make arm-v6/7/8m compatible with signal delivery inside irq handler
* [#14696](https://github.com/apache/nuttx/pull/14696) makefile/build: Delete unnecessary bin and kbin folders
* [#14049](https://github.com/apache/nuttx/pull/14049) makefile/clang: Compare versions for upward compatibility
* [#13864](https://github.com/apache/nuttx/pull/13864) math: remove is_power_of_2() keep IS_POWER_OF_2()
* [#15006](https://github.com/apache/nuttx/pull/15006) max32660_wdt: use small lock in arch/arm/src/max326xx/max32660/max32660_wdt.c
* [#13898](https://github.com/apache/nuttx/pull/13898) Memory delay free kasan error fix and  memory note fix
* [#14146](https://github.com/apache/nuttx/pull/14146) mempool: add the minimum size configuration of mempool
* [#14410](https://github.com/apache/nuttx/pull/14410) merge some nrf52 configurations into one 
* [#14821](https://github.com/apache/nuttx/pull/14821) minor code refactor
* [#14617](https://github.com/apache/nuttx/pull/14617) Minor improve blkoutstream and mtdoutstream
* [#14334](https://github.com/apache/nuttx/pull/14334) modify for set conn status with connected when receive event USRSOCK_EVENT_SENDTO_READY
* [#14205](https://github.com/apache/nuttx/pull/14205) modlib:bug fixallow 64bit elf load and if sym is NULL not load symbol
* [#14732](https://github.com/apache/nuttx/pull/14732) modlib:need add ctors to init_array and dtors to fini_array
* [#14383](https://github.com/apache/nuttx/pull/14383) modlib/modlib_symbols.c: Fix usage of void* arithmetics
* [#14990](https://github.com/apache/nuttx/pull/14990) mps3an547 doc update
* [#13927](https://github.com/apache/nuttx/pull/13927) mq: correct inode release in mq_inode_release()
* [#14654](https://github.com/apache/nuttx/pull/14654) msys2: fix make[3]: warning: jobserver unavailable: using -j1.
* [#14189](https://github.com/apache/nuttx/pull/14189) mtd/nvs: Trigger recovery process in nvs_startup
* [#14053](https://github.com/apache/nuttx/pull/14053) nuttx-names.in: add feof
* [#14468](https://github.com/apache/nuttx/pull/14468) nuttx: Add LIBSUPCXX_TOOLCHAIN to link the prebuilt library provide by toolchain.
* [#14543](https://github.com/apache/nuttx/pull/14543) nuttx: Fix build warning with can't found xt-g++
* [#14721](https://github.com/apache/nuttx/pull/14721) nuttx/qemu: Fix funciton up_idle multiple definition
* [#13923](https://github.com/apache/nuttx/pull/13923) Pci bugfix
* [#13963](https://github.com/apache/nuttx/pull/13963) Pci fixbugs
* [#14969](https://github.com/apache/nuttx/pull/14969) Pci io
* [#14124](https://github.com/apache/nuttx/pull/14124) pci_ivshmem.c: ivshmem_support_irq API support
* [#15071](https://github.com/apache/nuttx/pull/15071) pci: fix pci dev alloc bridge mem error
* [#13897](https://github.com/apache/nuttx/pull/13897) pci: msi and msix irq need release irq
* [#14126](https://github.com/apache/nuttx/pull/14126) pci.h: add pci_write/read_mmio_qword support
* [#14097](https://github.com/apache/nuttx/pull/14097) PFU: do not cause execution of any instructions to be trapped
* [#14621](https://github.com/apache/nuttx/pull/14621) Pico SDK version bump + assimilate old READMEs into RST
* [#14904](https://github.com/apache/nuttx/pull/14904) Publish GDB Plugin as a standard python package
* [#14253](https://github.com/apache/nuttx/pull/14253) Py code check update
* [#13850](https://github.com/apache/nuttx/pull/13850) qemu & goldfish update
* [#14505](https://github.com/apache/nuttx/pull/14505) qemu-intel64: Fixes the linker 'noexecstack' warning
* [#14423](https://github.com/apache/nuttx/pull/14423) ramlog: Remove RAMLOG_CRLF config and related code
* [#14733](https://github.com/apache/nuttx/pull/14733) rammtd:add rammtd_uninitialize
* [#13912](https://github.com/apache/nuttx/pull/13912) release msi/msix irq clean capability struct
* [#14736](https://github.com/apache/nuttx/pull/14736) Remove "dumprun" functions from various LCD drivers
* [#14649](https://github.com/apache/nuttx/pull/14649) Remove all jira and changeid information from the kernel
* [#15050](https://github.com/apache/nuttx/pull/15050) Remove FAR from 32/64bit arch
* [#14450](https://github.com/apache/nuttx/pull/14450) Remove ndelay_accurate
* [#14613](https://github.com/apache/nuttx/pull/14613) remove nxsched_lock_irq/nxsched_unlock_irq
* [#15046](https://github.com/apache/nuttx/pull/15046) remove redundant judgments *running_task != NULL
* [#14974](https://github.com/apache/nuttx/pull/14974) remove redundant scheduling records
* [#14814](https://github.com/apache/nuttx/pull/14814) remove sched_lock in pthread_cond_broadcast
* [#14469](https://github.com/apache/nuttx/pull/14469) remove unused variable 'cpu_freq'
* [#14475](https://github.com/apache/nuttx/pull/14475) remove unused variable 'cpu_freq'
* [#13863](https://github.com/apache/nuttx/pull/13863) remove up_cpu_pause up_cpu_resume up_cpu_paused up_cpu_pausereq
* [#14596](https://github.com/apache/nuttx/pull/14596) remove up_current_regs in common code
* [#14608](https://github.com/apache/nuttx/pull/14608) Replace __attribute__((packed)) with [begin|end]_packed_struct
* [#14751](https://github.com/apache/nuttx/pull/14751) Revert "SYSLOG_DEFAULT: wrap up_putc/up_nputs calls with critical sec…
* [#14806](https://github.com/apache/nuttx/pull/14806) Revert "system: pthread_barrierwait should be moved to kernel space"
* [#14338](https://github.com/apache/nuttx/pull/14338) Revert "Update esptool version on docs and build system"
* [#14180](https://github.com/apache/nuttx/pull/14180) sdio_probe: set voltage use CMD5
* [#14802](https://github.com/apache/nuttx/pull/14802) segger/stream_rtt: fix warning after stream update
* [#14465](https://github.com/apache/nuttx/pull/14465) sem: change sem wait to atomic operation
* [#14152](https://github.com/apache/nuttx/pull/14152) setjmp: fix setjmp returns 0 when calling longjmp with 0 as the secon…
* [#14276](https://github.com/apache/nuttx/pull/14276) shm:fix build error
* [#14524](https://github.com/apache/nuttx/pull/14524) Shmfs bug fix
* [#14822](https://github.com/apache/nuttx/pull/14822) Simplify PCI driver configuration
* [#14656](https://github.com/apache/nuttx/pull/14656) smpcall: add nxsched_smp_call_async and nxsched_smp_call_single_async
* [#14663](https://github.com/apache/nuttx/pull/14663) smpcall: we directly call the function to handle local smpcall
* [#14337](https://github.com/apache/nuttx/pull/14337) Socketcan fixes
* [#14346](https://github.com/apache/nuttx/pull/14346) socketpair.c:Replace kmm with fs heap
* [#14927](https://github.com/apache/nuttx/pull/14927) spelling: fix spelling typo premption -> preemption
* [#14939](https://github.com/apache/nuttx/pull/14939) spinlock: remove recursive locks with write_lock_irqsave/read_lock_irqsave
* [#14931](https://github.com/apache/nuttx/pull/14931) spinlock: use spin_lock_init replace spin_initialize
* [#14989](https://github.com/apache/nuttx/pull/14989) st7789: add configuration option to set default background color
* [#14924](https://github.com/apache/nuttx/pull/14924) stream_getc: use lib_stream_eof instead of EOF
* [#14844](https://github.com/apache/nuttx/pull/14844) Support enabling/disabling attr attribute in littlefs for nuttx
* [#14678](https://github.com/apache/nuttx/pull/14678) Support for the Seeed Studio XIAO SAMD21
* [#14093](https://github.com/apache/nuttx/pull/14093) Support note print in Segger Sysview terminal
* [#13910](https://github.com/apache/nuttx/pull/13910) Support shutdown
* [#14168](https://github.com/apache/nuttx/pull/14168) support trace_beginex and trace_endex
* [#14196](https://github.com/apache/nuttx/pull/14196) systick:when isr_handle is NULL will be crash.
* [#14483](https://github.com/apache/nuttx/pull/14483) task_exit.c: Add missing sched_note_stop()
* [#13924](https://github.com/apache/nuttx/pull/13924) This patch is to allow the application layer to use ioctl to send can/lin status control information to the driver layer.
* [#14156](https://github.com/apache/nuttx/pull/14156) tlsr82/nsh: set LIBC_RAND_ORDER be 0 to fix compile error
* [#13852](https://github.com/apache/nuttx/pull/13852) unify MODULE & ELF flag to Toolchain.defs
* [#14100](https://github.com/apache/nuttx/pull/14100) Unify the code of libelf and modlib and delete the implementation of libelf
* [#14159](https://github.com/apache/nuttx/pull/14159) Unify the definition of GCCVER and remove duplicate code.
* [#14848](https://github.com/apache/nuttx/pull/14848) Unify the linking options for 32-bit and 64-bit to text-segment=0x3000000.
* [#14707](https://github.com/apache/nuttx/pull/14707) Update BOARD_USExxx naming input clock selection and setting of HSIDIV
* [#15067](https://github.com/apache/nuttx/pull/15067) Update cdc.h to fix typo in the comments
* [#14283](https://github.com/apache/nuttx/pull/14283) update defconfig
* [#14120](https://github.com/apache/nuttx/pull/14120) Update esptool version on docs and build system
* [#14794](https://github.com/apache/nuttx/pull/14794) update Intel64 and PCI documentation
* [#14778](https://github.com/apache/nuttx/pull/14778) update stream relative fix mtd&blk stream readback before block update. decrese int use in stream to handle FS_LARGEFILE
* [#13889](https://github.com/apache/nuttx/pull/13889) update the mm dump relative add orphan & biggest dump feature.
* [#13913](https://github.com/apache/nuttx/pull/13913) Upgrade openamp and libmetal to last commit
* [#14255](https://github.com/apache/nuttx/pull/14255) Use BACKTRACE_BUFFER_SIZE to declare backtrace buffer
* [#14517](https://github.com/apache/nuttx/pull/14517) Use memalign to align share memory to CPU cache line size
* [#14632](https://github.com/apache/nuttx/pull/14632) Use pathbuffer reduce stack
* [#14181](https://github.com/apache/nuttx/pull/14181) use r1-r3 as tmp register
* [#14930](https://github.com/apache/nuttx/pull/14930) use spin_lock_wo_note replace spin_lock in csection
* [#14351](https://github.com/apache/nuttx/pull/14351) userspace: Exclude nuttx/arch.h
* [#14953](https://github.com/apache/nuttx/pull/14953) Various improvements for e1000 and igc
* [#14279](https://github.com/apache/nuttx/pull/14279) vsprintf:fix bug when print int64 0x8000000000000000
* [#14499](https://github.com/apache/nuttx/pull/14499) when COMPILE_OPTIONS is not set skip the REMOVE_ITEM in ${HOSTSRCS} fix msvc reported case.

View file

@ -1,6 +1,5 @@
=======================================
``ina226`` Current/Power Monitor INA226
``ina226`` Current/Power Monitor INA219
=======================================
This is a simple infinite loop that polls the ``INA226`` sensor and displays the
measurements.
TODO

View file

@ -1,84 +0,0 @@
=============================
``Python`` Python interpreter
=============================
This guide explains how to run Python on NuttX.
*Yes, you heard it right*. **Python on NuttX**. This is a port of the `CPython <https://github.com/python/cpython>`_ repository for NuttX.
The `CPython` repository is the reference implementation of the Python programming language.
It is written in C and is the most widely used Python interpreter.
.. warning::
Python for NuttX is still in the experimental stage (thus, it requires ``CONFIG_EXPERIMENTAL`` to be enabled)
It is not fully functional for all the architectures and configurations.
Please check this `issue <https://github.com/apache/nuttx-apps/issues/2884>`_ in the `nuttx-apps <https://github.com/apache/nuttx-apps/>`_ repository to know the current status.
How Does it Work?
=================
1. Python for NuttX target initially the ``rv-virt`` (RISC-V QEMU) board.
2. Python modules are stored in `pyc <https://docs.python.org/3/glossary.html#term-bytecode>`_ (byte-code format) and are loaded from a ROMFS image at startup.
3. Environment variables like ``PYTHONHOME`` and ``PYTHON_BASIC_REPL`` need to be set accordingly.
Building Python NuttX
=====================
Use the ``rv-virt:python`` config to build Python for NuttX. Note that the CMake scripts don't work for this configuration. For now, please use the makefile build instead:
.. code:: console
$ cd nuttx
$ make distclean
$ ./tools/configure.sh rv-virt:python
$ make -j$(nproc)
$ ls -l nuttx
This will generate a ``nutxx`` binary. This file can be run using the RISC-V QEMU.
Try Python in NSH
=================
Before running the RISC-V QEMU, create a raw disk image with the following command:
.. code:: console
$ dd if=/dev/zero of=./mydisk-1gb.img bs=1M count=1024
Then, run RISC-V QEMU with the following command:
.. code:: console
$ qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp 8 \
-global virtio-mmio.force-legacy=false \
-device virtio-serial-device,bus=virtio-mmio-bus.0 \
-chardev socket,telnet=on,host=127.0.0.1,port=3450,server=on,wait=off,id=foo \
-device virtconsole,chardev=foo \
-device virtio-rng-device,bus=virtio-mmio-bus.1 \
-netdev user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001 \
-device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.2 \
-drive file=./mydisk-1gb.img,if=none,format=raw,id=hd \
-device virtio-blk-device,bus=virtio-mmio-bus.3,drive=hd \
-bios none -kernel ./nuttx -nographic
ABC[ 0.062131] board_userled: LED 1 set to 0
[ 0.063269] board_userled: LED 2 set to 0
[ 0.063367] board_userled: LED 3 set to 0
telnetd [4:100]
NuttShell (NSH) NuttX-10.4.0
nsh> python_mount_modules
Mounting ROMFS filesystem at target=/usr/local/lib/ with source=/dev/ram1
nsh> export PYTHONHOME /usr/local
nsh> export PYTHON_BASIC_REPL 1
nsh> python
Python 3.13.0 (main, Dec 4 2024, 17:00:42) [GCC 13.2.0] on nuttx
Type "help", "copyright", "credits" or "license" for more information.
>>>
Demo
----
Check the following `asciinema <https://asciinema.org/>`_ demo to see how to run Python on NuttX. You can copy and paste the commands from the demo to try it yourself.
.. image:: https://asciinema.org/a/bYYy1fyIOQ3hOY4lJ7L3WFcNb.svg
:target: https://asciinema.org/a/bYYy1fyIOQ3hOY4lJ7L3WFcNb

View file

@ -7,12 +7,9 @@ It also can be used to run a tests to verify that the vendor's tools are properl
Its primary purpose is to gather information that can be used to debug problems and ease the process of reporting bugs for uninexperienced users.
This tool uses a Python script (``nuttx/tools/host_info_dump.py``) to gather information about the host system during build and a C
This tool uses a Python script (``apps/tools/host_sysinfo.py``) to gather information about the host system during build and a C
program to gather information about the NuttX system and display all available information. For more information about the python
script, check the command line options and code comments of ``host_info_dump.py``.
Alternatively, ``host_info`` target can be used without enabling nxdiag application and reflashing to get information about system.
Target can work after configuration step and prints information about the NuttX and host systems.
script, check the command line options and code comments of ``host_sysinfo.py``.
.. note:: Nxdiag requires Python 3.6 or later. On Linux distributions, the ``distro`` Python module is
recommended as it provides more accurate information about the host system.

View file

@ -59,50 +59,3 @@ Supported devices:
- Intel I225LM
- Intel I226V
Kvaser PCI CAN card
-------------------
At the moment the card only works with QEMU.
The driver supports both SocketCAN interface and character driver.
The driver requires, ``vcan`` to run on the host:
.. code:: shell
sudo ip link add dev can0 type vcan
sudo ip link set can0 up
An example command to run the driver on ``x86_64`` looks like this:
.. code:: shell
qemu-system-x86_64 -m 2G -cpu host -enable-kvm -kernel nuttx \
-nographic -serial mon:stdio -object can-bus,id=canbus0 \
-object can-host-socketcan,id=canhost0,if=can0,canbus=canbus0 \
-device kvaser_pci,canbus=canbus0
CTUCANFD PCI CAN card
---------------------
At the moment the card only works with QEMU.
The driver supports both SocketCAN interface and character driver.
The driver requires, ``vcan`` to run on the host:
.. code:: shell
sudo ip link add dev can0 type vcan
sudo ip link set can0 up
An example command to run the driver on ``x86_64`` looks like this:
.. code:: shell
qemu-system-x86_64 -m 2G -cpu host -enable-kvm -kernel nuttx \
-nographic -serial mon:stdio -object can-bus,id=canbus0-bus \
-object can-host-socketcan,if=can0,canbus=canbus0-bus,id=canbus0-socketcan \
-device ctucan_pci,canbus0=canbus0-bus,canbus1=canbus0-bus

View file

@ -1,207 +0,0 @@
========================================================
Building NuttX with Applications Outside the Source Tree
========================================================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Building+NuttX+with+Applications+Outside+of+the+Source+Tree
Q: Has anyone come up with a tidy way to build NuttX with board-specific pieces outside the source tree?
========================================================================================================
A: Here are four approaches:
============================
1. Make export
--------------
There is a make target called ``make export``. It will build NuttX, then bundle
all of the header files, libraries, startup objects, and other build components
into a ``.zip`` file. You can move that ``.zip`` file into any build environment
you want. You can even build NuttX under a DOS CMD window.
This ``make target`` is documented in the top-level
:doc:`Legacy README </introduction/resources>`. Search for ``Build Targets``
1. Replace the apps/ Directory
------------------------------
You can replace the entire ``apps/`` directory. It is not a critical part of the
OS. The ``apps/`` is simply provided for you to help with your application
development. It should not dictate anything that you do.
To use a different ``apps`` directory, simply execute ``make menuconfig`` in the
top-level ``nuttx/`` directory and redefine ``CONFIG_APPS_DIR`` in your
``.config`` file so that it points to a different, custom application directory.
Note that ``CONFIG_APPS_DIR`` is a `relative` path from the top-level
``nuttx/`` directory.
You can copy any pieces that you like from the old ``apps/`` directory to your
custom ``apps`` directory as necessary. This is documented in
the `NuttX Porting Guide <https://cwiki.apache.org/confluence/display/NUTTX/Porting+Guide>`_
and in the `apps/README.md <https://github.com/apache/nuttx-apps/blob/master/README.md>`_ file.
1. Extend the apps/ Directory
-----------------------------
If you like the random collection of stuff in the ``apps/`` directory but just
want to expand the existing components with your own, external sub-directory,
then there is an easy way to do that too: Create a symbolic link in the
``apps/`` directory that redirects to your application sub-directory (or copy
your code into a sub-directory of ``apps/``).
.. image:: image/custom_app_dir_through_extension.png
Makefile and Make.defs
^^^^^^^^^^^^^^^^^^^^^^
In order to be incorporated into the build, the directory that you link under
the ``apps/`` directory should contain:
1. A ``Makefile`` that supports the ``clean`` and ``distclean`` targets (see
other Makefiles for examples).
2. A tiny ``Make.defs`` make file fragment that simply adds the build
directories to the variable ``CONFIGURED_APPS`` like:
.. code-block:: shell
CONFIGURED_APPS += my_directory1 my_directory2
Automatic Sub-directory Inclusion
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``apps/Makefile`` will always automatically check for the existence of
sub-directories containing a ``Makefile`` and a ``Make.defs`` file. The
``Makefile`` will be used only to support cleaning operations. The
``Make.defs`` file provides the set of relative paths to directories to be
built; these directories must also contain a ``Makefile``. That ``Makefile`` can
build the sources and add the object files to the ``apps/libapps.a`` archive
(see other Makefiles for examples). It should support the ``all``, ``install``,
``context``, and ``depend`` targets.
``apps/Makefile`` does not depend on any hard-coded lists of directories.
Instead, it does a wildcard search to find all appropriate directories. This
means that to install a new application, you simply have to copy the directory
(or link it) into the ``apps/`` directory. If the new directory includes a
``Makefile`` and a ``Make.defs`` file, then it will be automatically discovered
and included in the build at ``make`` time.
Kconfig
^^^^^^^
If the directory that you add also includes a ``Kconfig`` file, then it will be
automatically included in the NuttX configuration system as well.
``apps/Makefile`` uses a tool at ``apps/tools/mkkconfig.sh`` that dynamically
builds the ``apps/Kconfig`` file at pre-configuration time.
.. note::
The native Windows build will use a corresponding tool called
``apps/tools/mkconfig.bat``.
Install script
^^^^^^^^^^^^^^
You could, for example, create a script called ``install.sh`` that installs a
custom application, configuration, and board-specific directory:
1. Copy ``MyBoard`` directory to ``boards/MyBoard``.
2. Add a symbolic link to ``MyApplication`` at ``apps/external``
3. Configure NuttX:
.. code-block:: shell
tools/configure.sh MyBoard:MyConfiguration
Special ``apps/external`` Directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Use of the name ``apps/external`` is suggested because that name is included in
the ``.gitignore`` file and will save you some nuisance when working with GIT.
4. Contain the apps/ Directory
------------------------------
A simple, minimally invasive approach would be to contain the ``apps/`` GIT
clone within your custom application directory. In this case, ``apps/`` would
appear as a directory under your custom application directory instead of your
application directories being inserted as sub-directories of ``apps/``. It may
even be implemented as a sub-module of your custom application directory.
.. image:: image/custom_app_dir_through_containment.png
Kconfig and Makefile
^^^^^^^^^^^^^^^^^^^^
There are only a few minimal requirements of your custom application directory.
It needs to have only its own ``Makefile`` and ``Kconfig`` file. That
``Kconfig`` would need to include the ``apps/Kconfig``. The ``Makefile`` would
similarly need to invoke the ``apps/Makefile`` for all of the relevant build
targets. For example, the ``clean`` target:
.. code-block:: shell
$(MAKE) -c apps clean TOPDIR=$(TOPDIR)
Library Issues
^^^^^^^^^^^^^^
The contained directory will create and install a static library called
``libapps($LIBEXT)`` in the ``nuttx/staging`` directory. Your custom logic must
also appear in the ``nuttx/staging`` directory. Here are two ways that you might
do that:
1. **Merge with ``libapps($LIBEXT)``.**
The custom application directory's ``Makefile`` could create and install the
final ``libapps($LIBEXT)`` in the ``nuttx/staging`` directory.
``<custom-dir>/apps/libapps($LIBEXT)`` could merge its custom object files
with ``<custom-dir>/libapps($LIBEXT)`` and then re-install the library at
``nuttx/staging``.
2. **Use the EXTRA_LIBS Feature.**
The build system supports two special make-related variables called
``EXTRA_LIBS`` and ``EXTRA_LIBPATHS``. These may be defined in your
board-specific ``Make.defs`` file. ``EXTRA_LIBS`` provides the name of your
custom library. If you create ``<custom-dir>/libcustom.a``, then the value
of ``EXTRA_LIBS`` would be ``-lcustom`` and the value of ``EXTRA_LIBPATHS``
would be ``-L <custom-dir>`` (assuming the GNU ld linker).
Relative Effort and Benefits
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The contained ``apps/`` directory approach requires some more effort than the
extended ``apps/`` approach, but has the advantage that there will be no strange
behavior due to issues with ``.gitignore`` and, hence, a cleaner user
experience.
Out-of-tree Builds
^^^^^^^^^^^^^^^^^^
This configuration also has the possibility of supporting out-of-tree builds
using ``fusefs``. Suppose, for example, that you have a project directory with
the contained ``apps/`` directory and, say, three platform build directories.
Using ``fusefs``, you can overlay one of the platform build directories on top
of the project directory. Then all files generated by the build will be written
into the overlaid platform build directory. When the ``fusefs`` is torn down,
the project directory will still be clean, and the build result will still be in
the platform build directory. This can then be repeated for the other two
platform build directories.
In this case, you would probably also want to contain the ``nuttx/`` directory
in the project directory as well so that the entire system is built out-of-tree.
Hooking External Applications into the Configuration System
-----------------------------------------------------------
Suppose you have opted to extend the ``apps/`` directory with your custom
external application directories and would also like to support configuration
variables in your external application. No problem! Thanks to Sebastien Lorquet,
any external application that you install into the ``apps/`` (whether via a
symbolic link or via a directory copy) `will` be included in the NuttX
configuration system.
The top-level ``Kconfig`` file in the ``apps/`` directory is automatically
generated based on the contents of each ``apps/`` sub-directory. If your
installed sub-directory contains ``Kconfig``, ``Makefile``, and ``Make.defs``
files, then it will be incorporated into the NuttX configuration system when the
top-level ``Kconfig`` file is generated.

View file

@ -1,84 +0,0 @@
=================
Building uClibc++
=================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629550
and is probably outdated
A version of `uClibc++ <http://cxx.uclibc.org/>`_ has been ported to NuttX and is available in the NuttX
uClibc++ GIT repository at `Bitbucket.org <https://bitbucket.org/nuttx/uclibc/>`_ . This version of uClibc++ was
adapted for NuttX by the RGMP team.
This custom version of uClibc++ resides in the NuttX repository at:
https://bitbucket.org/nuttx/uclibc/
rather than in the main NuttX source tree, due to licensing issues: NuttX is
licensed under the permissive, modified BSD License; uClibc++, on the other
hand, is licensed under the stricter GNU LGPL Version 3 license.
General build instructions are available in the uClibc++ `README.txt <https://bitbucket.org/nuttx/uclibc/src/master/README.txt>`_
file. Those instructions are not repeated here. This page documents specific
issues encountered when building this NuttX version of uClibc++ and how they
are resolved.
Undefined Reference to ``_impure_ptr``
======================================
**Problem**
When building uClibc++, you may encounter an undefined reference to
``_impure_ptr`` similar to:
.. code-block:: none
LD: nuttx
.../arm-none-eabi/lib/armv7e-m\libsupc++.a(vterminate.o): In function
`__gnu_cxx::__verbose_terminate_handler()`:
vterminate.cc:(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xfc):
undefined reference to `_impure_ptr'
**Solution**
A definitive, elegant solution is not known, but the following workaround has
proven to work:
1. Locate the directory where you can find ``libsupc++``:
.. code-block:: console
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -print-file-name=libsupc++.a
2. Go to that directory and save a copy of ``vterminate.o`` (in case you need
it later):
.. code-block:: console
cd <the-directory-containing-libsupc++.a>
arm-none-eabi-ar.exe -x libsupc++.a vterminate.o
3. Remove ``vterminate.o`` from the library. At build time, the uClibc++
package will provide a usable replacement:
.. code-block:: console
arm-none-eabi-ar.exe -d libsupc++.a vterminate.o
4. At this point, NuttX should link with no problem. If you ever want to
restore the original ``vterminate.o`` to ``libsupc++.a``, you can do so
by running:
.. code-block:: console
arm-none-eabi-ar.exe rcs libsupc++.a vterminate.o
After removing ``vterminate.o`` from the standard library, the
uClibc++-provided ``vterminate.o`` becomes the active implementation and
prevents references to ``_impure_ptr`` from arising during linkage.
.. note::
Always exercise caution when modifying toolchain libraries. This
workaround is known to be effective but it replaces standard library
objects, which may have side effects in other toolchain usage scenarios.

View file

@ -1,165 +0,0 @@
===========================================
Custom Application Directories
===========================================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Custom+Application+Directories
Most people use the generic ``apps/`` directory with NuttX. That is convenient
and well-documented. However, it should always be remembered that NuttX is a
stand-alone, general-purpose OS and has **no dependency** on that "canned"
application directory.
This page shows how to create your own, custom application directory from
scratch.
Creating the Custom Application Directory
=========================================
Below is a simple example of the **minimum** custom application directory. It
contains only three files: ``Makefile``, ``Kconfig``, and ``hello.c``.
Makefile
--------
The custom application directory must include a ``Makefile`` that supports all
of the make targets expected by the NuttX build system **and** must generate an
archive called ``libapps.a`` in the top-level of the custom directory structure.
The minimal required targets for the ``Makefile`` look like this:
.. code-block:: shell
APPDIR = ${shell pwd}
-include $(TOPDIR)/Make.defs
# files
CSRCS = hello.c
COBJS = hello.o
ROOTDEPPATH = --dep-path .
# Build targets
all: libapps.a
.PHONY: dirlinks context preconfig depend clean clean_context distclean
.PRECIOUS: libapps$(LIBEXT)
# Compile C Files
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# Add object files to the apps archive
libapps.a: $(COBJS)
$(call ARCHIVE, libapps.a, $(COBJS))
# Create directory links
dirlinks:
# Setup any special pre-build context
context:
# Setup any special pre-configuration context
preconfig:
# Make the dependency file, Make.deps
depend: Makefile $(CSRCS)
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
# Clean the results of the last build
clean:
$(call CLEAN)
# Remove the build context and directory links
clean_context:
# Restore the directory to its original state
distclean: clean clean_context
$(call DELFILE, Make.dep)
# Include dependencies
-include Make.dep
Kconfig
-------
A ``Kconfig`` file must be included, but it need not contain any meaningful
configuration options. This file is where you can add application-specific
configuration settings if desired. The minimal ``Kconfig`` might look like:
.. code-block:: shell
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
hello.c
-------
Your custom application must compile at least one source file to generate the
required ``libapps.a`` archive. One of these source files must include the
``main()`` entry point to the application. That main function (or similarly
named entry point) is called after OS initialization completes.
What this application initialization entry point does, how it interacts with
the rest of your application, and where the rest of you application code is
located is of no concern to the OS. Only this one entry point is needed.
Below is a small "Hello, World!" example, where ``custom_main()`` is the
application entry point:
.. code-block:: c
#include <stdio.h>
int custom_main(int argc, char *argv[])
{
printf("Hello, World!!\n");
return 0;
}
Building with the Custom Application Directory
==============================================
In order to build with the new custom application directory, you need the
following in your NuttX configuration:
.. code-block:: shell
CONFIG_APPS_DIR="../custom-apps"
CONFIG_USER_ENTRYPOINT="custom_main"
.. note::
You can only access the ``../custom-apps/Kconfig`` file if
``CONFIG_APPS_DIR`` is set to ``../custom-apps`` **before** running
``make menuconfig``. If you start with an existing configuration, you may
face a "chicken-and-egg" situation. One workaround is to manually edit
the ``.config`` file before running ``make menuconfig``.
Alternatively, if you use the ``tools/configure.sh`` script, you can specify the
custom-apps directory from the command line:
.. code-block:: shell
tools/configure.sh -a ../custom_apps <board>:<config>
Afterward, just build NuttX as you normally would. When you run the program that
was built with your custom application directory, you should see:
.. code-block:: shell
Hello, World!!

View file

@ -1,84 +0,0 @@
==============================
Debugging ELF Loadable Modules
==============================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Debugging+ELF+Loadable+Modules
Debugging ELF modules loaded in memory can be tricky because the load address
in memory does not match the addresses in the ELF file. This challenge has long
existed for debugging uClinux programs and Linux kernel modules; the same
solution can be used with NuttX ELF files (and probably with NxFLAT modules as
well). Below is a summary of one way to approach this:
1. Get ELF Module Load Address
==============================
Put a change in ``nuttx/binfmt`` so that you print the address where the ELF
text was loaded into memory.
Turning on BINFMT debug (``CONFIG_DEBUG_BINFMT=y``) should give you the same
information, although it may also provide more output than you really want.
Alternatively, you could place a ``printf()`` at the beginning of your ``main()``
function so that your ELF module can print its own load address. For example,
the difference between the address of ``main()`` in your object file and the
address of ``main()`` at run time reveals the actual load address.
2. Make the ELF Module Wait for You
===================================
Insert an infinite loop in the ``main()`` routine of your ELF program. For
example:
.. code-block:: c
volatile bool waitforme;
int main (int arc, char **argv)
{
while (!waitforme);
...
When you start the ELF program, you will see where it was loaded in memory, and
the ELF program will remain stuck in the infinite loop. It will continue to
wait for ``waitforme`` to become true before proceeding.
3. Start the Debugger
=====================
Start the debugger, connect to the GDB server, and halt the program. If your
debugger is well-behaved, it should stop at the infinite loop in ``main()``.
4. Load Offset Symbols
======================
Load symbols using the offset where the ELF module was loaded:
.. code-block:: shell
(gdb) add-symbol-file <myprogram> <load-address>
Here, ``<myprogram>`` is your ELF file containing symbols, and
``<load-address>`` is the address where the program text was actually loaded (as
determined above). Single-step a couple of times and confirm that you are in the
infinite loop.
5. And Debug
============
Set ``waitforme`` to a non-zero value. Execution should exit the infinite loop,
and now you can debug the ELF program loaded into RAM in the usual way.
An Easier Way?
==============
There might be an alternative that allows you to step into the ELF module
without modifying the code to include the ``waitforme`` loop. You could place a
breakpoint on the OS function ``task_start()``. That function runs before your
ELF program starts, so you should be able to single-step from the OS code
directly into your loaded ELF application—no changes to the ELF application
required.
When you step into the application's ``main()``, you have the relocated address
of ``main()`` and can use that address (see step #1) to compute the load offset.

View file

@ -1,538 +0,0 @@
===============================
ELF Programs No Symbol Tables
===============================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629542
You can easily extend the firmware in your released, embedded system using ELF
programs provided via a file system (for example, an SD card or downloaded into
on-board SPI FLASH). In order to support such post-release updates, your
released firmware would have to support execution of fully linked, relocatable
ELF programs loaded into RAM (see, for example, ``apps/examples/elf``).
The files shown in this Wiki page can be downloaded `here <https://cwiki.apache.org/confluence/download/attachments/139629402/elfprog-nosymtab.tar.gz?version=1&modificationDate=1576735520000&api=v2>`_.
Alan Carvalho de Assis has also made a video based on this example in the
YouTube `NuttX Channel <https://www.youtube.com/watch?v=oL6KAgkTb8M>`_.
Creating the Export Package
===========================
At the time that you release the firmware, you should create and save an
export package. The export package is all that you need to create
post-release, add-on modules for your embedded system. Let's illustrate this
using the ``STM32F4-Discovery`` networking ``NSH`` configuration with the
``STM32F4DIS-BB`` baseboard. (This demonstration assumes that you also have
support for some externally modifiable media in the board configuration, such
as removable media like an SD card, or a USB FLASH stick, an internal file
system remotely accessible via USB MSC, FTP, or any remote file system (NFS).
The networking ``NSH`` configuration uses the SD card on the STM32 baseboard
for this demonstration. Other ``NSH`` configurations could be used, provided
that you supply the necessary file system support in some fashion.)
(No baseboard? You can add file system support to the basic ``STM32F4-Discovery``
board by following these instructions:
`USB FLASH drive <https://www.youtube.com/watch?v=5hB5ZXpRoS4>`_
or `SD card <https://www.youtube.com/watch?v=H28t4RbOXqI>`_.)
.. code-block:: shell
$ make distclean
$ tools/configure.sh -c stm32f4discovery:netnsh
$ make menuconfig
Your released firmware would have to have been built with a few important
configuration settings:
1. Disable networking (Only because it is not needed in this example):
.. code-block:: shell
# CONFIG_NET is not set
2. Enable basic ELF binary support with no built-in symbol table support:
.. code-block:: shell
CONFIG_ELF=y
CONFIG_LIBC_EXECFUNCS=y
# CONFIG_EXECFUNCS_HAVE_SYMTAB is not set
3. Enable PATH variable support:
.. code-block:: shell
CONFIG_BINFMT_EXEPATH=y
CONFIG_PATH_INITIAL="/bin"
# CONFIG_DISABLE_ENVIRON not set
4. Enable execution of ELF files from the ``NSH`` command line:
.. code-block:: shell
CONFIG_NSH_FILE_APPS=y
.. note::
You must enable some application that uses ``printf()``. This is necessary
to assure that the symbol ``printf()`` is included in the base system.
Here we assume that you include the "Hello, World!" example from
``apps/examples/hello``:
.. code-block:: shell
CONFIG_EXAMPLES_HELLO=y
Then we can build the NuttX firmware image and the export package:
.. code-block:: shell
$ make
$ make export
When ``make export`` completes, you will find a ZIP'ed package in the top-level
NuttX directory called ``nuttx-export-x.y.zip`` (for version ``x.y``). The
version is determined by the ``.version`` file in the same directory. The
content of this ZIP file is the following directory structure:
.. code-block:: shell
nuttx-export-x.x
|- arch/
|- build/
|- include/
|- libs/
|- startup/
|- System.map
`- .config
The Add-On Build Directory
==========================
In order to create the add-on ELF program, you will need (1) the export
package, (2) the program build ``Makefile``, (3) a linker script used by the
``Makefile``, and (4) a Bash script to create a linker script. That
``Makefile`` and Bash Script are discussed in the following paragraphs.
.. note::
These example files implicitly assume a GNU tool chain is used and, in at
least one place, that the target is an ARMv7-M platform. A non-GNU tool
chain would probably require a significantly different ``Makefile`` and
linker script. There is at least one ARMv7-M specific change that would
have to be made for other platforms in the script that creates the linker
script (``mkdefines.sh``).
Hello Example
=============
To keep things manageable, let's use a concrete example. Suppose the ELF
program that we wish to add to the release code is the single source file
``hello.c``:
.. code-block:: c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello from Add-On Program!\n");
return 0;
}
Let's say that we have a directory called ``addon`` and it contains the
``hello.c`` source file, a ``Makefile`` that will create the ELF program, and a
Bash script called ``mkdefines.sh`` that will create a linker script.
Building the ELF Program
========================
The first step in creating the ELF program is to unzip the Export Package. We
start with our ``addon`` directory containing the following:
.. code-block:: shell
$ cd addon
$ ls
gnu-elf.ld hello.c Makefile mkdefines.sh nuttx-export-7.25.zip
Where:
- ``gnu-elf.ld`` is the linker script.
- ``hello.c`` is our example source file.
- ``Makefile`` will build our ELF program and symbol table.
- ``mksymtab.h`` is the Bash script that will create the symbol table for the
ELF program.
- ``nuttx-export-7.25.zip`` is the Export Package for NuttX-7.25.
We unzip the Export Package like:
.. code-block:: shell
$ unzip nuttx-export-7.25.zip
Then we have a new directory called ``nuttx-export-7.25`` that contains all of
the content from the released NuttX code that we need to build the ELF
program.
The Makefile
============
The ELF program is created simply as:
.. code-block:: shell
$ make
This uses the following ``Makefile`` to generate several files:
- ``hello.o``: The compiled ``hello.c`` object.
- ``hello.r``: A "partially linked" ELF object that still has undefined
symbols.
- ``hello``: The fully linked, relocatable ELF program.
- ``linker.ld``: A linker script created by ``mkdefines.sh``.
Only the resulting ``hello`` is needed.
Below is the ``Makefile`` used to create the ELF program:
.. code-block:: shell
include nuttx-export-7.25/build/Make.defs
# Long calls are need to call from RAM into FLASH
ARCHCFLAGS += -mlong-calls
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
ARCHINCLUDES = -I. -isystem nuttx-export-7.25/include
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHINCLUDES) -pipe
CROSSDEV = arm-none-eabi-
CC = $(CROSSDEV)gcc
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
# Setup up linker command line options
LDRELFLAGS = -r
LDELFFLAGS = -r -e main
LDELFFLAGS += -T defines.ld -T gnu-elf.ld
# This might change in a different environment
OBJEXT ?= .o
# This is the generated ELF program
BIN = hello
REL = hello.r
# These are the sources files that we use
SRCS = hello.c
OBJS = $(SRCS:.c=$(OBJEXT))
# Build targets
all: $(BIN)
.PHONY: clean
$(OBJS): %$(OBJEXT): %.c
$(CC) -c $(CFLAGS) -o $@ $<
System.map: nuttx-export-7.25/System.map
cat nuttx-export-7.25/System.map | sed -e "s/\r//g" >System.map
$(REL): $(OBJS)
$(LD) $(LDRELFLAGS) -o $@ $<
defines.ld: System.map $(REL)
./mkdefines.sh System.map "$(REL)" >defines.ld
$(BIN): defines.ld $(REL)
$(LD) $(LDELFFLAGS) -o $@ $(REL)
$(STRIP) $(REL)
clean:
rm -f $(BIN)
rm -f $(REL)
rm -f defines.ld
rm -f System.map
rm -f *.o
The Linker Script
=================
Two linker scripts are used. One is a normal file (we'll call it the main
linker script), and the other, ``defines.ld``, is created on-the-fly as
described in the next section.
The main linker script, ``gnu-elf.ld``, contains the following:
.. code-block:: shell
SECTIONS
{
.text 0x00000000 :
{
_stext = . ;
*(.text)
*(.text.*)
*(.gnu.warning)
*(.stub)
*(.glue_7)
*(.glue_7t)
*(.jcr)
_etext = . ;
}
.rodata :
{
_srodata = . ;
*(.rodata)
*(.rodata1)
*(.rodata.*)
*(.gnu.linkonce.r*)
_erodata = . ;
}
.data :
{
_sdata = . ;
*(.data)
*(.data1)
*(.data.*)
*(.gnu.linkonce.d*)
_edata = . ;
}
.bss :
{
_sbss = . ;
*(.bss)
*(.bss.*)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.b*)
*(COMMON)
_ebss = . ;
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
Creating the ``defines.ld`` Linker Script
=========================================
The additional linker script ``defines.ld`` is created through a three-step
process:
1. The ``Makefile`` generates a partially linked ELF object, ``hello.r``.
2. The ``Makefile`` then invokes the ``mkdefines.sh`` script, which generates
the ``defines.ld`` linker script that provides values for all of the
undefined symbols.
3. Finally, the ``Makefile`` produces the fully linked, relocatable ``hello``
ELF object using the ``defines.ld`` linker script.
Below is the version of ``mkdefines.sh`` used in this demo:
.. code-block:: bash
#!/bin/bash
usage="Usage: $0 <system-map> <relprog>"
# Check for the required path to the System.map file
sysmap=$1
if [ -z "$sysmap" ]; then
echo "ERROR: Missing <system-map>"
echo ""
echo $usage
exit 1
fi
# Check for the required partially linked file
relprog=$2
if [ -z "$relprog" ]; then
echo "ERROR: Missing <program-list>"
echo ""
echo $usage
exit 1
fi
# Verify the System.map and the partially linked file
if [ ! -r "$sysmap" ]; then
echo "ERROR: $sysmap does not exist"
echo ""
echo $usage
exit 1
fi
if [ ! -r "$relprog" ]; then
echo "ERROR: $relprog does not exist"
echo ""
echo $usage
exit 1
fi
# Extract all of the undefined symbols from the partially linked file and create a
# list of sorted, unique undefined variable names.
varlist=`nm $relprog | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort - | uniq`
# Now output the linker script that provides a value for all of the undefined symbols
for var in $varlist; do
map=`grep " ${var}$" ${sysmap}`
if [ -z "$map" ]; then
echo "ERROR: Variable $var not found in $sysmap"
echo ""
echo $usage
exit 1
fi
varaddr=`echo ${map} | cut -d' ' -f1`
echo "${var} = 0x${varaddr} | 0x00000001;"
done
This script uses the ``nm`` utility to find all of the undefined symbols in the
ELF object, then searches for the address of each undefined symbol in the
``System.map`` that was created when the released firmware was built. Finally,
it uses the symbol name and the symbol address to create each symbol table
entry.
.. note::
- For the ARMv7-M architecture, bit 0 of the address must be set to indicate
thumb mode. If you are using a different architecture that requires
normal aligned addresses, you will need to change the following line by
eliminating the ORed value:
.. code-block:: shell
echo "${var} = 0x${varaddr} | 0x00000001;"
- If the new ELF module uses a symbol that is not provided in the base
firmware and, hence, not included in the ``System.map`` file, this script
will fail. In that case, you will need to provide the missing logic
within the ELF program itself, if possible.
- The technique as described here is only valid in the FLAT build mode. It
could probably also be extended to work in the PROTECTED mode by
substituting ``User.map`` for ``System.map``.
Here is an example ``defines.ld`` created by ``mkdefines.sh``:
.. code-block:: shell
printf = 0x0800aefc | 0x00000001 ;
Replacing an NSH Built-In Function
==================================
Files can be executed by ``NSH`` from the command line by simply typing the
name of the ELF program. This requires:
1. That the feature be enabled with``CONFIG_NSH_FILE_APP=y``
2. That support for the PATH variable is enabled (``CONFIG_BINFMT_EXEPATH=y`` and
``CONFIG_PATH_INITIAL`` set to the mount point of the file system that
may contain ELF programs).
Suppose, for example, I have a built-in application called ``hello``. Before
installing the new replacement ``hello`` ELF program in the file system, this
is the version of ``hello`` that ``NSH`` will execute:
.. code-block:: shell
nsh> hello
Hello, World!
nsh>
In the above configuration, ``NSH`` will first attempt to run the program called
``hello`` from the file system. This will fail because we have not yet placed
our custom ``hello`` ELF program in the file system. So instead, ``NSH`` will
fall back and execute the built-in application called ``hello``.
In this way, any command known to ``NSH`` can be replaced by an ELF program
installed in a mounted file system directory that is found via the PATH
variable.
Now suppose that we do add our custom ``hello`` to the file system. When
``NSH`` attempts to run the program called ``hello`` from the file system, it
will run successfully. The built-in version will be ignored. It has been
replaced with the version in the file system:
.. code-block:: shell
nsh> mount -t vfat /dev/mmcsd0 /bin
nsh> hello
Hello from Add-On Program!
nsh>
Version Dependency
==================
.. note::
This technique generates ELF programs using fixed addresses from the
``System.map`` file of a versioned release. The generated ELF programs can
only be used with that specific firmware version. A crash will most likely
result if used with a different firmware version, because the addresses
from the ``System.map`` will not match the addresses in a different version
of the firmware.
The alternative approach using :doc:`Symbol Tables <fully_linked_elf>` is more
or less version independent.
Tightly Coupled Memories
========================
Most MCUs based on ARMv7-M family processors support some kind of Tightly
Coupled Memory (TCM). These TCMs have somewhat different properties for
specialized operations. Depending on the bus matrix of the processor, you may
not be able to execute programs from TCM. For instance, the ``STM32 F4``
supports Core Coupled Memory (CCM), but since it is tied directly to the D-bus,
it cannot be used to execute programs! On the other hand, the ``STM32F3`` has a
CCM that is accessible to both the D-Bus and the I-Bus, in which case it
should be possible to execute programs from this TCM.
.. image:: ./image/system_arch_stm32f42xx_and_f43xx.png
.. image:: ./image/system_arch_stm32f303xBC_and_f358xC.png
When ELF programs are loaded into memory, the memory is allocated from the
heap via a standard memory allocator. By default with the ``STM32 F4``, the
CCM is included in ``HEAP`` and will typically be allocated first. If CCM
memory is allocated to hold the ELF program, a hard-fault will occur
immediately when you try to execute the ELF program in memory.
Therefore, it is necessary on ``STM32 F4`` platforms to include the following
configuration setting:
.. code-block:: shell
CONFIG_STM32_CCMEXCLUDE=y
With that setting, the CCM memory will be excluded from the heap, and so will
never be allocated for ELF program memory.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

View file

@ -55,19 +55,4 @@ Guides
renode.rst
signal_events_interrupt_handlers.rst
signaling_sem_priority_inheritance.rst
smaller_vector_tables.rst
port.rst
updating_release_system_elf.rst
partially_linked_elf.rst
fully_linked_elf.rst
building_nuttx_with_app_out_of_src_tree.rst
building_uclibcpp.rst
custom_app_directories.rst
debugging_elf_loadable_modules.rst
multiple_nsh_sessions.rst
nsh_network_link_management.rst
ram_rom_disks.rst
reading_can_msgs.rst
remove_device_drivers_nsh.rst
rust.rst
smaller_vector_tables.rst

View file

@ -1,86 +0,0 @@
=====================
Multiple NSH Sessions
=====================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Multiple+NSH+Sessions
Q:
I would like to run the NuttShell on multiple serial ports, but haven't
figured it out yet; can you point me in the right direction?
A:
Easy. Don't use ``apps/examples/nsh_main.c``. Create your own main function
something like this (with all error handling omitted for simplicity). By the
way, this is all standard POSIX stuff that you can get detailed information
about by just Googling `dup2` or maybe `I/O redirection`:
.. code-block:: c
int my_main(int argc, char **argv)
{
const char *tty = argv[1];
int fd = open(tty, O_RDWR);
(void)dup2(fd, 0);
(void)dup2(fd, 1);
(void)dup2(fd, 2);
close(fd);
...
}
And the rest is just like the original ``nsh_main()`` function (in fact,
perhaps the existing ``nsh_main()`` function could be optionally extended to
accept a console device string?). Then you can start a new NSH session on any
TTY like:
.. code-block:: none
nsh> mynsh /dev/ttyS2 &
This should cause a new NSH session to appear on ``ttyS2``. That session will
persist until you do the following from the new session:
.. code-block:: none
nsh> exit
Then the new session, i.e., ``my_main()`` will exit.
If you were to do something like:
.. code-block:: none
nsh> mynsh /dev/console
then you would get nested NSH sessions on the same console. The first session
would halt and wait for the second session to take control of the console until
it exits. Then the first session will take over console again.
NuTTY
=====
In a previous discussion, there was talk about implementing the moral equivalent
of getty in NuttX (of course, it would be called "nutty"). A simple
implementation of nutty would work like this:
1. It would wait on ``poll()`` on every (configured) serial device.
2. Whenever it is awakened, it would start something like ``my_main()`` above
on the active serial port.
3. NSH has an option to enable logins, but it would be better to remove the
existing login information from NSH and centralize it in nutty.
That way, you could connect to any TTY, hit enter, and you would get an NSH
session. Hmm... it is not clear how nutty would get the TTY back after the
session is closed. That part may require some additional thought.
Other Ideas
===========
There are other ways to get multiple NSH sessions:
- Telnet already supports multiple sessions.
- Implement the existing NSH as an ELF program, then you can get multiple NSH
sessions with ``posix_spawn`` by simply redirecting I/O.
- Using the tiny NxWM window managers, multiple NSH windows are already
supported.

View file

@ -1,122 +0,0 @@
===========================
NSH Network Link Management
===========================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/NSH+Network+Link+Management
In the past, if the network was not connected when NuttX started, two problems
could arise:
1. It could take a very long time for the NSH prompt to appear because of the
sequential initialization (for example, when the network cable is not
connected).
2. After NuttX came up, installing the network cable would not enable the
network; the only way to recover networking was to connect the cable and
reset the board.
Network link management capability has now been added to NSH to address these
problems.
Configuration Options
=====================
A simple feature can be enabled to move network initialization to a separate
thread so that it is no longer performed sequentially. With this feature, the
network bringup occurs asynchronously, and the NSH prompt appears immediately
(although the network may not be available until some time later). That feature
is enabled with the following setting and is the first prerequisite for the full
NSH link management feature:
- ``CONFIG_NSH_NETINIT_THREAD``. Refer to the help text in the Kconfig file for
this option (``apps/nshlib/Kconfig``). Additional information about this
setting is included there.
The logic that implements NSH network management is provided in
``apps/nshlib/nsh_netinit.c``. The behavior of that logic depends on multiple
configuration settings. First, there are some additional prerequisites that
must be satisfied:
- ``CONFIG_NETDEV_PHY_IOCTL``
Enable PHY IOCTL commands in the Ethernet device driver. Special IOCTL
commands must be provided by the Ethernet driver to support certain PHY
operations needed for link management. These operations are not complex and
are implemented for Atmel SAM4/4, SAMA5 families, and for the STMicro STM32.
See ``nuttx/arch/arm/src/sam34/sam_emac.c``,
``nuttx/arch/arm/src/sam34/sam_emaca.c``, ``sam_emacb.c``, and ``sam_gmac.c``,
and ``nuttx/arch/arm/src/stm32/stm32_eth.c``.
- ``CONFIG_ARCH_PHY_INTERRUPT``
This is not a user-selectable option. Rather, it is set when selecting a board
that supports PHY interrupts. In most architectures, the PHY interrupt is not
directly associated with the Ethernet driver. Instead, the PHY interrupt is
provided through some board-specific GPIO, and the board-specific logic must
provide support for that GPIO interrupt. Specifically, the board logic must:
1. Provide the function ``arch_phy_irq()`` as described and prototyped in
``nuttx/include/nuttx/arch.h``.
2. Select ``CONFIG_ARCH_PHY_INTERRUPT`` in the board configuration file to
advertise that ``arch_phy_irq()`` is supported.
Examples can be found at:
- ``nuttx/boards/arm/sama5/sama5d3x-ek/src/sam_ethernet.c``
- ``nuttx/boards/arm/sama5/sama5d3-xplained/src/sam_ethernet.c``
- ``nuttx/boards/arm/sama5/sama5d4-ek/src/sam_ethernet.c``
- Other requirements: UDP support must be enabled (``CONFIG_NET_UDP``), and
signals must not be disabled (``CONFIG_DISABLE_SIGNALS``).
With all these prerequisites in place, NSH network management can be enabled on
the NSH network initialization thread by selecting these additional options:
- ``CONFIG_NSH_NETINIT_MONITOR``
By default, the network initialization thread brings up the network (or
fails while trying) then exits, freeing all resources it used. If this option
is selected, however, the network initialization thread will persist
indefinitely to monitor the network status. Should the network go down (for
example, if the cable is removed), the thread will monitor the link status
and attempt to bring the network back up. In this scenario, the resources
required for network initialization are never released.
If the network monitor is selected, additional options control its behavior:
- ``CONFIG_NSH_NETINIT_SIGNO``
The network monitor logic receives signals when there is a change in link
status. This setting can be used to customize the signal number to avoid
conflicts.
- ``CONFIG_NSH_NETINIT_RETRYMSEC``
When the network is down, the initialization thread will periodically attempt
to bring the network back up. Because this can be time-consuming, the retry
operation is performed only at the interval specified by this value, in
milliseconds.
- ``CONFIG_NSH_NETINIT_THREAD_STACKSIZE``
The stack size for the network initialization thread.
- ``CONFIG_NSH_NETINIT_THREAD_PRIORITY``
The network initialization thread priority.
Overview of the Operation
=========================
Below is a summary of how the NSH management thread operates:
1. During initialization, the thread opens a UDP socket for IOCTL operations
and connects a signal handler.
2. It enters a loop. At the beginning of each loop iteration, the thread
uses an IOCTL command to register (or re-register) with the Ethernet device
to receive a signal whenever the PHY reports a link up or link down
interrupt. Re-registration is necessary because the notification disarms
after each PHY interrupt.
3. The thread reads the link status from both the PHY and the Ethernet device.
If they disagree, the network monitor uses an IOCTL command to bring the
Ethernet driver up or down to match the current state of the network. If the
network is lost, the monitor brings the Ethernet driver down; if the network
is regained, the monitor brings the Ethernet driver back up and re-establishes
the connection.
4. If the PHY and the Ethernet driver agree on the link state, no action is
performed.
5. At the end of the loop, the network monitor waits for a PHY interrupt or a
timeout. When either occurs, control returns to the top of the loop, and the
process repeats.
6. If a PHY interrupt happens, a signal is delivered to the task and handled by
the network monitors signal handler, which posts a semaphore to immediately
re-awaken the network monitor from its wait.

View file

@ -1,434 +0,0 @@
=================================
ELF Programs With Symbol Tables
=================================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629543
Updating a Release System with ELF Programs With Symbol Tables
================================================================
You can easily extend the firmware in your released, embedded system using
ELF programs provided via a file system. For example, an SD card or, perhaps,
downloaded into on-board SPI FLASH.
In order to support such post-release updates, your released firmware must
support execution of ELF programs loaded into RAM and symbol tables also
provided via the file system (see `apps/examples/elf`).
The files shown in this Wiki page can be downloaded
`here <https://cwiki.apache.org/confluence/download/attachments/139629402/elfprog-wsymtab.tar.gz?version=1&modificationDate=1576735523000&api=v2>`_
Creating a Symbol Table
=======================
There are several ways to create an application symbol table. Only two are
compatible with the example provided here:
1. **Board-specific Bring-up Logic**
Build a symbol table into the base firmware and add it to your
board-specific bring-up logic. This technique is typically used in kernel
mode with ``CONFIG_USER_INITPATH=y``.
In this setup, the system does not initialize using a standard C call like
``nsh_main()``. Instead, it starts with an ``init`` ELF program, similar to
how Linux initializes. The configuration option
``CONFIG_EXECFUNCS_SYMTAB_ARRAY`` initializes the system with a minimal set
of symbols required by the ``init`` program. Once initialized, the ``init``
program would typically call ``boardctl()`` to put the final symbol table in
place.
To enable this method, you must:
- Set ``CONFIG_EXECFUNCS_HAVE_SYMTAB=y`` in your configuration.
- Provide a symbol table with the global name ``CONFIG_EXECFUNCS_SYMTAB_ARRAY`` with the variable name ``CONFIG_EXECFUNCS_NSYMBOLS_VAR`` that holds the number of symbol entries. The default symbol table name is ``g_symtab``.
In this example, let's illustrate this using an STM32F4-Discovery
configuration. We will assume that you have modified the
``boards/arm/stm32/stm32fdiscovery/src/stm32_bringup.c`` file, adding the
following:
.. code-block:: c
#include <stdio.h>
#include <nuttx/binfmt/symtab.h>
const struct symtab_s g_symtab[] = {
{"printf", (FAR void *)printf}
};
int g_nsymbols = 1;
This is a simple symbol table containing only the symbol string "printf,"
whose value is the address of the function ``printf()``.
There is, of course, a lot more that could be said about generating symbol
tables. NuttX provides specialized tools in the ``tools/`` directory and
instructions elsewhere for generating more extensive symbol tables. However,
this example keeps things simple to focus on the core functionality.
2. **Application Logic**
Alternatively, the symbol table can be provided dynamically by the
application itself, using the ``boardctl()`` system interface. The specific
``boardctl()`` command to use is ``BOARDIOC_APP_SYMTAB``. This command
provides the symbol table in the same way as the board-specific logic but
allows for application-level control.
To use this approach, you need to:
- Enable the configurations ``CONFIG_LIB_BOARDCTL=y`` and ``CONFIG_BOARDCTL_APP_SYMTAB=y``.
- Include application logic to provide the symbol table. If ``CONFIG_EXAMPLES_NSH_SYMTAB=y`` is set, NSH can handle this automatically.
Export Package
==============
At the time of firmware release, you should create and save an export package.
This export package contains all the necessary files required to create
post-release add-on modules for your embedded system.
For demonstration purposes, we use the STM32F4-Discovery with the network NSH
configuration. This setup assumes that you have the STM32F4DIS-BB baseboard.
The demonstration also requires support for externally modifiable media, such
as:
- Removable media, like an SD card or USB flash drive.
- An internal file system remotely accessible via USB MSC, FTP, or other
protocols.
- A remote file system, such as NFS.
In this demonstration, the networking NSH configuration uses the SD card on
the STM32 baseboard. Other NSH configurations can also be used, provided they
supply the necessary file system support.
(No baseboard? You can add file system support to the basic ``STM32F4-Discovery``
board by following these instructions:
`USB FLASH drive <https://www.youtube.com/watch?v=5hB5ZXpRoS4>`_
or `SD card <https://www.youtube.com/watch?v=H28t4RbOXqI>`_.)
Example for STM32F4-Discovery:
.. code-block:: shell
$ make distclean
$ tools/configure.sh -c stm32f4discovery:netnsh
$ make menuconfig
Required configurations:
- Disable networking: ``# CONFIG_NET is not set``
- Enable ELF binary support: ``CONFIG_ELF=y``, ``CONFIG_LIBC_EXECFUNCS=y``,
``CONFIG_EXECFUNCS_HAVE_SYMTAB=y``, ``CONFIG_EXECFUNCS_SYMTAB_ARRAY="g_symtab"`` and
``CONFIG_EXECFUNCS_NSYMBOLS_VAR="g_nsymbols"``
- Enable PATH variable support: ``CONFIG_BINFMT_EXEPATH=y``,
``CONFIG_PATH_INITIAL="/bin"``
- Enable execution from NSH: ``CONFIG_NSH_FILE_APPS=y``
Then, build the NuttX firmware image and the export package:
.. code-block:: shell
$ make
$ make export
When ``make export`` completes, you will find a ZIP package in the top-level
NuttX directory called ``nuttx-export-x.y.zip`` (where x.y corresponds to the
version, determined by the .version file in the same directory). The contents
of this ZIP file are organized as follows:
.. code-block:: text
nuttx-export-x.x
|- arch/
|- build/
|- include/
|- libs/
|- startup/
|- System.map
`- .config
Add-On Build Directory
======================
In order to create the add-on ELF program, you will need:
1. The export package.
2. A program build Makefile.
3. A linker script used by the Makefile.
The example Makefile discussed below assumes the use of a GNU toolchain. Note
that non-GNU toolchains would likely require a significantly different
Makefile and linker script.
Hello Example
=============
To keep things manageable, let's use a concrete example. Suppose the ELF
program that we wish to add to the release code is the simple
source file ``hello.c``:
.. code-block:: c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello from Add-On Program!\n");
return 0;
}
Let's say that we have a directory called ``addon`` that contains the following:
1. The ``hello.c`` source file.
2. A Makefile to build the ELF program.
3. A linker script called ``gnu-elf.ld`` needed by the Makefile.
4. The export package ``nuttx-export-7.25.zip``.
Building the ELF Program
========================
The first step in creating the ELF program is to unzip the export
package. Starting in the ``addon`` directory:
.. code-block:: shell
$ cd addon
$ ls
gnu-elf.ld hello.c Makefile nuttx-export-7.25.zip
Where:
- ``gnu-elf.ld`` is the linker script.
- ``hello.c`` is the example source file.
- ``Makefile`` builds the ELF program.
- ``nuttx-export-7.25.zip`` is the export package from NuttX 7.25.
Unzip the export package as follows:
.. code-block:: shell
$ unzip nuttx-export-7.25.zip
This creates a new directory called ``nuttx-export-7.25``, containing
all the content from the released NuttX code required to build
the ELF program.
The Makefile
============
To build the ELF program, simply run:
.. code-block:: shell
$ make
This uses the following Makefile to generate several files:
- ``hello.o``: The compiled object file for ``hello.c``.
- ``hello``: The linked ELF program.
Only the resulting ``hello`` file is needed.
The Makefile used to create the ELF program is as follows:
.. code-block:: shell
include nuttx-export-7.25/build/Make.defs
# Long calls are need to call from RAM into FLASH
ARCHCFLAGS += -mlong-calls
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
ARCHINCLUDES = -I. -isystem nuttx-export-7.25/include
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHINCLUDES) -pipe
CROSSDEV = arm-none-eabi-
CC = $(CROSSDEV)gcc
LD = $(CROSSDEV)ld
STRIP = $(CROSSDEV)strip --strip-unneeded
# Setup up linker command line options
LDELFFLAGS = -r -e main
LDELFFLAGS += -T gnu-elf.ld
# This might change in a different environment
OBJEXT ?= .o
# This is the generated ELF program
BIN = hello
# These are the sources files that we use
SRCS = hello.c
OBJS = $(SRCS:.c=$(OBJEXT))
# Build targets
all: $(BIN)
.PHONY: clean
$(OBJS): %$(OBJEXT): %.c
$(CC) -c $(CFLAGS) $< -o $@
$(BIN): $(OBJS)
$(LD) $(LDELFFLAGS) -o $@ $^
$(STRIP) $(BIN)
clean:
rm -f $(BIN)
rm -f *.o
The Linker Script
=================
The linker script that I am using in this example, gnu-elf.ld,
contains the following:
.. code-block:: shell
SECTIONS
{
.text 0x00000000 :
{
_stext = . ;
*(.text)
*(.text.*)
*(.gnu.warning)
*(.stub)
*(.glue_7)
*(.glue_7t)
*(.jcr)
_etext = . ;
}
.rodata :
{
_srodata = . ;
*(.rodata)
*(.rodata1)
*(.rodata.*)
*(.gnu.linkonce.r*)
_erodata = . ;
}
.data :
{
_sdata = . ;
*(.data)
*(.data1)
*(.data.*)
*(.gnu.linkonce.d*)
_edata = . ;
}
.bss :
{
_sbss = . ;
*(.bss)
*(.bss.*)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.b*)
*(COMMON)
_ebss = . ;
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
Replacing NSH Built-In Functions
================================
Files can be executed by NSH from the command line by simply typing the name
of the ELF program. This requires (1) that the feature be enabled with
``CONFIG_NSH_FILE_APP=y`` and (2) that support for the PATH variable is
enabled with ``CONFIG_BINFMT_EXEPATH=y`` and ``CONFIG_PATH_INITIAL`` set to
the mount point of the file system that may contain ELF programs.
In this example, there is no application in the base firmware called
``hello``. So attempts to run ``hello`` will fail:
.. code-block:: shell
nsh> hello
nsh: hello: command not found
nsh>
But if we mount the SD card containing the ``hello`` image that we created
above, then we can successfully execute the ``hello`` command:
.. code-block:: shell
nsh> mount -t vfat /dev/mmcsd0 /bin
nsh> ls /bin
/bin:
System Volume Information/
hello
nsh> hello
Hello from Add-On Program!
nsh>
Here we showed how you can add a new command to NSH to a product without
modifying the base firmware. We can also replace or update an existing
built-in application in this way:
In the above configuration, NSH will first attempt to run the program called
``hello`` from the file system. This will fail because we have not yet put
our custom ``hello`` ELF program in the file system. So instead, NSH will
fallback and execute the built-in application called ``hello``. In this way,
any command known to NSH can be replaced from an ELF program installed in a
mounted file system directory that can be found via the PATH variable.
After we do add our custom ``hello`` to the file system, when NSH attempts to
run the program called ``hello`` from the file system it will run
successfully. The built-in version will be ignored. It has been replaced with
the version in the file system.
Tightly Coupled Memories
========================
Most MCUs based on ARMv7-M family processors support some kind of Tightly
Coupled Memory (TCM). These TCMs have somewhat different properties for
specialized operations. Depending on the bus matrix of the processor, you
may not be able to execute programs from the TCM. For instance, the STM32 F4
supports Core Coupled Memory (CCM), but since it is tied directly to the
D-bus, it cannot be used to execute programs! On the other hand, the STM32F3
has a CCM that is accessible to both the D-Bus and the I-Bus, in which case
it should be possible to execute programs from this TCM.
.. image:: ./image/system_arch_stm32f42xx_and_f43xx.png
.. image:: ./image/system_arch_stm32f303xBC_and_f358xC.png
When ELF programs are loaded into memory, the memory is allocated from the
heap via a standard memory allocator. By default with the STM32 F4, the CCM
is included in the heap and will typically be allocated first. If CCM memory
is allocated to hold the ELF program in memory, then a hard-fault will occur
immediately when you try to execute the ELF program in memory.
Therefore, it is necessary on STM32 F4 platforms to include the following
configuration setting:
.. code-block:: shell
CONFIG_STM32_CCMEXCLUDE=y
With that setting, the CCM memory will be excluded from the heap and so will
never be allocated for ELF program memory.

View file

@ -1,79 +0,0 @@
.. include:: /substitutions.rst
===========================================
How to port
===========================================
This guide explains "How to port NuttX".
At this guide, the scope of porting is adding a new SoC or board directory,
which can be built and has a working example that boots to the NuttShell (NSH).
The goal of porting is to comfirm the booting NuttShell(NSH), the pass of "ostest"
and the timer.
Porting a new SoC and board to NuttX requires modifications on arch,
SoC and board directories.
For the details,
see :doc:`/quickstart/organization`,
:doc:`/components/arch/index`,
:doc:`/components/boards`.
To port NuttX properly, we have to understand the boot sequence and
related kernel configurations.
Following links explain them, although these depend on
specific kernel version and configurations.
(To understand them, we have to read the code deeply.)
.. toctree::
port_bootsequence.rst
port_relatedkernelconfigrations.rst
About the implementation, the build system tells you minimal implementation of SoC/Board directory,
these implementations are almost done by copying and pasting from other SoC/Board
directory if there is the source code for the target HW IP in upstream.
If there is not the source code in upstream, the porter has to implement it by himself.
Porting procedure
=================
At first, you have to read and execute :doc:`/quickstart/install` and :doc:`/quickstart/compiling_make`.
After that, try follwoing procedure.
+------+---------------+--------------------------------------------------------------------+
| Step | Process | Comment |
+------+---------------+--------------------------------------------------------------------+
| 1 | Add the SoC | |
+------+---------------+--------------------------------------------------------------------+
| 2 | Add the Board | If the board was not sold in the market, |
| | | the board directory should be located out-of-tree. |
| | | For details see :doc:`/guides/customboards`. |
| | | And if you wanted to add own apps, see :doc:`/guides/customapps`. |
+------+---------------+--------------------------------------------------------------------+
| 3 | Configure | The configure needs to understand related kernel configurations. |
| | | see :doc:`/guides/port_relatedkernelconfigrations`. |
+------+---------------+--------------------------------------------------------------------+
| 4 | Compile | The compile tells you which source files are needed in SoC/Board |
| | | directory to pass the compile. |
+------+---------------+--------------------------------------------------------------------+
| 5 | Link | The link tells you which symbols are needed in SoC/Board directory |
| | | to pass the link. |
+------+---------------+--------------------------------------------------------------------+
| 6 | Implement | Do implement the symbols which are needed by the link. |
+------+---------------+--------------------------------------------------------------------+
| 7 | Verify | Do "apps/testing/ostest". |
| | | I think the pass of ostest is the one of proof for proper porting. |
| | | And check the timer implementation whether the kernel could |
| | | count the time accurately or not. |
+------+---------------+--------------------------------------------------------------------+
Porting Case Studies
===============================
These porting guides depend on specific kernel versions, as some code structures have changed over time. They will still
provide a general idea on how to port.
.. toctree::
:glob:
:maxdepth: 1
porting-case-studies/*

View file

@ -1,13 +0,0 @@
The diagram of boot sequence
============================
The premise of this sequence diagram is NuttX12.4.0, cxd56xx, non-SMP and Flat build.
The beginning of boot sequence is __start().
__start() will call nx_start(). nx_start() will initialize the kernel and call nsh_main().
nsh_main() will execute NuttShell(NSH).
nx_start() is NuttX standard function, but the behavior depends on some kernel configurations.
For example, the calling nsh_main() is also configurable.
About related kernel configurations, see :doc:`/guides/port_relatedkernelconfigrations`.
.. image:: image/port_bootsequence-12.4.0.png

View file

@ -1,67 +0,0 @@
The list of related kernel configurations
=========================================
The premise of this list : NuttX12.4.0, cxd56xx, non-SMP and Flat build.
I found following kernel configurations by analyzing the boot sequence.
I think it is good to consider them,
although almost of them might be set as default.
+-----------------+-------------------------------+------------------+
| Category | Item | Comment |
+-----------------+-------------------------------+------------------+
| Memory Map | CONFIG_RAM_START | `arch/Kconfig`_ |
+ +-------------------------------+ +
| | CONFIG_RAM_SIZE | |
+ +-------------------------------+------------------+
| | CONFIG_IDLETHREAD_STACKSIZE | `sched/Kconfig`_ |
+ +-------------------------------+------------------+
| | CONFIG_MM_REGIONS | `mm/Kconfig`_ |
+ +-------------------------------+------------------+
| | CONFIG_ARCH_HAVE_EXTRA_HEAPS | `arch/Kconfig`_ |
+-----------------+-------------------------------+------------------+
| Interrupt | CONFIG_ARCH_RAMVECTORS | `arch/Kconfig`_ |
+ +-------------------------------+ +
| | CONFIG_ARCH_IRQPRIO | |
+ +-------------------------------+ +
| | CONFIG_ARCH_INTERRUPTSTACK | |
+ +-------------------------------+ +
| | CONFIG_SUPPRESS_INTERRUPTS | |
+ +-------------------------------+ +
| | CONFIG_SUPPRESS_TIMER_INTS | |
+ +-------------------------------+------------------+
| | CONFIG_IRQCHAIN | `sched/Kconfig`_ |
+-----------------+-------------------------------+------------------+
| Timer | CONFIG_SYSTEMTICK_EXTCLK | `sched/Kconfig`_ |
+ +-------------------------------+ +
| | CONFIG_SCHED_TICKLESS | |
+-----------------+-------------------------------+------------------+
| Serial | CONFIG_STANDARD_SERIAL | `serial/Kconfig`_|
+ +-------------------------------+------------------+
| | CONFIG_DEV_CONSOLE | `sched/Kconfig`_ |
+-----------------+-------------------------------+------------------+
| Board | CONFIG_BOARD_EARLY_INITIALIZE | `sched/Kconfig`_ |
+ +-------------------------------+ +
| | CONFIG_BOARD_LATE_INITIALIZE | |
+ +-------------------------------+ +
| | CONFIG_INIT_ENTRYPOINT | |
+-----------------+-------------------------------+------------------+
| POSIX API | CONFIG_PRIORITY_INHERITANCE | `sched/Kconfig`_ |
+ +-------------------------------+ +
| | CONFIG_SEM_PREALLOCHOLDERS | |
+ +-------------------------------+ +
| | CONFIG_DISABLE_MQUEUE | |
+ +-------------------------------+ +
| | CONFIG_DISABLE_MQUEUE_SYSV | |
+ +-------------------------------+ +
| | CONFIG_PREALLOC_MQ_MSGS | |
+ +-------------------------------+ +
| | CONFIG_PREALLOC_MQ_IRQ_MSGS | |
+ +-------------------------------+ +
| | CONFIG_MQ_MAXMSGSIZE | |
+-----------------+-------------------------------+------------------+
.. _arch/Kconfig: https://github.com/apache/nuttx/blob/master/arch/Kconfig
.. _sched/Kconfig: https://github.com/apache/nuttx/blob/master/sched/Kconfig
.. _mm/Kconfig: https://github.com/apache/nuttx/blob/master/mm/Kconfig
.. _serial/Kconfig: https://github.com/apache/nuttx/blob/master/drivers/serial/Kconfig

View file

@ -1,382 +0,0 @@
Porting to the BCM2711 (Raspberry Pi 4B)
========================================
This port was completed for the 12.7.0 version of the NuttX kernel, and was contributed by Matteo Golin.
The pull request with this initial support can be found at `apache/nuttx/pull/15188
<https://github.com/apache/nuttx/pull/15188>`_.
The port required support to be written for a new chip (the BCM2711) and a new board. Matteo created journal entries
while working on the initial port, which can be found `on his blog
<https://linguini1.github.io/blog/2024/12/25/nuttx-bcm2711.html>`_. The details below are a more concise summary of the
porting process.
Researching
-----------
The first step to porting a board to NuttX was researching the board and how NuttX works.
The BCM2711 is a quad-core ARM Cortex A72 based SoC, and it supports both aarch64 and 32 bit ARM architectures. I
focused on the aarch64 implementation only in this port. My first step was determining other boards already in the NuttX
kernel that used the aarch64 architecture, because that gives me a starting point to porting this new chip and board.
I primarily used the blog posts written by Lup Yuen Lee about porting NuttX to the PinePhone, another ARM Cortex-A based
device. The articles are listed `here <https://github.com/lupyuen/pinephone-nuttx>`_. Lup's articles provided me with an
understanding of the NuttX boot process, as well as which files from the aarch64 support on NuttX were pulled into the
build process for booting. He also showed how he created an initial UART driver using the NuttX structure for UART
drivers, which allowed him to get NSH appearing in the console.
Finally, I also of course needed the BCM2711 datasheet in order to figure out which registers were available to me for
creating peripheral drivers. The BCM2711 datasheet isn't exceptionally detailed on many of the features on the SoC, but
it did provide enough detail to set up interrupts and get UART working.
Adding to the source tree
-------------------------
In order to build my code with the NuttX build system, I would have to add the board and the BCM2711 chip to the source
tree for NuttX. This way, it would appear as an available configuration via the ``tools/configure.sh`` script and I
could select options for it with ``make menuconfig``.
The first thing to do was to add the chip, which goes under the ``arch/arm64`` directory because it is an ARM 64 bit
SoC. The chip directory must be added in two places: ``arch/arm64/include/bcm2711`` and ``arch/arm64/src/bcm2711``. C
files go in the ``src`` directory with some header files, and some specific header files go in the ``include``
directory.
In addition, in order to make the BCM2711 visible as a supported chip, I had to add it as an option in
``arch/arm64/Kconfig``. In order to do this, I just copy-pasted the entry for the Allwinner A64, since the two chips
were very similar. I had to change a few fields (for instance, selecting ``ARCH_CORTEX_A72`` instead of
``ARCH_CORTEX_A53``), but this was relatively simple to complete with the information about the SoC. I also needed to
specify ``ARMV8A_HAVE_GICv2``, since that is the interrupt controller used by the BCM2711. ``ARCH_HAVE_MULTICPU``
because it is a quad-core, and ``ARCH_USE_MMU`` because it has a memory management unit.
I also needed to now add the Raspberry Pi 4B board to the source tree. To do this, I copied the board folder for the
PinePhone (``boards/arm64/a64/pinephone``) and renamed it ``raspberrypi-4b``. I also deleted many of the files in this
folder since they weren't applicable to the Pi 4B, and substituted all mentions of the PinePhone with the Raspberry Pi
4B (in path names and header include guards).
I then added the Pi 4B to the list of supported boards in ``boards/Kconfig``. For this, I just needed to create an entry
with the name ``ARCH_BOARD_RASPBERRYPI_4B`` and write that it depends on the ``ARCH_CHIP_BCM2711``. No additional
options necessary! In two other places in this file I also had to add some directives to make sure the Kconfig for the
board was found properly. These set ``ARCH_BOARD`` to the name of the board directory "raspberrypi-4b" when the Pi 4B was
selected, and ``source``'d the Kconfig under ``boards/arm64/bcm2711/raspberrypi-4b`` when selected.
The default configuration for this board was copied from the PinePhone's NSH configuration, which I modified to use the
correct board name, chip, and hardware specific settings. It was still incomplete because there was no code to actually
boot into NSH, but it was a starting point.
This was basically all I needed for the board to show up as a possible configuration in the source tree!
Mapping out the chip
--------------------
To start writing code for the BCM2711, I needed to map out the chip. This included the register addresses and the memory
mapping, which could all be found in the BCM2711 datasheet. From looking at other implementations, the register
addresses are usually defined as C macros and kept in header files under ``arch/<architecture>/src/<chip>/hardware``.
This is where I put them as well, defining all the register mappings the different groups within individual files (i.e.
``bmc2711_i2c.h``, ``bcm2711_spi.h``, etc.).
Many peripherals had groupings of memory-mapped registers, defined using a base address and then offsets from that
address to access the different fields. For instance, the two mini-SPI peripherals had the same structure, each with 12
registers. The way I commonly saw these macros implemented was something like:
.. code-block:: c
#define BCM_AUX_SPI1_BASEADDR (BCM_AUX_BASEADDR + BCM_AUX_SPI1_OFFSET)
#define BCM_AUX_SPI_CNTL0_REG_OFFSET (0x00) /* SPI control register 0 */
/* ... more register offsets */
/* This allows you to choose which SPI interface base address to get the register for. */
#define BCM_AUX_SPI_CNTL0(base) ((base) + BCM_AUX_SPI_CNTL0_REG_OFFSET)
In addition to the registers themselves, I also included macros to mask certain fields within the registers or set
certain values. This makes the code less error prone later, because any mistakes made while copying the long list of
fields and registers from the datasheet can be changed in one place.
.. code-block:: c
#define BCM_SPI_CNTL0_EN (1 << 11) /* Enable SPI interface */
In addition to the registers, I also had to map the interrupts. This was done in ``include/bcm2711/irq.h``. I copied the
IRQ numbers from the datasheet and listed them all as macros with names. I also had to define the number of IRQS, which
was 216 in this case. The ``MPID_TO_CORE(mpid)`` macro was copied from another arm64 implementation.
.. code-block:: c
#define NR_IRQS 216
#define MPID_TO_CORE(mpid) (((mpid) >> MPIDR_AFF0_SHIFT) & MPIDR_AFFLVL_MASK)
/* VideoCore interrupts */
#define BCM_IRQ_VC_BASE 96
#define BCM_IRQ_VC(n) (BCM_IRQ_VC_BASE + n)
#define BCM_IRQ_VC_TIMER0 BCM_IRQ_VC(0)
#define BCM_IRQ_VC_TIMER1 BCM_IRQ_VC(1)
/* More interrupts ... */
Finally was to define the memory mapping within the ``include/bcm2711/chip.h`` file. I did so simply since I was only
testing on the 4GB version of the BCM2711. The RAM starts at address 0, and is roughly 4GB in size. 64 MB of that is
reserved for the memory-mapped I/O, so I had to be sure to remove that. I also defined the load address of the kernel in
memory for the chip.
.. code-block:: c
#define CONFIG_RAMBANK1_ADDR (0x000000000)
/* Both the 4GB and 8GB ram variants use all the size in RAMBANK1 */
#if defined(CONFIG_RPI4B_RAM_4GB) || defined(CONFIG_RPI4B_RAM_8GB)
#define CONFIG_RAMBANK1_SIZE GB(4) - MB(64)
#endif /* defined(CONFIG_RPI4B_RAM_4GB) || defined(CONFIG_RPI4B_RAM_8GB) */
/* Raspberry Pi 4B loads NuttX at this address */
#define CONFIG_LOAD_BASE 0x480000
The same load address had to be specified in the linker script for the Raspberry Pi 4B kernel. This scripts tells the
compiler how to lay out the kernel code in memory and what addresses to use. I was able to copy it from the PinePhone
and just change the load address to ``0x480000``.
Figuring out the boot
---------------------
The first thing I wanted to do was determine how much work had already been done for aarch64 that would allow me to more
easily complete the port. In Lup's blogs, he tested out support for his core type (ARM Cortex-A53 on the PinePhone) by
booting the aarch64 instance of QEMU with NuttX using that core. I decided to take the same approach, and was able to
successfully boot on ARM Cortex-A72 using QEMU following his blog. This was a nice confirmation that the hardware I was
using was already supported in NuttX for booting the OS and getting NSH working with a PL011 UART interface.
I cannot stress enough that the reason porting to this chip was made so much easier was because I am standing on the
shoulders of giants. NuttX contributors had already set up the boot scripts written in assembly, timer configuration,
interrupt handling and drivers for a lot of the standard features in aarch64 architectures. I did not have to deal with
any of this because of them, and it really cut down on the amount of assembly I had to read and understand. I also
barely had to write any assembly outside of debugging the boot process a little (we'll get to that later). Not to
mention I had Lup's well-written articles to guide me.
In order to compile and boot the board, I had to add a definition for ``g_mmu_config``, which I was confused about and
left empty initially just to get past the compilation stage. I also defined the ``GICR_OFFSET`` and ``GICR_BASE`` macros
for the GICv2 interrupt controller by copying them from the Allwinner chip, which used the same controller. After
reading further in Lup's blog, I learned that the boot script has a ``PRINT`` macro which is called early in the boot
process, and requires an implementation of ``up_lowputc`` to print to the console. This would be the first thing I need
to implement. This compiled, but when I booted the Pi, nothing happened.
After quite a while of trying different things and looking at other implementations, I noticed that many people were
using register manipulation directly in the early print functions. I decided I would do the same, but instead of
printing (a more complex operation), I would turn one of the GPIO pins high. I was able to measure this with my
multimeter and confirm that the GPIO did get set, so I knew that the ``arm64_earlyprint_init`` function was getting
called. Something was wrong with my UART configuration.
I then tried directly manipulating registers to put the text "hi" in the UART FIFO. When I booted again, this printed,
but then was followed by some garbled output. It appeared that the the ``char *`` pointer passed to the print function
was getting garbled. After troubleshooting by printing characters directly by calling my ``arm64_lowputc`` in the
assembly boot script, I discovered that I could print a string from the C definition if I declared the string as static.
I also investigated the elf generated by building and confirmed the string was located in ``.rodata``. I was suspicious
that I was loading the kernel incorrectly into memory and some addresses were getting mixed up. Sure enough, I had
defined the load address in the linker script as ``0x80000`` instead of ``0x480000``. Fixing this allowed me to see the
boot messages properly!
I received this message in the console:
.. code-block:: console
----gic_validate_dist_version: No GIC version detect
arm64_gic_initialize: no distributor detected, giving up ret=-19
_assert: Current Version: NuttX 12.6.0-RC0 6791d4a1c4-dirty Aug 4 2024 00:38:21 arm64
_assert: Assertion failed panic: at file: common/arm64_fatal.c:375 task: Idle_Task process: Kernel 0x481418
I had accidentally kept the GICv3 in my config files when copying things from other boards, and changed it to GICv2.
That resolved the issue and presented me with a new one:
.. code-block:: console
MESS:00:00:06.144520:0:----_assert: Current Version: NuttX 12.6.0-RC0 f81fb7a076-dirty Aug 4 2024 16:16:30 arm64
_assert: Assertion failed panic: at file: common/arm64_fatal.c:375 task: Idle_Task process: Kernel 0x4811e4
After enabling all of the debug output in the build options, this became:
.. code-block:: console
arm64_oneshot_initialize: cycle_per_tick 54000
arm64_fatal_error: reason = 0
arm64_fatal_error: CurrentEL: MODE_EL1
arm64_fatal_error: ESR_ELn: 0xbf000002
arm64_fatal_error: FAR_ELn: 0x0
arm64_fatal_error: ELR_ELn: 0x48a458
print_ec_cause: SError interrupt
This looked like an unhandled interrupt, and after narrowing down which line was failing by adding log statements to the
kernel code, I discovered it was due to the spinlock code. An exception was being caused by the ``ldaxr`` instruction,
which the ARM documentation said could only be used once the MMU was enabled. I then enabled the MMU as well as its
debug information and was greeted with the lovely error:
.. code-block:: console
MESS:00:00:06.174977:0:----arm64_mmu_init: xlat tables:
arm64_mmu_init: base table(L1): 0x4cb000, 64 entries
arm64_mmu_init: 0: 0x4c4000
arm64_mmu_init: 1: 0x4c5000
arm64_mmu_init: 2: 0x4c6000
arm64_mmu_init: 3: 0x4c7000
arm64_mmu_init: 4: 0x4c8000
arm64_mmu_init: 5: 0x4c9000
arm64_mmu_init: 6: 0x4ca000
init_xlat_tables: mmap: virt 4227858432x phys 4227858432x size 67108864x
set_pte_table_desc:
set_pte_table_desc: 0x4cb018: [Table] 0x4c4000
init_xlat_tables: mmap: virt 0x phys 0x size 1006632960x
set_pte_table_desc:
set_pte_table_desc: 0x4cb000: [Table] 0x4c5000
init_xlat_tables: mmap: virt 4718592x phys 4718592x size 192512x
split_pte_block_desc: Splitting existing PTE 0x4c5010(L2)
set_pte_table_desc:
set_pte_table_desc: 0x4c5010: [Table] 0x4c6000
init_xlat_tables: mmap: virt 4911104x phys 4911104x size 81920x
init_xlat_tables: mmap: virt 4993024x phys 4993024x size 65536x
enable_mmu_el1: MMU enabled with dcache
nx_start: Entry
up_allocate_heap: heap_start=0x0x4d3000, heap_size=0x47b2d000
mm_initialize: Heap: name=Umem, start=0x4d3000 size=1202900992
mm_addregion: [Umem] Region 1: base=0x4d32a8 size=1202900304
arm64_fatal_error: reason = 0
arm64_fatal_error: CurrentEL: MODE_EL1
arm64_fatal_error: ESR_ELn: 0x96000045
arm64_fatal_error: FAR_ELn: 0x47fffff8
arm64_fatal_error: ELR_ELn: 0x489d28
print_ec_cause: Data Abort taken without a change in Exception level
_assert: Current Version: NuttX 12.6.0-RC0 96be557b64-dirty Aug 5 2024 14:56:42 arm64
_assert: Assertion failed panic: at file: common/arm64_fatal.c:375 task: Idle_Task process: Kernel 0x481a34
up_dump_register: stack = 0x4d2e10
up_dump_register: x0: 0x13 x1: 0x4d32c0
up_dump_register: x2: 0xfe215040 x3: 0xfe215040
up_dump_register: x4: 0x0 x5: 0x0
up_dump_register: x6: 0x1 x7: 0xdba53f65cc808a8
up_dump_register: x8: 0xc4276feb17c016ba x9: 0xecbcfeb328124450
up_dump_register: x10: 0xb7989dd7d34a1280 x11: 0x5ebf5f572386fdee
up_dump_register: x12: 0x6f7c07d067f6e38 x13: 0x3f7b5adaf798b4d5
up_dump_register: x14: 0xf3dffbe2e4cff736 x15: 0xd76b1c050c964ea0
up_dump_register: x16: 0x6d6fa9cfeeb0eff8 x17: 0x1a051d808a830286
up_dump_register: x18: 0x3f7b5adaf798b4bf x19: 0x4d3000
up_dump_register: x20: 0x47fffff0 x21: 0x4d32d0
up_dump_register: x22: 0x47b2cd30 x23: 0x4d32a8
up_dump_register: x24: 0x4d32b0 x25: 0x4806f4
up_dump_register: x26: 0x2f56f66b2df71556 x27: 0x74ee6bbfb5d438f4
up_dump_register: x28: 0x7ef57ab47b85f74f x29: 0x9a7fa1cb06923003
up_dump_register: x30: 0x489cf8
up_dump_register:
up_dump_register: STATUS Registers:
up_dump_register: SPSR: 0x600002c5
up_dump_register: ELR: 0x489d28
up_dump_register: SP_EL0: 0x4d3000
up_dump_register: SP_ELX: 0x4d2f40
up_dump_register: TPIDR_EL0: 0x0
up_dump_register: TPIDR_EL1: 0x0
up_dump_register: EXE_DEPTH: 0x1
Some more debugging allowed me to determine that the ``CONFIG_RAM_START`` and ``CONFIG_RAM_SIZE`` macros in the
defconfig for my nsh configuration were still set to the values from the PinePhone that I copied from. I set these to
the correct values for the Raspberry Pi 4B and got much further!
.. code-block:: console
MESS:00:00:06.211786:0:----irq_attach: In irq_attach
irq_attach: before spin_lock_irqsave
spin_lock_irqsave: me: 0
spin_lock_irqsave: before spin_lock
spin_lock: about to enter loop
spin_lock: loop over
spin_lock_irqsave: after spin_lock
irq_attach: after spin_lock_irqsave
irq_attach: before spin_unlock_irqrestore
irq_attach: after spin_unlock_irqrestore
arm64_serialinit: arm64_serialinit not implemented
group_setupidlefiles: ERROR: Failed to open stdin: -38
_assert: Current Version: NuttX 12.6.0-RC0 be262c7ad3-dirty Aug 5 2024 17:16:27 arm64
_assert: Assertion failed : at file: init/nx_start.c:728 task: Idle_Task process: Kernel 0x48162c
up_dump_register: stack = 0x4c0170
up_dump_register: x0: 0x4c0170 x1: 0x0
up_dump_register: x2: 0x0 x3: 0x0
up_dump_register: x4: 0x0 x5: 0x0
up_dump_register: x6: 0x3 x7: 0x0
up_dump_register: x8: 0x4c7468 x9: 0x0
up_dump_register: x10: 0x4c7000 x11: 0x4
up_dump_register: x12: 0x4b8000 x13: 0x4b7000
up_dump_register: x14: 0x1 x15: 0xfffffff7
up_dump_register: x16: 0x48a654 x17: 0x0
up_dump_register: x18: 0x1 x19: 0x0
up_dump_register: x20: 0x4ac181 x21: 0x4bf430
up_dump_register: x22: 0x0 x23: 0x4c0170
up_dump_register: x24: 0x4c0170 x25: 0x2d8
up_dump_register: x26: 0x240 x27: 0x4b7000
up_dump_register: x28: 0xfdc3ed41d6862df6 x29: 0xbf8e8f7280a0100
up_dump_register: x30: 0x481bf8
up_dump_register:
up_dump_register: STATUS Registers:
up_dump_register: SPSR: 0x20000245
up_dump_register: ELR: 0x480230
up_dump_register: SP_EL0: 0x4c7000
up_dump_register: SP_ELX: 0x4c6e90
up_dump_register: TPIDR_EL0: 0x4bf430
up_dump_register: TPIDR_EL1: 0x4bf430
up_dump_register: EXE_DEPTH: 0x0
dump_tasks: PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACKBASE STACKSIZE USED FILLED COMMAND
dump_tasks: ---- --- --- -------- ------- --- ------- ---------- ---------------- 0x4c4000 4096 144 3.5% irq
dump_task: 0 0 0 FIFO Kthread - Running 0000000000000000 0x4c5010 8176 1200 14.6% Idle_Task
CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.9 | VT102 | Offline | ttyUSB0
We actually got into tasks now! It appears stdin failed to open because in my Mini-UART driver implementation I had the
``attach`` and ``ioctl`` functions return ``-ENOSYS``. Just changing this to 0 for success in the interim allowed us to
get even further, and I could see the beginnings of NSH spawning.
.. code-block:: console
mm_initialize: Heap: name=Umem, start=0x4cc000 size=4222828544
mm_addregion: [Umem] Region 1: base=0x4cc2a8 size=4222827856
mm_malloc: Allocated 0x4cc2d0, size 144
mm_malloc: Allocated 0x4cc360, size 80
gic_validate_dist_version: GICv2 detected
up_timer_initialize: up_timer_initialize: cp15 timer(s) running at 54.0MHz
arm64_oneshot_initialize: oneshot_initialize
mm_malloc: Allocated 0x4cc3b0, size 48
arm64_oneshot_initialize: cycle_per_tick 54000
uart_register: Registering /dev/console
mm_malloc: Allocated 0x4cc3e0, size 80
mm_malloc: Allocated 0x4cc430, size 80
uart_register: Registering /dev/ttys0
mm_malloc: Allocated 0x4cc480, size 80
mm_malloc: Allocated 0x4cc4d0, size 80
mm_malloc: Allocated 0x4cc520, size 80
mm_malloc: Allocated 0x4cc570, size 32
mm_malloc: Allocated 0x4cc590, size 64
work_start_highpri: Starting high-priority kernel worker thread(s)
mm_malloc: Allocated 0x4cc5d0, size 336
mm_malloc: Allocated 0x4cc720, size 8208
nxtask_activate: hpwork pid=1,TCB=0x4cc5d0
nx_start_application: Starting init thread
task_spawn: name=nsh_main entry=0x48b24c file_actions=0 attr=0x4cbfa0 argv=0x4cbf98
mm_malloc: Allocated 0x4ce730, size 1536
mm_malloc: Allocated 0x4ced30, size 64
mm_malloc: Allocated 0x4ced70, size 32
mm_malloc: Allocated 0x4ced90, size 8208
nxtask_activate: nsh_main pid=2,TCB=0x4ce730
lib_cxx_initialize: _sinit: 0x4ad000 _einit: 0x4ad000
mm_malloc: Allocated 0x4d0da0, size 848
mm_free: Freeing 0x4d0da0
mm_free: Freeing 0x4ced70
mm_free: Freeing 0x4ced30
nxtask_exit: nsh_main pid=2,TCB=0x4ce730
mm_free: Freeing 0x4ced90
mm_free: Freeing 0x4ce730
nx_start: CPU0: Beginning Idle Loop
It seemed like we were waiting on an interrupt which never occurred. This was weird, because my Mini-UART driver had an
interrupt implementation and appeared to be written just fine. This took hours of debugging, logging from interrupt
handlers and dumping register values, but eventually I determined that the BCM2711 datasheet actually had an error where
the TX and RX interrupt fields were swapped in the datasheet. A blog post online had mentioned this for the BCM2835, but
it appeared to be an issue on this chip as well. Now we were booting into NSH!
It was at this point that the port is considered a success, since I was able to boot into NSH and successfully run the
``ostest`` benchmark. I went on to write the start of a few more drivers, like the GPIO driver, but this completed the
requirements for an initial port and is most of what ended up being submitted in the initial pull request.

View file

@ -1,969 +0,0 @@
The case of ARM CM4 & cxd32xx @NuttX12.4.0
==========================================
Step1 : Add the SoC
-------------------
Create the SoC directory.
.. code-block::
$ touch arch/arm/include/cxd32xx
$ touch arch/arm/src/cxd32xx
Modify "arch/arm/Kconfig" to register the SoC directory.
Add "Kconfig" and "Make.defs" for the SoC directory.
.. code-block::
$ touch arch/arm/src/cxd32xx/Kconfig
$ touch arch/arm/src/cxd32xx/Make.defs
For details about these files, see `apache/nuttx/pull/12441`_
Step2 : Add the Board
---------------------
There are two ways about adding the Board directory.
The one is in-of-tree, another one is out-of-tree.
For details see :doc:`/guides/customboards`.
And if you wanted to add own apps, see :doc:`/guides/customapps`.
This time, the way of out-of-tree is selected.
The directory structure is following :
.. code-block::
apps/
nuttx/
out-of-tree/cxd32xx_boards
Create the board : cb2sdb2 as the board of cxd32xx.
.. code-block::
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/configs/nsh
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/include
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/scripts
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/src
Add "Kconfig", "defconfig", "Make.defs" and "Makefile".
.. code-block::
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/Kconfig
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/configs/nsh/defconfig
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/scripts/Make.defs
$ touch out-of-tree/cxd32xx_boards/cb2sdb2/src/Makefile
For details about these files, see :ref:`out-of-tree`.
Step3 : Configure
-----------------
Now you can do configure by following commands.
It is important to confirm these commands are working.
.. code-block::
$ cd nuttx
$ ./tools/configure.sh -l ../out-of-tree/cxd32xx_boards/cb2sdb2/configs/nsh
And you can do menuconfig by following command.
.. code-block::
$ make menuconfig
And you can do distclean by following command.
.. code-block::
$ make distclean
Step4 : Compile
---------------
Try to build with the implementation of Step1-2, you would face the error as following
if you implemented only directory / Kconfig / Make.defs / Makefile / defconfig about Step1-2.
.. code-block::
$ make
Create version.h
LN: platform/board to /home/lassdk/workdir/nuttx1/apps/platform/dummy
In file included from /home/lassdk/workdir/nuttx1/nuttx/include/nuttx/irq.h:37:0,
from /home/lassdk/workdir/nuttx1/nuttx/include/nuttx/sched.h:40,
from /home/lassdk/workdir/nuttx1/nuttx/include/nuttx/arch.h:87,
from ./clock/clock_initialize.c:37:
/home/lassdk/workdir/nuttx1/nuttx/include/arch/irq.h:43:27:
fatal error: arch/chip/irq.h: No such file or directory
compilation terminated.
ERROR: arm-none-eabi-gcc failed: 1
command: arm-none-eabi-gcc -MT ./clock_initialize.o -M '-Wstrict-prototypes'
'-Wno-attributes' '-Wno-unknown-pragmas' '-Wno-psabi' '-Os'
'-fno-strict-aliasing' '-fomit-frame-pointer' '-fno-common' '-Wall'
'-Wshadow' '-Wundef'
'-ffunction-sections' '-fdata-sections' '-mlittle-endian'
'-march=armv7e-m' '-mtune=cortex-m4'
'-mfpu=fpv4-sp-d16' '-mfloat-abi=hard' '-mthumb' '-Wa,-mthumb'
'-Wa,-mimplicit-it=always' '-isystem'
'/home/lassdk/workdir/nuttx1/nuttx/include'
'-D__NuttX__' '-DNDEBUG' '-D__KERNEL__' '-pipe' '-I'
'/home/lassdk/workdir/nuttx1/nuttx/sched' ./clock/clock_initialize.c
make[2]: *** [/home/lassdk/workdir/nuttx1/nuttx/tools/Config.mk:230:
clock_initialize.ddc] Error 1
make[1]: *** [Makefile:71: .depend] Error 2
make: *** [tools/Unix.mk:619: pass2dep] Error 2
Try to add "irq.h" with referring to cxd56xx and retry to build.
This time, the build system will teach that you have to implement "chip.h" as following.
.. code-block::
$ make
CC: clock/clock_initialize.c In file included from
/home/lassdk/workdir/nuttx2/nuttx/include/arch/armv7-m/irq.h:37:0,
from /home/lassdk/workdir/nuttx2/nuttx/include/arch/irq.h:56,
from /home/lassdk/workdir/nuttx2/nuttx/include/nuttx/irq.h:37,
from /home/lassdk/workdir/nuttx2/nuttx/include/nuttx/sched.h:40,
from /home/lassdk/workdir/nuttx2/nuttx/include/nuttx/arch.h:87,
from clock/clock_initialize.c:37:
/home/lassdk/workdir/nuttx2/nuttx/include/arch/armv7-m/nvicpri.h:28:28
fatal error: arch/chip/chip.h: No such file or directory
compilation terminated.
make[1]: *** [Makefile:61: clock_initialize.o] Error 1
make: *** [tools/LibTargets.mk:65: sched/libsched.a] Error 2
Continue this try and error until pass the Compiling.
Step5 : Link
------------
After the pass of Compiling, you will get following error.
To resolve this error, you have to implement the linker script.
.. code-block::
$ make
make[1]: *** No rule to make target
'/home/lassdk/workdir/nuttx1/nuttx/../cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld',
needed by '/home/lassdk/workdir/nuttx1/nuttx/../cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld.tmp'.
Stop.
make: *** [tools/Unix.mk:545: nuttx] Error 2
Try to add the linker script with referring to some board(cxd56xx, lpc43xx, etc) or :ref:`out-of-tree`
and retry to build, the build system will teach that you have to implement some symbols as following.
.. code-block::
$ make
CPP: /home/lassdk/workdir/nuttx1/nuttx/../cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld->
/home/lassdk/workdir/nuttx1/nuttx/../boarLD: nuttx
arm-none-eabi-ld: warning: cannot find entry symbol __start; defaulting to 24011000
/home/lassdk/workdir/nuttx1/nuttx/staging/libarch.a(arm_vectors.o):(.vectors+0x4):
undefined reference to `__start'
/home/lassdk/workdir/nuttx1/nuttx/staging/libarch.a(arm_doirq.o): In function `arm_doirq':
arm_doirq.c:(.text.arm_doirq+0x12): undefined reference to `arm_ack_irq'
/home/lassdk/workdir/nuttx1/nuttx/staging/libdrivers.a(syslog_channel.o):
In function `syslog_default_putc':
syslog_channel.c:(.text.syslog_default_putc+0x2): undefined reference to `up_putc'
/home/lassdk/workdir/nuttx1/nuttx/staging/libarch.a(arm_nputs.o): In function `up_nputs':
arm_nputs.c:(.text.up_nputs+0x10): undefined reference to `up_putc'
make[1]: *** [Makefile:197: nuttx] Error 1
make: *** [tools/Unix.mk:545: nuttx] Error 2
Step6 : Implement
-----------------
There are some implementation items, major items are bellow listed. To pass the Linking,
try to implement these symbols.
+-----------------+------------------------+--------------------------------------------------------------------+
| Category | Item | Comment |
+-----------------+------------------------+--------------------------------------------------------------------+
| SoC directory | entory point : __start | `apache/nuttx/pull/12441`_ |
+ +------------------------+ +
| | Serial Driver | |
+ +------------------------+ +
| | IDLE task stack | |
+ +------------------------+ +
| | INTC | |
+ +------------------------+ +
| | Timer | |
+-----------------+------------------------+------------------------------------------------+-------------------+
| Board directory | board_app_initialize | :doc:`/applications/nsh/customizing` |:ref:`out-of-tree` |
+ +------------------------+------------------------------------------------+ |
| |<arch>_board_initialize | `sched/Kconfig`_ :BOARD_<EARLY/LATE>_INITIALIZE| |
+-----------------+------------------------+------------------------------------------------+-------------------+
.. _apache/nuttx/pull/12441: https://github.com/apache/nuttx/pull/12441
.. _sched/Kconfig: https://github.com/apache/nuttx/blob/master/sched/Kconfig
If got the pass of Linking, you would see following result.
.. code-block::
$ make
Create version.h
LN: platform/board to /home/lassdk/workdir/nuttx2/apps/platform/dummy
Register: nsh
Register: sh
CPP: /home/lassdk/workdir/nuttx2/nuttx/../boards/cb2sdb2/scripts/cb2sdb2.ld->
/home/lassdk/workdir/nuttx2/nuttx/../boarLD: nuttx
Step7 : Verify
--------------
To execute and debug on the evaluation board, add following configurations.
.. code-block::
CONFIG_RAW_BINARY=y
CONFIG_DEBUG_SYMBOLS=y
If your implementations were good, you would see following logs.
.. code-block::
NuttShell (NSH) NuttX-12.4.0
nsh>
nsh>
nsh>
After confirming to boot NuttShell(NSH), try to execute "apps/testing/ostest".
The "apps/testing/ostest" needs following configurations.
.. code-block::
CONFIG_BUILTIN=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_SCHED_WAITPID=y
CONFIG_TESTING_OSTEST=y
And one more test is recommended to check the timer implementation whether
the kernel could count the time accurately or not.
I checked it by following code. About the function : cxd32_timerget(),
see `apache/nuttx/pull/12441`_
.. code-block::
extern uint32_t cxd32_timerget(void);
{
uint32_t pre;
uint32_t post;
pre = cxd32_timerget();
sleep(1);
post = cxd32_timerget();
printf("pre:%lu post:%lu exptect:1sec\n", pre, post);
pre = cxd32_timerget();
sleep(10);
post = cxd32_timerget();
printf("pre:%lu post:%lu exptect:10sec\n", pre, post);
}
.. _out-of-tree:
Appendix : out-of-tree code
---------------------------
.. code-block::
diff --git a/cxd32xx_apps/Make.defs b/cxd32xx_apps/Make.defs
new file mode 100644
index 0000000..2d6b86e
--- /dev/null
+++ b/cxd32xx_apps/Make.defs
@@ -0,0 +1 @@
+include $(wildcard $(APPDIR)/cxd32xx_apps/*/Make.defs)
diff --git a/cxd32xx_apps/Makefile b/cxd32xx_apps/Makefile
new file mode 100644
index 0000000..e451b29
--- /dev/null
+++ b/cxd32xx_apps/Makefile
@@ -0,0 +1,3 @@
+MENUDESC = "cxd32xx_apps"
+
+include $(APPDIR)/Directory.mk
diff --git a/cxd32xx_apps/hello/Kconfig b/cxd32xx_apps/hello/Kconfig
new file mode 100644
index 0000000..7f0b41e
--- /dev/null
+++ b/cxd32xx_apps/hello/Kconfig
@@ -0,0 +1,29 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config CXD32XX_APPS_HELLO
+ tristate "CXD32XX Hello App"
+ default n
+ ---help---
+ Enable the CXD32XX Hello App
+
+if CXD32XX_APPS_HELLO
+
+config CXD32XX_APPS_HELLO_PROGNAME
+ string "Program name"
+ default "hello"
+ ---help---
+ This is the name of the program that will be used when the NSH ELF
+ program is installed.
+
+config CXD32XX_APPS_HELLO_PRIORITY
+ int "CXD32XX Hello task priority"
+ default 100
+
+config CXD32XX_APPS_HELLO_STACKSIZE
+ int "CXD32XX Hello stack size"
+ default DEFAULT_TASK_STACKSIZE
+
+endif
diff --git a/cxd32xx_apps/hello/Make.defs b/cxd32xx_apps/hello/Make.defs
new file mode 100644
index 0000000..730329a
--- /dev/null
+++ b/cxd32xx_apps/hello/Make.defs
@@ -0,0 +1,3 @@
+ifneq ($(CONFIG_CXD32XX_APPS_HELLO),)
+CONFIGURED_APPS += $(APPDIR)/cxd32xx_apps/hello
+endif
diff --git a/cxd32xx_apps/hello/Makefile b/cxd32xx_apps/hello/Makefile
new file mode 100644
index 0000000..b3438e1
--- /dev/null
+++ b/cxd32xx_apps/hello/Makefile
@@ -0,0 +1,14 @@
+include $(APPDIR)/Make.defs
+
+# Custom Hello built-in application info
+
+PROGNAME = $(CONFIG_CXD32XX_APPS_HELLO_PROGNAME)
+PRIORITY = $(CONFIG_CXD32XX_APPS_HELLO_PRIORITY)
+STACKSIZE = $(CONFIG_CXD32XX_APPS_HELLO_STACKSIZE)
+MODULE = $(CONFIG_CXD32XX_APPS_HELLO)
+
+# Custom Hello
+
+MAINSRC = hello.c
+
+include $(APPDIR)/Application.mk
diff --git a/cxd32xx_apps/hello/hello.c b/cxd32xx_apps/hello/hello.c
new file mode 100644
index 0000000..b14a762
--- /dev/null
+++ b/cxd32xx_apps/hello/hello.c
@@ -0,0 +1,24 @@
+/****************************************************************************
+ * cxd32xx_apps/hello/hello.c
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdio.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * hello_main
+ ****************************************************************************/
+
+int main(int argc, FAR char *argv[])
+{
+ printf("Hello, World!!\n");
+ return 0;
+}
diff --git a/cxd32xx_apps/time/Kconfig b/cxd32xx_apps/time/Kconfig
new file mode 100644
index 0000000..64e7591
--- /dev/null
+++ b/cxd32xx_apps/time/Kconfig
@@ -0,0 +1,28 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config CXD32XX_APPS_TIME
+ tristate "CXD32XX Time App"
+ default n
+ ---help---
+ Enable the CXD32XX Time App
+
+if CXD32XX_APPS_HELLO
+
+config CXD32XX_APPS_TIME_PROGNAME
+ string "Program name"
+ default "time"
+ ---help---
+ This apps measures the elapsed time of sleep system call to confirm the timer implementation.
+
+config CXD32XX_APPS_TIME_PRIORITY
+ int "CXD32XX Time task priority"
+ default 100
+
+config CXD32XX_APPS_TIME_STACKSIZE
+ int "CXD32XX Time stack size"
+ default DEFAULT_TASK_STACKSIZE
+
+endif
diff --git a/cxd32xx_apps/time/Make.defs b/cxd32xx_apps/time/Make.defs
new file mode 100644
index 0000000..cdfb4cc
--- /dev/null
+++ b/cxd32xx_apps/time/Make.defs
@@ -0,0 +1,3 @@
+ifneq ($(CONFIG_CXD32XX_APPS_TIME),)
+CONFIGURED_APPS += $(APPDIR)/cxd32xx_apps/time
+endif
diff --git a/cxd32xx_apps/time/Makefile b/cxd32xx_apps/time/Makefile
new file mode 100644
index 0000000..94c9007
--- /dev/null
+++ b/cxd32xx_apps/time/Makefile
@@ -0,0 +1,14 @@
+include $(APPDIR)/Make.defs
+
+# Custom Hello built-in application info
+
+PROGNAME = $(CONFIG_CXD32XX_APPS_TIME_PROGNAME)
+PRIORITY = $(CONFIG_CXD32XX_APPS_TIME_PRIORITY)
+STACKSIZE = $(CONFIG_CXD32XX_APPS_TIME_STACKSIZE)
+MODULE = $(CONFIG_CXD32XX_APPS_TIME)
+
+# Custom Hello
+
+MAINSRC = time.c
+
+include $(APPDIR)/Application.mk
diff --git a/cxd32xx_apps/time/time.c b/cxd32xx_apps/time/time.c
new file mode 100644
index 0000000..9775ef2
--- /dev/null
+++ b/cxd32xx_apps/time/time.c
@@ -0,0 +1,41 @@
+/****************************************************************************
+ * cxd32xx_apps/time/time.c
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdio.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+extern uint32_t cxd32_timerget(void);
+
+/****************************************************************************
+ * hello_main
+ ****************************************************************************/
+
+int main(int argc, FAR char *argv[])
+{
+ uint32_t pre;
+ uint32_t post;
+
+ printf("measures the elapsed time of sleep system call to confirm \
+ the timer implementation.\n");
+
+ pre = cxd32_timerget();
+ sleep(1);
+ post = cxd32_timerget();
+ printf("pre:%lu post:%lu exptect:1sec\n", pre, post);
+
+ pre = cxd32_timerget();
+ sleep(10);
+ post = cxd32_timerget();
+ printf("pre:%lu post:%lu exptect:10sec\n", pre, post);
+
+ return 0;
+}
diff --git a/cxd32xx_boards/cb2sdb2/Kconfig b/cxd32xx_boards/cb2sdb2/Kconfig
new file mode 100644
index 0000000..f72f3c0
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/Kconfig
@@ -0,0 +1,4 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
diff --git a/cxd32xx_boards/cb2sdb2/configs/nsh/defconfig b/cxd32xx_boards/cb2sdb2/configs/nsh/defconfig
new file mode 100644
index 0000000..1d4c3e2
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/configs/nsh/defconfig
@@ -0,0 +1,38 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_CORTEXM4=y
+CONFIG_ARCH_FPU=y
+CONFIG_ARCH_CHIP="cxd32xx"
+CONFIG_ARCH_CHIP_CXD32XX=y
+CONFIG_ARCH_BOARD_CUSTOM=y
+CONFIG_ARCH_BOARD_CUSTOM_DIR="../out-of-tree/cxd32xx_boards/cb2sdb2"
+CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
+CONFIG_ARCH_BOARD_CUSTOM_NAME="cb2sdb2"
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_UART0_SERIAL_CONSOLE=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_RAM_START=0x00800000
+CONFIG_RAM_SIZE=244736
+CONFIG_ARCH_RAMVECTORS=y
+CONFIG_RAW_BINARY=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_UART_PL011=y
+CONFIG_UART0_PL011=y
+CONFIG_UART0_BASE=0x42104000
+CONFIG_UART0_IRQ=89
+CONFIG_UART0_CLK_FREQ=32000000
+CONFIG_UART_PL011_PLATFORMIF=y
+CONFIG_BUILTIN=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_TESTING_OSTEST=y
+CONFIG_FS_PROCFS=y
+CONFIG_STACK_COLORATION=y
+CONFIG_CXD32XX_APPS_HELLO=y
+CONFIG_CXD32XX_APPS_TIME=y
diff --git a/cxd32xx_boards/cb2sdb2/include/board.h b/cxd32xx_boards/cb2sdb2/include/board.h
new file mode 100644
index 0000000..eae687e
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/include/board.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ * cxd32xx_boards/cb2sdb2/include/board.h
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __CXD32XX_BOARDS_CB2SDB2_INCLUDE_BOARD_H
+#define __CXD32XX_BOARDS_CB2SDB2_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/irq.h>
+#include <sys/boardctl.h>
+#include <stdbool.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: cxd32_boardinitialize
+ *
+ * Description:
+ *
+ ****************************************************************************/
+
+void cxd32_boardinitialize(void);
+
+#endif /* __CXD32XX_BOARDS_CB2SDB2_INCLUDE_BOARD_H */
diff --git a/cxd32xx_boards/cb2sdb2/scripts/Make.defs b/cxd32xx_boards/cb2sdb2/scripts/Make.defs
new file mode 100644
index 0000000..4986d69
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/scripts/Make.defs
@@ -0,0 +1,40 @@
+############################################################################
+# cxd32xx_boards/cb2sdb2/scripts/Make.defs
+#
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+############################################################################
+
+include $(TOPDIR)/.config
+include $(TOPDIR)/tools/Config.mk
+include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
+
+LDSCRIPT = cb2sdb2.ld
+
+ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
+
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+
+CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
+CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+AFLAGS := $(CFLAGS) -D__ASSEMBLY__
+
+NXFLATLDFLAGS1 = -r -d -warn-common
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
+LDNXFLATFLAGS = -e main -s 2048
diff --git a/cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld b/cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld
new file mode 100644
index 0000000..34ac8ac
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld
@@ -0,0 +1,99 @@
+/****************************************************************************
+ * cxd32xx_boards/cb2sdb2/scripts/cb2sdb2.ld
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+INCLUDE ../../../../out-of-tree/cxd32xx_boards/cb2sdb2/scripts/memmap.ld
+
+OUTPUT_ARCH(arm)
+ENTRY(__start) /* Treat __start as the anchor for dead code stripping */
+EXTERN(_vectors) /* Force the vectors to be included in the output */
+SECTIONS
+{
+ .text : {
+ _stext = ABSOLUTE(.);
+ *(.entry)
+ *(.vectors)
+ *(.text .text.*)
+ *(.fixup)
+ *(.gnu.warning)
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.got)
+ *(.gcc_except_table)
+ *(.gnu.linkonce.r.*)
+ _etext = ABSOLUTE(.);
+ } > flash_Cached
+
+ .init_section : {
+ _sinit = ABSOLUTE(.);
+ KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
+ KEEP(*(.init_array .ctors))
+ _einit = ABSOLUTE(.);
+ } > flash_Cached
+
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } > flash_Cached
+
+ __exidx_start = ABSOLUTE(.);
+ .ARM.exidx : {
+ *(.ARM.exidx*)
+ } > flash_Cached
+ __exidx_end = ABSOLUTE(.);
+
+ _eronly = ABSOLUTE(.);
+
+ .data : {
+ _sdata = ABSOLUTE(.);
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ CONSTRUCTORS
+ . = ALIGN(4);
+ _edata = ABSOLUTE(.);
+ } > sram AT > flash_Cached
+
+ .ram_vectors : {
+ *(.ram_vectors)
+ } > sram
+
+ .bss : { /* BSS */
+ _sbss = ABSOLUTE(.);
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = ABSOLUTE(.);
+ } > sram
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_info 0 : { *(.debug_info) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_aranges 0 : { *(.debug_aranges) }
+}
diff --git a/cxd32xx_boards/cb2sdb2/scripts/memmap.ld b/cxd32xx_boards/cb2sdb2/scripts/memmap.ld
new file mode 100644
index 0000000..848f336
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/scripts/memmap.ld
@@ -0,0 +1,13 @@
+/****************************************************************************
+ * Automatically generated file; DO NOT EDIT.
+ ****************************************************************************/
+
+MEMORY
+{
+ sram (rwx) : ORIGIN = 0x00800000, LENGTH = 0x0003BC00
+ sram_erw (rw) : ORIGIN = 0x0083BC00, LENGTH = 0x00001000
+ sram_frw (rw) : ORIGIN = 0x0083CC00, LENGTH = 0x00002000
+ sram_prt (rw) : ORIGIN = 0x0083EC00, LENGTH = 0x00001000
+ sram_lib (rwx) : ORIGIN = 0x0083FC00, LENGTH = 0x00000400
+ flash_Cached (rx) : ORIGIN = 0x24010000, LENGTH = 0x0013F000
+}
diff --git a/cxd32xx_boards/cb2sdb2/src/Makefile b/cxd32xx_boards/cb2sdb2/src/Makefile
new file mode 100644
index 0000000..f8b1cd8
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/src/Makefile
@@ -0,0 +1,25 @@
+############################################################################
+# cxd32xx_boards/cb2sdb2/src/Makefile
+#
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+############################################################################
+
+include $(TOPDIR)/Make.defs
+
+CSRCS += cxd32_appinit.c cxd32_boot.c
+
+include $(TOPDIR)/boards/Board.mk
diff --git a/cxd32xx_boards/cb2sdb2/src/cxd32_appinit.c b/cxd32xx_boards/cb2sdb2/src/cxd32_appinit.c
new file mode 100644
index 0000000..c1bef5f
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/src/cxd32_appinit.c
@@ -0,0 +1,90 @@
+/****************************************************************************
+ * cxd32xx_boards/cb2sdb2/src/cxd32_appinit.c
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+
+#include <sys/types.h>
+#include <nuttx/board.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_app_initialize
+ *
+ * Description:
+ * Perform application specific initialization. This function is never
+ * called directly from application code, but only indirectly via the
+ * (non-standard) boardctl() interface using the command BOARDIOC_INIT.
+ *
+ * Input Parameters:
+ * arg - The boardctl() argument is passed to the board_app_initialize()
+ * implementation without modification. The argument has no
+ * meaning to NuttX; the meaning of the argument is a contract
+ * between the board-specific initialization logic and the
+ * matching application logic. The value could be such things as a
+ * mode enumeration value, a set of DIP switch switch settings, a
+ * pointer to configuration data read from a file or serial FLASH,
+ * or whatever you would like to do with it. Every implementation
+ * should accept zero/NULL as a default configuration.
+ *
+ * Returned Value:
+ * Zero (OK) is returned on success; a negated errno value is returned on
+ * any failure to indicate the nature of the failure.
+ *
+ ****************************************************************************/
+
+int board_app_initialize(uintptr_t arg)
+{
+ /* XXX : it will be implemented later */
+
+ return OK;
+}
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ * initialization call will be performed in the boot-up sequence to a
+ * function called board_late_initialize(). board_late_initialize()
+ * will be called immediately after up_initialize() is called and just
+ * before the initial application is started. This additional
+ * initialization phase may be used, for example, to initialize board-
+ * specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void weak_function board_late_initialize(void)
+{
+ /* XXX : it will be implemented later */
+}
+#endif
diff --git a/cxd32xx_boards/cb2sdb2/src/cxd32_boot.c b/cxd32xx_boards/cb2sdb2/src/cxd32_boot.c
new file mode 100644
index 0000000..edf4328
--- /dev/null
+++ b/cxd32xx_boards/cb2sdb2/src/cxd32_boot.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * cxd32xx_boards/cb2sdb2/src/cxd32_boot.c
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <debug.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+
+#include "arm_internal.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: cxd32_boardinitialize
+ *
+ * Description:
+ *
+ ****************************************************************************/
+
+void cxd32_boardinitialize(void)
+{
+ /* XXX : it will be implemented later */
+}

View file

@ -1,119 +0,0 @@
=======================
RAM Disks and ROM Disks
=======================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/RAM+Disks+and+ROM+Disks
NSH mkrd Command
================
The typical way to create a RAM disk is by using the NuttShell (NSH) ``mkrd``
command. The syntax is:
.. code-block:: shell
mkrd [-m <minor>] [-s <sector-size>] <nsectors>
This command creates a RAM disk consisting of ``<nsectors>`` sectors, each of
size ``<sector-size>`` (or 512 bytes if ``<sector-size>`` is not specified). The
RAM disk is then registered as ``/dev/ram<minor>``. If ``<minor>`` is not
specified, ``mkrd`` attempts to register the RAM disk as ``/dev/ram0``.
Internally, the NSH ``mkrd`` command is a simple wrapper around the OS
``boardctl()`` interface, using the ``BOARDIOC_MKRD`` command. “Under the hood,”
this ``boardctl()`` command performs the following:
1. Allocates kernel-space memory with ``kmm_malloc()`` of size ``<nsectors>``
times ``<sector-size>``
2. Zeros the allocated memory, and
3. Calls the OS-internal function ``ramdisk_register()`` to create the RAM disk.
NSH ROMFS /etc Support
======================
A ROM disk is a block device created from a read-only file system image stored
in FLASH or other ROM. There is no NSH command available to create a ROM disk
at runtime. However, it is possible to enable ROM disk support in NSH using the
``CONFIG_NSH_ROMFSETC`` option, as described in the section on NSH start-up
scripts in the `NSH User Guide <https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629410>`_.
Any application is able to create a ROM disk using the ``boardctl()`` interface
with the ``BOARDIOC_ROMDISK`` command.
Creating RAM Disks in Board Bring-Up Logic
==========================================
RAM disks may be created in board-specific initialization logic that runs in
supervisor mode. That logic might look as follows:
.. code-block:: c
int board_ramdisk(int minor, unsigned int sectsize, unsigned int nsectors)
{
size_t allocsize = (size_t)sectsize * (size_t)nsectors;
FAR uint8_t *buffer;
/* Allocate the memory backing up the ramdisk */
buffer = (FAR uint8_t *)kmm_zalloc(allocsize);
if (buffer == NULL)
{
return -ENOMEM;
}
/* Then register the ramdisk */
ret = ramdisk_register(minor, buffer, nsectors, sectsize,
RDFLAG_WRENABLED | RDFLAG_FUNLINK);
if (ret < 0)
{
kmm_free(buffer);
}
return ret;
}
Alternatively, this could be replaced by a call to the OS internal function
``mkrd()``.
Creating ROM Disks in Board Bring-Up Logic
==========================================
.. note::
Currently, the ``romdisk_register()`` function is only available within the
OS. Certain logic in ``apps/`` directly calls ``romdisk_register()``, which
violates the portable POSIX OS interface. The correct approach for an
application is to create a ROM disk via ``boardctl(BOARDIOC_ROMDISK)`` as
described above. Calling ``romdisk_register()`` directly is not only a
violation of the NuttX portable interface, but also is not allowed in
PROTECTED or KERNEL build modes.
ROM disks, i.e., read-only disks in FLASH, can be created by board bring-up
logic in a way similar to RAM disks, with the following caveats:
- The FLASH region is not allocated; the FLASH address, the sector size, and the
number of sectors must already be known.
- The ``romdisk_register()`` function is used instead of ``ramdisk_register()``.
A simple example could look like:
.. code-block:: c
int board_romdisk(int minor, FAR uint8_t *buffer, unsigned int sectsize,
unsigned int nsectors)
{
/* Register the romdisk */
return romdisk_register(minor, buffer, nsectors, sectsize);
}
Calling ``romdisk_register()`` is equivalent to calling ``ramdisk_register()``
with the final parameter ``flags == 0``.
Most ROM disks use the ROMFS file system, although CROMFS is another option.
Creating ROMFS file system images involves several steps. Tools are available
to simplify the process of building ROMFS images, but that topic is outside the
scope of this Wiki page.

View file

@ -1,62 +0,0 @@
====================
Reading CAN Messages
====================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Reading+CAN+Messages
Twice now, there have been complaints or issues about reading messages from the
CAN driver. The usual concern is that the driver is somehow losing or dropping
CAN messages. In these cases, it is often discovered that the CAN driver is
being used incorrectly and, as is human nature, the driver itself is blamed for
the problem.
When reading from the CAN driver, multiple messages may be returned, depending
on two factors:
1. The size of the returned CAN messages.
2. The size of the buffer provided to receive CAN messages.
It should never be assumed that a single message will be returned; making this
assumption can lead to lost CAN messages under conditions in which the read
buffer can hold more than one small message. The following example shows how to
properly handle the CAN read operation:
.. code-block:: c
#define BUFLEN 128 /* Some arbitrary size for the CAN RX buffer */
FAR struct can_msg_s *msg;
char rxbuffer[BUFLEN];
ssize_t nread;
int nbytes;
int msglen
int i;
/* Read messages into the RX buffer */
nread = read(fd, rxbuffer, BUFLEN);
/* Check for read errors */
...
/* Process each message in the RX buffer */
for (i = 0; i <= nread - CAN_MSGLEN(0); i += msglen)
{
/* Get the next message from the RX buffer */
msg = (FAR struct can_msg_s *)&rxbuffer[i];
nbytes = can_dlc2bytes(msg->cm_hdr.ch_dlc);
msglen = CAN_MSGLEN(nbytes);
DEBUGASSERT(i + msglen < BUFLEN);
/* Process the next CAN message */
...
}
By looping over the read buffer and parsing out each CAN message, it is
possible to avoid losing messages that are stored contiguously in the input
buffer.

View file

@ -1,101 +0,0 @@
================================
Removing Device Drivers with NSH
================================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Removing+Device+Drivers+with+NSH
NuttX and Unix-like Operating Systems Compared
==============================================
There are many things that are called device drivers. In this context, the
discussion is limited to **character device drivers**. In NuttX, character
device drivers are represented by device driver nodes in the top-level :doc:`pseudo
filesystem </components/filesystem/pseudofs>`.
Standard Unix-like operating systems also support device driver nodes, which
superficially resemble NuttX device driver nodes: Both look like files and
usually reside under the top-level ``/dev`` directory. Both can be accessed
with standard POSIX file system commands such as ``open()``, ``close()``,
``read()``, ``write()``, and so forth. However, the similarity ends there.
The payload of a standard Unix-like operating system device driver node is a
device major and minor number. These major and minor device numbers are used to
look up the actual device driver interface using internal OS logic and data
structures. A NuttX device node, by contrast, directly holds the device driver
interface with no intervening lookup. This design is less flexible, but it is
more efficient and conserves limited resources in an embedded system.
In standard Unix-like operating systems, the device node can simply be deleted
using the shell command ``rm`` or the programmatic interface ``unlink()``. The
node is removed, and nothing special happens to the underlying device driver
(except that it may no longer be accessible).
In NuttX, if the device node were removed in the same way, the entire device
interface would also be removed, effectively breaking the driver. Internally,
NuttX supports a function called ``unregister_driver()`` that can be invoked
to remove a device driver. Therefore, removing the device driver node must
behave as though ``unregister_driver()`` were called.
The unlink() Method
===================
How is this accomplished in NuttX? It is done via a special device driver
method called ``unlink()``.
NuttX device drivers are implemented via a vtable of function pointers. That
vtable defines the interface between the pseudo-file system and the device
driver. This vtable is the structure ``struct file_operations`` defined in
``[nuttx]/include/nuttx/fs/fs.h``. It provides several interfaces that closely
match the standard POSIX interfaces—``open()``, ``close()``, ``read()``,
``write()``, etc.—and also includes a method called ``unlink()``. This
``unlink()`` method is called by the NuttX VFS when a user removes a device
driver node.
.. note::
Removal of device driver nodes is only permitted if
``CONFIG_DISABLE_PSEUDOFS_OPERATIONS`` is **not** defined. All pseudo-file
system operations may be suppressed to reduce the FLASH footprint in systems
with extremely limited resources.
Removing a Device Node from NSH
===============================
Below is a summary of what happens when a device node is deleted using the NSH
``rm`` command:
1. The user enters the ``rm`` command. The NSH parser recognizes the command
and transfers control to the NSH function ``cmd_rm()``.
2. ``cmd_rm()`` verifies the command, then calls the standard POSIX
``unlink()`` interface. The logic in the VFS ``unlink()`` function in
``[nuttx]/fs/vfs/fs_unlink.c`` is then executed.
3. The VFS ``unlink()`` detects that the target to be removed is a device node
in the top-level pseudo-file system. It calls the device driver's
``unlink()`` method. It also removes the device node from the
pseudo-filesystem. However, the underlying resources required to support
the device driver interface may remain until the device driver frees those
resources.
4. When the device driver's ``unlink()`` method is called, it determines if
the device resources can be freed immediately. If so, it frees those
resources. If, for example, there are still open references to the device
driver, it may defer freeing the resources until the last client has closed
the device driver and there are no open references. In such a case, it may
set a flag indicating that the device driver has been unlinked.
5. If freeing of device driver resources has been deferred, that flag will be
examined later. For instance, when the last client of the device driver
closes its reference to the driver, it checks whether the unlink operation
was deferred. If so, it frees any remaining device driver resources at that
time.
.. warning::
Some character device driver instances do not implement the ``unlink()``
method. If problems arise when attempting to remove character drivers as
described in this Wiki page, a missing ``unlink()`` method is the most
likely cause.

View file

@ -1,90 +0,0 @@
===============
Rust in NuttX
===============
.. warning::
This guide is under development. Rust support in NuttX is experimental.
Introduction
============
NuttX is exploring Rust integration to provide memory safety guarantees and modern
language features while maintaining its small footprint and real-time capabilities.
This guide covers:
- Setting up Rust toolchain for NuttX development
- Building Rust components with NuttX
- Interoperability between Rust and C
- Testing Rust components
Prerequisites
=============
- Rust toolchain installed (rustup recommended)
- NuttX build environment configured
- Basic knowledge of Rust and NuttX development
Supported Platforms
===================
- AArch64 (WIP)
- ARMv7-A (WIP)
- ARMv6-M
- ARMv7-M
- ARMv8-M
- RISCV32
- RISCV64
Getting Started
===============
1. Install Rust toolchain and switch to nightly
Please refer to the official Rust installation guide for more details: https://www.rust-lang.org/tools/install
.. code-block:: bash
rustup toolchain install nightly
rustup default nightly
2. Prepare NuttX build environment
Please ensure that you have a working NuttX build environment, and with the following PR merged or cherry-picked:
- https://github.com/apache/nuttx-apps/pull/2487
- https://github.com/apache/nuttx/pull/15469
3. Enable essential kernel configurations
Pleae enable the following configurations in your NuttX configuration:
- CONFIG_SYSTEM_TIME64
- CONFIG_FS_LARGEFILE
- CONFIG_TLS_NELEM = 16
- CONFIG_DEV_URANDOM
The `rv-virt:nsh` board using make as the build system is recommended for testing Rust applications as it has been verified to work with this configuration.
For `rv-virt:nsh` board, you should disable `CONFIG_ARCH_FPU` configuration since RISCV32 with FPU is not supported yet.
4. Enable sample application
Please enable the sample application in your NuttX configuration:
- CONFIG_EXAMPLES_HELLO_RUST_CARGO
5. Build and run the sample application
Build the NuttX image and run it on your target platform:
.. code-block:: bash
qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp 8 -bios nuttx/nuttx -nographic
NuttShell (NSH) NuttX-12.8.0
nsh> hello_rust_cargo
{"name":"John","age":30}
{"name":"Jane","age":25}
Deserialized: Alice is 28 years old
Pretty JSON:
{
"name": "Alice",
"age": 28
}
Hello world from tokio!
Congratulations! You have successfully built and run a Rust application on NuttX.

View file

@ -1,34 +0,0 @@
===========================================
Updating a Release System with ELF Programs
===========================================
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Updating+a+Release+System+with+ELF+Programs
.. warning::
Migrated from:
https://cwiki.apache.org/confluence/display/NUTTX/Updating+a+Release+System+with+ELF+Programs
You can enhance the functionality of your released embedded system by adding
ELF programs, which can be loaded from a file system. These programs can be
stored on an SD card or downloaded into on-board SPI FLASH, allowing for
easy updates or extensions to the system's firmware.
There are two ways you can accomplish this:
Partially linked
================
This describes building the partially linked, relocatable ELF program that
depends on a symbol table provided by the base firmware in FLASH.
Reference:
- See :doc:`Partially Linked ELF Programs <partially_linked_elf>`
Fully linked
============
This describes building a fully linked, relocatable ELF program that does
not depend on any symbol table information.
Reference:
- See :doc:`Fully Linked ELF Programs <fully_linked_elf>`

0
Documentation/implementation/simulation.rst Normal file → Executable file
View file

View file

@ -1,126 +0,0 @@
===============
IMX95LPD5EVK-19
===============
The IMX95LPD5EVK-19 board is a platform designed to show the most commonly
used features of the
`i.MX 95 automotive applications processor
<https://www.nxp.com/products/iMX95>`_ .
Features
========
- Multicore Processing [1]_
- 1x Arm Cortex-M7
- 6x Arm Cortex-A55 multicore complex
- 1x Arm Cortex-M33
- Memory
- On-Chip Memory
- 1376kB SRAM (ECC)
- External Memory
- Up to 6.4GT/s x32 LPDDR5/LPDDR4X (with Inline ECC & Inline Encrpytion)
- 1x Octal SPI, including support for SPI NOR and SPI NAND memories
- Connectivity
- CAN FD
- UART/USART/Profibus, I²C, SPI
- Messaging Units (MU) to support IPC between heterogeneous cores
.. [1] NuttX is currently supported exclusively on the Cortex-M7 core of the
i.MX95
Serial Console
==============
The IMX95LPD5EVK-19 board features a high-speed USB-to-UART/MPSSE device,
FT4232H (U70) that provides a debug interface for the i.MX95 processor through
the USB type-C connector (J31). The device acts as a bridge to enable
communication between the target processor and the host computer, which
connects to the USB connector (J31) through a USB cable.
Channel A is used as UART port to provide USB-to-UART option for debugging the
Arm Cortex-M7 core of the i.MX 95 processor (default option).
J-Link External Debug Probe
===========================
The IMX95LPD5EVK-19 board provides a 2x5-pin Samtec FTSH-105-01-L-DV-K header
(J30) for connecting a JTAG debugger (external JTAG) for debugging the i.MX95
processor. The FT4234H JTAG provides the remote debug option for the i.MX95
processor.
Firmware location
=================
Instruction Tightly Coupled Memory (ITCM)
-----------------------------------------
The purpose of the Tightly-Coupled Memory (TCM) is to provide low-latency
memory that the processor can use without the unpredictability that is a
feature of caches. By default the firmware will be located in this area
(256K).
DDR
---
DDR memory can be used in case the code memory footprint becomes bigger than
the ITCM size. Using this configuration implies that other cores should be
aware of this.
For the default sd-card image from the EVK, these adaptations are needed on
the software running on the M33 and A55 cores.
- `System Manager <https://github.com/nxp-imx/imx-sm>`_ (M33) should give
the M7 access to the DDR region
- `linux-imx <https://github.com/nxp-imx/linux-imx>`_ (A55) should reserve
the DDR region by specifying it in the device tree so linux won't make
use of it
Configurations
==============
All the configurations can be used in combination with the default sd-card
image that is shipped with the EVK.
nsh
---
Configures the NuttShell (nsh) located at examples/nsh. This NSH
configuration is focused on low level, command-line driver testing. Built-in
applications are supported, but none are enabled. This configuration does not
support a network.
can
---
Configures the NuttShell (nsh) and also adds CAN support. CAN1 is enabled and
can be accessed at J17 on the EVK. Make sure that SW9[3] (PDM_CAN_SEL) is set
to ON. The configuration includes CAN utilities as candump and cansend.
.. note::
`System Manager <https://github.com/nxp-imx/imx-sm>`_ (M33) should give
the M7 access rights to the PIN_PDM_CLK (CAN1_TX) and
PIN_PDM_BIT_STREAM0 (CAN1_RX) pins in the mx95evk.cfg.
Alternatively these can be set manually in the system manager's console:
.. code-block:: console
>$ mm 0x443c01e0 0x6
>$ mm 0x443c01e4 0x6
rpmsg
-----
This configuration is similar to nsh but in addition it offers the Remote
Processing Messaging (RPMsg) service to enable heterogeneous inter-core
communication. A virtual UART (CONFIG_RPMSG_UART) is made available on which
an OS running on the A55 cores can connect. There is also an option to use
the filesystem client feature in which a remote directory can be mounted to
a local directory (CONFIG_FS_RPMSGFS).
.. note::
`linux-imx <https://github.com/nxp-imx/linux-imx>`_ (A55) needs the
NuttX compatible rpmsg_tty and rpmsg_fs drivers. See `dev mailing list
<https://www.mail-archive.com/dev@nuttx.apache.org/msg12112.html>`_

View file

@ -1,12 +0,0 @@
===================
NXP i.MX9
===================
Supported Boards
================
.. toctree::
:glob:
:maxdepth: 1
boards/*/*

View file

@ -813,83 +813,3 @@ Configures the board to use the SPI4 and enables RFID driver with MFRC522::
MOSI PE6
CS PE4
======== =====
lvgl
----
Configures the board to use display of 7 inch with lvgl example.
To verify if the display is functioning correctly, use the **fb** command. You should see the display change colors.::
nsh> fb
VideoInfo:
fmt: 11
xres: 1024
yres: 600
nplanes: 1
noverlays: 1
OverlayInfo (overlay 0):
fbmem: 0xc0000000
fblen: 1228800
stride: 2048
overlay: 0
bpp: 16
blank: 0
chromakey: 0x00000000
color: 0x00000000
transp: 0xff
mode: 0
area: (0,0) => (1024,600)
accl: 1
PlaneInfo (plane 0):
fbmem: 0xc0000000
fblen: 1228800
stride: 2048
display: 0
bpp: 16
Mapped FB: 0xc0000000
0: ( 0, 0) (1024,600)
1: ( 93, 54) (838,492)
2: (186,108) (652,384)
3: (279,162) (466,276)
4: (372,216) (280,168)
5: (465,270) ( 94, 60)
Test finished
Once the **fd** command work, run the lvgl exemple. ::
nsh> lvgldemo
**WARNING:** This example at the moment is not working correctly yet and have a bug fix to be done.
In the lvgl file **./apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_fbdev.c**
search the function **lv_nuttx_fbdev_set_file** and modify line 156 as follows:
dsc->mem_off_screen = malloc(data_size);
to
dsc->mem_off_screen = (void*)0xC00000000;
tone
----
This example demonstrates how to use PWM4 and Timer17 to play music using the Tone library and the board's buzzer.
socketcan
---------
This example demonstrates how to use the CAN-FD peripherals can0 and can1 with the SocketCAN protocol.::
# Configure the can0 and can1 to send messages
nsh> ifup can0
ifup can0...OK
nsh> ifup can1
ifup can1 ...OK
nsh> cansend can0 123#DEADBEEF
nsh> cansend can1 5A1#11.2233.44556677.88
# Reset the board and configure the can0 peripheral to receive messages
nsh> ifup can0
ifup can0...OK
nsh> candump can0
can0 051 [8] 00 11 22 33 44 55 66 77
can0 051 [16] 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF

View file

@ -1,158 +0,0 @@
===============
Raspberry Pi 4B
===============
The `Raspberry Pi 4B <https://www.raspberrypi.com/products/raspberry-pi-4-model-b/specifications/>`_ is an ARM64
hobbyist board created by Raspberry Pi.
.. figure:: raspberrypi-4b.png
:figwidth: 70%
:align: center
:alt: Raspberry Pi 4B board
Features
=========
- Broadcom BCM2711 @1.8GHz
- 1, 2, 4 and 8GB LPDDR4-3200 SDRAM models
- 2.4GHz and 5.0GHz IEEE 802.11ac wireless
- Bluetooth 5.0
- Gigabit Ethernet
- 2 USB 3.0 ports
- 2 USB 2.0 ports
- 2 micro-HDMI ports (4kp60)
- 2-lane MIPI DSI display port
- 2-lane MIPI CSI camera port
- 4-pole stereo audio and composite video port
- Micro SD card slot
ARM64 Toolchain
===============
Before building NuttX for the Raspberry Pi 4B, download the ARM64 Toolchain for
**AArch64 Bare-Metal Target** ``aarch64-none-elf`` from
`Arm GNU Toolchain Downloads <https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads>`_.
(Skip the section for Beta Releases.)
Add the downloaded toolchain ``gcc-arm-...-aarch64-none-elf/bin`` to the ``PATH`` Environment Variable.
If you are running Arch Linux, you can also get the toolchain by installing from the AUR:
.. code:: console
$ yay -S aarch64-none-elf-gcc-bin aarch64-none-elf-toolchain
Check the ARM64 Toolchain:
.. code:: console
$ aarch64-none-elf-gcc -v
Building
========
To build NuttX for the Raspberry Pi 4B, :doc:`install the prerequisites </quickstart/install>` and :doc:`clone the git
repositories </quickstart/install>` for ``nuttx`` and ``apps``.
Configure the NuttX project to use the Raspberry Pi 4B and build it (this example uses the ``nsh`` configuration).
.. code:: console
$ cd nutxx
$ tools/configure.sh raspberrypi-4b:nsh
$ make
Booting
========
In order to boot NuttX on the Raspberry Pi 4B, you will need to have a formatted micro SD card. The SD card should
contain a FAT32 partition that is marked as bootable and which contains the generated ``nuttx.bin`` and ``config.txt``
files from the build process. In addition to those files, you will also need the following files from the Raspberry Pi
repository for loading the image:
- `bcm2711-rpi-4-b.dtb <https://github.com/raspberrypi/firmware/blob/stable/boot/bcm2711-rpi-4-b.dtb>`_
- `fixup4.dat <https://github.com/raspberrypi/firmware/blob/stable/boot/fixup4.dat>`_
- `fixup4cd.dat <https://github.com/raspberrypi/firmware/blob/stable/boot/fixup4cd.dat>`_
- `fixup4db.dat <https://github.com/raspberrypi/firmware/blob/stable/boot/fixup4db.dat>`_
- `fixup4x.dat <https://github.com/raspberrypi/firmware/blob/stable/boot/fixup4x.dat>`_
- `start4.elf <https://github.com/raspberrypi/firmware/blob/stable/boot/start4.elf>`_
- `start4cd.elf <https://github.com/raspberrypi/firmware/blob/stable/boot/start4cd.elf>`_
- `start4db.elf <https://github.com/raspberrypi/firmware/blob/stable/boot/start4db.elf>`_
- `start4x.elf <https://github.com/raspberrypi/firmware/blob/stable/boot/start4x.elf>`_
You can download all of these files with the shell script in ``tools/bcm2711/bootfiles.sh``.
SD Card Formatting
------------------
Here is a list of ``fdisk`` commands for formatting the SD card on Linux. The tutorial assumes the SD card is at
``/dev/sda``, but you can find the location of your SD card with ``lsblk``. **Make very sure you verify that the name is
correct, or you can lose data by formatting a different device.**
.. code:: console
$ sudo fdisk /dev/sda
Print the partition table on the card with ``p`` to see what's there. If anything appears, continue to use the ``d``
command to remove all partitions.
- ``o`` to create a new, empty DOS partition table
- ``n`` to create a new partition
- ``p`` to make it primary
- Hit enter to select the default partition of "1"
- Hit enter for the default start and end sizes, which will use the full SD card size
- ``t`` to change the type of the partition (hit enter to select default of partition 1)
- ``c`` as the type, which is for Windows FAT32
- ``a`` to mark the partition as bootable
- ``w`` to write all the changes and save
Now when you run ``lsblk``, you should see ``/dev/sda1`` (or an equivalent for your SD card). That is the new partition
just created. Running the following command will then format the SD card to an empty FAT32 file system.
.. code:: console
$ sudo mkfs.vfat /dev/sda1
Once this completes, you can copy all of the aforementioned boot files, ``nuttx.bin`` and ``config.txt`` to your SD card
in your preferred way (through a file explorer or by using ``mount``).
Once all the files are copied, you can then eject the SD card and insert it onto your Raspberry Pi. The default console
is the Mini UART, which requires an adapter such as `USB to TTL serial converter cable
<https://www.adafruit.com/product/954>`_ to read. You should connect the ground to one of the Pi's ground pins, and then
connect the RX to GPIO 14 and TX to GPIO 15. **Do not connect the red power wire**.
Once the converter is connected and plugged into your host computer, you can open up a serial terminal of your choice. I
use Minicom. Then, power your Raspberry Pi 4B with a USB-C cable and wait for the Pi to boot and the NSH prompt to
appear onscreen:
.. code:: console
NuttShell (NSH) NuttX-12.6.0-RC0
nsh> uname -a
NuttX 12.6.0-RC0 c4f3a42131-dirty Aug 6 2024 21:17:01 arm64 raspberrypi-4b
nsh>
Board Peripheral Support
========================
SMP is currently unsupported.
NuttX for the Raspberry Pi 4 supports these on-board peripherals:
======================== =======
Peripheral Support
======================== =======
I2C Partial (able to read, that's it)
UART Mini UART yes, PL011 no
GPIO Partial
PWM No
SPI No
PCM No
AV port No
HDMI No
WiFi No
Ethernet No
USB 3.0 No
USB 2.0 No
Bluetooth No
======================== =======

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

View file

@ -1,18 +0,0 @@
=======
BCM2711
=======
The `BCM2711 <https://www.raspberrypi.com/documentation/computers/processors.html#bcm2711>`_ is a Broadcom SoC used for
the Raspberry Pi 4B board.
- **CPU:** Quad-core ARM Cortex-A72
- **Interrupt Controller:** GIC400
Supported Boards
================
.. toctree::
:glob:
:maxdepth: 1
boards/*/*

View file

@ -48,7 +48,7 @@ DMA No
EMAC No
GPADC Yes
GPIO Yes
I2C Yes
I2C No
I2S No
PWM No
SPI Yes

View file

@ -142,43 +142,6 @@ disables the NuttShell to get the best possible score.
.. note:: As the NSH is disabled, the application will start as soon as the
system is turned on.
efuse
-----
This configuration demonstrates the use of the eFuse driver. It can be accessed
through the ``/dev/efuse`` device file.
Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL`
option to prevent possible damages on chip.
The following snippet demonstrates how to read MAC address:
.. code-block:: C
int fd;
int ret;
uint8_t mac[6];
struct efuse_param_s param;
struct efuse_desc_s mac_addr =
{
.bit_offset = 1,
.bit_count = 48
};
const efuse_desc_t* desc[] =
{
&mac_addr,
NULL
};
param.field = desc;
param.size = 48;
param.data = mac;
fd = open("/dev/efuse", O_RDONLY);
ret = ioctl(fd, EFUSEIOC_READ_FIELD, &param);
To find offset and count variables for related eFuse,
please refer to Espressif's Technical Reference Manuals.
gpio
----
@ -208,18 +171,6 @@ You can scan for all I2C devices using the following command::
nsh> i2c dev 0x00 0x7f
nimble
------
This configuration can be used to test ble using the nimble library. The
``nimble`` example starts advertising and can be connected to or disconnected
from. Before starting the ``nimble`` example make sure the bnep0 interface is
up by issuing::
nsh> ifup bnep0
ifup bnep0...OK
nsh> nimble &
nsh
---

View file

@ -287,11 +287,11 @@ Peripheral Support NOTES
=========== ======= ====================
ADC No
AES No
Bluetooth Yes
Bluetooth No
CAN/TWAI Yes
CDC Console Yes Rev.3
DMA Yes
eFuse Yes Also virtual mode supported
eFuse No
GPIO Yes
I2C Yes
LED_PWM Yes

View file

@ -125,43 +125,6 @@ disables the NuttShell to get the best possible score.
.. note:: As the NSH is disabled, the application will start as soon as the
system is turned on.
efuse
-----
This configuration demonstrates the use of the eFuse driver. It can be accessed
through the ``/dev/efuse`` device file.
Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL`
option to prevent possible damages on chip.
The following snippet demonstrates how to read MAC address:
.. code-block:: C
int fd;
int ret;
uint8_t mac[6];
struct efuse_param_s param;
struct efuse_desc_s mac_addr =
{
.bit_offset = 1,
.bit_count = 48
};
const efuse_desc_t* desc[] =
{
&mac_addr,
NULL
};
param.field = desc;
param.size = 48;
param.data = mac;
fd = open("/dev/efuse", O_RDONLY);
ret = ioctl(fd, EFUSEIOC_READ_FIELD, &param);
To find offset and count variables for related eFuse,
please refer to Espressif's Technical Reference Manuals.
gpio
----

View file

@ -109,43 +109,6 @@ disables the NuttShell to get the best possible score.
.. note:: As the NSH is disabled, the application will start as soon as the
system is turned on.
efuse
-----
This configuration demonstrates the use of the eFuse driver. It can be accessed
through the ``/dev/efuse`` device file.
Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL`
option to prevent possible damages on chip.
The following snippet demonstrates how to read MAC address:
.. code-block:: C
int fd;
int ret;
uint8_t mac[6];
struct efuse_param_s param;
struct efuse_desc_s mac_addr =
{
.bit_offset = 1,
.bit_count = 48
};
const efuse_desc_t* desc[] =
{
&mac_addr,
NULL
};
param.field = desc;
param.size = 48;
param.data = mac;
fd = open("/dev/efuse", O_RDONLY);
ret = ioctl(fd, EFUSEIOC_READ_FIELD, &param);
To find offset and count variables for related eFuse,
please refer to Espressif's Technical Reference Manuals.
gpio
----

View file

@ -278,7 +278,7 @@ Bluetooth No
CAN/TWAI Yes
DMA Yes
ECC No
eFuse Yes
eFuse No
GPIO Yes
HMAC No
I2C Yes
@ -287,7 +287,7 @@ Int. Temp. No
LED No
LED_PWM Yes
MCPWM Yes
Pulse Counter Yes
Pulse Counter No
RMT No
RNG No
RSA No

View file

@ -108,43 +108,6 @@ disables the NuttShell to get the best possible score.
.. note:: As the NSH is disabled, the application will start as soon as the
system is turned on.
efuse
-----
This configuration demonstrates the use of the eFuse driver. It can be accessed
through the ``/dev/efuse`` device file.
Virtual eFuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL`
option to prevent possible damages on chip.
The following snippet demonstrates how to read MAC address:
.. code-block:: C
int fd;
int ret;
uint8_t mac[6];
struct efuse_param_s param;
struct efuse_desc_s mac_addr =
{
.bit_offset = 1,
.bit_count = 48
};
const efuse_desc_t* desc[] =
{
&mac_addr,
NULL
};
param.field = desc;
param.size = 48;
param.data = mac;
fd = open("/dev/efuse", O_RDONLY);
ret = ioctl(fd, EFUSEIOC_READ_FIELD, &param);
To find offset and count variables for related eFuse,
please refer to Espressif's Technical Reference Manuals.
gpio
----
@ -202,16 +165,6 @@ To test it, just execute the ``pwm`` application::
pwm_main: starting output with frequency: 10000 duty: 00008000
pwm_main: stopping output
qencoder
---
This configuration demostrates the use of Quadrature Encoder connected to pins
GPIO10 and GPIO11. You can start measurement of pulses using the following
command (by default, it will open ``\dev\qe0`` device and print 20 samples
using 1 second delay)::
nsh> qe
rmt
---

View file

@ -278,7 +278,7 @@ Bluetooth No
CAN/TWAI Yes
DMA Yes
ECC No
eFuse Yes
eFuse No
GPIO Yes
HMAC No
I2C Yes
@ -287,7 +287,7 @@ Int. Temp. No
LED No
LED_PWM Yes
MCPWM No
Pulse Counter Yes
Pulse Counter No
RMT No
RNG No
RSA No

View file

@ -358,14 +358,6 @@ Configures the NuttShell (nsh) located at examples/nsh. This NSH
configuration is focused on low-level, command-line driver testing.
This configuration is used for 32-bit RISC-V
python
------
Enables the Python interpreter for NuttX. This configuration is based on `netnsh`_.
For more information on how to build and run Python on NuttX,
please refer to the :doc:`Python Interpreter </applications/interpreters/python/index>` page.
nsh64
-----

View file

@ -761,16 +761,6 @@ To test it, just execute the ``pwm`` application::
pwm_main: starting output with frequency: 10000 duty: 00008000
pwm_main: stopping output
qencoder
---
This configuration demostrates the use of Quadrature Encoder connected to pins
GPIO10 and GPIO11. You can start measurement of pulses using the following
command (by default, it will open ``\dev\qe0`` device and print 20 samples
using 1 second delay)::
nsh> qe
random
------

View file

@ -340,7 +340,7 @@ I2C Yes
I2S Yes
LED_PWM Yes
MCPWM Yes
Pulse_CNT Yes
Pulse_CNT No
RMT Yes
RNG Yes
RSA No

View file

@ -312,16 +312,6 @@ ostest
This is the NuttX test at apps/testing/ostest that is run against all new
architecture ports to assure a correct implementation of the OS.
qencoder
---
This configuration demostrates the use of Quadrature Encoder connected to pins
GPIO10 and GPIO11. You can start measurement of pulses using the following
command (by default, it will open ``\dev\qe0`` device and print 20 samples
using 1 second delay)::
nsh> qe
pwm
------

View file

@ -326,7 +326,7 @@ GPIO Yes
I2C Yes
I2S Yes
LED_PWM No
Pulse_CNT Yes
Pulse_CNT No
RMT No
RNG Yes
RSA No

View file

@ -358,16 +358,6 @@ To test it, just run the ``oneshot`` example::
Waiting...
Finished
qencoder
---
This configuration demostrates the use of Quadrature Encoder connected to pins
GPIO10 and GPIO11. You can start measurement of pulses using the following
command (by default, it will open ``\dev\qe0`` device and print 20 samples
using 1 second delay)::
nsh> qe
pm
-------

View file

@ -363,7 +363,7 @@ I2S Yes
LCD No
LED_PWM No
MCPWM Yes
Pulse_CNT Yes
Pulse_CNT No
RMT No
RNG No
RSA No

View file

@ -158,7 +158,6 @@ config ARCH_XTENSA
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_THREAD_LOCAL
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_STDARG_H
select ARCH_HAVE_SETJMP if ARCH_TOOLCHAIN_GNU

View file

@ -183,20 +183,6 @@ config ARCH_CHIP_IMX6
---help---
Freescale iMX.6 architectures (Cortex-A9)
config ARCH_CHIP_IMX9_CORTEX_M
bool "NXP iMX.9 Cortex-M7"
select ARCH_CORTEXM7
select ARCH_HAVE_MPU
select ARCH_HAVE_FETCHADD
select ARCH_HAVE_RAMFUNCS
select ARCH_HAVE_TICKLESS
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_SPI_CS_CONTROL
select ARM_HAVE_MPU_UNIFIED
select ARMV7M_HAVE_STACKCHECK
---help---
iMX.9 architectures (Cortex-M7)
config ARCH_CHIP_IMXRT
bool "NXP/Freescale iMX.RT"
select ARCH_CORTEXM7
@ -1138,7 +1124,6 @@ config ARCH_CHIP
default "gd32f4" if ARCH_CHIP_GD32F4
default "imx1" if ARCH_CHIP_IMX1
default "imx6" if ARCH_CHIP_IMX6
default "imx9" if ARCH_CHIP_IMX9_CORTEX_M
default "imxrt" if ARCH_CHIP_IMXRT
default "kinetis" if ARCH_CHIP_KINETIS
default "kl" if ARCH_CHIP_KL
@ -1551,9 +1536,6 @@ endif
if ARCH_CHIP_IMX6
source "arch/arm/src/imx6/Kconfig"
endif
if ARCH_CHIP_IMX9_CORTEX_M
source "arch/arm/src/imx9/Kconfig"
endif
if ARCH_CHIP_IMXRT
source "arch/arm/src/imxrt/Kconfig"
endif

View file

@ -177,7 +177,7 @@ extern volatile bool g_interrupt_context[CONFIG_SMP_NCPUS];
/* Save the current interrupt enable state & disable IRQs. */
static inline_function irqstate_t up_irq_save(void)
static inline irqstate_t up_irq_save(void)
{
unsigned int flags;
unsigned int temp;
@ -194,7 +194,7 @@ static inline_function irqstate_t up_irq_save(void)
/* Restore saved IRQ & FIQ state */
static inline_function void up_irq_restore(irqstate_t flags)
static inline void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(
@ -206,7 +206,7 @@ static inline_function void up_irq_restore(irqstate_t flags)
/* Enable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_enable(void)
static inline irqstate_t up_irq_enable(void)
{
unsigned int flags;
unsigned int temp;
@ -256,25 +256,6 @@ static inline_function void up_set_interrupt_context(bool flag)
#endif
}
static inline_function uint32_t up_getsp(void)
{
register uint32_t sp;
__asm__ __volatile__
(
"mov %0, sp\n"
: "=r" (sp)
);
return sp;
}
static inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
/****************************************************************************
* Public Function Prototypes
****************************************************************************/

View file

@ -209,7 +209,8 @@ struct xcptcontext
/* Get/set the PRIMASK register */
static always_inline_function uint8_t getprimask(void)
static inline uint8_t getprimask(void) always_inline_function;
static inline uint8_t getprimask(void)
{
uint32_t primask;
__asm__ __volatile__
@ -222,7 +223,8 @@ static always_inline_function uint8_t getprimask(void)
return (uint8_t)primask;
}
static always_inline_function void setprimask(uint32_t primask)
static inline void setprimask(uint32_t primask) always_inline_function;
static inline void setprimask(uint32_t primask)
{
__asm__ __volatile__
(
@ -234,14 +236,16 @@ static always_inline_function void setprimask(uint32_t primask)
/* Disable IRQs */
static always_inline_function void up_irq_disable(void)
static inline void up_irq_disable(void) always_inline_function;
static inline void up_irq_disable(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
}
/* Save the current primask state & disable IRQs */
static always_inline_function irqstate_t up_irq_save(void)
static inline irqstate_t up_irq_save(void) always_inline_function;
static inline irqstate_t up_irq_save(void)
{
unsigned short primask;
@ -262,14 +266,16 @@ static always_inline_function irqstate_t up_irq_save(void)
/* Enable IRQs */
static always_inline_function void up_irq_enable(void)
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
}
/* Restore saved primask state */
static always_inline_function void up_irq_restore(irqstate_t flags)
static inline void up_irq_restore(irqstate_t flags) always_inline_function;
static inline void up_irq_restore(irqstate_t flags)
{
/* If bit 0 of the primask is 0, then we need to restore
* interrupts.
@ -285,7 +291,8 @@ static always_inline_function void up_irq_restore(irqstate_t flags)
/* Get/set IPSR */
static always_inline_function uint32_t getipsr(void)
static inline uint32_t getipsr(void) always_inline_function;
static inline uint32_t getipsr(void)
{
uint32_t ipsr;
__asm__ __volatile__
@ -300,7 +307,8 @@ static always_inline_function uint32_t getipsr(void)
/* Get/set CONTROL */
static always_inline_function uint32_t getcontrol(void)
static inline uint32_t getcontrol(void) always_inline_function;
static inline uint32_t getcontrol(void)
{
uint32_t control;
__asm__ __volatile__
@ -313,7 +321,8 @@ static always_inline_function uint32_t getcontrol(void)
return control;
}
static always_inline_function void setcontrol(uint32_t control)
static inline void setcontrol(uint32_t control) always_inline_function;
static inline void setcontrol(uint32_t control)
{
__asm__ __volatile__
(
@ -323,20 +332,6 @@ static always_inline_function void setcontrol(uint32_t control)
: "memory");
}
static always_inline_function uint32_t getpsp(void)
{
uint32_t psp;
__asm__ __volatile__
(
"\tmrs %0, psp\n"
: "=r" (psp)
:
: "memory");
return psp;
}
/****************************************************************************
* Name: up_cpu_index
*
@ -349,7 +344,7 @@ static always_inline_function uint32_t getpsp(void)
int up_cpu_index(void) noinstrument_function;
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
static always_inline_function uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
register uint32_t sp;
@ -362,13 +357,8 @@ static always_inline_function uint32_t up_getsp(void)
return sp;
}
static always_inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
static always_inline_function bool up_interrupt_context(void)
noinstrument_function
static inline_function bool up_interrupt_context(void)
{
return getipsr() != 0;
}

View file

@ -343,7 +343,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline_function irqstate_t irqstate(void)
static inline irqstate_t irqstate(void)
{
unsigned int cpsr;
@ -360,7 +360,7 @@ static inline_function irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
noinstrument_function static inline_function irqstate_t up_irq_save(void)
noinstrument_function static inline irqstate_t up_irq_save(void)
{
unsigned int cpsr;
@ -382,7 +382,7 @@ noinstrument_function static inline_function irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_enable(void)
static inline irqstate_t up_irq_enable(void)
{
unsigned int cpsr;
@ -406,7 +406,7 @@ static inline_function irqstate_t up_irq_enable(void)
/* Disable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_disable(void)
static inline irqstate_t up_irq_disable(void)
{
unsigned int cpsr;
@ -424,8 +424,7 @@ static inline_function irqstate_t up_irq_disable(void)
/* Restore saved IRQ & FIQ state */
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(
@ -473,12 +472,6 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
static inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
noinstrument_function
static inline_function void up_set_interrupt_context(bool flag)
{

View file

@ -267,7 +267,8 @@ struct xcptcontext
/* Get/set the PRIMASK register */
static always_inline_function uint8_t getprimask(void)
static inline uint8_t getprimask(void) always_inline_function;
static inline uint8_t getprimask(void)
{
uint32_t primask;
__asm__ __volatile__
@ -280,7 +281,8 @@ static always_inline_function uint8_t getprimask(void)
return (uint8_t)primask;
}
static always_inline_function void setprimask(uint32_t primask)
static inline void setprimask(uint32_t primask) always_inline_function;
static inline void setprimask(uint32_t primask)
{
__asm__ __volatile__
(
@ -290,12 +292,14 @@ static always_inline_function void setprimask(uint32_t primask)
: "memory");
}
static always_inline_function void cpsie(void)
static inline void cpsie(void) always_inline_function;
static inline void cpsie(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
}
static always_inline_function void cpsid(void)
static inline void cpsid(void) always_inline_function;
static inline void cpsid(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
}
@ -306,7 +310,8 @@ static always_inline_function void cpsid(void)
* lower priority level as the BASEPRI value.
*/
static always_inline_function uint8_t getbasepri(void)
static inline uint8_t getbasepri(void) always_inline_function;
static inline uint8_t getbasepri(void)
{
uint32_t basepri;
@ -320,7 +325,8 @@ static always_inline_function uint8_t getbasepri(void)
return (uint8_t)basepri;
}
static always_inline_function void setbasepri(uint32_t basepri)
static inline void setbasepri(uint32_t basepri) always_inline_function;
static inline void setbasepri(uint32_t basepri)
{
__asm__ __volatile__
(
@ -337,7 +343,8 @@ static always_inline_function void setbasepri(uint32_t basepri)
* 837070 Workaround may be required if we are raising the priority.
*/
static always_inline_function void raisebasepri(uint32_t basepri)
static inline void raisebasepri(uint32_t basepri) always_inline_function;
static inline void raisebasepri(uint32_t basepri)
{
register uint32_t primask;
@ -371,7 +378,8 @@ static always_inline_function void raisebasepri(uint32_t basepri)
/* Disable IRQs */
static always_inline_function void up_irq_disable(void)
static inline void up_irq_disable(void) always_inline_function;
static inline void up_irq_disable(void)
{
/* Probably raising priority */
@ -380,7 +388,9 @@ static always_inline_function void up_irq_disable(void)
/* Save the current primask state & disable IRQs */
static always_inline_function irqstate_t up_irq_save(void)
static inline irqstate_t up_irq_save(void)
always_inline_function noinstrument_function;
static inline irqstate_t up_irq_save(void)
{
/* Probably raising priority */
@ -391,7 +401,8 @@ static always_inline_function irqstate_t up_irq_save(void)
/* Enable IRQs */
static always_inline_function void up_irq_enable(void)
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
{
/* In this case, we are always retaining or lowering the priority value */
@ -401,7 +412,9 @@ static always_inline_function void up_irq_enable(void)
/* Restore saved primask state */
static always_inline_function void up_irq_restore(irqstate_t flags)
static inline void up_irq_restore(irqstate_t flags)
always_inline_function noinstrument_function;
static inline void up_irq_restore(irqstate_t flags)
{
/* In this case, we are always retaining or lowering the priority value */
@ -410,7 +423,8 @@ static always_inline_function void up_irq_restore(irqstate_t flags)
/* Get/set IPSR */
static always_inline_function uint32_t getipsr(void)
static inline uint32_t getipsr(void) always_inline_function;
static inline uint32_t getipsr(void)
{
uint32_t ipsr;
__asm__ __volatile__
@ -425,7 +439,8 @@ static always_inline_function uint32_t getipsr(void)
/* Get/set FAULTMASK */
static always_inline_function uint32_t getfaultmask(void)
static inline uint32_t getfaultmask(void) always_inline_function;
static inline uint32_t getfaultmask(void)
{
uint32_t faultmask;
__asm__ __volatile__
@ -438,7 +453,8 @@ static always_inline_function uint32_t getfaultmask(void)
return faultmask;
}
static always_inline_function void setfaultmask(uint32_t faultmask)
static inline void setfaultmask(uint32_t faultmask) always_inline_function;
static inline void setfaultmask(uint32_t faultmask)
{
__asm__ __volatile__
(
@ -450,7 +466,8 @@ static always_inline_function void setfaultmask(uint32_t faultmask)
/* Get/set CONTROL */
static always_inline_function uint32_t getcontrol(void)
static inline uint32_t getcontrol(void) always_inline_function;
static inline uint32_t getcontrol(void)
{
uint32_t control;
__asm__ __volatile__
@ -463,7 +480,8 @@ static always_inline_function uint32_t getcontrol(void)
return control;
}
static always_inline_function void setcontrol(uint32_t control)
static inline void setcontrol(uint32_t control) always_inline_function;
static inline void setcontrol(uint32_t control)
{
__asm__ __volatile__
(
@ -473,20 +491,6 @@ static always_inline_function void setcontrol(uint32_t control)
: "memory");
}
static always_inline_function uint32_t getpsp(void)
{
uint32_t psp;
__asm__ __volatile__
(
"\tmrs %0, psp\n"
: "=r" (psp)
:
: "memory");
return psp;
}
/****************************************************************************
* Name: up_cpu_index
*
@ -499,7 +503,7 @@ static always_inline_function uint32_t getpsp(void)
int up_cpu_index(void) noinstrument_function;
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
static always_inline_function uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
register uint32_t sp;
@ -512,13 +516,8 @@ static always_inline_function uint32_t up_getsp(void)
return sp;
}
static always_inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
static always_inline_function bool up_interrupt_context(void)
noinstrument_function
static inline_function bool up_interrupt_context(void)
{
return getipsr() != 0;
}

View file

@ -342,7 +342,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline_function irqstate_t irqstate(void)
static inline irqstate_t irqstate(void)
{
unsigned int cpsr;
@ -359,7 +359,7 @@ static inline_function irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
noinstrument_function static inline_function irqstate_t up_irq_save(void)
noinstrument_function static inline irqstate_t up_irq_save(void)
{
unsigned int cpsr;
@ -380,7 +380,7 @@ noinstrument_function static inline_function irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_enable(void)
static inline irqstate_t up_irq_enable(void)
{
unsigned int cpsr;
@ -401,7 +401,7 @@ static inline_function irqstate_t up_irq_enable(void)
/* Disable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_disable(void)
static inline irqstate_t up_irq_disable(void)
{
unsigned int cpsr;
@ -419,8 +419,7 @@ static inline_function irqstate_t up_irq_disable(void)
/* Restore saved IRQ & FIQ state */
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(
@ -468,12 +467,6 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
static inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
noinstrument_function
static inline_function void up_set_interrupt_context(bool flag)
{

View file

@ -278,7 +278,8 @@ struct xcptcontext
/* Get/set the PRIMASK register */
static always_inline_function uint8_t getprimask(void)
static inline uint8_t getprimask(void) always_inline_function;
static inline uint8_t getprimask(void)
{
uint32_t primask;
__asm__ __volatile__
@ -291,7 +292,8 @@ static always_inline_function uint8_t getprimask(void)
return (uint8_t)primask;
}
static always_inline_function void setprimask(uint32_t primask)
static inline void setprimask(uint32_t primask) always_inline_function;
static inline void setprimask(uint32_t primask)
{
__asm__ __volatile__
(
@ -301,12 +303,14 @@ static always_inline_function void setprimask(uint32_t primask)
: "memory");
}
static always_inline_function void cpsie(void)
static inline void cpsie(void) always_inline_function;
static inline void cpsie(void)
{
__asm__ __volatile__ ("\tcpsie i\n");
}
static always_inline_function void cpsid(void)
static inline void cpsid(void) always_inline_function;
static inline void cpsid(void)
{
__asm__ __volatile__ ("\tcpsid i\n");
}
@ -317,7 +321,8 @@ static always_inline_function void cpsid(void)
* lower priority level as the BASEPRI value.
*/
static always_inline_function uint8_t getbasepri(void)
static inline uint8_t getbasepri(void) always_inline_function;
static inline uint8_t getbasepri(void)
{
uint32_t basepri;
@ -331,7 +336,8 @@ static always_inline_function uint8_t getbasepri(void)
return (uint8_t)basepri;
}
static always_inline_function void setbasepri(uint32_t basepri)
static inline void setbasepri(uint32_t basepri) always_inline_function;
static inline void setbasepri(uint32_t basepri)
{
__asm__ __volatile__
(
@ -345,7 +351,8 @@ static always_inline_function void setbasepri(uint32_t basepri)
/* Disable IRQs */
static always_inline_function void up_irq_disable(void)
static inline void up_irq_disable(void) always_inline_function;
static inline void up_irq_disable(void)
{
/* Probably raising priority */
@ -354,7 +361,9 @@ static always_inline_function void up_irq_disable(void)
/* Save the current primask state & disable IRQs */
static always_inline_function irqstate_t up_irq_save(void)
static inline irqstate_t up_irq_save(void)
always_inline_function noinstrument_function;
static inline irqstate_t up_irq_save(void)
{
/* Probably raising priority */
@ -365,7 +374,8 @@ static always_inline_function irqstate_t up_irq_save(void)
/* Enable IRQs */
static always_inline_function void up_irq_enable(void)
static inline void up_irq_enable(void) always_inline_function;
static inline void up_irq_enable(void)
{
/* In this case, we are always retaining or lowering the priority value */
@ -375,8 +385,9 @@ static always_inline_function void up_irq_enable(void)
/* Restore saved primask state */
static always_inline_function
void up_irq_restore(irqstate_t flags)
static inline void up_irq_restore(irqstate_t flags)
always_inline_function noinstrument_function;
static inline void up_irq_restore(irqstate_t flags)
{
/* In this case, we are always retaining or lowering the priority value */
@ -385,7 +396,8 @@ void up_irq_restore(irqstate_t flags)
/* Get/set IPSR */
static always_inline_function uint32_t getipsr(void)
static inline uint32_t getipsr(void) always_inline_function;
static inline uint32_t getipsr(void)
{
uint32_t ipsr;
__asm__ __volatile__
@ -400,7 +412,8 @@ static always_inline_function uint32_t getipsr(void)
/* Get/set FAULTMASK */
static always_inline_function uint32_t getfaultmask(void)
static inline uint32_t getfaultmask(void) always_inline_function;
static inline uint32_t getfaultmask(void)
{
uint32_t faultmask;
__asm__ __volatile__
@ -413,7 +426,8 @@ static always_inline_function uint32_t getfaultmask(void)
return faultmask;
}
static always_inline_function void setfaultmask(uint32_t faultmask)
static inline void setfaultmask(uint32_t faultmask) always_inline_function;
static inline void setfaultmask(uint32_t faultmask)
{
__asm__ __volatile__
(
@ -425,7 +439,8 @@ static always_inline_function void setfaultmask(uint32_t faultmask)
/* Get/set CONTROL */
static always_inline_function uint32_t getcontrol(void)
static inline uint32_t getcontrol(void) always_inline_function;
static inline uint32_t getcontrol(void)
{
uint32_t control;
__asm__ __volatile__
@ -438,7 +453,8 @@ static always_inline_function uint32_t getcontrol(void)
return control;
}
static always_inline_function void setcontrol(uint32_t control)
static inline void setcontrol(uint32_t control) always_inline_function;
static inline void setcontrol(uint32_t control)
{
__asm__ __volatile__
(
@ -448,20 +464,6 @@ static always_inline_function void setcontrol(uint32_t control)
: "memory");
}
static always_inline_function uint32_t getpsp(void)
{
uint32_t psp;
__asm__ __volatile__
(
"\tmrs %0, psp\n"
: "=r" (psp)
:
: "memory");
return psp;
}
/****************************************************************************
* Name: up_cpu_index
*
@ -474,7 +476,7 @@ static always_inline_function uint32_t getpsp(void)
int up_cpu_index(void) noinstrument_function;
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
static always_inline_function uint32_t up_getsp(void)
static inline_function uint32_t up_getsp(void)
{
uint32_t sp;
@ -487,13 +489,8 @@ static always_inline_function uint32_t up_getsp(void)
return sp;
}
static always_inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
static always_inline_function bool up_interrupt_context(void)
noinstrument_function
static inline_function bool up_interrupt_context(void)
{
return getipsr() != 0;
}

View file

@ -342,7 +342,7 @@ struct xcptcontext
/* Return the current IRQ state */
static inline_function irqstate_t irqstate(void)
static inline irqstate_t irqstate(void)
{
unsigned int cpsr;
@ -359,7 +359,7 @@ static inline_function irqstate_t irqstate(void)
/* Disable IRQs and return the previous IRQ state */
noinstrument_function static inline_function irqstate_t up_irq_save(void)
noinstrument_function static inline irqstate_t up_irq_save(void)
{
unsigned int cpsr;
@ -380,7 +380,7 @@ noinstrument_function static inline_function irqstate_t up_irq_save(void)
/* Enable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_enable(void)
static inline irqstate_t up_irq_enable(void)
{
unsigned int cpsr;
@ -401,7 +401,7 @@ static inline_function irqstate_t up_irq_enable(void)
/* Disable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_disable(void)
static inline irqstate_t up_irq_disable(void)
{
unsigned int cpsr;
@ -419,8 +419,7 @@ static inline_function irqstate_t up_irq_disable(void)
/* Restore saved IRQ & FIQ state */
noinstrument_function static inline_function
void up_irq_restore(irqstate_t flags)
noinstrument_function static inline void up_irq_restore(irqstate_t flags)
{
__asm__ __volatile__
(
@ -468,12 +467,6 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
static inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
noinstrument_function
static inline_function void up_set_interrupt_context(bool flag)
{

View file

@ -1,52 +0,0 @@
/****************************************************************************
* arch/arm/include/imx9/chip.h
*
* SPDX-License-Identifier: Apache-2.0
* SPDX-FileCopyrightText: 2024 NXP
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*
****************************************************************************/
#ifndef __ARCH_ARM_INCLUDE_IMX9_CHIP_H
#define __ARCH_ARM_INCLUDE_IMX9_CHIP_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* NVIC priority levels *****************************************************/
/* Each priority field holds an 8-bit priority value, 0-15. The lower the
* value, the greater the priority of the corresponding interrupt. The i.MX
* RT processor implements only bits[7:4] of each field, bits[3:0] read as
* zero and ignore writes.
*/
#define NVIC_SYSH_PRIORITY_MIN 0xf0 /* All bits[7:4] set is min pri */
#define NVIC_SYSH_PRIORITY_DEFAULT 0x80 /* Midpoint is the default */
#define NVIC_SYSH_PRIORITY_MAX 0x00 /* Zero is maximum priority */
#define NVIC_SYSH_PRIORITY_STEP 0x40 /* Two bits of interrupt pri used */
#define IMX9_GPIO_NPORTS 4
#endif /* __ARCH_ARM_INCLUDE_IMX9_CHIP_H */

View file

@ -1,420 +0,0 @@
/****************************************************************************
* arch/arm/include/imx9/imx95_irq.h
*
* SPDX-License-Identifier: Apache-2.0
* SPDX-FileCopyrightText: 2024 NXP
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*
****************************************************************************/
#ifndef __ARCH_ARM_INCLUDE_IMX9_IMX95_IRQ_H
#define __ARCH_ARM_INCLUDE_IMX9_IMX95_IRQ_H
#define IMX9_IRQ_RESERVED16 (IMX9_IRQ_EXTINT + 0) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED17 (IMX9_IRQ_EXTINT + 1) /* DAP interrupt */
#define IMX9_IRQ_RESERVED18 (IMX9_IRQ_EXTINT + 2) /* CTI trigger outputs from CM7 platform */
#define IMX9_IRQ_RESERVED19 (IMX9_IRQ_EXTINT + 3) /* CTI trigger outputs from CM33 platform */
#define IMX9_IRQ_RESERVED20 (IMX9_IRQ_EXTINT + 4) /* CTI trigger outputs from CA55 platform */
#define IMX9_IRQ_RESERVED21 (IMX9_IRQ_EXTINT + 5) /* Performance Unit Interrupts from CA55 platform */
#define IMX9_IRQ_RESERVED22 (IMX9_IRQ_EXTINT + 6) /* ECC error from CA55 platform cache */
#define IMX9_IRQ_RESERVED23 (IMX9_IRQ_EXTINT + 7) /* 1-bit or 2-bit ECC or Parity error from CA55 platform cache */
#define IMX9_IRQ_CAN1 (IMX9_IRQ_EXTINT + 8) /* CAN1 interrupt */
#define IMX9_IRQ_CAN1_ERROR (IMX9_IRQ_EXTINT + 9) /* CAN1 error interrupt */
#define IMX9_IRQ_GPIO1_0 (IMX9_IRQ_EXTINT + 10) /* General Purpose Input/Output 1 interrupt 0 */
#define IMX9_IRQ_GPIO1_1 (IMX9_IRQ_EXTINT + 11) /* General Purpose Input/Output 1 interrupt 1 */
#define IMX9_IRQ_I3C1 (IMX9_IRQ_EXTINT + 12) /* Improved Inter-Integrated Circuit 1 interrupt */
#define IMX9_IRQ_LPI2C1 (IMX9_IRQ_EXTINT + 13) /* Low Power Inter-Integrated Circuit module 1 */
#define IMX9_IRQ_LPI2C2 (IMX9_IRQ_EXTINT + 14) /* Low Power Inter-Integrated Circuit module 2 */
#define IMX9_IRQ_LPIT1 (IMX9_IRQ_EXTINT + 15) /* Low Power Periodic Interrupt Timer 1 */
#define IMX9_IRQ_LPSPI1 (IMX9_IRQ_EXTINT + 16) /* Low Power Serial Peripheral Interface 1 */
#define IMX9_IRQ_LPSPI2 (IMX9_IRQ_EXTINT + 17) /* Low Power Serial Peripheral Interface 2 */
#define IMX9_IRQ_LPTMR1 (IMX9_IRQ_EXTINT + 18) /* Low Power Timer 1 */
#define IMX9_IRQ_LPUART1 (IMX9_IRQ_EXTINT + 19) /* Low Power UART 1 */
#define IMX9_IRQ_LPUART2 (IMX9_IRQ_EXTINT + 20) /* Low Power UART 2 */
#define IMX9_IRQ_RESERVED37 (IMX9_IRQ_EXTINT + 21) /* AONMIX Sentinel MU0 SideA interrupt */
#define IMX9_IRQ_RESERVED38 (IMX9_IRQ_EXTINT + 22) /* AONMIX Sentinel MU1 SideA interrupt */
#define IMX9_IRQ_RESERVED39 (IMX9_IRQ_EXTINT + 23) /* AONMIX Sentinel MU2 SideA interrupt */
#define IMX9_IRQ_RESERVED40 (IMX9_IRQ_EXTINT + 24) /* AONMIX Sentinel MU3 SideA interrupt */
#define IMX9_IRQ_RESERVED41 (IMX9_IRQ_EXTINT + 25) /* AONMIX Sentinel MU4 SideA interrupt */
#define IMX9_IRQ_RESERVED42 (IMX9_IRQ_EXTINT + 26) /* AONMIX Sentinel MU5 SideA interrupt */
#define IMX9_IRQ_V2X_FH_APCH0 (IMX9_IRQ_EXTINT + 27) /* V2X-FH MU APCH0 (APP0) interrupt */
#define IMX9_IRQ_V2X_FH_APHSM1 (IMX9_IRQ_EXTINT + 28) /* V2X-FH MU APHSM1 (HSM1) interrupt */
#define IMX9_IRQ_TPM1 (IMX9_IRQ_EXTINT + 29) /* Timer PWM module 1 */
#define IMX9_IRQ_TPM2 (IMX9_IRQ_EXTINT + 30) /* Timer PWM module 2 */
#define IMX9_IRQ_WDOG1 (IMX9_IRQ_EXTINT + 31) /* Watchdog 1 Interrupt */
#define IMX9_IRQ_WDOG2 (IMX9_IRQ_EXTINT + 32) /* Watchdog 2 Interrupt */
#define IMX9_IRQ_TRDC_MGR_A (IMX9_IRQ_EXTINT + 33) /* AONMIX TRDC transfer error interrupt */
#define IMX9_IRQ_SAI1 (IMX9_IRQ_EXTINT + 34) /* Serial Audio Interface 1 */
#define IMX9_IRQ_RESERVED51 (IMX9_IRQ_EXTINT + 35) /* AONMIX M33 PS Error */
#define IMX9_IRQ_RESERVED52 (IMX9_IRQ_EXTINT + 36) /* AONMIX M33 TCM Error interrupt */
#define IMX9_IRQ_RESERVED53 (IMX9_IRQ_EXTINT + 37) /* M7MIX ECC Multi-bit error */
#define IMX9_IRQ_CAN2 (IMX9_IRQ_EXTINT + 38) /* CAN2 interrupt */
#define IMX9_IRQ_CAN2_ERROR (IMX9_IRQ_EXTINT + 39) /* CAN2 error interrupt */
#define IMX9_IRQ_CAN3 (IMX9_IRQ_EXTINT + 40) /* CAN3 interrupt */
#define IMX9_IRQ_CAN3_ERROR (IMX9_IRQ_EXTINT + 41) /* CAN3 error interrupt */
#define IMX9_IRQ_CAN4 (IMX9_IRQ_EXTINT + 42) /* CAN4 interrupt */
#define IMX9_IRQ_CAN4_ERROR (IMX9_IRQ_EXTINT + 43) /* CAN4 error interrupt */
#define IMX9_IRQ_CAN5 (IMX9_IRQ_EXTINT + 44) /* CAN5 interrupt */
#define IMX9_IRQ_CAN5_ERROR (IMX9_IRQ_EXTINT + 45) /* CAN5 error interrupt */
#define IMX9_IRQ_FLEXIO1 (IMX9_IRQ_EXTINT + 46) /* Flexible IO 1 interrupt */
#define IMX9_IRQ_FLEXIO2 (IMX9_IRQ_EXTINT + 47) /* Flexible IO 2 interrupt */
#define IMX9_IRQ_FlexSPI1 (IMX9_IRQ_EXTINT + 48) /* FlexSPI controller interface interrupt 1 */
#define IMX9_IRQ_GPIO2_0 (IMX9_IRQ_EXTINT + 49) /* General Purpose Input/Output 2 interrupt 0 */
#define IMX9_IRQ_GPIO2_1 (IMX9_IRQ_EXTINT + 50) /* General Purpose Input/Output 2 interrupt 1 */
#define IMX9_IRQ_GPIO3_0 (IMX9_IRQ_EXTINT + 51) /* General Purpose Input/Output 3 interrupt 0 */
#define IMX9_IRQ_GPIO3_1 (IMX9_IRQ_EXTINT + 52) /* General Purpose Input/Output 3 interrupt 1 */
#define IMX9_IRQ_GPIO4_0 (IMX9_IRQ_EXTINT + 53) /* General Purpose Input/Output 4 interrupt 0 */
#define IMX9_IRQ_GPIO4_1 (IMX9_IRQ_EXTINT + 54) /* General Purpose Input/Output 4 interrupt 1 */
#define IMX9_IRQ_GPIO5_0 (IMX9_IRQ_EXTINT + 55) /* General Purpose Input/Output 5 interrupt 0 */
#define IMX9_IRQ_GPIO5_1 (IMX9_IRQ_EXTINT + 56) /* General Purpose Input/Output 5 interrupt 1 */
#define IMX9_IRQ_I3C2 (IMX9_IRQ_EXTINT + 57) /* Improved Inter-Integrated Circuit 2 interrupt */
#define IMX9_IRQ_LPI2C3 (IMX9_IRQ_EXTINT + 58) /* Low Power Inter-Integrated Circuit module 3 */
#define IMX9_IRQ_LPI2C4 (IMX9_IRQ_EXTINT + 59) /* Low Power Inter-Integrated Circuit module 4 */
#define IMX9_IRQ_LPIT2 (IMX9_IRQ_EXTINT + 60) /* Low Power Periodic Interrupt Timer 2 */
#define IMX9_IRQ_LPSPI3 (IMX9_IRQ_EXTINT + 61) /* Low Power Serial Peripheral Interface 3 */
#define IMX9_IRQ_LPSPI4 (IMX9_IRQ_EXTINT + 62) /* Low Power Serial Peripheral Interface 4 */
#define IMX9_IRQ_LPTMR2 (IMX9_IRQ_EXTINT + 63) /* Low Power Timer 2 */
#define IMX9_IRQ_LPUART3 (IMX9_IRQ_EXTINT + 64) /* Low Power UART 3 */
#define IMX9_IRQ_LPUART4 (IMX9_IRQ_EXTINT + 65) /* Low Power UART 4 */
#define IMX9_IRQ_LPUART5 (IMX9_IRQ_EXTINT + 66) /* Low Power UART 5 */
#define IMX9_IRQ_LPUART6 (IMX9_IRQ_EXTINT + 67) /* Low Power UART 6 */
#define IMX9_IRQ_LPUART7 (IMX9_IRQ_EXTINT + 68) /* Low Power UART 7 */
#define IMX9_IRQ_LPUART8 (IMX9_IRQ_EXTINT + 69) /* Low Power UART 8 */
#define IMX9_IRQ_RESERVED86 (IMX9_IRQ_EXTINT + 70) /* MTR Master error interrupt */
#define IMX9_IRQ_RESERVED87 (IMX9_IRQ_EXTINT + 71) /* BBNSM Non-Secure interrupt */
#define IMX9_IRQ_RESERVED88 (IMX9_IRQ_EXTINT + 72) /* System Counter compare interrupt */
#define IMX9_IRQ_TPM3 (IMX9_IRQ_EXTINT + 73) /* Timer PWM module 3 */
#define IMX9_IRQ_TPM4 (IMX9_IRQ_EXTINT + 74) /* Timer PWM module 4 */
#define IMX9_IRQ_TPM5 (IMX9_IRQ_EXTINT + 75) /* Timer PWM module 5 */
#define IMX9_IRQ_TPM6 (IMX9_IRQ_EXTINT + 76) /* Timer PWM module 6 */
#define IMX9_IRQ_WDOG3 (IMX9_IRQ_EXTINT + 77) /* Watchdog 3 Interrupt */
#define IMX9_IRQ_WDOG4 (IMX9_IRQ_EXTINT + 78) /* Watchdog 4 Interrupt */
#define IMX9_IRQ_WDOG5 (IMX9_IRQ_EXTINT + 79) /* Watchdog 5 Interrupt */
#define IMX9_IRQ_TMPSNS1_THR1 (IMX9_IRQ_EXTINT + 80) /* ANAMIX TempSensor non-secure interrupt from Threshold 1 */
#define IMX9_IRQ_TMPSNS1_THR2 (IMX9_IRQ_EXTINT + 81) /* ANAMIX TempSensor non-secure interrupt from Threshold 2 */
#define IMX9_IRQ_TMPSNS1_DRDY (IMX9_IRQ_EXTINT + 82) /* ANAMIX TempSensor non-secure data ready interrupt */
#define IMX9_IRQ_TMPSNS2_THR1 (IMX9_IRQ_EXTINT + 83) /* CORTEXAMIX TempSensor non-secure interrupt from Threshold 1 */
#define IMX9_IRQ_TMPSNS2_THR2 (IMX9_IRQ_EXTINT + 84) /* CORTEXAMIX TempSensor non-secure interrupt from Threshold 2 */
#define IMX9_IRQ_TMPSNS2_DRDY (IMX9_IRQ_EXTINT + 85) /* CORTEXAMIX TempSensor non-secure data ready interrupt */
#define IMX9_IRQ_uSDHC1 (IMX9_IRQ_EXTINT + 86) /* ultra Secure Digital Host Controller interrupt 1 */
#define IMX9_IRQ_uSDHC2 (IMX9_IRQ_EXTINT + 87) /* ultra Secure Digital Host Controller interrupt 2 */
#define IMX9_IRQ_RESERVED104 (IMX9_IRQ_EXTINT + 88) /* MEGAMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED105 (IMX9_IRQ_EXTINT + 89) /* NIC_WRAPPER TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED106 (IMX9_IRQ_EXTINT + 90) /* NOCMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED107 (IMX9_IRQ_EXTINT + 91) /* DRAM controller Performance Monitor Interrupt */
#define IMX9_IRQ_RESERVED108 (IMX9_IRQ_EXTINT + 92) /* DRAM controller Critical Interrupt */
#define IMX9_IRQ_RESERVED109 (IMX9_IRQ_EXTINT + 93) /* DRAM Phy Critical Interrupt */
#define IMX9_IRQ_RESERVED110 (IMX9_IRQ_EXTINT + 94) /* Reserved */
#define IMX9_IRQ_DMA3_ERROR (IMX9_IRQ_EXTINT + 95) /* eDMA1 error interrupt */
#define IMX9_IRQ_DMA3_0 (IMX9_IRQ_EXTINT + 96) /* eDMA1 channel 0 interrupt */
#define IMX9_IRQ_DMA3_1 (IMX9_IRQ_EXTINT + 97) /* eDMA1 channel 1 interrupt */
#define IMX9_IRQ_DMA3_2 (IMX9_IRQ_EXTINT + 98) /* eDMA1 channel 2 interrupt */
#define IMX9_IRQ_DMA3_3 (IMX9_IRQ_EXTINT + 99) /* eDMA1 channel 3 interrupt */
#define IMX9_IRQ_DMA3_4 (IMX9_IRQ_EXTINT + 100) /* eDMA1 channel 4 interrupt */
#define IMX9_IRQ_DMA3_5 (IMX9_IRQ_EXTINT + 101) /* eDMA1 channel 5 interrupt */
#define IMX9_IRQ_DMA3_6 (IMX9_IRQ_EXTINT + 102) /* eDMA1 channel 6 interrupt */
#define IMX9_IRQ_DMA3_7 (IMX9_IRQ_EXTINT + 103) /* eDMA1 channel 7 interrupt */
#define IMX9_IRQ_DMA3_8 (IMX9_IRQ_EXTINT + 104) /* eDMA1 channel 8 interrupt */
#define IMX9_IRQ_DMA3_9 (IMX9_IRQ_EXTINT + 105) /* eDMA1 channel 9 interrupt */
#define IMX9_IRQ_DMA3_10 (IMX9_IRQ_EXTINT + 106) /* eDMA1 channel 10 interrupt */
#define IMX9_IRQ_DMA3_11 (IMX9_IRQ_EXTINT + 107) /* eDMA1 channel 11 interrupt */
#define IMX9_IRQ_DMA3_12 (IMX9_IRQ_EXTINT + 108) /* eDMA1 channel 12 interrupt */
#define IMX9_IRQ_DMA3_13 (IMX9_IRQ_EXTINT + 109) /* eDMA1 channel 13 interrupt */
#define IMX9_IRQ_DMA3_14 (IMX9_IRQ_EXTINT + 110) /* eDMA1 channel 14 interrupt */
#define IMX9_IRQ_DMA3_15 (IMX9_IRQ_EXTINT + 111) /* eDMA1 channel 15 interrupt */
#define IMX9_IRQ_DMA3_16 (IMX9_IRQ_EXTINT + 112) /* eDMA1 channel 16 interrupt */
#define IMX9_IRQ_DMA3_17 (IMX9_IRQ_EXTINT + 113) /* eDMA1 channel 17 interrupt */
#define IMX9_IRQ_DMA3_18 (IMX9_IRQ_EXTINT + 114) /* eDMA1 channel 18 interrupt */
#define IMX9_IRQ_DMA3_19 (IMX9_IRQ_EXTINT + 115) /* eDMA1 channel 19 interrupt */
#define IMX9_IRQ_DMA3_20 (IMX9_IRQ_EXTINT + 116) /* eDMA1 channel 20 interrupt */
#define IMX9_IRQ_DMA3_21 (IMX9_IRQ_EXTINT + 117) /* eDMA1 channel 21 interrupt */
#define IMX9_IRQ_DMA3_22 (IMX9_IRQ_EXTINT + 118) /* eDMA1 channel 22 interrupt */
#define IMX9_IRQ_DMA3_23 (IMX9_IRQ_EXTINT + 119) /* eDMA1 channel 23 interrupt */
#define IMX9_IRQ_DMA3_24 (IMX9_IRQ_EXTINT + 120) /* eDMA1 channel 24 interrupt */
#define IMX9_IRQ_DMA3_25 (IMX9_IRQ_EXTINT + 121) /* eDMA1 channel 25 interrupt */
#define IMX9_IRQ_DMA3_26 (IMX9_IRQ_EXTINT + 122) /* eDMA1 channel 26 interrupt */
#define IMX9_IRQ_DMA3_27 (IMX9_IRQ_EXTINT + 123) /* eDMA1 channel 27 interrupt */
#define IMX9_IRQ_DMA3_28 (IMX9_IRQ_EXTINT + 124) /* eDMA1 channel 28 interrupt */
#define IMX9_IRQ_DMA3_29 (IMX9_IRQ_EXTINT + 125) /* eDMA1 channel 29 interrupt */
#define IMX9_IRQ_DMA3_30 (IMX9_IRQ_EXTINT + 126) /* eDMA1 channel 30 interrupt */
#define IMX9_IRQ_DMA5_2_ERROR (IMX9_IRQ_EXTINT + 127) /* eDMA2 error interrupt */
#define IMX9_IRQ_DMA5_2_0_1 (IMX9_IRQ_EXTINT + 128) /* eDMA2 channel 0/1 interrupt */
#define IMX9_IRQ_DMA5_2_2_3 (IMX9_IRQ_EXTINT + 129) /* eDMA2 channel 2/3 interrupt */
#define IMX9_IRQ_DMA5_2_4_5 (IMX9_IRQ_EXTINT + 130) /* eDMA2 channel 4/5 interrupt */
#define IMX9_IRQ_DMA5_2_6_7 (IMX9_IRQ_EXTINT + 131) /* eDMA2 channel 6/7 interrupt */
#define IMX9_IRQ_DMA5_2_8_9 (IMX9_IRQ_EXTINT + 132) /* eDMA2 channel 8/9 interrupt */
#define IMX9_IRQ_DMA5_2_10_11 (IMX9_IRQ_EXTINT + 133) /* eDMA2 channel 10/11 interrupt */
#define IMX9_IRQ_DMA5_2_12_13 (IMX9_IRQ_EXTINT + 134) /* eDMA2 channel 12/13 interrupt */
#define IMX9_IRQ_DMA5_2_14_15 (IMX9_IRQ_EXTINT + 135) /* eDMA2 channel 14/15 interrupt */
#define IMX9_IRQ_DMA5_2_16_17 (IMX9_IRQ_EXTINT + 136) /* eDMA2 channel 16/17 interrupt */
#define IMX9_IRQ_DMA5_2_18_19 (IMX9_IRQ_EXTINT + 137) /* eDMA2 channel 18/19 interrupt */
#define IMX9_IRQ_DMA5_2_20_21 (IMX9_IRQ_EXTINT + 138) /* eDMA2 channel 20/21 interrupt */
#define IMX9_IRQ_DMA5_2_22_23 (IMX9_IRQ_EXTINT + 139) /* eDMA2 channel 22/23 interrupt */
#define IMX9_IRQ_DMA5_2_24_25 (IMX9_IRQ_EXTINT + 140) /* eDMA2 channel 24/25 interrupt */
#define IMX9_IRQ_DMA5_2_26_27 (IMX9_IRQ_EXTINT + 141) /* eDMA2 channel 26/27 interrupt */
#define IMX9_IRQ_DMA5_2_28_29 (IMX9_IRQ_EXTINT + 142) /* eDMA2 channel 28/29 interrupt */
#define IMX9_IRQ_DMA5_2_30_31 (IMX9_IRQ_EXTINT + 143) /* eDMA2 channel 30/31 interrupt */
#define IMX9_IRQ_DMA5_2_32_33 (IMX9_IRQ_EXTINT + 144) /* eDMA2 channel 32/33 interrupt */
#define IMX9_IRQ_DMA5_2_34_35 (IMX9_IRQ_EXTINT + 145) /* eDMA2 channel 34/35 interrupt */
#define IMX9_IRQ_DMA5_2_36_37 (IMX9_IRQ_EXTINT + 146) /* eDMA2 channel 36/37 interrupt */
#define IMX9_IRQ_DMA5_2_38_39 (IMX9_IRQ_EXTINT + 147) /* eDMA2 channel 38/39 interrupt */
#define IMX9_IRQ_DMA5_2_40_41 (IMX9_IRQ_EXTINT + 148) /* eDMA2 channel 40/41 interrupt */
#define IMX9_IRQ_DMA5_2_42_43 (IMX9_IRQ_EXTINT + 149) /* eDMA2 channel 42/43 interrupt */
#define IMX9_IRQ_DMA5_2_44_45 (IMX9_IRQ_EXTINT + 150) /* eDMA2 channel 44/45 interrupt */
#define IMX9_IRQ_DMA5_2_46_47 (IMX9_IRQ_EXTINT + 151) /* eDMA2 channel 46/47 interrupt */
#define IMX9_IRQ_DMA5_2_48_49 (IMX9_IRQ_EXTINT + 152) /* eDMA2 channel 48/49 interrupt */
#define IMX9_IRQ_DMA5_2_50_51 (IMX9_IRQ_EXTINT + 153) /* eDMA2 channel 50/51 interrupt */
#define IMX9_IRQ_DMA5_2_52_53 (IMX9_IRQ_EXTINT + 154) /* eDMA2 channel 52/53 interrupt */
#define IMX9_IRQ_DMA5_2_54_55 (IMX9_IRQ_EXTINT + 155) /* eDMA2 channel 54/55 interrupt */
#define IMX9_IRQ_DMA5_2_56_57 (IMX9_IRQ_EXTINT + 156) /* eDMA2 channel 56/57 interrupt */
#define IMX9_IRQ_DMA5_2_58_59 (IMX9_IRQ_EXTINT + 157) /* eDMA2 channel 58/59 interrupt */
#define IMX9_IRQ_DMA5_2_60_61 (IMX9_IRQ_EXTINT + 158) /* eDMA2 channel 60/61 interrupt */
#define IMX9_IRQ_DMA5_2_62_63 (IMX9_IRQ_EXTINT + 159) /* eDMA2 channel 62/63 interrupt */
#define IMX9_IRQ_RESERVED176 (IMX9_IRQ_EXTINT + 160) /* Sentinel Group 1 reset source if no s500 reference clock is detected. Output synchronized to 32khz clk. */
#define IMX9_IRQ_RESERVED177 (IMX9_IRQ_EXTINT + 161) /* Sentinel Group 2 reset source s500 reference clock is not detected or too slow. Output synchronized to ref1_clk. */
#define IMX9_IRQ_RESERVED178 (IMX9_IRQ_EXTINT + 162) /* Sentinel Group 2 reset source s500 reference clock is not detected or too slow. Output synchronized to ref1_clk. */
#define IMX9_IRQ_RESERVED179 (IMX9_IRQ_EXTINT + 163) /* JTAGSW DAP MDM-AP SRC reset source */
#define IMX9_IRQ_RESERVED180 (IMX9_IRQ_EXTINT + 164) /* JTAGC SRC reset source */
#define IMX9_IRQ_RESERVED181 (IMX9_IRQ_EXTINT + 165) /* CM33 SYSREQRST SRC reset source */
#define IMX9_IRQ_RESERVED182 (IMX9_IRQ_EXTINT + 166) /* CM33 LOCKUP SRC reset source */
#define IMX9_IRQ_RESERVED183 (IMX9_IRQ_EXTINT + 167) /* CM7 SYSREQRST SRC reset source */
#define IMX9_IRQ_RESERVED184 (IMX9_IRQ_EXTINT + 168) /* CM7 LOCKUP SRC reset source */
#define IMX9_IRQ_SAI2 (IMX9_IRQ_EXTINT + 169) /* Serial Audio Interface 2 */
#define IMX9_IRQ_SAI3 (IMX9_IRQ_EXTINT + 170) /* Serial Audio Interface 3 */
#define IMX9_IRQ_SAI4 (IMX9_IRQ_EXTINT + 171) /* Serial Audio Interface 4 */
#define IMX9_IRQ_SAI5 (IMX9_IRQ_EXTINT + 172) /* Serial Audio Interface 5 */
#define IMX9_IRQ_RESERVED189 (IMX9_IRQ_EXTINT + 173) /* USB-1 Wake-up Interrupt */
#define IMX9_IRQ_RESERVED190 (IMX9_IRQ_EXTINT + 174) /* USB-2 Wake-up Interrupt */
#define IMX9_IRQ_USB1 (IMX9_IRQ_EXTINT + 175) /* USB-1 Interrupt */
#define IMX9_IRQ_USB2 (IMX9_IRQ_EXTINT + 176) /* USB-2 Interrupt */
#define IMX9_IRQ_LPSPI5 (IMX9_IRQ_EXTINT + 177) /* Low Power Serial Peripheral Interface 5 */
#define IMX9_IRQ_LPSPI6 (IMX9_IRQ_EXTINT + 178) /* Low Power Serial Peripheral Interface 6 */
#define IMX9_IRQ_LPSPI7 (IMX9_IRQ_EXTINT + 179) /* Low Power Serial Peripheral Interface 7 */
#define IMX9_IRQ_LPSPI8 (IMX9_IRQ_EXTINT + 180) /* Low Power Serial Peripheral Interface 8 */
#define IMX9_IRQ_LPI2C5 (IMX9_IRQ_EXTINT + 181) /* Low Power Inter-Integrated Circuit module 5 */
#define IMX9_IRQ_LPI2C6 (IMX9_IRQ_EXTINT + 182) /* Low Power Inter-Integrated Circuit module 6 */
#define IMX9_IRQ_LPI2C7 (IMX9_IRQ_EXTINT + 183) /* Low Power Inter-Integrated Circuit module 7 */
#define IMX9_IRQ_LPI2C8 (IMX9_IRQ_EXTINT + 184) /* Low Power Inter-Integrated Circuit module 8 */
#define IMX9_IRQ_PDM_HWVAD_ERROR (IMX9_IRQ_EXTINT + 185) /* PDM interrupt */
#define IMX9_IRQ_PDM_HWVAD_EVENT (IMX9_IRQ_EXTINT + 186) /* PDM interrupt */
#define IMX9_IRQ_PDM_ERROR (IMX9_IRQ_EXTINT + 187) /* PDM interrupt */
#define IMX9_IRQ_PDM_EVENT (IMX9_IRQ_EXTINT + 188) /* PDM interrupt */
#define IMX9_IRQ_RESERVED205 (IMX9_IRQ_EXTINT + 189) /* AUDIO XCVR interrupt */
#define IMX9_IRQ_RESERVED206 (IMX9_IRQ_EXTINT + 190) /* AUDIO XCVR interrupt */
#define IMX9_IRQ_uSDHC3 (IMX9_IRQ_EXTINT + 191) /* ultra Secure Digital Host Controller interrupt 3 */
#define IMX9_IRQ_RESERVED208 (IMX9_IRQ_EXTINT + 192) /* OCRAM MECC interrupt */
#define IMX9_IRQ_RESERVED209 (IMX9_IRQ_EXTINT + 193) /* OCRAM MECC interrupt */
#define IMX9_IRQ_RESERVED210 (IMX9_IRQ_EXTINT + 194) /* CM33 MCM interrupt */
#define IMX9_IRQ_RESERVED211 (IMX9_IRQ_EXTINT + 195) /* ANAMIX SFA interrupt */
#define IMX9_IRQ_RESERVED212 (IMX9_IRQ_EXTINT + 196) /* GIC700 Fault */
#define IMX9_IRQ_RESERVED213 (IMX9_IRQ_EXTINT + 197) /* GIC700 Error */
#define IMX9_IRQ_RESERVED214 (IMX9_IRQ_EXTINT + 198) /* GIC700 PMU Counter Overflow */
#define IMX9_IRQ_ADC_ER (IMX9_IRQ_EXTINT + 199) /* ADC interrupt */
#define IMX9_IRQ_ADC_WD (IMX9_IRQ_EXTINT + 200) /* ADC interrupt */
#define IMX9_IRQ_ADC_EOC (IMX9_IRQ_EXTINT + 201) /* ADC interrupt */
#define IMX9_IRQ_RESERVED218 (IMX9_IRQ_EXTINT + 202) /* s500 glue logic IRQ */
#define IMX9_IRQ_RESERVED219 (IMX9_IRQ_EXTINT + 203) /* I3C1 wakeup irq after double sync */
#define IMX9_IRQ_RESERVED220 (IMX9_IRQ_EXTINT + 204) /* I3C2 wakeup irq after double sync */
#define IMX9_IRQ_MU5_A (IMX9_IRQ_EXTINT + 205) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU6_A (IMX9_IRQ_EXTINT + 206) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU7_B (IMX9_IRQ_EXTINT + 207) /* WAKEUPMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU8_B (IMX9_IRQ_EXTINT + 208) /* WAKEUPMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_RESERVED225 (IMX9_IRQ_EXTINT + 209) /* WAKEUPMIX XSPI Responder */
#define IMX9_IRQ_RESERVED226 (IMX9_IRQ_EXTINT + 210) /* AONMIX FCCU Interrupt Reaction 0 */
#define IMX9_IRQ_RESERVED227 (IMX9_IRQ_EXTINT + 211) /* AONMIX FCCU Interrupt Reaction 1 */
#define IMX9_IRQ_RESERVED228 (IMX9_IRQ_EXTINT + 212) /* AONMIX FCCU Interrupt Reaction 2 */
#define IMX9_IRQ_RESERVED229 (IMX9_IRQ_EXTINT + 213) /* AONMIX STCU Selftest end Interrupt */
#define IMX9_IRQ_DISP_IRQSTEER0 (IMX9_IRQ_EXTINT + 214) /* DISPLAYMIX IRQSTEER 0 */
#define IMX9_IRQ_DISP_IRQSTEER1 (IMX9_IRQ_EXTINT + 215) /* DISPLAYMIX IRQSTEER 1 */
#define IMX9_IRQ_DISP_IRQSTEER2 (IMX9_IRQ_EXTINT + 216) /* DISPLAYMIX IRQSTEER 2 */
#define IMX9_IRQ_DISP_IRQSTEER3 (IMX9_IRQ_EXTINT + 217) /* DISPLAYMIX IRQSTEER 3 */
#define IMX9_IRQ_DISP_IRQSTEER4 (IMX9_IRQ_EXTINT + 218) /* DISPLAYMIX IRQSTEER 4 */
#define IMX9_IRQ_DISP_IRQSTEER7 (IMX9_IRQ_EXTINT + 219) /* DISPLAYMIX IRQSTEER 7 */
#define IMX9_IRQ_RESERVED236 (IMX9_IRQ_EXTINT + 220) /* CAMERAMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_ISI (IMX9_IRQ_EXTINT + 221) /* CAMERAMIX ISI interrupt Channel 0 */
#define IMX9_IRQ_RESERVED238 (IMX9_IRQ_EXTINT + 222) /* ISP Processing Interrupt - Context 0 */
#define IMX9_IRQ_RESERVED239 (IMX9_IRQ_EXTINT + 223) /* M7MIX MCM interrupt */
#define IMX9_IRQ_IRQSTEER_0 (IMX9_IRQ_EXTINT + 224) /* IRQSTEER0 interrupt */
#define IMX9_IRQ_IRQSTEER_1 (IMX9_IRQ_EXTINT + 225) /* IRQSTEER1 interrupt */
#define IMX9_IRQ_IRQSTEER_2 (IMX9_IRQ_EXTINT + 226) /* IRQSTEER2 interrupt */
#define IMX9_IRQ_IRQSTEER_3 (IMX9_IRQ_EXTINT + 227) /* IRQSTEER3 interrupt */
#define IMX9_IRQ_IRQSTEER_4 (IMX9_IRQ_EXTINT + 228) /* IRQSTEER4 interrupt */
#define IMX9_IRQ_IRQSTEER_5 (IMX9_IRQ_EXTINT + 229) /* IRQSTEER5 interrupt */
#define IMX9_IRQ_IRQSTEER_6 (IMX9_IRQ_EXTINT + 230) /* IRQSTEER6 interrupt */
#define IMX9_IRQ_IRQSTEER_7 (IMX9_IRQ_EXTINT + 231) /* IRQSTEER7 interrupt */
#define IMX9_IRQ_IRQSTEER_8 (IMX9_IRQ_EXTINT + 232) /* IRQSTEER8 interrupt */
#define IMX9_IRQ_IRQSTEER_9 (IMX9_IRQ_EXTINT + 233) /* IRQSTEER9 interrupt */
#define IMX9_IRQ_MU1_A (IMX9_IRQ_EXTINT + 234) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU1_B (IMX9_IRQ_EXTINT + 235) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU2_A (IMX9_IRQ_EXTINT + 236) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU2_B (IMX9_IRQ_EXTINT + 237) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU3_A (IMX9_IRQ_EXTINT + 238) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU3_B (IMX9_IRQ_EXTINT + 239) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU4_A (IMX9_IRQ_EXTINT + 240) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU4_B (IMX9_IRQ_EXTINT + 241) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU5_B (IMX9_IRQ_EXTINT + 242) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU6_B (IMX9_IRQ_EXTINT + 243) /* AONMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUB */
#define IMX9_IRQ_MU7_A (IMX9_IRQ_EXTINT + 244) /* WAKEUPMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MU8_A (IMX9_IRQ_EXTINT + 245) /* WAKEUPMIX MU Ored of all (tx,rx,gp,core,murip) interrupt to MUA */
#define IMX9_IRQ_MSGINTR1 (IMX9_IRQ_EXTINT + 246) /* MSGINTR Instance 1, Interrupt */
#define IMX9_IRQ_MSGINTR2 (IMX9_IRQ_EXTINT + 247) /* MSGINTR Instance 2, Interrupts */
#define IMX9_IRQ_RESERVED264 (IMX9_IRQ_EXTINT + 248) /* V2X-FH MU APCH1 (APP1) interrupt */
#define IMX9_IRQ_RESERVED265 (IMX9_IRQ_EXTINT + 249) /* V2X-FH MU APHSM2 (HSM2) interrupt */
#define IMX9_IRQ_RESERVED266 (IMX9_IRQ_EXTINT + 250) /* CAMERAMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED267 (IMX9_IRQ_EXTINT + 251) /* DISPLAYMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED268 (IMX9_IRQ_EXTINT + 252) /* NETCMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED269 (IMX9_IRQ_EXTINT + 253) /* GPUMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED270 (IMX9_IRQ_EXTINT + 254) /* HSIOMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED271 (IMX9_IRQ_EXTINT + 255) /* VPUMIX TRDC transfer error interrupt */
#define IMX9_IRQ_RESERVED272 (IMX9_IRQ_EXTINT + 256) /* AONMIX ERM Single bit corrected ECC Error */
#define IMX9_IRQ_RESERVED273 (IMX9_IRQ_EXTINT + 257) /* M7MIX ERM Single bit corrected ECC Error */
#define IMX9_IRQ_RESERVED274 (IMX9_IRQ_EXTINT + 258) /* WAKEUPMIX ERM Single bit corrected ECC Error */
#define IMX9_IRQ_RESERVED275 (IMX9_IRQ_EXTINT + 259) /* NPUMIX ERM Single bit corrected ECC Error */
#define IMX9_IRQ_RESERVED276 (IMX9_IRQ_EXTINT + 260) /* WAKEUPMIX ACP EDMA error interrupt */
#define IMX9_IRQ_RESERVED277 (IMX9_IRQ_EXTINT + 261) /* OCRAM_C ECC multiple bit or address error */
#define IMX9_IRQ_RESERVED278 (IMX9_IRQ_EXTINT + 262) /* CAMERAMIX Cortex-M0+ Cache write-buffer error */
#define IMX9_IRQ_RESERVED279 (IMX9_IRQ_EXTINT + 263) /* CAMERAMIX Cortex-M0+ Cache data parity error */
#define IMX9_IRQ_RESERVED280 (IMX9_IRQ_EXTINT + 264) /* V2X-FH MU APSHE (SHE) interrupt */
#define IMX9_IRQ_RESERVED281 (IMX9_IRQ_EXTINT + 265) /* V2X-FH MU SCU/APDEBUG (DEBUG) interrupt */
#define IMX9_IRQ_DMA5_3_0_1 (IMX9_IRQ_EXTINT + 266) /* eDMA3 channel 0/1 interrupt */
#define IMX9_IRQ_DMA5_3_2_3 (IMX9_IRQ_EXTINT + 267) /* eDMA3 channel 2/3 interrupt */
#define IMX9_IRQ_DMA5_3_4_5 (IMX9_IRQ_EXTINT + 268) /* eDMA3 channel 4/5 interrupt */
#define IMX9_IRQ_DMA5_3_6_7 (IMX9_IRQ_EXTINT + 269) /* eDMA3 channel 6/7 interrupt */
#define IMX9_IRQ_DMA5_3_8_9 (IMX9_IRQ_EXTINT + 270) /* eDMA3 channel 8/9 interrupt */
#define IMX9_IRQ_DMA5_3_10_11 (IMX9_IRQ_EXTINT + 271) /* eDMA3 channel 10/11 interrupt */
#define IMX9_IRQ_DMA5_3_12_13 (IMX9_IRQ_EXTINT + 272) /* eDMA3 channel 12/13 interrupt */
#define IMX9_IRQ_DMA5_3_14_15 (IMX9_IRQ_EXTINT + 273) /* eDMA3 channel 14/15 interrupt */
#define IMX9_IRQ_DMA5_3_16_17 (IMX9_IRQ_EXTINT + 274) /* eDMA3 channel 16/17 interrupt */
#define IMX9_IRQ_DMA5_3_18_19 (IMX9_IRQ_EXTINT + 275) /* eDMA3 channel 18/19 interrupt */
#define IMX9_IRQ_DMA5_3_20_21 (IMX9_IRQ_EXTINT + 276) /* eDMA3 channel 20/21 interrupt */
#define IMX9_IRQ_DMA5_3_22_23 (IMX9_IRQ_EXTINT + 277) /* eDMA3 channel 22/23 interrupt */
#define IMX9_IRQ_DMA5_3_24_25 (IMX9_IRQ_EXTINT + 278) /* eDMA3 channel 24/25 interrupt */
#define IMX9_IRQ_DMA5_3_26_27 (IMX9_IRQ_EXTINT + 279) /* eDMA3 channel 26/27 interrupt */
#define IMX9_IRQ_DMA5_3_28_29 (IMX9_IRQ_EXTINT + 280) /* eDMA3 channel 29/29 interrupt */
#define IMX9_IRQ_DMA5_3_30_31 (IMX9_IRQ_EXTINT + 281) /* eDMA3 channel 30/31 interrupt */
#define IMX9_IRQ_DMA5_3_32_33 (IMX9_IRQ_EXTINT + 282) /* eDMA3 channel 32/33 interrupt */
#define IMX9_IRQ_DMA5_3_34_35 (IMX9_IRQ_EXTINT + 283) /* eDMA3 channel 34/35 interrupt */
#define IMX9_IRQ_DMA5_3_36_37 (IMX9_IRQ_EXTINT + 284) /* eDMA3 channel 36/37 interrupt */
#define IMX9_IRQ_DMA5_3_38_39 (IMX9_IRQ_EXTINT + 285) /* eDMA3 channel 38/39 interrupt */
#define IMX9_IRQ_DMA5_3_40_41 (IMX9_IRQ_EXTINT + 286) /* eDMA3 channel 40/41 interrupt */
#define IMX9_IRQ_DMA5_3_42_43 (IMX9_IRQ_EXTINT + 287) /* eDMA3 channel 42/43 interrupt */
#define IMX9_IRQ_DMA5_3_44_45 (IMX9_IRQ_EXTINT + 288) /* eDMA3 channel 44/45 interrupt */
#define IMX9_IRQ_DMA5_3_46_47 (IMX9_IRQ_EXTINT + 289) /* eDMA3 channel 46/47 interrupt */
#define IMX9_IRQ_DMA5_3_48_49 (IMX9_IRQ_EXTINT + 290) /* eDMA3 channel 48/49 interrupt */
#define IMX9_IRQ_DMA5_3_50_51 (IMX9_IRQ_EXTINT + 291) /* eDMA3 channel 50/51 interrupt */
#define IMX9_IRQ_DMA5_3_52_53 (IMX9_IRQ_EXTINT + 292) /* eDMA3 channel 52/53 interrupt */
#define IMX9_IRQ_DMA5_3_54_55 (IMX9_IRQ_EXTINT + 293) /* eDMA3 channel 54/55 interrupt */
#define IMX9_IRQ_DMA5_3_56_57 (IMX9_IRQ_EXTINT + 294) /* eDMA3 channel 56/57 interrupt */
#define IMX9_IRQ_DMA5_3_58_59 (IMX9_IRQ_EXTINT + 295) /* eDMA3 channel 58/59 interrupt */
#define IMX9_IRQ_DMA5_3_60_61 (IMX9_IRQ_EXTINT + 296) /* eDMA3 channel 60/61 interrupt */
#define IMX9_IRQ_DMA5_3_62_63 (IMX9_IRQ_EXTINT + 297) /* eDMA3 channel 62/63 interrupt */
#define IMX9_IRQ_RESERVED314 (IMX9_IRQ_EXTINT + 298) /* GPUMIX GPU Interrupt */
#define IMX9_IRQ_RESERVED315 (IMX9_IRQ_EXTINT + 299) /* GPUMIX Job Interrupt */
#define IMX9_IRQ_RESERVED316 (IMX9_IRQ_EXTINT + 300) /* GPUMIX MMU Interrupt */
#define IMX9_IRQ_RESERVED317 (IMX9_IRQ_EXTINT + 301) /* Reserved INTERRUPT */
#define IMX9_IRQ_RESERVED318 (IMX9_IRQ_EXTINT + 302) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED319 (IMX9_IRQ_EXTINT + 303) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED320 (IMX9_IRQ_EXTINT + 304) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED321 (IMX9_IRQ_EXTINT + 305) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED322 (IMX9_IRQ_EXTINT + 306) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED323 (IMX9_IRQ_EXTINT + 307) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED324 (IMX9_IRQ_EXTINT + 308) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED325 (IMX9_IRQ_EXTINT + 309) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED326 (IMX9_IRQ_EXTINT + 310) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED327 (IMX9_IRQ_EXTINT + 311) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED328 (IMX9_IRQ_EXTINT + 312) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED329 (IMX9_IRQ_EXTINT + 313) /* Reserved interrupt */
#define IMX9_IRQ_RESERVED330 (IMX9_IRQ_EXTINT + 314) /* NETC iEPRC PCI INT */
#define IMX9_IRQ_RESERVED331 (IMX9_IRQ_EXTINT + 315) /* NETC iEPRC PCI INT */
#define IMX9_IRQ_RESERVED332 (IMX9_IRQ_EXTINT + 316) /* PCIe Controller 1 INTA */
#define IMX9_IRQ_RESERVED333 (IMX9_IRQ_EXTINT + 317) /* PCIe Controller 1 INTB */
#define IMX9_IRQ_RESERVED334 (IMX9_IRQ_EXTINT + 318) /* PCIe Controller 1 INTC */
#define IMX9_IRQ_RESERVED335 (IMX9_IRQ_EXTINT + 319) /* PCIe Controller 1 INTD */
#define IMX9_IRQ_RESERVED336 (IMX9_IRQ_EXTINT + 320) /* PCIe interrupts */
#define IMX9_IRQ_RESERVED337 (IMX9_IRQ_EXTINT + 321) /* PCIe Controller EDMA channel interrupt */
#define IMX9_IRQ_RESERVED338 (IMX9_IRQ_EXTINT + 322) /* PCIe Controller 1 INTA */
#define IMX9_IRQ_RESERVED339 (IMX9_IRQ_EXTINT + 323) /* PCIe Controller 1 INTB */
#define IMX9_IRQ_RESERVED340 (IMX9_IRQ_EXTINT + 324) /* PCIe Controller 1 INTC */
#define IMX9_IRQ_RESERVED341 (IMX9_IRQ_EXTINT + 325) /* PCIe Controller 1 INTD */
#define IMX9_IRQ_RESERVED342 (IMX9_IRQ_EXTINT + 326) /* PCIe miscellaneous interrupts */
#define IMX9_IRQ_RESERVED343 (IMX9_IRQ_EXTINT + 327) /* PCIe Controller EDMA channel interrupt */
#define IMX9_IRQ_RESERVED344 (IMX9_IRQ_EXTINT + 328) /* Wakeup interrupt from CLKREQ#, WAKEUP#, BEACON_DET */
#define IMX9_IRQ_RESERVED345 (IMX9_IRQ_EXTINT + 329) /* NPUMIX Functional interrupt */
#define IMX9_IRQ_RESERVED346 (IMX9_IRQ_EXTINT + 330) /* DISPLAYMIX Real-time traffic TBU: Fault Handling RAS Interrupt for a contained error */
#define IMX9_IRQ_RESERVED347 (IMX9_IRQ_EXTINT + 331) /* DISPLAYMIX Real-time traffic TBU: Error Handling RAS Interrupt for an uncontained error */
#define IMX9_IRQ_RESERVED348 (IMX9_IRQ_EXTINT + 332) /* DISPLAYMIX Real-time traffic TBU: Critical Error Interrupt for an uncontainable error */
#define IMX9_IRQ_RESERVED349 (IMX9_IRQ_EXTINT + 333) /* DISPLAYMIX Real-time traffic TBU: PMU Interrupt */
#define IMX9_IRQ_RESERVED350 (IMX9_IRQ_EXTINT + 334) /* TCU Event queue, secure interrupt */
#define IMX9_IRQ_RESERVED351 (IMX9_IRQ_EXTINT + 335) /* TCU Event queue, non-secure interrupt */
#define IMX9_IRQ_RESERVED352 (IMX9_IRQ_EXTINT + 336) /* TCU SYNC complete, non-secure interrupt */
#define IMX9_IRQ_RESERVED353 (IMX9_IRQ_EXTINT + 337) /* TCU SYNC complete, secure interrupt */
#define IMX9_IRQ_RESERVED354 (IMX9_IRQ_EXTINT + 338) /* TCU global non-secure interrupt */
#define IMX9_IRQ_RESERVED355 (IMX9_IRQ_EXTINT + 339) /* TCU global secure interrupt */
#define IMX9_IRQ_RESERVED356 (IMX9_IRQ_EXTINT + 340) /* TCU fault handling RAS interrupt for a contained error */
#define IMX9_IRQ_RESERVED357 (IMX9_IRQ_EXTINT + 341) /* TCU error recovery RAS interrupt for an uncontained error */
#define IMX9_IRQ_RESERVED358 (IMX9_IRQ_EXTINT + 342) /* TCU critical error interrupt, for an uncontainable uncorrected error */
#define IMX9_IRQ_RESERVED359 (IMX9_IRQ_EXTINT + 343) /* TCU PMU interrupt */
#define IMX9_IRQ_RESERVED360 (IMX9_IRQ_EXTINT + 344) /* TCU Page Request Interface */
#define IMX9_IRQ_RESERVED361 (IMX9_IRQ_EXTINT + 345) /* SRC GPC Low Power Handshake Gasket interrupt request for system management */
#define IMX9_IRQ_RESERVED362 (IMX9_IRQ_EXTINT + 346) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED363 (IMX9_IRQ_EXTINT + 347) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED364 (IMX9_IRQ_EXTINT + 348) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED365 (IMX9_IRQ_EXTINT + 349) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED366 (IMX9_IRQ_EXTINT + 350) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED367 (IMX9_IRQ_EXTINT + 351) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED368 (IMX9_IRQ_EXTINT + 352) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED369 (IMX9_IRQ_EXTINT + 353) /* CAMERAMIX MU Ored of all */
#define IMX9_IRQ_RESERVED370 (IMX9_IRQ_EXTINT + 354) /* CAMERAMIX ISI interrupt Channel 1 */
#define IMX9_IRQ_RESERVED371 (IMX9_IRQ_EXTINT + 355) /* CAMERAMIX ISI interrupt Channel 2 */
#define IMX9_IRQ_RESERVED372 (IMX9_IRQ_EXTINT + 356) /* CAMERAMIX ISI interrupt Channel 3 */
#define IMX9_IRQ_RESERVED373 (IMX9_IRQ_EXTINT + 357) /* CAMERAMIX ISI interrupt Channel 4 */
#define IMX9_IRQ_RESERVED374 (IMX9_IRQ_EXTINT + 358) /* CAMERAMIX ISI interrupt Channel 5 */
#define IMX9_IRQ_RESERVED375 (IMX9_IRQ_EXTINT + 359) /* CAMERAMIX ISI interrupt Channel 6 */
#define IMX9_IRQ_RESERVED376 (IMX9_IRQ_EXTINT + 360) /* CAMERAMIX ISI interrupt Channel 7 */
#define IMX9_IRQ_DMA5_4_ERROR (IMX9_IRQ_EXTINT + 361) /* CAMERAMIX EDMA error interrupt */
#define IMX9_IRQ_DMA5_4_0_1 (IMX9_IRQ_EXTINT + 362) /* CAMERAMIX EDMA channel 0 interrupt */
#define IMX9_IRQ_DMA5_4_2_3 (IMX9_IRQ_EXTINT + 363) /* CAMERAMIX EDMA channel 2 interrupt */
#define IMX9_IRQ_DMA5_4_4_5 (IMX9_IRQ_EXTINT + 364) /* CAMERAMIX EDMA channel 4 interrupt */
#define IMX9_IRQ_DMA5_4_6_7 (IMX9_IRQ_EXTINT + 365) /* CAMERAMIX EDMA channel 6 interrupt */
#define IMX9_IRQ_DMA5_4_8_9 (IMX9_IRQ_EXTINT + 366) /* CAMERAMIX EDMA channel 8 interrupt */
#define IMX9_IRQ_DMA5_4_10_11 (IMX9_IRQ_EXTINT + 367) /* CAMERAMIX EDMA channel 10 interrupt */
#define IMX9_IRQ_DMA5_4_12_13 (IMX9_IRQ_EXTINT + 368) /* CAMERAMIX EDMA channel 12 interrupt */
#define IMX9_IRQ_DMA5_4_14_15 (IMX9_IRQ_EXTINT + 369) /* CAMERAMIX EDMA channel 14 interrupt */
#define IMX9_IRQ_DMA5_4_16_17 (IMX9_IRQ_EXTINT + 370) /* CAMERAMIX EDMA channel 16 interrupt */
#define IMX9_IRQ_DMA5_4_18_19 (IMX9_IRQ_EXTINT + 371) /* CAMERAMIX EDMA channel 18 interrupt */
#define IMX9_IRQ_DMA5_4_20_21 (IMX9_IRQ_EXTINT + 372) /* CAMERAMIX EDMA channel 20 interrupt */
#define IMX9_IRQ_DMA5_4_22_23 (IMX9_IRQ_EXTINT + 373) /* CAMERAMIX EDMA channel 22 interrupt */
#define IMX9_IRQ_DMA5_4_24_25 (IMX9_IRQ_EXTINT + 374) /* CAMERAMIX EDMA channel 24 interrupt */
#define IMX9_IRQ_DMA5_4_26_27 (IMX9_IRQ_EXTINT + 375) /* CAMERAMIX EDMA channel 26 interrupt */
#define IMX9_IRQ_DMA5_4_28_29 (IMX9_IRQ_EXTINT + 376) /* CAMERAMIX EDMA channel 28 interrupt */
#define IMX9_IRQ_DMA5_4_30_31 (IMX9_IRQ_EXTINT + 377) /* CAMERAMIX EDMA channel 30 interrupt */
#define IMX9_IRQ_RESERVED394 (IMX9_IRQ_EXTINT + 378) /* CAMERAMIX CSI Formatting Unit 1: Buffer overflow */
#define IMX9_IRQ_RESERVED395 (IMX9_IRQ_EXTINT + 379) /* CAMERAMIX CSI Formatting Unit 1: Interlaced Error */
#define IMX9_IRQ_RESERVED396 (IMX9_IRQ_EXTINT + 380) /* CAMERAMIX CSI Formatting Unit 1: Pixel Data Type Error */
#define IMX9_IRQ_RESERVED397 (IMX9_IRQ_EXTINT + 381) /* CAMERAMIX CSI Formatting Unit 2: Buffer overflow */
#define IMX9_IRQ_RESERVED398 (IMX9_IRQ_EXTINT + 382) /* CAMERAMIX CSI Formatting Unit 2: Interlaced Error */
#define IMX9_IRQ_RESERVED399 (IMX9_IRQ_EXTINT + 383) /* CAMERAMIX CSI Formatting Unit 2: Pixel Data Type Error */
#define IMX9_IRQ_RESERVED400 (IMX9_IRQ_EXTINT + 384) /* CAMERAMIX CSI1 */
#define IMX9_IRQ_RESERVED401 (IMX9_IRQ_EXTINT + 385) /* CAMERAMIX CSI2 */
#define IMX9_IRQ_NEXTINT (218)
/* Total amount of entries in system vector table */
#define NR_IRQS (IMX9_IRQ_EXTINT + IMX9_IRQ_NEXTINT)
#endif /* __ARCH_ARM_INCLUDE_IMX9_IMX95_IRQ_H */

View file

@ -1,80 +0,0 @@
/****************************************************************************
* arch/arm/include/imx9/irq.h
*
* SPDX-License-Identifier: Apache-2.0
* SPDX-FileCopyrightText: 2024 NXP
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*
****************************************************************************/
/* This file should never be included directly but, rather,
* only indirectly through nuttx/irq.h
*/
#ifndef __ARCH_ARM_INCLUDE_IMX9_IRQ_H
#define __ARCH_ARM_INCLUDE_IMX9_IRQ_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#if defined(CONFIG_ARCH_CHIP_IMX95_M7)
# include <arch/imx9/imx95_irq.h>
#else
# error "Unrecognized i.MX9 architecture"
#endif
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* IRQ numbers. The IRQ number corresponds vector number and hence map
* directly to bits in the NVIC. This does, however, waste several words
* of memory in the IRQ to handle mapping tables.
*/
/* Common Processor Exceptions (vectors 0-15) */
#define IMX9_IRQ_RESERVED (0) /* Reserved vector .. only used with
* CONFIG_DEBUG_FEATURES */
/* Vector 0: Reset stack pointer value */
/* Vector 1: Reset(not handled by IRQ) */
#define IMX9_IRQ_NMI (2) /* Vector 2: Non-Maskable Int (NMI) */
#define IMX9_IRQ_HARDFAULT (3) /* Vector 3: Hard fault */
#define IMX9_IRQ_MEMFAULT (4) /* Vector 4: Memory management (MPU) */
#define IMX9_IRQ_BUSFAULT (5) /* Vector 5: Bus fault */
#define IMX9_IRQ_USAGEFAULT (6) /* Vector 6: Usage fault */
/* Vectors 7-10: Reserved */
#define IMX9_IRQ_SVCALL (11) /* Vector 11: SVC call */
#define IMX9_IRQ_DBGMONITOR (12) /* Vector 12: Debug Monitor */
/* Vector 13: Reserved */
#define IMX9_IRQ_PENDSV (14) /* Vector 14: Pendable SSR */
#define IMX9_IRQ_SYSTICK (15) /* Vector 15: System tick */
/* Chip-Specific External interrupts */
#define IMX9_IRQ_EXTINT (16) /* Vector number of the first ext int */
#define ARMV7M_PERIPHERAL_INTERRUPTS IMX9_IRQ_NEXTINT
#endif /* __ARCH_ARM_INCLUDE_IMX9_IRQ_H */

View file

@ -194,7 +194,7 @@ extern volatile bool g_interrupt_context[CONFIG_SMP_NCPUS];
/* Save the current interrupt enable state & disable IRQs. */
static inline_function irqstate_t up_irq_save(void)
static inline irqstate_t up_irq_save(void)
{
irqstate_t r = _IRQ_EN_REG;
_IRQ_EN_REG = 0;
@ -203,36 +203,36 @@ static inline_function irqstate_t up_irq_save(void)
/* Restore saved IRQ & FIQ state */
static inline_function void up_irq_restore(irqstate_t flags)
static inline void up_irq_restore(irqstate_t flags)
{
_IRQ_EN_REG = flags;
}
/* Enable IRQs and return the previous IRQ state */
static inline_function irqstate_t up_irq_enable(void)
static inline irqstate_t up_irq_enable(void)
{
irqstate_t r = _IRQ_EN_REG;
_IRQ_EN_REG = 1;
return r;
}
static inline_function void up_irq_disable(void)
static inline void up_irq_disable(void)
{
up_irq_save();
}
static inline_function void up_disable_irq(int irq)
static inline void up_disable_irq(int irq)
{
_IRQ_MASK_REG &= ~(1 << irq);
}
static inline_function void up_enable_irq(int irq)
static inline void up_enable_irq(int irq)
{
_IRQ_MASK_REG |= (1 << irq);
}
static inline_function uint32_t getcontrol(void)
static inline uint32_t getcontrol(void)
{
return 0;
}
@ -262,12 +262,6 @@ static inline_function uint32_t up_getsp(void)
return sp;
}
static inline_function uintptr_t up_getusrsp(void *regs)
{
uint32_t *ptr = (uint32_t *)regs;
return ptr[REG_SP];
}
noinstrument_function
static inline_function bool up_interrupt_context(void)
{

View file

@ -29,7 +29,7 @@ add_subdirectory(common)
target_include_directories(arch BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} common
${ARCH_SUBDIR})
if(CONFIG_BUILD_PROTECTED)
if(NOT CONFIG_BUILD_FLAT)
target_include_directories(arch_interface BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR}
common ${ARCH_SUBDIR})
endif()

View file

@ -27,11 +27,9 @@
#include <nuttx/config.h>
#include <assert.h>
#include <sched.h>
#include <arch/board/board.h>
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include <nuttx/arch.h>
#include <nuttx/can/can.h>
@ -207,8 +205,6 @@ static struct can_dev_s g_can1dev =
};
#endif
static spinlock_t g_can_lock = SP_UNLOCKED;
/****************************************************************************
* Private Functions
****************************************************************************/
@ -1083,8 +1079,7 @@ struct can_dev_s *am335x_can_initialize(int port)
syslog(LOG_DEBUG, "CAN%d\n", port);
flags = spin_lock_irqsave(&g_can_lock);
sched_lock();
flags = enter_critical_section();
#ifdef CONFIG_AM335X_CAN0
if (port == 0)
@ -1114,13 +1109,11 @@ struct can_dev_s *am335x_can_initialize(int port)
{
canerr("Unsupported port: %d\n", port);
spin_unlock_irqrestore(&g_can_lock, flags);
sched_unlock();
leave_critical_section(flags);
return NULL;
}
spin_unlock_irqrestore(&g_can_lock, flags);
sched_unlock();
leave_critical_section(flags);
return candev;
}
@ -1131,8 +1124,7 @@ void am335x_can_uninitialize(struct can_dev_s *dev)
DEBUGASSERT(dev);
flags = spin_lock_irqsave(&g_can_lock);
sched_lock();
flags = enter_critical_section();
#ifdef CONFIG_AM335X_CAN0
if (dev == &g_can0dev)
@ -1159,8 +1151,7 @@ void am335x_can_uninitialize(struct can_dev_s *dev)
canerr("Not a CAN device: %p\n", dev);
}
spin_unlock_irqrestore(&g_can_lock, flags);
sched_unlock();
leave_critical_section(flags);
}
#endif

View file

@ -31,7 +31,6 @@
#include <errno.h>
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include "chip.h"
#include "arm_internal.h"
@ -220,8 +219,6 @@ static const uint8_t *g_gpio_padctl[AM335X_GPIO_NPORTS] =
g_gpio3_padctl, /* GPIO3 */
};
static spinlock_t g_gpio_lock = SP_UNLOCKED;
/****************************************************************************
* Private Functions
****************************************************************************/
@ -367,7 +364,7 @@ int am335x_gpio_config(gpio_pinset_t pinset)
/* Configure the pin as an input initially to avoid any spurious outputs */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
/* Configure based upon the pin mode */
@ -410,7 +407,7 @@ int am335x_gpio_config(gpio_pinset_t pinset)
break;
}
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
return ret;
}
@ -428,9 +425,9 @@ void am335x_gpio_write(gpio_pinset_t pinset, bool value)
int port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
int pin = (pinset & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT;
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
am335x_gpio_setoutput(port, pin, value);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -448,9 +445,9 @@ bool am335x_gpio_read(gpio_pinset_t pinset)
int pin = (pinset & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT;
bool value;
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
value = am335x_gpio_getinput(port, pin);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
return value;
}

View file

@ -37,7 +37,6 @@
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include <nuttx/clock.h>
#include <nuttx/mutex.h>
#include <nuttx/semaphore.h>
@ -186,7 +185,6 @@ struct am335x_i2c_priv_s
int refs; /* Reference count */
mutex_t lock; /* Mutual exclusion mutex */
spinlock_t spinlock; /* Spinlock */
#ifndef CONFIG_I2C_POLLED
sem_t sem_isr; /* Interrupt wait semaphore */
#endif
@ -319,7 +317,6 @@ static struct am335x_i2c_priv_s am335x_i2c0_priv =
.config = &am335x_i2c0_config,
.refs = 0,
.lock = NXMUTEX_INITIALIZER,
.spinlock = SP_UNLOCKED,
#ifndef CONFIG_I2C_POLLED
.sem_isr = SEM_INITIALIZER(0),
#endif
@ -355,7 +352,6 @@ static struct am335x_i2c_priv_s am335x_i2c1_priv =
.config = &am335x_i2c1_config,
.refs = 0,
.lock = NXMUTEX_INITIALIZER,
.spinlock = SP_UNLOCKED,
#ifndef CONFIG_I2C_POLLED
.sem_isr = SEM_INITIALIZER(0),
#endif
@ -391,7 +387,6 @@ static struct am335x_i2c_priv_s am335x_i2c2_priv =
.config = &am335x_i2c2_config,
.refs = 0,
.lock = NXMUTEX_INITIALIZER,
.spinlock = SP_UNLOCKED,
#ifndef CONFIG_I2C_POLLED
.sem_isr = SEM_INITIALIZER(0),
#endif
@ -497,7 +492,7 @@ static inline int am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv)
uint32_t regval;
int ret;
flags = spin_lock_irqsave(&priv->spinlock);
flags = enter_critical_section();
/* Enable Interrupts when master mode */
@ -534,8 +529,6 @@ static inline int am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv)
*/
priv->intstate = INTSTATE_WAITING;
spin_unlock_irqrestore(&priv->spinlock, flags);
do
{
/* Wait until either the transfer is complete or the timeout expires */
@ -558,8 +551,6 @@ static inline int am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv)
}
}
flags = spin_lock_irqsave(&priv->spinlock);
/* Loop until the interrupt level transfer is complete. */
while (priv->intstate != INTSTATE_DONE);
@ -572,7 +563,7 @@ static inline int am335x_i2c_sem_waitdone(struct am335x_i2c_priv_s *priv)
am335x_i2c_putreg(priv, AM335X_I2C_IRQ_EN_CLR_OFFSET, I2C_ICR_CLEARMASK);
spin_unlock_irqrestore(&priv->spinlock, flags);
leave_critical_section(flags);
return ret;
}
#else
@ -1001,7 +992,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
*/
#ifdef CONFIG_I2C_POLLED
irqstate_t flags = spin_lock_irqsave(&priv->spinlock);
irqstate_t flags = enter_critical_section();
#endif
/* Transmit a byte */
@ -1010,7 +1001,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
priv->dcnt--;
#ifdef CONFIG_I2C_POLLED
spin_unlock_irqrestore(&priv->spinlock, flags);
leave_critical_section(flags);
#endif
if ((priv->dcnt == 0) && ((priv->flags & I2C_M_NOSTOP) == 0))
{
@ -1035,7 +1026,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
*/
#ifdef CONFIG_I2C_POLLED
irqstate_t flags = spin_lock_irqsave(&priv->spinlock);
irqstate_t flags = enter_critical_section();
#endif
/* Receive a byte */
@ -1045,7 +1036,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
priv->dcnt--;
#ifdef CONFIG_I2C_POLLED
spin_unlock_irqrestore(&priv->spinlock, flags);
leave_critical_section(flags);
#endif
if ((priv->msgc <= 0) && (priv->dcnt == 0))
{
@ -1109,7 +1100,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
*/
#ifdef CONFIG_I2C_POLLED
irqstate_t flags = spin_lock_irqsave(&priv->spinlock);
irqstate_t flags = enter_critical_section();
#endif
/* Transmit a byte */
@ -1118,7 +1109,7 @@ static int am335x_i2c_isr_process(struct am335x_i2c_priv_s *priv)
priv->dcnt--;
#ifdef CONFIG_I2C_POLLED
spin_unlock_irqrestore(&priv->spinlock, flags);
leave_critical_section(flags);
#endif
if ((priv->dcnt == 0) && ((priv->flags & I2C_M_NOSTOP) == 0))
{

View file

@ -29,7 +29,6 @@
#include <assert.h>
#include <nuttx/arch.h>
#include <nuttx/spinlock.h>
#include "arm_internal.h"
#include "sctlr.h"
@ -37,13 +36,6 @@
#include "am335x_gpio.h"
#include "am335x_irq.h"
/****************************************************************************
* Private Data
****************************************************************************/
#ifdef CONFIG_ARCH_IRQPRIO
static spinlock_t g_irq_lock = SP_UNLOCKED;
#endif
/****************************************************************************
* Public Data
****************************************************************************/
@ -336,7 +328,7 @@ int up_prioritize_irq(int irq, int priority)
{
/* These operations must be atomic */
flags = spin_lock_irqsave(&g_irq_lock);
flags = enter_critical_section();
#if 0 // TODO
/* Set the new priority */
@ -348,7 +340,7 @@ int up_prioritize_irq(int irq, int priority)
putreg32(regval, regaddr);
#endif
spin_unlock_irqrestore(&g_irq_lock, flags);
leave_critical_section(flags);
return OK;
}

View file

@ -39,7 +39,6 @@
#endif
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include <nuttx/arch.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/serial/serial.h>
@ -77,14 +76,13 @@
struct up_dev_s
{
uint32_t uartbase; /* Base address of UART registers */
uint32_t baud; /* Configured baud */
uint32_t ier; /* Saved IER value */
uint8_t irq; /* IRQ associated with this UART */
uint8_t parity; /* 0=none, 1=odd, 2=even */
uint8_t bits; /* Number of bits (7 or 8) */
bool stopbits2; /* true: Configure with 2 stop bits instead of 1 */
spinlock_t spinlock; /* Spinlock */
uint32_t uartbase; /* Base address of UART registers */
uint32_t baud; /* Configured baud */
uint32_t ier; /* Saved IER value */
uint8_t irq; /* IRQ associated with this UART */
uint8_t parity; /* 0=none, 1=odd, 2=even */
uint8_t bits; /* Number of bits (7 or 8) */
bool stopbits2; /* true: Configure with 2 stop bits instead of 1 */
};
/****************************************************************************
@ -171,7 +169,6 @@ static struct up_dev_s g_uart0priv =
.parity = CONFIG_UART0_PARITY,
.bits = CONFIG_UART0_BITS,
.stopbits2 = CONFIG_UART0_2STOP,
.spinlock = SP_UNLOCKED,
};
static uart_dev_t g_uart0port =
@ -203,7 +200,6 @@ static struct up_dev_s g_uart1priv =
.parity = CONFIG_UART1_PARITY,
.bits = CONFIG_UART1_BITS,
.stopbits2 = CONFIG_UART1_2STOP,
.spinlock = SP_UNLOCKED,
};
static uart_dev_t g_uart1port =
@ -234,7 +230,6 @@ static struct up_dev_s g_uart2priv =
.parity = CONFIG_UART2_PARITY,
.bits = CONFIG_UART2_BITS,
.stopbits2 = CONFIG_UART2_2STOP,
.spinlock = SP_UNLOCKED,
};
static uart_dev_t g_uart2port =
@ -265,7 +260,6 @@ static struct up_dev_s g_uart3priv =
.parity = CONFIG_UART3_PARITY,
.bits = CONFIG_UART3_BITS,
.stopbits2 = CONFIG_UART3_2STOP,
.spinlock = SP_UNLOCKED,
};
static uart_dev_t g_uart3port =
@ -296,7 +290,6 @@ static struct up_dev_s g_uart4priv =
.parity = CONFIG_UART4_PARITY,
.bits = CONFIG_UART4_BITS,
.stopbits2 = CONFIG_UART4_2STOP,
.spinlock = SP_UNLOCKED,
};
static uart_dev_t g_uart4port =
@ -327,7 +320,6 @@ static struct up_dev_s g_uart5priv =
.parity = CONFIG_UART5_PARITY,
.bits = CONFIG_UART5_BITS,
.stopbits2 = CONFIG_UART5_2STOP,
.spinlock = SP_UNLOCKED,
};
static uart_dev_t g_uart5port =
@ -492,10 +484,6 @@ static uart_dev_t g_uart5port =
# define UART5_ASSIGNED 1
#endif
/* Spinlock */
static spinlock_t g_gpio_lock = SP_UNLOCKED;
/****************************************************************************
* Inline Functions
****************************************************************************/
@ -579,7 +567,7 @@ static inline void am335x_uart0config(void)
/* Step 1: Enable power to UART0 */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
#warning Missing logic
/* Step 2: Enable clocking to UART0 */
@ -589,7 +577,7 @@ static inline void am335x_uart0config(void)
am335x_gpio_config(GPIO_UART0_TXD);
am335x_gpio_config(GPIO_UART0_RXD);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
};
#endif
@ -600,7 +588,7 @@ static inline void am335x_uart1config(void)
/* Step 1: Enable power to UART1 */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
#warning Missing logic
/* Step 2: Enable clocking to UART1 */
@ -610,7 +598,7 @@ static inline void am335x_uart1config(void)
am335x_gpio_config(GPIO_UART1_TXD);
am335x_gpio_config(GPIO_UART1_RXD);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
};
#endif
@ -621,7 +609,7 @@ static inline void am335x_uart2config(void)
/* Step 1: Enable power to UART2 */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
#warning Missing logic
/* Step 2: Enable clocking on UART2 */
@ -631,7 +619,7 @@ static inline void am335x_uart2config(void)
am335x_gpio_config(GPIO_UART2_TXD);
am335x_gpio_config(GPIO_UART2_RXD);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
};
#endif
@ -642,7 +630,7 @@ static inline void am335x_uart3config(void)
/* Step 1: Enable power to UART3 */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
#warning Missing logic
/* Step 2: Enable clocking to UART3 */
@ -652,7 +640,7 @@ static inline void am335x_uart3config(void)
am335x_gpio_config(GPIO_UART3_TXD);
am335x_gpio_config(GPIO_UART3_RXD);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
};
#endif
@ -663,7 +651,7 @@ static inline void am335x_uart4config(void)
/* Step 1: Enable power to UART4 */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
#warning Missing logic
/* Step 2: Enable clocking to UART4 */
@ -673,7 +661,7 @@ static inline void am335x_uart4config(void)
am335x_gpio_config(GPIO_UART4_TXD);
am335x_gpio_config(GPIO_UART4_RXD);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
};
#endif
@ -684,7 +672,7 @@ static inline void am335x_uart5config(void)
/* Step 1: Enable power to UART5 */
flags = spin_lock_irqsave(&g_gpio_lock);
flags = enter_critical_section();
#warning Missing logic
/* Step 2: Enable clocking to UART5 */
@ -694,7 +682,7 @@ static inline void am335x_uart5config(void)
am335x_gpio_config(GPIO_UART5_TXD);
am335x_gpio_config(GPIO_UART5_RXD);
spin_unlock_irqrestore(&g_gpio_lock, flags);
leave_critical_section(flags);
};
#endif
@ -1041,18 +1029,18 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */
{
irqstate_t flags = spin_lock_irqsave(&priv->spinlock);
irqstate_t flags = enter_critical_section();
up_enablebreaks(priv, true);
spin_unlock_irqrestore(&priv->spinlock, flags);
leave_critical_section(flags);
}
break;
case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */
{
irqstate_t flags;
flags = spin_lock_irqsave(&priv->spinlock);
flags = enter_critical_section();
up_enablebreaks(priv, false);
spin_unlock_irqrestore(&priv->spinlock, flags);
leave_critical_section(flags);
}
break;
@ -1216,15 +1204,13 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
struct up_dev_s *priv = (struct up_dev_s *)dev->priv;
irqstate_t flags;
flags = spin_lock_irqsave(&priv->spinlock);
flags = enter_critical_section();
if (enable)
{
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
priv->ier |= UART_IER_THR;
up_serialout(priv, AM335X_UART_IER_OFFSET, priv->ier);
spin_unlock_irqrestore(&priv->spinlock, flags);
/* Fake a TX interrupt here by just calling uart_xmitchars() with
* interrupts disabled (note this may recurse).
*/
@ -1236,9 +1222,9 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
{
priv->ier &= ~UART_IER_THR;
up_serialout(priv, AM335X_UART_IER_OFFSET, priv->ier);
spin_unlock_irqrestore(&priv->spinlock, flags);
}
leave_critical_section(flags);
}
/****************************************************************************

View file

@ -35,7 +35,6 @@
#include "arm.h"
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -91,8 +90,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
{
/* In this case just deliver the signal now. */
nxsig_deliver(tcb);
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
(tcb->sigdeliver)(tcb);
tcb->sigdeliver = NULL;
}
/* Otherwise, we are (1) signaling a task is not running

View file

@ -37,7 +37,6 @@
#include <arch/board/board.h>
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -60,9 +59,9 @@ void arm_sigdeliver(void)
board_autoled_on(LED_SIGNAL);
sinfo("rtcb=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigpendactionq.head);
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
DEBUGASSERT(rtcb->sigdeliver != NULL);
#ifndef CONFIG_SUPPRESS_INTERRUPTS
/* Then make sure that interrupts are enabled. Signal handlers must always
@ -74,7 +73,7 @@ void arm_sigdeliver(void)
/* Deliver the signal */
nxsig_deliver(rtcb);
(rtcb->sigdeliver)(rtcb);
/* Output any debug messages BEFORE restoring errno (because they may
* alter errno), then disable interrupts again and restore the original
@ -94,9 +93,7 @@ void arm_sigdeliver(void)
* could be modified by a hostile program.
*/
/* Allows next handler to be scheduled */
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */
/* Then restore the correct state for this thread of execution. */

View file

@ -34,7 +34,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include <sched/sched.h>
#include <signal/signal.h>
#include "arm_internal.h"
#include "exc_return.h"
@ -87,7 +86,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
irq_dispatch(irq, regs);
#endif
if ((tcb->flags & TCB_FLAG_SIGDELIVER) != 0)
if (tcb->sigdeliver)
{
/* Pendsv able to access running tcb with no critical section */

View file

@ -85,8 +85,7 @@
.syntax unified
.type exception_common, function
exception_common:
.cfi_sections .debug_frame
.cfi_startproc
/* Complete the context save */
/* Get the current stack pointer. The EXC_RETURN value tells us whether
@ -163,11 +162,7 @@ exception_common:
isb sy
3:
#endif
mov fp, r1
.cfi_def_cfa fp, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_doirq /* R0=IRQ, R1=register save area on stack */
/* On return from arm_doirq, R0 will hold a pointer to register context
@ -220,7 +215,7 @@ exception_common:
*/
bx r14 /* And return */
.cfi_endproc
.size exception_common, .-exception_common
/****************************************************************************

View file

@ -31,18 +31,11 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/spinlock.h>
#include "ram_vectors.h"
#ifdef CONFIG_ARCH_RAMVECTORS
/****************************************************************************
* Private Data
****************************************************************************/
static spinlock_t g_ramvec_lock = SP_UNLOCKED;
/****************************************************************************
* Public Functions
****************************************************************************/
@ -75,7 +68,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector)
* common exception handler.
*/
flags = spin_lock_irqsave(&g_ramvec_lock);
flags = enter_critical_section();
if (vector == NULL)
{
/* Disable the interrupt if we can before detaching it. We might
@ -94,7 +87,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector)
/* Save the new vector in the vector table */
g_ram_vectors[irq] = vector;
spin_unlock_irqrestore(&g_ramvec_lock, flags);
leave_critical_section(flags);
ret = OK;
}

View file

@ -37,7 +37,6 @@
#include "psr.h"
#include "exc_return.h"
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
#include "irq/irq.h"
#include "nvic.h"
@ -97,8 +96,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
* REVISIT: Signal handle will run in a critical section!
*/
nxsig_deliver(tcb);
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
(tcb->sigdeliver)(tcb);
tcb->sigdeliver = NULL;
}
else if (tcb == rtcb && ipsr != NVIC_IRQ_PENDSV)
{

View file

@ -37,7 +37,6 @@
#include <arch/board/board.h>
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -70,9 +69,9 @@ void arm_sigdeliver(void)
board_autoled_on(LED_SIGNAL);
sinfo("rtcb=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigpendactionq.head);
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
DEBUGASSERT(rtcb->sigdeliver != NULL);
retry:
#ifdef CONFIG_SMP
@ -104,7 +103,7 @@ retry:
/* Deliver the signal */
nxsig_deliver(rtcb);
(rtcb->sigdeliver)(rtcb);
/* Output any debug messages BEFORE restoring errno (because they may
* alter errno), then disable interrupts again and restore the original
@ -151,9 +150,7 @@ retry:
* could be modified by a hostile program.
*/
/* Allows next handler to be scheduled */
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */
/* Then restore the correct state for this thread of
* execution.

View file

@ -35,7 +35,7 @@ else ifeq ($(CONFIG_ARCH_CORTEXA9),y)
endif
ifeq ($(CONFIG_ARM_THUMB),y)
LLVM_ARCHTYPE := thumbv7a
LLVM_ARCHTYPE := thumbv7
else
LLVM_ARCHTYPE := armv7a
endif

View file

@ -52,7 +52,7 @@
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS > 1
static atomic_t g_gic_init_done;
static volatile cpu_set_t g_gic_init_done;
#endif
/****************************************************************************
@ -72,7 +72,11 @@ static atomic_t g_gic_init_done;
#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS > 1
static void arm_gic_init_done(void)
{
atomic_fetch_or(&g_gic_init_done, 1 << this_cpu());
irqstate_t flags;
flags = spin_lock_irqsave(NULL);
CPU_SET(this_cpu(), &g_gic_init_done);
spin_unlock_irqrestore(NULL, flags);
}
static void arm_gic_wait_done(cpu_set_t cpuset)
@ -81,7 +85,7 @@ static void arm_gic_wait_done(cpu_set_t cpuset)
do
{
tmpset = (cpu_set_t)atomic_read(&g_gic_init_done) & cpuset;
CPU_AND(&tmpset, &g_gic_init_done, &cpuset);
}
while (!CPU_EQUAL(&tmpset, &cpuset));
}

View file

@ -38,7 +38,6 @@
#include <debug.h>
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include "arm_internal.h"
#include "barriers.h"
@ -226,12 +225,6 @@
#define PL310_GULP_SIZE 4096
/****************************************************************************
* Private Data
****************************************************************************/
static spinlock_t g_l2cc_lock = SP_UNLOCKED;
/****************************************************************************
* Private Functions
****************************************************************************/
@ -269,66 +262,6 @@ static void pl310_flush_all(void)
putreg32(0, L2CC_CSR);
}
/****************************************************************************
* Name: l2cc_disable_nolock
*
* Description:
* Disable the L2CC-P310 L2 cache by clearing the Control Register (CR)
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
static void l2cc_disable_nolock(void)
{
/* Flush all ways using the Clean Invalidate Way Register (CIWR). */
pl310_flush_all();
/* Disable the L2CC-P310 L2 cache by clearing the Control Register (CR) */
putreg32(0, L2CC_CR);
ARM_DSB();
ARM_ISB();
}
/****************************************************************************
* Name: l2cc_invalidate_all_nolock
*
* Description:
* Invalidate all ways using the Invalidate Way Register (IWR).
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
static void l2cc_invalidate_all_nolock(void)
{
/* Invalidate all ways by writing the bit mask of ways to be invalidated
* the Invalidate Way Register (IWR).
*/
putreg32(PL310_WAY_MASK, L2CC_IWR);
/* Wait for cache operation by way to complete */
while ((getreg32(L2CC_IWR) & PL310_WAY_MASK) != 0);
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
putreg32(0, L2CC_CSR);
}
/****************************************************************************
* Public Functions
****************************************************************************/
@ -524,18 +457,18 @@ void l2cc_enable(void)
/* Invalidate and enable the cache (must be disabled to do this!) */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
if ((getreg32(L2CC_CR) & L2CC_CR_L2CEN) != 0)
{
l2cc_disable_nolock();
l2cc_disable();
}
l2cc_invalidate_all_nolock();
l2cc_invalidate_all();
putreg32(L2CC_CR_L2CEN, L2CC_CR);
ARM_DSB();
ARM_ISB();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -556,11 +489,17 @@ void l2cc_disable(void)
{
irqstate_t flags;
flags = spin_lock_irqsave(&g_l2cc_lock);
/* Flush all ways using the Clean Invalidate Way Register (CIWR). */
l2cc_disable_nolock();
flags = enter_critical_section();
pl310_flush_all();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
/* Disable the L2CC-P310 L2 cache by clearing the Control Register (CR) */
putreg32(0, L2CC_CR);
ARM_DSB();
ARM_ISB();
leave_critical_section(flags);
}
/****************************************************************************
@ -586,9 +525,9 @@ void l2cc_sync(void)
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -609,11 +548,27 @@ void l2cc_invalidate_all(void)
{
irqstate_t flags;
flags = spin_lock_irqsave(&g_l2cc_lock);
/* Invalidate all ways */
l2cc_invalidate_all_nolock();
flags = enter_critical_section();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
/* Invalidate all ways by writing the bit mask of ways to be invalidated
* the Invalidate Way Register (IWR).
*/
putreg32(PL310_WAY_MASK, L2CC_IWR);
/* Wait for cache operation by way to complete */
while ((getreg32(L2CC_IWR) & PL310_WAY_MASK) != 0);
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
putreg32(0, L2CC_CSR);
leave_critical_section(flags);
}
/****************************************************************************
@ -640,7 +595,7 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
/* Check if the start address is aligned with a cacheline */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
if ((startaddr & PL310_CACHE_LINE_MASK) != 0)
{
/* No.. align down and flush the cache line by writing the address to
@ -667,7 +622,7 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
putreg32(endaddr, L2CC_CIPALR);
}
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
/* Loop, invalidated the address range by cache line. Interrupts are re-
* enabled momentarily every PL310_GULP_SIZE bytes.
@ -685,7 +640,7 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
/* Disable interrupts and invalidate the gulp */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
while (startaddr < gulpend)
{
/* Invalidate the cache line by writing the address to the
@ -701,16 +656,16 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
/* Enable interrupts momentarily */
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -735,7 +690,7 @@ void l2cc_clean_all(void)
* Ways Register (CWR).
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(PL310_WAY_MASK, L2CC_CWR);
/* Wait for cache operation by way to complete */
@ -747,7 +702,7 @@ void l2cc_clean_all(void)
*/
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -803,7 +758,7 @@ void l2cc_clean(uintptr_t startaddr, uintptr_t endaddr)
/* Disable interrupts and clean the gulp */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
while (startaddr < gulpend)
{
/* Clean the cache line by writing the address to the Clean
@ -819,16 +774,16 @@ void l2cc_clean(uintptr_t startaddr, uintptr_t endaddr)
/* Enable interrupts momentarily */
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -851,9 +806,9 @@ void l2cc_flush_all(void)
/* Flush all ways using the Clean Invalidate Way Register (CIWR). */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
pl310_flush_all();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -909,7 +864,7 @@ void l2cc_flush(uint32_t startaddr, uint32_t endaddr)
/* Disable interrupts and flush the gulp */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
while (startaddr < gulpend)
{
/* Flush the cache line by writing the address to the Clean
@ -925,16 +880,16 @@ void l2cc_flush(uint32_t startaddr, uint32_t endaddr)
/* Enable interrupts momentarily */
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
#endif /* CONFIG_ARMV7A_L2CC_PL310 */

View file

@ -36,7 +36,6 @@
#include "arm.h"
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
#include "irq/irq.h"
@ -95,8 +94,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
* REVISIT: Signal handler will run in a critical section!
*/
nxsig_deliver(tcb);
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
(tcb->sigdeliver)(tcb);
tcb->sigdeliver = NULL;
}
else
{

View file

@ -37,7 +37,6 @@
#include <arch/board/board.h>
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -70,9 +69,9 @@ void arm_sigdeliver(void)
board_autoled_on(LED_SIGNAL);
sinfo("rtcb=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigpendactionq.head);
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
DEBUGASSERT(rtcb->sigdeliver != NULL);
retry:
#ifdef CONFIG_SMP
@ -104,7 +103,7 @@ retry:
/* Deliver the signal */
nxsig_deliver(rtcb);
(rtcb->sigdeliver)(rtcb);
/* Output any debug messages BEFORE restoring errno (because they may
* alter errno), then disable interrupts again and restore the original
@ -151,9 +150,7 @@ retry:
* could be modified by a hostile program.
*/
/* Allows next handler to be scheduled */
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */
/* Then restore the correct state for this thread of execution. */

View file

@ -410,7 +410,7 @@ uint32_t *arm_syscall(uint32_t *regs)
/* Copy "info" into user stack */
if ((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0)
if (rtcb->sigdeliver)
{
usp = rtcb->xcp.saved_regs[REG_SP];
}

View file

@ -173,8 +173,6 @@
.type arm_vectorirq, %function
arm_vectorirq:
.cfi_sections .debug_frame
.cfi_startproc
/* Save the LR and SPSR onto the SYS mode stack before switch. */
@ -236,11 +234,6 @@ arm_vectorirq:
#endif
bic sp, sp, #7 /* Force 8-byte alignment */
mov fp, r0
.cfi_def_cfa fp, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_decodeirq /* Call the handler */
mov sp, r4 /* Restore the possibly unaligned stack pointer */
@ -274,7 +267,6 @@ arm_vectorirq:
.Lirqstacktop:
.word g_intstacktop
#endif
.cfi_endproc
.size arm_vectorirq, . - arm_vectorirq
.align 5
@ -402,8 +394,6 @@ arm_vectorsvc:
.type arm_vectordata, %function
arm_vectordata:
.cfi_sections .debug_frame
.cfi_startproc
/* Save the LR and SPSR onto the SYS mode stack before switch. */
@ -447,11 +437,6 @@ arm_vectordata:
mrc CP15_DFSR(r2) /* Get r2=DFSR */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
mov fp, r0
.cfi_def_cfa fp, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_dataabort /* Call the handler */
mov sp, r4 /* Restore the possibly unaligned stack pointer */
@ -480,7 +465,6 @@ arm_vectordata:
/* Restore the CPSR, SYS mode registers and return. */
rfeia r14
.cfi_endproc
.size arm_vectordata, . - arm_vectordata
.align 5
@ -501,8 +485,6 @@ arm_vectordata:
.type arm_vectorprefetch, %function
arm_vectorprefetch:
.cfi_sections .debug_frame
.cfi_startproc
/* Save the LR and SPSR onto the SYS mode stack before switch. */
@ -540,11 +522,6 @@ arm_vectorprefetch:
mrc CP15_IFSR(r2) /* Get r2=IFSR */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
mov fp, r0
.cfi_def_cfa fp, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_prefetchabort /* Call the handler */
mov sp, r4 /* Restore the possibly unaligned stack pointer */
@ -573,7 +550,6 @@ arm_vectorprefetch:
/* Restore the CPSR, SYS mode registers and return. */
rfeia r14
.cfi_endproc
.size arm_vectorprefetch, . - arm_vectorprefetch
.align 5
@ -592,8 +568,7 @@ arm_vectorprefetch:
.type arm_vectorundefinsn, %function
arm_vectorundefinsn:
.cfi_sections .debug_frame
.cfi_startproc
/* Save the LR and SPSR onto the SYS mode stack before switch. */
srsdb sp!, #PSR_MODE_SYS
@ -627,11 +602,6 @@ arm_vectorundefinsn:
mov r0, sp /* Get r0=xcp */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
mov fp, r0
.cfi_def_cfa fp, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_undefinedinsn /* Call the handler */
mov sp, r4 /* Restore the possibly unaligned stack pointer */
@ -660,7 +630,6 @@ arm_vectorundefinsn:
/* Restore the CPSR, SYS mode registers and return. */
rfeia r14
.cfi_endproc
.size arm_vectorundefinsn, . - arm_vectorundefinsn
.align 5
@ -681,8 +650,6 @@ arm_vectorundefinsn:
.type arm_vectorfiq, %function
arm_vectorfiq:
.cfi_sections .debug_frame
.cfi_startproc
#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) || defined(CONFIG_ARCH_HIPRI_INTERRUPT)
/* Save the LR and SPSR onto the SYS mode stack before switch. */
@ -725,11 +692,6 @@ arm_vectorfiq:
#endif
bic sp, sp, #7 /* Force 8-byte alignment */
mov fp, r0
.cfi_def_cfa fp, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_decodefiq /* Call the handler */
mov sp, r4 /* Restore the possibly unaligned stack pointer */
@ -769,7 +731,6 @@ arm_vectorfiq:
#else
subs pc, lr, #4
#endif
.cfi_endproc
.size arm_vectorfiq, . - arm_vectorfiq
/****************************************************************************

View file

@ -34,7 +34,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include <sched/sched.h>
#include <signal/signal.h>
#include "arm_internal.h"
#include "exc_return.h"
@ -87,7 +86,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
irq_dispatch(irq, regs);
#endif
if ((tcb->flags & TCB_FLAG_SIGDELIVER) != 0)
if (tcb->sigdeliver)
{
/* Pendsv able to access running tcb with no critical section */

View file

@ -121,8 +121,7 @@
.type exception_common, function
#endif
exception_common:
.cfi_sections .debug_frame
.cfi_startproc
mrs r0, ipsr /* R0=exception number */
mrs r12, control /* R12=control */
@ -200,11 +199,7 @@ exception_common:
mov sp, r2 /* Instantiate the aligned stack */
3:
#endif
mov fp, r1
.cfi_def_cfa r4, 0 /* Register in fp, so we just set fp as frame */
.cfi_offset pc, REG_PC * 4
.cfi_offset sp, REG_SP * 4
.cfi_offset lr, REG_LR * 4
bl arm_doirq /* R0=IRQ, R1=register save (msp) */
/* On return from arm_doirq, R0 will hold a pointer to register context
@ -240,7 +235,6 @@ exception_common:
*/
bx r14 /* And return */
.cfi_endproc
.size exception_common, .-exception_common

View file

@ -31,18 +31,11 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/spinlock.h>
#include "ram_vectors.h"
#ifdef CONFIG_ARCH_RAMVECTORS
/****************************************************************************
* Private Data
****************************************************************************/
static spinlock_t g_ramvec_lock = SP_UNLOCKED;
/****************************************************************************
* Public Functions
****************************************************************************/
@ -75,7 +68,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector)
* common exception handler.
*/
flags = spin_lock_irqsave(&g_ramvec_lock);
flags = enter_critical_section();
if (vector == NULL)
{
/* Disable the interrupt if we can before detaching it. We might
@ -94,7 +87,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector)
/* Save the new vector in the vector table */
g_ram_vectors[irq] = vector;
spin_unlock_irqrestore(&g_ramvec_lock, flags);
leave_critical_section(flags);
ret = OK;
}

View file

@ -38,7 +38,6 @@
#include "psr.h"
#include "exc_return.h"
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
#include "irq/irq.h"
#include "nvic.h"
@ -98,8 +97,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
* REVISIT: Signal handle will run in a critical section!
*/
nxsig_deliver(tcb);
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
(tcb->sigdeliver)(tcb);
tcb->sigdeliver = NULL;
}
else if (tcb == rtcb && ipsr != NVIC_IRQ_PENDSV)
{

View file

@ -37,7 +37,6 @@
#include <arch/board/board.h>
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -70,9 +69,9 @@ void arm_sigdeliver(void)
board_autoled_on(LED_SIGNAL);
sinfo("rtcb=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigpendactionq.head);
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
DEBUGASSERT(rtcb->sigdeliver != NULL);
retry:
#ifdef CONFIG_SMP
@ -104,7 +103,7 @@ retry:
/* Deliver the signal */
nxsig_deliver(rtcb);
(rtcb->sigdeliver)(rtcb);
/* Output any debug messages BEFORE restoring errno (because they may
* alter errno), then disable interrupts again and restore the original
@ -151,9 +150,7 @@ retry:
* could be modified by a hostile program.
*/
/* Allows next handler to be scheduled */
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */
/* Then restore the correct state for this thread of
* execution.

View file

@ -38,7 +38,6 @@
#include <debug.h>
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include "arm_internal.h"
#include "barriers.h"
@ -226,12 +225,6 @@
#define PL310_GULP_SIZE 4096
/****************************************************************************
* Private Data
****************************************************************************/
static volatile spinlock_t g_l2cc_lock = SP_UNLOCKED;
/****************************************************************************
* Private Functions
****************************************************************************/
@ -269,66 +262,6 @@ static void pl310_flush_all(void)
putreg32(0, L2CC_CSR);
}
/****************************************************************************
* Name: l2cc_disable_nolock
*
* Description:
* Disable the L2CC-P310 L2 cache by clearing the Control Register (CR)
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
static void l2cc_disable_nolock(void)
{
/* Flush all ways using the Clean Invalidate Way Register (CIWR). */
pl310_flush_all();
/* Disable the L2CC-P310 L2 cache by clearing the Control Register (CR) */
putreg32(0, L2CC_CR);
ARM_DSB();
ARM_ISB();
}
/****************************************************************************
* Name: l2cc_invalidate_all_nolock
*
* Description:
* Invalidate all ways using the Invalidate Way Register (IWR).
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
static void l2cc_invalidate_all_nolock(void)
{
/* Invalidate all ways by writing the bit mask of ways to be invalidated
* the Invalidate Way Register (IWR).
*/
putreg32(PL310_WAY_MASK, L2CC_IWR);
/* Wait for cache operation by way to complete */
while ((getreg32(L2CC_IWR) & PL310_WAY_MASK) != 0);
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
putreg32(0, L2CC_CSR);
}
/****************************************************************************
* Public Functions
****************************************************************************/
@ -524,18 +457,18 @@ void l2cc_enable(void)
/* Invalidate and enable the cache (must be disabled to do this!) */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
if ((getreg32(L2CC_CR) & L2CC_CR_L2CEN) != 0)
{
l2cc_disable_nolock();
l2cc_disable();
}
l2cc_invalidate_all_nolock();
l2cc_invalidate_all();
putreg32(L2CC_CR_L2CEN, L2CC_CR);
ARM_DSB();
ARM_ISB();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -556,11 +489,17 @@ void l2cc_disable(void)
{
irqstate_t flags;
flags = spin_lock_irqsave(&g_l2cc_lock);
/* Flush all ways using the Clean Invalidate Way Register (CIWR). */
l2cc_disable_nolock();
flags = enter_critical_section();
pl310_flush_all();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
/* Disable the L2CC-P310 L2 cache by clearing the Control Register (CR) */
putreg32(0, L2CC_CR);
ARM_DSB();
ARM_ISB();
leave_critical_section(flags);
}
/****************************************************************************
@ -586,9 +525,9 @@ void l2cc_sync(void)
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -609,11 +548,27 @@ void l2cc_invalidate_all(void)
{
irqstate_t flags;
flags = spin_lock_irqsave(&g_l2cc_lock);
/* Invalidate all ways */
l2cc_invalidate_all_nolock();
flags = enter_critical_section();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
/* Invalidate all ways by writing the bit mask of ways to be invalidated
* the Invalidate Way Register (IWR).
*/
putreg32(PL310_WAY_MASK, L2CC_IWR);
/* Wait for cache operation by way to complete */
while ((getreg32(L2CC_IWR) & PL310_WAY_MASK) != 0);
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
putreg32(0, L2CC_CSR);
leave_critical_section(flags);
}
/****************************************************************************
@ -640,7 +595,7 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
/* Check if the start address is aligned with a cacheline */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
if ((startaddr & PL310_CACHE_LINE_MASK) != 0)
{
/* No.. align down and flush the cache line by writing the address to
@ -667,7 +622,7 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
putreg32(endaddr, L2CC_CIPALR);
}
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
/* Loop, invalidated the address range by cache line. Interrupts are re-
* enabled momentarily every PL310_GULP_SIZE bytes.
@ -685,7 +640,7 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
/* Disable interrupts and invalidate the gulp */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
while (startaddr < gulpend)
{
/* Invalidate the cache line by writing the address to the
@ -701,16 +656,16 @@ void l2cc_invalidate(uintptr_t startaddr, uintptr_t endaddr)
/* Enable interrupts momentarily */
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -735,7 +690,7 @@ void l2cc_clean_all(void)
* Ways Register (CWR).
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(PL310_WAY_MASK, L2CC_CWR);
/* Wait for cache operation by way to complete */
@ -747,7 +702,7 @@ void l2cc_clean_all(void)
*/
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -803,7 +758,7 @@ void l2cc_clean(uintptr_t startaddr, uintptr_t endaddr)
/* Disable interrupts and clean the gulp */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
while (startaddr < gulpend)
{
/* Clean the cache line by writing the address to the Clean
@ -819,16 +774,16 @@ void l2cc_clean(uintptr_t startaddr, uintptr_t endaddr)
/* Enable interrupts momentarily */
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -851,9 +806,9 @@ void l2cc_flush_all(void)
/* Flush all ways using the Clean Invalidate Way Register (CIWR). */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
pl310_flush_all();
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/****************************************************************************
@ -909,7 +864,7 @@ void l2cc_flush(uint32_t startaddr, uint32_t endaddr)
/* Disable interrupts and flush the gulp */
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
while (startaddr < gulpend)
{
/* Flush the cache line by writing the address to the Clean
@ -925,16 +880,16 @@ void l2cc_flush(uint32_t startaddr, uint32_t endaddr)
/* Enable interrupts momentarily */
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
/* Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and
* EB, are empty.
*/
flags = spin_lock_irqsave(&g_l2cc_lock);
flags = enter_critical_section();
putreg32(0, L2CC_CSR);
spin_unlock_irqrestore(&g_l2cc_lock, flags);
leave_critical_section(flags);
}
#endif /* CONFIG_ARMV7R_L2CC_PL310 */

View file

@ -35,7 +35,6 @@
#include "arm.h"
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -93,8 +92,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
* REVISIT: Signal handler will run in a critical section!
*/
nxsig_deliver(tcb);
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
(tcb->sigdeliver)(tcb);
tcb->sigdeliver = NULL;
}
else
{

View file

@ -37,7 +37,6 @@
#include <arch/board/board.h>
#include "sched/sched.h"
#include "signal/signal.h"
#include "arm_internal.h"
/****************************************************************************
@ -70,9 +69,9 @@ void arm_sigdeliver(void)
board_autoled_on(LED_SIGNAL);
sinfo("rtcb=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigpendactionq.head);
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
DEBUGASSERT(rtcb->sigdeliver != NULL);
retry:
#ifdef CONFIG_SMP
@ -104,7 +103,7 @@ retry:
/* Deliver the signal */
nxsig_deliver(rtcb);
(rtcb->sigdeliver)(rtcb);
/* Output any debug messages BEFORE restoring errno (because they may
* alter errno), then disable interrupts again and restore the original
@ -148,9 +147,7 @@ retry:
* could be modified by a hostile program.
*/
/* Allows next handler to be scheduled */
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */
/* Then restore the correct state for this thread of execution. */

View file

@ -407,7 +407,7 @@ uint32_t *arm_syscall(uint32_t *regs)
/* Copy "info" into user stack */
if ((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0)
if (rtcb->sigdeliver)
{
usp = rtcb->xcp.saved_regs[REG_SP];
}

View file

@ -97,7 +97,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
irq_dispatch(irq, regs);
#endif
if ((tcb->flags & TCB_FLAG_SIGDELIVER) != 0)
if (tcb->sigdeliver)
{
/* Pendsv able to access running tcb with no critical section */

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