Commit graph

58267 commits

Author SHA1 Message Date
Matteo Golin
4f652e0622 docs/tags: Introduce tagging feature to the documentation.
Introduces `sphinx-tags` to the documentation system, allowing
individual pages to be tagged for better searching. The examples in this
commit introduce the `chip:*` tag for indicating the chip a board uses,
as well as the `experimental` tag for indicating experimental boards and
features. Other tags indicate supported peripherals for boards, such as
`wifi` and `ethernet`.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-04-29 09:18:25 +02:00
keever50
8c59326879 boards/arm/stm32h7: Fix too small usbhost stack size
Changed usbhost stack sizes to 2048 for affected STM32H7 boards.
This was previously causing stack overflows when usb is inserted.

Signed-off-by: keever50 <kevinwit1999@gmail.com>
2025-04-29 13:34:09 +08:00
nuttxs
c4506929e9 arch/esp32_partition.c: fix the issue of switching from Factory to OTA_1
with a fixed seq of 1, which causes ota_get_bootseq() to return ota_0.

The current solution is to directly use the target partition's number (num)
as next_seq to ensure the correct increment logic of seq. Ensure the formula
(seq-1) % OTA_DATA_NUM + OTA_IMG_BOOT_OTA_0 correctly maps to ota_0 or ota_1

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-04-28 22:23:16 +08:00
buxiasen
726683485f arch/arm/heap: add mmu.h fix not defined error when BUILD_KERNEL
fix PGTABLE_SIZE not defined in sama5d4-ek/knsh
Error: common/arm_allocateheap.c:177:11: error: 'PGTABLE_SIZE' undeclared (first use in this function); did you mean 'PGTABLE_L2_SIZE'?
  177 |   size -= PGTABLE_SIZE * CONFIG_SMP_NCPUS;
      |           ^~~~~~~~~~~~

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
buxiasen
05beacc799 arch/arm/heap: reserved memory for mmu table
When using ARCH_PGPOOL_PBASE, always have to reserver mmu table,
not be used for kernel heap

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
buxiasen
1f8eb18e1d arch/arm/goldfish: fix mmu not enabled when smp
If smp enabled, mmu default disabled in arm_head.S,
We have to re-enable it in arm_boot per-chip.
Causing knsh-smp failed with user-space memory access

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
buxiasen
9e313bddbf arch/arm/goldfish: copy mmu table when SMP
As out current design, each cpu manage task mmu table by insert
and erase like-behavior for arm32, have to per-cpu mmu-table when kernel
build.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
buxiasen
12c379e88b board/arm/qemu: add knsh_smp for qemu-virt-armv7a kernel build
qemu-system-arm -semihosting -M virt -cpu cortex-a7 -smp 4
-m 1024 -nographic -kernel nuttx

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
buxiasen
37e853f102 arch/arm/qemu: copy mmu table from cpu0 when SMP
As out current design, each cpu manage task mmu table by insert
and erase like-behavior for arm32, have to per-cpu mmu-table when kernel
build.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
buxiasen
d28c15bd06 arch/arm/qemu: fix mmu not enabled when smp
If smp enabled, mmu default disabled in arm_head.S,
We have to re-enable it in arm_boot per-chip.
Causing knsh-smp failed with user-space memory access

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-04-28 22:17:43 +08:00
Filipe Cavalcanti
4c48708fbc boards/esp32c3: modify nimble defconfig to use UART0 as serial console
Nimble defconfig had USB Serial as default console. This changes makes it compatible
to ESP32C3-Devkit and makes it similar to other defconfigs.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-28 22:16:44 +08:00
Kevin Zhou
fb5f27e984 xtensa/esp32s3: fix tickless mode timer unexpect interrupt handle
Signed-off-by: Kevin Zhou <kevin.zhou@sony.com>
2025-04-28 22:13:52 +08:00
Rodrigo Sim
ba9df9c06d Documentation: Add Seeed Studio XIAO ESP32C3 Board
This commit adds the documentation for the Seeed Studio XIAO ESP32C3
board. It includes examples for GPIOs, Wifi and BT.

Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2025-04-28 15:28:03 +08:00
Rodrigo Sim
bab3d8892b boards/risc-v/esp32c3 Add initial support to Seeed Studio XIAO ESP32C3
This commit introduces initial support for the Seeed Studio XIAO ESP32C3
board. Five configurations are available:
- nsh: Basic NuttShell support over UART0
- usbnsh: Basic NuttShell support over USB
- gpio: NuttShell over USB + GPIO
- wifi: NuttShell over USB + Wifi support
- ble: NuttShell over SUB + Bluetooth support

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-04-28 08:46:10 +02:00
Serg Podtynnyi
9566b2b908 drivers/lcd/ili9341: Add custom width/height display options
Add ability to set custom height/width for each two lcd ifaces

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-27 08:37:54 -03:00
Jinliang Li
5ce0e93637 arch/risc-v: save/restore fpu registers always when CONFIG_ARCH_LAZYFPU is off
To fix a fpu illegal instruction exception due to fcsr have invalid
rounding-mode,  restore fcsr/f0~f31 with a random value from stack because fpu
context is not save into stack when mstatus.fs is clean(not dirty).

The number of save/restore fpu context operations is not equal.
In fact, CONFIG_ARCH_LAZYFPU is a performance optimization mechanism aimed at
minimizing the saving and restoring of FPU registers. In some cases, it
may only need to be saved once but must be restored multiple times.
Therefore, this optimization mechanism dictates that saving cannot be
done on the stack; it must be stored at a fixed location(e.g. task
control block buffer), as the stack requires push/pop operations to be
matched.

In case of that CONFIG_ARCH_LAZYFPU is off, save/restore FPU registers
always into stack to avoid the above issues.

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
2025-04-27 13:08:29 +08:00
Kerogit
dd828c8920 arch/avr: fixed PC load on chips with more than 128kB program memory
The code used subi instruction to decrement the Y pointer but this
instruction only affects a byte, not a word. Fixed it by using
pre-decrement in the LD instruction instead.
2025-04-27 13:07:45 +08:00
Kerogit
cc9febb453 nuttx/compiler: replace AVR __flash qualifier with __memx for some chips
The __flash qualifier only allows access to program memory below 64kB
mark (uses 16 bit pointer.) Since many chips currently supported
have more than that, this qualifier can prove insufficient.

When flagged __memx the compiler will use 24 bit pointer to access
the variable.
2025-04-27 13:07:45 +08:00
Kerogit
88a66f18e6 arch/avr: save RAMPZ register into thread context
On chips that have it, RAMPZ is part of the thread context
and needs to be saved as well.
2025-04-27 13:07:45 +08:00
Kerogit
958b18f25e arch/avr: fixed typo in Kconfig 2025-04-27 13:07:45 +08:00
Kerogit
4ad0a5b30a Documentation/reference/user/02_task_scheduling: fixed function name
The document referred to sched_get_rr_interval function but only
sched_rr_get_interval exists in the sources.
2025-04-27 13:07:45 +08:00
Rodrigo Sim
fb29f568d1 boards/arm/stm32f401rc-rs485: Add support to ST7735 LCD
This commit adds support for the LCD based on ST7735 controller on
the STM32F401RC-RS485 board and updates the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-04-27 13:07:30 +08:00
Ville Juven
c12aa5663d sched/affinity: Fix CPU_LOCKED functionality for some SMP calls
For some SMP calls it is necessary to lock the current CPU for the process
receiving the SMP call. This is done by setting the CPU affinity to the
current CPU and preventing the CPU selection algorithm from switching
CPUs.

  dtcb->flags |= TCB_FLAG_CPU_LOCKED;
  CPU_SET(dtcb->cpu, &dtcb->affinity);

However, this logic is currently broken, as CPU_SET is defined as:

  #define CPU_SET(c,s) do { *(s) |= (1u << (c)); } while (0)

In order to assign tcb->cpu (the current CPU) to the affinity mask, the
mask must be cleared first by calling CPU_ZERO.
2025-04-26 13:56:27 +08:00
Michal Lenc
8832136b69 drivers/ioexpander/icjx: add option to set filters during initialization
This adds filters field to icjx_config_s structure that is passed
as an argument in icjx_initialize function. This field allows to
configure I/O filters (control world 1 and 3) with three possible
filters or disable them at all.

The filter configuration is currently only configurable during the
initialization, not at run time (the same as current source)

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-04-24 10:05:56 -03:00
Tiago Medicci Serrano
4a8af202c6 boards/xtensa/esp32[|s2|s3]: Fix unknown disassembling instructions
This commit adds sections used by the debugger and disassembler to
get more information about raw data present in the code.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-24 10:05:37 -03:00
nuttxs
da74a5e368 net/tcp/tcp_conn.c: optimize the port conflict detection rules
for tcp_listener(). fixed potential conflict between implicit
binding and port conflict detection.

Implicit binding automatically allocates an interface address during
connection,but port conflict detection occurs before binding/connecting.
This can cause issues when creating multiple TCP connections in succession.
If the first connection uses a random port via implicit binding, subsequent
connections might reuse the same port under current filtering rules,
leading to connect() failures.

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-04-24 14:10:27 +08:00
Serg Podtynnyi
420868d308 arch/arm/rp23xx: fix linker scripts 100% RAM usage bug
Upstream bug https://github.com/raspberrypi/pico-sdk/issues/1871

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-23 11:02:22 -03:00
Tiago Medicci Serrano
216c4b00e2 boards/[risc-v|xtensa]/esp32[|c3|c6|h2|s3]: set coexiram sections
This commit sets the coexiram (from libcoexist.a) sections on IRAM.

Before this commit, no other rules matched such sections and the
sections could be placed outside markers that denote the end of the
text sections, causing unexpected errors.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-23 16:17:17 +08:00
Leo Chung
5a1426d632 risc-v/esp32h2:Fix bootloader flash compiler error.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-23 16:16:47 +08:00
Leo Chung
931d80683d risc-v/esp32c3:Fix bootloader flash compiler error.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-23 16:16:47 +08:00
Leo Chung
d314329792 risc-v/esp32c6:Fix bootloader flash compiler error.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-23 16:16:47 +08:00
Serg Podtynnyi
37a1748dd3 arch/arm/rp23xx: fix irq priority levels
The RP2350 datasheet (Table 198) states that IRQ priority levels are
represented using 4 bits

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-22 20:59:42 -03:00
Serg Podtynnyi
c531de3329 arch/arm/rp23xx: Address the spinlock errata RP2350-E2
Due to Errata RP2350-E2 use only safe spinlocks during start and testset

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-22 20:59:23 -03:00
Serg Podtynnyi
9078ffa407 Documentation: update rp2350 peripheral status
Mark i2c and PWM as Working

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2025-04-22 17:04:55 -03:00
Matteo Golin
0cb7bd7f76 wireless/lpwan/rn2xx3: Fix invalid sync word bug.
This commit resolves issue #16009, where a sync word of less than 64
bytes was printed as 0-padded hex. 0-padding is invalid for the RN2xx3
modules, so now it has been removed.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-04-20 16:55:45 -03:00
Matteo Golin
da982e113e drivers/sensors/lis2mdl: Fix SYSLOG call.
This call to syslog was missing the '%' in its format string, and also
was using the wrong format string (lu instead of d) to print the `cmd`
argument. It is corrected and the compiler warning resolved.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-04-20 16:54:47 -03:00
Alan Carvalho de Assis
3fd22d40d8 Documentation: Fix bad practice instructions
It is not recommend to just copy defconfig to .config instead of
running ./tools/configure.sh. The configure script will do more
than just copying the defconfig, it will create backup config,
it will check if apps/ dir exists, etc.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-04-20 09:45:54 +08:00
dongjiuzhu1
b233d1494d Documentation: remove unused dd config
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:26 +08:00
dongjiuzhu1
c2abe4e994 boards/defconfig: remove unused config about dd
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:26 +08:00
Laczen JMS
dd29b8a4cf Documentation/applications/examples/elf/index.rst: Update for PR #3062 in nuttx-apps
Update the documentation to align with https://github.com/apache/nuttx-apps/pull/3062

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-19 08:55:13 -03:00
simbit18
047a40917c Cmake: Implement CMake build of Tiva arch
added TI/Stellaris Tiva

CMake added tm4c1294-launchpad and tm4c123g-launchpad board

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-04-19 08:53:18 -03:00
zhangshoukui
d3bb1eab0a fs/littlefs: Add read-only parameter
Test command:
./tools/configure.sh -l sim:tcpblaster
make -j
umount /mnt/lfs
mount -t littlefs -o ro /dev/rammtd /data

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-18 12:30:29 +08:00
zhangshoukui
60111786d6 fs/littlefs: Code comment correction
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-18 12:30:29 +08:00
Filipe Cavalcanti
6a721b859c boards/xtensa: fix build errors related to data types on ESP32|S3
Fix format specifier macros after compiler type changes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>

Fix boards with PRI
2025-04-18 09:32:58 +08:00
Filipe Cavalcanti
b8e9bc3313 arch/xtensa: fix build errors related to data types on ESP32|S2|S3
Fix format specifier macros after compiler type changes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-18 09:32:58 +08:00
Filipe Cavalcanti
0715c584b7 arch/xtensa: use compiler's definition of uint32 and int32
Modify types.h and inttypes.h to use the correct _int32_t and _uint32_t types.
Type is now defined according to recent compiler versions.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-18 09:32:58 +08:00
Tiago Medicci Serrano
ca664fd431 Documentation: Update openocd-esp32 command for all Espressif Socs
This updated the command used for running the openocd-esp32 for
all the supported Espressif's SoCs. It enables using SW-defined
breakpoints.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
956915ff97 risc-v/esp32h2: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
cb25b45d92 risc-v/esp32c6: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00
Tiago Medicci Serrano
c566cf51a2 risc-v/esp32c3: Fix getting the flash mappings by openocd-esp32
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-18 02:25:14 +08:00