From 179d1e99892bff8eb7f350b4031759f72a62f45b Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Fri, 4 May 2018 20:13:20 +0800 Subject: [PATCH] add ATK board support. --- bsp/imxrt1052-evk/Kconfig | 10 +++++++--- bsp/imxrt1052-evk/SConstruct | 5 +++++ bsp/imxrt1052-evk/drivers/drv_uart.c | 16 +++++++++++++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/bsp/imxrt1052-evk/Kconfig b/bsp/imxrt1052-evk/Kconfig index d3fbda5c3c..ee00d1591f 100644 --- a/bsp/imxrt1052-evk/Kconfig +++ b/bsp/imxrt1052-evk/Kconfig @@ -32,7 +32,9 @@ choice config BOARD_RT1050_FIRE bool "RT1050_FIRE" config BOARD_RT1050_ShareBoard - bool "RT1050_ShareBoard" + bool "RT1050_ShareBoard" + config BOARD_RT1050_ATK + bool "RT1050_ATK" endchoice menu "RT1050 Bsp Config" @@ -62,10 +64,12 @@ menu "Select uart drivers" bool "Using uart6" select RT_USING_SERIAL default n +if ! BOARD_RT1050_ATK config RT_USING_UART7 bool "Using uart7" select RT_USING_SERIAL default n +endif config RT_USING_UART8 bool "Using uart8" select RT_USING_SERIAL @@ -328,7 +332,7 @@ menu "Select iic bus drivers" endchoice endmenu - +if ! BOARD_RT1050_ATK menu "Select lcd driver" if RT_USING_LCD && BOARD_RT1050_EVK comment "Notice: Evk Board para: 480*272 4 4 8 2 40 10 106 45" @@ -397,7 +401,7 @@ menu "Select lcd driver" default 45 if (BOARD_RT1050_FIRE || BOARD_RT1050_ShareBoard) depends on RT_USING_LCD endmenu - +endif #menu "Select SDRAM driver" config RT_USING_SDRAM bool "Using sdram" diff --git a/bsp/imxrt1052-evk/SConstruct b/bsp/imxrt1052-evk/SConstruct index fc7e9d11a7..7021727b79 100644 --- a/bsp/imxrt1052-evk/SConstruct +++ b/bsp/imxrt1052-evk/SConstruct @@ -69,3 +69,8 @@ if GetOption('target') and GetDepend('BOARD_RT1050_FIRE'): "JL2CM3": '-U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI-JP0 -JP0 -RST1 -N00("ARM CoreSight SW-DP") -D00(0BD11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FCF000 -FN1 -FF0iMXRT1052_W25Q256JV_By_Fire -FS060000000 -FL02000000', "CMSIS_AGDI": '-X"Any" -UAny -O974 -S9 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(0BD11477) -L00(0) -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FCF000 -FN1 -FF0iMXRT1052_W25Q256JV_By_Fire -FS060000000 -FL02000000', }) +if GetOption('target') and GetDepend('BOARD_RT1050_ATK'): + Update_MDKFlashProgrammingAlgorithm({ + "JL2CM3": '-U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI-JP0 -JP0 -RST1 -N00("ARM CoreSight SW-DP") -D00(0BD11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC8000 -FN1 -FF0MIMXRT105x_QuadSPI_4KB_SEC -FS060000000 -FL0800000', + "CMSIS_AGDI": '-X"Any" -UAny -O974 -S9 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(0BD11477) -L00(0) -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC8000 -FN1 -FF0MIMXRT105x_QuadSPI_4KB_SEC -FS060000000 -FL0800000', + }) diff --git a/bsp/imxrt1052-evk/drivers/drv_uart.c b/bsp/imxrt1052-evk/drivers/drv_uart.c index 346dd66328..a7f54db375 100644 --- a/bsp/imxrt1052-evk/drivers/drv_uart.c +++ b/bsp/imxrt1052-evk/drivers/drv_uart.c @@ -291,7 +291,20 @@ void imxrt_uart_gpio_init(struct imxrt_uart *uart) 0x10B0u); #endif #ifdef RT_USING_UART4 - +#ifdef BOARD_RT1050_ATK + IOMUXC_SetPinMux( + IOMUXC_GPIO_SD_B1_00_LPUART4_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_SD_B1_01_LPUART4_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_SD_B1_00_LPUART4_TX, + 0x10B0u); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_SD_B1_01_LPUART4_RX, + 0x10B0u); +#else IOMUXC_SetPinMux( IOMUXC_GPIO_B1_00_LPUART4_TX, 0U); @@ -305,6 +318,7 @@ void imxrt_uart_gpio_init(struct imxrt_uart *uart) IOMUXC_GPIO_B1_01_LPUART4_RX, 0x10B0u); #endif +#endif #ifdef RT_USING_UART5 IOMUXC_SetPinMux(