Skip to content

Conversation

@jicheng0622
Copy link
Contributor

@jicheng0622 jicheng0622 commented Mar 11, 2019

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

  1. 新添加对NXP i.MXRT家族LQPF封装的RT1021系列官方开发板RT1021-EVK的BSP包支持;
  2. 参考原版i.MXRT1052 BSP架构做porting;
  3. 在Keil和IAR工程下测试通过UART、SD卡驱动、文件系统和以太网功能;
  4. 更新Readme和SConscript.

以下的内容不应该在提交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):

  • 本拉取/合并请求是一个草稿版本 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 style
  • 没有垃圾代码,代码尽量精简,不包含#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

@@ -0,0 +1,50 @@
/*
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

@misonyo misonyo Mar 11, 2019

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

这个宏判断不需要。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IAR下Flexspi初始化这个功能是过不去的,所以用这个宏让IAR工程屏蔽掉Flexspi初始化。

Copy link
Contributor

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"
Copy link
Contributor

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
Copy link
Contributor

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 */
Copy link
Contributor

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__);
Copy link
Contributor

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;
Copy link
Contributor

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)
Copy link
Contributor

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()并导出到自动初始化。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

改后与原RT1052文件API名字不一致

Copy link
Contributor

Choose a reason for hiding this comment

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

根据新的来哈,现在默认都是rt_hw_xxx_init()

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'
Copy link
Contributor

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的名称

## 5. 联系人信息

维护人:

Copy link
Member

Choose a reason for hiding this comment

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

请给出维护人的github链接出来

\ | /
- RT - Thread Operating System
/ | \ 3.0.4 build May 2 2018
2006 - 2018 Copyright by rt-thread team
Copy link
Member

Choose a reason for hiding this comment

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

请更新正确的logo输出信息

@jicheng0622
Copy link
Contributor Author

已修改相应文件并重新commit,请审核。

#define ADC_OVERRUN_IRQ_EN 1
#define ADC_FIFO_FLUSH 0


Copy link
Contributor

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



Copy link
Contributor

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))


Copy link
Contributor

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)


Copy link
Contributor

Choose a reason for hiding this comment

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

删除多余空行

Copy link
Contributor

@misonyo misonyo left a comment

Choose a reason for hiding this comment

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

PR更新多次,可合并。@BernardXiong

@BernardXiong BernardXiong merged commit f575aaa into RT-Thread:master Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants