Skip to content

[bsp][k230] add K230D support and Smart improvements - #11897

Open
BernardXiong wants to merge 5 commits into
RT-Thread:masterfrom
BernardXiong:pr/k230-k230d-smart
Open

BernardXiong wants to merge 5 commits into
RT-Thread:masterfrom
BernardXiong:pr/k230-k230d-smart

Conversation

@BernardXiong

@BernardXiong BernardXiong commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

拉取/合并请求描述:(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)

  • add SOC_K230/SOC_K230D selection and size the default memory layout for 128MB DDR
  • register GPIO as an RT-Thread pin device
  • add ext4 rootfs support and mount ptyfs and procfs
  • remove unused board peripheral definitions
  • keep the SDK riscv64-unknown-linux-musl toolchain and lp64d ABI
  • regenerate .config and rtconfig.h

Dependencies

请提供验证的bsp和config (provide the config and bsp)

  • BSP: bsp/k230 (K230D, 128MB DDR)
  • .config: CONFIG_SOC_K230D=y, CONFIG_BSP_ROOTFS_TYPE_EXT4=y, CONFIG_BSP_USING_GPIO=y, CONFIG_RT_USING_PIN=y
  • action: built locally with the K230 SDK riscv64-unknown-linux-musl toolchain; CI will verify the configuration

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用clang-format 源码格式化工具确保格式符合RT-Thread代码规范 This PR has been formatted with clang-format and complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

- 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
@BernardXiong BernardXiong mentioned this pull request Oct 18, 2026
10 tasks
@BernardXiong
BernardXiong marked this pull request as ready for review October 18, 2026 12:08
- 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
@github-actions github-actions Bot added the BSP label Oct 18, 2026
- 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
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

k230

  • SRAM: .bss +61,536 B, .data +1,088 B, .eh_frame +24,104 B, .sbss +120 B, .srodata.cst8 +32 B, .text +117,856 B (+18.1%, 1,333,275 B / 60,682,240 B, total: 2% used)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant