diff --git a/bsp/cvitek/README.md b/bsp/cvitek/README.md index 6bf2821c96..2bb196c3df 100755 --- a/bsp/cvitek/README.md +++ b/bsp/cvitek/README.md @@ -8,13 +8,14 @@ | 芯片名称 | 芯片架构 | 内存大小 | 默认日志串口 | 备注 | | ------- | ------- |------- | -------- | -------- | -| cv180x | RISC-V C906 | 64MByte | uart0 | 默认开启 MMU,运行 RT-SMART 模式 | +| cv180x | RISC-V C906 | 64MByte | uart0 | 支持 MMU, 支持 RT-Thread 标准版 和 RT-SMART 模式,默认运行 RT-Thread 标准版本 | +| cv181x | RISC-V C906 或 Cortex A53 通过硬件 IO 二选一 | 64MByte | uart0 | 支持 MMU, 支持 RT-Thread 标准版 和 RT-SMART 版,默认运行 RT-Thread 标准版本 | - 小核 | 目录 | 内存大小 | 默认日志串口 | 备注 | | ---- | ------- | -------- | --- | -| c906-little | 与大核共享 | uart1 | 无 MMU,运行 RT-Thread 标准 | +| c906-little | 与大核共享 | uart1 | 无 MMU,运行 RT-Thread 标准版 | > 注:异构芯片需单独编译每个核的 OS diff --git a/bsp/cvitek/cv18xx_risc-v/.config b/bsp/cvitek/cv18xx_risc-v/.config index a926765e70..fc4169c5aa 100644 --- a/bsp/cvitek/cv18xx_risc-v/.config +++ b/bsp/cvitek/cv18xx_risc-v/.config @@ -8,7 +8,7 @@ # CONFIG_RT_NAME_MAX=8 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set -CONFIG_RT_USING_SMART=y +# CONFIG_RT_USING_SMART is not set # CONFIG_RT_USING_NANO is not set # CONFIG_RT_USING_AMP is not set # CONFIG_RT_USING_SMP is not set @@ -25,10 +25,10 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y # CONFIG_RT_USING_HOOKLIST is not set CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 -CONFIG_IDLE_THREAD_STACK_SIZE=1024 +CONFIG_IDLE_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 -CONFIG_RT_TIMER_THREAD_STACK_SIZE=2048 +CONFIG_RT_TIMER_THREAD_STACK_SIZE=8192 # # kservice optimization @@ -89,7 +89,6 @@ CONFIG_RT_USING_CACHE=y # CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set # CONFIG_RT_USING_CPU_FFS is not set CONFIG_ARCH_MM_MMU=y -CONFIG_KERNEL_VADDR_START=0x80000000 CONFIG_ARCH_RISCV=y CONFIG_ARCH_RISCV64=y @@ -98,7 +97,7 @@ CONFIG_ARCH_RISCV64=y # CONFIG_RT_USING_COMPONENTS_INIT=y CONFIG_RT_USING_USER_MAIN=y -CONFIG_RT_MAIN_THREAD_STACK_SIZE=6144 +CONFIG_RT_MAIN_THREAD_STACK_SIZE=8192 CONFIG_RT_MAIN_THREAD_PRIORITY=10 # CONFIG_RT_USING_LEGACY is not set CONFIG_RT_USING_MSH=y @@ -125,25 +124,14 @@ CONFIG_RT_USING_DFS=y CONFIG_DFS_USING_POSIX=y CONFIG_DFS_USING_WORKDIR=y CONFIG_DFS_FD_MAX=16 +# CONFIG_RT_USING_DFS_V1 is not set CONFIG_RT_USING_DFS_V2=y # CONFIG_RT_USING_DFS_ELMFAT is not set CONFIG_RT_USING_DFS_DEVFS=y # CONFIG_RT_USING_DFS_ROMFS is not set -CONFIG_RT_USING_DFS_PTYFS=y # CONFIG_RT_USING_DFS_CROMFS is not set # CONFIG_RT_USING_DFS_TMPFS is not set # CONFIG_RT_USING_DFS_MQUEUE is not set -CONFIG_RT_USING_PAGECACHE=y - -# -# page cache config -# -CONFIG_RT_PAGECACHE_COUNT=4096 -CONFIG_RT_PAGECACHE_ASPACE_COUNT=1024 -CONFIG_RT_PAGECACHE_PRELOAD=4 -CONFIG_RT_PAGECACHE_HASH_NR=1024 -CONFIG_RT_PAGECACHE_GC_WORK_LEVEL=90 -CONFIG_RT_PAGECACHE_GC_STOP_LEVEL=70 # CONFIG_RT_USING_FAL is not set # @@ -153,7 +141,7 @@ CONFIG_RT_PAGECACHE_GC_STOP_LEVEL=70 CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_UNAMED_PIPE_NUMBER=64 CONFIG_RT_USING_SYSTEM_WORKQUEUE=y -CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048 +CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=8192 CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 CONFIG_RT_USING_SERIAL=y CONFIG_RT_USING_SERIAL_V1=y @@ -223,11 +211,9 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 CONFIG_RT_USING_POSIX_FS=y CONFIG_RT_USING_POSIX_DEVIO=y CONFIG_RT_USING_POSIX_STDIO=y -# CONFIG_RT_USING_POSIX_POLL is not set +CONFIG_RT_USING_POSIX_POLL=y # CONFIG_RT_USING_POSIX_SELECT is not set # CONFIG_RT_USING_POSIX_EVENTFD is not set -# CONFIG_RT_USING_POSIX_EPOLL is not set -# CONFIG_RT_USING_POSIX_SIGNALFD is not set # CONFIG_RT_USING_POSIX_TIMERFD is not set # CONFIG_RT_USING_POSIX_SOCKET is not set CONFIG_RT_USING_POSIX_TERMIOS=y @@ -280,24 +266,6 @@ CONFIG_RT_USING_ADT_HASHMAP=y CONFIG_RT_USING_ADT_REF=y # CONFIG_RT_USING_RT_LINK is not set # CONFIG_RT_USING_VBUS is not set -CONFIG_RT_USING_LWP=y -# CONFIG_LWP_DEBUG is not set -CONFIG_RT_LWP_MAX_NR=30 -CONFIG_LWP_TASK_STACK_SIZE=16384 -CONFIG_RT_CH_MSG_MAX_NR=1024 -CONFIG_LWP_CONSOLE_INPUT_BUFFER_SIZE=1024 -CONFIG_LWP_TID_MAX_NR=64 -CONFIG_RT_LWP_SHM_MAX_NR=64 -CONFIG_RT_USING_LDSO=y -# CONFIG_ELF_DEBUG_ENABLE is not set -# CONFIG_ELF_LOAD_RANDOMIZE is not set -CONFIG_LWP_USING_TERMINAL=y -CONFIG_LWP_PTY_MAX_PARIS_LIMIT=64 - -# -# Memory management -# -# CONFIG_RT_USING_MEMBLOCK is not set # # RT-Thread Utestcases @@ -1114,6 +1082,6 @@ CONFIG_BSP_USING_CV18XX=y CONFIG_C906_PLIC_PHY_ADDR=0x70000000 CONFIG_IRQ_MAX_NR=64 CONFIG_TIMER_CLK_FREQ=25000000 -CONFIG___STACKSIZE__=4096 +CONFIG___STACKSIZE__=8192 # CONFIG_BOARD_TYPE_MILKV_DUO is not set CONFIG_BOARD_TYPE_MILKV_DUO256M=y diff --git a/bsp/cvitek/cv18xx_risc-v/README.md b/bsp/cvitek/cv18xx_risc-v/README.md index 45357b4db0..0d92292f15 100755 --- a/bsp/cvitek/cv18xx_risc-v/README.md +++ b/bsp/cvitek/cv18xx_risc-v/README.md @@ -1,7 +1,7 @@ **中文** | [English](README_en.md) ## 概述 -CV180ZB/CV1800B/CV1801B 是面向民用消费监控 IP 摄像机、居家智能等多项产品领域而推出的高性能、低功耗芯片,集成了 H.264/H.265 视频压缩编码器和 ISP;支持数字寛动态、 3D 降噪、除雾、镜头畸变校正等多种图像增强和矫正算法,为客户提供专业级的视频图像质量。 +CV18xx 系列芯片面向民用消费监控 IP 摄像机、居家智能等多项产品领域而推出的高性能、低功耗芯片,集成了 H.264/H.265 视频压缩编码器和 ISP;支持数字寛动态、 3D 降噪、除雾、镜头畸变校正等多种图像增强和矫正算法,为客户提供专业级的视频图像质量。 1. 处理器内核 @@ -34,30 +34,48 @@ CV180ZB/CV1800B/CV1801B 是面向民用消费监控 IP 摄像机、居家智能 - 一个 USB Host / device 接口 ## Toolchain 下载 -下载 `riscv64-unknown-linux-musl-gcc` 的工具链: [https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2](https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2) +1. RT-Thread 标准版工具链:`riscv64-unknown-elf-gcc` 下载地址 [https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz](https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz) + +2. RT-Smart 版工具链: `riscv64-unknown-linux-musl-gcc` 下载地址 [https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2](https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2) > 注: -当前 bsp 只支持 Linux 编译 +当前 bsp 只支持 Linux 编译,推荐 ubuntu 22.04 -正确解压后,在`rtconfig.py`中将 `riscv64-unknown-linux-musl-gcc` 工具链的本地路径加入 `EXEC_PATH` 或通过 `RTT_EXEC_PATH` 环境变量指定路径。 +正确解压后,在`rtconfig.py`中将 `riscv64-unknown-elf-gcc` 或 `riscv64-unknown-linux-musl-gcc` 工具链的本地路径加入 `EXEC_PATH` 或通过 `RTT_EXEC_PATH` 环境变量指定路径。 ```shell +# RT-Thread 标准版按照以下配置: +$ export RTT_CC_PREFIX=riscv64-unknown-elf- +$ export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1/bin + +# RT-Samrt 版按照以下配置: +$ export RTT_CC_PREFIX=riscv64-unknown-linux-musl- $ export RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin ``` ## 编译 -1. 依赖安装 +### 依赖安装 ```shell $ sudo apt install -y scons libncurses5-dev device-tree-compiler ``` -2. Linux平台下,可以先执行: +## 修改当前工程配置 + +Linux平台下,执行: ```shell $ scons --menuconfig ``` -选择当前需要编译的目标开发板类型: +1. 默认编译为 RT-Thread 标准版,如果需要编译为 RT-Smart 版,请按照如下方式修改: +```shell +RT-Thread Kernel ---> + [*] Enable RT-Thread Smart (microkernel on kernel/userland) + + (0x80000000) The virtural address of kernel start +``` + +2. 选择当前需要编译的目标开发板类型: ```shell Board Type (milkv-duo) ---> ( ) milkv-duo @@ -69,7 +87,7 @@ Board Type (milkv-duo) ---> $ source ~/.env/env.sh $ pkgs --update ``` -更新完软件包后,执行 `scons -j10` 或 `scons -j10 --verbose` 来编译这个板级支持包。或者通过 `scons --exec-path="GCC工具链路径"` 命令,在指定工具链位置的同时直接编译。编译正确无误,会产生 rtthread.elf 文件。 +更新完软件包后,执行 `scons -j10` 或 `scons -j10 --verbose` 来编译这个板级支持包,编译正确无误,会产生 rtthread.elf 文件。 编译完成后脚本自动调用 `./mksdimg.sh` 脚本进行打包,并生成 `boot.sd`, 该文件即为 SD 卡启动的 kernel 文件。 @@ -118,22 +136,9 @@ Starting kernel ... heap: [0x802766b0 - 0x812766b0] \ | / -- RT - Thread Smart Operating System - / | \ 5.0.1 build Jun 28 2023 23:44:36 - 2006 - 2022 Copyright by RT-Thread team -Hello RT-Smart! +- RT - Thread Operating System + / | \ 5.1.0 build Apr 7 2024 23:33:20 + 2006 - 2024 Copyright by RT-Thread team +Hello RISC-V! msh /> ``` -## 驱动支持列表 - -| 驱动 | 支持情况 | 备注 | -| :--- | :------- | :---------------- | -| UART | 支持 | 默认波特率115200 | - - -## 支持开发板 -- milk-v duo: [https://milkv.io/duo](https://milkv.io/duo) - -## 联系人信息 - -维护人:[flyingcys](https://github.com/flyingcys) \ No newline at end of file diff --git a/bsp/cvitek/cv18xx_risc-v/README_en.md b/bsp/cvitek/cv18xx_risc-v/README_en.md index 48e02c18bc..e3141e177d 100755 --- a/bsp/cvitek/cv18xx_risc-v/README_en.md +++ b/bsp/cvitek/cv18xx_risc-v/README_en.md @@ -1,26 +1,26 @@ [中文](README.md) | **English** ## Overview -CV180ZB/CV1800B/CV1801B are high-performance, low-power chips designed for consumer surveillance IP cameras, smart home devices, and other product areas. They integrate H.264/H.265 video compression encoders and ISPs, and support various image enhancement and correction algorithms such as digital wide dynamic range, 3D noise reduction, defogging, and lens distortion correction, providing professional-grade video image quality to customers. +The CV18xx series of chips are high-performance, low-power chips launched for various products in the field of civilian consumer surveillance IP cameras, smart homes, and more. These chips integrate H.264/H.265 video compression encoders, as well as ISP; they support various image enhancement and correction algorithms such as digital wide dynamic range, 3D noise reduction, defogging, and lens distortion correction, providing customers with professional-level video image quality. 1. Processor Core -- Main processor: RISCV C906 @ 1.0Ghz +- Main Processor: RISC-V C906 @ 1.0Ghz - 32KB I-cache, 64KB D-Cache - - Integrated vector and floating-point units (FPU). -- Coprocessor: RISCV C906 @ 700Mhz - - Integrated floating-point unit (FPU). + - Integrated Vector and Floating-Point Unit (FPU). +- Co-processor: RISC-V C906 @ 700Mhz + - Integrated Floating-Point Unit (FPU) -2. Memory Interface -- Built-in DRAM: DDR2 16bitx1, with a maximum speed of 1333Mbps, capacity of 512Mbit (64MB). +2. Storage Interface +- Built-in DRAM: DDR2 16bitx1, with a maximum speed of 1333Mbps, and a capacity of 512Mbit (64MB) - Support for SPI NOR flash interface (1.8V / 3.0V) - - Support for 1, 2, 4-wire modes - - Maximum support of 256MBytes + - Supports 1, 2, 4 line modes + - Maximum support of 256MByte - Support for SPI Nand flash interface (1.8V / 3.0V) - - Support for 1KB/2KB/4KB page (corresponding to a maximum capacity of 16GB/32GB/64GB) - - Use the built-in ECC module of the device itself + - Supports 1KB/2KB/4KB page (corresponding to maximum capacity of 16GB/32GB/64GB) + - Utilizes the device's built-in ECC module 3. Peripherals -- Up to 26 GPIO pins on the MilkV-Duo 40-pin header provide access to internal peripherals such as SDIO, I2C, PWM, SPI, J-TAG, and UART. +- Up to 26 GPIO pins on the MilkV-Duo 40-pin header provide access to internal peripherals such as SDIO, I2C, PWM, SPI, J-TAG, and UART - Up to 3x I2C - Up to 5x UART - Up to 1x SDIO1 @@ -29,58 +29,75 @@ CV180ZB/CV1800B/CV1801B are high-performance, low-power chips designed for consu - Up to 7x PWM - Up to 1x RUN - Up to 1x JTAG -- Integrated MAC PHY supporting 10/100Mbps full-duplex or half-duplex mode -- One USB Host / device interface +- Integrated MAC PHY supports 10/100Mbps full or half duplex mode +- One USB host/device interface ## Toolchain Download -Download the `riscv64-unknown-linux-musl-gcc` toolchain from: [https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2](https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2) +1. RT-Thread Standard Edition Toolchain: `riscv64-unknown-elf-gcc` Download Link [https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz](https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz) + +2. RT-Smart Edition Toolchain: `riscv64-unknown-linux-musl-gcc` Download Link [https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2](https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2) > Note: -The current BSP only supports Linux compilation. +The current bsp only supports Linux compilation, and it is recommended to use Ubuntu 22.04 -After correct extraction, add the local path of the `riscv64-unknown-linux-musl-gcc` toolchain to `EXEC_PATH` in `rtconfig.py`, or specify the path through the `RTT_EXEC_PATH` environment variable. +After correctly extracting, add the local path of the `riscv64-unknown-elf-gcc` or `riscv64-unknown-linux-musl-gcc` toolchain to `EXEC_PATH` in `rtconfig.py` or specify the path through the `RTT_EXEC_PATH` environment variable. ```shell +# For RT-Thread Standard Edition, use the following configuration: +$ export RTT_CC_PREFIX=riscv64-unknown-elf- +$ export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1/bin + +# For RT-Smart Edition, use the following configuration: +$ export RTT_CC_PREFIX=riscv64-unknown-linux-musl- $ export RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin ``` ## Compilation -1. Installing Dependencies -```shell -$ sudo apt install -y device-tree-compiler -``` -On the Linux platform, you can execute: +### Dependency Installation +```shell +$ sudo apt install -y scons libncurses5-dev device-tree-compiler +``` + +## Modify Current Project Configuration + +For the Linux platform, execute: ```shell $ scons --menuconfig ``` -Select the type of target board that you want to compile: +1. By default, compile as RT-Thread Standard Edition. If you need to compile as RT-Smart Edition, modify as follows: +```shell +RT-Thread Kernel ---> + [*] Enable RT-Thread Smart (microkernel on kernel/userland) + + (0x80000000) The virtual address of kernel start +``` + +2. Select the current target development board type: ```shell Board Type (milkv-duo) ---> ( ) milkv-duo (X) milkv-duo256m ``` -It will automatically download environment-related scripts to the ~/.env directory, and then execute +It will automatically download relevant scripts to the ~/.env directory, then execute: ```shell $ source ~/.env/env.sh $ pkgs --update ``` +After updating the software package, execute `scons -j10` or `scons -j10 --verbose` to compile this board support package. If the compilation is successful, an rtthread.elf file will be generated. -After updating the software packages, use `scons -j10` or `scons -j10 --verbose` to compile this board support package. Alternatively, you can use the command `scons --exec-path="GCC_toolchain_path"` to specify the toolchain location for compilation. If the compilation is successful, an rtthread.elf file will be generated. - -After the compilation is completed, the script automatically calls the `./mksdimg.sh` script to package and generate the `boot.sd` file, which is the kernel file for SD card boot. +After the compilation is complete, the script automatically calls the `./mksdimg.sh` script to package and generate `boot.sd`, which is the kernel file for SD card startup. ## Running -1. Divide the SD card into 2 partitions, with the first partition used to store bin files and the second partition used as a data storage partition. The partition format is FAT32. - -2. Copy the `fip.bin` and `boot.sd` files from the root directory to the first partition of the SD card. For subsequent firmware updates, you only need to copy the `boot.sd` file. +1. Divide the SD card into 2 partitions, with the first partition used to store bin files, and the second partition used as a data storage partition, with `FAT32` format. +2. Copy the `fip.bin` and `boot.sd` files from the root directory to the first partition of the SD card. Subsequent firmware updates only require copying the `boot.sd` file. Where: -- fip.bin: the bin file after fsbl、opensbi and U-Boot are packaged -- boot.sd: the bin file after the kernel is packaged +- fip.bin: fsbl, opensbi, and uboot packaged bin file +- boot.sd: kernel packaged bin file -After updating `boot.sd`, power on again and you will see the serial output information: +After updating `boot.sd`, restart to see the serial port output: ```shell U-Boot 2021.10 (Jun 26 2023 - 14:09:06 +0800)cvitek_cv180x @@ -92,10 +109,10 @@ Loading Environment from ... OK In: serial Out: serial Err: serial -Net: +Net: Warning: ethernet@4070000 (eth0) using random MAC address - 62:80:19:6c:d4:64 eth0: ethernet@4070000 -Hit any key to stop autoboot: 0 +Hit any key to stop autoboot: 0 Boot from SD ... switch to partitions #0, OK mmc0 is current device @@ -118,21 +135,9 @@ Starting kernel ... heap: [0x802766b0 - 0x812766b0] \ | / -- RT - Thread Smart Operating System - / | \ 5.0.1 build Jun 28 2023 23:44:36 - 2006 - 2022 Copyright by RT-Thread team -Hello RT-Smart! +- RT - Thread Operating System + / | \ 5.1.0 build Apr 7 2024 23:33:20 + 2006 - 2024 Copyright by RT-Thread team +Hello RISC-V! msh /> -``` -## Driver Support List - -| Driver | Support Status | Remarks | -| :----- | :------------- | :--------------------- | -| UART | Supported | Default baud rate 115200 | - -## Supported Development Boards -- milk-v duo: [https://milkv.io/duo](https://milkv.io/duo) - -## Contact information - -Maintenance person:[flyingcys](https://github.com/flyingcys) +``` \ No newline at end of file diff --git a/bsp/cvitek/cv18xx_risc-v/applications/main.c b/bsp/cvitek/cv18xx_risc-v/applications/main.c index a8afc8b0f9..16417b5d08 100755 --- a/bsp/cvitek/cv18xx_risc-v/applications/main.c +++ b/bsp/cvitek/cv18xx_risc-v/applications/main.c @@ -13,7 +13,10 @@ int main(void) { +#ifdef RT_USING_SMART rt_kprintf("Hello RT-Smart!\n"); - +#else + rt_kprintf("Hello RISC-V!\n"); +#endif return 0; } diff --git a/bsp/cvitek/cv18xx_risc-v/rtconfig.h b/bsp/cvitek/cv18xx_risc-v/rtconfig.h index 71585addcc..223e77d61e 100755 --- a/bsp/cvitek/cv18xx_risc-v/rtconfig.h +++ b/bsp/cvitek/cv18xx_risc-v/rtconfig.h @@ -7,7 +7,6 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 8 -#define RT_USING_SMART #define RT_CPUS_NR 1 #define RT_ALIGN_SIZE 8 #define RT_THREAD_PRIORITY_32 @@ -18,10 +17,10 @@ #define RT_HOOK_USING_FUNC_PTR #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 -#define IDLE_THREAD_STACK_SIZE 1024 +#define IDLE_THREAD_STACK_SIZE 8192 #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 -#define RT_TIMER_THREAD_STACK_SIZE 2048 +#define RT_TIMER_THREAD_STACK_SIZE 8192 /* kservice optimization */ @@ -57,7 +56,6 @@ #define ARCH_CPU_64BIT #define RT_USING_CACHE #define ARCH_MM_MMU -#define KERNEL_VADDR_START 0x80000000 #define ARCH_RISCV #define ARCH_RISCV64 @@ -65,7 +63,7 @@ #define RT_USING_COMPONENTS_INIT #define RT_USING_USER_MAIN -#define RT_MAIN_THREAD_STACK_SIZE 6144 +#define RT_MAIN_THREAD_STACK_SIZE 8192 #define RT_MAIN_THREAD_PRIORITY 10 #define RT_USING_MSH #define RT_USING_FINSH @@ -90,24 +88,13 @@ #define DFS_FD_MAX 16 #define RT_USING_DFS_V2 #define RT_USING_DFS_DEVFS -#define RT_USING_DFS_PTYFS -#define RT_USING_PAGECACHE - -/* page cache config */ - -#define RT_PAGECACHE_COUNT 4096 -#define RT_PAGECACHE_ASPACE_COUNT 1024 -#define RT_PAGECACHE_PRELOAD 4 -#define RT_PAGECACHE_HASH_NR 1024 -#define RT_PAGECACHE_GC_WORK_LEVEL 90 -#define RT_PAGECACHE_GC_STOP_LEVEL 70 /* Device Drivers */ #define RT_USING_DEVICE_IPC #define RT_UNAMED_PIPE_NUMBER 64 #define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 +#define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192 #define RT_SYSTEM_WORKQUEUE_PRIORITY 23 #define RT_USING_SERIAL #define RT_USING_SERIAL_V1 @@ -139,6 +126,7 @@ #define RT_USING_POSIX_FS #define RT_USING_POSIX_DEVIO #define RT_USING_POSIX_STDIO +#define RT_USING_POSIX_POLL #define RT_USING_POSIX_TERMIOS #define RT_USING_POSIX_DELAY #define RT_USING_POSIX_CLOCK @@ -164,19 +152,6 @@ #define RT_USING_ADT_BITMAP #define RT_USING_ADT_HASHMAP #define RT_USING_ADT_REF -#define RT_USING_LWP -#define RT_LWP_MAX_NR 30 -#define LWP_TASK_STACK_SIZE 16384 -#define RT_CH_MSG_MAX_NR 1024 -#define LWP_CONSOLE_INPUT_BUFFER_SIZE 1024 -#define LWP_TID_MAX_NR 64 -#define RT_LWP_SHM_MAX_NR 64 -#define RT_USING_LDSO -#define LWP_USING_TERMINAL -#define LWP_PTY_MAX_PARIS_LIMIT 64 - -/* Memory management */ - /* RT-Thread Utestcases */ @@ -312,7 +287,7 @@ #define C906_PLIC_PHY_ADDR 0x70000000 #define IRQ_MAX_NR 64 #define TIMER_CLK_FREQ 25000000 -#define __STACKSIZE__ 4096 +#define __STACKSIZE__ 8192 #define BOARD_TYPE_MILKV_DUO256M #endif diff --git a/bsp/cvitek/cv18xx_risc-v/rtconfig.py b/bsp/cvitek/cv18xx_risc-v/rtconfig.py index 4ca7b664bb..91667d1bf0 100755 --- a/bsp/cvitek/cv18xx_risc-v/rtconfig.py +++ b/bsp/cvitek/cv18xx_risc-v/rtconfig.py @@ -16,7 +16,7 @@ if os.getenv('RTT_CC'): if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' - EXEC_PATH = r'/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin' + EXEC_PATH = r'/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1/bin' else: print('Please make sure your toolchains is GNU GCC!') exit(0) @@ -30,7 +30,7 @@ CHIP_TYPE = 'cv180x' if PLATFORM == 'gcc': # toolchains #PREFIX = 'riscv64-unknown-elf-' - PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-linux-musl-' + PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-elf-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc'