Commit graph

58490 commits

Author SHA1 Message Date
Lwazi Dube
bb97e14101 boards/sama5d3-xplained: Add knsh configuration 2025-05-20 09:16:27 -03:00
Lwazi Dube
2a7174601f boards/sama5d3-xplained: Use common usb host waiter.
Delete the board-specific usb host waiters and use the common code.
2025-05-20 09:32:22 +02:00
simbit18
8776147783 tools/Config.mk: add -DHAVE_STRNDUP=1
In all POSIX environments (Linux, Cygwin, MSYS2, macOS)
strndup() function is  available.

add HOSTCFLAGS += -DHAVE_STRTOK_C=1 -DHAVE_STRNDUP=1

Required after PR #16396

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-20 08:29:05 +08:00
Serg Podtynnyi
df8a889bd0 arch/arm/rp23xx: resets: do not reset USBCTL, SYSCFG
Do not reset USB, syscfg, as this disturbs USB-to-SWD on core 1
From upstream pico-sdk runtime init

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-05-19 12:27:18 -03:00
simbit18
3b27b44435 tools/nxstyle.c: fix error Relative file path on Windows Native
fix
error: Relative file path does not match actual file

Windows paths are different from Unix.

Added:

realpath replacement macro.

 my_strndup() Implementation of strndup() for Windows Native.

backslash_to_slash() Replace backslashes \ to forward slashes /. Used to verify the relative path of a file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-19 22:30:49 +08:00
Kerogit
631732e647 Documentation/platforms/avr: move documents to fix table of contents
The document context-switch-notes.rst was leaking into "Supported Platforms"
table of contents. To fix this, it was moved to separate common directory
and referenced from AVR index.rst

Similar to that, the gpio_intr_mux.rst document was leaking into list
of supported AVR families. This too was fixed by moving it to separate
docs directory.

The change was tested by building the Documentation using make html

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-19 22:29:58 +08:00
Kerogit
6f22e249a4 Documentation/platforms/avr: added information about UART usage
This patch adds instructions on how to enable UART on AVR DA/DB chips

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-19 22:29:58 +08:00
Kerogit
8126a8119f arch/avr: reworked eliminating unused sections with GCC
After a mailing list suggestion, the indirection that enabled
ARCH_TOOLCHAIN_GCC only when user requested it is removed.

The indirection was a safety measure for chips and boards with linker
scripts that (possibly) do not handle keeping for example .vectors
section even if the linker considers it unreferenced.

Instead, all existing configurations now disable
CONFIG_DEBUG_OPT_UNUSED_SECTIONS to prevent the linker from removing
any code. (Preserving previous behaviour.) This can be removed again
at some point after making sure that corresponding linker script
only removes code that is truly unused.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-19 22:29:58 +08:00
Kerogit
034d76f28f boards/avr/avrdx/breadxavr: fix dependency in Kconfig
Button input driver support depends on AVRDx GPIO ISR multiplexer
but the configuration option did not enforce it.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-19 22:29:58 +08:00
Kerogit
83872330ed Documentation/platforms/avr: provide more information for breadxavr board
This patch adds additional information to breadxavr board for AVR DA family
development. The text now covers how to use Button input driver and also
adds some information about using the hardware.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-19 22:29:58 +08:00
Kerogit
6196327155 boards/avr/avrdx/breadxavr: replace board hello configuration with NSH
Unlike the Hello, world example, the NSH configuration can serve
as a starting point for testing other examples.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-05-19 22:29:58 +08:00
Jukka Laitinen
6ed21ec1af sched: Remove checking of WDOG_ISACTIVE when cancelling wdog
Checking only adds a race condition. The checking if the wdog is active
or not must be done inside wd_cancel, where the proper spinlock is held

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-19 20:34:31 +08:00
Lars Kruse
ccc974b224 WIP: Documentation: replace first person perspectives
Documentation containing first person perspective phrasing may be
understood as belonging to a single person project (instead of a
community project).
2025-05-19 20:21:33 +08:00
simbit18
9520f5bfc8 [nxstyle]: fix Inconsistency in function headers style
added to the end of the header a new line *

added space

Doc Function Headers
https://nuttx.apache.org/docs/latest/contributing/coding_style.html#function-headers

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-19 20:20:46 +08:00
Matteo Golin
641e8daaef docs/contributing: Add board documentation template.
Introduced a template for board support documentation to help
standardize the documentation requirements for NuttX. Also added a small
section to the documentation contributing guidelines where templates can
be listed. This is part of item 9 in issue #16278 to improve NuttX
quality.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-05-18 00:57:26 +08:00
Lwazi Dube
accfb3609b boards/sama5d3-xplained: Fix mmc card detection.
Use the pins specified in the SAMA5D3 Xplained User Guide.
Rename config macros from SAMA5D4EK to SAMA5D3XPLAINED.
Add SDMMC support to defconfig. Boot mount is disabled by default.
2025-05-18 00:56:46 +08:00
simbit18
91027563fa tools/CMakeLists.txt: Improvements to CMakeLists.txt file
More aligned to the tools/Makefile.host file

Added:
The option() command  It provides a way to enable or disable targets of the project based on the user's preference.

Default
option(NUTTX_INCLUDE_ALL_TOOLS "Build all NuttX Host Tools" ON)

Checking host system for compilation options.

Tools configure, mkconfig, mksymtab and mkversion.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-05-17 16:09:20 +08:00
raiden00pl
0ecaeb7efe .codespellrc: ignore IST
Ignore IST for codespell.
IST is the name of company but also register name used in x86

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:16:54 +08:00
raiden00pl
fb901e3bda boards/thingy53: add BME688 sensor support
add BME688 sensor support to thingy53
2025-05-17 12:16:54 +08:00
raiden00pl
3a31da9585 sensors: add support for BME688 sensor
Add support for BME688 sensor based on BME680 implementation.
The BME688 is nearly identical to the BME680, and this implementation
reuses much of the existing BME680 code. However, there are some differences
related to gas measurements that make it impractical to use the same driver
without significantly complicating it. BME688 also supports parallel mode
which isn't yet supported.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:16:54 +08:00
Serg Podtynnyi
e5bf4fc5c4 arch/arm/rp23xx: xosc: Update startup delay calculation
Use upstream function to calculate XOSC startup delay

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-05-16 23:07:18 +08:00
Martin Vajnar
68b22fee3c Update defconfigs
Remove SENSORS and SENSORS_QENCODER as it is selected by ESP_PCNT_AS_QE.
2025-05-16 11:10:29 -03:00
Martin Vajnar
a3d0411c24 Select SENSORS_QENCODER as dependency for Quadrature Encoder mode of PCNT unit 2025-05-16 11:10:29 -03:00
Martin Vajnar
3e100e3c86 esp32[c6|h2|s2|s3]: Assign Edge/Level GPIO pin numbers when in Quadrature Encoder mode
Only 2 pins are needed in this mode for both channels. The wiring
is such that Edge and Level pins are cross-connected for both
channels.
2025-05-16 11:10:29 -03:00
Martin Vajnar
abac610d13 xtensa|espressif: Unify Quadrature Encoder handling among units 2025-05-16 11:10:29 -03:00
Martin Vajnar
51a75e622f esp32[c6|h2|s3|s2]: Fix assignment of Edge/Level GPIO pins in PCNT 2025-05-16 11:10:29 -03:00
Yanfeng Liu
55f85dd727 drivers/ctucan: fix IRQ ctrl
This revises the post-IRQ interruption control logic so that to balance
the disable/enable operations for both chardev and socketcan cases.

Checked with chardev/socketcan on qemu-intel64.

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-05-16 18:21:07 +08:00
Theodore Karatapanis
fcbd3099aa arch/arm64/imx9: Extend ELE API with RNG support
- Add ELE command to initialize the ELE RNG context.
- Add ELE command to poll the readiness of the RNG
- Add ELE command to obtain random numbers.
- Replace AHAB_ prefixes with ELE_
- Cleanup header includes
- Added some explanatory comments on .../hardware/imx9_ele.h

Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
2025-05-16 06:30:18 -03:00
michal matias
e115c4364e arch/risc-v/src/common/espressif/esp_pcnt.c: counter accumulation fix
Even when enabled, the PCNT counter doesn't accumulate into the 32-bit value.
Instead, a value in range [PCNT_LOW_LIMIT, PCNT_HIGH_LIMIT] is always returned.
This is due to interrupt events associated with limit overflows are disabled on the periphery,
therefore the ISR responsible for the accumulation never gets called.

Fixed by enabling the associated interrupt events.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-05-16 10:36:00 +08:00
Jukka Laitinen
466525891d Revert "sched/wdog/wd_cancel: Return 0 (OK) when cancelling an inactive wdog"
This reverts commit c28c14ad26.
2025-05-16 10:30:41 +08:00
zhangshoukui
f57a5a6802 fs/vfs/fs_dup.c: before file_allocate should restore minfd if define FDCHECK
When we use fcntl for dup, an fd is directly passed. If we have opened FDCHECK. we need to restore this file descriptor.

open FDCHECK and test this:

`
int main(int ac, char **av)
{
  int fd1= open("./1.txt", O_WRONLY | O_CREAT, 0666);
  if (fd1 < 0)
    {
      printf("open err\n");
      return fd1;
  }

  int fd2= open("./2.txt", O_WRONLY | O_CREAT, 0666);
  if (fd2 < 0)
    {
      printf("open err\n");
      close(fd1);
      return fd2;
    }

  //close(fd2);
  int fd3 = fcntl(fd1, F_DUPFD, fd2);
  printf("fd3 = %d\n", fd3);
  close(fd1);
  close(fd3);
  return 0;
}
`

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-05-15 16:51:40 -03:00
p-szafonimateusz
54510c5f94 boards/x86_64/qemu-intel64: add xHCI support to jumbo configs
add xHCI support for qemu-intel64 jumbo config

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-15 21:58:57 +08:00
p-szafonimateusz
fab4f68b6f drivers/usbhost: add xHCI support
add xHCI PCI driver (usbhost).

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-15 21:58:57 +08:00
p-szafonimateusz
3dc1ac91d6 usbhost: add common usb host waiter and drivers initialization
add common usb host waiter and drivers initialization which is
required for xHCI support

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-15 21:58:57 +08:00
Serg Podtynnyi
c5757ed71f sched/timedwait: Ensure critical section for nxsig_timeout
nxsig_timeout calls nxsched_add_readytorun and up_switch_context, so
must be in critical section.
nxsig_timeout is used as wdentry in nxsig_clockwait

See wd_expiration CALL_FUNC is not in critical section.

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-05-15 19:36:17 +08:00
Lars Kruse
57a7cb503a Documentation: fix spelling 2025-05-15 11:33:41 +08:00
William Yang
6633f9d907 boards/arm/nucleo-f429zi: Add example trace
Add example trace for board nucleo-f429zi

Signed-off-by: yangwei-x <yangwei3@lixiang.com>
2025-05-15 11:18:45 +08:00
Lars Kruse
4568110d63 fix misspelled names in locally scoped code
These misspelled words are used in strictly local scopes.
Renaming these variables should not cause any problems.
2025-05-15 10:12:12 +08:00
p-szafonimateusz
ce99762b36 drivers/ctucanfd_pci.c: fix pointer unaligned GCC error
fix an unaligned pointer error for arm32 build:

  ctucanfd_pci.c:1361:7: warning: converting a packed 'struct ctucanfd_frame_s'
  pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4)
  may result in an unaligned pointer value [-Waddress-of-packed-member]
   1361 |       ptr = (FAR uint32_t *)&rxframe;

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-15 10:00:22 +08:00
Eren Terzioglu
ea8744631a arch/xtensa: Update common layer version for esp32s3
Update common layer version for esp32s3 to fix warnings when building

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
59e13b4491 Documentation/xtensa: Add dedicated GPIO docs for esp32[-s2|-s3]
Add dedicated GPIO documentations for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
e9eaafd154 Documentation/risc-v: Add dedicated GPIO documentation for esp32[-c3|-c6|-h2]
Add dedicated GPIO documentation for risc-v based Espressif chips

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
d471609267 boards/xtensa: Add dedicated GPIO board level support for esp32[-s2|-s3]
Add board level dedicated GPIO support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
e9e3a0ecf7 arch/xtensa: Add dedicated GPIO support for esp32[-s2|-s3]
Add dedicated GPIO support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
21e580b9c4 boards/risc-v: Add dedicated GPIO board level support for esp32[-c3|-c6|-h2]
Add board level dedicated GPIO support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
Eren Terzioglu
b7bbb56338 arch/risc-v: Add Dedicated GPIO support for esp32[c3|c6|h2]
Add Dedicated GPIO support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-05-14 19:38:21 +02:00
p-szafonimateusz
cc5d6fcb41 arch/sim/Kconfig: fix codespell issues
arch/sim/Kconfig: fix codespell issues

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-14 21:50:15 +08:00
p-szafonimateusz
df76246c03 arch/sim/Kconfig: simulated CAN depends on LINUX host
simulated CAN depends on LINUX host now

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-14 21:50:15 +08:00
raiden00pl
dc73324ed0 drivers/can: fix codespell errors
drivers/can: fix codespell errors

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-14 10:30:25 -03:00
raiden00pl
5d95d0871f drivers/can: move CAN utils to CAN common files
Move can_bytes2dlc() and can_dlc2bytes() to a common CAN file
that can be shared between socketCAN implementation and CAN
character driver.

This is the first step to simplifying the logic repeated in
many CAN drivers.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-14 10:30:25 -03:00