Skip to content

inital commit for FRDM-MCXA346 support #10604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 15, 2025
Merged

inital commit for FRDM-MCXA346 support #10604

merged 4 commits into from
Aug 15, 2025

Conversation

yandld
Copy link
Contributor

@yandld yandld commented Aug 12, 2025

拉取/合并请求描述:(PR description)

[

FRDM-MCXA346

为什么提交这份PR (why to submit this PR)

你的解决方案是什么 (what is your solution)

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

  • BSP:
  • .config:
  • action:

]

当前拉取/合并请求的状态 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
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

@yandld yandld requested a review from Rbb666 as a code owner August 12, 2025 10:59
@CLAassistant
Copy link

CLAassistant commented Aug 12, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added BSP: NXP Code related with NXP BSP labels Aug 12, 2025
Copy link

github-actions bot commented Aug 12, 2025

📌 Code Review Assignment

🏷️ Tag: bsp_mcxa

Reviewers: hywing

Changed Files (Click to expand)
  • bsp/nxp/mcx/mcxa/Libraries/drivers/drv_uart.c
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/.config
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/Kconfig
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/SConscript
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/SConstruct
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/applications/SConscript
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/applications/main.c
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/Kconfig
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/MCUX_Config/board/clock_config.c
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/MCUX_Config/board/clock_config.h
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/MCUX_Config/board/pin_mux.c
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/MCUX_Config/board/pin_mux.h
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/SConscript
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/board.c
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/board.h
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/linker_scripts/MCXA346_flash.ld
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/board/linker_scripts/MCXA346_flash.scf
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/project.uvoptx
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/project.uvprojx
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/rtconfig.h
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/rtconfig.py
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/template.uvoptx
  • bsp/nxp/mcx/mcxa/frdm-mcxa346/template.uvprojx

🏷️ Tag: workflow

Reviewers: Rbb666 kurisaW supperthomas

Changed Files (Click to expand)
  • .github/ALL_BSP_COMPILE.json

📊 Current Review Status (Last Updated: 2025-08-15 18:49 CST)

  • Rbb666 Pending Review
  • hywing Pending Review
  • kurisaW Pending Review
  • supperthomas Pending Review

📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@hywing
Copy link
Contributor

hywing commented Aug 13, 2025

image 代码格式化一下,格式化工具:https://github.com/mysterywolf/formatting

@supperthomas supperthomas added the BSP: new bsp board New added bsp, need sync action label Aug 14, 2025
@supperthomas
Copy link
Member

如果是新增bsp, 已经添加ci检查到https://github.com/RT-Thread/rt-thread/blob/master/.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

@yandld yandld requested a review from supperthomas as a code owner August 15, 2025 09:39
@github-actions github-actions bot added the action github action yml imporve label Aug 15, 2025
@yandld
Copy link
Contributor Author

yandld commented Aug 15, 2025

format, CI 都已经添加,

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds initial support for the FRDM-MCXA346 development board based on the NXP MCXA346 microcontroller. It introduces a complete BSP package with board initialization, device drivers, build configuration files, and project templates for multiple toolchains.

Key Changes

  • Added complete BSP support for FRDM-MCXA346 board with MCXA346VLQ microcontroller
  • Implemented board initialization code and pin multiplexing configuration
  • Added project templates and build configurations for Keil MDK, GCC, and IAR toolchains

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
rtconfig.py Build configuration script with toolchain settings and compiler flags
rtconfig.h RT-Thread configuration header with feature flags and driver settings
board.c/board.h Board initialization and hardware abstraction layer
pin_mux.c/pin_mux.h Pin multiplexing configuration for UART and GPIO
clock_config.c/clock_config.h System clock configuration and management
.uvprojx/.uvoptx Keil MDK project files and settings
.ld/.scf Linker scripts for GCC and ARM toolchains
SConscript SCons build script for RT-Thread build system

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'C:\Users\XXYYZZ'
Copy link
Preview

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EXEC_PATH contains a placeholder path 'C:\Users\XXYYZZ' that should be updated to a proper default path or made more generic. Consider using a more standard path like 'C:\Program Files\GNU Arm Embedded Toolchain\bin' or document that users need to update this path.

Suggested change
EXEC_PATH = r'C:\Users\XXYYZZ'
# Update EXEC_PATH to match your GNU Arm Embedded Toolchain installation path, or set RTT_EXEC_PATH environment variable.
EXEC_PATH = r'C:\Program Files\GNU Arm Embedded Toolchain\bin'

Copilot uses AI. Check for mistakes.

src += Glob('ports/drv_spi_sample_rw007.c')

CPPPATH = [cwd, cwd + '/MCUX_Config/board']
CPPDEFINES = ['DEBUG', 'CPU_MCXA346VLL']
Copy link
Preview

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CPU define 'CPU_MCXA346VLL' is inconsistent with the board name which suggests MCXA346VLQ variant. The define should match the actual CPU variant being used on the FRDM-MCXA346 board.

Suggested change
CPPDEFINES = ['DEBUG', 'CPU_MCXA346VLL']
CPPDEFINES = ['DEBUG', 'CPU_MCXA346VLQ']

Copilot uses AI. Check for mistakes.

!!GlobalInfo
product: Pins v15.0
processor: MCXA156
package_id: MCXA156VLL
Copy link
Preview

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The processor field shows 'MCXA156' but this should be 'MCXA346' to match the actual microcontroller used on the FRDM-MCXA346 board. This appears to be a copy-paste error from another board configuration.

Suggested change
package_id: MCXA156VLL
processor: MCXA346
package_id: MCXA346VLL

Copilot uses AI. Check for mistakes.

!!GlobalInfo
product: Pins v15.0
processor: MCXA156
package_id: MCXA156VLL
Copy link
Preview

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package_id should be 'MCXA346VLQ' to match the FRDM-MCXA346 board specification, not 'MCXA156VLL'. This inconsistency could cause issues with pin configuration.

Suggested change
package_id: MCXA156VLL
package_id: MCXA346VLQ

Copilot uses AI. Check for mistakes.

else:
CFLAGS += ' -O2 -Os'

POST_ACTION = OBJCPY + ' -O binary --remove-section=.boot_data --remove-section=.image_vertor_table --remove-section=.ncache $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
Copy link
Preview

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in 'image_vertor_table' which should be 'image_vector_table'.

Suggested change
POST_ACTION = OBJCPY + ' -O binary --remove-section=.boot_data --remove-section=.image_vertor_table --remove-section=.ncache $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
POST_ACTION = OBJCPY + ' -O binary --remove-section=.boot_data --remove-section=.image_vector_table --remove-section=.ncache $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'

Copilot uses AI. Check for mistakes.

@Rbb666 Rbb666 merged commit 329cffd into RT-Thread:master Aug 15, 2025
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action github action yml imporve BSP: new bsp board New added bsp, need sync action BSP: NXP Code related with NXP BSP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants