Repository navigation
增加全志 V861 C907 板级支持 - #12077
增加全志 V861 C907 板级支持#12077cms19859230182-lang wants to merge 1 commit into
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
| @@ -0,0 +1,12 @@ | |||
| # Avaota F2 C907 — 验收边界(PR 阶段 A) | |||
There was a problem hiding this comment.
成,我删掉这份文件
| ## 编译 | ||
|
|
||
| ```text | ||
| set RTT_EXEC_PATH=<riscv-none-embed 或等价 gcc 的 bin> |
There was a problem hiding this comment.
建议使用 env 2.x,可通过 sdk 命令管理工具链的安装和卸载。本地有工具链,简单配置即可自动探测并使用工具链。
74f75b5 to
0305e01
Compare
|
全改完啦,请验收 |
| .global rt_hw_builtin_fdt_end | ||
| .type rt_hw_builtin_fdt, %object | ||
| rt_hw_builtin_fdt: | ||
| .incbin "board/board.dtb" |
There was a problem hiding this comment.
干净检出没有 board/board.dtb,SCons 也没有调用生成脚本。按 README 直接跑 scons 会在这里报找不到文件。请把 DTB 的生成和依赖接进构建,再从干净目录跑一遍。
A clean checkout has no board/board.dtb, and SCons never runs the generator. The documented scons build will fail at this include. Please wire DTB generation into the build and verify it from a clean checkout.
0305e01 to
e5101df
Compare
| config.baud_rate = g_uart_fdt.baud; | ||
| serial0.ops = &uart_ops; | ||
| serial0.config = config; | ||
| return rt_hw_serial_register(&serial0, "uart0", RT_DEVICE_FLAG_RDWR, RT_NULL); |
There was a problem hiding this comment.
FinSH 以 INT_RX 打开 uart0,这里只注册了 RDWR,打开会返回 -RT_EIO。请实现接收中断并上报 RX_IND,让 getc() 在 FIFO 为空时返回 -1,再验证能从串口输入一条 msh 命令。
|
BSP 构建矩阵为空,C907 没有进入编译。请把 |
There was a problem hiding this comment.
这个rtconfig.h感觉怪怪的,不像是env生成的,建议用env生成后提交上来
There was a problem hiding this comment.
这是用 bring-up 写的时候最小配置哈哈,我用 menuconfig 重写一波
There was a problem hiding this comment.
不建议添加这个脚本,建议把 gen_board_dtb.py 换成 board/board.dts,由 SCons 调用 dtc 编译。
把 env.Command 的输入改为 DTS,用 dtc -I dts -O dtb -o $TARGET $SOURCE 生成 board/board.dtb
e5101df to
a7ca691
Compare
📌 Code Review Assignment🏷️ Tag: workflowReviewers: @Rbb666 @kurisaW @supperthomas Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-11-25 17:50 CST)
📝 Review Instructions
|
|
修不动了,明早起来再高 |
- uart0 走 PLIC 中断收数(板级 plic.c):FinSH 以 RDWR|INT_RX 打开,ISR 上报 RT_SERIAL_EVENT_RX_IND,getc() 空时返回 -1;trap 增加 M 外部中断分发。 - 删除 board/gen_board_dtb.py,改为 board/board.dts,由 SCons 调 dtc 生成 board/board.dtb;driver 用 RTT_ROOT 定位 libfdt,scons --dist 后也能编。 - rtconfig.h 改由 Kconfig + .config(menuconfig/defconfig)生成并提交。 - CI:riscv-none leg 里加入 allwinner/avaota-f2,并安装 device-tree-compiler。 - 未上板验证;本机只做干净构建(含 --dist 项目)与静态对照。 - board/plic.c、board/plic.h 按 clang-format 22.1.8 归一(CI format 门禁)。 Co-Authored-By: DeepSeek Flash 1017 Co-Authored-By: Gemini 3.8 Flash
a7ca691 to
c3f6ae9
Compare
| #include <stdint.h> | ||
| #include <rtthread.h> | ||
|
|
||
| #define V861_PLIC_BASE 0x10000000U |
There was a problem hiding this comment.
V861 C907 的设备树把 PLIC 放在 0x30000000,这里和 board.dts 却用 0x10000000。v861_plic_init() 启动时就会按这个地址写寄存器。请确认 RV32 机器模式下的实际地址,同步两处,再上板验证 UART0 能接收 msh 命令。V861 DTS
| #include "plic.h" | ||
|
|
||
| #define PLIC_PRIORITY_OFFSET 0x000000U | ||
| #define PLIC_ENABLE_OFFSET 0x002000U /* M-mode context 0 */ |
拉取/合并请求描述:(PR description)
为什么提交这份PR (why to submit this PR)
为全志 V861(Avaota F2)增加 C907 板级支持,便于在该硬件上运行 RT-Thread。
你的解决方案是什么 (what is your solution)
增加了 V861 的 BSP 支持;含有基础的 board、链接脚本和 config,并且已经登记。
请提供验证的bsp和config (provide the config and bsp)
bsp/allwinner/avaota-f2rtconfig.h(本地已能scons编过)当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up.github/ALL_BSP_COMPILE.json