Commit graph

58257 commits

Author SHA1 Message Date
chao an
0bfb850b52 drivers/serial/uart_rpmsg: simplify initialization process of uart_rpmsg
Merge multiple heap allocate into one

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-02 20:56:01 +08:00
raiden00pl
5d2e0f8c80 arch/esp32s3/esp32s3_wdt_lowerhalf.c: fix printf warning
fix printf warning:

chip/esp32s3_wdt_lowerhalf.c:497:17: error: format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
raiden00pl
649e979f58 arch/esp32s2/esp32s2_wdt_lowerhalf.c: fix printf warning
fix printf warning:

chip/esp32s2_wdt_lowerhalf.c:493:17: error: format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
raiden00pl
1a6cb4c784 arch/esp32s3/esp32s3_ble_adapter.c: fix printf warning
fix printf warning:

chip/esp32s3_ble_adapter.c:1065:13: error: format '%u' expects argument of
type 'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
raiden00pl
ea28e08be4 arch/esp32/esp32_ble_adapter.c: fix printf warning
fix printf warning:

  chip/esp32_ble_adapter.c:1137:13: error: format '%u' expects argument of
  type 'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-04-02 08:29:00 -03:00
Kerogit
ac42add946 nuttx/clock: make NSEC_PER_USEC and others long
On AVR architecture, the compiler apparently sometimes truncates NSEC_PER_TICK
to 16bit value, leading to clock_time2ticks returning incorrect results. This
was encountered while attempting to add tickless OS support for AVR
architecture but seemed to affect non-tickless mode of operation as well.

This patch marks NSEC_PER_USEC (and to be safe, USEC_PER_MSEC and MSEC_PER_SEC
too) as long.
2025-04-02 08:29:00 -03:00
ouyangxiangzhen
87c217ad93 arch/x86_64: Fix strict-prototype warning.
This commit fixed a strict-prototype warning.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
ouyangxiangzhen
9f01e5c972 libc/stream: Support lowsyslog.
This commit added support for lowsyslog.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
ouyangxiangzhen
0c9a239b9e arch/x86_64: Initialize framebuffer early-print.
This commit initialized framebuffer early-print if `CONFIG_MULTBOOT2_FB_TERM` is defined. This enabled `early_kprintf` to output debug information using framebuffer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
ouyangxiangzhen
d7cea12af3 arch/x86_64: Fix fb_putc for early-print.
This commit fixed `fb_putc` for early-print.
- Modified fb_putc to return an int instead of void.
- Handled error cases where the character is not found by replacing it with a '.'.
- Ensured cursor position is updated correctly after each character is processed.
- Fixed above 4G framebuffer memory mapping.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-04-02 12:01:46 +08:00
Tiago Medicci Serrano
b388b84af6 arch/risc-v/esp32h2: Set the default SPI flash frequency to 64MHz
The default frequency for the SPI flash chip on ESP32-H2 is 64MHz.
Although it was being set to 48MHz, this isn't a valid value. The
device, however, must be flashed using 48MHz when 64MHz is set.
2025-04-02 09:53:27 +08:00
wangjianyu3
38652e19aa drivers/lcd/st7789: Support mirror V
Mirror X and V can rotate the screen 90 degrees.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-02 09:51:32 +08:00
liujp
c4b81bb922 feat(nuttx): implement stm32h7 ltdc double buffer on layer 1
Signed-off-by: liujp <liujp@xiaomi.com>
2025-04-01 17:00:02 -03:00
liujp
c9fd44a0ec fix(bug): fix ft5x06_sample error
Signed-off-by: liujp <liujp@xiaomi.com>
2025-04-02 01:42:59 +08:00
wangjianyu3
c5afcd78f1 drivers/lcd/st7789: Send RAMCTRL if little endian
Send RAMCTRL command only when RGB data in little endian.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-02 01:03:48 +08:00
Ville Juven
04df2ccead arch/mpfs/mpfs_usb.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock to protect the USB clock and its reference counter.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Ville Juven
4c7fedebd1 arch/mpfs/mpfs_ethernet.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Ville Juven
f165407ac8 arch/mpfs/mpfs_mmc.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Ville Juven
01b5a70666 arch/mpfs/mpfs_dsn.c: Replace big kernel lock with spin lock
Remove call to enter_critical_section (big kernel lock) and replace it
with a smaller lock.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Eero Nurkkala
95163f504c risc-v/mpfs: usb: fix fierce cpu polling if remote closes
If the remote end just closes an endpoint and no longer handles it,
the system is prone to intensive cpu polling via mpfs_write_tx_fifo()
especially if the device side doesn't know a thing about what the
remote did.

Fix this by marking the EP as dead, which will skip all writes causing
unnecessary polling. The EP is back in business if the remote end
sends some data (rx) or the connection is re-established.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-04-01 20:49:43 +08:00
Jukka Laitinen
19a8e2403f libc/semaphore: Move fast mutex wait/post paths to libc
This avoids unnecessary syscalls in memory protected builds, when mutex
lock/unlock can be done with only atomic counter access

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-01 20:37:23 +08:00
Jukka Laitinen
73ee052b3f sched/semaphore: Optimize fast mutex acquire with CONFIG_PRIORITY_PROTECT or CONFIG_PRIORITY_INHERITANCE
When the semaphore priority flags is set to NONE, and the semaphore
is a mutex, the fast locking path can be used, even when
priority inheritance or priority protect are enabled globally.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-01 20:37:23 +08:00
Daniel Byshkin
504f838577 sensors/nau7802: Add support for the NAU7802
This patch adds support for the NAU7802 24 bit ADC from Nuvoton.
Please read the documentation for more details.

Signed-off-by: Daniel Byshkin <online@bskdany.com>
2025-04-01 09:38:37 +08:00
Tiago Medicci Serrano
7482170f3f boards/risc-v/esp32c6: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
c616d2563e boards/risc-v/esp32h2: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
e499efd119 boards/xtensa/esp32: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
09bcec95a8 boards/xtensa/esp32s2: Enable SPI Flash's MTD block
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
6e57b93821 boards/risc-v/esp32c3: Enable SPI Flash's MTD block driver
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
Tiago Medicci Serrano
440d4a688a boards/xtensa/esp32s3: Enable SPI Flash's MTD block driver
This commit enables the SPI Flash's MTD block driver. This block
driver enables testing the SPI Flash device without any associated
filesystems.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-04-01 09:38:03 +08:00
wangjianyu3
fb807dbbe1 Documentation/szpi-esp32s3: Add doc for LVGL
Basic NuttShell configuration console and LVGL enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
wangjianyu3
bbcb40c979 boards/szpi-esp32s3: Init configuration for LVGL
And PSRAM enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
wangjianyu3
bd87bec6fb boards/szpi-esp32s3: Register LCD device
Register LCD device "/dev/lcd0" for graphics.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-01 09:35:07 +08:00
Laczen JMS
fb24cae852 boards/extensa/esp32: use wlan config to start wlan
Use wlan configuration option to enable wlan support for:
- esp32-2432S028
- esp32-audio-kit
- esp32-devkitc
- esp32-ethernet-kit
- esp32-lyrat
- esp32-pico-kit
- esp32-sparrow-kit
- esp32-wrover-kit
- lilygo_tbeam_lora_gps
- ttgo_eink5_v2
- ttgo_lora_esp32
- ttgo_t_display_esp32
- esp32s2-saola-1
- esp32s3-box
- esp32s3-devkit
- esp32s3-eye
- esp32s3-korvo-2
- esp32s3-lcd-ev
- lckfb-szpi-esp32s3

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-31 11:35:39 -03:00
Laczen JMS
b8964f5c46 arch/xtensa/src/common/espressif: Add wlan config option
Add an option to configure wlan support

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-03-31 11:35:39 -03:00
wangjianyu3
a834540f42 Documentation/szpi-esp32s3: Add doc for LCD
Basic NuttShell configuration console and LCD enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
31da7737b9 boards/szpi-esp32s3: Init configuration for LCD
Init configuration for ST7789 LCD.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
f42b784349 drivers/lcd/st7789: Add option for RGB data endian
Big endian by default.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
8af44d0385 boards/szpi-esp32s3: Add support for ST7789 LCD
Expanded IO0 for SPI C/S, GPIO39 for SPI D/C.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
c97307b24a Documentation/szpi-esp32s3: Add doc for GPIO
Basic NuttShell configuration console and GPIO(e.g. IO39 as SPI D/C) enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
8156211355 boards/szpi-esp32s3: Init GPIO for LCD SPI D/C
And add configuration for GPIO.

| Num  | Type      | Func / Location |
|------|-----------|-----------------|
| IO39 | Output    | LCD SPI D/C     |
| IO10 | Input     | GP1.25-5P expansion interface 1 (left side, near the speaker) |
| IO11 | Interrupt | GP1.25-5P expansion interface 1 (left side, near the speaker) |

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 10:06:45 -03:00
wangjianyu3
882c39df4d Documentation/szpi-esp32s3: Add doc for PSRAM
Basic NuttShell configuration console and PSRAM enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 11:26:30 +08:00
wangjianyu3
847133c1ad boards/szpi-esp32s3: Init configuration for PSRAM
Enable 8MB PSRAM.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-31 11:26:30 +08:00
raiden00pl
c4f142e45c syslog: add an option to completely disable syslog logic
Add an option to completely disable syslog() and replace it with an empty functions.
This option can be useful for small systems when we don't have any logging support,
but compiler is not able to remove useless code.

This way the final image also won't contain the strings that are present in
syslog() calls when compiler optimization is enabled (for example from /boards
where syslog is often used instead of debug macros).

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-30 11:36:19 +08:00
yangsong8
48af14beca driver/serial: Check again the RX buffer, then check file flags
The UART driver (cdcacm...) might have buffered data received, Just continue
processing the RX queue if this happens. If not, then check the file or dev
flags.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-29 10:34:00 +08:00
wangjianyu3
cc23e06ea2 arch/esp32s3: The MISO, MOSI and C/S are optional
The MISO or MOSI pin is optional.
The C/S pin is unnecessary when `ESP32S3_SPI_UDCS` is enabled.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-29 10:33:45 +08:00
Michal Lenc
bd628883ab arch/arm/src/samv7: enable GPIO clock even if interrupt not enabled
GPIO peripheral clocks have to be enabled even if interrupt support
on the peripheral is not enabled, otherwise GPIO input will not work.
This is probably caused by input filters that need clock signal.

This commit moves the clock enable call from interrupt specific function
to common initialization function that is called from _start entry
point function.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-03-29 10:33:25 +08:00
Filipe Cavalcanti
2cee5c0945 boards/esp32: add heap test to psram defconfig
Add the heap test to psram and psram_usrheap defconfig of esp32-devkitc.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-29 10:29:12 +08:00
zhangshoukui
0550355c92 drivers/mtd/mtd_cfi: Add MTDIOC_ERASESTATE
We need to give a default erase value when we register cfi flash for mtd devices
he pseudo-code is as follows:
register_cfi_driver(xxx)
find_mtddriver("xxx", &inode);
mtdconfig_register(inode->u.i_mtd);

https://github.com/Zhangshoukui/nuttx/blob/master/drivers/mtd/mtd_config.c#L1775C28-L1775C45

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-03-28 19:19:35 +08:00
zhangshoukui
82273b1cf5 tools/ci/testrun/script/test_framework/test_cmocka: skip Skip failed cases
[BUG] CI Test sim:citest fails intermittently for Linux sim-01 nuttx#16088
https://gist.github.com/lupyuen/849562eaf87b93411098c96ada4d43c5

nsh> cmocka --skip test_case_posix_timer|test_case_oneshot|write_default|read_default|burst_test|gpiotest01|test_playback.*|test_interaction.*|test_stress.*|test_capture.*
Cmocka Test Start.
Missing <source>
Usage: cmocka_driver_block -m <source>
Where:
  -m <source> Block device or mtd device mount location.
...
[ RUN      ] drivertest_pm
[  ERROR   ] --- 0 != 3
[   LINE   ] --- drivertest_pm.c:199: error: Failure!
[  FAILED  ] drivertest_pm
[==========] tests: 1 test(s) run.
[  PASSED  ] 0 test(s).
[  FAILED  ] tests: 1 test(s), listed below:
[  FAILED  ] drivertest_pm
...
[ RUN      ] drivertest_posix_timer
[  ERROR   ] --- 2019 is not within the range [1990, 2010]
[   LINE   ] --- drivertest_posix_timer.c:162: error: Failure!
[  FAILED  ] drivertest_posix_timer
[==========] tests: 1 test(s) run.
[  PASSED  ] 0 test(s).
[  FAILED  ] tests: 1 test(s), listed below:
[  FAILED  ] drivertest_posix_timer

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-03-28 11:19:59 +01:00
yangsong8
c4001b2433 Revert "boards/defconfig: remove fixed CDCACM BUFFER SIZE"
Use configuration CDCACM_DISABLE_TXBUF or CDCACM_DISABLE_RXBUF to choose
whether to use usb req buffer as the serial buffer. Since the default
value is n (not using req buf), the original configuration of buf is valid.

This reverts commit 21c8ed80bd.
2025-03-28 08:52:42 +08:00