Commit Graph

720 Commits

Author SHA1 Message Date
Tiago Medicci
69a8e2697f espressif: Fix default pins for SPI bus 2 on ESP32-[C3|C6|H2]
Fix the correct pin number for the SPI 2 bus on ESP32-C3, ESP32-C6
and ESP32-H2.
2024-08-17 13:43:58 +08:00
Yanfeng Liu
83932d115b boards/rv-virt: unify rv32 config names
This renames a few RV32 configs to follow the convention that names w/o
numbers are for RV32, so that to be in line with majority RV32 configs.

As a result, we have:  `nsh` vs `nsh64`, `knsh` vs `knsh64`, `pnsh`
vs `pnsh64`,`flats` vs `flats64`, `nsbi` vs `nsbi64`, `libcxx` vs
`libcxx64` etc. This helps us pick the right config name w/o checking
file contents.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-09 23:44:40 +08:00
Yanfeng Liu
46f4a24d59 riscv/qemu: add CMake for PROTECTED
This adds CMake support for PROTECTED build mode on rv-virt target.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-09 23:43:31 +08:00
Yanfeng Liu
34a30e577e riscv/qemu: add CMake for NuttSBI
This allows building NuttSBI based kernel image with CMake so that
to support out-of-tree building.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-09 23:43:31 +08:00
Lup Yuen Lee
3862b71728 risc-v/qemu-rv: Add Build Config for leds64_rust
This PR adds a new Build Config `rv-virt:leds64_rust` that builds the Rust App `leds_rust` for QEMU RISC-V 64-bit. The build requires the [Rust Target `riscv64gc-unknown-none-elf`](https://github.com/apache/nuttx/pull/12858):

```bash
rustup target add riscv64gc-unknown-none-elf
```

New Files:

`boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig`: Add new Build Config `rv-virt:leds64_rust`

Updated Docs:

`applications/examples/leds_rust/index.rst`: Add `leds_rust` example app

`platforms/risc-v/qemu-rv/boards/rv-virt/index.rst`: Add `rv-virt:leds64_rust` config
2024-08-08 12:19:25 +08:00
Ville Juven
2eb26d04f4 rv-virt/pnsh: Refresh PROTECTED mode configs 2024-08-07 02:41:14 +08:00
Filipe Cavalcanti
65e989e063 arch/risc-v: add support for motor control on ESP32|C6|H2 2024-08-05 15:35:19 -03:00
Yanfeng Liu
5848a8e77c riscv/qemu-rv: revise PROTECTED mode
This revises PROTECTED build for qemu-rv mainly to avoid hard-coded
addresses in linker scripts. It also added rv32 support, cleaned up
config `pnsh64` and added config `pnsh`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-04 11:09:26 +08:00
Ville Juven
1f928b2338 qemu-rv: Add test target pnsh64 for BUILD_PROTECTED
This adds BUILD_PROTECTED target for rv-virt (rv-virt:pnsh64).
2024-08-02 20:29:11 +08:00
Yanfeng Liu
918ad10859 riscv/qemu: add NuttSBI support
This adds NuttSBI support for rv-virt device so that to enable CI
checks for NuttSBI later. It allows using `-bios nuttx` option to
run NuttX with QEMU v6.2 w/o OpenSBI.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-01 23:32:01 +08:00
Eren Terzioglu
e467a16abe esp32[c3|c6|h2]: Add temperature sensor support 2024-07-27 14:12:44 -03:00
Henry Rovner
42eafcdfa5 risc-v/bl808: Add watchdog driver
This change implements a driver for the two watchdog timers on the BL808, and enables it as part of the timer config. The driver is based on the GP timer driver.
2024-07-27 22:59:23 +08:00
Huang Qi
78743e4055 Fix some style issues
Modified files:
- boards/arm/cxd56xx/spresense/src/cxd56_clock.c
- boards/arm/sama5/giant-board/include/board.h
- boards/arm/stm32l4/b-l475e-iot01a/include/board.h
- boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3-devkit-rust-1.h
- boards/sim/sim/sim/src/dummy.c
- drivers/wireless/spirit/lib/spirit_radio.c
- include/nuttx/modem/u-blox.h

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-27 22:57:32 +08:00
Yanfeng Liu
c2132bb88e risc-v/rv-virt: use RAM_START in ld.script
This revises FLAT build ld.script so that to use CONFIG_RAM_START
instead of hard coded address to increase flexibility.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-26 10:28:02 +02:00
Yanfeng Liu
4038abd3ab riscv/virt: add virt_nsh with docs
This adds `rv-virt:virt_nsh` config w/ docs for using virtio serial
as NuttX console.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-26 12:01:29 +08:00
Yanfeng Liu
4f66b188cd riscv/virt: probe virtio earlier
This allows virtio devices to be probed upon board_early_init, thus
making virito-serial ready earlier for console use.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-26 12:01:29 +08:00
Rushabh Gala
76bf6285c1 risc-v/qemu-rv: Add LED Driver for QEMU RISC-V 32-bit and 64-bit
- This PR adds the LED Driver for QEMU RISC-V 32-bit and 64-bit (User LEDs and Auto LEDs)
- QEMU RISC-V LED Driver will be used by the Rust Blinky App for Google Summer of Code
- Blinking the LED is probably the most common Embedded Demo, and now it's supported by QEMU RISC-V
- We added NuttX Configs `rv-virt:leds` and `rv-virt:leds64` to support User LEDs for 32-bit and 64-bit RISC-V
- Turning on/off a Simulated User LED will print a log message: "LED 1 set to 1"
- The code is derived from NuttX PinePhone LED Driver
2024-07-25 17:56:46 -03:00
Henry Rovner
049a6da098 risc-v/bl808: Add timer driver
This change implements a driver for the hardware timer blocks on the BL808, as well as a config with the timer example enabled.
2024-07-24 10:06:54 +08:00
Yanfeng Liu
8c2dd0152c riscv/k230: revise nuttsbi config
This revises canmv230:nsbi to enable debug symbols for easier use purposes.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-22 23:46:43 +08:00
Yanfeng Liu
3d162781ba riscv/k230: revise amp configs
This adjusts canmv230 `master` and `remote` configs to support both
k230 and k230d devices and drop unused items.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-22 23:46:43 +08:00
Yanfeng Liu
607948949c riscv/k230: drop ld-rptun.script
This drops the ld-rptun.script as the it can be replaced by
ld-nuttsbi.script now.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-22 23:46:43 +08:00
Yanfeng Liu
25adc9fdaa riscv/k230: fix KERNEL cmake
This fixes the issue that apps ROMFS is not detected by cmake for
KERNEL mode.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-14 20:32:48 +08:00
Eren Terzioglu
a8523f30ea esp32[c3]: Merge simple boot and mcu boot files into single file 2024-07-14 11:38:29 +08:00
Eren Terzioglu
c15c0d1a78 esp32[h2]: Add MCUBoot support 2024-07-14 11:38:29 +08:00
Eren Terzioglu
0f0c258fa2 esp32[c6]: Add MCUBoot support 2024-07-14 11:38:29 +08:00
Yanfeng Liu
211e2cd8b9 riscv/k230: revise canmv230:pnsh
This revises canm230:pnsh in a few ways:

- adjusting linker scripts structure,
- asserting PMP setting results,
- adjusting configs for both k230d and k230 devices.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-13 07:21:22 -03:00
Yanfeng Liu
723cbb0170 riscv/k230: revise canmv230:nsh
This revises canmv230:nsh to support both k230 and k230d devices.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-13 07:21:22 -03:00
Huang Qi
d2347aea2f boards/esp32[c3|c6|h2|s2|s3]: Ignore etctmp in common board
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-12 01:01:15 +08:00
Henry Rovner
091372069c risc-v/bl808: Add SPI driver
This commit implements a driver for SPI0 and SPI1 on the BL808 and introduces an accompanying example configuration.
2024-07-11 11:32:24 +08:00
Alan Carvalho de Assis
82946d0d5f net: Enable ICMP by default if IPv4 is enabled
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-09 17:08:27 +08:00
Henry Rovner
a83e7ced77 ox64: Add adc example config 2024-07-05 13:17:02 +08:00
Henry Rovner
8493273c2c risc-v/bl808: Add GPADC character driver
This commit implements a character driver for the general purpose ADC of the BL808, based on the hardware scanning functionality. The driver supports setting different conversion resolutions and the order of channels to be scanned via menuconfig.
2024-07-05 13:17:02 +08:00
Filipe Cavalcanti
0c63840b18 arch/risc-v: add support for capture driver on ESP32C6 and ESP32H2. 2024-07-04 18:24:50 -03:00
Rushabh Gala
ece78993b6 risc-v/ox64: Add LED Driver
- This PR adds the LED Driver for Ox64 Board (User LEDs and Auto LEDs)
- Ox64 LED Driver will be used by the Rust Blinky App for Google Summer of Code
- User LED 1 is configured for GPIO 29. Other User LEDs and Auto LEDs shall be configured by the NuttX Dev.
- The code is derived from NuttX PinePhone LED Driver
2024-07-03 17:54:09 +08:00
Yanfeng Liu
ed099f1cea riscv/k230: revise canmv230:nsbi
This revises ld-nuttsbi.script for easier use. It also adjusts
canmv230/nsbi to fit both k230d and k230 devices.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-29 22:39:11 +08:00
Eren Terzioglu
43a4f2fbea esp32[c3|c6|h2]: Add BMP180 sensor support 2024-06-28 17:27:46 +08:00
Eren Terzioglu
dda55419f9 esp32[c3|c6|h2]: Add I2C master support 2024-06-28 17:27:46 +08:00
Henry Rovner
7d2dbc00f6 Revert "Add courier system driver"
This reverts commit 50dd04c0f6832a73a6392c54b6580978e418f727.
2024-06-28 17:23:02 +08:00
Tiago Medicci Serrano
e913828955 espressif: Enable SMP (when applicable) and iPerf for sta_softap
- Enable SMP by default (when the device supports it);
- Increase IOB buffers;
- Enable iPerf;

These changes enable testing the device throughput easily.
2024-06-27 18:09:46 +08:00
Henry Rovner
d5657196d5 ox64:nsh - normalize defconfig after adding UART parameters 2024-06-26 09:06:38 +08:00
Henry Rovner
023bd08faa BL808: Add support for UARTs 0-2 and serial configuration
This commit modifies the existing serial driver to add support for the remaining UARTs on the BL808. It also introduces support for setting baud rate, character length, stop bits, parity, flow control and which serial port acts as the console.
2024-06-26 09:06:38 +08:00
Henry Rovner
210ea76b04 Add courier system driver
This change implements a system for allowing the D0 core (which runs NuttX) to receive forwarded interrupts from the M0 core. This makes it possible for drivers that rely on interrupts to work with peripherals attached to the M0 core.
2024-06-23 11:21:55 +08:00
Lup Yuen Lee
008803865f boards/risc-v: Add support for Milk-V Duo S SBC (SOPHGO SG2000 SoC)
This PR adds support for Milk-V Duo S 64-bit RISC-V SBC, based on SOPHGO SG2000 SoC (T-Head C906 Core). Most of the code is derived from NuttX for Ox64 BL808. The source files are explained in the articles here: https://github.com/lupyuen/nuttx-sg2000

Modified Files:

`boards/Kconfig`: Added Milk-V Duo S board

`arch/risc-v/src/sg2000/sg2000_timerisr.c`: Fixed MTIMER_FREQ for sleep() to work correctly

New Files in boards/risc-v/sg2000/milkv_duos:

`src/sg2000_appinit.c`: Startup Code

`include/board.h`: Milk-V Duo S 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`: Milk-V Duo S Makefile

`src/Makefile`: Milk-V Duo S Makefile

`Kconfig`: Milk-V Duo S Config

`configs/nsh/defconfig`: Build Config for `milkv_duos:nsh`

Updated Documentation:

`platforms/risc-v/sg2000/index.rst`: New page for SOPHGO SG2000 SoC

`platforms/risc-v/sg2000/boards/milkv_duos/index.rst`: Building and booting NuttX for Milk-V Duo S
2024-06-18 00:13:35 +08:00
Inochi Amaoto
5f1201ede6 boards: rv-virt: Add example S mode flat build config
Add "flats" and "flats64" config to test S mode flat build.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-06-14 19:52:00 +08:00
Inochi Amaoto
e37348aeba arch/risc-v: Add support for S-mode flat build
There is no need to use kernel build for S-mode all the time. As cpu
scratch is supported for non kernel mode build, it is possible to use
flat build for S-mode.

Add flat build support for risc-v S mode.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-06-14 19:52:00 +08:00
Eren Terzioglu
0cf7676aca esp32[c3|c6|h2]: Add SPI Slave support 2024-06-12 22:53:19 -03:00
Eren Terzioglu
99ea8b7832 esp32[c3|c6|h2]: Add gspi master support 2024-06-12 23:35:24 +08:00
Tiago Medicci Serrano
96f83bb03a net: Enable CONFIG_NET_ARP_SEND by default
Enable logic to send ARP requests if the target IP address mapping
does not appear in the ARP table.

Please check the comment in https://github.com/apache/nuttx/issues/12446#issuecomment-2145856778
2024-06-06 02:40:16 +08:00
Eren Terzioglu
24af23e49c esp32[c3]: Add XTWDT support 2024-06-04 17:42:07 -03:00
Ville Juven
74702085f0 defconfigs: Add SCHED_HAVE_PARENT=y to configs with WAITPID && BUILD_KERNEL
The added depencendy broke some of the defconfigs
2024-06-03 18:00:40 +02:00