Commit graph

58849 commits

Author SHA1 Message Date
Rodrigo Sim
95c9525c0d boards/arm/stm32f401rc-rs485: Add support to HX711 ADC
This commit adds support for the HX711 ADC in the STM32F401RC-RS485
board and updates the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-07-12 12:26:07 +08:00
wangmingrong1
51a82d5289 arm/clang: Fix crash caused by clang compiling with -mfpu=fpv5-d16 and -march=armv8.1-m.main+mve.fp+fp.dp
The above combination of compilation causes the compiler to crash:
 #1 0x0000000001fbe154 llvm::sys::CleanupOnSignal(unsigned long) (clang18/bin/clang-19+0x1fbe154)
 #2 0x0000000001f21203 llvm::CrashRecoveryContext::HandleExit(int) (clang18/bin/clang-19+0x1f21203)
 #3 0x0000000001fb7b7e llvm::sys::Process::Exit(int, bool) (clang18/bin/clang-19+0x1fb7b7e)
 #4 0x0000000000b25f0d (clang18/bin/clang-19+0xb25f0d)
................................................................................
................................................................................
This problem occurs in clang18 and above, and there are compilation instructions that are incompatible with GCC.
By following the recommended v8.1m corresponding fpu modification, no crash will occur
➜  NX git:(master) ✗ clang --target=arm-none-eabi -mfpu=help
clang: note: available multilibs are:
--target=thumbv8m.main-unknown-none-eabi -mfpu=none
--target=thumbv8m.main-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti
--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16
--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16 -fno-exceptions -fno-rtti
--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none
--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti
--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16
--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -fno-exceptions -fno-rtti
--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16
--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -fno-exceptions -fno-rtti
--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none
--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -fno-exceptions -fno-rtti

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-11 20:36:35 +08:00
wangmingrong1
ae70e09810 toolchain/arm: Fix link parameter error
Fixed the problem that when using armclang, it cannot add a space after --scatter=

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-11 09:13:03 -03:00
kywwilson11
7abfbddb2f Add additional support for STM32H5 ADC
Put define guard around call to adc_oversample. Fixed formatting.
2025-07-11 09:59:31 +08:00
Kerogit
d3da5e633c arch/avr/avrdx/avrdx_serial: make uart_ops_s structure const
The structure never changes and should be therefore marked as const.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-07-10 12:21:40 -03:00
Kerogit
d9269112ee arch/avr/avrdx: do not copy const variables into RAM
AVR uses Hardward architecture with separate address space for program
memory (flash) and data memory (RAM). Normal program flow can only
access data memory which means that all variables - including const
variables - have to be copied into RAM to be accessible. (This happens
automatically during startup.)

It is possible to work around this limitation in software but that
can have severe impact on performance and/or API complexity. It is hardly
feasible to change NuttX interfaces in a way that would allow to make use
of this workaround.

On newer AVR families, there is an alternative option enabled by this patch.
These chips map part of their program memory (a 32kB window) into data
memory address space. This patch leverages this feature and adds support
for placing const variables into the mapped window. No copy to RAM is done
for them.

Const variables are therefore loaded directly from flash (not consuming
RAM) while still being available to be used by any NuttX interface.

Linker script of breadxavr board is changed to make use of these changes.

Tested by verifying string addresses - parameters in printf call
in a custom application (and also by running the application and verifying
its output.)

Documentation tested by build.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-07-10 12:21:40 -03:00
Kerogit
14e446628e Documentation/platforms/avr: document options of keeping const vars in flash
This patch adds a document that describes why const variables need to be
copied into the RAM in AVR architecture for normal program flow in NuttX.
It then describes options of accessing them directly from the flash without
need to do any copying.

Patch was tested by building the documentation.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-07-10 12:21:40 -03:00
Kerogit
5710b5495f boards/avr/avrdx/breadxavr: fix path in license header
This linker script was initially created as a copy of another script
and the path was left unchanged.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-07-10 12:21:40 -03:00
sanezek
7a32fed563 arch/arm/stm32h7: support for /dev/random device
Enabling support for random device on stm32h7 arch. Driver copy pasted from arch/arm/stm32.

Signed-off-by: sanezek <sanezek@protonmail.com>
2025-07-10 09:52:58 -03:00
kywwilson11
0c1f9d482d Added DMA support for H5. Also added ADC DMA support.
Added logic to set hasdma to false. This is needed to enable or not enable interrupts on a per ADC basis. Made other minor formatting changes.

Fixed build issues with non ADC/DMA configurations.
2025-07-10 09:51:23 -03:00
yinshengkai
156ef05205 libc/mcount: compatible with armv6m mcount implementation
mcount.S: Assembler messages:
mcount.S:33: Error: cannot honor width suffix -- `bic r1,lr,#1'
mcount.S:35: Error: cannot honor width suffix -- `bic r0,r0,#1'
mcount.S:37: Error: cannot honor width suffix -- `pop {r0,r1,r2,r3,ip,lr}

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2025-07-10 18:06:03 +08:00
paolovolpi
e1e9ea2e81 RP2350B has 48 gpio, highers 16 accessed by "HI" registers 2025-07-10 13:45:33 +08:00
SPRESENSE
a20ac0fe7c sensors/bmi160: Fix a bug sensor_time is truncated
Fix a bug that sensor_time resolution is lost by bit shift.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-09 09:50:18 +02:00
SPRESENSE
be5c90716c sensors/bmi270: Fix a bug sensor_time is truncated
Fix a bug that sensor_time resolution is lost by bit shift.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-09 09:50:18 +02:00
Matteo Golin
6ae3cc9082 drivers/sensors/l86xxx: Make some dependency patches and update documentation
This commit removes the termios dependency of the command to set fix
rate. It makes the MINMEA dependency present in the Kconfig options for
the driver, and it also adds a retry limit to the boot message
verification of 3 times. The documentation has been updated to reflect
the correct signature for the registration function and fix some
formatting.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-07-09 09:45:21 +02:00
jiayadong
0d834b0621 boards/xtensa/esp32s3/esp32s3-box: Fix ILI9342C color inversion
When using the ILI9342C LCD on the esp32s3-box-3 development board, the
displayed colors are inverted.

add content

Manually converts the byte order of color data from little-endian
to big-endian before transmission.
2025-07-09 12:18:23 +08:00
Eren Terzioglu
27a2f88e86 Documentation/risc-v: Add LP_I2C docs for esp32[-c6]
Add LP_I2C docs for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:18:06 +08:00
Eren Terzioglu
af8e43e7f2 arch/xtensa: Bugfix I2C Slave build error for esp32[-|-s2|-s3]
Fix build error for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:18:06 +08:00
Eren Terzioglu
f07141244c arch/risc-v: Bugfix I2C Slave build error for esp32[-c3|-c6|-h2]
Fix build error for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:18:06 +08:00
Eren Terzioglu
8995226e0a arch/risc-v: Add LP I2C for esp32[-c6]
Add LP I2C peripheral support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:18:06 +08:00
Eren Terzioglu
cf1b087504 Docs/espressif: Add crypto defconfig docs for esp32[-s2|-s3]
Docs/espressif: Add crypto defconfig docs for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Eren Terzioglu
1512e1e3d2 boards/xtensa: Add board layer SHA accelerator support for esp32[-s2|-s3]
Add board layer SHA accelerator support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Eren Terzioglu
2e4eaf69ee arch/xtensa: Add arch layer SHA accelerator support for esp32[-s2|-s3]
Add arch layer SHA accelerator support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Eren Terzioglu
d2eb3db5b6 Docs/espressif: Add crypto defconfig docs for esp32[-c3|-c6|-h2]
Docs/espressif: Add crypto defconfig docs for risc-v based Espressif chips

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Eren Terzioglu
b7f98a939e boards/risc-v: Add board layer SHA accelerator support for esp32[-c3|-c6|-h2]
Add board layer SHA accelerator support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
Eren Terzioglu
8e44c85a3a arch/risc-v: Add arch layer SHA accelerator support for esp32[-c3|-c6|-h2]
Add arch layer SHA accelerator support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-09 12:13:06 +08:00
nuttxs
22560958bc net/arp: reducing unnecessary ARP requests can mitigate
network congestion and avoid packet delays caused by
waiting for ARP responses

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-07-08 12:43:43 -03:00
Niccolò Maggioni
571447bb06 coredump: Fix missing loglevel to logmask conversion.
The current setlogmask call used in coredump_dump_syslog specifies a raw log level
instead of a bitmask, and this causes wrong evaluations later on when that value
is checked against a mask. Therefore the LOG_UPTO macro is added for conversion.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-07-08 21:14:07 +08:00
Xiang Xiao
4c7366045c libc/semaphore: Go the fast path even arch doesn't support atomic
since the simulated atomic operation is still fast than the slow path

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-07-08 09:47:44 -03:00
Xiang Xiao
fb14b54b83 libc/semaphore: Use the while loop to handle the inerrupt correctly
If atomic_try_cmpxchg_xxxx runs on LL/SC architectures (e.g.ARMv7,
ARMv8, RISC-V), the weak CAS expands to a single LDREX/STREX pair.

If the CPU takes an IRQ/FIQ/SVC between the two instructions,
hardware performs an implicit CLREX and the following STREX returns
1, therefore atomic_try_cmpxchg_xxxx return failure even though
*addr* still holds the expected value.

So let's retry atomic_try_cmpxchg_xxxx in this case.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-07-08 09:47:44 -03:00
Eren Terzioglu
d8f241b29d Documentation/risc-v/esp32[c6]: Add LP_UART support docs
Add LPUART support doc for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-08 19:35:54 +08:00
Eren Terzioglu
1c48c0cba7 arch/risc-v/esp32[c6]: Add LP_UART support
Add LP_UART support for esp32c6

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-08 19:35:54 +08:00
p-szafonimateusz
880c8e5d26 drivers/net: add IGB network card support
Add support for Intel IGB type of network cards.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-08 10:02:15 +02:00
Eren Terzioglu
735e16f842 arch/xtensa: Fix dedicated GPIO build error
Fix dedicated GPIO build error for esp32[-s2|-s3]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-08 11:58:15 +08:00
Filipe Cavalcanti
06b37fe6aa arch/risc-v: set SCL timeout for esp_i2c.c
Adds proper timeout settings to SCL on ESP32C3|C6|H2.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-08 11:04:05 +08:00
Filipe Cavalcanti
26eb2833cc boards/risc-v: fix config for SPI and I2C drivers
Replaces CONFIG_I2C_DRIVER with CONFIG_I2C for proper build requirements.
Same for SPI. Also changes some logging to syslog.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-08 11:04:05 +08:00
Elias Hawa
0ce9e82d73 drivers/sensors: add Quectel L86-XXX GNSS uORB sensor driver 2025-07-07 21:18:15 -03:00
Eren Terzioglu
3f65182699 arch/risc-v: Change DMA functions with common layer approach for esp32[-c3|-c6|-h2]
Change DMA functions with common layer functions for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-07 23:46:07 +08:00
ligd
230714bd23 local: correct shutdown state when use UDP mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
2025-07-07 23:45:35 +08:00
p-szafonimateusz
9fb8a17d49 boards/qemu-intel64/qemu.ld: add .lbss, .ldata and .lrodata to approriate sections
These sections can be emited by gcc in some cases for huge data blocks.
For  example huge global static uninitialzied arrays can be placed in .lbss section
which can mess NuttX memory organization and cause hard to find bugs.
Unfortunately this is not well documented in GCC and all we have is this bug report:
https://sourceware.org/bugzilla/show_bug.cgi?id=22553

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-07-07 23:45:15 +08:00
zhongzhijie1
f725c59387 tools/checkpatch.sh: simplify Python file type check.
Use existing is_python_file() helper to replace manual string comparison
when checking Python file types.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-07 23:43:41 +08:00
zhongzhijie1
8c4343c28b tools/checkpatch.sh: add -x option to auto-format Python files.
Currently only .py files are supported. Non-Python files will report "format not implemented".

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-07-07 23:43:41 +08:00
Jorge Guzman
ec84502e80 board/weact-stm32h743 Add sdcard support
This commit adds SD card support to the WeAct STM32H743 board configuration.
The implementation enables the board to interface with SD cards through the
SDMMC peripheral, allowing file system operations and data storage capabilities.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2025-07-07 23:43:32 +08:00
Joshua Lange
d5eda10cad drivers/leds: Add support for KTD2052
This commit adds support for the KTD2052 LED driver chip.

Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
2025-07-07 09:49:51 -03:00
wangjianyu3
e5b138dee0 boards/szpi-esp32s3: Enable touchscreen for LVGL
1. Rotate the video screen 90 degrees right.
2. Enable touchscreen for the LVGL configuration "lckfb-szpi-esp32s3:lvgl" and add lvgldemo autostart.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
5671765acd boards: Update configs and params about FT5X06
Add touchscreen swap configuration for boards and enable it for defconfig that enables `FT5X06_SWAPXY`.
Refresh configurations to delete the deprecated `FT5X06_NPOLLWAITERS` and `FT5X06_SWAPXY`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
770d4a6c86 drivers/input/ft5x06: Adapt to touchscreen frame
Calling touch_register() to register touchscreen driver instead of
registering generic driver.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
ed1384fc81 driver/touchscreen: Add support for mirror/swap
Add support for mirror/swap coordinates.
There are some touchscreen drivers not support mirror or swap coordinates.
For example, drivers/input/ft5x06 does not support mirror.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
7cd5d3db72 include: fix typo of touch lowerhalf comment
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00
wangjianyu3
9f6666b75b driver/touchscreen: add custom open/close
Add custom open/close for lower to init/deinit device.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-07 08:46:58 -03:00