From 0ab93e70f09cc925eb914c1825aefdfcadb0091e Mon Sep 17 00:00:00 2001 From: ZYH Date: Fri, 16 Mar 2018 16:02:57 +0800 Subject: [PATCH 01/19] =?UTF-8?q?[Components][USB=20Device]=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8D=8F=E8=AE=AE=E6=A0=88=E5=AF=B9HS=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 增加winusb对HS的支持。其余class还在完善中 --- .vscode/c_cpp_properties.json | 80 +++++++++++++++++++ .../drivers/include/drivers/usb_device.h | 1 + .../drivers/usb/usbdevice/class/winusb.c | 25 +++--- components/drivers/usb/usbdevice/core/core.c | 5 +- 4 files changed, 99 insertions(+), 12 deletions(-) create mode 100644 .vscode/c_cpp_properties.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000000..3234cce49f --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,80 @@ +{ + "configurations": [ + { + "name": "Mac", + "includePath": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "defines": [], + "intelliSenseMode": "clang-x64", + "browse": { + "path": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + }, + "macFrameworkPath": [ + "/System/Library/Frameworks", + "/Library/Frameworks" + ] + }, + { + "name": "Linux", + "includePath": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "defines": [], + "intelliSenseMode": "clang-x64", + "browse": { + "path": [ + "/usr/include", + "/usr/local/include", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + } + }, + { + "name": "Win32", + "includePath": [ + "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/*", + "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/atlmfc/include/*", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt", + "${workspaceRoot}", + "${workspaceRoot}/include", + "${workspaceRoot}/components/drivers/include" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "intelliSenseMode": "msvc-x64", + "browse": { + "path": [ + "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/*", + "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/atlmfc/include/*", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared", + "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt", + "${workspaceRoot}" + ], + "limitSymbolsToIncludedHeaders": true, + "databaseFilename": "" + } + } + ], + "version": 3 +} \ No newline at end of file diff --git a/components/drivers/include/drivers/usb_device.h b/components/drivers/include/drivers/usb_device.h index 48f407cc3d..caa171079b 100644 --- a/components/drivers/include/drivers/usb_device.h +++ b/components/drivers/include/drivers/usb_device.h @@ -140,6 +140,7 @@ struct udcd struct uendpoint ep0; uep0_stage_t stage; struct ep_id* ep_pool; + rt_uint8_t device_is_hs; }; typedef struct udcd* udcd_t; diff --git a/components/drivers/usb/usbdevice/class/winusb.c b/components/drivers/usb/usbdevice/class/winusb.c index 93a3a08e8b..82ac602c85 100644 --- a/components/drivers/usb/usbdevice/class/winusb.c +++ b/components/drivers/usb/usbdevice/class/winusb.c @@ -43,13 +43,14 @@ static struct udevice_descriptor dev_desc = //FS and HS needed static struct usb_qualifier_descriptor dev_qualifier = { - sizeof(dev_qualifier), - USB_DESC_TYPE_DEVICEQUALIFIER, - 0x0200, - 0x00, - 0x00, - 64, - 0x01, + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + 0xFF, //bDeviceClass + 0x00, //bDeviceSubClass + 0x00, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations 0, }; @@ -81,14 +82,14 @@ struct winusb_descriptor _winusb_desc = USB_DESC_TYPE_ENDPOINT, USB_DYNAMIC | USB_DIR_OUT, USB_EP_ATTR_BULK, - 0x40, + USB_DYNAMIC, 0x00, /*endpoint descriptor*/ USB_DESC_LENGTH_ENDPOINT, USB_DESC_TYPE_ENDPOINT, USB_DYNAMIC | USB_DIR_IN, USB_EP_ATTR_BULK, - 0x40, + USB_DYNAMIC, 0x00, }; @@ -197,11 +198,13 @@ static struct ufunction_ops ops = RT_NULL, }; -static rt_err_t _winusb_descriptor_config(winusb_desc_t winusb, rt_uint8_t cintf_nr) +static rt_err_t _winusb_descriptor_config(winusb_desc_t winusb, rt_uint8_t cintf_nr, rt_uint8_t device_is_hs) { #ifdef RT_USB_DEVICE_COMPOSITE winusb->iad_desc.bFirstInterface = cintf_nr; #endif + winusb->ep_out_desc.wMaxPacketSize = device_is_hs ? 512 : 64; + winusb->ep_in_desc.wMaxPacketSize = device_is_hs ? 512 : 64; winusb_func_comp_id_desc.bFirstInterfaceNumber = cintf_nr; return RT_EOK; } @@ -293,7 +296,7 @@ ufunction_t rt_usbd_function_winusb_create(udevice_t device) rt_usbd_altsetting_config_descriptor(winusb_setting, &_winusb_desc, (rt_off_t)&((winusb_desc_t)0)->intf_desc); /* configure the hid interface descriptor */ - _winusb_descriptor_config(winusb_setting->desc, winusb_intf->intf_num); + _winusb_descriptor_config(winusb_setting->desc, winusb_intf->intf_num, device->dcd->device_is_hs); /* create endpoint */ winusb_desc = (winusb_desc_t)winusb_setting->desc; diff --git a/components/drivers/usb/usbdevice/core/core.c b/components/drivers/usb/usbdevice/core/core.c index 57111b6f4a..c8cd362bef 100644 --- a/components/drivers/usb/usbdevice/core/core.c +++ b/components/drivers/usb/usbdevice/core/core.c @@ -166,7 +166,7 @@ static rt_err_t _get_qualifier_descriptor(struct udevice* device, ureq_t setup) RT_ASSERT(device != RT_NULL); RT_ASSERT(setup != RT_NULL); - if(device->dev_qualifier) + if(device->dev_qualifier && device->dcd->device_is_hs) { /* send device qualifier descriptor to endpoint 0 */ rt_usbd_ep0_write(device, (rt_uint8_t*)device->dev_qualifier, @@ -210,6 +210,9 @@ static rt_err_t _get_descriptor(struct udevice* device, ureq_t setup) case USB_DESC_TYPE_DEVICEQUALIFIER: _get_qualifier_descriptor(device, setup); break; + case USB_DESC_TYPE_OTHERSPEED: + _get_config_descriptor(device, setup); + break; default: rt_kprintf("unsupported descriptor request\n"); rt_usbd_ep0_set_stall(device); From b553543b4b666e77b886f7210a98c1008a706aa1 Mon Sep 17 00:00:00 2001 From: ZYH Date: Fri, 16 Mar 2018 16:16:54 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E5=88=A0=E9=99=A4vscode=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/c_cpp_properties.json | 80 ----------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 .vscode/c_cpp_properties.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 3234cce49f..0000000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "configurations": [ - { - "name": "Mac", - "includePath": [ - "/usr/include", - "/usr/local/include", - "${workspaceRoot}" - ], - "defines": [], - "intelliSenseMode": "clang-x64", - "browse": { - "path": [ - "/usr/include", - "/usr/local/include", - "${workspaceRoot}" - ], - "limitSymbolsToIncludedHeaders": true, - "databaseFilename": "" - }, - "macFrameworkPath": [ - "/System/Library/Frameworks", - "/Library/Frameworks" - ] - }, - { - "name": "Linux", - "includePath": [ - "/usr/include", - "/usr/local/include", - "${workspaceRoot}" - ], - "defines": [], - "intelliSenseMode": "clang-x64", - "browse": { - "path": [ - "/usr/include", - "/usr/local/include", - "${workspaceRoot}" - ], - "limitSymbolsToIncludedHeaders": true, - "databaseFilename": "" - } - }, - { - "name": "Win32", - "includePath": [ - "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/*", - "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/atlmfc/include/*", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt", - "${workspaceRoot}", - "${workspaceRoot}/include", - "${workspaceRoot}/components/drivers/include" - ], - "defines": [ - "_DEBUG", - "UNICODE", - "_UNICODE" - ], - "intelliSenseMode": "msvc-x64", - "browse": { - "path": [ - "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/*", - "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/atlmfc/include/*", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared", - "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt", - "${workspaceRoot}" - ], - "limitSymbolsToIncludedHeaders": true, - "databaseFilename": "" - } - } - ], - "version": 3 -} \ No newline at end of file From 5a2df50edd29916213064b2463bbc08a668af5d1 Mon Sep 17 00:00:00 2001 From: liuguang <1004383796@qq.com> Date: Fri, 16 Mar 2018 17:03:20 +0800 Subject: [PATCH 03/19] =?UTF-8?q?[BSP]=20add=20rt1050=20hp=20rtc=20driver.?= =?UTF-8?q?|=20=E6=B7=BB=E5=8A=A0RT1050=20=E9=AB=98=E5=8A=9F=E8=80=97RTC?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/.config | 6 +- bsp/imxrt1052-evk/Kconfig | 16 +-- bsp/imxrt1052-evk/drivers/SConscript | 3 + bsp/imxrt1052-evk/drivers/drv_hp_rtc.c | 150 +++++++++++++++++++++++++ bsp/imxrt1052-evk/drivers/drv_hp_rtc.h | 23 ++++ bsp/imxrt1052-evk/project.uvoptx | 19 +--- bsp/imxrt1052-evk/project.uvprojx | 20 +++- bsp/imxrt1052-evk/rtconfig.h | 6 +- 8 files changed, 215 insertions(+), 28 deletions(-) create mode 100644 bsp/imxrt1052-evk/drivers/drv_hp_rtc.c create mode 100644 bsp/imxrt1052-evk/drivers/drv_hp_rtc.h diff --git a/bsp/imxrt1052-evk/.config b/bsp/imxrt1052-evk/.config index 130d4835b5..badc996951 100644 --- a/bsp/imxrt1052-evk/.config +++ b/bsp/imxrt1052-evk/.config @@ -130,7 +130,9 @@ CONFIG_RT_USING_I2C_BITOPS=y CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set -# CONFIG_RT_USING_RTC is not set +CONFIG_RT_USING_RTC=y +# CONFIG_RT_USING_SOFT_RTC is not set +# CONFIG_RTC_SYNC_USING_NTP is not set CONFIG_RT_USING_SDIO=y # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set @@ -312,5 +314,5 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # CONFIG_PKG_USING_HELLO is not set # CONFIG_PKG_USING_MULTIBUTTON is not set CONFIG_SOC_IMXRT1052=y -CONFIG_RT_USING_UART=y CONFIG_RT_USING_UART1=y +CONFIG_RT_USING_HP_RTC=y diff --git a/bsp/imxrt1052-evk/Kconfig b/bsp/imxrt1052-evk/Kconfig index 0a15061526..8bfb1e2589 100644 --- a/bsp/imxrt1052-evk/Kconfig +++ b/bsp/imxrt1052-evk/Kconfig @@ -23,13 +23,15 @@ config SOC_IMXRT1052 select ARCH_ARM_CORTEX_M7 default y -config RT_USING_UART - bool "Using RT_USING_UART" - default y - -if RT_USING_UART +if RT_USING_SERIAL config RT_USING_UART1 bool "Using RT_USING_UART1" - default y + default y endif - + +if RT_USING_RTC +config RT_USING_HP_RTC + bool "Using RT_USING_HP_RTC" + default n +endif + diff --git a/bsp/imxrt1052-evk/drivers/SConscript b/bsp/imxrt1052-evk/drivers/SConscript index 4025fb6fbc..6ab68c0ea4 100644 --- a/bsp/imxrt1052-evk/drivers/SConscript +++ b/bsp/imxrt1052-evk/drivers/SConscript @@ -18,6 +18,9 @@ CPPDEFINES = [] if GetDepend('RT_USING_PIN'): src += ['drv_pin.c'] +if GetDepend('RT_USING_HP_RTC'): + src += ['drv_hp_rtc.c'] + if GetDepend('RT_USING_LWIP'): src += ['drv_eth.c', 'fsl_phy.c'] CPPDEFINES += ['FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE'] diff --git a/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c new file mode 100644 index 0000000000..29093e0eb8 --- /dev/null +++ b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.c @@ -0,0 +1,150 @@ +/* + * File : drv_hp_rtc.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006-2013, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2018-03-15 Liuguang the first version. + */ +#include "drv_hp_rtc.h" +#include +#include "fsl_common.h" +#include "fsl_snvs_hp.h" +#include "fsl_snvs_lp.h" + +#ifdef RT_USING_RTC + +#if defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL + #error "Please don't define 'FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL'!" +#endif + +static time_t get_timestamp(void) +{ + struct tm tm_new = {0}; + snvs_hp_rtc_datetime_t rtcDate; + + SNVS_HP_RTC_GetDatetime(SNVS, &rtcDate); + + tm_new.tm_sec = rtcDate.second; + tm_new.tm_min = rtcDate.minute; + tm_new.tm_hour = rtcDate.hour; + + tm_new.tm_mday = rtcDate.day; + tm_new.tm_mon = rtcDate.month - 1; + tm_new.tm_year = rtcDate.year - 1900; + + return mktime(&tm_new); +} + +static int set_timestamp(time_t timestamp) +{ + struct tm *p_tm; + snvs_hp_rtc_datetime_t rtcDate; + + p_tm = localtime(×tamp); + + rtcDate.second = p_tm->tm_sec ; + rtcDate.minute = p_tm->tm_min ; + rtcDate.hour = p_tm->tm_hour; + + rtcDate.day = p_tm->tm_mday; + rtcDate.month = p_tm->tm_mon + 1; + rtcDate.year = p_tm->tm_year + 1900; + + SNVS_HP_RTC_SetDatetime(SNVS, &rtcDate); + + return RT_EOK; +} + +/* ӿ */ +static rt_err_t rt1052_hp_rtc_init(rt_device_t dev) +{ + snvs_hp_rtc_config_t snvsRtcConfig; + + SNVS_HP_RTC_GetDefaultConfig(&snvsRtcConfig); + SNVS_HP_RTC_Init(SNVS, &snvsRtcConfig); + + SNVS_HP_RTC_StartTimer(SNVS); + + return RT_EOK; +} + +static rt_err_t rt1052_hp_rtc_open(rt_device_t dev, rt_uint16_t oflag) +{ + return RT_EOK; +} + +static rt_err_t rt1052_hp_rtc_close(rt_device_t dev) +{ + return RT_EOK; +} + +static rt_size_t rt1052_hp_rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size) +{ + return 0; +} + +static rt_size_t rt1052_hp_rtc_write(rt_device_t dev, rt_off_t pos, const void* buffer, rt_size_t size) +{ + return 0; +} + +static rt_err_t rt1052_hp_rtc_control(rt_device_t dev, int cmd, void *args) +{ + RT_ASSERT(dev != RT_NULL); + + switch(cmd) + { + case RT_DEVICE_CTRL_RTC_GET_TIME: + { + *(uint32_t *)args = get_timestamp(); + } + break; + + case RT_DEVICE_CTRL_RTC_SET_TIME: + { + set_timestamp(*(time_t *)args); + } + break; + + /* Ч */ + default: + return RT_EINVAL; + } + + return RT_EOK; +} + +static struct rt_device device = +{ + .type = RT_Device_Class_RTC, + .init = rt1052_hp_rtc_init, + .open = rt1052_hp_rtc_open, + .close = rt1052_hp_rtc_close, + .read = rt1052_hp_rtc_read, + .write = rt1052_hp_rtc_write, + .control = rt1052_hp_rtc_control, +}; + +int rt_hw_hp_rtc_init(void) +{ + rt_err_t ret = RT_EOK; + + ret = rt_device_register(&device, "rtc", RT_DEVICE_FLAG_RDWR); + if(ret != RT_EOK) + { + return ret; + } + + rt_device_open(&device, RT_DEVICE_OFLAG_RDWR); + + return RT_EOK; +} +INIT_DEVICE_EXPORT(rt_hw_hp_rtc_init); + +#endif /*RT_USING_RTC */ diff --git a/bsp/imxrt1052-evk/drivers/drv_hp_rtc.h b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.h new file mode 100644 index 0000000000..e191e4714c --- /dev/null +++ b/bsp/imxrt1052-evk/drivers/drv_hp_rtc.h @@ -0,0 +1,23 @@ +/* + * File : drv_hp_rtc.h + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006-2013, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2018-03-15 Liuguang the first version. + */ + +#ifndef __DRV_RTC_H__ +#define __DRV_RTC_H__ + +#include +#include + +int rt_hw_hp_rtc_init(void); + +#endif diff --git a/bsp/imxrt1052-evk/project.uvoptx b/bsp/imxrt1052-evk/project.uvoptx index deca1cf444..f28e56931b 100644 --- a/bsp/imxrt1052-evk/project.uvoptx +++ b/bsp/imxrt1052-evk/project.uvoptx @@ -73,7 +73,7 @@ 0 - 0 + 1 0 1 @@ -101,9 +101,7 @@ 0 0 1 - 0 - 0 - 3 + 2 @@ -166,16 +164,11 @@ 0 + + + 0 0 - 0 - - - - - - - - + 0 diff --git a/bsp/imxrt1052-evk/project.uvprojx b/bsp/imxrt1052-evk/project.uvprojx index 40d5d8b5d7..baf0a744f4 100644 --- a/bsp/imxrt1052-evk/project.uvprojx +++ b/bsp/imxrt1052-evk/project.uvprojx @@ -8,13 +8,11 @@ 0x4 ARM-ADS 5060528::V5.06 update 5 (build 528)::ARMCC - 0 MIMXRT1052:M7 NXP - NXP.iMXRT_DFP.1.0.2 - http://mcuxpresso.nxp.com/cmsis_pack/repo/ + NXP.iMXRT_DFP.1.0.1 IRAM(0x20000000,0x00060000) IRAM2(0x00000000,0x00020000) CPUTYPE("Cortex-M7") FPU3(SFPU) CLOCK(12000000) ELITTLE @@ -333,7 +331,7 @@ --library_interface=armcc --library_type=standardlib --diag_suppress=66,1296,186 SKIP_SYSCLK_INIT, CPU_MIMXRT1052DVL6A, FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1, EVK_MCIMXRM, FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE, RT_USING_ARM_LIBC - applications;.;drivers;Libraries;Libraries\drivers;Libraries\utilities;Libraries\CMSIS\Include;..\..\include;..\..\libcpu\arm\cortex-m7;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\net\lwip-2.0.2\src;..\..\components\net\lwip-2.0.2\src\include;..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\components\net\lwip-2.0.2\src\arch\include;..\..\components\net\lwip-2.0.2\src\include\netif;..\..\components\net\lwip-2.0.2\src\include\posix + applications;.;drivers;Libraries;Libraries\drivers;Libraries\utilities;Libraries\CMSIS\Include;..\..\include;..\..\libcpu\arm\cortex-m7;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\net\lwip-2.0.2\src;..\..\components\net\lwip-2.0.2\src\include;..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\components\net\lwip-2.0.2\src\arch\include;..\..\components\net\lwip-2.0.2\src\include\netif;..\..\components\net\lwip-2.0.2\src\include\posix @@ -442,6 +440,13 @@ drivers\drv_pin.c + + + drv_hp_rtc.c + 1 + drivers\drv_hp_rtc.c + + drv_eth.c @@ -1115,6 +1120,13 @@ ..\..\components\drivers\misc\pin.c + + + rtc.c + 1 + ..\..\components\drivers\rtc\rtc.c + + block_dev.c diff --git a/bsp/imxrt1052-evk/rtconfig.h b/bsp/imxrt1052-evk/rtconfig.h index b04305f7b9..664aeb5458 100644 --- a/bsp/imxrt1052-evk/rtconfig.h +++ b/bsp/imxrt1052-evk/rtconfig.h @@ -121,7 +121,9 @@ #define RT_USING_PIN /* RT_USING_MTD_NOR is not set */ /* RT_USING_MTD_NAND is not set */ -/* RT_USING_RTC is not set */ +#define RT_USING_RTC +/* RT_USING_SOFT_RTC is not set */ +/* RTC_SYNC_USING_NTP is not set */ #define RT_USING_SDIO /* RT_USING_SPI is not set */ /* RT_USING_WDT is not set */ @@ -277,7 +279,7 @@ /* PKG_USING_HELLO is not set */ /* PKG_USING_MULTIBUTTON is not set */ #define SOC_IMXRT1052 -#define RT_USING_UART #define RT_USING_UART1 +#define RT_USING_HP_RTC #endif From 0dd4854dc795faf020463f99f08524a099277fe0 Mon Sep 17 00:00:00 2001 From: liuguang <1004383796@qq.com> Date: Fri, 16 Mar 2018 17:22:55 +0800 Subject: [PATCH 04/19] =?UTF-8?q?[BSP]=20fix=20uart=20driver=20bug.=20|=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=B2=E5=8F=A3=E9=A9=B1=E5=8A=A8BUG.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/drivers/usart.c | 4 ++-- bsp/imxrt1052-evk/drivers/usart.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/usart.c b/bsp/imxrt1052-evk/drivers/usart.c index 68c0f500ee..65a480a199 100644 --- a/bsp/imxrt1052-evk/drivers/usart.c +++ b/bsp/imxrt1052-evk/drivers/usart.c @@ -18,7 +18,7 @@ #include "fsl_lpuart.h" #include "fsl_iomuxc.h" -#ifdef RT_USING_UART +#ifdef RT_USING_SERIAL #if !defined(RT_USING_UART0) && !defined(RT_USING_UART1) && \ !defined(RT_USING_UART2) && !defined(RT_USING_UART3) && \ @@ -380,4 +380,4 @@ int imxrt_hw_usart_init(void) } INIT_BOARD_EXPORT(imxrt_hw_usart_init); -#endif /*RT_USING_UART*/ +#endif /*RT_USING_SERIAL */ diff --git a/bsp/imxrt1052-evk/drivers/usart.h b/bsp/imxrt1052-evk/drivers/usart.h index abd7631fee..5cc02fb430 100644 --- a/bsp/imxrt1052-evk/drivers/usart.h +++ b/bsp/imxrt1052-evk/drivers/usart.h @@ -9,7 +9,7 @@ * * Change Logs: * Date Author Notes - * 2013-11-15 bright the first version + * 2017-10-10 Tanek the first version */ #ifndef __USART_H__ From 5035662cd95d9fae90d31608329f31fac3a67362 Mon Sep 17 00:00:00 2001 From: ZYH Date: Fri, 16 Mar 2018 18:36:14 +0800 Subject: [PATCH 05/19] =?UTF-8?q?[Components][USB=20Device]=E5=90=84?= =?UTF-8?q?=E4=B8=AAclass=E5=AF=B9HS=E8=BF=9B=E8=A1=8C=E4=BA=86=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分class还不支持HS,RNDIS存在暂时无法解决的已知bug --- .../drivers/usb/usbdevice/class/cdc_vcom.c | 19 ++++++----- components/drivers/usb/usbdevice/class/ecm.c | 30 +++++++++------- components/drivers/usb/usbdevice/class/hid.c | 22 +++++++----- .../drivers/usb/usbdevice/class/mstorage.c | 30 +++++++++------- .../drivers/usb/usbdevice/class/rndis.c | 34 ++++++++++--------- 5 files changed, 76 insertions(+), 59 deletions(-) diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c index b8728beac5..c4985f04a2 100644 --- a/components/drivers/usb/usbdevice/class/cdc_vcom.c +++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c @@ -114,15 +114,17 @@ static struct udevice_descriptor dev_desc = USB_DYNAMIC, //bNumConfigurations; }; +//FS and HS needed static struct usb_qualifier_descriptor dev_qualifier = { - sizeof(dev_qualifier), - USB_DESC_TYPE_DEVICEQUALIFIER, - 0x0200, - USB_CLASS_CDC, - 0x00, - 64, - 0x01, + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + USB_CLASS_CDC, //bDeviceClass + 0x00, //bDeviceSubClass + 0x00, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations 0, }; @@ -566,7 +568,8 @@ ufunction_t rt_usbd_function_cdc_create(udevice_t device) /* create a cdc function */ func = rt_usbd_function_new(device, &dev_desc, &ops); - rt_usbd_device_set_qualifier(device, &dev_qualifier); + //not support HS + //rt_usbd_device_set_qualifier(device, &dev_qualifier); /* allocate memory for cdc vcom data */ data = (struct vcom*)rt_malloc(sizeof(struct vcom)); diff --git a/components/drivers/usb/usbdevice/class/ecm.c b/components/drivers/usb/usbdevice/class/ecm.c index 4a45bc0939..0e38356dda 100644 --- a/components/drivers/usb/usbdevice/class/ecm.c +++ b/components/drivers/usb/usbdevice/class/ecm.c @@ -41,7 +41,7 @@ struct rt_ecm_eth rt_uint8_t dev_addr[MAX_ADDR_LEN]; ALIGN(4) - rt_uint8_t rx_pool[64]; + rt_uint8_t rx_pool[512]; ALIGN(4) rt_size_t rx_size; ALIGN(4) @@ -147,14 +147,14 @@ const static struct ucdc_data_descriptor _data_desc = USB_DESC_TYPE_ENDPOINT, USB_DIR_OUT | USB_DYNAMIC, USB_EP_ATTR_BULK, - USB_CDC_BUFSIZE, + USB_DYNAMIC, 0x00, /* endpoint, bulk in */ USB_DESC_LENGTH_ENDPOINT, USB_DESC_TYPE_ENDPOINT, USB_DYNAMIC | USB_DIR_IN, USB_EP_ATTR_BULK, - USB_CDC_BUFSIZE, + USB_DYNAMIC, 0x00, }; @@ -170,17 +170,20 @@ const static char* _ustring[] = }; ALIGN(4) +//FS and HS needed static struct usb_qualifier_descriptor dev_qualifier = { - sizeof(dev_qualifier), - USB_DESC_TYPE_DEVICEQUALIFIER, - 0x0200, - USB_CLASS_CDC, - 0x00, - 64, - 0x01, + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + USB_CLASS_CDC, //bDeviceClass + USB_CDC_SUBCLASS_ETH, //bDeviceSubClass + USB_CDC_PROTOCOL_NONE, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations 0, }; + static rt_err_t _cdc_send_notifi(ufunction_t func,ucdc_notification_code_t notifi,rt_uint16_t wValue,rt_uint16_t wLength) { static struct ucdc_management_element_notifications _notifi; @@ -472,7 +475,7 @@ static struct ufunction_ops ops = * * @return RT_EOK on successful. */ -static rt_err_t _cdc_descriptor_config(ucdc_comm_desc_t comm, rt_uint8_t cintf_nr, ucdc_data_desc_t data, rt_uint8_t dintf_nr) +static rt_err_t _cdc_descriptor_config(ucdc_comm_desc_t comm, rt_uint8_t cintf_nr, ucdc_data_desc_t data, rt_uint8_t dintf_nr, rt_uint8_t device_is_hs) { comm->call_mgmt_desc.data_interface = dintf_nr; comm->union_desc.master_interface = cintf_nr; @@ -480,7 +483,8 @@ static rt_err_t _cdc_descriptor_config(ucdc_comm_desc_t comm, rt_uint8_t cintf_n #ifdef RT_USB_DEVICE_COMPOSITE comm->iad_desc.bFirstInterface = cintf_nr; #endif - + data->ep_out_desc.wMaxPacketSize = device_is_hs ? 512 : 64; + data->ep_in_desc.wMaxPacketSize = device_is_hs ? 512 : 64; return RT_EOK; } @@ -532,7 +536,7 @@ ufunction_t rt_usbd_function_ecm_create(udevice_t device) (rt_off_t)&((ucdc_eth_desc_t)0)->intf_desc); rt_usbd_altsetting_config_descriptor(data_setting, &_data_desc, 0); /* configure the cdc interface descriptor */ - _cdc_descriptor_config(comm_setting->desc, intf_comm->intf_num, data_setting->desc, intf_data->intf_num); + _cdc_descriptor_config(comm_setting->desc, intf_comm->intf_num, data_setting->desc, intf_data->intf_num, device->dcd->device_is_hs); /* create a command endpoint */ comm_desc = (ucdc_eth_desc_t)comm_setting->desc; diff --git a/components/drivers/usb/usbdevice/class/hid.c b/components/drivers/usb/usbdevice/class/hid.c index 0b44456b8f..b752564974 100644 --- a/components/drivers/usb/usbdevice/class/hid.c +++ b/components/drivers/usb/usbdevice/class/hid.c @@ -227,18 +227,21 @@ static struct udevice_descriptor _dev_desc = USB_DYNAMIC, //bNumConfigurations; }; -static struct usb_qualifier_descriptor _dev_qualifier = +//FS and HS needed +static struct usb_qualifier_descriptor dev_qualifier = { - sizeof(_dev_qualifier), - USB_DESC_TYPE_DEVICEQUALIFIER, - 0x0200, - USB_CLASS_HID, - 0x00, - 64, - 0x01, + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + USB_CLASS_MASS_STORAGE, //bDeviceClass + 0x06, //bDeviceSubClass + 0x50, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations 0, }; + /* hid interface descriptor */ const static struct uhid_comm_descriptor _hid_comm_desc = { @@ -631,7 +634,8 @@ ufunction_t rt_usbd_function_hid_create(udevice_t device) /* create a cdc function */ func = rt_usbd_function_new(device, &_dev_desc, &ops); - rt_usbd_device_set_qualifier(device, &_dev_qualifier); + //not support hs + //rt_usbd_device_set_qualifier(device, &_dev_qualifier); /* allocate memory for cdc vcom data */ data = (struct hid_s*)rt_malloc(sizeof(struct hid_s)); diff --git a/components/drivers/usb/usbdevice/class/mstorage.c b/components/drivers/usb/usbdevice/class/mstorage.c index d4caf44166..14284e85a2 100644 --- a/components/drivers/usb/usbdevice/class/mstorage.c +++ b/components/drivers/usb/usbdevice/class/mstorage.c @@ -88,8 +88,8 @@ static struct udevice_descriptor dev_desc = USB_DESC_TYPE_DEVICE, //type; USB_BCD_VERSION, //bcdUSB; USB_CLASS_MASS_STORAGE, //bDeviceClass; - 0x00, //bDeviceSubClass; - 0x00, //bDeviceProtocol; + 0x06, //bDeviceSubClass; + 0x50, //bDeviceProtocol; 0x40, //bMaxPacketSize0; _VENDOR_ID, //idVendor; _PRODUCT_ID, //idProduct; @@ -100,15 +100,17 @@ static struct udevice_descriptor dev_desc = USB_DYNAMIC, //bNumConfigurations; }; +//FS and HS needed static struct usb_qualifier_descriptor dev_qualifier = { - sizeof(dev_qualifier), - USB_DESC_TYPE_DEVICEQUALIFIER, - 0x0200, - USB_CLASS_MASS_STORAGE, - 0x00, - 64, - 0x01, + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + USB_CLASS_MASS_STORAGE, //bDeviceClass + 0x06, //bDeviceSubClass + 0x50, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations 0, }; @@ -141,14 +143,14 @@ const static struct umass_descriptor _mass_desc = USB_DESC_TYPE_ENDPOINT, //type; USB_DYNAMIC | USB_DIR_OUT, //bEndpointAddress; USB_EP_ATTR_BULK, //bmAttributes; - 0x40, //wMaxPacketSize; + USB_DYNAMIC, //wMaxPacketSize; 0x00, //bInterval; USB_DESC_LENGTH_ENDPOINT, //bLength; USB_DESC_TYPE_ENDPOINT, //type; USB_DYNAMIC | USB_DIR_IN, //bEndpointAddress; USB_EP_ATTR_BULK, //bmAttributes; - 0x40, //wMaxPacketSize; + USB_DYNAMIC, //wMaxPacketSize; 0x00, //bInterval; }; @@ -1043,11 +1045,13 @@ static struct ufunction_ops ops = _function_disable, RT_NULL, }; -static rt_err_t _mstorage_descriptor_config(umass_desc_t desc, rt_uint8_t cintf_nr) +static rt_err_t _mstorage_descriptor_config(umass_desc_t desc, rt_uint8_t cintf_nr, rt_uint8_t device_is_hs) { #ifdef RT_USB_DEVICE_COMPOSITE desc->iad_desc.bFirstInterface = cintf_nr; #endif + desc->ep_out_desc.wMaxPacketSize = device_is_hs ? 512 : 64; + desc->ep_in_desc.wMaxPacketSize = device_is_hs ? 512 : 64; return RT_EOK; } /** @@ -1090,7 +1094,7 @@ ufunction_t rt_usbd_function_mstorage_create(udevice_t device) rt_usbd_altsetting_config_descriptor(setting, &_mass_desc, (rt_off_t)&((umass_desc_t)0)->intf_desc); /* configure the msc interface descriptor */ - _mstorage_descriptor_config(setting->desc, intf->intf_num); + _mstorage_descriptor_config(setting->desc, intf->intf_num, device->dcd->device_is_hs); /* create a bulk out and a bulk in endpoint */ mass_desc = (umass_desc_t)setting->desc; diff --git a/components/drivers/usb/usbdevice/class/rndis.c b/components/drivers/usb/usbdevice/class/rndis.c index a7f36dccb6..670c7686b4 100644 --- a/components/drivers/usb/usbdevice/class/rndis.c +++ b/components/drivers/usb/usbdevice/class/rndis.c @@ -58,9 +58,9 @@ struct rt_rndis_eth #endif /* RNDIS_DELAY_LINK_UP */ ALIGN(4) - rt_uint8_t rx_pool[64]; + rt_uint8_t rx_pool[512]; ALIGN(4) - rt_uint8_t tx_pool[64]; + rt_uint8_t tx_pool[512]; rt_uint32_t cmd_pool[2]; ALIGN(4) @@ -175,14 +175,14 @@ const static struct ucdc_data_descriptor _data_desc = USB_DESC_TYPE_ENDPOINT, USB_DIR_OUT | USB_DYNAMIC, USB_EP_ATTR_BULK, - USB_CDC_BUFSIZE, + USB_DYNAMIC, 0x00, /* endpoint, bulk in */ USB_DESC_LENGTH_ENDPOINT, USB_DESC_TYPE_ENDPOINT, USB_DYNAMIC | USB_DIR_IN, USB_EP_ATTR_BULK, - USB_CDC_BUFSIZE, + USB_DYNAMIC, 0x00, }; @@ -206,16 +206,17 @@ struct usb_os_function_comp_id_descriptor rndis_func_comp_id_desc = .subCompatibleID = {'5', '1', '6', '2', '0', '0', '1', 0x00}, .reserved2 = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; -ALIGN(4) +//FS and HS needed static struct usb_qualifier_descriptor dev_qualifier = { - sizeof(dev_qualifier), - USB_DESC_TYPE_DEVICEQUALIFIER, - 0x0200, - USB_CLASS_CDC, - 0x00, - 64, - 0x01, + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + USB_CLASS_CDC, //bDeviceClass + USB_CDC_SUBCLASS_ACM, //bDeviceSubClass + USB_CDC_PROTOCOL_VENDOR, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations 0, }; @@ -401,7 +402,7 @@ static rt_err_t _rndis_query_response(ufunction_t func,rndis_query_msg_t msg) case OID_GEN_LINK_SPEED: resp = _create_resp(4); if(resp == RT_NULL) break; - _set_resp(resp, (10UL * 1000 * 1000) / 100); + _set_resp(resp, func->device->dcd->device_is_hs ? (480UL * 1000 *1000) : (12UL * 1000 * 1000) / 100); break; case OID_GEN_MEDIA_CONNECT_STATUS: @@ -1008,7 +1009,7 @@ static struct ufunction_ops ops = * * @return RT_EOK on successful. */ -static rt_err_t _cdc_descriptor_config(ucdc_comm_desc_t comm, rt_uint8_t cintf_nr, ucdc_data_desc_t data, rt_uint8_t dintf_nr) +static rt_err_t _cdc_descriptor_config(ucdc_comm_desc_t comm, rt_uint8_t cintf_nr, ucdc_data_desc_t data, rt_uint8_t dintf_nr, rt_uint8_t device_is_hs) { comm->call_mgmt_desc.data_interface = dintf_nr; comm->union_desc.master_interface = cintf_nr; @@ -1016,7 +1017,8 @@ static rt_err_t _cdc_descriptor_config(ucdc_comm_desc_t comm, rt_uint8_t cintf_n #ifdef RT_USB_DEVICE_COMPOSITE comm->iad_desc.bFirstInterface = cintf_nr; #endif - + data->ep_out_desc.wMaxPacketSize = device_is_hs ? 512 : 64; + data->ep_in_desc.wMaxPacketSize = device_is_hs ? 512 : 64; return RT_EOK; } @@ -1237,7 +1239,7 @@ ufunction_t rt_usbd_function_rndis_create(udevice_t device) (rt_off_t)&((ucdc_comm_desc_t)0)->intf_desc); rt_usbd_altsetting_config_descriptor(data_setting, &_data_desc, 0); /* configure the cdc interface descriptor */ - _cdc_descriptor_config(comm_setting->desc, intf_comm->intf_num, data_setting->desc, intf_data->intf_num); + _cdc_descriptor_config(comm_setting->desc, intf_comm->intf_num, data_setting->desc, intf_data->intf_num, device->dcd->device_is_hs); /* create a command endpoint */ comm_desc = (ucdc_comm_desc_t)comm_setting->desc; From 7262ab7364d4c326d10848e17ed0621d1a6e27a8 Mon Sep 17 00:00:00 2001 From: ZYH Date: Fri, 16 Mar 2018 18:40:07 +0800 Subject: [PATCH 06/19] =?UTF-8?q?[Components][USB=20Device]=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A4=8D=E5=90=88=E8=AE=BE=E5=A4=87=E5=AF=B9HS?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/usb/usbdevice/core/usbdevice.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/drivers/usb/usbdevice/core/usbdevice.c b/components/drivers/usb/usbdevice/core/usbdevice.c index 10ffac8ad0..453084990b 100644 --- a/components/drivers/usb/usbdevice/core/usbdevice.c +++ b/components/drivers/usb/usbdevice/core/usbdevice.c @@ -59,6 +59,20 @@ static struct udevice_descriptor compsit_desc = USB_STRING_SERIAL_INDEX, //iSerialNumber; USB_DYNAMIC, //bNumConfigurations; }; + +//FS and HS needed +static struct usb_qualifier_descriptor dev_qualifier = +{ + sizeof(dev_qualifier), //bLength + USB_DESC_TYPE_DEVICEQUALIFIER, //bDescriptorType + 0x0200, //bcdUSB + USB_CLASS_MISC, //bDeviceClass + 0x02, //bDeviceSubClass + 0x01, //bDeviceProtocol + 64, //bMaxPacketSize0 + 0x01, //bNumConfigurations + 0, +}; #endif struct usb_os_comp_id_descriptor usb_comp_id_desc = @@ -169,6 +183,7 @@ rt_err_t rt_usb_device_init(void) #ifdef RT_USB_DEVICE_COMPOSITE rt_usbd_device_set_descriptor(udevice, &compsit_desc); rt_usbd_device_set_string(udevice, ustring); + rt_usbd_device_set_qualifier(device, &dev_qualifier); #else rt_usbd_device_set_descriptor(udevice, func->dev_desc); #endif From 5c0345e2f80232a7437ce6522cb34a5d04d62160 Mon Sep 17 00:00:00 2001 From: liang yongxiang Date: Sun, 18 Mar 2018 00:43:55 +0800 Subject: [PATCH 07/19] [bsp][lpc824] fixed error: incomplete type is not allowed --- bsp/lpc824/rtconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/lpc824/rtconfig.h b/bsp/lpc824/rtconfig.h index b51d38aa9a..1426427b8d 100644 --- a/bsp/lpc824/rtconfig.h +++ b/bsp/lpc824/rtconfig.h @@ -80,7 +80,7 @@ // // Using Mutex // Using Mutex -//#define RT_USING_MUTEX +#define RT_USING_MUTEX // // Using Event // Using Event From 0cbd9dc8bf9cc062aedb21e14f74c9602cfae4a0 Mon Sep 17 00:00:00 2001 From: balanceTWK Date: Sun, 18 Mar 2018 15:01:32 +0800 Subject: [PATCH 08/19] add drv_uart.c drv_uart.h --- bsp/imxrt1052-evk/drivers/drv_uart.c | 569 +++++++++++++++++++++++++++ bsp/imxrt1052-evk/drivers/drv_uart.h | 23 ++ 2 files changed, 592 insertions(+) create mode 100644 bsp/imxrt1052-evk/drivers/drv_uart.c create mode 100644 bsp/imxrt1052-evk/drivers/drv_uart.h diff --git a/bsp/imxrt1052-evk/drivers/drv_uart.c b/bsp/imxrt1052-evk/drivers/drv_uart.c new file mode 100644 index 0000000000..b3f9db685c --- /dev/null +++ b/bsp/imxrt1052-evk/drivers/drv_uart.c @@ -0,0 +1,569 @@ +/* + * File : drv_uart.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006-2013, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2017-10-10 Tanek the first version + * 2018-03-17 laiyiketang Add other uart. + */ +#include +#include "drv_usart.h" + +#include "fsl_common.h" +#include "fsl_lpuart.h" +#include "fsl_iomuxc.h" + +#ifdef RT_USING_SERIAL + +/* GPIOʱӻLPUART_InitԶ, º򲻻Զ */ +#if defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL +#error "Please don't define 'FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL'!" +#endif + +#if !defined(RT_USING_UART1) && !defined(RT_USING_UART2) && \ + !defined(RT_USING_UART3) && !defined(RT_USING_UART4) && \ + !defined(RT_USING_UART5) && !defined(RT_USING_UART6) && \ + !defined(RT_USING_UART7) && !defined(RT_USING_UART8) +#error "Please define at least one UARTx" + +#endif + + + +#include + +/* imxrt uart driver */ +struct imxrt_uart +{ + LPUART_Type * uart_base; + IRQn_Type irqn; + + struct rt_serial_device * serial; + char *device_name; +}; + +static void uart_isr(struct rt_serial_device *serial); + +#if defined(RT_USING_UART1) +struct rt_serial_device serial1; + +void LPUART1_IRQHandler(void) +{ + uart_isr(&serial1); +} + +#endif /* RT_USING_UART1 */ + +#if defined(RT_USING_UART2) +struct rt_serial_device serial2; + +void USART2_IRQHandler(void) +{ + uart_isr(&serial2); +} + +#endif /* RT_USING_UART2 */ + +#if defined(RT_USING_UART3) +struct rt_serial_device serial3; + +void UART3_IRQHandler(void) +{ + uart_isr(&serial3); +} + +#endif /* RT_USING_UART3 */ + +#if defined(RT_USING_UART4) +struct rt_serial_device serial4; + +void UART4_IRQHandler(void) +{ + uart_isr(&serial4); +} +#endif /* RT_USING_UART4 */ + +#if defined(RT_USING_UART5) +struct rt_serial_device serial5; + +void USART5_IRQHandler(void) +{ + uart_isr(&serial5); +} + +#endif /* RT_USING_UART5 */ + +#if defined(RT_USING_UART6) +struct rt_serial_device serial6; + +void UART6_IRQHandler(void) +{ + uart_isr(&serial6); +} + +#endif /* RT_USING_UART6 */ + +#if defined(RT_USING_UART7) +struct rt_serial_device serial7; + +void UART7_IRQHandler(void) +{ + uart_isr(&serial7); +} + +#endif /* RT_USING_UART7 */ + +#if defined(RT_USING_UART8) +struct rt_serial_device serial8; + +void UART8_IRQHandler(void) +{ + uart_isr(&serial8); +} + +#endif /* RT_USING_UART8 */ + +static const struct imxrt_uart uarts[] = { +#ifdef RT_USING_UART1 + { + LPUART1, + LPUART1_IRQn, + &serial1, + "uart1", + }, +#endif +#ifdef RT_USING_UART2 + { + LPUART2, + LPUART2_IRQn, + &serial2, + "uart2", + }, +#endif +#ifdef RT_USING_UART3 + { + LPUART3, + LPUART3_IRQn, + &serial3, + "uart3", + }, +#endif +#ifdef RT_USING_UART4 + { + LPUART4, + LPUART4_IRQn, + &serial4, + "uart4", + }, +#endif +#ifdef RT_USING_UART5 + { + LPUART5, + LPUART5_IRQn, + &serial5, + "uart5", + }, +#endif +#ifdef RT_USING_UART6 + { + LPUART6, + LPUART6_IRQn, + &serial6, + "uart6", + }, +#endif +#ifdef RT_USING_UART7 + { + LPUART7, + LPUART7_IRQn, + &serial7, + "uart7", + }, +#endif +#ifdef RT_USING_UART8 + { + LPUART8, + LPUART8_IRQn, + &serial8, + "uart8", + }, +#endif + +}; + +/* Get debug console frequency. */ +uint32_t BOARD_DebugConsoleSrcFreq(void) +{ + uint32_t freq; + + /* To make it simple, we assume default PLL and divider settings, and the only variable + from application is use PLL3 source or OSC source */ + if (CLOCK_GetMux(kCLOCK_UartMux) == 0) /* PLL3 div6 80M */ + { + freq = (CLOCK_GetPllFreq(kCLOCK_PllUsb1) / 6U) / (CLOCK_GetDiv(kCLOCK_UartDiv) + 1U); + } + else + { + freq = CLOCK_GetOscFreq() / (CLOCK_GetDiv(kCLOCK_UartDiv) + 1U); + } + + return freq; +} + + +/** +* @brief UART MSP Initialization +* This function configures the hardware resources used in this example: +* - Peripheral's clock enable +* - Peripheral's GPIO Configuration +* - NVIC configuration for UART interrupt request enable +* @param huart: UART handle pointer +* @retval None +*/ +void imxrt_uart_gpio_init(struct imxrt_uart *uart) +{ + if (uart->uart_base != RT_NULL) + { +#ifdef RT_USING_UART1 + CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */ + + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 is configured as LPUART1_TX */ + 0U); /* Software Input On Field: Input Path is determined by functionality */ + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 is configured as LPUART1_RX */ + 0U); /* Software Input On Field: Input Path is determined by functionality */ + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 PAD functional properties : */ + 0x10B0u); /* Slew Rate Field: Slow Slew Rate + Drive Strength Field: R0/6 + Speed Field: medium(100MHz) + Open Drain Enable Field: Open Drain Disabled + Pull / Keep Enable Field: Pull/Keeper Enabled + Pull / Keep Select Field: Keeper + Pull Up / Down Config. Field: 100K Ohm Pull Down + Hyst. Enable Field: Hysteresis Disabled */ + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 PAD functional properties : */ + 0x10B0u); /* Slew Rate Field: Slow Slew Rate + Drive Strength Field: R0/6 + Speed Field: medium(100MHz) + Open Drain Enable Field: Open Drain Disabled + Pull / Keep Enable Field: Pull/Keeper Enabled + Pull / Keep Select Field: Keeper + Pull Up / Down Config. Field: 100K Ohm Pull Down + Hyst. Enable Field: Hysteresis Disabled */ +#endif +#ifdef RT_USING_UART2 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B1_02_LPUART2_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B1_03_LPUART2_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B1_02_LPUART2_TX, + 0x10B0u); + + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B1_03_LPUART2_RX, + 0x10B0u); + +#endif +#ifdef RT_USING_UART3 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B1_06_LPUART3_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B1_07_LPUART3_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B1_06_LPUART3_TX, + 0x10B0u); + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B1_07_LPUART3_RX, + 0x10B0u); +#endif +#ifdef RT_USING_UART4 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_B1_00_LPUART4_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_B1_01_LPUART4_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_B1_00_LPUART4_TX, + 0x10B0u); + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_B1_01_LPUART4_RX, + 0x10B0u); +#endif +#ifdef RT_USING_UART5 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_B1_12_LPUART5_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_B1_13_LPUART5_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_B1_12_LPUART5_TX, + 0x10B0u); + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_B1_13_LPUART5_RX, + 0x10B0u); +#endif +#ifdef RT_USING_UART6 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B0_02_LPUART6_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B0_03_LPUART6_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B0_02_LPUART6_TX, + 0x10B0u); + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B0_03_LPUART6_RX, + 0x10B0u); +#endif +#ifdef RT_USING_UART7 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_EMC_31_LPUART7_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_EMC_32_LPUART7_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_EMC_31_LPUART7_TX, + 0x10B0u); + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_EMC_32_LPUART7_RX, + 0x10B0u); +#endif +#ifdef RT_USING_UART8 + CLOCK_EnableClock(kCLOCK_Iomuxc); + + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B1_10_LPUART8_TX, + 0U); + IOMUXC_SetPinMux( + IOMUXC_GPIO_AD_B1_11_LPUART8_RX, + 0U); + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B1_10_LPUART8_TX, + 0x10B0u); + + IOMUXC_SetPinConfig( + IOMUXC_GPIO_AD_B1_11_LPUART8_RX, + 0x10B0u); +#endif + } + else + { + RT_ASSERT(RT_NULL); + } +} + +static rt_err_t imxrt_configure(struct rt_serial_device *serial, struct serial_configure *cfg) +{ + struct imxrt_uart *uart; + lpuart_config_t config; + + RT_ASSERT(serial != RT_NULL); + RT_ASSERT(cfg != RT_NULL); + + uart = (struct imxrt_uart *)serial->parent.user_data; + + imxrt_uart_gpio_init(uart); + + LPUART_GetDefaultConfig(&config); + config.baudRate_Bps = cfg->baud_rate; + + switch (cfg->data_bits) + { + case DATA_BITS_7: + config.dataBitsCount = kLPUART_SevenDataBits; + break; + + default: + config.dataBitsCount = kLPUART_EightDataBits; + break; + } + + switch (cfg->stop_bits) + { + case STOP_BITS_2: + config.stopBitCount = kLPUART_TwoStopBit; + break; + default: + config.stopBitCount = kLPUART_OneStopBit; + break; + } + + switch (cfg->parity) + { + case PARITY_ODD: + config.parityMode = kLPUART_ParityOdd; + break; + case PARITY_EVEN: + config.parityMode = kLPUART_ParityEven; + break; + default: + config.parityMode = kLPUART_ParityDisabled; + break; + } + + config.enableTx = true; + config.enableRx = true; + + LPUART_Init(uart->uart_base, &config, BOARD_DebugConsoleSrcFreq()); + + + return RT_EOK; +} + +static rt_err_t imxrt_control(struct rt_serial_device *serial, int cmd, void *arg) +{ + struct imxrt_uart *uart; + + RT_ASSERT(serial != RT_NULL); + uart = (struct imxrt_uart *)serial->parent.user_data; + + switch (cmd) + { + case RT_DEVICE_CTRL_CLR_INT: + /* disable interrupt */ + LPUART_DisableInterrupts(uart->uart_base, kLPUART_RxDataRegFullInterruptEnable); + /* disable rx irq */ + DisableIRQ(uart->irqn); + + break; + case RT_DEVICE_CTRL_SET_INT: + /* enable interrupt */ + LPUART_EnableInterrupts(uart->uart_base, kLPUART_RxDataRegFullInterruptEnable); + /* enable rx irq */ + EnableIRQ(uart->irqn); + break; + } + + return RT_EOK; +} + +static int imxrt_putc(struct rt_serial_device *serial, char ch) +{ + struct imxrt_uart *uart; + + RT_ASSERT(serial != RT_NULL); + uart = (struct imxrt_uart *)serial->parent.user_data; + + LPUART_WriteByte(uart->uart_base, ch); + while(!(LPUART_GetStatusFlags(uart->uart_base) & kLPUART_TxDataRegEmptyFlag)); + + return 1; +} + +static int imxrt_getc(struct rt_serial_device *serial) +{ + int ch; + struct imxrt_uart *uart; + + RT_ASSERT(serial != RT_NULL); + uart = (struct imxrt_uart *)serial->parent.user_data; + + ch = -1; + if (LPUART_GetStatusFlags(uart->uart_base) & kLPUART_RxDataRegFullFlag) + ch = LPUART_ReadByte(uart->uart_base); + return ch; +} + +/** + * Uart common interrupt process. This need add to uart ISR. + * + * @param serial serial device + */ +static void uart_isr(struct rt_serial_device *serial) +{ + struct imxrt_uart *uart; + LPUART_Type *base; + + RT_ASSERT(serial != RT_NULL); + + uart = (struct imxrt_uart *) serial->parent.user_data; + RT_ASSERT(uart != RT_NULL); + + base = uart->uart_base; + RT_ASSERT(base != RT_NULL); + + /* enter interrupt */ + rt_interrupt_enter(); + + /* UART in mode Receiver -------------------------------------------------*/ + if (LPUART_GetStatusFlags(base) & kLPUART_RxDataRegFullFlag) + { + rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND); + } + + /* If RX overrun. */ + if (LPUART_STAT_OR_MASK & base->STAT) + { + /* Clear overrun flag, otherwise the RX does not work. */ + base->STAT = ((base->STAT & 0x3FE00000U) | LPUART_STAT_OR_MASK); + } + + /* leave interrupt */ + rt_interrupt_leave(); +} + +static const struct rt_uart_ops imxrt_uart_ops = +{ + imxrt_configure, + imxrt_control, + imxrt_putc, + imxrt_getc, +}; + +int imxrt_hw_usart_init(void) +{ + struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; + int i; + for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++) + { + uarts[i].serial->ops = &imxrt_uart_ops; + uarts[i].serial->config = config; + + /* register UART1 device */ + rt_hw_serial_register(uarts[i].serial, + uarts[i].device_name, + RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, + (void *)&uarts[i]); + } + + return 0; +} +INIT_BOARD_EXPORT(imxrt_hw_usart_init); + +#endif /*RT_USING_SERIAL */ diff --git a/bsp/imxrt1052-evk/drivers/drv_uart.h b/bsp/imxrt1052-evk/drivers/drv_uart.h new file mode 100644 index 0000000000..6f14c7adbd --- /dev/null +++ b/bsp/imxrt1052-evk/drivers/drv_uart.h @@ -0,0 +1,23 @@ +/* + * File : drv_uart.h + * 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 + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2017-10-10 Tanek the first version + */ + +#ifndef __USART_H__ +#define __USART_H__ + +#include +#include + +int rt_hw_usart_init(void); + +#endif From 1257e5d38a2910d7a38e79935ef8f086644873a7 Mon Sep 17 00:00:00 2001 From: balanceTWK Date: Sun, 18 Mar 2018 15:03:28 +0800 Subject: [PATCH 09/19] del usart.c usart.h --- bsp/imxrt1052-evk/drivers/usart.c | 383 ------------------------------ bsp/imxrt1052-evk/drivers/usart.h | 23 -- 2 files changed, 406 deletions(-) delete mode 100644 bsp/imxrt1052-evk/drivers/usart.c delete mode 100644 bsp/imxrt1052-evk/drivers/usart.h diff --git a/bsp/imxrt1052-evk/drivers/usart.c b/bsp/imxrt1052-evk/drivers/usart.c deleted file mode 100644 index 65a480a199..0000000000 --- a/bsp/imxrt1052-evk/drivers/usart.c +++ /dev/null @@ -1,383 +0,0 @@ -/* - * File : usart.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006-2013, RT-Thread Development Team - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2017-10-10 Tanek the first version - */ -#include -#include "usart.h" - -#include "fsl_common.h" -#include "fsl_lpuart.h" -#include "fsl_iomuxc.h" - -#ifdef RT_USING_SERIAL - -#if !defined(RT_USING_UART0) && !defined(RT_USING_UART1) && \ - !defined(RT_USING_UART2) && !defined(RT_USING_UART3) && \ - !defined(RT_USING_UART4) && !defined(RT_USING_UART5) && \ - !defined(RT_USING_UART6) && !defined(RT_USING_UART7) -#error "Please define at least one UARTx" - -#endif - -#include - -/* imxrt uart driver */ -struct imxrt_uart -{ - LPUART_Type * uart_base; - IRQn_Type irqn; - - struct rt_serial_device * serial; - char *device_name; -}; - -static void uart_isr(struct rt_serial_device *serial); - -#if defined(RT_USING_UART1) -struct rt_serial_device serial1; - -void LPUART1_IRQHandler(void) -{ - uart_isr(&serial1); -} - -#endif /* RT_USING_UART1 */ - -#if defined(RT_USING_UART2) -struct rt_serial_device serial2; - -void USART2_IRQHandler(void) -{ - uart_isr(&serial2); -} - -#endif /* RT_USING_UART2 */ - -#if defined(RT_USING_UART3) -struct rt_serial_device serial3; - -void UART3_IRQHandler(void) -{ - uart_isr(&serial3); -} - -#endif /* RT_USING_UART3 */ - -#if defined(RT_USING_UART4) -struct rt_serial_device serial4; - -void UART4_IRQHandler(void) -{ - uart_isr(&serial4); -} -#endif /* RT_USING_UART4 */ - -#if defined(RT_USING_UART5) -struct rt_serial_device serial5; - -void USART5_IRQHandler(void) -{ - uart_isr(&serial5); -} - -#endif /* RT_USING_UART5 */ - -#if defined(RT_USING_UART6) -struct rt_serial_device serial6; - -void UART6_IRQHandler(void) -{ - uart_isr(&serial6); -} - -#endif /* RT_USING_UART6 */ - -#if defined(RT_USING_UART7) -struct rt_serial_device serial7; - -void UART7_IRQHandler(void) -{ - uart_isr(&serial7); -} - -#endif /* RT_USING_UART7 */ - -#if defined(RT_USING_UART8) -struct rt_serial_device serial8; - -void UART8_IRQHandler(void) -{ - uart_isr(&serial8); -} - -#endif /* RT_USING_UART8 */ - -static const struct imxrt_uart uarts[] = { - #ifdef RT_USING_UART1 - { - LPUART1, - LPUART1_IRQn, - &serial1, - "uart1", - }, - #endif - -}; - -/* Get debug console frequency. */ -uint32_t BOARD_DebugConsoleSrcFreq(void) -{ - uint32_t freq; - - /* To make it simple, we assume default PLL and divider settings, and the only variable - from application is use PLL3 source or OSC source */ - if (CLOCK_GetMux(kCLOCK_UartMux) == 0) /* PLL3 div6 80M */ - { - freq = (CLOCK_GetPllFreq(kCLOCK_PllUsb1) / 6U) / (CLOCK_GetDiv(kCLOCK_UartDiv) + 1U); - } - else - { - freq = CLOCK_GetOscFreq() / (CLOCK_GetDiv(kCLOCK_UartDiv) + 1U); - } - - return freq; -} - - -/** -* @brief UART MSP Initialization -* This function configures the hardware resources used in this example: -* - Peripheral's clock enable -* - Peripheral's GPIO Configuration -* - NVIC configuration for UART interrupt request enable -* @param huart: UART handle pointer -* @retval None -*/ -void imxrt_uart_gpio_init(struct imxrt_uart *uart) -{ - if (uart->uart_base == LPUART1) - { - CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */ - - IOMUXC_SetPinMux( - IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 is configured as LPUART1_TX */ - 0U); /* Software Input On Field: Input Path is determined by functionality */ - IOMUXC_SetPinMux( - IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 is configured as LPUART1_RX */ - 0U); /* Software Input On Field: Input Path is determined by functionality */ - IOMUXC_SetPinConfig( - IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 PAD functional properties : */ - 0x10B0u); /* Slew Rate Field: Slow Slew Rate - Drive Strength Field: R0/6 - Speed Field: medium(100MHz) - Open Drain Enable Field: Open Drain Disabled - Pull / Keep Enable Field: Pull/Keeper Enabled - Pull / Keep Select Field: Keeper - Pull Up / Down Config. Field: 100K Ohm Pull Down - Hyst. Enable Field: Hysteresis Disabled */ - IOMUXC_SetPinConfig( - IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 PAD functional properties : */ - 0x10B0u); /* Slew Rate Field: Slow Slew Rate - Drive Strength Field: R0/6 - Speed Field: medium(100MHz) - Open Drain Enable Field: Open Drain Disabled - Pull / Keep Enable Field: Pull/Keeper Enabled - Pull / Keep Select Field: Keeper - Pull Up / Down Config. Field: 100K Ohm Pull Down - Hyst. Enable Field: Hysteresis Disabled */ - } - else - { - RT_ASSERT(RT_NULL); - } -} - -static rt_err_t imxrt_configure(struct rt_serial_device *serial, struct serial_configure *cfg) -{ - struct imxrt_uart *uart; - lpuart_config_t config; - - RT_ASSERT(serial != RT_NULL); - RT_ASSERT(cfg != RT_NULL); - - uart = (struct imxrt_uart *)serial->parent.user_data; - - imxrt_uart_gpio_init(uart); - - LPUART_GetDefaultConfig(&config); - config.baudRate_Bps = cfg->baud_rate; - - switch (cfg->data_bits) - { - case DATA_BITS_7: - config.dataBitsCount = kLPUART_SevenDataBits; - break; - - default: - config.dataBitsCount = kLPUART_EightDataBits; - break; - } - - switch (cfg->stop_bits) - { - case STOP_BITS_2: - config.stopBitCount = kLPUART_TwoStopBit; - break; - default: - config.stopBitCount = kLPUART_OneStopBit; - break; - } - - switch (cfg->parity) - { - case PARITY_ODD: - config.parityMode = kLPUART_ParityOdd; - break; - case PARITY_EVEN: - config.parityMode = kLPUART_ParityEven; - break; - default: - config.parityMode = kLPUART_ParityDisabled; - break; - } - - config.enableTx = true; - config.enableRx = true; - - LPUART_Init(uart->uart_base, &config, BOARD_DebugConsoleSrcFreq()); - - - return RT_EOK; -} - -static rt_err_t imxrt_control(struct rt_serial_device *serial, int cmd, void *arg) -{ - struct imxrt_uart *uart; - - RT_ASSERT(serial != RT_NULL); - uart = (struct imxrt_uart *)serial->parent.user_data; - - switch (cmd) - { - case RT_DEVICE_CTRL_CLR_INT: - /* disable interrupt */ - LPUART_DisableInterrupts(uart->uart_base, kLPUART_RxDataRegFullInterruptEnable); - /* disable rx irq */ - DisableIRQ(uart->irqn); - - break; - case RT_DEVICE_CTRL_SET_INT: - /* enable interrupt */ - LPUART_EnableInterrupts(uart->uart_base, kLPUART_RxDataRegFullInterruptEnable); - /* enable rx irq */ - EnableIRQ(uart->irqn); - break; - } - - return RT_EOK; -} - -static int imxrt_putc(struct rt_serial_device *serial, char ch) -{ - struct imxrt_uart *uart; - - RT_ASSERT(serial != RT_NULL); - uart = (struct imxrt_uart *)serial->parent.user_data; - - LPUART_WriteByte(uart->uart_base, ch); - while(!(LPUART_GetStatusFlags(uart->uart_base) & kLPUART_TxDataRegEmptyFlag)); - - return 1; -} - -static int imxrt_getc(struct rt_serial_device *serial) -{ - int ch; - struct imxrt_uart *uart; - - RT_ASSERT(serial != RT_NULL); - uart = (struct imxrt_uart *)serial->parent.user_data; - - ch = -1; - if (LPUART_GetStatusFlags(uart->uart_base) & kLPUART_RxDataRegFullFlag) - ch = LPUART_ReadByte(uart->uart_base); - return ch; -} - -/** - * Uart common interrupt process. This need add to uart ISR. - * - * @param serial serial device - */ -static void uart_isr(struct rt_serial_device *serial) -{ - struct imxrt_uart *uart; - LPUART_Type *base; - - RT_ASSERT(serial != RT_NULL); - - uart = (struct imxrt_uart *) serial->parent.user_data; - RT_ASSERT(uart != RT_NULL); - - base = uart->uart_base; - RT_ASSERT(base != RT_NULL); - - /* enter interrupt */ - rt_interrupt_enter(); - - /* UART in mode Receiver -------------------------------------------------*/ - if (LPUART_GetStatusFlags(base) & kLPUART_RxDataRegFullFlag) - { - rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND); - } - - /* If RX overrun. */ - if (LPUART_STAT_OR_MASK & base->STAT) - { - /* Clear overrun flag, otherwise the RX does not work. */ - base->STAT = ((base->STAT & 0x3FE00000U) | LPUART_STAT_OR_MASK); - } - - /* leave interrupt */ - rt_interrupt_leave(); -} - -static const struct rt_uart_ops imxrt_uart_ops = -{ - imxrt_configure, - imxrt_control, - imxrt_putc, - imxrt_getc, -}; - -int imxrt_hw_usart_init(void) -{ - struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; - int i; - - for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++) - { - uarts[i].serial->ops = &imxrt_uart_ops; - uarts[i].serial->config = config; - - /* register UART1 device */ - rt_hw_serial_register(uarts[i].serial, - uarts[i].device_name, - RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, - (void *)&uarts[i]); - } - - return 0; -} -INIT_BOARD_EXPORT(imxrt_hw_usart_init); - -#endif /*RT_USING_SERIAL */ diff --git a/bsp/imxrt1052-evk/drivers/usart.h b/bsp/imxrt1052-evk/drivers/usart.h deleted file mode 100644 index 5cc02fb430..0000000000 --- a/bsp/imxrt1052-evk/drivers/usart.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * File : usart.h - * 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 - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2017-10-10 Tanek the first version - */ - -#ifndef __USART_H__ -#define __USART_H__ - -#include -#include - -int rt_hw_usart_init(void); - -#endif From 1918d14a13c50a1ad69761af1593b6865e446d4a Mon Sep 17 00:00:00 2001 From: balanceTWK Date: Sun, 18 Mar 2018 15:16:58 +0800 Subject: [PATCH 10/19] drv_uart --- bsp/imxrt1052-evk/drivers/board.c | 2 +- bsp/imxrt1052-evk/drivers/drv_uart.c | 2 +- bsp/imxrt1052-evk/drivers/drv_uart.h | 4 +- bsp/imxrt1052-evk/project.uvoptx | 2195 +++++++++++++++++++++++++- bsp/imxrt1052-evk/project.uvprojx | 444 +----- 5 files changed, 2257 insertions(+), 390 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/board.c b/bsp/imxrt1052-evk/drivers/board.c index 5cb875827a..b182ed58e0 100644 --- a/bsp/imxrt1052-evk/drivers/board.c +++ b/bsp/imxrt1052-evk/drivers/board.c @@ -16,7 +16,7 @@ #include #include "board.h" -#include "usart.h" +#include "drv_uart.h" static struct rt_memheap system_heap; diff --git a/bsp/imxrt1052-evk/drivers/drv_uart.c b/bsp/imxrt1052-evk/drivers/drv_uart.c index b3f9db685c..ef1eeecc2f 100644 --- a/bsp/imxrt1052-evk/drivers/drv_uart.c +++ b/bsp/imxrt1052-evk/drivers/drv_uart.c @@ -13,7 +13,7 @@ * 2018-03-17 laiyiketang Add other uart. */ #include -#include "drv_usart.h" +#include "drv_uart.h" #include "fsl_common.h" #include "fsl_lpuart.h" diff --git a/bsp/imxrt1052-evk/drivers/drv_uart.h b/bsp/imxrt1052-evk/drivers/drv_uart.h index 6f14c7adbd..f5d3842b46 100644 --- a/bsp/imxrt1052-evk/drivers/drv_uart.h +++ b/bsp/imxrt1052-evk/drivers/drv_uart.h @@ -12,8 +12,8 @@ * 2017-10-10 Tanek the first version */ -#ifndef __USART_H__ -#define __USART_H__ +#ifndef __DRV_USART_H__ +#define __DRV_USART_H__ #include #include diff --git a/bsp/imxrt1052-evk/project.uvoptx b/bsp/imxrt1052-evk/project.uvoptx index f28e56931b..9022a79cdd 100644 --- a/bsp/imxrt1052-evk/project.uvoptx +++ b/bsp/imxrt1052-evk/project.uvoptx @@ -101,6 +101,8 @@ 0 0 1 + 0 + 0 2 @@ -164,14 +166,2199 @@ 0 - - - 0 0 - 0 + 0 + + + + + + + + + + Applications + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + applications\device_test.c + device_test.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + applications\main.c + main.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + applications\mem_dump.c + mem_dump.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + applications\mem_test.c + mem_test.c + 0 + 0 + + + + + Drivers + 1 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + drivers\board.c + board.c + 0 + 0 + + + 2 + 6 + 1 + 0 + 0 + 0 + drivers\hyper_flash_boot.c + hyper_flash_boot.c + 0 + 0 + + + 2 + 7 + 1 + 0 + 0 + 0 + drivers\drv_sdram.c + drv_sdram.c + 0 + 0 + + + 2 + 8 + 1 + 0 + 0 + 0 + drivers\drv_pin.c + drv_pin.c + 0 + 0 + + + 2 + 9 + 1 + 0 + 0 + 0 + drivers\drv_hp_rtc.c + drv_hp_rtc.c + 0 + 0 + + + 2 + 10 + 1 + 0 + 0 + 0 + drivers\drv_eth.c + drv_eth.c + 0 + 0 + + + 2 + 11 + 1 + 0 + 0 + 0 + drivers\fsl_phy.c + fsl_phy.c + 0 + 0 + + + 2 + 12 + 1 + 0 + 0 + 0 + drivers\drv_sdio.c + drv_sdio.c + 0 + 0 + + + 2 + 13 + 1 + 0 + 0 + 0 + .\drivers\drv_uart.c + drv_uart.c + 0 + 0 + + + + + Libraries + 0 + 0 + 0 + 0 + + 3 + 14 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_adc.c + fsl_adc.c + 0 + 0 + + + 3 + 15 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_adc_etc.c + fsl_adc_etc.c + 0 + 0 + + + 3 + 16 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_aipstz.c + fsl_aipstz.c + 0 + 0 + + + 3 + 17 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_aoi.c + fsl_aoi.c + 0 + 0 + + + 3 + 18 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_bee.c + fsl_bee.c + 0 + 0 + + + 3 + 19 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_cache.c + fsl_cache.c + 0 + 0 + + + 3 + 20 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_clock.c + fsl_clock.c + 0 + 0 + + + 3 + 21 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_cmp.c + fsl_cmp.c + 0 + 0 + + + 3 + 22 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_common.c + fsl_common.c + 0 + 0 + + + 3 + 23 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_csi.c + fsl_csi.c + 0 + 0 + + + 3 + 24 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_dcdc.c + fsl_dcdc.c + 0 + 0 + + + 3 + 25 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_dcp.c + fsl_dcp.c + 0 + 0 + + + 3 + 26 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_dmamux.c + fsl_dmamux.c + 0 + 0 + + + 3 + 27 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_edma.c + fsl_edma.c + 0 + 0 + + + 3 + 28 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_elcdif.c + fsl_elcdif.c + 0 + 0 + + + 3 + 29 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_enc.c + fsl_enc.c + 0 + 0 + + + 3 + 30 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_enet.c + fsl_enet.c + 0 + 0 + + + 3 + 31 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_ewm.c + fsl_ewm.c + 0 + 0 + + + 3 + 32 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexcan.c + fsl_flexcan.c + 0 + 0 + + + 3 + 33 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio.c + fsl_flexio.c + 0 + 0 + + + 3 + 34 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_i2c_master.c + fsl_flexio_i2c_master.c + 0 + 0 + + + 3 + 35 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_i2s.c + fsl_flexio_i2s.c + 0 + 0 + + + 3 + 36 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_i2s_edma.c + fsl_flexio_i2s_edma.c + 0 + 0 + + + 3 + 37 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_spi.c + fsl_flexio_spi.c + 0 + 0 + + + 3 + 38 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_spi_edma.c + fsl_flexio_spi_edma.c + 0 + 0 + + + 3 + 39 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_uart.c + fsl_flexio_uart.c + 0 + 0 + + + 3 + 40 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexio_uart_edma.c + fsl_flexio_uart_edma.c + 0 + 0 + + + 3 + 41 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexram.c + fsl_flexram.c + 0 + 0 + + + 3 + 42 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_flexspi.c + fsl_flexspi.c + 0 + 0 + + + 3 + 43 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_gpc.c + fsl_gpc.c + 0 + 0 + + + 3 + 44 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_gpio.c + fsl_gpio.c + 0 + 0 + + + 3 + 45 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_gpt.c + fsl_gpt.c + 0 + 0 + + + 3 + 46 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_kpp.c + fsl_kpp.c + 0 + 0 + + + 3 + 47 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_lpi2c.c + fsl_lpi2c.c + 0 + 0 + + + 3 + 48 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_lpi2c_edma.c + fsl_lpi2c_edma.c + 0 + 0 + + + 3 + 49 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_lpspi.c + fsl_lpspi.c + 0 + 0 + + + 3 + 50 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_lpspi_edma.c + fsl_lpspi_edma.c + 0 + 0 + + + 3 + 51 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_lpuart.c + fsl_lpuart.c + 0 + 0 + + + 3 + 52 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_lpuart_edma.c + fsl_lpuart_edma.c + 0 + 0 + + + 3 + 53 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_pit.c + fsl_pit.c + 0 + 0 + + + 3 + 54 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_pmu.c + fsl_pmu.c + 0 + 0 + + + 3 + 55 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_pwm.c + fsl_pwm.c + 0 + 0 + + + 3 + 56 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_pxp.c + fsl_pxp.c + 0 + 0 + + + 3 + 57 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_qtmr.c + fsl_qtmr.c + 0 + 0 + + + 3 + 58 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_rtwdog.c + fsl_rtwdog.c + 0 + 0 + + + 3 + 59 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_sai.c + fsl_sai.c + 0 + 0 + + + 3 + 60 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_sai_edma.c + fsl_sai_edma.c + 0 + 0 + + + 3 + 61 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_semc.c + fsl_semc.c + 0 + 0 + + + 3 + 62 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_snvs_hp.c + fsl_snvs_hp.c + 0 + 0 + + + 3 + 63 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_snvs_lp.c + fsl_snvs_lp.c + 0 + 0 + + + 3 + 64 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_spdif.c + fsl_spdif.c + 0 + 0 + + + 3 + 65 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_spdif_edma.c + fsl_spdif_edma.c + 0 + 0 + + + 3 + 66 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_src.c + fsl_src.c + 0 + 0 + + + 3 + 67 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_trng.c + fsl_trng.c + 0 + 0 + + + 3 + 68 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_tsc.c + fsl_tsc.c + 0 + 0 + + + 3 + 69 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_usdhc.c + fsl_usdhc.c + 0 + 0 + + + 3 + 70 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_wdog.c + fsl_wdog.c + 0 + 0 + + + 3 + 71 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_xbara.c + fsl_xbara.c + 0 + 0 + + + 3 + 72 + 1 + 0 + 0 + 0 + Libraries\drivers\fsl_xbarb.c + fsl_xbarb.c + 0 + 0 + + + 3 + 73 + 1 + 0 + 0 + 0 + Libraries\system_MIMXRT1052.c + system_MIMXRT1052.c + 0 + 0 + + + 3 + 74 + 2 + 0 + 0 + 0 + Libraries\arm\startup_MIMXRT1052.s + startup_MIMXRT1052.s + 0 + 0 + + + + + Kernel + 0 + 0 + 0 + 0 + + 4 + 75 + 1 + 0 + 0 + 0 + ..\..\src\clock.c + clock.c + 0 + 0 + + + 4 + 76 + 1 + 0 + 0 + 0 + ..\..\src\components.c + components.c + 0 + 0 + + + 4 + 77 + 1 + 0 + 0 + 0 + ..\..\src\device.c + device.c + 0 + 0 + + + 4 + 78 + 1 + 0 + 0 + 0 + ..\..\src\idle.c + idle.c + 0 + 0 + + + 4 + 79 + 1 + 0 + 0 + 0 + ..\..\src\ipc.c + ipc.c + 0 + 0 + + + 4 + 80 + 1 + 0 + 0 + 0 + ..\..\src\irq.c + irq.c + 0 + 0 + + + 4 + 81 + 1 + 0 + 0 + 0 + ..\..\src\kservice.c + kservice.c + 0 + 0 + + + 4 + 82 + 1 + 0 + 0 + 0 + ..\..\src\memheap.c + memheap.c + 0 + 0 + + + 4 + 83 + 1 + 0 + 0 + 0 + ..\..\src\object.c + object.c + 0 + 0 + + + 4 + 84 + 1 + 0 + 0 + 0 + ..\..\src\scheduler.c + scheduler.c + 0 + 0 + + + 4 + 85 + 1 + 0 + 0 + 0 + ..\..\src\signal.c + signal.c + 0 + 0 + + + 4 + 86 + 1 + 0 + 0 + 0 + ..\..\src\thread.c + thread.c + 0 + 0 + + + 4 + 87 + 1 + 0 + 0 + 0 + ..\..\src\timer.c + timer.c + 0 + 0 + + + + + CORTEX-M7 + 0 + 0 + 0 + 0 + + 5 + 88 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\cortex-m7\cpuport.c + cpuport.c + 0 + 0 + + + 5 + 89 + 2 + 0 + 0 + 0 + ..\..\libcpu\arm\cortex-m7\context_rvds.S + context_rvds.S + 0 + 0 + + + 5 + 90 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\common\backtrace.c + backtrace.c + 0 + 0 + + + 5 + 91 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\common\div0.c + div0.c + 0 + 0 + + + 5 + 92 + 1 + 0 + 0 + 0 + ..\..\libcpu\arm\common\showmem.c + showmem.c + 0 + 0 + + + + + Filesystem + 0 + 0 + 0 + 0 + + 6 + 93 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs.c + dfs.c + 0 + 0 + + + 6 + 94 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_file.c + dfs_file.c + 0 + 0 + + + 6 + 95 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_fs.c + dfs_fs.c + 0 + 0 + + + 6 + 96 + 1 + 0 + 0 + 0 + ..\..\components\dfs\src\dfs_posix.c + dfs_posix.c + 0 + 0 + + + 6 + 97 + 1 + 0 + 0 + 0 + ..\..\components\dfs\filesystems\devfs\devfs.c + devfs.c + 0 + 0 + + + 6 + 98 + 1 + 0 + 0 + 0 + ..\..\components\dfs\filesystems\elmfat\dfs_elm.c + dfs_elm.c + 0 + 0 + + + 6 + 99 + 1 + 0 + 0 + 0 + ..\..\components\dfs\filesystems\elmfat\ff.c + ff.c + 0 + 0 + + + 6 + 100 + 1 + 0 + 0 + 0 + ..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c + ccsbcs.c + 0 + 0 + + + + + DeviceDrivers + 0 + 0 + 0 + 0 + + 7 + 101 + 1 + 0 + 0 + 0 + ..\..\components\drivers\i2c\i2c_core.c + i2c_core.c + 0 + 0 + + + 7 + 102 + 1 + 0 + 0 + 0 + ..\..\components\drivers\i2c\i2c_dev.c + i2c_dev.c + 0 + 0 + + + 7 + 103 + 1 + 0 + 0 + 0 + ..\..\components\drivers\i2c\i2c-bit-ops.c + i2c-bit-ops.c + 0 + 0 + + + 7 + 104 + 1 + 0 + 0 + 0 + ..\..\components\drivers\misc\pin.c + pin.c + 0 + 0 + + + 7 + 105 + 1 + 0 + 0 + 0 + ..\..\components\drivers\rtc\rtc.c + rtc.c + 0 + 0 + + + 7 + 106 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\block_dev.c + block_dev.c + 0 + 0 + + + 7 + 107 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\mmcsd_core.c + mmcsd_core.c + 0 + 0 + + + 7 + 108 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\sd.c + sd.c + 0 + 0 + + + 7 + 109 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\sdio.c + sdio.c + 0 + 0 + + + 7 + 110 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\mmc.c + mmc.c + 0 + 0 + + + 7 + 111 + 1 + 0 + 0 + 0 + ..\..\components\drivers\serial\serial.c + serial.c + 0 + 0 + + + 7 + 112 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\completion.c + completion.c + 0 + 0 + + + 7 + 113 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\dataqueue.c + dataqueue.c + 0 + 0 + + + 7 + 114 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\pipe.c + pipe.c + 0 + 0 + + + 7 + 115 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\ringbuffer.c + ringbuffer.c + 0 + 0 + + + 7 + 116 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\waitqueue.c + waitqueue.c + 0 + 0 + + + 7 + 117 + 1 + 0 + 0 + 0 + ..\..\components\drivers\src\workqueue.c + workqueue.c + 0 + 0 + + + + + finsh + 0 + 0 + 0 + 0 + + 8 + 118 + 1 + 0 + 0 + 0 + ..\..\components\finsh\shell.c + shell.c + 0 + 0 + + + 8 + 119 + 1 + 0 + 0 + 0 + ..\..\components\finsh\symbol.c + symbol.c + 0 + 0 + + + 8 + 120 + 1 + 0 + 0 + 0 + ..\..\components\finsh\cmd.c + cmd.c + 0 + 0 + + + 8 + 121 + 1 + 0 + 0 + 0 + ..\..\components\finsh\msh.c + msh.c + 0 + 0 + + + 8 + 122 + 1 + 0 + 0 + 0 + ..\..\components\finsh\msh_cmd.c + msh_cmd.c + 0 + 0 + + + 8 + 123 + 1 + 0 + 0 + 0 + ..\..\components\finsh\msh_file.c + msh_file.c + 0 + 0 + + + 8 + 124 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_compiler.c + finsh_compiler.c + 0 + 0 + + + 8 + 125 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_error.c + finsh_error.c + 0 + 0 + + + 8 + 126 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_heap.c + finsh_heap.c + 0 + 0 + + + 8 + 127 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_init.c + finsh_init.c + 0 + 0 + + + 8 + 128 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_node.c + finsh_node.c + 0 + 0 + + + 8 + 129 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_ops.c + finsh_ops.c + 0 + 0 + + + 8 + 130 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_parser.c + finsh_parser.c + 0 + 0 + + + 8 + 131 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_var.c + finsh_var.c + 0 + 0 + + + 8 + 132 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_vm.c + finsh_vm.c + 0 + 0 + + + 8 + 133 + 1 + 0 + 0 + 0 + ..\..\components\finsh\finsh_token.c + finsh_token.c + 0 + 0 + + + + + libc + 0 + 0 + 0 + 0 + + 9 + 134 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\libc.c + libc.c + 0 + 0 + + + 9 + 135 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\libc_syms.c + libc_syms.c + 0 + 0 + + + 9 + 136 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\mem_std.c + mem_std.c + 0 + 0 + + + 9 + 137 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\stdio.c + stdio.c + 0 + 0 + + + 9 + 138 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\stubs.c + stubs.c + 0 + 0 + + + 9 + 139 + 1 + 0 + 0 + 0 + ..\..\components\libc\compilers\armlibc\time.c + time.c + 0 + 0 + + + + + lwIP + 0 + 0 + 0 + 0 + + 10 + 140 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c + sys_arch.c + 0 + 0 + + + 10 + 141 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\api_lib.c + api_lib.c + 0 + 0 + + + 10 + 142 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\api_msg.c + api_msg.c + 0 + 0 + + + 10 + 143 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\err.c + err.c + 0 + 0 + + + 10 + 144 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\netbuf.c + netbuf.c + 0 + 0 + + + 10 + 145 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\netdb.c + netdb.c + 0 + 0 + + + 10 + 146 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\netifapi.c + netifapi.c + 0 + 0 + + + 10 + 147 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\sockets.c + sockets.c + 0 + 0 + + + 10 + 148 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\api\tcpip.c + tcpip.c + 0 + 0 + + + 10 + 149 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\def.c + def.c + 0 + 0 + + + 10 + 150 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\dns.c + dns.c + 0 + 0 + + + 10 + 151 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c + inet_chksum.c + 0 + 0 + + + 10 + 152 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\init.c + init.c + 0 + 0 + + + 10 + 153 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ip.c + ip.c + 0 + 0 + + + 10 + 154 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\memp.c + memp.c + 0 + 0 + + + 10 + 155 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\netif.c + netif.c + 0 + 0 + + + 10 + 156 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\pbuf.c + pbuf.c + 0 + 0 + + + 10 + 157 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\raw.c + raw.c + 0 + 0 + + + 10 + 158 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\stats.c + stats.c + 0 + 0 + + + 10 + 159 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\sys.c + sys.c + 0 + 0 + + + 10 + 160 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\tcp.c + tcp.c + 0 + 0 + + + 10 + 161 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\tcp_in.c + tcp_in.c + 0 + 0 + + + 10 + 162 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\tcp_out.c + tcp_out.c + 0 + 0 + + + 10 + 163 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\timeouts.c + timeouts.c + 0 + 0 + + + 10 + 164 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\udp.c + udp.c + 0 + 0 + + + 10 + 165 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\netif\ethernet.c + ethernet.c + 0 + 0 + + + 10 + 166 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c + ethernetif.c + 0 + 0 + + + 10 + 167 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c + lowpan6.c + 0 + 0 + + + 10 + 168 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c + autoip.c + 0 + 0 + + + 10 + 169 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c + dhcp.c + 0 + 0 + + + 10 + 170 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c + etharp.c + 0 + 0 + + + 10 + 171 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c + icmp.c + 0 + 0 + + + 10 + 172 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c + igmp.c + 0 + 0 + + + 10 + 173 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c + ip4.c + 0 + 0 + + + 10 + 174 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c + ip4_addr.c + 0 + 0 + + + 10 + 175 + 1 + 0 + 0 + 0 + ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c + ip4_frag.c + 0 + 0 + + + ::CMSIS 0 diff --git a/bsp/imxrt1052-evk/project.uvprojx b/bsp/imxrt1052-evk/project.uvprojx index baf0a744f4..d8e8902a14 100644 --- a/bsp/imxrt1052-evk/project.uvprojx +++ b/bsp/imxrt1052-evk/project.uvprojx @@ -1,41 +1,46 @@ + 2.1 +
### uVision Project, (C) Keil Software
+ RT-Thread IMXRT1052 0x4 ARM-ADS - 5060528::V5.06 update 5 (build 528)::ARMCC + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 MIMXRT1052:M7 NXP - NXP.iMXRT_DFP.1.0.1 + NXP.iMXRT_DFP.1.0.2 + http://mcuxpresso.nxp.com/cmsis_pack/repo/ IRAM(0x20000000,0x00060000) IRAM2(0x00000000,0x00020000) CPUTYPE("Cortex-M7") FPU3(SFPU) CLOCK(12000000) ELITTLE - - + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0RT1050 -FS060000000 -FL04000000 -FP0($$Device:MIMXRT1052$Flash\RT1050.FLM)) 0 $$Device:MIMXRT1052$Device\Include\MIMXRT1052.h - - - - - - - - - + + + + + + + + + $$Device:MIMXRT1052$SVD\MIMXRT1052.svd 0 0 - - - - - + + + + + 0 0 @@ -57,8 +62,8 @@ 0 0 - - + + 0 0 0 @@ -67,8 +72,8 @@ 0 0 - - + + 0 0 0 @@ -78,14 +83,14 @@ 1 0 fromelf --bin !L --output rtthread-mdk.bin - + 0 0 0 0 0 - + 0 @@ -99,8 +104,8 @@ 0 0 3 - - + + 1 @@ -133,11 +138,11 @@ 1 BIN\UL2CM3.DLL - - - - - + + + + + 0 @@ -170,7 +175,7 @@ 0 0 "Cortex-M7" - + 0 0 0 @@ -302,7 +307,7 @@ 0x20000 - + 1 @@ -330,7 +335,7 @@ --library_interface=armcc --library_type=standardlib --diag_suppress=66,1296,186 SKIP_SYSCLK_INIT, CPU_MIMXRT1052DVL6A, FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1, EVK_MCIMXRM, FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE, RT_USING_ARM_LIBC - + applications;.;drivers;Libraries;Libraries\drivers;Libraries\utilities;Libraries\CMSIS\Include;..\..\include;..\..\libcpu\arm\cortex-m7;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\net\lwip-2.0.2\src;..\..\components\net\lwip-2.0.2\src\include;..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\components\net\lwip-2.0.2\src\arch\include;..\..\components\net\lwip-2.0.2\src\include\netif;..\..\components\net\lwip-2.0.2\src\include\posix @@ -346,10 +351,10 @@ 0 0 - - - - + + + + @@ -361,13 +366,13 @@ 0 0x00000000 0x10000000 - + .\Libraries\arm\MIMXRT1052xxxxx_flexspi_nor.scf - - + + --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab) - - + + @@ -380,22 +385,16 @@ 1 applications\device_test.c - - main.c 1 applications\main.c - - mem_dump.c 1 applications\mem_dump.c - - mem_test.c 1 @@ -411,62 +410,46 @@ 1 drivers\board.c - - - - usart.c - 1 - drivers\usart.c - - - hyper_flash_boot.c 1 drivers\hyper_flash_boot.c - - drv_sdram.c 1 drivers\drv_sdram.c - - drv_pin.c 1 drivers\drv_pin.c - - drv_hp_rtc.c 1 drivers\drv_hp_rtc.c - - drv_eth.c 1 drivers\drv_eth.c - - fsl_phy.c 1 drivers\fsl_phy.c - - drv_sdio.c 1 drivers\drv_sdio.c + + drv_uart.c + 1 + .\drivers\drv_uart.c +
@@ -477,421 +460,301 @@ 1 Libraries\drivers\fsl_adc.c - - fsl_adc_etc.c 1 Libraries\drivers\fsl_adc_etc.c - - fsl_aipstz.c 1 Libraries\drivers\fsl_aipstz.c - - fsl_aoi.c 1 Libraries\drivers\fsl_aoi.c - - fsl_bee.c 1 Libraries\drivers\fsl_bee.c - - fsl_cache.c 1 Libraries\drivers\fsl_cache.c - - fsl_clock.c 1 Libraries\drivers\fsl_clock.c - - fsl_cmp.c 1 Libraries\drivers\fsl_cmp.c - - fsl_common.c 1 Libraries\drivers\fsl_common.c - - fsl_csi.c 1 Libraries\drivers\fsl_csi.c - - fsl_dcdc.c 1 Libraries\drivers\fsl_dcdc.c - - fsl_dcp.c 1 Libraries\drivers\fsl_dcp.c - - fsl_dmamux.c 1 Libraries\drivers\fsl_dmamux.c - - fsl_edma.c 1 Libraries\drivers\fsl_edma.c - - fsl_elcdif.c 1 Libraries\drivers\fsl_elcdif.c - - fsl_enc.c 1 Libraries\drivers\fsl_enc.c - - fsl_enet.c 1 Libraries\drivers\fsl_enet.c - - fsl_ewm.c 1 Libraries\drivers\fsl_ewm.c - - fsl_flexcan.c 1 Libraries\drivers\fsl_flexcan.c - - fsl_flexio.c 1 Libraries\drivers\fsl_flexio.c - - fsl_flexio_i2c_master.c 1 Libraries\drivers\fsl_flexio_i2c_master.c - - fsl_flexio_i2s.c 1 Libraries\drivers\fsl_flexio_i2s.c - - fsl_flexio_i2s_edma.c 1 Libraries\drivers\fsl_flexio_i2s_edma.c - - fsl_flexio_spi.c 1 Libraries\drivers\fsl_flexio_spi.c - - fsl_flexio_spi_edma.c 1 Libraries\drivers\fsl_flexio_spi_edma.c - - fsl_flexio_uart.c 1 Libraries\drivers\fsl_flexio_uart.c - - fsl_flexio_uart_edma.c 1 Libraries\drivers\fsl_flexio_uart_edma.c - - fsl_flexram.c 1 Libraries\drivers\fsl_flexram.c - - fsl_flexspi.c 1 Libraries\drivers\fsl_flexspi.c - - fsl_gpc.c 1 Libraries\drivers\fsl_gpc.c - - fsl_gpio.c 1 Libraries\drivers\fsl_gpio.c - - fsl_gpt.c 1 Libraries\drivers\fsl_gpt.c - - fsl_kpp.c 1 Libraries\drivers\fsl_kpp.c - - fsl_lpi2c.c 1 Libraries\drivers\fsl_lpi2c.c - - fsl_lpi2c_edma.c 1 Libraries\drivers\fsl_lpi2c_edma.c - - fsl_lpspi.c 1 Libraries\drivers\fsl_lpspi.c - - fsl_lpspi_edma.c 1 Libraries\drivers\fsl_lpspi_edma.c - - fsl_lpuart.c 1 Libraries\drivers\fsl_lpuart.c - - fsl_lpuart_edma.c 1 Libraries\drivers\fsl_lpuart_edma.c - - fsl_pit.c 1 Libraries\drivers\fsl_pit.c - - fsl_pmu.c 1 Libraries\drivers\fsl_pmu.c - - fsl_pwm.c 1 Libraries\drivers\fsl_pwm.c - - fsl_pxp.c 1 Libraries\drivers\fsl_pxp.c - - fsl_qtmr.c 1 Libraries\drivers\fsl_qtmr.c - - fsl_rtwdog.c 1 Libraries\drivers\fsl_rtwdog.c - - fsl_sai.c 1 Libraries\drivers\fsl_sai.c - - fsl_sai_edma.c 1 Libraries\drivers\fsl_sai_edma.c - - fsl_semc.c 1 Libraries\drivers\fsl_semc.c - - fsl_snvs_hp.c 1 Libraries\drivers\fsl_snvs_hp.c - - fsl_snvs_lp.c 1 Libraries\drivers\fsl_snvs_lp.c - - fsl_spdif.c 1 Libraries\drivers\fsl_spdif.c - - fsl_spdif_edma.c 1 Libraries\drivers\fsl_spdif_edma.c - - fsl_src.c 1 Libraries\drivers\fsl_src.c - - fsl_trng.c 1 Libraries\drivers\fsl_trng.c - - fsl_tsc.c 1 Libraries\drivers\fsl_tsc.c - - fsl_usdhc.c 1 Libraries\drivers\fsl_usdhc.c - - fsl_wdog.c 1 Libraries\drivers\fsl_wdog.c - - fsl_xbara.c 1 Libraries\drivers\fsl_xbara.c - - fsl_xbarb.c 1 Libraries\drivers\fsl_xbarb.c - - system_MIMXRT1052.c 1 Libraries\system_MIMXRT1052.c - - startup_MIMXRT1052.s 2 @@ -907,85 +770,61 @@ 1 ..\..\src\clock.c - - components.c 1 ..\..\src\components.c - - device.c 1 ..\..\src\device.c - - idle.c 1 ..\..\src\idle.c - - ipc.c 1 ..\..\src\ipc.c - - irq.c 1 ..\..\src\irq.c - - kservice.c 1 ..\..\src\kservice.c - - memheap.c 1 ..\..\src\memheap.c - - object.c 1 ..\..\src\object.c - - scheduler.c 1 ..\..\src\scheduler.c - - signal.c 1 ..\..\src\signal.c - - thread.c 1 ..\..\src\thread.c - - timer.c 1 @@ -1001,29 +840,21 @@ 1 ..\..\libcpu\arm\cortex-m7\cpuport.c - - context_rvds.S 2 ..\..\libcpu\arm\cortex-m7\context_rvds.S - - backtrace.c 1 ..\..\libcpu\arm\common\backtrace.c - - div0.c 1 ..\..\libcpu\arm\common\div0.c - - showmem.c 1 @@ -1039,50 +870,36 @@ 1 ..\..\components\dfs\src\dfs.c - - dfs_file.c 1 ..\..\components\dfs\src\dfs_file.c - - dfs_fs.c 1 ..\..\components\dfs\src\dfs_fs.c - - dfs_posix.c 1 ..\..\components\dfs\src\dfs_posix.c - - devfs.c 1 ..\..\components\dfs\filesystems\devfs\devfs.c - - dfs_elm.c 1 ..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - ff.c 1 ..\..\components\dfs\filesystems\elmfat\ff.c - - ccsbcs.c 1 @@ -1098,113 +915,81 @@ 1 ..\..\components\drivers\i2c\i2c_core.c - - i2c_dev.c 1 ..\..\components\drivers\i2c\i2c_dev.c - - i2c-bit-ops.c 1 ..\..\components\drivers\i2c\i2c-bit-ops.c - - pin.c 1 ..\..\components\drivers\misc\pin.c - - rtc.c 1 ..\..\components\drivers\rtc\rtc.c - - block_dev.c 1 ..\..\components\drivers\sdio\block_dev.c - - mmcsd_core.c 1 ..\..\components\drivers\sdio\mmcsd_core.c - - sd.c 1 ..\..\components\drivers\sdio\sd.c - - sdio.c 1 ..\..\components\drivers\sdio\sdio.c - - mmc.c 1 ..\..\components\drivers\sdio\mmc.c - - serial.c 1 ..\..\components\drivers\serial\serial.c - - completion.c 1 ..\..\components\drivers\src\completion.c - - dataqueue.c 1 ..\..\components\drivers\src\dataqueue.c - - pipe.c 1 ..\..\components\drivers\src\pipe.c - - ringbuffer.c 1 ..\..\components\drivers\src\ringbuffer.c - - waitqueue.c 1 ..\..\components\drivers\src\waitqueue.c - - workqueue.c 1 @@ -1220,106 +1005,76 @@ 1 ..\..\components\finsh\shell.c - - symbol.c 1 ..\..\components\finsh\symbol.c - - cmd.c 1 ..\..\components\finsh\cmd.c - - msh.c 1 ..\..\components\finsh\msh.c - - msh_cmd.c 1 ..\..\components\finsh\msh_cmd.c - - msh_file.c 1 ..\..\components\finsh\msh_file.c - - finsh_compiler.c 1 ..\..\components\finsh\finsh_compiler.c - - finsh_error.c 1 ..\..\components\finsh\finsh_error.c - - finsh_heap.c 1 ..\..\components\finsh\finsh_heap.c - - finsh_init.c 1 ..\..\components\finsh\finsh_init.c - - finsh_node.c 1 ..\..\components\finsh\finsh_node.c - - finsh_ops.c 1 ..\..\components\finsh\finsh_ops.c - - finsh_parser.c 1 ..\..\components\finsh\finsh_parser.c - - finsh_var.c 1 ..\..\components\finsh\finsh_var.c - - finsh_vm.c 1 ..\..\components\finsh\finsh_vm.c - - finsh_token.c 1 @@ -1335,36 +1090,26 @@ 1 ..\..\components\libc\compilers\armlibc\libc.c - - libc_syms.c 1 ..\..\components\libc\compilers\armlibc\libc_syms.c - - mem_std.c 1 ..\..\components\libc\compilers\armlibc\mem_std.c - - stdio.c 1 ..\..\components\libc\compilers\armlibc\stdio.c - - stubs.c 1 ..\..\components\libc\compilers\armlibc\stubs.c - - time.c 1 @@ -1380,246 +1125,176 @@ 1 ..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - - api_lib.c 1 ..\..\components\net\lwip-2.0.2\src\api\api_lib.c - - api_msg.c 1 ..\..\components\net\lwip-2.0.2\src\api\api_msg.c - - err.c 1 ..\..\components\net\lwip-2.0.2\src\api\err.c - - netbuf.c 1 ..\..\components\net\lwip-2.0.2\src\api\netbuf.c - - netdb.c 1 ..\..\components\net\lwip-2.0.2\src\api\netdb.c - - netifapi.c 1 ..\..\components\net\lwip-2.0.2\src\api\netifapi.c - - sockets.c 1 ..\..\components\net\lwip-2.0.2\src\api\sockets.c - - tcpip.c 1 ..\..\components\net\lwip-2.0.2\src\api\tcpip.c - - def.c 1 ..\..\components\net\lwip-2.0.2\src\core\def.c - - dns.c 1 ..\..\components\net\lwip-2.0.2\src\core\dns.c - - inet_chksum.c 1 ..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - - init.c 1 ..\..\components\net\lwip-2.0.2\src\core\init.c - - ip.c 1 ..\..\components\net\lwip-2.0.2\src\core\ip.c - - memp.c 1 ..\..\components\net\lwip-2.0.2\src\core\memp.c - - netif.c 1 ..\..\components\net\lwip-2.0.2\src\core\netif.c - - pbuf.c 1 ..\..\components\net\lwip-2.0.2\src\core\pbuf.c - - raw.c 1 ..\..\components\net\lwip-2.0.2\src\core\raw.c - - stats.c 1 ..\..\components\net\lwip-2.0.2\src\core\stats.c - - sys.c 1 ..\..\components\net\lwip-2.0.2\src\core\sys.c - - tcp.c 1 ..\..\components\net\lwip-2.0.2\src\core\tcp.c - - tcp_in.c 1 ..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - - tcp_out.c 1 ..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - - timeouts.c 1 ..\..\components\net\lwip-2.0.2\src\core\timeouts.c - - udp.c 1 ..\..\components\net\lwip-2.0.2\src\core\udp.c - - ethernet.c 1 ..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - - ethernetif.c 1 ..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - - lowpan6.c 1 ..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - - autoip.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - - dhcp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - - etharp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - - icmp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - - igmp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - - ip4.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - - ip4_addr.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - - ip4_frag.c 1 @@ -1627,19 +1302,24 @@ + + ::CMSIS + + - + - + - + - + + From 1a24c9a29f2343e8c151e898c812682d077119a3 Mon Sep 17 00:00:00 2001 From: balanceTWK Date: Sun, 18 Mar 2018 15:56:15 +0800 Subject: [PATCH 11/19] =?UTF-8?q?[bsp]add=20other=20uart=20|=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=B6=E4=BB=96=E4=B8=B2=E5=8F=A3=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/drivers/SConscript | 2 +- bsp/imxrt1052-evk/project.ewp | 5099 +++++++++++++------------- bsp/imxrt1052-evk/project.uvoptx | 2184 +---------- bsp/imxrt1052-evk/project.uvprojx | 440 ++- 4 files changed, 2834 insertions(+), 4891 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/SConscript b/bsp/imxrt1052-evk/drivers/SConscript index 6ab68c0ea4..c18b8ca321 100644 --- a/bsp/imxrt1052-evk/drivers/SConscript +++ b/bsp/imxrt1052-evk/drivers/SConscript @@ -7,7 +7,7 @@ cwd = os.path.join(str(Dir('#')), 'drivers') # add the general drivers. src = Split(""" board.c -usart.c +drv_uart.c hyper_flash_boot.c drv_sdram.c """) diff --git a/bsp/imxrt1052-evk/project.ewp b/bsp/imxrt1052-evk/project.ewp index d3ff73d2a7..5443606ca3 100644 --- a/bsp/imxrt1052-evk/project.ewp +++ b/bsp/imxrt1052-evk/project.ewp @@ -1,2649 +1,2450 @@ - - - 3 - - Debug - - ARM - - 1 - - General - 3 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 20 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 34 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 20 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - - Applications - - $PROJ_DIR$\applications\device_test.c - - - $PROJ_DIR$\applications\main.c - - - $PROJ_DIR$\applications\mem_dump.c - - - $PROJ_DIR$\applications\mem_test.c - - - - CORTEX-M7 - - $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c - - - $PROJ_DIR$\..\..\libcpu\arm\cortex-m7\context_iar.S - - - $PROJ_DIR$\..\..\libcpu\arm\cortex-m7\cpuport.c - - - $PROJ_DIR$\..\..\libcpu\arm\common\div0.c - - - $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c - - - - DeviceDrivers - - $PROJ_DIR$\..\..\components\drivers\sdio\block_dev.c - - - $PROJ_DIR$\..\..\components\drivers\src\completion.c - - - $PROJ_DIR$\..\..\components\drivers\src\dataqueue.c - - - $PROJ_DIR$\..\..\components\drivers\i2c\i2c-bit-ops.c - - - $PROJ_DIR$\..\..\components\drivers\i2c\i2c_core.c - - - $PROJ_DIR$\..\..\components\drivers\i2c\i2c_dev.c - - - $PROJ_DIR$\..\..\components\drivers\sdio\mmc.c - - - $PROJ_DIR$\..\..\components\drivers\sdio\mmcsd_core.c - - - $PROJ_DIR$\..\..\components\drivers\src\pipe.c - - - $PROJ_DIR$\..\..\components\drivers\src\ringbuffer.c - - - $PROJ_DIR$\..\..\components\drivers\sdio\sd.c - - - $PROJ_DIR$\..\..\components\drivers\sdio\sdio.c - - - $PROJ_DIR$\..\..\components\drivers\serial\serial.c - - - $PROJ_DIR$\..\..\components\drivers\src\waitqueue.c - - - $PROJ_DIR$\..\..\components\drivers\src\workqueue.c - - - - dlib - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\environ.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\libc.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\rmtx.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\stdio.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_close.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_lseek.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_mem.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_open.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_read.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_remove.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_write.c - - - $PROJ_DIR$\..\..\components\libc\compilers\dlib\time.c - - - - Drivers - - $PROJ_DIR$\drivers\board.c - - - $PROJ_DIR$\drivers\drv_eth.c - - - $PROJ_DIR$\drivers\drv_sdio.c - - - $PROJ_DIR$\drivers\drv_sdram.c - - - $PROJ_DIR$\drivers\fsl_phy.c - - - $PROJ_DIR$\drivers\hyper_flash_boot.c - - - $PROJ_DIR$\drivers\usart.c - - - - Filesystem - - $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c - - - $PROJ_DIR$\..\..\components\dfs\filesystems\devfs\devfs.c - - - $PROJ_DIR$\..\..\components\dfs\src\dfs.c - - - $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - - - $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c - - - $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c - - - $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c - - - $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c - - - - finsh - - $PROJ_DIR$\..\..\components\finsh\cmd.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_error.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_heap.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_init.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_node.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_ops.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_parser.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_token.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_var.c - - - $PROJ_DIR$\..\..\components\finsh\finsh_vm.c - - - $PROJ_DIR$\..\..\components\finsh\msh.c - - - $PROJ_DIR$\..\..\components\finsh\msh_cmd.c - - - $PROJ_DIR$\..\..\components\finsh\msh_file.c - - - $PROJ_DIR$\..\..\components\finsh\shell.c - - - $PROJ_DIR$\..\..\components\finsh\symbol.c - - - - Kernel - - $PROJ_DIR$\..\..\src\clock.c - - - $PROJ_DIR$\..\..\src\components.c - - - $PROJ_DIR$\..\..\src\device.c - - - $PROJ_DIR$\..\..\src\idle.c - - - $PROJ_DIR$\..\..\src\ipc.c - - - $PROJ_DIR$\..\..\src\irq.c - - - $PROJ_DIR$\..\..\src\kservice.c - - - $PROJ_DIR$\..\..\src\memheap.c - - - $PROJ_DIR$\..\..\src\object.c - - - $PROJ_DIR$\..\..\src\scheduler.c - - - $PROJ_DIR$\..\..\src\signal.c - - - $PROJ_DIR$\..\..\src\thread.c - - - $PROJ_DIR$\..\..\src\timer.c - - - - Libraries - - $PROJ_DIR$\Libraries\drivers\fsl_adc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_adc_etc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_aipstz.c - - - $PROJ_DIR$\Libraries\drivers\fsl_aoi.c - - - $PROJ_DIR$\Libraries\drivers\fsl_bee.c - - - $PROJ_DIR$\Libraries\drivers\fsl_cache.c - - - $PROJ_DIR$\Libraries\drivers\fsl_clock.c - - - $PROJ_DIR$\Libraries\drivers\fsl_cmp.c - - - $PROJ_DIR$\Libraries\drivers\fsl_common.c - - - $PROJ_DIR$\Libraries\drivers\fsl_csi.c - - - $PROJ_DIR$\Libraries\drivers\fsl_dcdc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_dcp.c - - - $PROJ_DIR$\Libraries\drivers\fsl_dmamux.c - - - $PROJ_DIR$\Libraries\drivers\fsl_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_elcdif.c - - - $PROJ_DIR$\Libraries\drivers\fsl_enc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_enet.c - - - $PROJ_DIR$\Libraries\drivers\fsl_ewm.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexcan.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_i2c_master.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_i2s.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_i2s_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_spi.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_spi_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_uart.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexio_uart_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexram.c - - - $PROJ_DIR$\Libraries\drivers\fsl_flexspi.c - - - $PROJ_DIR$\Libraries\drivers\fsl_gpc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_gpio.c - - - $PROJ_DIR$\Libraries\drivers\fsl_gpt.c - - - $PROJ_DIR$\Libraries\drivers\fsl_kpp.c - - - $PROJ_DIR$\Libraries\drivers\fsl_lpi2c.c - - - $PROJ_DIR$\Libraries\drivers\fsl_lpi2c_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_lpspi.c - - - $PROJ_DIR$\Libraries\drivers\fsl_lpspi_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_lpuart.c - - - $PROJ_DIR$\Libraries\drivers\fsl_lpuart_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_pit.c - - - $PROJ_DIR$\Libraries\drivers\fsl_pmu.c - - - $PROJ_DIR$\Libraries\drivers\fsl_pwm.c - - - $PROJ_DIR$\Libraries\drivers\fsl_pxp.c - - - $PROJ_DIR$\Libraries\drivers\fsl_qtmr.c - - - $PROJ_DIR$\Libraries\drivers\fsl_rtwdog.c - - - $PROJ_DIR$\Libraries\drivers\fsl_sai.c - - - $PROJ_DIR$\Libraries\drivers\fsl_sai_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_semc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_snvs_hp.c - - - $PROJ_DIR$\Libraries\drivers\fsl_snvs_lp.c - - - $PROJ_DIR$\Libraries\drivers\fsl_spdif.c - - - $PROJ_DIR$\Libraries\drivers\fsl_spdif_edma.c - - - $PROJ_DIR$\Libraries\drivers\fsl_src.c - - - $PROJ_DIR$\Libraries\drivers\fsl_trng.c - - - $PROJ_DIR$\Libraries\drivers\fsl_tsc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_usdhc.c - - - $PROJ_DIR$\Libraries\drivers\fsl_wdog.c - - - $PROJ_DIR$\Libraries\drivers\fsl_xbara.c - - - $PROJ_DIR$\Libraries\drivers\fsl_xbarb.c - - - $PROJ_DIR$\Libraries\iar\startup_MIMXRT1052.s - - - $PROJ_DIR$\Libraries\system_MIMXRT1052.c - - - - lwIP - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\api_lib.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\api_msg.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\def.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\dns.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\err.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\init.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ip.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\memp.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netbuf.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netdb.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\netif.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netifapi.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\pbuf.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\raw.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\sockets.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\stats.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\sys.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\tcpip.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\timeouts.c - - - $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\udp.c - - - + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 21 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 14 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 21 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 28 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 14 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + Applications + + $PROJ_DIR$\applications\device_test.c + + + $PROJ_DIR$\applications\main.c + + + $PROJ_DIR$\applications\mem_dump.c + + + $PROJ_DIR$\applications\mem_test.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\drv_uart.c + + + $PROJ_DIR$\drivers\hyper_flash_boot.c + + + $PROJ_DIR$\drivers\drv_sdram.c + + + $PROJ_DIR$\drivers\drv_pin.c + + + $PROJ_DIR$\drivers\drv_hp_rtc.c + + + $PROJ_DIR$\drivers\drv_eth.c + + + $PROJ_DIR$\drivers\fsl_phy.c + + + $PROJ_DIR$\drivers\drv_sdio.c + + + + Libraries + + $PROJ_DIR$\Libraries\drivers\fsl_adc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_adc_etc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_aipstz.c + + + $PROJ_DIR$\Libraries\drivers\fsl_aoi.c + + + $PROJ_DIR$\Libraries\drivers\fsl_bee.c + + + $PROJ_DIR$\Libraries\drivers\fsl_cache.c + + + $PROJ_DIR$\Libraries\drivers\fsl_clock.c + + + $PROJ_DIR$\Libraries\drivers\fsl_cmp.c + + + $PROJ_DIR$\Libraries\drivers\fsl_common.c + + + $PROJ_DIR$\Libraries\drivers\fsl_csi.c + + + $PROJ_DIR$\Libraries\drivers\fsl_dcdc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_dcp.c + + + $PROJ_DIR$\Libraries\drivers\fsl_dmamux.c + + + $PROJ_DIR$\Libraries\drivers\fsl_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_elcdif.c + + + $PROJ_DIR$\Libraries\drivers\fsl_enc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_enet.c + + + $PROJ_DIR$\Libraries\drivers\fsl_ewm.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexcan.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_i2c_master.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_i2s.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_i2s_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_spi.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_spi_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_uart.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexio_uart_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexram.c + + + $PROJ_DIR$\Libraries\drivers\fsl_flexspi.c + + + $PROJ_DIR$\Libraries\drivers\fsl_gpc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_gpio.c + + + $PROJ_DIR$\Libraries\drivers\fsl_gpt.c + + + $PROJ_DIR$\Libraries\drivers\fsl_kpp.c + + + $PROJ_DIR$\Libraries\drivers\fsl_lpi2c.c + + + $PROJ_DIR$\Libraries\drivers\fsl_lpi2c_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_lpspi.c + + + $PROJ_DIR$\Libraries\drivers\fsl_lpspi_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_lpuart.c + + + $PROJ_DIR$\Libraries\drivers\fsl_lpuart_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_pit.c + + + $PROJ_DIR$\Libraries\drivers\fsl_pmu.c + + + $PROJ_DIR$\Libraries\drivers\fsl_pwm.c + + + $PROJ_DIR$\Libraries\drivers\fsl_pxp.c + + + $PROJ_DIR$\Libraries\drivers\fsl_qtmr.c + + + $PROJ_DIR$\Libraries\drivers\fsl_rtwdog.c + + + $PROJ_DIR$\Libraries\drivers\fsl_sai.c + + + $PROJ_DIR$\Libraries\drivers\fsl_sai_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_semc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_snvs_hp.c + + + $PROJ_DIR$\Libraries\drivers\fsl_snvs_lp.c + + + $PROJ_DIR$\Libraries\drivers\fsl_spdif.c + + + $PROJ_DIR$\Libraries\drivers\fsl_spdif_edma.c + + + $PROJ_DIR$\Libraries\drivers\fsl_src.c + + + $PROJ_DIR$\Libraries\drivers\fsl_trng.c + + + $PROJ_DIR$\Libraries\drivers\fsl_tsc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_usdhc.c + + + $PROJ_DIR$\Libraries\drivers\fsl_wdog.c + + + $PROJ_DIR$\Libraries\drivers\fsl_xbara.c + + + $PROJ_DIR$\Libraries\drivers\fsl_xbarb.c + + + $PROJ_DIR$\Libraries\system_MIMXRT1052.c + + + $PROJ_DIR$\Libraries\iar\startup_MIMXRT1052.s + + + + Kernel + + $PROJ_DIR$\..\..\src\clock.c + + + $PROJ_DIR$\..\..\src\components.c + + + $PROJ_DIR$\..\..\src\device.c + + + $PROJ_DIR$\..\..\src\idle.c + + + $PROJ_DIR$\..\..\src\ipc.c + + + $PROJ_DIR$\..\..\src\irq.c + + + $PROJ_DIR$\..\..\src\kservice.c + + + $PROJ_DIR$\..\..\src\memheap.c + + + $PROJ_DIR$\..\..\src\object.c + + + $PROJ_DIR$\..\..\src\scheduler.c + + + $PROJ_DIR$\..\..\src\signal.c + + + $PROJ_DIR$\..\..\src\thread.c + + + $PROJ_DIR$\..\..\src\timer.c + + + + CORTEX-M7 + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m7\cpuport.c + + + $PROJ_DIR$\..\..\libcpu\arm\cortex-m7\context_iar.S + + + $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\div0.c + + + $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c + + + + Filesystem + + $PROJ_DIR$\..\..\components\dfs\src\dfs.c + + + $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c + + + $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c + + + $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c + + + $PROJ_DIR$\..\..\components\dfs\filesystems\devfs\devfs.c + + + $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c + + + $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c + + + $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c + + + + DeviceDrivers + + $PROJ_DIR$\..\..\components\drivers\i2c\i2c_core.c + + + $PROJ_DIR$\..\..\components\drivers\i2c\i2c_dev.c + + + $PROJ_DIR$\..\..\components\drivers\i2c\i2c-bit-ops.c + + + $PROJ_DIR$\..\..\components\drivers\misc\pin.c + + + $PROJ_DIR$\..\..\components\drivers\rtc\rtc.c + + + $PROJ_DIR$\..\..\components\drivers\sdio\block_dev.c + + + $PROJ_DIR$\..\..\components\drivers\sdio\mmcsd_core.c + + + $PROJ_DIR$\..\..\components\drivers\sdio\sd.c + + + $PROJ_DIR$\..\..\components\drivers\sdio\sdio.c + + + $PROJ_DIR$\..\..\components\drivers\sdio\mmc.c + + + $PROJ_DIR$\..\..\components\drivers\serial\serial.c + + + $PROJ_DIR$\..\..\components\drivers\src\completion.c + + + $PROJ_DIR$\..\..\components\drivers\src\dataqueue.c + + + $PROJ_DIR$\..\..\components\drivers\src\pipe.c + + + $PROJ_DIR$\..\..\components\drivers\src\ringbuffer.c + + + $PROJ_DIR$\..\..\components\drivers\src\waitqueue.c + + + $PROJ_DIR$\..\..\components\drivers\src\workqueue.c + + + + finsh + + $PROJ_DIR$\..\..\components\finsh\shell.c + + + $PROJ_DIR$\..\..\components\finsh\symbol.c + + + $PROJ_DIR$\..\..\components\finsh\cmd.c + + + $PROJ_DIR$\..\..\components\finsh\msh.c + + + $PROJ_DIR$\..\..\components\finsh\msh_cmd.c + + + $PROJ_DIR$\..\..\components\finsh\msh_file.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_error.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_heap.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_init.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_node.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_ops.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_parser.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_var.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_vm.c + + + $PROJ_DIR$\..\..\components\finsh\finsh_token.c + + + + dlib + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\environ.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\libc.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\rmtx.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\stdio.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_close.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_lseek.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_mem.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_open.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_read.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_remove.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\syscall_write.c + + + $PROJ_DIR$\..\..\components\libc\compilers\dlib\time.c + + + + lwIP + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\api_lib.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\api_msg.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\err.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netdb.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\netifapi.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\sockets.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\api\tcpip.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\def.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\dns.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\init.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ip.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\memp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\netif.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\pbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\raw.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\stats.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\sys.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp_in.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\tcp_out.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\timeouts.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\udp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\ethernet.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c + + + $PROJ_DIR$\..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c + + + diff --git a/bsp/imxrt1052-evk/project.uvoptx b/bsp/imxrt1052-evk/project.uvoptx index 9022a79cdd..deca1cf444 100644 --- a/bsp/imxrt1052-evk/project.uvoptx +++ b/bsp/imxrt1052-evk/project.uvoptx @@ -73,7 +73,7 @@ 0 - 1 + 0 0 1 @@ -103,7 +103,7 @@ 1 0 0 - 2 + 3 @@ -179,2186 +179,6 @@ - - Applications - 1 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - applications\device_test.c - device_test.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - applications\main.c - main.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - applications\mem_dump.c - mem_dump.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - applications\mem_test.c - mem_test.c - 0 - 0 - - - - - Drivers - 1 - 0 - 0 - 0 - - 2 - 5 - 1 - 0 - 0 - 0 - drivers\board.c - board.c - 0 - 0 - - - 2 - 6 - 1 - 0 - 0 - 0 - drivers\hyper_flash_boot.c - hyper_flash_boot.c - 0 - 0 - - - 2 - 7 - 1 - 0 - 0 - 0 - drivers\drv_sdram.c - drv_sdram.c - 0 - 0 - - - 2 - 8 - 1 - 0 - 0 - 0 - drivers\drv_pin.c - drv_pin.c - 0 - 0 - - - 2 - 9 - 1 - 0 - 0 - 0 - drivers\drv_hp_rtc.c - drv_hp_rtc.c - 0 - 0 - - - 2 - 10 - 1 - 0 - 0 - 0 - drivers\drv_eth.c - drv_eth.c - 0 - 0 - - - 2 - 11 - 1 - 0 - 0 - 0 - drivers\fsl_phy.c - fsl_phy.c - 0 - 0 - - - 2 - 12 - 1 - 0 - 0 - 0 - drivers\drv_sdio.c - drv_sdio.c - 0 - 0 - - - 2 - 13 - 1 - 0 - 0 - 0 - .\drivers\drv_uart.c - drv_uart.c - 0 - 0 - - - - - Libraries - 0 - 0 - 0 - 0 - - 3 - 14 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_adc.c - fsl_adc.c - 0 - 0 - - - 3 - 15 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_adc_etc.c - fsl_adc_etc.c - 0 - 0 - - - 3 - 16 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_aipstz.c - fsl_aipstz.c - 0 - 0 - - - 3 - 17 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_aoi.c - fsl_aoi.c - 0 - 0 - - - 3 - 18 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_bee.c - fsl_bee.c - 0 - 0 - - - 3 - 19 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_cache.c - fsl_cache.c - 0 - 0 - - - 3 - 20 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_clock.c - fsl_clock.c - 0 - 0 - - - 3 - 21 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_cmp.c - fsl_cmp.c - 0 - 0 - - - 3 - 22 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_common.c - fsl_common.c - 0 - 0 - - - 3 - 23 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_csi.c - fsl_csi.c - 0 - 0 - - - 3 - 24 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_dcdc.c - fsl_dcdc.c - 0 - 0 - - - 3 - 25 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_dcp.c - fsl_dcp.c - 0 - 0 - - - 3 - 26 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_dmamux.c - fsl_dmamux.c - 0 - 0 - - - 3 - 27 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_edma.c - fsl_edma.c - 0 - 0 - - - 3 - 28 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_elcdif.c - fsl_elcdif.c - 0 - 0 - - - 3 - 29 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_enc.c - fsl_enc.c - 0 - 0 - - - 3 - 30 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_enet.c - fsl_enet.c - 0 - 0 - - - 3 - 31 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_ewm.c - fsl_ewm.c - 0 - 0 - - - 3 - 32 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexcan.c - fsl_flexcan.c - 0 - 0 - - - 3 - 33 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio.c - fsl_flexio.c - 0 - 0 - - - 3 - 34 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_i2c_master.c - fsl_flexio_i2c_master.c - 0 - 0 - - - 3 - 35 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_i2s.c - fsl_flexio_i2s.c - 0 - 0 - - - 3 - 36 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_i2s_edma.c - fsl_flexio_i2s_edma.c - 0 - 0 - - - 3 - 37 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_spi.c - fsl_flexio_spi.c - 0 - 0 - - - 3 - 38 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_spi_edma.c - fsl_flexio_spi_edma.c - 0 - 0 - - - 3 - 39 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_uart.c - fsl_flexio_uart.c - 0 - 0 - - - 3 - 40 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexio_uart_edma.c - fsl_flexio_uart_edma.c - 0 - 0 - - - 3 - 41 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexram.c - fsl_flexram.c - 0 - 0 - - - 3 - 42 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_flexspi.c - fsl_flexspi.c - 0 - 0 - - - 3 - 43 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_gpc.c - fsl_gpc.c - 0 - 0 - - - 3 - 44 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_gpio.c - fsl_gpio.c - 0 - 0 - - - 3 - 45 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_gpt.c - fsl_gpt.c - 0 - 0 - - - 3 - 46 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_kpp.c - fsl_kpp.c - 0 - 0 - - - 3 - 47 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_lpi2c.c - fsl_lpi2c.c - 0 - 0 - - - 3 - 48 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_lpi2c_edma.c - fsl_lpi2c_edma.c - 0 - 0 - - - 3 - 49 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_lpspi.c - fsl_lpspi.c - 0 - 0 - - - 3 - 50 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_lpspi_edma.c - fsl_lpspi_edma.c - 0 - 0 - - - 3 - 51 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_lpuart.c - fsl_lpuart.c - 0 - 0 - - - 3 - 52 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_lpuart_edma.c - fsl_lpuart_edma.c - 0 - 0 - - - 3 - 53 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_pit.c - fsl_pit.c - 0 - 0 - - - 3 - 54 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_pmu.c - fsl_pmu.c - 0 - 0 - - - 3 - 55 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_pwm.c - fsl_pwm.c - 0 - 0 - - - 3 - 56 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_pxp.c - fsl_pxp.c - 0 - 0 - - - 3 - 57 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_qtmr.c - fsl_qtmr.c - 0 - 0 - - - 3 - 58 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_rtwdog.c - fsl_rtwdog.c - 0 - 0 - - - 3 - 59 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_sai.c - fsl_sai.c - 0 - 0 - - - 3 - 60 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_sai_edma.c - fsl_sai_edma.c - 0 - 0 - - - 3 - 61 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_semc.c - fsl_semc.c - 0 - 0 - - - 3 - 62 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_snvs_hp.c - fsl_snvs_hp.c - 0 - 0 - - - 3 - 63 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_snvs_lp.c - fsl_snvs_lp.c - 0 - 0 - - - 3 - 64 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_spdif.c - fsl_spdif.c - 0 - 0 - - - 3 - 65 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_spdif_edma.c - fsl_spdif_edma.c - 0 - 0 - - - 3 - 66 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_src.c - fsl_src.c - 0 - 0 - - - 3 - 67 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_trng.c - fsl_trng.c - 0 - 0 - - - 3 - 68 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_tsc.c - fsl_tsc.c - 0 - 0 - - - 3 - 69 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_usdhc.c - fsl_usdhc.c - 0 - 0 - - - 3 - 70 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_wdog.c - fsl_wdog.c - 0 - 0 - - - 3 - 71 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_xbara.c - fsl_xbara.c - 0 - 0 - - - 3 - 72 - 1 - 0 - 0 - 0 - Libraries\drivers\fsl_xbarb.c - fsl_xbarb.c - 0 - 0 - - - 3 - 73 - 1 - 0 - 0 - 0 - Libraries\system_MIMXRT1052.c - system_MIMXRT1052.c - 0 - 0 - - - 3 - 74 - 2 - 0 - 0 - 0 - Libraries\arm\startup_MIMXRT1052.s - startup_MIMXRT1052.s - 0 - 0 - - - - - Kernel - 0 - 0 - 0 - 0 - - 4 - 75 - 1 - 0 - 0 - 0 - ..\..\src\clock.c - clock.c - 0 - 0 - - - 4 - 76 - 1 - 0 - 0 - 0 - ..\..\src\components.c - components.c - 0 - 0 - - - 4 - 77 - 1 - 0 - 0 - 0 - ..\..\src\device.c - device.c - 0 - 0 - - - 4 - 78 - 1 - 0 - 0 - 0 - ..\..\src\idle.c - idle.c - 0 - 0 - - - 4 - 79 - 1 - 0 - 0 - 0 - ..\..\src\ipc.c - ipc.c - 0 - 0 - - - 4 - 80 - 1 - 0 - 0 - 0 - ..\..\src\irq.c - irq.c - 0 - 0 - - - 4 - 81 - 1 - 0 - 0 - 0 - ..\..\src\kservice.c - kservice.c - 0 - 0 - - - 4 - 82 - 1 - 0 - 0 - 0 - ..\..\src\memheap.c - memheap.c - 0 - 0 - - - 4 - 83 - 1 - 0 - 0 - 0 - ..\..\src\object.c - object.c - 0 - 0 - - - 4 - 84 - 1 - 0 - 0 - 0 - ..\..\src\scheduler.c - scheduler.c - 0 - 0 - - - 4 - 85 - 1 - 0 - 0 - 0 - ..\..\src\signal.c - signal.c - 0 - 0 - - - 4 - 86 - 1 - 0 - 0 - 0 - ..\..\src\thread.c - thread.c - 0 - 0 - - - 4 - 87 - 1 - 0 - 0 - 0 - ..\..\src\timer.c - timer.c - 0 - 0 - - - - - CORTEX-M7 - 0 - 0 - 0 - 0 - - 5 - 88 - 1 - 0 - 0 - 0 - ..\..\libcpu\arm\cortex-m7\cpuport.c - cpuport.c - 0 - 0 - - - 5 - 89 - 2 - 0 - 0 - 0 - ..\..\libcpu\arm\cortex-m7\context_rvds.S - context_rvds.S - 0 - 0 - - - 5 - 90 - 1 - 0 - 0 - 0 - ..\..\libcpu\arm\common\backtrace.c - backtrace.c - 0 - 0 - - - 5 - 91 - 1 - 0 - 0 - 0 - ..\..\libcpu\arm\common\div0.c - div0.c - 0 - 0 - - - 5 - 92 - 1 - 0 - 0 - 0 - ..\..\libcpu\arm\common\showmem.c - showmem.c - 0 - 0 - - - - - Filesystem - 0 - 0 - 0 - 0 - - 6 - 93 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs.c - dfs.c - 0 - 0 - - - 6 - 94 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs_file.c - dfs_file.c - 0 - 0 - - - 6 - 95 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs_fs.c - dfs_fs.c - 0 - 0 - - - 6 - 96 - 1 - 0 - 0 - 0 - ..\..\components\dfs\src\dfs_posix.c - dfs_posix.c - 0 - 0 - - - 6 - 97 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\devfs\devfs.c - devfs.c - 0 - 0 - - - 6 - 98 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\elmfat\dfs_elm.c - dfs_elm.c - 0 - 0 - - - 6 - 99 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\elmfat\ff.c - ff.c - 0 - 0 - - - 6 - 100 - 1 - 0 - 0 - 0 - ..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c - ccsbcs.c - 0 - 0 - - - - - DeviceDrivers - 0 - 0 - 0 - 0 - - 7 - 101 - 1 - 0 - 0 - 0 - ..\..\components\drivers\i2c\i2c_core.c - i2c_core.c - 0 - 0 - - - 7 - 102 - 1 - 0 - 0 - 0 - ..\..\components\drivers\i2c\i2c_dev.c - i2c_dev.c - 0 - 0 - - - 7 - 103 - 1 - 0 - 0 - 0 - ..\..\components\drivers\i2c\i2c-bit-ops.c - i2c-bit-ops.c - 0 - 0 - - - 7 - 104 - 1 - 0 - 0 - 0 - ..\..\components\drivers\misc\pin.c - pin.c - 0 - 0 - - - 7 - 105 - 1 - 0 - 0 - 0 - ..\..\components\drivers\rtc\rtc.c - rtc.c - 0 - 0 - - - 7 - 106 - 1 - 0 - 0 - 0 - ..\..\components\drivers\sdio\block_dev.c - block_dev.c - 0 - 0 - - - 7 - 107 - 1 - 0 - 0 - 0 - ..\..\components\drivers\sdio\mmcsd_core.c - mmcsd_core.c - 0 - 0 - - - 7 - 108 - 1 - 0 - 0 - 0 - ..\..\components\drivers\sdio\sd.c - sd.c - 0 - 0 - - - 7 - 109 - 1 - 0 - 0 - 0 - ..\..\components\drivers\sdio\sdio.c - sdio.c - 0 - 0 - - - 7 - 110 - 1 - 0 - 0 - 0 - ..\..\components\drivers\sdio\mmc.c - mmc.c - 0 - 0 - - - 7 - 111 - 1 - 0 - 0 - 0 - ..\..\components\drivers\serial\serial.c - serial.c - 0 - 0 - - - 7 - 112 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\completion.c - completion.c - 0 - 0 - - - 7 - 113 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\dataqueue.c - dataqueue.c - 0 - 0 - - - 7 - 114 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\pipe.c - pipe.c - 0 - 0 - - - 7 - 115 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\ringbuffer.c - ringbuffer.c - 0 - 0 - - - 7 - 116 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\waitqueue.c - waitqueue.c - 0 - 0 - - - 7 - 117 - 1 - 0 - 0 - 0 - ..\..\components\drivers\src\workqueue.c - workqueue.c - 0 - 0 - - - - - finsh - 0 - 0 - 0 - 0 - - 8 - 118 - 1 - 0 - 0 - 0 - ..\..\components\finsh\shell.c - shell.c - 0 - 0 - - - 8 - 119 - 1 - 0 - 0 - 0 - ..\..\components\finsh\symbol.c - symbol.c - 0 - 0 - - - 8 - 120 - 1 - 0 - 0 - 0 - ..\..\components\finsh\cmd.c - cmd.c - 0 - 0 - - - 8 - 121 - 1 - 0 - 0 - 0 - ..\..\components\finsh\msh.c - msh.c - 0 - 0 - - - 8 - 122 - 1 - 0 - 0 - 0 - ..\..\components\finsh\msh_cmd.c - msh_cmd.c - 0 - 0 - - - 8 - 123 - 1 - 0 - 0 - 0 - ..\..\components\finsh\msh_file.c - msh_file.c - 0 - 0 - - - 8 - 124 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_compiler.c - finsh_compiler.c - 0 - 0 - - - 8 - 125 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_error.c - finsh_error.c - 0 - 0 - - - 8 - 126 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_heap.c - finsh_heap.c - 0 - 0 - - - 8 - 127 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_init.c - finsh_init.c - 0 - 0 - - - 8 - 128 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_node.c - finsh_node.c - 0 - 0 - - - 8 - 129 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_ops.c - finsh_ops.c - 0 - 0 - - - 8 - 130 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_parser.c - finsh_parser.c - 0 - 0 - - - 8 - 131 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_var.c - finsh_var.c - 0 - 0 - - - 8 - 132 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_vm.c - finsh_vm.c - 0 - 0 - - - 8 - 133 - 1 - 0 - 0 - 0 - ..\..\components\finsh\finsh_token.c - finsh_token.c - 0 - 0 - - - - - libc - 0 - 0 - 0 - 0 - - 9 - 134 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\libc.c - libc.c - 0 - 0 - - - 9 - 135 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\libc_syms.c - libc_syms.c - 0 - 0 - - - 9 - 136 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\mem_std.c - mem_std.c - 0 - 0 - - - 9 - 137 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\stdio.c - stdio.c - 0 - 0 - - - 9 - 138 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\stubs.c - stubs.c - 0 - 0 - - - 9 - 139 - 1 - 0 - 0 - 0 - ..\..\components\libc\compilers\armlibc\time.c - time.c - 0 - 0 - - - - - lwIP - 0 - 0 - 0 - 0 - - 10 - 140 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c - sys_arch.c - 0 - 0 - - - 10 - 141 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\api_lib.c - api_lib.c - 0 - 0 - - - 10 - 142 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\api_msg.c - api_msg.c - 0 - 0 - - - 10 - 143 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\err.c - err.c - 0 - 0 - - - 10 - 144 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\netbuf.c - netbuf.c - 0 - 0 - - - 10 - 145 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\netdb.c - netdb.c - 0 - 0 - - - 10 - 146 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\netifapi.c - netifapi.c - 0 - 0 - - - 10 - 147 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\sockets.c - sockets.c - 0 - 0 - - - 10 - 148 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\api\tcpip.c - tcpip.c - 0 - 0 - - - 10 - 149 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\def.c - def.c - 0 - 0 - - - 10 - 150 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\dns.c - dns.c - 0 - 0 - - - 10 - 151 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c - inet_chksum.c - 0 - 0 - - - 10 - 152 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\init.c - init.c - 0 - 0 - - - 10 - 153 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ip.c - ip.c - 0 - 0 - - - 10 - 154 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\memp.c - memp.c - 0 - 0 - - - 10 - 155 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\netif.c - netif.c - 0 - 0 - - - 10 - 156 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\pbuf.c - pbuf.c - 0 - 0 - - - 10 - 157 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\raw.c - raw.c - 0 - 0 - - - 10 - 158 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\stats.c - stats.c - 0 - 0 - - - 10 - 159 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\sys.c - sys.c - 0 - 0 - - - 10 - 160 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\tcp.c - tcp.c - 0 - 0 - - - 10 - 161 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\tcp_in.c - tcp_in.c - 0 - 0 - - - 10 - 162 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\tcp_out.c - tcp_out.c - 0 - 0 - - - 10 - 163 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\timeouts.c - timeouts.c - 0 - 0 - - - 10 - 164 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\udp.c - udp.c - 0 - 0 - - - 10 - 165 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\netif\ethernet.c - ethernet.c - 0 - 0 - - - 10 - 166 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c - ethernetif.c - 0 - 0 - - - 10 - 167 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c - lowpan6.c - 0 - 0 - - - 10 - 168 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c - autoip.c - 0 - 0 - - - 10 - 169 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c - dhcp.c - 0 - 0 - - - 10 - 170 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c - etharp.c - 0 - 0 - - - 10 - 171 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c - icmp.c - 0 - 0 - - - 10 - 172 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c - igmp.c - 0 - 0 - - - 10 - 173 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c - ip4.c - 0 - 0 - - - 10 - 174 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c - ip4_addr.c - 0 - 0 - - - 10 - 175 - 1 - 0 - 0 - 0 - ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c - ip4_frag.c - 0 - 0 - - - ::CMSIS 0 diff --git a/bsp/imxrt1052-evk/project.uvprojx b/bsp/imxrt1052-evk/project.uvprojx index d8e8902a14..2c067820c8 100644 --- a/bsp/imxrt1052-evk/project.uvprojx +++ b/bsp/imxrt1052-evk/project.uvprojx @@ -1,16 +1,13 @@ - 2.1 -
### uVision Project, (C) Keil Software
- RT-Thread IMXRT1052 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC + 5060528::V5.06 update 5 (build 528)::ARMCC 0 @@ -19,28 +16,28 @@ NXP.iMXRT_DFP.1.0.2 http://mcuxpresso.nxp.com/cmsis_pack/repo/ IRAM(0x20000000,0x00060000) IRAM2(0x00000000,0x00020000) CPUTYPE("Cortex-M7") FPU3(SFPU) CLOCK(12000000) ELITTLE - - + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0RT1050 -FS060000000 -FL04000000 -FP0($$Device:MIMXRT1052$Flash\RT1050.FLM)) 0 $$Device:MIMXRT1052$Device\Include\MIMXRT1052.h - - - - - - - - - + + + + + + + + + $$Device:MIMXRT1052$SVD\MIMXRT1052.svd 0 0 - - - - - + + + + + 0 0 @@ -62,8 +59,8 @@ 0 0 - - + + 0 0 0 @@ -72,8 +69,8 @@ 0 0 - - + + 0 0 0 @@ -83,14 +80,14 @@ 1 0 fromelf --bin !L --output rtthread-mdk.bin - + 0 0 0 0 0 - + 0 @@ -104,8 +101,8 @@ 0 0 3 - - + + 1 @@ -138,11 +135,11 @@ 1 BIN\UL2CM3.DLL - - - - - + + + + + 0 @@ -175,7 +172,7 @@ 0 0 "Cortex-M7" - + 0 0 0 @@ -307,7 +304,7 @@ 0x20000 - + 1 @@ -335,7 +332,7 @@ --library_interface=armcc --library_type=standardlib --diag_suppress=66,1296,186 SKIP_SYSCLK_INIT, CPU_MIMXRT1052DVL6A, FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1, EVK_MCIMXRM, FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE, RT_USING_ARM_LIBC - + applications;.;drivers;Libraries;Libraries\drivers;Libraries\utilities;Libraries\CMSIS\Include;..\..\include;..\..\libcpu\arm\cortex-m7;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\net\lwip-2.0.2\src;..\..\components\net\lwip-2.0.2\src\include;..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\components\net\lwip-2.0.2\src\arch\include;..\..\components\net\lwip-2.0.2\src\include\netif;..\..\components\net\lwip-2.0.2\src\include\posix @@ -351,10 +348,10 @@ 0 0 - - - - + + + + @@ -366,13 +363,13 @@ 0 0x00000000 0x10000000 - + .\Libraries\arm\MIMXRT1052xxxxx_flexspi_nor.scf - - + + --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab) - - + + @@ -385,16 +382,22 @@ 1 applications\device_test.c + + main.c 1 applications\main.c + + mem_dump.c 1 applications\mem_dump.c + + mem_test.c 1 @@ -410,46 +413,62 @@ 1 drivers\board.c + + + + drv_uart.c + 1 + drivers\drv_uart.c + + + hyper_flash_boot.c 1 drivers\hyper_flash_boot.c + + drv_sdram.c 1 drivers\drv_sdram.c + + drv_pin.c 1 drivers\drv_pin.c + + drv_hp_rtc.c 1 drivers\drv_hp_rtc.c + + drv_eth.c 1 drivers\drv_eth.c + + fsl_phy.c 1 drivers\fsl_phy.c + + drv_sdio.c 1 drivers\drv_sdio.c - - drv_uart.c - 1 - .\drivers\drv_uart.c -
@@ -460,301 +479,421 @@ 1 Libraries\drivers\fsl_adc.c + + fsl_adc_etc.c 1 Libraries\drivers\fsl_adc_etc.c + + fsl_aipstz.c 1 Libraries\drivers\fsl_aipstz.c + + fsl_aoi.c 1 Libraries\drivers\fsl_aoi.c + + fsl_bee.c 1 Libraries\drivers\fsl_bee.c + + fsl_cache.c 1 Libraries\drivers\fsl_cache.c + + fsl_clock.c 1 Libraries\drivers\fsl_clock.c + + fsl_cmp.c 1 Libraries\drivers\fsl_cmp.c + + fsl_common.c 1 Libraries\drivers\fsl_common.c + + fsl_csi.c 1 Libraries\drivers\fsl_csi.c + + fsl_dcdc.c 1 Libraries\drivers\fsl_dcdc.c + + fsl_dcp.c 1 Libraries\drivers\fsl_dcp.c + + fsl_dmamux.c 1 Libraries\drivers\fsl_dmamux.c + + fsl_edma.c 1 Libraries\drivers\fsl_edma.c + + fsl_elcdif.c 1 Libraries\drivers\fsl_elcdif.c + + fsl_enc.c 1 Libraries\drivers\fsl_enc.c + + fsl_enet.c 1 Libraries\drivers\fsl_enet.c + + fsl_ewm.c 1 Libraries\drivers\fsl_ewm.c + + fsl_flexcan.c 1 Libraries\drivers\fsl_flexcan.c + + fsl_flexio.c 1 Libraries\drivers\fsl_flexio.c + + fsl_flexio_i2c_master.c 1 Libraries\drivers\fsl_flexio_i2c_master.c + + fsl_flexio_i2s.c 1 Libraries\drivers\fsl_flexio_i2s.c + + fsl_flexio_i2s_edma.c 1 Libraries\drivers\fsl_flexio_i2s_edma.c + + fsl_flexio_spi.c 1 Libraries\drivers\fsl_flexio_spi.c + + fsl_flexio_spi_edma.c 1 Libraries\drivers\fsl_flexio_spi_edma.c + + fsl_flexio_uart.c 1 Libraries\drivers\fsl_flexio_uart.c + + fsl_flexio_uart_edma.c 1 Libraries\drivers\fsl_flexio_uart_edma.c + + fsl_flexram.c 1 Libraries\drivers\fsl_flexram.c + + fsl_flexspi.c 1 Libraries\drivers\fsl_flexspi.c + + fsl_gpc.c 1 Libraries\drivers\fsl_gpc.c + + fsl_gpio.c 1 Libraries\drivers\fsl_gpio.c + + fsl_gpt.c 1 Libraries\drivers\fsl_gpt.c + + fsl_kpp.c 1 Libraries\drivers\fsl_kpp.c + + fsl_lpi2c.c 1 Libraries\drivers\fsl_lpi2c.c + + fsl_lpi2c_edma.c 1 Libraries\drivers\fsl_lpi2c_edma.c + + fsl_lpspi.c 1 Libraries\drivers\fsl_lpspi.c + + fsl_lpspi_edma.c 1 Libraries\drivers\fsl_lpspi_edma.c + + fsl_lpuart.c 1 Libraries\drivers\fsl_lpuart.c + + fsl_lpuart_edma.c 1 Libraries\drivers\fsl_lpuart_edma.c + + fsl_pit.c 1 Libraries\drivers\fsl_pit.c + + fsl_pmu.c 1 Libraries\drivers\fsl_pmu.c + + fsl_pwm.c 1 Libraries\drivers\fsl_pwm.c + + fsl_pxp.c 1 Libraries\drivers\fsl_pxp.c + + fsl_qtmr.c 1 Libraries\drivers\fsl_qtmr.c + + fsl_rtwdog.c 1 Libraries\drivers\fsl_rtwdog.c + + fsl_sai.c 1 Libraries\drivers\fsl_sai.c + + fsl_sai_edma.c 1 Libraries\drivers\fsl_sai_edma.c + + fsl_semc.c 1 Libraries\drivers\fsl_semc.c + + fsl_snvs_hp.c 1 Libraries\drivers\fsl_snvs_hp.c + + fsl_snvs_lp.c 1 Libraries\drivers\fsl_snvs_lp.c + + fsl_spdif.c 1 Libraries\drivers\fsl_spdif.c + + fsl_spdif_edma.c 1 Libraries\drivers\fsl_spdif_edma.c + + fsl_src.c 1 Libraries\drivers\fsl_src.c + + fsl_trng.c 1 Libraries\drivers\fsl_trng.c + + fsl_tsc.c 1 Libraries\drivers\fsl_tsc.c + + fsl_usdhc.c 1 Libraries\drivers\fsl_usdhc.c + + fsl_wdog.c 1 Libraries\drivers\fsl_wdog.c + + fsl_xbara.c 1 Libraries\drivers\fsl_xbara.c + + fsl_xbarb.c 1 Libraries\drivers\fsl_xbarb.c + + system_MIMXRT1052.c 1 Libraries\system_MIMXRT1052.c + + startup_MIMXRT1052.s 2 @@ -770,61 +909,85 @@ 1 ..\..\src\clock.c + + components.c 1 ..\..\src\components.c + + device.c 1 ..\..\src\device.c + + idle.c 1 ..\..\src\idle.c + + ipc.c 1 ..\..\src\ipc.c + + irq.c 1 ..\..\src\irq.c + + kservice.c 1 ..\..\src\kservice.c + + memheap.c 1 ..\..\src\memheap.c + + object.c 1 ..\..\src\object.c + + scheduler.c 1 ..\..\src\scheduler.c + + signal.c 1 ..\..\src\signal.c + + thread.c 1 ..\..\src\thread.c + + timer.c 1 @@ -840,21 +1003,29 @@ 1 ..\..\libcpu\arm\cortex-m7\cpuport.c + + context_rvds.S 2 ..\..\libcpu\arm\cortex-m7\context_rvds.S + + backtrace.c 1 ..\..\libcpu\arm\common\backtrace.c + + div0.c 1 ..\..\libcpu\arm\common\div0.c + + showmem.c 1 @@ -870,36 +1041,50 @@ 1 ..\..\components\dfs\src\dfs.c + + dfs_file.c 1 ..\..\components\dfs\src\dfs_file.c + + dfs_fs.c 1 ..\..\components\dfs\src\dfs_fs.c + + dfs_posix.c 1 ..\..\components\dfs\src\dfs_posix.c + + devfs.c 1 ..\..\components\dfs\filesystems\devfs\devfs.c + + dfs_elm.c 1 ..\..\components\dfs\filesystems\elmfat\dfs_elm.c + + ff.c 1 ..\..\components\dfs\filesystems\elmfat\ff.c + + ccsbcs.c 1 @@ -915,81 +1100,113 @@ 1 ..\..\components\drivers\i2c\i2c_core.c + + i2c_dev.c 1 ..\..\components\drivers\i2c\i2c_dev.c + + i2c-bit-ops.c 1 ..\..\components\drivers\i2c\i2c-bit-ops.c + + pin.c 1 ..\..\components\drivers\misc\pin.c + + rtc.c 1 ..\..\components\drivers\rtc\rtc.c + + block_dev.c 1 ..\..\components\drivers\sdio\block_dev.c + + mmcsd_core.c 1 ..\..\components\drivers\sdio\mmcsd_core.c + + sd.c 1 ..\..\components\drivers\sdio\sd.c + + sdio.c 1 ..\..\components\drivers\sdio\sdio.c + + mmc.c 1 ..\..\components\drivers\sdio\mmc.c + + serial.c 1 ..\..\components\drivers\serial\serial.c + + completion.c 1 ..\..\components\drivers\src\completion.c + + dataqueue.c 1 ..\..\components\drivers\src\dataqueue.c + + pipe.c 1 ..\..\components\drivers\src\pipe.c + + ringbuffer.c 1 ..\..\components\drivers\src\ringbuffer.c + + waitqueue.c 1 ..\..\components\drivers\src\waitqueue.c + + workqueue.c 1 @@ -1005,76 +1222,106 @@ 1 ..\..\components\finsh\shell.c + + symbol.c 1 ..\..\components\finsh\symbol.c + + cmd.c 1 ..\..\components\finsh\cmd.c + + msh.c 1 ..\..\components\finsh\msh.c + + msh_cmd.c 1 ..\..\components\finsh\msh_cmd.c + + msh_file.c 1 ..\..\components\finsh\msh_file.c + + finsh_compiler.c 1 ..\..\components\finsh\finsh_compiler.c + + finsh_error.c 1 ..\..\components\finsh\finsh_error.c + + finsh_heap.c 1 ..\..\components\finsh\finsh_heap.c + + finsh_init.c 1 ..\..\components\finsh\finsh_init.c + + finsh_node.c 1 ..\..\components\finsh\finsh_node.c + + finsh_ops.c 1 ..\..\components\finsh\finsh_ops.c + + finsh_parser.c 1 ..\..\components\finsh\finsh_parser.c + + finsh_var.c 1 ..\..\components\finsh\finsh_var.c + + finsh_vm.c 1 ..\..\components\finsh\finsh_vm.c + + finsh_token.c 1 @@ -1090,26 +1337,36 @@ 1 ..\..\components\libc\compilers\armlibc\libc.c + + libc_syms.c 1 ..\..\components\libc\compilers\armlibc\libc_syms.c + + mem_std.c 1 ..\..\components\libc\compilers\armlibc\mem_std.c + + stdio.c 1 ..\..\components\libc\compilers\armlibc\stdio.c + + stubs.c 1 ..\..\components\libc\compilers\armlibc\stubs.c + + time.c 1 @@ -1125,176 +1382,246 @@ 1 ..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c + + api_lib.c 1 ..\..\components\net\lwip-2.0.2\src\api\api_lib.c + + api_msg.c 1 ..\..\components\net\lwip-2.0.2\src\api\api_msg.c + + err.c 1 ..\..\components\net\lwip-2.0.2\src\api\err.c + + netbuf.c 1 ..\..\components\net\lwip-2.0.2\src\api\netbuf.c + + netdb.c 1 ..\..\components\net\lwip-2.0.2\src\api\netdb.c + + netifapi.c 1 ..\..\components\net\lwip-2.0.2\src\api\netifapi.c + + sockets.c 1 ..\..\components\net\lwip-2.0.2\src\api\sockets.c + + tcpip.c 1 ..\..\components\net\lwip-2.0.2\src\api\tcpip.c + + def.c 1 ..\..\components\net\lwip-2.0.2\src\core\def.c + + dns.c 1 ..\..\components\net\lwip-2.0.2\src\core\dns.c + + inet_chksum.c 1 ..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c + + init.c 1 ..\..\components\net\lwip-2.0.2\src\core\init.c + + ip.c 1 ..\..\components\net\lwip-2.0.2\src\core\ip.c + + memp.c 1 ..\..\components\net\lwip-2.0.2\src\core\memp.c + + netif.c 1 ..\..\components\net\lwip-2.0.2\src\core\netif.c + + pbuf.c 1 ..\..\components\net\lwip-2.0.2\src\core\pbuf.c + + raw.c 1 ..\..\components\net\lwip-2.0.2\src\core\raw.c + + stats.c 1 ..\..\components\net\lwip-2.0.2\src\core\stats.c + + sys.c 1 ..\..\components\net\lwip-2.0.2\src\core\sys.c + + tcp.c 1 ..\..\components\net\lwip-2.0.2\src\core\tcp.c + + tcp_in.c 1 ..\..\components\net\lwip-2.0.2\src\core\tcp_in.c + + tcp_out.c 1 ..\..\components\net\lwip-2.0.2\src\core\tcp_out.c + + timeouts.c 1 ..\..\components\net\lwip-2.0.2\src\core\timeouts.c + + udp.c 1 ..\..\components\net\lwip-2.0.2\src\core\udp.c + + ethernet.c 1 ..\..\components\net\lwip-2.0.2\src\netif\ethernet.c + + ethernetif.c 1 ..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c + + lowpan6.c 1 ..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c + + autoip.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c + + dhcp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c + + etharp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c + + icmp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c + + igmp.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c + + ip4.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c + + ip4_addr.c 1 ..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c + + ip4_frag.c 1 @@ -1302,24 +1629,19 @@ - - ::CMSIS - - - + - + - + - + - From 38169bb51af0ecf70377da2952c3241ba85ce65c Mon Sep 17 00:00:00 2001 From: zyh Date: Sun, 18 Mar 2018 17:22:22 +0800 Subject: [PATCH 12/19] [Components][Dfs][Fat]fix mkfs bug --- components/dfs/filesystems/elmfat/dfs_elm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c index b244ee5601..4c17911f96 100644 --- a/components/dfs/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/filesystems/elmfat/dfs_elm.c @@ -214,7 +214,8 @@ int dfs_elm_mkfs(rt_device_t dev_id) int flag; FRESULT result; int index; - + char logic_nbr[2] = {'0',':'}; + work = rt_malloc(_MAX_SS); if(RT_NULL == work) { return -ENOMEM; @@ -264,7 +265,8 @@ int dfs_elm_mkfs(rt_device_t dev_id) * on the disk, you will get a failure. so we need f_mount here, * just fill the FatFS[index] in elm fatfs to make mkfs work. */ - f_mount(fat, "", (BYTE)index); + logic_nbr[0] = '0' + index; + f_mount(fat, logic_nbr, (BYTE)index); } } @@ -273,14 +275,14 @@ int dfs_elm_mkfs(rt_device_t dev_id) /* [IN] Size of the allocation unit */ /* [-] Working buffer */ /* [IN] Size of working buffer */ - result = f_mkfs("", FM_ANY, 0, work, _MAX_SS); + result = f_mkfs(logic_nbr, FM_ANY, 0, work, _MAX_SS); rt_free(work); work = RT_NULL; /* check flag status, we need clear the temp driver stored in disk[] */ if (flag == FSM_STATUS_USE_TEMP_DRIVER) { rt_free(fat); - f_mount(RT_NULL, "",(BYTE)index); + f_mount(RT_NULL, logic_nbr,(BYTE)index); disk[index] = RT_NULL; /* close device */ rt_device_close(dev_id); From 56c2ebbcc896452d1a081bfa9361648e952cdd63 Mon Sep 17 00:00:00 2001 From: ArdaFu Date: Mon, 19 Mar 2018 11:54:13 +0800 Subject: [PATCH 13/19] [components][mini-libc] Add missing C99 definition of int/uint_least/fast8/16/32/64_t. --- components/libc/compilers/minilibc/stdint.h | 250 ++++++++++++++++++-- 1 file changed, 229 insertions(+), 21 deletions(-) diff --git a/components/libc/compilers/minilibc/stdint.h b/components/libc/compilers/minilibc/stdint.h index 8733d60a03..c865d43435 100644 --- a/components/libc/compilers/minilibc/stdint.h +++ b/components/libc/compilers/minilibc/stdint.h @@ -1,18 +1,75 @@ +/* + * ISO C Standard: 7.18 Integer types + */ + #ifndef __STDINT_H__ #define __STDINT_H__ -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed int int32_t; +/* 7.8.1.1 Exact-width integer types */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; +#ifdef __INT8_TYPE__ +typedef __INT8_TYPE__ int8_t; +#endif +#ifdef __INT16_TYPE__ +typedef __INT16_TYPE__ int16_t; +#endif +#ifdef __INT32_TYPE__ +typedef __INT32_TYPE__ int32_t; +#endif +#ifdef __INT64_TYPE__ +typedef __INT64_TYPE__ int64_t; +#endif +#ifdef __UINT8_TYPE__ +typedef __UINT8_TYPE__ uint8_t; +#endif +#ifdef __UINT16_TYPE__ +typedef __UINT16_TYPE__ uint16_t; +#endif +#ifdef __UINT32_TYPE__ +typedef __UINT32_TYPE__ uint32_t; +#endif +#ifdef __UINT64_TYPE__ +typedef __UINT64_TYPE__ uint64_t; +#endif -typedef long long int64_t; -typedef unsigned long long uint64_t; -typedef signed long intptr_t; -typedef unsigned long uintptr_t; +/* 7.8.1.2 Minimum-width integer types */ + +typedef __INT_LEAST8_TYPE__ int_least8_t; +typedef __INT_LEAST16_TYPE__ int_least16_t; +typedef __INT_LEAST32_TYPE__ int_least32_t; +typedef __INT_LEAST64_TYPE__ int_least64_t; +typedef __UINT_LEAST8_TYPE__ uint_least8_t; +typedef __UINT_LEAST16_TYPE__ uint_least16_t; +typedef __UINT_LEAST32_TYPE__ uint_least32_t; +typedef __UINT_LEAST64_TYPE__ uint_least64_t; + +/* 7.8.1.3 Fastest minimum-width integer types */ + +typedef __INT_FAST8_TYPE__ int_fast8_t; +typedef __INT_FAST16_TYPE__ int_fast16_t; +typedef __INT_FAST32_TYPE__ int_fast32_t; +typedef __INT_FAST64_TYPE__ int_fast64_t; +typedef __UINT_FAST8_TYPE__ uint_fast8_t; +typedef __UINT_FAST16_TYPE__ uint_fast16_t; +typedef __UINT_FAST32_TYPE__ uint_fast32_t; +typedef __UINT_FAST64_TYPE__ uint_fast64_t; + +/* 7.8.1.4 Integer types capable of holding object pointers */ + +#ifdef __INTPTR_TYPE__ +typedef __INTPTR_TYPE__ intptr_t; +#endif +#ifdef __UINTPTR_TYPE__ +typedef __UINTPTR_TYPE__ uintptr_t; +#endif + +/* 7.8.1.5 Greatest-width integer types */ + +typedef __INTMAX_TYPE__ intmax_t; +typedef __UINTMAX_TYPE__ uintmax_t; + +#if (!defined __cplusplus || __cplusplus >= 201103L \ + || defined __STDC_LIMIT_MACROS) /* * 7.18.2 Limits of specified-width integer types. @@ -22,17 +79,170 @@ typedef unsigned long uintptr_t; */ /* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-0x7f - 1) -#define INT16_MIN (-0x7fff - 1) -#define INT32_MIN (-0x7fffffff - 1) -#define INT8_MAX 0x7f -#define INT16_MAX 0x7fff -#define INT32_MAX 0x7fffffff +#ifdef __INT8_MAX__ +# undef INT8_MAX +# define INT8_MAX __INT8_MAX__ +# undef INT8_MIN +# define INT8_MIN (-INT8_MAX - 1) +#endif +#ifdef __UINT8_MAX__ +# undef UINT8_MAX +# define UINT8_MAX __UINT8_MAX__ +#endif +#ifdef __INT16_MAX__ +# undef INT16_MAX +# define INT16_MAX __INT16_MAX__ +# undef INT16_MIN +# define INT16_MIN (-INT16_MAX - 1) +#endif +#ifdef __UINT16_MAX__ +# undef UINT16_MAX +# define UINT16_MAX __UINT16_MAX__ +#endif +#ifdef __INT32_MAX__ +# undef INT32_MAX +# define INT32_MAX __INT32_MAX__ +# undef INT32_MIN +# define INT32_MIN (-INT32_MAX - 1) +#endif +#ifdef __UINT32_MAX__ +# undef UINT32_MAX +# define UINT32_MAX __UINT32_MAX__ +#endif +#ifdef __INT64_MAX__ +# undef INT64_MAX +# define INT64_MAX __INT64_MAX__ +# undef INT64_MIN +# define INT64_MIN (-INT64_MAX - 1) +#endif +#ifdef __UINT64_MAX__ +# undef UINT64_MAX +# define UINT64_MAX __UINT64_MAX__ +#endif -#define UINT8_MAX 0xff -#define UINT16_MAX 0xffff -#define UINT32_MAX 0xffffffffU +#undef INT_LEAST8_MAX +#define INT_LEAST8_MAX __INT_LEAST8_MAX__ +#undef INT_LEAST8_MIN +#define INT_LEAST8_MIN (-INT_LEAST8_MAX - 1) +#undef UINT_LEAST8_MAX +#define UINT_LEAST8_MAX __UINT_LEAST8_MAX__ +#undef INT_LEAST16_MAX +#define INT_LEAST16_MAX __INT_LEAST16_MAX__ +#undef INT_LEAST16_MIN +#define INT_LEAST16_MIN (-INT_LEAST16_MAX - 1) +#undef UINT_LEAST16_MAX +#define UINT_LEAST16_MAX __UINT_LEAST16_MAX__ +#undef INT_LEAST32_MAX +#define INT_LEAST32_MAX __INT_LEAST32_MAX__ +#undef INT_LEAST32_MIN +#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1) +#undef UINT_LEAST32_MAX +#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__ +#undef INT_LEAST64_MAX +#define INT_LEAST64_MAX __INT_LEAST64_MAX__ +#undef INT_LEAST64_MIN +#define INT_LEAST64_MIN (-INT_LEAST64_MAX - 1) +#undef UINT_LEAST64_MAX +#define UINT_LEAST64_MAX __UINT_LEAST64_MAX__ + +#undef INT_FAST8_MAX +#define INT_FAST8_MAX __INT_FAST8_MAX__ +#undef INT_FAST8_MIN +#define INT_FAST8_MIN (-INT_FAST8_MAX - 1) +#undef UINT_FAST8_MAX +#define UINT_FAST8_MAX __UINT_FAST8_MAX__ +#undef INT_FAST16_MAX +#define INT_FAST16_MAX __INT_FAST16_MAX__ +#undef INT_FAST16_MIN +#define INT_FAST16_MIN (-INT_FAST16_MAX - 1) +#undef UINT_FAST16_MAX +#define UINT_FAST16_MAX __UINT_FAST16_MAX__ +#undef INT_FAST32_MAX +#define INT_FAST32_MAX __INT_FAST32_MAX__ +#undef INT_FAST32_MIN +#define INT_FAST32_MIN (-INT_FAST32_MAX - 1) +#undef UINT_FAST32_MAX +#define UINT_FAST32_MAX __UINT_FAST32_MAX__ +#undef INT_FAST64_MAX +#define INT_FAST64_MAX __INT_FAST64_MAX__ +#undef INT_FAST64_MIN +#define INT_FAST64_MIN (-INT_FAST64_MAX - 1) +#undef UINT_FAST64_MAX +#define UINT_FAST64_MAX __UINT_FAST64_MAX__ + +#ifdef __INTPTR_MAX__ +# undef INTPTR_MAX +# define INTPTR_MAX __INTPTR_MAX__ +# undef INTPTR_MIN +# define INTPTR_MIN (-INTPTR_MAX - 1) +#endif +#ifdef __UINTPTR_MAX__ +# undef UINTPTR_MAX +# define UINTPTR_MAX __UINTPTR_MAX__ +#endif + +#undef INTMAX_MAX +#define INTMAX_MAX __INTMAX_MAX__ +#undef INTMAX_MIN +#define INTMAX_MIN (-INTMAX_MAX - 1) +#undef UINTMAX_MAX +#define UINTMAX_MAX __UINTMAX_MAX__ + +/* 7.18.3 Limits of other integer types */ + +#undef PTRDIFF_MAX +#define PTRDIFF_MAX __PTRDIFF_MAX__ +#undef PTRDIFF_MIN +#define PTRDIFF_MIN (-PTRDIFF_MAX - 1) + +#undef SIG_ATOMIC_MAX +#define SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__ +#undef SIG_ATOMIC_MIN +#define SIG_ATOMIC_MIN __SIG_ATOMIC_MIN__ + +#undef SIZE_MAX +#define SIZE_MAX __SIZE_MAX__ + +#undef WCHAR_MAX +#define WCHAR_MAX __WCHAR_MAX__ +#undef WCHAR_MIN +#define WCHAR_MIN __WCHAR_MIN__ + +#undef WINT_MAX +#define WINT_MAX __WINT_MAX__ +#undef WINT_MIN +#define WINT_MIN __WINT_MIN__ + +#endif /* (!defined __cplusplus || __cplusplus >= 201103L + || defined __STDC_LIMIT_MACROS) */ + +#if (!defined __cplusplus || __cplusplus >= 201103L \ + || defined __STDC_CONSTANT_MACROS) + +#undef INT8_C +#define INT8_C(c) __INT8_C(c) +#undef INT16_C +#define INT16_C(c) __INT16_C(c) +#undef INT32_C +#define INT32_C(c) __INT32_C(c) +#undef INT64_C +#define INT64_C(c) __INT64_C(c) +#undef UINT8_C +#define UINT8_C(c) __UINT8_C(c) +#undef UINT16_C +#define UINT16_C(c) __UINT16_C(c) +#undef UINT32_C +#define UINT32_C(c) __UINT32_C(c) +#undef UINT64_C +#define UINT64_C(c) __UINT64_C(c) +#undef INTMAX_C +#define INTMAX_C(c) __INTMAX_C(c) +#undef UINTMAX_C +#define UINTMAX_C(c) __UINTMAX_C(c) + +#endif /* (!defined __cplusplus || __cplusplus >= 201103L + || defined __STDC_CONSTANT_MACROS) */ #ifndef __INT_MAX__ #define __INT_MAX__ 2147483647 @@ -45,6 +255,4 @@ typedef unsigned long uintptr_t; #define LONG_MIN (-LONG_MAX - 1) #define ULONG_MAX (~0UL) -#define SIZE_MAX ULONG_MAX - #endif From 761c0a27c5537f1fd275e1496ea73ddb68436556 Mon Sep 17 00:00:00 2001 From: balanceTWK Date: Mon, 19 Mar 2018 14:55:54 +0800 Subject: [PATCH 14/19] =?UTF-8?q?[BSP]=20add=20other=20uart|=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=B6=E4=BB=96=E4=B8=B2=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/drivers/drv_uart.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/drv_uart.c b/bsp/imxrt1052-evk/drivers/drv_uart.c index ef1eeecc2f..e4a303ef22 100644 --- a/bsp/imxrt1052-evk/drivers/drv_uart.c +++ b/bsp/imxrt1052-evk/drivers/drv_uart.c @@ -63,7 +63,7 @@ void LPUART1_IRQHandler(void) #if defined(RT_USING_UART2) struct rt_serial_device serial2; -void USART2_IRQHandler(void) +void LPUART2_IRQHandler(void) { uart_isr(&serial2); } @@ -73,7 +73,7 @@ void USART2_IRQHandler(void) #if defined(RT_USING_UART3) struct rt_serial_device serial3; -void UART3_IRQHandler(void) +void LPUART3_IRQHandler(void) { uart_isr(&serial3); } @@ -83,7 +83,7 @@ void UART3_IRQHandler(void) #if defined(RT_USING_UART4) struct rt_serial_device serial4; -void UART4_IRQHandler(void) +void LPUART4_IRQHandler(void) { uart_isr(&serial4); } @@ -92,7 +92,7 @@ void UART4_IRQHandler(void) #if defined(RT_USING_UART5) struct rt_serial_device serial5; -void USART5_IRQHandler(void) +void LPUART5_IRQHandler(void) { uart_isr(&serial5); } @@ -102,7 +102,7 @@ void USART5_IRQHandler(void) #if defined(RT_USING_UART6) struct rt_serial_device serial6; -void UART6_IRQHandler(void) +void LPUART6_IRQHandler(void) { uart_isr(&serial6); } @@ -112,7 +112,7 @@ void UART6_IRQHandler(void) #if defined(RT_USING_UART7) struct rt_serial_device serial7; -void UART7_IRQHandler(void) +void LPUART7_IRQHandler(void) { uart_isr(&serial7); } @@ -122,7 +122,7 @@ void UART7_IRQHandler(void) #if defined(RT_USING_UART8) struct rt_serial_device serial8; -void UART8_IRQHandler(void) +void LPUART8_IRQHandler(void) { uart_isr(&serial8); } From f8bdaff9053afaeaaa214434c7280e18a55e35e0 Mon Sep 17 00:00:00 2001 From: ArdaFu Date: Mon, 19 Mar 2018 15:23:24 +0800 Subject: [PATCH 15/19] [bsp][tm4x129x] Remove int/uint_fast8/16/32_t definition in BSP driver library's Sconscript. These definitions move to minilibc/stdint.h. --- bsp/tm4c129x/libraries/SConscript | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bsp/tm4c129x/libraries/SConscript b/bsp/tm4c129x/libraries/SConscript index 8b48a34c7d..d1ed0b9383 100644 --- a/bsp/tm4c129x/libraries/SConscript +++ b/bsp/tm4c129x/libraries/SConscript @@ -18,12 +18,6 @@ elif rtconfig.CROSS_TOOL == 'iar': CPPPATH = [cwd, cwd + '/inc', cwd + '/driverlib'] CPPDEFINES = [rtconfig.PART_TYPE] -if rtconfig.CROSS_TOOL == 'gcc': - CPPDEFINES += ['gcc']; - CPPDEFINES += ['uint_fast8_t=uint32_t']; - CPPDEFINES += ['uint_fast32_t=uint32_t']; - CPPDEFINES += ['int_fast8_t=int32_t']; - CPPDEFINES += ['uint_fast16_t=uint32_t']; group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) Return('group') From 60f17b69f6a81bdc1dd1019deaac38dd8616b2a2 Mon Sep 17 00:00:00 2001 From: liuguang <1004383796@qq.com> Date: Mon, 19 Mar 2018 21:32:32 +0800 Subject: [PATCH 16/19] =?UTF-8?q?[BSP]=20fix=20pin=20drive=20bug=20and=20a?= =?UTF-8?q?dd=20interrupt=20mode.=20|=20=E4=BF=AE=E5=A4=8DPIN=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8BUG=E5=B9=B6=E6=B7=BB=E5=8A=A0=E4=B8=AD=E6=96=AD?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新如下: 1. 修复GPIO5_0~2管脚复用调用错误(错误情况会影响SDRAM正常工作)。 2. 添加中断模式,支持上升沿、下降沿、双边沿、高电平、低电平触发中断模式。 3. 移除C99特性。 --- bsp/imxrt1052-evk/drivers/drv_pin.c | 461 +++++++++++++++++++++++++++- bsp/imxrt1052-evk/drivers/drv_pin.h | 1 + 2 files changed, 450 insertions(+), 12 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/drv_pin.c b/bsp/imxrt1052-evk/drivers/drv_pin.c index 84e3733039..3715371cde 100644 --- a/bsp/imxrt1052-evk/drivers/drv_pin.c +++ b/bsp/imxrt1052-evk/drivers/drv_pin.c @@ -9,7 +9,8 @@ * * Change Logs: * Date Author Notes - * 2018-03-13 Liuguang the first version. + * 2018-03-13 Liuguang the first version. + * 2018-03-19 Liuguang add GPIO interrupt mode support. */ #include "drv_pin.h" @@ -19,12 +20,10 @@ #ifdef RT_USING_PIN -/* GPIOʱӻGPIO_PinInitԶ, º򲻻Զ */ #if defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL #error "Please don't define 'FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL'!" #endif -/* RT1052 PINṹ */ struct rt1052_pin { rt_uint16_t pin; @@ -32,10 +31,18 @@ struct rt1052_pin rt_uint32_t gpio_pin; }; +struct rt1052_irq +{ + rt_uint16_t enable; + struct rt_pin_irq_hdr irq_info; +}; + #define __ARRAY_LEN(array) (sizeof(array)/sizeof(array[0])) #define __RT1052_PIN_DEFAULT {0, 0, 0} #define __RT1052_PIN(INDEX, PORT, PIN) {INDEX, PORT, PIN} +static struct rt_pin_ops rt1052_pin_ops; + static struct rt1052_pin rt1052_pin_map[] = { __RT1052_PIN_DEFAULT, @@ -179,6 +186,279 @@ static struct rt1052_pin rt1052_pin_map[] = __RT1052_PIN(127, GPIO5, 2) /* PMIC_STBY_REQ */ }; +static struct rt1052_irq rt1052_irq_map[] = +{ + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} }, + {PIN_IRQ_DISABLE, {PIN_IRQ_PIN_NONE, PIN_IRQ_MODE_RISING, RT_NULL, RT_NULL} } +}; + +void gpio_isr(GPIO_Type* base, rt_uint32_t gpio_pin) +{ + if((GPIO_PortGetInterruptFlags(base) & (1 << gpio_pin)) != 0) + { + GPIO_PortClearInterruptFlags(base, gpio_pin); + + if(rt1052_irq_map[gpio_pin].irq_info.hdr != RT_NULL) + { + rt1052_irq_map[gpio_pin].irq_info.hdr(rt1052_irq_map[gpio_pin].irq_info.args); + } + } +} + +void GPIO1_Combined_0_15_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 0; gpio_pin <= 15; gpio_pin++) + { + gpio_isr(GPIO1, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO1_Combined_16_31_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 16; gpio_pin <= 31; gpio_pin++) + { + gpio_isr(GPIO1, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO2_Combined_0_15_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 0; gpio_pin <= 15; gpio_pin++) + { + gpio_isr(GPIO2, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO2_Combined_16_31_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 16; gpio_pin <= 31; gpio_pin++) + { + gpio_isr(GPIO2, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO3_Combined_0_15_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 0; gpio_pin <= 15; gpio_pin++) + { + gpio_isr(GPIO3, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO3_Combined_16_31_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 16; gpio_pin <= 31; gpio_pin++) + { + gpio_isr(GPIO3, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO4_Combined_0_15_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 0; gpio_pin <= 15; gpio_pin++) + { + gpio_isr(GPIO4, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} +void GPIO4_Combined_16_31_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 16; gpio_pin <= 31; gpio_pin++) + { + gpio_isr(GPIO4, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +void GPIO5_Combined_0_15_IRQHandler(void) +{ + rt_uint8_t gpio_pin; + + rt_interrupt_enter(); + + for(gpio_pin = 0; gpio_pin <= 2; gpio_pin++) + { + gpio_isr(GPIO5, gpio_pin); + } + +#if defined __CORTEX_M && (__CORTEX_M == 4U) + __DSB(); +#endif + + rt_interrupt_leave(); +} + +static IRQn_Type rt1052_get_irqnum(GPIO_Type *gpio, rt_uint32_t gpio_pin) +{ + IRQn_Type irq_num; + + if(gpio == GPIO1) + { + if(gpio_pin <= 15) + { + irq_num = GPIO1_Combined_0_15_IRQn; + } + else + { + irq_num = GPIO1_Combined_16_31_IRQn; + } + } + else if(gpio == GPIO2) + { + if(gpio_pin <= 15) + { + irq_num = GPIO2_Combined_0_15_IRQn; + } + else + { + irq_num = GPIO2_Combined_16_31_IRQn; + } + } + else if(gpio == GPIO3) + { + if(gpio_pin <= 15) + { + irq_num = GPIO3_Combined_0_15_IRQn; + } + else + { + irq_num = GPIO3_Combined_16_31_IRQn; + } + } + else if(gpio == GPIO4) + { + if(gpio_pin <= 15) + { + irq_num = GPIO4_Combined_0_15_IRQn; + } + else + { + irq_num = GPIO4_Combined_16_31_IRQn; + } + } + else if(gpio == GPIO5) + { + if(gpio_pin <= 15) + { + irq_num = GPIO5_Combined_0_15_IRQn; + } + else + { + irq_num = GPIO5_Combined_16_31_IRQn; + } + } + + return irq_num; +} + static void rt1052_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode) { gpio_pin_config_t gpio; @@ -193,15 +473,15 @@ static void rt1052_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode) { CLOCK_EnableClock(kCLOCK_Iomuxc); + IOMUXC_SetPinMux(0x401F8010U + pin*4, 0x5U, 0, 0, 0, 0); } else { CLOCK_EnableClock(kCLOCK_IomuxcSnvs); + + IOMUXC_SetPinMux(0x401F8000U + (pin-125)*4, 0x5U, 0, 0, 0, 0); } - /* IOMUXC: IOΪGPIO */ - IOMUXC_SetPinMux(0x401F8010U + pin*4, 0x5U, 0, 0, 0, 0); - gpio.outputLogic = 0; gpio.interruptMode = kGPIO_NoIntmode; @@ -243,7 +523,6 @@ static void rt1052_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode) break; } - /* GPIOģʽ: ģʽ, ©ģ, IOתٶ(50MHz) */ IOMUXC_SetPinConfig(0, 0, 0, 0, 0x401F8200U + pin*4, config_value); GPIO_PinInit(rt1052_pin_map[pin].gpio, rt1052_pin_map[pin].gpio_pin, &gpio); @@ -259,17 +538,175 @@ static void rt1052_pin_write(rt_device_t dev, rt_base_t pin, rt_base_t value) GPIO_PinWrite(rt1052_pin_map[pin].gpio, rt1052_pin_map[pin].gpio_pin, value); } -static struct rt_pin_ops rt1052_pin_ops = +static rt_err_t rt1052_pin_attach_irq(struct rt_device *device, rt_int32_t pin, + rt_uint32_t mode, void (*hdr)(void *args), void *args) { - .pin_mode = rt1052_pin_mode, - .pin_read = rt1052_pin_read, - .pin_write = rt1052_pin_write -}; + struct rt1052_pin* pin_map = RT_NULL; + struct rt1052_irq* irq_map = RT_NULL; + + pin_map = &rt1052_pin_map[pin]; + irq_map = &rt1052_irq_map[rt1052_pin_map[pin].gpio_pin]; + + if(pin_map == RT_NULL || irq_map == RT_NULL) + { + return RT_ENOSYS; + } + + if(irq_map->enable == PIN_IRQ_ENABLE) + { + return RT_EBUSY; + } + + irq_map->irq_info.pin = pin; + irq_map->irq_info.hdr = hdr; + irq_map->irq_info.mode = mode; + irq_map->irq_info.args = args; + + return RT_EOK; +} + +static rt_err_t rt1052_pin_dettach_irq(struct rt_device *device, rt_int32_t pin) +{ + struct rt1052_pin* pin_map = RT_NULL; + struct rt1052_irq* irq_map = RT_NULL; + + pin_map = &rt1052_pin_map[pin]; + irq_map = &rt1052_irq_map[rt1052_pin_map[pin].gpio_pin]; + + if(pin_map == RT_NULL || irq_map == RT_NULL) + { + return RT_ENOSYS; + } + + if(irq_map->enable == PIN_IRQ_DISABLE) + { + return RT_EOK; + } + + irq_map->irq_info.pin = PIN_IRQ_PIN_NONE; + irq_map->irq_info.hdr = RT_NULL; + irq_map->irq_info.mode = PIN_IRQ_MODE_RISING; + irq_map->irq_info.args = RT_NULL; + + return RT_EOK; +} + +static rt_err_t rt1052_pin_irq_enable(struct rt_device *device, rt_base_t pin, rt_uint32_t enabled) +{ + gpio_pin_config_t gpio; + IRQn_Type irq_num; + + struct rt1052_pin* pin_map = RT_NULL; + struct rt1052_irq* irq_map = RT_NULL; + + pin_map = &rt1052_pin_map[pin]; + irq_map = &rt1052_irq_map[rt1052_pin_map[pin].gpio_pin]; + + if(pin_map == RT_NULL || irq_map == RT_NULL) + { + return RT_ENOSYS; + } + + if(enabled == PIN_IRQ_ENABLE) + { + if(irq_map->enable == PIN_IRQ_ENABLE) + { + return RT_EBUSY; + } + + if(irq_map->irq_info.pin != pin) + { + return RT_EIO; + } + + irq_map->enable = PIN_IRQ_ENABLE; + + if(rt1052_pin_map[pin].gpio != GPIO5) + { + CLOCK_EnableClock(kCLOCK_Iomuxc); + IOMUXC_SetPinMux(0x401F8010U + pin*4, 0x5U, 0, 0, 0, 0); + } + else + { + CLOCK_EnableClock(kCLOCK_IomuxcSnvs); + IOMUXC_SetPinMux(0x401F8000U + (pin-125)*4, 0x5U, 0, 0, 0, 0); + } + + gpio.direction = kGPIO_DigitalInput; + gpio.outputLogic = 0; + + switch(irq_map->irq_info.mode) + { + case PIN_IRQ_MODE_RISING: + { + gpio.interruptMode = kGPIO_IntRisingEdge; + } + break; + + case PIN_IRQ_MODE_FALLING: + { + gpio.interruptMode = kGPIO_IntFallingEdge; + } + break; + + case PIN_IRQ_MODE_RISING_FALLING: + { + gpio.interruptMode = kGPIO_IntRisingOrFallingEdge; + } + break; + + case PIN_IRQ_MODE_HIGH_LEVEL: + { + gpio.interruptMode = kGPIO_IntHighLevel; + } + break; + + case PIN_IRQ_MODE_LOW_LEVEL: + { + gpio.interruptMode = kGPIO_IntLowLevel; + } + break; + } + + irq_num = rt1052_get_irqnum(rt1052_pin_map[pin].gpio, rt1052_pin_map[pin].gpio_pin); + + NVIC_SetPriority(irq_num, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 5, 0)); + EnableIRQ(irq_num); + + GPIO_PinInit(rt1052_pin_map[pin].gpio, rt1052_pin_map[pin].gpio_pin, &gpio); + GPIO_PortEnableInterrupts(rt1052_pin_map[pin].gpio, 1U << rt1052_pin_map[pin].gpio_pin); + } + else if(enabled == PIN_IRQ_DISABLE) + { + if(irq_map->enable == PIN_IRQ_DISABLE) + { + return RT_EOK; + } + + irq_map->enable = PIN_IRQ_DISABLE; + irq_num = rt1052_get_irqnum(rt1052_pin_map[pin].gpio, rt1052_pin_map[pin].gpio_pin); + + NVIC_DisableIRQ(irq_num); + } + else + { + return RT_EINVAL; + } + + return RT_EOK; +} int rt_hw_pin_init(void) { int ret = RT_EOK; + rt1052_pin_ops.pin_mode = rt1052_pin_mode; + rt1052_pin_ops.pin_read = rt1052_pin_read; + rt1052_pin_ops.pin_write = rt1052_pin_write; + rt1052_pin_ops.pin_attach_irq = rt1052_pin_attach_irq; + rt1052_pin_ops.pin_dettach_irq = rt1052_pin_dettach_irq; + rt1052_pin_ops.pin_irq_enable = rt1052_pin_irq_enable; + ret = rt_device_pin_register("pin", &rt1052_pin_ops, RT_NULL); return ret; diff --git a/bsp/imxrt1052-evk/drivers/drv_pin.h b/bsp/imxrt1052-evk/drivers/drv_pin.h index f1de4fbea7..6c0574ec0f 100644 --- a/bsp/imxrt1052-evk/drivers/drv_pin.h +++ b/bsp/imxrt1052-evk/drivers/drv_pin.h @@ -10,6 +10,7 @@ * Change Logs: * Date Author Notes * 2018-03-13 Liuguang the first version. + * 2018-03-19 Liuguang add GPIO interrupt mode support. */ #ifndef __DRV_PIN_H__ From fed25c720e2779818d6d1b0e76a170b400725326 Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 20 Mar 2018 17:36:08 +0800 Subject: [PATCH 17/19] [Libc][dlib] Add fcntl.h and sys/stat.h to dlib. --- components/libc/compilers/dlib/fcntl.h | 0 components/libc/compilers/dlib/sys/stat.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 components/libc/compilers/dlib/fcntl.h create mode 100644 components/libc/compilers/dlib/sys/stat.h diff --git a/components/libc/compilers/dlib/fcntl.h b/components/libc/compilers/dlib/fcntl.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/components/libc/compilers/dlib/sys/stat.h b/components/libc/compilers/dlib/sys/stat.h new file mode 100644 index 0000000000..e69de29bb2 From 991baa7a04644c355a7ccaf2d08b837a7657396c Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 20 Mar 2018 17:50:12 +0800 Subject: [PATCH 18/19] [Libc][dlib] Add STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO to dlib sys/unistd.h . --- components/libc/compilers/dlib/sys/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h index 06a46746c0..dbe4f3010d 100644 --- a/components/libc/compilers/dlib/sys/unistd.h +++ b/components/libc/compilers/dlib/sys/unistd.h @@ -2,6 +2,11 @@ #define _SYS_UNISTD_H #ifdef RT_USING_DFS + +#define STDIN_FILENO 0 /* standard input file descriptor */ +#define STDOUT_FILENO 1 /* standard output file descriptor */ +#define STDERR_FILENO 2 /* standard error file descriptor */ + #include #else #define _FREAD 0x0001 /* read enabled */ From c6e928a780cf28a03e963d62a1a731d7675cf134 Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 20 Mar 2018 17:51:12 +0800 Subject: [PATCH 19/19] [Libc] Update struct stat on libc_stat.h . --- include/libc/libc_stat.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h index 69871dd101..26752393db 100644 --- a/include/libc/libc_stat.h +++ b/include/libc/libc_stat.h @@ -77,11 +77,23 @@ struct stat { - struct rt_device* st_dev; - uint16_t st_mode; - uint32_t st_size; - time_t st_mtime; - uint32_t st_blksize; + struct rt_device *st_dev; + uint16_t st_ino; + uint16_t st_mode; + uint16_t st_nlink; + uint16_t st_uid; + uint16_t st_gid; + struct rt_device *st_rdev; + uint32_t st_size; + time_t st_atime; + long st_spare1; + time_t st_mtime; + long st_spare2; + time_t st_ctime; + long st_spare3; + uint32_t st_blksize; + uint32_t st_blocks; + long st_spare4[2]; }; #endif