Commit graph

4708 commits

Author SHA1 Message Date
Lup Yuen Lee
d52e5b2eb0 boards/risc-v/eic7700x/starpro64: Add support for PINE64 StarPro64 SBC (ESWIN EIC7700X SoC)
This PR adds support for the PINE64 StarPro64 64-bit RISC-V SBC,
based on ESWIN EIC7700X SoC. Most of the code was derived from NuttX
for Milk-V Duo S (SOPHGO SG2000). The modified code is explained here:
https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64

Modified Files:

boards/Kconfig: Added StarPro64 board

New Files in boards/risc-v/eic7700x/starpro64:

src/eic7700x_appinit.c: Startup Code
include/board.h: StarPro64 Definitions
include/board_memorymap.h: Memory Map
src/etc/init.d/rc.sysinit, rcS: Startup Script
src/.gitignore: Ignore the tmp filesystem
scripts/ld.script: Linker Script
scripts/Make.defs: StarPro64 Makefile
src/Makefile: StarPro64 Makefile
Kconfig: StarPro64 Config
configs/nsh/defconfig: Build Config for starpro64:nsh

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-05 12:52:44 -03:00
yangsong8
21c8ed80bd boards/defconfig: remove fixed CDCACM BUFFER SIZE
Use usb req buf to replaced cdcacm rxbuffer and txbuffer,
so this macro is no longer needed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 12:52:00 -03:00
Filipe Cavalcanti
a00730e6f1 boards/esp32s3: move QEMU toywasm to different defconfig
Create a separate defconfig for running WebAssembly in QEMU for the ESP32S3.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-05 15:53:36 +01:00
yangsong8
02f55f2c70 boards/sim: enable ADB shell service
enable adb shell service when build usbdev

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-04 11:20:50 -03:00
wangjianyu3
4df67da95d esp32s3-devkit/fastboot: Enable fastboot oem shell
Selftest

    # Host side

    $ ./tools/configure.sh -l esp32s3-devkit:fastboot
    $ make flash -j ESPTOOL_PORT=/dev/ttyACMx

    $ fastboot devices
    1234    fastboot
    $ fastboot -s 1234 oem shell ps
      PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
        0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003056 Idle_Task
        1     0 224 RR       Kthread   - Waiting  Semaphore 0000000000000000 0001976 hpwork 0x3fc8bd50 0x3fc8bd80
        2     2 100 RR       Task      - Waiting  Semaphore 0000000000000000 0004048 nsh_main
        3     3 100 RR       Task      - Ready              0000000000000000 0001992 fastbootd
        4     4 100 RR       Task      - Running            0000000000000000 0001992 popen -c ps
    OKAY [  0.010s]
    Finished. Total time: 0.010s

More details

    https://github.com/apache/nuttx-apps/pull/3003

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-04 12:28:12 +08:00
Bowen Wang
6303c11b53 arm/qemu-armv7a: add discard-data-on in rpproxy_ivshmem launch command
add discard-data=on in proxy launch command, so the proxy side
will clean the share memory to make sure that the shared memory is clean
every time server and proxy are started.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2025-03-03 07:37:13 +08:00
Kevin Witteveen (MartiniMarter)
fb853be004 arm/rp2040/common: Change SPI board functions to weak
Summary
Board logic change.
This PR adds weak_function attributes to the RP2040 common SPI board logic.
This allows board developers to override and extend the SPI board logic.

Signed-off-by: Kevin Witteveen (MartiniMarter) <kevinwit1999@gmail.com>
2025-02-28 21:02:40 -03:00
Eren Terzioglu
06ef4a8084 boards/xtensa/esp32[s2|s3]: Add I2C slave support
Add I2C slave board support for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Eren Terzioglu
939b31b97e boards/risc-v/esp32[c3|c6|h2]: Add I2C slave support
Add I2C slave support into board layer for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-26 16:32:40 +01:00
Ville Juven
8ab87c582b arch/mcx-nxxx: Add GPIO interrupt support
Add support for GPIO interrupts.
2025-02-26 10:18:22 -03:00
leocafonso
5697053540 boards/ra4: Add support for Arduino-R4-Minima
Add support for arduino-r4-minima.
Created defconfig and board source files for:
* nsh
* nsh-leds

Signed-off-by: leocafonso <leocafonso@gmail.com>
2025-02-25 13:14:48 -03:00
Marco Casaroli
16e2e77bdf esp32: use mcuboot for qemu_openeth config
Now, espressif qemu supports MCUboot, so we can switch the app
format.
2025-02-25 13:13:40 -03:00
Marco Casaroli
b4c827cee3 esp32s3: use mcuboot for qemu_openeth config
Now, espressif qemu supports MCUboot, so we can switch the app
format.

The build was failing with the legacy app format because
_ext_ram_bss_end and _ext_ram_bss_start are not defined in the
legacy linker file.
2025-02-25 13:13:40 -03:00
Filipe Cavalcanti
b89ad74660 xtensa/esp32: use common Espressif wireless source
Update the wireless symbols from ESP32_* to ESPRESSIF_* for using common layer.
Remove ESP32 specific WiFi files and edit build system to use common layer.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-02-25 12:35:46 +01:00
Alan Carvalho de Assis
8b5a45cee6 stm32l4r9ai-disco: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
5040272505 stm32l476vg-disco: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
e2a85dd2db nucleo-l496zg: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
cfd05250fa nucleo-l476rg: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Alan Carvalho de Assis
7e5d1ec7d7 nucleo-l432kc: Add support to bringup
Many STM32L4 boards are missing stm32_bringup.c. That confusion
was created when stm32_appinit.c was created. It introduced a new
way to do the board initialization without depending on NSH arch
specific initialization.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-02-25 09:32:25 +01:00
Eren Terzioglu
5865d2a8ff esp32[s2|s3]: Enhance SPIRAM/PSRAM support
Add esp_spiram_writeback_range function to flush some areas of spiram cache

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-24 10:35:11 -03:00
Ville Juven
17a80e90bd arch/mcx-nxxx: Add support for NXP MCX-N236 CPU
This adds minimal support for NXP MCX-N236 CPU. Peripherals supported are:
- GPIO
- PINMUX
- CLOCK
- LPUART

An example board, FRDM-MCXN236 is also added, with a basic profile that
boots into nsh.

Signed-off-by: Ville Juven <ville.juven@unikie.com>
2025-02-22 16:12:06 -03:00
lijing.ly
eadfb5a2f8 boards/Kconfig: Add ARCH_CHIP_ESP32S3WROOM1N16R8 configuration item for Espressif ESP32-S3 DevKit
Signed-off-by: lijing.ly <lijing.ly@bytedance.com>
2025-02-21 15:39:46 +01:00
simbit18
35a793ed17 [nxstyle] fix Relative files path
fix Relative file path does not match actual file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-21 15:36:05 +01:00
Eren Terzioglu
3661cdeed9 esp32[c3|c6|h2]: Add I2S support
Add I2S support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-02-21 20:48:15 +08:00
Zhu Zhongjie
2ebce06b79 board/arm/rp2040: support config st7789 reset gpio pin
Signed-off-by: Zhu Zhongjie <zhongjiezhu1@gmail.com>
2025-02-19 14:50:58 -03:00
Tiago Medicci Serrano
97aa90570c xtensa/esp32s3: allow moving .bss data to the external PSRAM
This commit allows placing .bss data into the external PSRAM.
Previously, the PSRAM was fully allocated to the heap memory only
and now part of it can be used to allocate .bss data freeing the
internal memory.
2025-02-19 11:44:18 -03:00
wangjianyu3
321b25f486 esp32s3-devkit: Add fastboot starting command to initialization script
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-19 14:25:28 +08:00
wangjianyu3
746db1968d esp32s3-devkit/fastboot: Initializing configuration for Fastboot
Based on configuration of usb_device.

Quick start:

    ./tools/configure.sh -l esp32s3-devkit:fastboot
    make flash -j ESPTOOL_PORT=/dev/ttyACMx

(Optional) You can get full defconfig by executing following commands after SAVING your stages if necessary:

    ./tools/configure.sh -l esp32s3-devkit:fastboot
    make savedefconfig
    cat defconfig

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-19 14:25:28 +08:00
Filipe Cavalcanti
954081cdd8 xtensa/esp32s3: use common Espressif wireless source
Update the wireless symbols from ESP32S3_* to ESPRESSIF_* for using common layer.
Remove ESP32S3 specific WiFi files and edit build system to use common layer.
2025-02-17 12:03:57 +01:00
raiden00pl
38c348bf9a boards/b-g431b-esc1/cansock: enable SocketCAN utils
boards/b-g431b-esc1/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
3a0870df1c boards/nucleo-f446re/cansock: enable SocketCAN utils
boards/nucleo-f446re/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
425b2683cd boards/nucleo-f302r8/cansock: enable SocketCAN utils
boards/nucleo-f302r8/cansock: enable SocketCAN utils, so user can easly use CAN tools.

This board has only 64KB of FLASH which requires some additional optimization to fit CAN tools on it.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
27dd63d147 boards/nucleo-g431rb/cansock: enable SocketCAN utils
boards/nucleo-g431rb/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
0317df5b43 boards/nucleo-f722ze/cansock: enable SocketCAN utils
boards/nucleo-f722ze/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
Yanfeng Liu
3fca03f23b board/qemu-armv7r: add PROTECTED mode
This adds initial bootable PROTECTED mode config `qemu-armv7r:pnsh`,
more tests are still needed. Flat mode config qemu-armv7r:nsh still
works.

- The nuttx.ld is for building nuttx ELF
- The nuttx_user.ld is for building nuttx_user ELF

They both include the memory.ld with preprocessing.

To run, use the QEMU mentioned in PR:

```sh
$ qemu-system-arm -M virt -semihosting -nographic -cpu cortex-r5f \
           -device loader,file=nuttx_user -device loader,file=nuttx
```

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-02-17 14:12:22 +08:00
Yanfeng Liu
64bae41c6b board/qemu-armv7r: rename dramboot.ld
This aligns linker script file name with built program name so that
nuttx.ld helps to build nuttx ELF

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-02-17 14:12:22 +08:00
raiden00pl
107b37561b boards/nucleo-f303re: fix CAN bit timings
boards/nucleo-f303re: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
a62078bb43 boards/b-g431b-esc1: fix CAN bit timings
boards/b-g431b-esc1: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
292906472e boards/nucleo-f446re: fix CAN bit timings
boards/nucleo-f446re: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
fa062daeec boards/nucleo-f302r8: fix CAN bit timings
boards/nucleo-f302r8: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
cbba667112 boards/nucleo-g431rb: fix CAN bit timings and unify bitrate
boards/nucleo-g431rb: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/

also update bit rate to 250000 so it's the same as for other stm32 boards

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
fb6e6b4b3a boards/nucleo-f722ze: fix CAN bit timings
boards/nucleo-f722ze: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
5b9d535ce6 boards/b-g431b-esc1: configure CAN_TERM pin also for SocketCAN interface
boards/b-g431b-esc1: configure CAN_TERM pin also for SocketCAN interface

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-13 18:45:55 -03:00
cuiziwei
b57f3bb840 Fix macOS build error.
1. fix https://github.com/apache/nuttx/issues/14774.
Change the defconfig of libcxxtest and select libcxxabi by default to
fix sim:libcxxtest build in macOS CI can't find cxxabi.h.

2. fix https://github.com/apache/nuttx/issues/15491.
libcxxabi cannot be used with uclibc, so when compiling macos sim, libcxxabi cannot be selected by default in Kconfig.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2025-02-12 15:24:02 -03:00
chao an
e5388558a6 qemu/ivshmem: switch proxy/server roles
In this PR we switch proxy/server roles to set proxy as remoteproc master,
This will help us communicate with the linux kernel without making any changes
in the rpproxy_ivshmem configuration.

Build NuttX RTOS:
$ cmake -B proxy -DBOARD_CONFIG=qemu-armv8a:rpproxy_ivshmem -GNinja
$ cmake --build proxy
$ qemu-system-aarch64 -cpu cortex-a53 -nographic -machine virt,virtualization=on,gic-version=3 -kernel proxy/nuttx \
  -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb \
  -object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/ivshmem0,size=4194304,share=yes

Bringup Linux Kernel:
$ qemu-system-aarch64 -M virt -cpu cortex-a57 -smp 1 -m 4G -kernel linux/arch/arm64/boot/Image -initrd busybox-1.35.0/initramfs.cpio.gz \
  -nographic -append "init=/init console=ttyAMA0" \
  -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb -object \
  memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/ivshmem0,size=4194304,share=yes

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd070]
[    0.000000] Linux version 6.14.0-rc1-00035-g998ca87a4914 (archer@archer) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #7 SMP PREEMPT Tue Feb 11 12:19:40 CST 2025
[    0.000000] KASLR enabled
[    0.000000] random: crng init done
[    0.000000] Machine model: linux,dummy-virt
...
[    1.001209] remoteproc remoteproc0: ivshmem_rproc is available
[    1.001548] remoteproc remoteproc0: attaching to ivshmem_rproc
[    1.001721] ivshmem_rproc 0000:00:0b.0: dma declare pa=0x80000000d0 dma=0xd0 size=65536
[    1.002164] ivshmem_rproc 0000:00:0b.0: mem entry pa=0x80000100d0 dma=0x100d0, size=4128560
[    1.003605] ivshmem_rproc 0000:00:0b.0: attach entry
[    1.005573] virtio_rpmsg_bus virtio1: rpmsg host is online
[    1.005741] rproc-virtio rproc-virtio.1.auto: registered virtio1 (type 7)
[    1.005873] remoteproc remoteproc0: remote processor ivshmem_rproc is now attached
[    1.012959] virtio_rpmsg_bus virtio1: creating channel rpmsg-syslog addr 0x400
[    1.014240] virtio_rpmsg_bus virtio1: creating channel rpmsg-sensor addr 0x401
[    1.014454] virtio_rpmsg_bus virtio1: creating channel rpmsg-ping addr 0x402
[    1.014644] rpmsg_ping virtio1.rpmsg-ping.-1.1026: rpmsg_ping_probe

below is rpmsg-syslog from NuttX kernel
...
[    1.116680] [    0.000000] [ 0] [  INFO] [proxy] pci_register_rptun_ivshmem_driver: Register ivshmem driver, id=0, cpuname=server, master=0
[    1.116867] [    0.025900] [ 3] [  INFO] [proxy] pci_scan_bus: pci_scan_bus for bus 0
[    1.116987] [    0.026900] [ 3] [  INFO] [proxy] pci_scan_bus: class = 00000600, hdr_type = 00000000
[    1.117121] [    0.027100] [ 3] [  INFO] [proxy] pci_scan_bus: 00:00 [1b36:0008]
[    1.117232] [    0.027500] [ 3] [  INFO] [proxy] pci_setup_device: pbar0 set bad mask
[    1.117349] [    0.027700] [ 3] [  INFO] [proxy] pci_setup_device: pbar1 set bad mask
[    1.117460] [    0.027900] [ 3] [  INFO] [proxy] pci_setup_device: pbar2 set bad mask
[    1.117573] [    0.028100] [ 3] [  INFO] [proxy] pci_setup_device: pbar3 set bad mask
[    1.117692] [    0.028200] [ 3] [  INFO] [proxy] pci_setup_device: pbar4 set bad mask

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-12 15:41:37 +01:00
dongjiuzhu1
34bde7b80a qemu/armv7a: register cfi flash
search the device tree and register cfi flash

test flowchart:
mount -t littlefs -o autoformat /dev/cfi-flash1 /data
fstest -m /data

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-02-11 17:23:44 +08:00
dongjiuzhu1
ef24233501 qemu/armv7-a: adjust flash size to free area to register cfi flash
122M->48M, free second cfi flash as filesystem

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-02-11 17:23:44 +08:00
Rodrigo Sim
405287081d boards/arm Add support to Seeed Xiao nRF52840 Board
Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-02-10 17:08:37 -03:00
Laczen JMS
6b5fccb32c esp32: add espnow documentation and defconfig.
Added documentation for espnow and a default defconfig to illustrate
the use of espnow for udp communication.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-02-10 16:15:25 -03:00
Laczen JMS
eba0362bde esp32: Add support for espnow based pktradio
Espnow is a connectionless WiFi communication protocol that can be used
to exchange information between esp nodes.

A espnow pktradio driver is proposed that allows building a 6lowpan
network of nodes.

The driver has been evaluated using udpclient & server running on
different devices.

Solves #15347

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-02-10 16:15:25 -03:00