-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[bsp][renesas] add EK-RA2E2 support #10646
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
[bsp][renesas] add EK-RA2E2 MDK support
📌 Code Review Assignment🏷️ Tag: bsp_renesasReviewers: kurisaW Changed Files (Click to expand)
🏷️ Tag: workflowReviewers: Rbb666 kurisaW supperthomas Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-09-02 21:09 CST)
📝 Review Instructions
|
| /*******************************************************************************************************************//** | ||
| * MCU starts executing here out of reset. Main stack pointer is set up already. | ||
| **********************************************************************************************************************/ | ||
| void Reset_Handler (void) |
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.
此处建议修改为:
void Reset_Handler (void)
{
/* Initialize system using BSP. */
SystemInit();
/* Call user application. */
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
extern int entry(void);
entry();
#elif defined(__ICCARM__)
extern void __low_level_init(void);
__low_level_init();
#else
/* Jump to main. */
main();
#endif
while (1)
{
/* Infinite Loop. */
}
}都统一一下
| Export('SDK_LIB') | ||
|
|
||
| rtconfig.BSP_LIBRARY_TYPE = None | ||
|
|
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.
在这里可以加上这段逻辑:
def startup_check():
import subprocess
startup_check_path = os.getcwd() + "/../tools/startup_check.py"
if os.path.exists(startup_check_path):
try:
subprocess.call(["python", startup_check_path])
except:
subprocess.call(["python3", startup_check_path])
RegisterPreBuildingAction(startup_check)效果是如果使用内置的env编译之前会检查一下这个文件是否被修改,然后复原
|
另外IIC驱动命名问题,可以参考这段代码进行适配:
|
|
bsp/renesas/ra2e2-ek/ra/arm/CMSIS_6/CMSIS/ |
@supperthomas 瑞萨的代码生成规范是这样的,包含CMSIS、启动文件、原厂驱动库,板级配置文件都是由configuration.xml统一生成的,并且按芯片家族统一,例如RA系列,后面可以考虑直接使用:https://github.com/renesas/fsp/tree/master/ra 只保留ra_gen和ra_cfg两个目录(具体bsp必要的),当然对应同一RA家族的fsp需要全部统一下同一版本的configuration.xml 这个后面我抽空单独起个PR吧,这个PR建议先不要动了 |
|
@tomjielii 我看这个板子只有8K RAM,这nano都跑不起来吧?有运行截图吗 |
|
标准rt-thread,主线程和msh 都由2k变1k,编译之后大概接近4K。主要是flash不够,跑驱动模型要开 -Os 优化选项。
程廷桢
***@***.***
|
|
建议直接上nano,这个上完整版随便加点程序估计就没法跑了,只需要一键开启nano的宏定义就可以了,然后能关的内核选项都关了,本身板载驱动配置也可以保留着 |
|
可以。之前配置好了,可以一键开nano。
程廷桢
***@***.***
|
|
https://club.rt-thread.org/ask/article/d273bbcd1f8779bc.html ci.attachconfig.yml可以一下。 |
|
CLA assistant check |
|
好了。
程廷桢
***@***.***
|
|
再辛苦作者压缩一下提交哈,IIC驱动那块可以加个这个芯片的一个单独支持 |
这个PR已经5.5M了,还是建议用不到的文件删掉一些。
|
|
IIC 这个模块,用宏名替换,但是不工作。
程廷桢
***@***.***
|
不工作是指什么意思?IIC没法正常驱动? |
|
R_IIC_MASTER_Write 会返回 FSP_ERR_IN_USE
程廷桢
***@***.***
|
|
基础bsp可以先提交上来,后面作者如果有空的话可以看看ra2e2的iic驱动问题,这个PR再rebase一下吧,如果无特别需要说明的,仅保留一条commit即可,我这边没问题了 |
|
LGTM |
|
I2C的驱动问题解决了,这个板子没上拉电阻。从设备有上拉就不会返回错误了。
我看到这个PR已经合并了,还需要rebase吗?
程廷桢
***@***.***
|
|
可以另起一个PR |

拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
新增 瑞萨 EK-RA2E2的BSP支持,BSP需要FSP6.0.0版本
遗留的问题:
1.使用瑞萨的 RASC 生成驱动代码时,会重新在$(BSP_ROOT)目录下生成
bsp_linker_info.h,需要手动覆盖或删除2.不支持 drv_i2c.c,RASC 没有生成 R_IIC_MASTER_Open 的选项,只有 R_IIC_b_MASTER_Open
你的解决方案是什么 (what is your solution)
请提供验证的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