Commit graph

58279 commits

Author SHA1 Message Date
Lars Kruse
b333ad3ab5 style: fix typos
Thanks, codespell!
2025-04-30 13:45:46 +08:00
stydxm
543d7c87bc risc-v/k230: update documents
fix typo
remove a `)` that should not be here

Signed-off-by: stydxm <stydxm@outlook.com>
2025-04-30 13:44:49 +08:00
p-szafonimateusz
09a5a0e72e x86_64: support for stack canaries
Add support for stack canaries for x86.

This includes mostly fixes for TLS support that are required for stack canaries
in x86. The FSBASE register must be unique per thread so we have to keep it in
thread registers area.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-04-30 13:42:56 +08:00
Filipe Cavalcanti
e837b26518 boards/esp32s2: add -fno-omit-frame-pointer to saola board
This change affects esp32s2-saola-1 board when optimizations are enabled.
Fixes issue on timer defconfig.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-04-30 13:41:06 +08:00
p-szafonimateusz
ee5d5a8080 arch/x86_64: add debug interface
add hardware debug interface for x86_64 which can be used with gdbstub

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-04-30 13:40:10 +08:00
Lars Kruse
797cc869ae Documentation: group DAC devices by communication interface 2025-04-29 16:17:44 -03:00
Lars Kruse
9b3914b740 drivers/analog/mcp47x6: Add support for MCP47X6 DAC series
The MCP47X6 series consists of the following single channel DAC chips:
- MCP4706 (8 bit)
- MCP4716 (10 bit)
- MCP4726 (12 bit)

The driver supports the following configurations:
- gain
- power down
- voltage reference

Persistent configuration storage in the internal EEPROM is not
implemented.
2025-04-29 16:17:44 -03:00
p-szafonimateusz
33a6e70077 serial/uart_pci_16550.c: fix multiport ax99100
ax99100 export each serial port as a separate PCI device function
so we have to handle this properly.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-04-29 15:33:23 -03:00
Valentyn Korniienko
af6c33e010 Corrected configure.sh call in customboards.rst 2025-04-29 15:30:28 -03:00
Leo Chung
61f205f1d4 risc-v/esp32h2:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Leo Chung
2269fcaaf9 risc-v/esp32c6:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
Leo Chung
80c0854d7e risc-v/esp32c3:Add missing bootloader flash_qio_mode file in link
script

Add missing flash_qio_mode file in bootloader link script, it will be
used when CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2025-04-29 09:20:15 -03:00
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