Repository navigation
[bsp][k230] add K230D support and Smart improvements - #11897
Conversation
|
| #define BSP_ROOTFS_TYPE_EXT4 | ||
| #define BSP_RISCV_FPU_SOFT | ||
| #define RT_USING_DFS_V2 | ||
| #define RT_USING_DFS_DEVFS | ||
| #define RT_USING_DFS_PTYFS | ||
| #define RT_USING_DFS_PROCFS | ||
| #define RT_USING_DFS_CROMFS | ||
| #define RT_USING_DFS_TMPFS | ||
| #define PKG_USING_LWEXT4 | ||
| #define RT_USING_DFS_LWEXT4 | ||
| #define PKG_USING_LWEXT4_LATEST_VERSION | ||
| #define PKG_USING_ZLIB | ||
| #define PKG_USING_ZLIB_LATEST_VERSION |
There was a problem hiding this comment.
这个地方感觉怪怪的,建议是通过 menuconfig 重新刷一遍
There was a problem hiding this comment.
已按建议改用 scons --pyconfig-silent 重新生成 bsp/k230/.config 和 rtconfig.h(commit 87a0051),并把分支 rebase 到最新 master。
原来手动追加在 rtconfig.h 末尾的 SOC_K230D、BSP_ROOTFS_TYPE_EXT4、RT_USING_DFS_*、PKG_USING_LWEXT4、PKG_USING_ZLIB 等宏,现在都由 Kconfig 输出到各自对应的 section。生成时为了与 #11892 的依赖保持一致,临时应用了 #11892 的 libcpu/Kconfig 变更,提交中不包含该文件。
- add SOC_K230/SOC_K230D selection and a 128MB memory layout - register GPIO as an RT-Thread pin device - support ext4 rootfs and mount ptyfs and procfs - remove unused board peripheral definitions - switch the toolchain to the musleabi ABI - regenerate .config and rtconfig.h
- use the lp64d ABI expected by libc_kernel.a and libgcc.a - restore the riscv64-unknown-linux-musl toolchain prefix - fix the double-float and soft-float link failure
- format memory layout macros - format the pin device callbacks - no functional change
- initialize all RTC register fields before writing them to hardware - fix the cppcheck uninitvar warning for reserved fields
- initialize alarm date and time register fields before use - fix the cppcheck uninitvar warning for reserved fields
Normalize bsp/k230/.config and rtconfig.h with scons --pyconfig-silent so the Kconfig symbols are emitted in their proper sections instead of being appended at the end of the file. The previous configuration choices are preserved. Co-Authored-By: Claude Code <noreply@anthropic.com>
d82b195 to
87a0051
Compare
Rbb666
left a comment
There was a problem hiding this comment.
新增 k230_pin_mode() 的模式映射需要修正(bsp/k230/drivers/interdrv/gpio/drv_gpio.c:388-398)。
PIN_MODE_OUTPUT_OD 当前直接映射到普通 GPIO_DM_OUTPUT,写高仍会推挽驱动高电平,没有实现开漏释放;PIN_MODE_INPUT_PULLUP/PULLDOWN 也只映射普通输入,没有配置上下拉。调用标准 pin API 的开漏总线和无外部上拉按键因此会得到错误电气行为。
请实现对应 pad/开漏配置及写高释放逻辑;若某模式暂不支持,应明确报告不支持,不能静默按普通输入/输出执行。请补充这些模式的板上验证。
The standard pin API mapped PIN_MODE_OUTPUT_OD and the pull-up/pull-down input modes to a plain GPIO output/input, so an open-drain user got a push-pull driver and the requested pulls were silently ignored. Configure the IO mux pad for every mode (pull-up, pull-down, output enable) and emulate open-drain output by switching the pad to input for a high level, which releases the line. Pins without a pad are rejected for open-drain instead of falling back to push-pull behavior. Add a utest that drives GPIO33 as open drain while GPIO32 senses the line with its input pull resistors.
be7e05c to
b60143c
Compare
scons --dist only copies libcpu/<ARCH> for the current BSP. The unconditional rsource "arm/Kconfig" therefore breaks pyconfig for every non-ARM dist project, such as bsp/k230. Use orsource like the aarch64 and risc-v entries already do in the same file.
aarch64 BSPs select ARCH_ARM, ARCH_ARM_MMU and ARCH_ARMV8, which are defined in libcpu/arm/Kconfig. scons --dist only copies libcpu/<ARCH>, so the pyconfig run on the dist project silently dropped those symbols together with the AArch64 configuration block, and the dist build of board like rockchip/rk3500 failed with ARCH_RAM_OFFSET undeclared. Copy the shared ARM Kconfig into every dist project so that pyconfig sees the same symbols as the full tree.
拉取/合并请求描述:(PR description)
为什么提交这份PR (why to submit this PR)
The K230 BSP only targeted the 512MB K230 board and had no K230D (128MB DDR)
variant. It also lacked a pin device, ext4 rootfs support and pseudo terminal
mount points required by the Smart configuration.
你的解决方案是什么 (what is your solution)
Dependencies
ARCH_RISCV_XUANTIE, SVPBMT and RISC-V MMU fixes)RT_LWIP_USING_LOOPBACKKconfig symbol)applied. This PR will be rebased and the configuration regenerated after
the dependencies are merged.
请提供验证的bsp和config (provide the config and bsp)
当前拉取/合并请求的状态 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