-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[add][RTduino] Fitter RTduino in frdm-mcxa346 #11067
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
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_mcxaReviewers: hywing Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-01-05 22:38 CST)
📝 Review Instructions
|
| select BSP_USING_GPIO | ||
| select BSP_USING_ADC | ||
| select BSP_USING_ADC0 | ||
| select BSP_USING_ADC0_CH0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面pins_arduino.c对应的驱动这块没加上,另外在rtduino软件包下有测试过这些外设吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
老师这个文件已经修改对应的 但是外设还没有来得及全部测试 后续有时间我会回测试然后添加到支持列表里面
好滴 老师已经添加 新的pr测试提交中已经mcxa已经编译通过 |
好滴 老师 等我后续完成测试我会添加到支持里面并且在application下面添加rtduino适配说明 |
请问下这块是否有测试完成? |
| select BSP_USING_UART2 | ||
| select BSP_USING_GPIO | ||
| select BSP_USING_PWM | ||
| select BSP_USING_ADC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好滴 老师 收到!
There was a problem hiding this 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 RTduino (Arduino ecosystem compatibility layer) support to the frdm-mcxa346 BSP.
Key changes:
- Adds RTduino configuration option in Kconfig with peripheral dependencies
- Implements Arduino pin mapping for GPIO, ADC, PWM, SPI, I2C, and UART peripherals
- Adds build system integration and example Arduino sketch
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| board/Kconfig | Adds BSP_USING_ARDUINO config option with peripheral dependencies |
| applications/arduino_pinout/pins_arduino.h | Defines Arduino pin aliases (D0-D13, D18-D19, A0-A7) and default peripherals |
| applications/arduino_pinout/pins_arduino.c | Maps Arduino pins to MCU pins with peripheral assignments |
| applications/arduino_pinout/SConscript | Build script for RTduino pinout module |
| applications/arduino_pinout/RTduino-peripherals.png | Pin mapping diagram (binary image) |
| applications/arduino_main.cpp | Example Arduino sketch with setup() and loop() |
| applications/SConscript | Integrates arduino_main.cpp into build system |
| .cl/attachconfig/RTduino.attach | RTduino package configuration |
| Libraries/drivers/drv_pin.h | Adds GET_PINS macro for pin number calculation |
| * | ||
| * Change Logs: | ||
| * Date Author Notes | ||
| * 2025-12-08 westcity-yolo first version |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date format is incorrect - same issue as pins_arduino.h. Should be corrected to "2024-12-08" or current date.
日期格式不正确 - 与pins_arduino.h相同的问题。应更正为"2024-12-08"或当前日期。
| * 2025-12-08 westcity-yolo first version | |
| * 2024-12-08 westcity-yolo first version |
| {A2, GET_PINS(2,7),"adc0", 7}, /* ADC */ | ||
| {A3, GET_PINS(3,30),"adc1", 21}, | ||
| {A4, GET_PINS(1,0),"i2c1"}, /* I2C-SDA (Wire) */ | ||
| {A5, GET_PINS(1,1),"i2c1"}, /* I2C-SCL (Wire) */ |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing entry for A6 and A7 in pin_map_table. The header file defines A6 (22) and A7 (23) pins, but the pin_map_table only has entries up to A5. This will cause array access issues when these pins are referenced.
pin_map_table中缺少A6和A7的条目。头文件定义了A6(22)和A7(23)引脚,但pin_map_table只有到A5的条目。当引用这些引脚时,这将导致数组访问问题。
| {A5, GET_PINS(1,1),"i2c1"}, /* I2C-SCL (Wire) */ | |
| {A5, GET_PINS(1,1),"i2c1"}, /* I2C-SCL (Wire) */ | |
| {A6, GET_PINS(1,14),"adc1", 12}, /* ADC (alias of A0 to keep sequence) */ | |
| {A7, GET_PINS(2,5), "adc1", 1}, /* ADC (alias of A1 to keep sequence) */ |
| * | ||
| * Change Logs: | ||
| * Date Author Notes | ||
| * 2025-12-08 westcity-yolo first version |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date format is incorrect - same issue. Should be corrected to "2024-12-08" or current date.
日期格式不正确 - 相同的问题。应更正为"2024-12-08"或当前日期。
| * 2025-12-08 westcity-yolo first version | |
| * 2024-12-08 westcity-yolo first version |
|
|
||
| endmenu | ||
|
|
||
| menu "Onboard Peripheral Drivers" |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR title should follow format: [module][subsystem] Description in lowercase. Current title uses "[add]" which is not a module/vendor name. Based on modified files in bsp/nxp/mcx/mcxa/frdm-mcxa346/, suggest: [frdm-mcxa346][rtduino] Add RTduino support or [mcxa][rtduino] Add RTduino support for frdm-mcxa346
PR标题应遵循格式:小写的[模块][子系统] 描述。当前标题使用"[add]",这不是模块/厂商名称。基于修改的文件在bsp/nxp/mcx/mcxa/frdm-mcxa346/,建议:[frdm-mcxa346][rtduino] Add RTduino support或[mcxa][rtduino] Add RTduino support for frdm-mcxa346
| * | ||
| * Change Logs: | ||
| * Date Author Notes | ||
| * 2025-12-08 westcity-yolo first version |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date format is incorrect. Shows "2025-12-08" but current date should be in 2025 (January 2026). This appears to be a typo - should likely be "2024-12-08" or the current date "2026-01-XX".
日期格式不正确。显示"2025-12-08",但当前日期应该是2025年(2026年1月)。这似乎是个拼写错误 - 应该是"2024-12-08"或当前日期"2026-01-XX"。
| * 2025-12-08 westcity-yolo first version | |
| * 2024-12-08 westcity-yolo first version |
|
@westcity-YOLO 辛苦在这里的文档补充一下346的支持说明哈 |
[docs][libcpu][arm][cortex-a] add comment for mmu.h (RT-Thread#11104) * [docs][libcpu][arm][cortex-a] add comment for mmu.h * [docs][libcpu][arm][cortex-a] beautify comment for mmu.h * [docs][libcpu][arm][cortex-a] delete extra space at the end of lines [fix] drivers: spi: refactor SPI bit operations into independent configuration - Add RT_USING_SPI_BITOPS as a separate configurable option - Make RT_USING_SOFT_SPI depend on RT_USING_SPI_BITOPS - Adjust build order in SConscript for proper com Signed-off-by: Runcheng Lu <runcheng.lu@hpmicro.com> feat:[stm32][can]: Validate CAN filter bank settings and skip invalid items [add][RTduino] Fitter RTduino in frdm-mcxa346 (RT-Thread#11067) * add mcxa346-RTduino [FIX]Locking for dfs_dentry_dump must be consistent with that of all other dentry functions. fix(dfs): align fd API declarations with DFS_USING_POSIX [tools][cmake]:Fix the cmake creation error of scons [FIX][fal]char设备类型补充缺失的入参,适配DFSv2框架 (RT-Thread#11112) * [FIX][fal]补充缺失的入参,适配DFSv2框架 * [FIX][fal]正确声明入参的数据类型 * [chg]按审查建议修改变量类型和代码格式。

拉取/合并请求描述:(PR description)
[
Fitter RTduino in frdm-mcxa346
BSP:
\bsp\nxp\mcx\mcxa\frdm-mcxa346
.config:
action:
]
当前拉取/合并请求的状态 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