Commit Graph

518 Commits

Author SHA1 Message Date
Xiang Xiao
7a8cf7ff70 Indent the include statement by two spaces
follow the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-16 12:34:32 -03:00
Masayuki Ishikawa
8a70f8a76d boards: Add virtio blk driver to qemu-arm8a and rv-virt
Summary:
- This commit adds blk driver to qemu-armv8a:netnsh,
  rv-virt:netnsh and rv-virt:netnsh64
- Also updates README.txt

Impact:
- None

Testing:
- Tested with qemu-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-05-13 13:58:09 +08:00
Tiago Medicci Serrano
e8e50900d0 esp32c3/wifi: use wapis init config to save Wi-Fi data
Instead of using Espressif's emulated NVS to save Wi-Fi data, use
`wapi`s wireless configure initialization mechanism for saving
Wi-Fi data. It 1) avoids creating a specific storage partition
just to save Wi-Fi data (ESP32-C3's storage partition is used
instead); 2) avoids initialization problems of the emulated NVS
when SMP is enabled (the Wi-Fi driver tries to initialize it before
the actual partition is initialized); and 3) enables reconnecting
using `wapi reconnect` command and connect the device automatically
on bringup if `CONFIG_NETUTILS_NETINIT` is selected.
2023-05-12 01:09:09 +08:00
Stuart Ianna
dec80be431 arch/risc-v/litex: Fix emac driver compilation when only IPv6 is used. 2023-05-05 11:53:13 +08:00
Alan Carvalho de Assis
bac304afc0 boards: Fix CONFIG_[START_DATE,START_MONTH] cannot start with 0
Run:
$ ./tools/refresh.sh --silent --defaults all

It will report that CONFIG_START_DATE and/or CONFIG_START_MONTH
are using invalid value starting with 0, so 03 should be 3, and so
on.
2023-05-04 10:11:36 +08:00
Huang Qi
0d3abe6ebb boards/k210: Use 8 byte align in linker script
I noticed sometimes once config changed, it will not launch to shell,
maybe due to
K210 is a 64-bit platform and without misaligned memory access support.

This patch may fix this problem, it will not introduce new issues at least.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-28 18:22:09 +08:00
chao an
5945f080b9 boars/spawn_proxy: remove all CONFIG_POSIX_SPAWN_PROXY_STACKSIZE
Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-27 17:35:58 +08:00
Radek Pesina
50a8ec62c4 Add eMMC driver support
- Fix DMA addressing issues within litex_sendsetup/litex_recvsetup
- Extend with handling specific to eMMC commands during init & use.
- Cleanup of 4-bit BUS handling for SD and eMMC
- For eMMC, Send CMD0 during init as per JEDEC v4.41 for pre-idle
2023-04-26 00:34:36 -04:00
chao an
f620b039aa rv-virt/knsh64: increase proxy stack size to avoid overflow
Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-24 12:59:39 +03:00
chao an
f2257ffd80 rv-virt/nsh64: enable CONFIG_BCH to support block device access
Since ramdisk is registered as block device, enable CONFIG_BCH
to support block device access

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-23 23:27:23 +08:00
AuroraRAS
581e9ce80b Add MPU60x0 IMU sensors support for ESP32C3
Add MPU60x0 IMU sensors support for ESP32C3

Signed-off-by: AuroraRAS <chplee@gmail.com>
2023-04-22 01:47:09 +08:00
Stuart Ianna
4cae98674d litex: Support for kernel build with vexriscv-smp. 2023-04-22 01:40:32 +08:00
Petro Karashchenko
18e2aa2d03 Revert "risv-v/esp32c6: disable custom optimize level temporary"
This reverts commit b94cc5ff92.
2023-04-18 22:34:40 +08:00
zhangyuan21
5207295f83 esp32c6: fixed ci build issue
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-18 16:48:43 +08:00
chao an
b94cc5ff92 risv-v/esp32c6: disable custom optimize level temporary
This is a workaround commit to temporarily reduce the flash usage of
esp32c6 to avoid ci failure, Since I am not familiar with esptool,
and this issue cannot be reproduced in the local environment,
so I temporarily turn off related optimizations to save flash size.

esptool error log:
-----------------------------------------
| MKIMAGE: ESP32-C6 binary
| esptool.py --chip esp32c6 elf2image --flash_mode dio --flash_size "4MB" -o nuttx.bin nuttx
| esptool.py v4.5.1
| Creating esp32c6 image...
| Merged 1 ELF section
|
| A fatal error occurred: Segment loaded at 0x42010c08 lands in same 64KB flash mapping as segment loaded at 0x42010020. Can't generate binary. Suggest changing linker script or ELF to merge sections.
| make: *** [tools/Unix.mk:527: nuttx] Error 2
| make: Target 'all' not remade because of errors.
-----------------------------------------

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-13 21:10:42 +08:00
Gustavo Henrique Nihei
8e83379b84 risc-v/espressif: Initialize HR Timer where it is required
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-07 12:27:56 -03:00
Gustavo Henrique Nihei
ebe4ab8894 risc-v/espressif: Add support for RTC subsystem
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-07 12:27:56 -03:00
Gustavo Henrique Nihei
9affcb8673 boards: Update tickless defconfigs with ostest for testability
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-06 19:29:23 +03:00
Gustavo Henrique Nihei
ac746fd87f risc-v/espressif: Add support for Tickless mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-06 19:29:23 +03:00
Gustavo Henrique Nihei
7aecd751f0 risc-v/espressif: Add support for Oneshot Timer
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-05 16:51:34 -03:00
Gustavo Henrique Nihei
31d68f2dd3 risc-v/espressif: Add support for Periodic Timers
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-05 16:51:34 -03:00
Gustavo Henrique Nihei
ffef83c9a1 risc-v/espressif: Add High Resolution Timer driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-04-01 10:40:04 -03:00
Gustavo Henrique Nihei
5081cef2c9 risc-v/espressif: Add Hardware RNG support
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-31 22:01:39 +03:00
Gustavo Henrique Nihei
cf90fa62b2 risc-v/espressif: Add support for System Reset
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-31 22:00:17 +03:00
Stuart Ianna
01b0305ab5 risc-v: SV32 MMU support for qemu-rv. 2023-03-29 22:15:19 +09:00
Lucas Saavedra Vaz
1b87c86619 boards: Update and fix configs for ESP boards 2023-03-25 12:23:35 +02:00
Gustavo Henrique Nihei
c44d55c70c risc-v/espressif: Fix bootloader and app potential IRAM overlap
Related to a recent fix from esp-idf:
0fb0be3817

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-17 16:51:52 -03:00
Gustavo Henrique Nihei
d0679af1d8 risc-v/espressif: Decouple irom/drom lengths from External Flash size
The length of the IROM and DROM segments should be related to the extent
of the address space, and not be limited to the capacity of the External
Flash device.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-17 16:51:52 -03:00
Tiago Medicci Serrano
7b807a8540 esp32-esp32c3/wifi: remove naming inconsistencies
* Remove the 'COEXISTENCE' suffix from Wi-Fi's STA + SoftAP mode.
Coexistence usually refers to Wi-Fi + BLE, instead of Wi-Fi's
operation mode;
* Remove commented debug code;
* Remove outdate function descriptions;
2023-03-16 19:07:25 +01:00
Gustavo Henrique Nihei
b864f37613 risc-v/espressif: Add Watchdog support on top of MWDT0
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-14 23:55:35 +01:00
Gustavo Henrique Nihei
81499fcdf2 risc-v/espressif: Add support for ESP32-H2
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-14 23:55:35 +01:00
Gustavo Henrique Nihei
c149e52791 risc-v/espressif: Add support for ESP32-C6
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-14 23:55:35 +01:00
Gustavo Henrique Nihei
17f7f6e86d risc-v: Add Espressif chip family support on top of esp-hal-3rdparty
Initially supporting ESP32-C3 chip, to be followed by other RISC-V-based
chips from Espressif.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-14 23:55:35 +01:00
Zhihong Chen
8f74ce8ac4 boards:riscv:hpm6750evk2: revised README.txt to config toolchain
- use hpmicro GNU riscv32 toolchain

Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
2023-03-09 07:56:00 +02:00
Lucas Saavedra Vaz
35f830b19a boards: Add CoreMark config to ESP boards 2023-03-08 13:11:13 +08:00
Xiang Xiao
66c5f86018 sched: Disable stdio api by default when DEFAULT_SMALL equals y
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-03 00:18:03 +02:00
Xiang Xiao
2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
Xiang Xiao
8b4ecac6c2 libc: Move math library from libs/libc/math to libs/libm/libm
to prepare the support of other implementation e.g.:
https://github.com/JuliaMath/openlibm
https://gitlab.com/gtd-gmbh/libmcs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-23 10:40:07 +02:00
Xiang Xiao
ee24396d77 drivers/note: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
follow other driver config style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:59 +08:00
Alan Carvalho de Assis
39d3236ee8 esp32c3-devkit: Remove -Werror to let compile ble stack 2023-02-18 11:02:31 +08:00
Xiang Xiao
6b61b5ed15 Fix warning: warning: ESP32C6_DEVKIT_RUN_IRAM has 'help' but empty help text
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-17 16:01:52 +08:00
Alan Carvalho de Assis
bc605962b8 esp32c6-devkit: Update defconfig 2023-02-11 13:18:52 +08:00
chenwen@espressif.com
cfc9029c5d risc-v/esp32c6: Add ESP32-C6 basic support
1. Bring up OS kernel.
  2. Add interrupt support.
  3. Add system timer support.
  4. Add the ESP32-C6 devkit board.
  5. Add basic UART support for console.
  6. Add clock configuration.
  7. Add board reset support.
2023-02-10 17:38:41 -03:00
chao an
3a0fdb019d nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:05:44 +08:00
Zhihong Chen
d082af34f7 add hpmicro chip: hpm6750
Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
2023-02-09 14:17:49 +08:00
Ville Juven
09e7987121 sched/addrenv: Fix system crash when process group has been deleted
There is currently a big problem in the address environment handling which
is that the address environment is released too soon when the process is
exiting. The current MMU mappings will always be the exiting process's, which means
the system needs them AT LEAST until the next context switch happens. If
the next thread is a kernel thread, the address environment is needed for
longer.

Kernel threads "lend" the address environment of the previous user process.
This is beneficial in two ways:
- The kernel processes do not need an allocated address environment
- When a context switch happens from user -> kernel or kernel -> kernel,
  the TLB does not need to be flushed. This must be done only when
  changing to a different user address environment.

Another issue is when a new process is created; the address environment
of the new process must be temporarily instantiated by up_addrenv_select().
However, the system scheduler does not know that the process has a different
address environment to its own and when / if a context restore happens, the
wrong MMU page directory is restored and the process will either crash or
do something horribly wrong.

The following changes are needed to fix the issues:
- Add mm_curr which is the current address environment of the process
- Add a reference counter to safeguard the address environment
- Whenever an address environment is mapped to MMU, its reference counter
  is incremented
- Whenever and address environment is unmapped from MMU, its reference
  counter is decremented, and tested. If no more references -> drop the
  address environment and release the memory as well
- To limit the context switch delay, the address environment is freed in
  a separate low priority clean-up thread (LPWORK)
- When a process temporarily instantiates another process's address
  environment, the scheduler will now know of this and will restore the
  correct mappings to MMU

Why is this not causing more noticeable issues ? The problem only happens
under the aforementioned special conditions, and if a context switch or
IRQ occurs during this time.
2023-02-08 02:51:23 +08:00
Xiang Xiao
d8a8c2fdd8 boards: Enable assert for citest
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-06 21:33:15 +09:00
Stuart Ianna
05c6d7c7b9 litex: Add PWM driver.
PWM driver for multiple peripherals supplied in gateware.

Only single channel frequency and duty cycle control is implemented. Pulse counting and multichannel features are not currently feasible.

Additions also include a new board configuration for arty-a7 which enables the PWM driver and example application.
2023-02-01 09:34:57 -03:00
Ville Juven
0bebb94923 icicle/configs: Update some configs
- Remove the annoying color terminal for nsh target
- Add SHMFS for nsh and pnsh
- Increase stack user and kernel sizes for kernel mode
2023-01-30 21:57:25 +08:00
Xiang Xiao
267e80a9e7 boards: Update Administrator tea result to 8Tv+Hbmr3pLVb5HHZgd26D
continue the change: https://github.com/apache/nuttx/pull/6843

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-26 17:11:07 +02:00