Commit graph

58575 commits

Author SHA1 Message Date
George Poulios
67c7a4018a arm64/imx9: Support & configure RGMII-ID on RTL8211F
For the RTL8211F PHY, configuration of RX/TXDLY was missing.
At least on my i.MX93 EVK, this is necessary for transmission
to work (RXDLY defaults to true on the PHY).

This commit brings support for RGMII internal delay configuration
(on or off for both directions) and enables it on the i.MX93 EVK
board. The introduced Kconfig is set to default to 'n', to avoid
breaking the functionality of other, out-of-tree boards based on
i.MX93, running the RTL8211F PHY, or to avoid introducing
unnecessary code on boards running other PHYs.

Configuration of internal delay on other PHYs is not
implemented, and results in a warning (but no error).

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-06-05 08:58:24 +02:00
George Poulios
e382e2d525 arm64/imx9: Add missing ENET1 RGMII TXC pin muxing
MUX_ENET1_TXC was missing from both the EVK board
definition and the IO muxing configuration function
of the ENET1 driver. As a result, transmission does
not work (unless the muxing is set by default in some
board? -not the case with EVK). This commit adds the
configuration and adds the definition to i.MX93 EVK.

WARN: other, out-of-tree i.MX93 boards need to define
MUX_ENET1_TXC accordingly, otherwise build will break.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-06-05 08:58:24 +02:00
George Poulios
08f41244bc boards/imx93-evk: Tidy up board.h ENET1 section
i.MX93 EVK board.h had an unmatched #endif directive
accidentally matching the top-level header file guard.
It also had a dual definition of BOARD_ENET1_PHY_LIST
with the same values. None of these issues affect the
functionality, as they ended up (almost) with equivalent
end result.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-06-05 08:58:24 +02:00
Jukka Laitinen
0ac580cb7a arch/risc-v/mpfs: Add optimized perf timer functions for mpfs
Add up_perf_ functions for MPFS, which don't rely on alarm/oneshot interface.

Also add optimized up_udelay and up_ndelay functions, which use the MTIMER
directly to measure time; making them accurate and more multithreading friendly.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-06-04 20:48:03 -03:00
Matteo Golin
0bfcbed934 sensors/nau7802: Fix format warning
Silence format string warning by adding missing '%' sign.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-06-04 15:26:47 +08:00
simbit18
bcfcf03066 arch/arm/src/mcx-nxxx/CMakeLists.txt: Aligned Cmake with Make
Aligned Cmakefile with Make.defs PR #16469

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-06-03 10:07:39 -03:00
simbit18
ad93c6c399 arch/risc-v/src/qemu-rv/CMakeLists.txt: removed repeated addition of the file qemu_rv_userspace.c
9897ef3cdb/arch/risc-v/src/qemu-rv/CMakeLists.txt (L44)

aligned with the make.def file

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-06-03 10:03:49 -03:00
simbit18
4b2d72cf5f Documentation\components\tools\index.rst: updated help checkpatch.sh tool
Add:

-u encoding check with cvt2utf (install with: pip install cvt2utf)

-m Change-Id check in commit message (coupled with -g)

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-06-03 20:16:05 +08:00
Matteo Golin
9897ef3cdb docs/arduino-mega2560: Migrate README.txt to RST
Migrated legacy README.txt documentation to RST format.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-06-03 17:34:50 +08:00
Matteo Golin
170a86c4a5 docs/avr: Re-structure documentation
Re-structure the AVR documentation to have pages for the chip families,
and their own board listings.
2025-06-03 17:34:50 +08:00
Matteo Golin
8f130b78a9 docs/contributing: Add a commit message template
Introduces a commit message template with instructions in the
contributing documentation about how to set it up. This way users are
reminded of what makes a "good" NuttX commit as they write their commit,
and don't need to re-consult the documentation every time.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-06-03 17:33:24 +08:00
chao an
2ff44978c2 drivers/mtd: fix compile warning
mtd/mtd_rwbuffer.c:42:
mtd/mtd_rwbuffer.c: In function 'mtd_erase':
mtd/mtd_rwbuffer.c:189:9: warning: format '%zx' expects argument of type 'size_t', but argument 3 has type 'long long int' [-Wformat=]
  189 |   finfo("block: %08zx nsectors: %zu\n",
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  190 |         (intmax_t)block, nsectors);
      |         ~~~~~~~~~~~~~~~
      |         |
      |         long long int
mtd/mtd_rwbuffer.c:189:21: note: format string is defined here
  189 |   finfo("block: %08zx nsectors: %zu\n",
      |                 ~~~~^
      |                     |
      |                     unsigned int
      |                 %08llx
mtd/mtd_rwbuffer.c: In function 'mtd_ioctl':
mtd/mtd_rwbuffer.c:298:21: warning: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  298 |               finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  299 |                     geo->blocksize, geo->erasesize, geo->neraseblocks);
      |                     ~~~~~~~~~~~~~~
      |                        |
      |                        uint32_t {aka long unsigned int}
...

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-06-03 17:33:14 +08:00
chao an
d1136084b0 syslog/rpmsg: disable force put char to lower putc
if rpmsg triggers force flushing when the master core provides lower putc,
characters will be duplicated caused by SYSLOG_DEFAULT also send the char to lower half.
in this PR, we disable force put char to lower putc if CONFIG_SYSLOG_DEFAULT is enabled

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-06-03 17:33:03 +08:00
Matteo Golin
01f44f963c docs/conf.py: Fix missing nuttx_versions
Add `nuttx_versions` back into the `html_context` variable after it was
re-defined in #16440 to include more options. This fixes the failing
Pphinx autobuild.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-06-03 17:32:46 +08:00
Michal Lenc
b0342c87ee arch/arm/src/samv7/sam_serial_spi.c: set correct SPI mode during init
Bitfield CPHA has to be set to run SPI in mode 0. This is a default mode,
therefore it should be set during the peripheral initialization.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-02 23:10:44 +08:00
chao an
cc44b3b521 audio/comp: fix build warning caused by invalid return value
audio/audio_comp.c:958:14: warning: returning ‘int’ from a function with return
                                    type ‘struct audio_lowerhalf_s *’ makes pointer
                                    from integer without a cast [-Wint-conversion]
  958 |       return -EINVAL;
      |              ^

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-06-02 23:10:25 +08:00
Ville Juven
436c814c2e mcx-nxxx: Add LPI2C driver for mcx-nxxx architecture
This adds a LPI2C driver for the mcx-nxxx chip, and the necessary board
definitions for the frdm-mcxn236 evaluation kit.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-06-02 23:09:59 +08:00
Morten Fyhn Amundsen
143242776f Documentation: Fix a typo in scheduler docs
Removed a repeated word. Self-explanatory.

Signed-off-by: Morten Fyhn Amundsen <morten.f.amundsen@scoutdi.com>
2025-06-02 23:09:02 +08:00
Matteo Golin
ef04b4ccb6 boards/avr/atmega: Added Elegoo Mega2560r3 board support
Preliminary support for the Elegoo Mega2560r3 board by Elegoo with NSH
configuration.
2025-05-31 00:29:18 +08:00
dependabot[bot]
5bcf42e962 build(deps): bump codelytv/pr-size-labeler from 1.10.2 to 1.10.3
Bumps [codelytv/pr-size-labeler](https://github.com/codelytv/pr-size-labeler) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/codelytv/pr-size-labeler/releases)
- [Commits](https://github.com/codelytv/pr-size-labeler/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: codelytv/pr-size-labeler
  dependency-version: 1.10.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 10:34:23 -03:00
T. L.
29e6d4f96e Documentation/drivers/analog/adc/ads1115: Add missing documentation for ioctl
This commit adds the missing documentation for the ioctl command ANIOC_ADS1115_READ_CHANNEL.

Signed-off-by: Tony Lin <99093620+justapotato213@users.noreply.github.com>
2025-05-29 22:03:43 -04:00
Peter van der Perk
7104a51411 arch/arm/imxrt: rt117x fix TCM/OCRAM ECC backdoor access
FlexRAM peripheral was incorrectly clocked and turned during
M7 sleep. This patch fixes clock setting and ensure that clock
stays on during M7 for backdoor access from for example eDMA
2025-05-30 08:51:46 +08:00
Matteo Golin
40ec988502 arduino-mega2560: Fix incorrect RAM_START address
Fixes an incorrect RAM_START address, which should be 0x800200 for SRAM.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-05-29 16:24:06 -03:00
Matteo Golin
557c83cea3 avr/atmega: Resolve memory corruption preventing boot
Resolve memory corruption issue where the memory values to be loaded
from flash to sram at boot contained incorrect values. Also added a
KEEP() guard around `.vectors` to prevent debug stripping from removing
them, as suggested by KR.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-05-29 16:24:06 -03:00
Matteo Golin
b49b62a733 analog/ads1115: Speed up channel measurement delays
The ADS1115 driver uses the `nxsig_usleep()` function to sleep for a
65us delay, but with a 1ms tick resolution and the context-switching
overhead, this is much more than 1ms. Introducing `up_udelay` (even with
a larger duration because of the unreliability of busy-waiting) speeds
up sampling noticeably.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-05-29 15:23:06 +08:00
Theodore Karatapanis
c6f4310331 arch/arm64/imx9: Guard EL3-only features when booting at EL1
Boards that run the i.MX9 bootloader at EL1 must not touch EL3-only
configuration. Add Kconfig guards so that:

* DDR training (IMX9_DDR_TRAINING)
* FIQ decode support (ARM64_DECODEFIQ)

are selected only when ARCH_ARM64_EXCEPTION_LEVEL == 3.

Code in arm64_chip_boot() is also guarded with ARCH_ARM64_EXCEPTION_LEVEL == 3

Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
2025-05-28 14:39:55 -03:00
robert
df058b462e Bluetooth SMP: added support for Legacy pairing (MITM) with passkey
#   1: .codespellrc
  #  /home/runner/work/nuttx/nuttx/nuttx/include/nuttx/uorb.h:307: afte ==> after
   # /home/runner/work/nuttx/nuttx/nuttx/include/nuttx/uorb.h:405: multipled ==> multiplied
    #/home/runner/work/nuttx/nuttx/nuttx/include/nuttx/uorb.h:416: multipled ==> multiplied
    #/home/runner/work/nuttx/nuttx/nuttx/include/nuttx/uorb.h:432: provies ==> provides, proves
    #/home/runner/work/nuttx/nuttx/nuttx/include/nuttx/uorb.h:1173: subcribers ==> subscribers
    #Error: Process completed with exit code 1.
2025-05-28 21:49:08 +08:00
Matteo Golin
ab756e8dd7 net/tcp: Fix keep-alive implementation
The TCP keep-alive implementation would send the probes and abort the
connection correctly, but without waking up the affected socket and
marking the connection as aborted. This patch from zhhyu7 in #16447
resolves the issue.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-05-28 10:18:17 -03:00
raiden00pl
302ceb701b include: fix Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
0b3245f701 boards: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
3ca2357a0b fs: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
6d6d965700 crypto: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
213ddea6a9 audio: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
194b635739 arch: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
7e11edba5d libs: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
9aab92e3cf net: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
98e2267297 drivers: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
raiden00pl
a8e03eefcd sched: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
wangjianyu3
e57cfc3778 arm64/toolchain: Add -fstack-usage for stack analysis
After `CONFIG_STACK_USAGE` enabled, no "*.su" file was generated, tools/showstack.sh output nothing.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-05-27 23:11:38 +08:00
Peter van der Perk
073e58a83f arch/arm/imxrt: support ramvectors in ITCM memory
This is done by initializing the ramvectors earlier in start so that
we can access the ITCM before the MPU gets configured
2025-05-27 20:46:36 +08:00
Peter van der Perk
6556d4e123 arch/arm/imxrt: MPU reset on startup and TCM size fixes
On rt10xx chips the MPU didn't got reset, which is needed for use
with bootloaders. Furthermore the TCM sizes where fixed now we use
kconfig symbol to set the size respectively. Also we mark ITCM as
RO/RO so we can't change data we executed from.
2025-05-27 20:46:36 +08:00
Kerogit
5f736ee160 arch/avr: make linker print memory usage if GCC is used
This option provides useful overview of used memory
and should have no downsides.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-27 20:46:22 +08:00
Kerogit
78b0a98747 arch/avr/src/avrdx: typo fix in avrdx_serial.c
Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-27 20:46:22 +08:00
Kerogit
fa7f81c34e arch/avr: fix up_saveusercontext
The up_saveusercontext function leverages USER_SAVE macro,
which is ordinarily used as a first half of the context switch.
This macro is therefore unsuitable to be used standalone,
it pops return address from the stack and does not return.

This patch adds missing instructions to do what would otherwise
be done by the second half of the context switch.

Tested by compiling and verifying the disassembly - the function
no longer falls through to the next function in the program memory,
push/pop instructions are balanced and stack contents preserved

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-27 20:46:22 +08:00
Kerogit
2c43595dfd boards/avr/avrdx/breadxavr: fix board LED constants
During initial development of AVR DA/DB support, the board LED code
and constants it uses were based on different AVR boards. The resulting
code therefore did not work for most indicated states.

This patch fixes LED status codes to match what the board LED code
expects. Tested by manually triggering reset_board function which
caused the board LED to blink (whereas it was not blinking before
the fix.)

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-27 20:46:22 +08:00
Alin Jerpelea
895154881c tools/doreleasenotes: remove deprecater API
remove old API since github removed deprecated API support

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-05-27 20:34:54 +08:00
Alin Jerpelea
7429385ffb AUTHORS: add Matteo Golin
Matteo Golin has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2025-05-27 20:34:16 +08:00
ouyangxiangzhen
947856efe0 sched/wdog: Add max delay tick limitation.
This commit changed the type of the delay ticks to the unsigned, which can reduce the useless branch conditions
Besides, this commit added max delay tick limitation to fix incorrect timing behavior if we delay SCLOCK_MAX in the SMP build.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-27 12:10:39 +02:00
ouyangxiangzhen
fce40edb6b sched/wqueue: Add max delay tick limitation.
This commit added max delay tick limitation for the workqueue.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-27 12:10:39 +02:00
wangzhi16
35a62b7d5e Revert "Reduce the size of tcb by four bytes."
This reverts commit 893c5e92c2.
2025-05-27 16:30:35 +08:00