-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[BSP][i.MXRT]Add NXP i.MXRT1021-EVK BSP Support #2421
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
| @@ -0,0 +1,50 @@ | |||
| /* | |||
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.
application目录下面只留main.c文件,其他测试代码请移除。
| * This file is part of RT-Thread RTOS | ||
| * COPYRIGHT (C) 2009 RT-Thread Develop Team | ||
| * | ||
| * The license and distribution terms for this file may be |
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.
文件头描述请根据参考其他BSP,替换为apache的版权信息。
| * This file is part of RT-Thread RTOS | ||
| * COPYRIGHT (C) 2009, RT-Thread Development Team | ||
| * | ||
| * The license and distribution terms for this file may be |
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.
头文件信息不对。好多文件的头文件信息都有问题,请检查一下。
| #include <rtthread.h> | ||
| #include <drv_flexspi.h> | ||
|
|
||
| #if defined(__CC_ARM) |
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.
IAR下Flexspi初始化这个功能是过不去的,所以用这个宏让IAR工程屏蔽掉Flexspi初始化。
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.
那MDK应该可以把?
|
|
||
| # RT1021 board select! | ||
| choice | ||
| prompt "RT1021 Board select" |
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.
只支持一块板子的话这个choic选项可以删除掉。
| #error "Please don't define 'FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL'!" | ||
| #endif | ||
|
|
||
| struct rt1052_pin |
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.
文件里有1052的相关的信息。
| { | ||
| __RT1052_PIN_DEFAULT, | ||
|
|
||
| /* GPIO4 */ |
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.
备注应该为GPIO2
| //static rt_int32_t _mmc_get_card_status(struct rt_mmcsd_host *host) | ||
| //{ | ||
| // MMCSD_DGB("%s, start\n", __func__); | ||
| // MMCSD_DGB("%s, end\n", __func__); |
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.
注释掉不需要的代码请删除。
|
|
||
| // // Ungate SYS PLL PFD2 | ||
| // reg = _RDWORD(0x400D8100); | ||
| // reg &= ~0x800000; |
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.
注释掉不需要的代码请删除。
| _WDWORD(0x402F004C,0x50210A09 ); // enable sdram self refresh again after initialization done. | ||
| } | ||
|
|
||
| int imxrt_sdram_init(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.
imxrt_sdram_init()改为rt_hw_sdram_init()并导出到自动初始化。
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.
改后与原RT1052文件API名字不一致
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.
根据新的来哈,现在默认都是rt_hw_xxx_init()
bsp/imxrt/imxrt1021-evk/rtconfig.py
Outdated
| DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections' | ||
| CFLAGS = DEVICE + ' -std=c99 -Wall -D__FPU_PRESENT -eentry' | ||
| AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -D__START=entry' | ||
| LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread-imxrt-gcc.map,-cref,-u,Reset_Handler -T flexspi_nor.ld' |
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.
rtthread-imxrt-gcc.map改为rtthread.map,此文件中的输出文件都统一用rtthread的名称
bsp/imxrt/imxrt1021-evk/README.md
Outdated
| ## 5. 联系人信息 | ||
|
|
||
| 维护人: | ||
|
|
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.
请给出维护人的github链接出来
bsp/imxrt/imxrt1021-evk/README.md
Outdated
| \ | / | ||
| - RT - Thread Operating System | ||
| / | \ 3.0.4 build May 2 2018 | ||
| 2006 - 2018 Copyright by rt-thread team |
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.
请更新正确的logo输出信息
|
已修改相应文件并重新commit,请审核。 |
| #define ADC_OVERRUN_IRQ_EN 1 | ||
| #define ADC_FIFO_FLUSH 0 | ||
|
|
||
|
|
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.
文件中不能有2个连续的空行,请删除一行。
| #define ADDA_PR_RDAT 0 | ||
|
|
||
|
|
||
|
|
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.
多余空行删除
| #define R6_REG_PD_PUL0 (R6_REG_PIO_BASE + (3 * 0x24 + 0X1c)) | ||
| #define R6_REG_PD_PUL1 (R6_REG_PIO_BASE + (3 * 0x24 + 0X20)) | ||
|
|
||
|
|
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.
多余空行删除
| #define REG_NDMA_BYTE_CNT (0xc) | ||
| // #define REG_NDMA_PAR (0x300 + 0x1c) | ||
|
|
||
|
|
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.
删除多余空行
misonyo
left a comment
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更新多次,可合并。@BernardXiong
拉取/合并请求描述:(PR description)
以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use web browser to visit PR, and check items one by one, and ticked them if no problem.
当前拉取/合并请求的状态 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