* Initial experimental / work in progress implementation.
* New board name is esp32s3-ws-lcd128.
* Supports Kconfig delectable w/wo touch variants (lcd gpios difference).
* IMU QMI8658 bringups is put into esp32s3/common/src to share with other
boards. Pin defines are located at <board>include/board.h and referenced
with `#include <arch/board/board.h>`.
* Supported configurations: nsh, ostest, coremark, touch-lvgl, notouch-lvgl,
imu-qmi8658, watchdog.
* Does not have touch panel driver yet.
* Created board documentation. Added sphinx inline cross-references.
* TODO: Fix SPI GC9A01A LCD pixel format colors.
* TODO: Create I2C CST816S touch panel driver.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
Updated the `rmt` defconfig description for the Espressif's SoCs.
Use the `irtest` testing app (instead of the deprecated `rmtchar`)
to test the RMT peripheral.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit adds the Documentation to MPR121 Keypad and the board
profile documentation to STM32F4Discovery board.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
This driver adds support to MPR121 Capacitive Keypad usually found
at Aliexpress. The MPR121 is a touch sensor chip from Freescale/NXP
that supports up to 12 sensor electrodes and 1 proximity electrode.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
In sporadic cases it is possible that a SPI exchange returns stale RX data from the DCACHE.
This occurs when:
- DCACHE is enabled
- DMA is used
The impact of this can be hard to debug and vanishes when the timing even changes minimally.
This is caused by the DCACHE being invalidated before the actual DMA transaction starts which violates
the recommendations from AN4839 and also does not match the implementation of other drivers on the STM32H7/STM32F7.
Fixed by invalidating the DCACHE right before the actual read, which matches the implementation
of the STM32F7 SPI driver.
Signed-off-by: alexcekay <alexander@auterion.com>
- Replace syslog() with finfo()/fwarn() to follow the NuttX subsystem
debug convention.
- Merge adjacent early-continue `if` branches in w25n_pick_free_spare
and w25n_scan_factory_bad.
- Add Input Parameters / Returned Value sections to the BBM helper
headers.
- Clarify why only -EIO triggers a remap retry in w25n_erase and
w25n_bwrite (block-level E-FAIL/P-FAIL vs. transient bus faults).
Signed-off-by: Julian Oes <julian@oes.ch>
Use the chip's built-in 20-entry non-volatile Bad Block Management
Look-Up Table (datasheet section 8.2.7) to transparently route around
bad blocks.
Init:
- Reserve the top 24 blocks of the array as a spare pool
- Clamp the MTD geometry to W25N_USER_BLOCKS = 1000 so upper layers
never see the spare area (125 MB usable instead of 128 MB)
- Force BUF=1 alongside enabling ECC. The W25N01GVxxIT variant
power-ups with BUF=0 (Continuous Read mode), in which Read Data
ignores the column address and always starts at byte 0 - which
silently broke any read targeting a non-zero column (OOB markers,
sub-page reads in w25n_read).
- Scan all 1024 blocks for factory bad markers (non-FFh at byte 0 of
the spare area of page 0) and remap any user-area bad blocks via the
A1h BBM command. Idempotent across reboots: blocks already present
in the LUT are skipped, so repeated scans don't consume LUT slots.
Runtime:
- On E-FAIL from w25n_block_erase or P-FAIL from w25n_program_execute,
allocate a spare and issue A1h, then retry the operation once. The
chip routes the retry to the spare PBA transparently. Data buffer is
reloaded on program retry.
- Uncorrectable read ECC is left as -EIO (soft errors shouldn't trigger
permanent remap, and remapping discards data we may still recover).
Safeguards against burning LUT slots on bogus bad blocks:
- w25n_pick_free_spare erases each candidate spare as an active proof
of life before returning it - the factory OOB marker alone isn't
trusted.
- w25n_bbm_swap rejects A1h with LBA outside the user area or PBA
outside the spare pool.
Stack discipline for the logger-thread hot path:
- The 20-entry cached LUT lives in the device struct, not on the stack.
- w25n_read_bbm_lut decodes 4 bytes at a time instead of reading the
full 80-byte LUT dump into a local buffer.
Boot diagnostics are emitted via syslog so they appear unconditionally:
- [w25n] BBM scan summary (new/remapped/unremapped/previously-remapped/
LUT slots used)
- [w25n] W25N01GV ready line with user blocks, spare count, geometry,
and actual SPI frequency
- [w25n] per-remap info and warnings on runtime E-FAIL/P-FAIL paths
Note: existing littlefs filesystems become unmountable because the
block count shrinks from 1024 to 1000; both PX4 board init.c paths
already mount with autoformat so they reformat on first boot after
this change.
Signed-off-by: Julian Oes <julian@oes.ch>
Update ETC_ROMFS help text and NSH/ROMFS guides to describe the
/tmp mount behavior as tmpfs-first with FAT RAMDISK fallback when
CONFIG_FS_TMPFS is not enabled.
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Prefer mounting /tmp with tmpfs in the SIM default rc.sysinit when
CONFIG_FS_TMPFS is enabled, and keep the FAT RAMDISK path as a
fallback for configurations that only enable CONFIG_FS_FAT.
Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Rework ipv4_input() packet classification to make the control flow
clearer and keep the common local-unicast case first.
This change:
- handles local packets first
- keeps broadcast/multicast handling in dedicated branches
It also prevents broadcast and multicast packets from falling through
into the unicast forward path.
Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
The PR #18654 removed the Kconfig option `RMT_LOOP_TEST_MODE` used
by Espressif's RMT peripheral. This commit reintroduces it as a
lower-half driver interface used to enable internal loopback tests.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Enable USART3 support for STM32F412 and use it as the default NUCLEO-F412ZG nsh console path.
The ST-LINK virtual COM port on this board is wired to USART3 on PD8/PD9. Restore USART2 to its header-pin routing, switch the nsh defconfig to USART3, and update the board documentation to match the shipped solder-bridge configuration described in issue #17722.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
This sensor was not present in the Make.defs file
AMG88xx Infrared Array Sensor
https://github.com/apache/nuttx/pull/12829
Moved:
These drivers can be used with sensor connected over SPI or I2C bus
Bosch Sensortec BMI160
Bosch Sensortec BMI088
Signed-off-by: simbit18 <simbit18@gmail.com>
- Moved the creation of the `nxtmpdir` folder for third-party packages to the root `CMakeLists.txt` file.
cmake/nuttx_3rdparty.cmake
- Add the nuttx_remove_nxtmpdir function to remove the third-party cache directory under nuttx/../nxtmpdir
Signed-off-by: simbit18 <simbit18@gmail.com>
- fix a "a label can only be part of a statement and
a declaration is not a statement" compile error.
- toolchain xtensa-esp32s3-elf-gcc
(crosstool-NG esp-2021r2) 8.4.0
Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
Align _etbss in the linker script so (_etbss - _stdata) matches the
compiler's aligned TLS block size.
Fix ostest failure for CONFIG_SCHED_THREAD_LOCAL=y
Signed-off-by: raiden00pl <raiden00@railab.me>
copy logic from arm64 to fix SMP bugs in the signal trampoline
caused signals to be lost or mis-delivered in ostest signest_test
on qemu-intel64/jumbo.
Also update comments so this logic is easier to follow
Signed-off-by: raiden00pl <raiden00@railab.me>
During startup we should avoid using _info since the system is not
fully initialized. Default to use ets_printf which is safe for
this scenario.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Fix lowercase -wl to correct -Wl for GCC linker pass-through
option in LTO full configuration. The lowercase form is not
recognized by the linker, causing --print-memory-usage to be
silently ignored.
Signed-off-by: v-yanxingyu <v-yanxingyu@xiaomi.com>
Add board support for on-chip bxCAN: stm32_can.c registers /dev/can0 via stm32_caninitialize() when CONFIG_STM32_CAN_CHARDRIVER is set; stm32_cansock.c calls stm32_cansockinitialize() for the socket-CAN path when CONFIG_STM32_CAN_SOCKET is set.
Signed-off-by: Alexey Matveev <tippet@yandex.ru>
Add dedicated Spresense defconfigs for ostest, coremark and\ngetprime so the board has focused test and benchmark entry\npoints for these workloads.\n\nThis keeps the change scoped to new board configurations and\nfollows the existing Spresense baseline settings for the new\ntargets.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Increase image slot size from ~1MB to ~1.4MB to allow more features by default.
Solves issues when enabling debug features would extrapolate the slot size.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Fixed a few bugs in the initial stm32_usbdrdhost.c implementation
when using a USB hub. Fixed fault when freeing control endpoints.
Fixed crash when disconnecting devices from hubs due ot use after free.
Signed-off-by: daniellizewski <daniellizewski@geotab.com>
We have implemented CI Build Retry for mitigating Download Failures. But right now it will reuse any Corrupted Downloads (instead of deleting them), which will cause CI Build Retry to fail repeatedly: https://github.com/apache/nuttx/actions/runs/24611381081/job/71966407518#step:10:627
```
Ignored files: system/argtable3/v3.2.0.7402e6e.tar.gz
gzip: stdin: not in gzip format
make[3]: *** [Makefile:76: argtable3] Error 2
```
This PR proposes to change `git clean -fd` to `git clean -xfdq`. This will remove any Corrupted Downloads, preventing their reuse for CI Build Retry:
```bash
## Simulate a corrupted download for argtable3
$ tools/configure.sh qemu-armv8a/netnsh
$ Downloading v3.2.0.7402e6e.tar.gz--argtable3
## Press Ctrl-C to stop the build
## `git clean -fd` won't remove the corrupted download
$ cd ../apps
$ git clean -fd
$ find . -name "v3.2.0.7402e6e.tar.gz"
./system/argtable3/v3.2.0.7402e6e.tar.gz
## `git clean -xfdq` removes the corrupted download
$ git clean -xfdq
$ find . -name "v3.2.0.7402e6e.tar.gz"
## Corrupted download is deleted correctly
```
`git clean -xfdq` is also found in the same testbuild script, so we are using it consistently:
https://github.com/apache/nuttx/blob/12e8f92a282fac58e0dfff587ea3d9502e4804c0/tools/testbuild.sh#L286-L291
Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>