Commit graph

59206 commits

Author SHA1 Message Date
Huang Qi
51482774c2 arch/risc-v: espressif: temperature: Fix incorrect pointer casting
Fix bug in temperature sensor driver where direct casting of lower half
structure pointer could lead to incorrect memory access.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-09-20 08:01:21 -03:00
Huang Qi
6f3658fe23 arch/xtensa: espressif: temperature: Fix incorrect pointer casting
Fix bug in temperature sensor driver where direct casting of lower half
structure pointer could lead to incorrect memory access.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-09-20 08:01:21 -03:00
MASZ
2e85eae6b2 arch/arm/stm32h7: Fix and enhance WWDG (Window Watchdog) support
This patch addresses several issues and adds enhancements to the WWDG
(Window Watchdog) implementation for the STM32H7 platform. The changes
include:

- Extend the definitions of WWDG_CFR_PCLK1 macros to support dividers
  up to 128, and update the stm32_settimeout() function to consider this
  extended range.
- Fix the "elapsed" calculations in the stm32_getstatus() function to
  ensure correct time remaining calculations.
- Clear the EWIF (Early Wakeup Interrupt Flag) bit in the stm32_start()
  function, as this bit might be set by hardware before the watchdog is
  actually started.
- Initialize the WWDG clock in the RCC_APB3ENR register and set the
  RCC_GCR_WW1RSC bit as per the STM32 reference manual to ensure proper
  behavior when enabling the WWDG1.

Signed-off-by: Szymon Magrian <szymon.magrian@hexagon.com>
2025-09-20 09:09:42 +08:00
Tiago Medicci Serrano
7431e85226 risc-v/espressif/timers: Update common source code functions
This commit updates the common source code for the timers used for
Espressif's RISC-Vs SoCs. This enables newer SoCs to be supported
in the future while maintaining backwards compatibility.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-09-20 00:35:50 +08:00
Ari Kimari
30ee64fc45 arch/arm64/imx9: Add ele commit message
Add ele commit message to ele api

Signed-off-by: Ari Kimari <ari.kimari@tii.ae>
2025-09-19 22:02:26 +08:00
Filipe Cavalcanti
dda00d30bf documentation: add docs for romfs defconfig on Espressif devices
Update the documentation for ESP32-S2|S3|C3|C6|H2, supporting romfs defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-19 07:18:54 -03:00
Filipe Cavalcanti
eb00c1317d boards/xtensa: add support for init script on ESP32-S2|S3
Adds support for init script on ESP32 and ESP32-S2.
Moves the scripts of ESP32-S3 from board specific to
board common (they are the same).

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-19 07:18:54 -03:00
Filipe Cavalcanti
a729534e52 boards/risc-v: add support for init script on ESP32-C3|C6|H2
Adds support for init script on ESP32-C3|C6|H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-19 07:18:54 -03:00
Tiago Medicci Serrano
5c11f37e93 include/nuttx/spi/spi_bitbang: Fix incompatible pointer type issue
This commit fixes the incompatible pointer type issue due to
incompatible types of the `bitexchange_t` callback.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-09-19 10:15:27 +08:00
michal matias
10df0c4357 boards/arm/samv7/samv71-xult/configs/oa_tc6: Add plcatool support
Add support for the plcatool utility into samv71-xult oa_tc6 defconfig.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-09-19 09:34:48 +08:00
simbit18
ac47c9d41a ci/docker: add Raspberry Pi picotool and fix GN build
- Add prebuilt Raspberry Pi picotool

- fix GN build with:
     git checkout 5d0a4153b0bcc86c5a23310d5b648a587be3c56d

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-19 09:32:54 +08:00
Jukka Laitinen
6b2a5dfa01 imx9/imx9_usbdev.c: Fix interrupt handling in SMP mode
The interrupt handler accesses the device as well as the driver's private
data. Use critical_section for mutual exclusion with drivers/usbdev, which
also protects the same data with critical_section.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-18 22:28:16 +08:00
Lars Kruse
2477914ea6 board/arm/rp2040: implement "board_boot_image" for bootloader support
This function is required by the bootloaders (nxboot and mcuboot).

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2025-09-18 11:13:15 -03:00
wangchengdong
b92e0b6730 arch: fix alignment bug for archs that need stack alignment
These archs only align the size of the stack, forgeting to do the
 stack start addr alignment, this patch fixes it.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-18 11:11:32 -03:00
michal matias
bd28635b68 Documentation/platforms/risc-v/esp32c6: Add oa_tc6 defconfig info
Add documentation for new oa_tc6 defconfig into esp32c6-devkitc and esp32c6-devkitm boards docs.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-09-18 08:17:35 -03:00
michal matias
6eef3880a0 boards/risc-v/esp32c6: Add support for the OA-TC6 10BASE-T1x MAC-PHYs
Add support for the OA-TC6 10BASE-T1x driver to the ESP32-C6 boards.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-09-18 08:17:35 -03:00
Michal Lenc
6ec759706d arch/arm/samv7: enable USART peripherals for SAMx7xJ series
SAME70J and SAMV70J series (64 pin packages) have two USART peripherals
and three UART peripherals. Ensure USART peripherals are enabled.

This is consistent with datasheet, USART0 also physically tested
on SAME70J21 MCU.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-09-18 11:05:56 +02:00
Sergey Rzhevsky
59f3a37b83 cmake/stm32h7: Add LTDC support to CMakeLists.txt
Adds conditional compilation of the stm32_ltdc.c file to the source list
(SRCS) for STM32H7 architecture when the CONFIG_STM32H7_LTDC option is
enabled in the configuration.

Signed-off-by: Sergey Rzhevsky <rzsa@yandex.ru>
2025-09-18 10:14:24 +02:00
wangchengdong
49bb96bd3a arch: fix stack alignment bug for arm and tricore arch
The stack alignment operation in tricore and arm porting
   only aligns the size of the stack, forget to align the start addr
   of the stack, this patch fixes it.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-18 13:45:38 +08:00
wangchengdong
34ca49b6f5 tasking/cmake: Provide better .hex and .srec gen for tasking compiler
Provide better hex and srec generation for tasking compiler, without relying
on freeware tricore-elf-objcopy.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-17 14:01:16 +08:00
wangchengdong
7f407476f9 nuttx/cmake: improve board specific Toolchain.cmake
remove limitation that only custom board can have
     board specific Toolchain.cmake

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-17 08:55:12 +08:00
simbit18
4a391c4e7f Kconfig: Fix Kconfig style
Remove spaces from Kconfig
Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-17 08:54:58 +08:00
simbit18
6e247670f6 drivers/input: Fix Kconfig style
Remove spaces from Kconfig
Add TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-17 08:54:58 +08:00
simbit18
e061b1063a board: Fix Kconfig style
Remove spaces from Kconfig
Add TAB

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-09-17 08:54:58 +08:00
wangchengdong
5d80cf7b83 arch/tricore: remove magic number in tricore_checkstack.c
before:
  |   start = (alloc + 3) & ~3;
  |   end   = (alloc + size) & ~3;
  after:
  |   start = STACK_ALIGN_UP((uintptr_t)alloc);
  |   end   = STACK_ALIGN_DOWN((uintptr_t)alloc + size);

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-16 09:18:30 -03:00
michal matias
12486d21dc boards/arm/samv7/samv71-xult: Add support for the OA-TC6 10BASE-T1x MAC-PHYs
Add support for the OA-TC6 10BASE-T1x driver to the SAMV71 Xplained ultra board.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-09-16 15:47:26 +08:00
wangchengdong
d4efae2494 arch/Kconfig: Add condition checking in Kconfig source statement
Add condition checking in Kconfig source statement, for example:

    source "arch/arm/Kconfig" is updated to:

    if ARCH_ARM
    source "arch/arm/Kconfig"
    endif

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-16 09:34:56 +02:00
Philippe Leduc
1daa2d54e3 Documentation/guides: Update CMake C++ guide
Use the exported CMake toolchain file instead of a  custom and broken one.
Slightly modify the C++ example code to introduce modern tools like auto keyword and shared_ptr

Signed-off-by: Philippe Leduc <philippe.leduc@mailfence.com>
2025-09-15 15:30:15 -03:00
wangchengdong
3eb1c21807 nuttx/cmake: add cmake disassembly support for GHS compiler
add cmake disassembly support for GHS compiler

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-16 02:01:36 +08:00
Jukka Laitinen
36168dd244 arch/risc-v/mpfs: Add ARCH_HAVE_ELF_EXECUTABLE for MPFS
This enables compiling fully linked apps for mpfs in CONFIG_BUILD_KERNEL

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-15 11:29:01 -04:00
Jukka Laitinen
724c44b1e9 arch/arm64/imx9: Add ARCH_HAVE_ELF_EXECUTABLE for IMX9
This enables compiling fully linked apps for imx9 in CONFIG_BUILD_KERNEL

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-15 11:29:01 -04:00
wangchengdong
71f558765c arch/tricore: add tasking compiler support to gen raw/hex binary
tasking compiler toolset does not provide binary generate tool,
  but the open source gcc compiler is able to do this, this patch will
  use tricore-elf-objcopy to generate raw binary and hex file when using
  tasking compiler to do the compiling and linking.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-15 01:44:39 +08:00
wangchengdong
474835eabe drivers/syslog: let syslog_write() return the maximum bytes writen
In current implementation, when doing syslog_write(), there may
 be more than one channel, the syslog will iterate each channel,
 but only return the bytes writen through the last channel, the
 better way should be returning the maximum bytes writen
 through one channel.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-14 11:08:35 -04:00
trns1997
918505e13d build/export: Fix missing gnu-elf.ld copy and toolchain script.
Fix missing `gnu-elf.ld` file copy during export generation
and update `toolchain.cmake` script to ensure proper toolchain
detection and configuration.
* Prevents build failures when exporting projects.
* Improves reproducibility of generated exports.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-09-14 10:44:51 +08:00
Filipe Cavalcanti
662c1e0bbb boards/xtensa: update board and defconfigs for Wi-Fi on ESP32|S2|S3
Updates the defconfigs and board source to support driver refactor.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-14 10:41:15 +08:00
Filipe Cavalcanti
20ff68bd65 arch/xtensa: refactor Wi-Fi driver for ESP32|S2|S3
Fixes low and inconsistent bandwidth issues.
Adds new configuration options for buffer management.
Moves code around to make the implementation cleaner and easier to debug.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-14 10:41:15 +08:00
Matteo Golin
903b6b168e bcm2711/i2c: Implement I2C support for all user-accessible interfaces
Initial I2C implementation such that I2C sending and receiving now
works well enough to use the BMP280 driver for a BMP280 device connected
to any of I2C0-I2C6 on the default pins. I2CTOOL also works for these
interfaces.

Functionality for "no stop" and "no start" options is not present.
Implementing that is not clear from the peripheral datasheet and will be
a challenge.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-14 10:40:36 +08:00
wangchengdong
778f3fa39c arch/tricore: allow user defined compiler path
prefix compiler with ${TOOLCHAIN_PREFIX}

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-12 10:08:45 +02:00
Matteo Golin
ba5dd64b64 docs/rx65n-rsk2mb: Migrate README.txt to rst format
Migrated the legacy README.txt format to rst format.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
Matteo Golin
4312e1a4f4 docs/rx65n-grrose: Migrate legacy README.txt to rst
Migrated the legacy README.txt file to rst format.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
Matteo Golin
387b0e4115 docs/skp16c26: Migrated legacy README.txt to rst format
Migrated the legacy README.txt file to rst.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
Matteo Golin
1638c1bc98 docs/us7032evb1: Migrate README.txt to RST format.
Migrated the legacy README.txt to RST format. I removed some information
which no longer applies since 2008 when this documentation was written.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-12 07:20:04 +02:00
chao an
3c4b099189 arch/arm/armv8-m: stack pointer should be 8-byte aligned in signal context
Since the alignment of the signal context is affected by XCPTCONTEXT_SIZE in
different Kconfig,  sometimes the stack pointer is not aligned to 8 bytes, this
is not what the software and compiler expect, for example,  if va_list() obtains
wide data of type long long, the offset will be wrong, So in this commit, we set
stack-aligned the base offset so that the correct offset will be set during context
restoration.

1. test code:
|            void signal_handler(int signo, siginfo_t *info, void *context) {
|                long long ttt = 1024000;
|                printf("%lld\n", ttt);
|            }
|
|            struct itimerspec its = {   .it_value.tv_sec  = 1,
|                .it_value.tv_nsec = 0,
|                .it_interval.tv_sec  = 1,
|                .it_interval.tv_nsec = 0
|            };
|
|            int main(int argc, FAR char *argv[])
|            {
|                struct sigevent evp;
|                timer_t timer_id;
|
|                memset(&evp, 0, sizeof(evp));
|                evp.sigev_notify          = SIGEV_SIGNAL | SIGEV_THREAD_ID;
|                evp.sigev_signo           = SIGALRM;
|                evp.sigev_notify_thread_id = gettid();
|
|                timer_create(CLOCK_REALTIME, &evp, &timer_id);
|
|
|                struct sigaction sa;
|                memset(&sa, 0, sizeof(sa));
|                sa.sa_sigaction = signal_handler;
|                sa.sa_flags = SA_SIGINFO;
|                sigemptyset(&sa.sa_mask);
|
|                sigaction(SIGALRM, &sa, NULL);
|
|                timer_settime(timer_id, 0, &its, NULL);
|
|                while (1)
|                    sleep(1);
|
|                return 0;
|            }

2. before this change:

|            NuttShell (NSH) NuttX-12.10.0
|            nsh> hello
|            4398046527890440
|            4398046527890472
|            4398046527890504
|            4398046527890536

3. after this change:

|            NuttShell (NSH) NuttX-12.10.0
|            nsh> hello
|            1024000
|            1024000
|            1024000
|            1024000

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-09-11 11:21:30 -03:00
nuttxs
a5b810bdb1 Kconfig: Add configurable Stack Canaries protection levels.
Introduce a configurable stack-protection level for the existing
CONFIG_STACK_CANARIES, instead of hard-coding -fstack-protector-all.
Add Kconfig choice STACK_CANARIES_LEVEL four selectable levels:

 -fstack-protector
 -fstack-protector-strong
 -fstack-protector-all (default)
 -fstack-protector-explicit

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-09-11 19:56:42 +08:00
Eren Terzioglu
092d7eac73 boards/risc-v/esp32c6: Add RTC GPIO board support for esp32c6
Add RTC GPIO board support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
e148048ac2 arch/risc-v/esp32c6: Add RTC GPIO support for esp32c6
Add RTC GPIO support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
eaaeed2236 Docs/risc-v/esp32c6: Add lpcore docs
Add lpcore board docs for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
4c03284a7d boards/risc-v/esp32c6: Add lpcore support
Add lpcore board support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Eren Terzioglu
70dc59a5e6 arch/risc-v/esp32c6: Add lpcore support
Add lpcore support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-09-11 10:57:18 +02:00
Matteo Golin
71c05b3a2b docs/calib_udelay: Added documentation for the calib_udelay example.
This commit adds documentation to the almost empty `calib_udelay` page
as part of #11081. It provides reasoning for the example, an explanation
of what it does and why `CONFIG_BOARD_LOOPSPERMSEC` is necessary, and
also shows some example console output of the program.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-09-10 17:52:38 -04:00