From 7509f55641c70ea94f9241bf31301fdbd6cab3d7 Mon Sep 17 00:00:00 2001 From: Yaochenger <75192526+Yaochenger@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:17:56 +0800 Subject: [PATCH] =?UTF-8?q?[add][RT1060]=E4=BF=AE=E6=AD=A3=E4=B8=8A?= =?UTF-8?q?=E6=89=8B=E6=8C=87=E5=8D=97=20(#7207)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [add]修正上手指南 * [add]修正上手指南与重新配置rtconfig.h --- bsp/imxrt/imxrt1060-nxp-evk/.config | 96 +++++-------------- .../MIMXRT1060-EVK上手指南.md | 64 ++++++------- bsp/imxrt/imxrt1060-nxp-evk/rtconfig.h | 43 +-------- 3 files changed, 57 insertions(+), 146 deletions(-) diff --git a/bsp/imxrt/imxrt1060-nxp-evk/.config b/bsp/imxrt/imxrt1060-nxp-evk/.config index c66d97adbf..6bd54439a2 100644 --- a/bsp/imxrt/imxrt1060-nxp-evk/.config +++ b/bsp/imxrt/imxrt1060-nxp-evk/.config @@ -73,7 +73,7 @@ CONFIG_RT_USING_DEVICE=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" -CONFIG_RT_VER_NUM=0x50000 +CONFIG_RT_VER_NUM=0x50001 # CONFIG_RT_USING_STDC_ATOMIC is not set CONFIG_RT_USING_CACHE=y CONFIG_RT_USING_HW_ATOMIC=y @@ -108,41 +108,11 @@ CONFIG_FINSH_USING_DESCRIPTION=y # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set # CONFIG_FINSH_USING_AUTH is not set CONFIG_FINSH_ARG_MAX=10 -CONFIG_RT_USING_DFS=y -CONFIG_DFS_USING_POSIX=y -CONFIG_DFS_USING_WORKDIR=y -CONFIG_DFS_FILESYSTEMS_MAX=4 -CONFIG_DFS_FILESYSTEM_TYPES_MAX=4 -CONFIG_DFS_FD_MAX=16 -# CONFIG_RT_USING_DFS_MNTTABLE is not set -CONFIG_RT_USING_DFS_ELMFAT=y # -# elm-chan's FatFs, Generic FAT Filesystem Module +# DFS: device virtual file system # -CONFIG_RT_DFS_ELM_CODE_PAGE=437 -CONFIG_RT_DFS_ELM_WORD_ACCESS=y -# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set -# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set -# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set -CONFIG_RT_DFS_ELM_USE_LFN_3=y -CONFIG_RT_DFS_ELM_USE_LFN=3 -CONFIG_RT_DFS_ELM_LFN_UNICODE_0=y -# CONFIG_RT_DFS_ELM_LFN_UNICODE_1 is not set -# CONFIG_RT_DFS_ELM_LFN_UNICODE_2 is not set -# CONFIG_RT_DFS_ELM_LFN_UNICODE_3 is not set -CONFIG_RT_DFS_ELM_LFN_UNICODE=0 -CONFIG_RT_DFS_ELM_MAX_LFN=255 -CONFIG_RT_DFS_ELM_DRIVES=2 -CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512 -# CONFIG_RT_DFS_ELM_USE_ERASE is not set -CONFIG_RT_DFS_ELM_REENTRANT=y -CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 -CONFIG_RT_USING_DFS_DEVFS=y -# CONFIG_RT_USING_DFS_ROMFS is not set -# CONFIG_RT_USING_DFS_CROMFS is not set -# CONFIG_RT_USING_DFS_RAMFS is not set -# CONFIG_RT_USING_DFS_TMPFS is not set +# CONFIG_RT_USING_DFS is not set # CONFIG_RT_USING_FAL is not set # @@ -193,13 +163,9 @@ CONFIG_RT_USING_PIN=y # # Using USB # -CONFIG_RT_USING_USB=y -CONFIG_RT_USING_USB_HOST=y -CONFIG_RT_USBH_MSTORAGE=y -CONFIG_UDISK_MOUNTPOINT="/" -# CONFIG_RT_USBH_HID is not set +# CONFIG_RT_USING_USB is not set +# CONFIG_RT_USING_USB_HOST is not set # CONFIG_RT_USING_USB_DEVICE is not set -CONFIG_RT_USBD_THREAD_STACK_SZ=4096 # # C/C++ and POSIX layer @@ -232,15 +198,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # Network # # CONFIG_RT_USING_SAL is not set -CONFIG_RT_USING_NETDEV=y -CONFIG_NETDEV_USING_IFCONFIG=y -CONFIG_NETDEV_USING_PING=y -CONFIG_NETDEV_USING_NETSTAT=y -CONFIG_NETDEV_USING_AUTO_DEFAULT=y -# CONFIG_NETDEV_USING_IPV6 is not set -CONFIG_NETDEV_IPV4=1 -CONFIG_NETDEV_IPV6=0 -# CONFIG_NETDEV_IPV6_SCOPES is not set +# CONFIG_RT_USING_NETDEV is not set # CONFIG_RT_USING_LWIP is not set # CONFIG_RT_USING_AT is not set @@ -347,7 +305,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_EMBEDDEDPROTO is not set # CONFIG_PKG_USING_RT_LINK_HW is not set # CONFIG_PKG_USING_RYANMQTT is not set -# CONFIG_PKG_USING_RYANW5500 is not set # CONFIG_PKG_USING_LORA_PKT_FWD is not set # CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set # CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set @@ -356,7 +313,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_NET_SERVER is not set # CONFIG_PKG_USING_ZFTP is not set # CONFIG_PKG_USING_WOL is not set -# CONFIG_PKG_USING_ZEPHYR_POLLING is not set # # security packages @@ -425,13 +381,18 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_MP3PLAYER is not set # CONFIG_PKG_USING_TINYJPEG is not set # CONFIG_PKG_USING_UGUI is not set + +# +# PainterEngine: A cross-platform graphics application framework written in C language +# +# CONFIG_PKG_USING_PAINTERENGINE is not set +# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_TERMBOX is not set # CONFIG_PKG_USING_VT100 is not set # CONFIG_PKG_USING_QRCODE is not set # CONFIG_PKG_USING_GUIENGINE is not set # CONFIG_PKG_USING_PERSIMMON is not set -# CONFIG_PKG_USING_3GPP_AMRNB is not set # # tools packages @@ -441,7 +402,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_EASYLOGGER is not set # CONFIG_PKG_USING_SYSTEMVIEW is not set # CONFIG_PKG_USING_SEGGER_RTT is not set -# CONFIG_PKG_USING_RTT_AUTO_EXE_CMD is not set # CONFIG_PKG_USING_RDB is not set # CONFIG_PKG_USING_ULOG_EASYFLASH is not set # CONFIG_PKG_USING_LOGMGR is not set @@ -549,7 +509,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_TFDB is not set # CONFIG_PKG_USING_QPC is not set # CONFIG_PKG_USING_AGILE_UPGRADE is not set -# CONFIG_PKG_USING_FLASH_BLOB is not set # # peripheral libraries and drivers @@ -558,6 +517,7 @@ CONFIG_NETDEV_IPV6=0 # # sensors drivers # +# CONFIG_PKG_USING_FINGERPRINT is not set # CONFIG_PKG_USING_LSM6DSM is not set # CONFIG_PKG_USING_LSM6DSL is not set # CONFIG_PKG_USING_LPS22HB is not set @@ -617,11 +577,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_AD7746 is not set # CONFIG_PKG_USING_ADT74XX is not set # CONFIG_PKG_USING_MAX17048 is not set -# CONFIG_PKG_USING_AS7341 is not set -# CONFIG_PKG_USING_CW2015 is not set -# CONFIG_PKG_USING_ICM20608 is not set -# CONFIG_PKG_USING_PAJ7620 is not set -# CONFIG_PKG_USING_STHS34PF80 is not set # # touch drivers @@ -635,8 +590,10 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_FT6236 is not set # CONFIG_PKG_USING_XPT2046_TOUCH is not set # CONFIG_PKG_USING_REALTEK_AMEBA is not set +# CONFIG_PKG_USING_AS7341 is not set # CONFIG_PKG_USING_STM32_SDIO is not set # CONFIG_PKG_USING_ESP_IDF is not set +# CONFIG_PKG_USING_ICM20608 is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_PCF8574 is not set # CONFIG_PKG_USING_SX12XX is not set @@ -660,7 +617,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_AT24CXX is not set # CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set # CONFIG_PKG_USING_PCA9685 is not set -# CONFIG_PKG_USING_ILI9341 is not set # CONFIG_PKG_USING_I2C_TOOLS is not set # CONFIG_PKG_USING_NRF24L01 is not set # CONFIG_PKG_USING_RPLIDAR is not set @@ -677,6 +633,7 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_CAN_YMODEM is not set # CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set # CONFIG_PKG_USING_QLED is not set +# CONFIG_PKG_USING_PAJ7620 is not set # CONFIG_PKG_USING_AGILE_CONSOLE is not set # CONFIG_PKG_USING_LD3320 is not set # CONFIG_PKG_USING_WK2124 is not set @@ -707,11 +664,11 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_MB85RS16 is not set +# CONFIG_PKG_USING_CW2015 is not set # CONFIG_PKG_USING_RFM300 is not set # CONFIG_PKG_USING_IO_INPUT_FILTER is not set # CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set # CONFIG_PKG_USING_LRF_NV7LIDAR is not set -# CONFIG_PKG_USING_FINGERPRINT is not set # # AI packages @@ -761,7 +718,6 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_DONUT is not set # CONFIG_PKG_USING_COWSAY is not set -# CONFIG_PKG_USING_MORSE is not set # CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set @@ -951,7 +907,6 @@ CONFIG_NETDEV_IPV6=0 # Display # # CONFIG_PKG_USING_ARDUINO_U8G2 is not set -# CONFIG_PKG_USING_ARDUINO_U8GLIB_ARDUINO is not set # CONFIG_PKG_USING_SEEED_TM1637 is not set # @@ -981,17 +936,10 @@ CONFIG_NETDEV_IPV6=0 # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8574 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCA9685 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_PCF85063TP is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TPA2016 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DRV2605 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS1841 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS3502 is not set # # Other # -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351 is not set -# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set # # Signal IO @@ -1020,7 +968,7 @@ CONFIG_SOC_MIMXRT1062DVL6A=y # # Onboard Peripheral Drivers # -CONFIG_BSP_USING_SDRAM=y +# CONFIG_BSP_USING_SDRAM is not set # CONFIG_BSP_USING_ETH is not set # CONFIG_BSP_USING_LCD is not set # CONFIG_BSP_USING_TOUCHPAD is not set @@ -1030,12 +978,11 @@ CONFIG_BSP_USING_SDRAM=y # # On-chip Peripheral Drivers # +# CONFIG_BSP_USING_DMA is not set CONFIG_BSP_USING_GPIO=y # CONFIG_BSP_USING_RTC is not set # CONFIG_BSP_USING_SDIO is not set -CONFIG_BSP_USING_USB=y -CONFIG_BSP_USB0_HOST=y -# CONFIG_BSP_USB1_HOST is not set +# CONFIG_BSP_USING_USB is not set # CONFIG_BSP_USING_I2C is not set CONFIG_BSP_USING_LPUART=y CONFIG_BSP_USING_LPUART1=y @@ -1046,8 +993,9 @@ CONFIG_BSP_USING_LPUART1=y # CONFIG_BSP_USING_LPUART6 is not set # CONFIG_BSP_USING_LPUART7 is not set # CONFIG_BSP_USING_LPUART8 is not set +# CONFIG_BSP_USING_SPI is not set # CONFIG_BSP_USING_PXP is not set -CONFIG_BSP_USING_CACHE=y +# CONFIG_BSP_USING_CACHE is not set # # Board extended module Drivers diff --git a/bsp/imxrt/imxrt1060-nxp-evk/MIMXRT1060-EVK上手指南.md b/bsp/imxrt/imxrt1060-nxp-evk/MIMXRT1060-EVK上手指南.md index 68a818e069..f95d8a82b3 100644 --- a/bsp/imxrt/imxrt1060-nxp-evk/MIMXRT1060-EVK上手指南.md +++ b/bsp/imxrt/imxrt1060-nxp-evk/MIMXRT1060-EVK上手指南.md @@ -1,57 +1,55 @@ -### MIMXRT1060-EVK上手指南 +# MIMXRT1060-EVK上手指南 MIMXRT1060-EVK支持RT-Studio工程,本上手指南以RT-Studio环境的开发说明举例。 -#### 准备阶段 +## 1 准备阶段 - 拉取rt-thread的github仓库到本地,[链接地址](https://github.com/RT-Thread/rt-thread)。 - 下载安装RT-Thread Studio,[链接地址](https://www.rt-thread.org/studio.html)。 - 准备RW007模块。 -#### BSP上手阶段 +## 2 BSP上手阶段 -- 找到MIMXRT1060-EVK BSP所在目录,使用menuconfig配置工程 +### 2.1 menuconfig配置工程 - ![](./figures/6.png) +打开MIMXRT1060-EVK BSP所在目录,在ENV工具中使用menuconfig命令配置工程 - 取消暂时不需要的配置,具体操作如下: +![](./figures/6.png) - - Onboard Peripherial Drivers选项设置 +### 2.2 取消暂时不需要的配置,具体操作如下: - ![](./figures/4.png) +Onboard Peripherial Drivers选项设置: - - On-chip Peripherial Drivers选项设置 +![](./figures/4.png) - ![](./figures/5.png) +On-chip Peripherial Drivers选项设置: -- 点击文件,选择导入选项。 +![](./figures/5.png) + +### 2.3 点击文件,选择导入选项。 ![](./figures/1.png) -- 选择导入RT-Thread Bsp 到工作空间中 +### 2.4 选择导入RT-Thread Bsp 到工作空间中 - ![](./figures/2.png) +![](./figures/2.png) -
+
-- 按照示例填写工程信息 +### 2.5 按照示例填写工程信息 ![](./figures/3.png) -- 移除usb文件夹包含的文件 +
- ![](./figures/7.png) +### 2.6 编译工程 -
- -- 编译工程 - - ![](./figures/8.png) +![](./figures/8.png) 工程编译通过,至此,准备阶段完成。 -#### 使用RT-Studio配置BSP驱动 +## 3 使用RT-Studio配置BSP驱动 RT-Thread每个BSP已经默认适配了若干片上外设驱动与板载外设驱动,使用RT-Studio将相应的开关直接打开并依据使用环境配置相应参数即可使用。由于各个管脚存在复用功能,所以并不是所有的片上外设驱动与板载外设驱动都可以同时使用,使用时需要结合原理图来合理开启相应的外设驱动。 @@ -59,7 +57,7 @@ RT-Thread有许多软件软件包,使用RT-Studio将相应软件包的开关 ![](./figures/17.png) -#### 联网实操:使用RW007模块联网 +## 4 联网实操:使用RW007模块联网 RW007 是由上海睿赛德电子科技有限公司开发的高速 WiFi 模块,使用 SPI 与主机通信。[RW007使用指南链接](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/application-note/packages/rw007_module_using/an0034-rw007-module-using)。 @@ -67,25 +65,23 @@ MIMXRT1060-EVK板载arduino接口提供的SPI接口与SD卡的SDIO接口使用 ![](./figures/11.png) -##### MIMXRT1060-EVK使用RW007指南 - -###### 1.配置板载SPI外设 +### 4.1 配置板载SPI外设 RW007可采用SPI接口通讯,MIMXRT1060-EVK支持SPI驱动,默认采用轮询的方式与RW007通讯(暂不支持中断与DMA模式与RW007通讯),使用RT-Studio配置SPI的具体配置如下: ![](./figures/10.png) -###### 2.使用RT-Studio配置RW007软件包 +### 4.2 使用RT-Studio配置RW007软件包 点击左侧的RT-Thread Settings选项,弹出右侧的配置菜单,在搜索栏中输入RW007,选择`rw007:SPI WIFI rw007 driver `,相应配置参数如下: ![](./figures/9.png) -###### 3.将RW007模块插入板载的arduino接口 +### 4.3 将RW007模块插入板载的arduino接口 ![](./figures/12.png) -###### 4.修改RW007示例 +### 4.4 修改RW007示例 由于RW007软件包的默认示例是基于STM32的示例,所以在RT1060-EVK上需进行少量的修改,修改RW007软件包中的example文件夹中的rw007_stm32_port.c文件。 @@ -112,13 +108,13 @@ int wifi_spi_device_init(void) } ``` -###### 5.修改完成后,编译工程,烧录固件。 +### 4.5 修改完成后,编译工程,烧录固件。 ![](./figures/13.png) -`rw007 sn`与`rw007 ver`可以正常输出无乱码时,RW007驱动成功!!! +`rw007 sn`与`rw007 ver`可以正常输出无乱码时,RW007驱动成功! -###### 6. wifi联网测试 +### 4.6 wifi联网测试 在shell中输入`wifi scan`命令搜索WIFI。 @@ -132,4 +128,4 @@ int wifi_spi_device_init(void) ![](./figures/16.png) -至此MIMXRT1060-EVK的基础环境便搭建测试完毕!!!。 \ No newline at end of file +至此MIMXRT1060-EVK的基础环境便搭建测试完毕! \ No newline at end of file diff --git a/bsp/imxrt/imxrt1060-nxp-evk/rtconfig.h b/bsp/imxrt/imxrt1060-nxp-evk/rtconfig.h index a9fa377735..dbb3c5832f 100644 --- a/bsp/imxrt/imxrt1060-nxp-evk/rtconfig.h +++ b/bsp/imxrt/imxrt1060-nxp-evk/rtconfig.h @@ -45,7 +45,7 @@ #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart1" -#define RT_VER_NUM 0x50000 +#define RT_VER_NUM 0x50001 #define RT_USING_CACHE #define RT_USING_HW_ATOMIC #define RT_USING_CPU_FFS @@ -73,28 +73,9 @@ #define MSH_USING_BUILT_IN_COMMANDS #define FINSH_USING_DESCRIPTION #define FINSH_ARG_MAX 10 -#define RT_USING_DFS -#define DFS_USING_POSIX -#define DFS_USING_WORKDIR -#define DFS_FILESYSTEMS_MAX 4 -#define DFS_FILESYSTEM_TYPES_MAX 4 -#define DFS_FD_MAX 16 -#define RT_USING_DFS_ELMFAT -/* elm-chan's FatFs, Generic FAT Filesystem Module */ +/* DFS: device virtual file system */ -#define RT_DFS_ELM_CODE_PAGE 437 -#define RT_DFS_ELM_WORD_ACCESS -#define RT_DFS_ELM_USE_LFN_3 -#define RT_DFS_ELM_USE_LFN 3 -#define RT_DFS_ELM_LFN_UNICODE_0 -#define RT_DFS_ELM_LFN_UNICODE 0 -#define RT_DFS_ELM_MAX_LFN 255 -#define RT_DFS_ELM_DRIVES 2 -#define RT_DFS_ELM_MAX_SECTOR_SIZE 512 -#define RT_DFS_ELM_REENTRANT -#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -#define RT_USING_DFS_DEVFS /* Device Drivers */ @@ -110,11 +91,6 @@ /* Using USB */ -#define RT_USING_USB -#define RT_USING_USB_HOST -#define RT_USBH_MSTORAGE -#define UDISK_MOUNTPOINT "/" -#define RT_USBD_THREAD_STACK_SZ 4096 /* C/C++ and POSIX layer */ @@ -131,13 +107,6 @@ /* Network */ -#define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT -#define NETDEV_IPV4 1 -#define NETDEV_IPV6 0 /* Utilities */ @@ -180,6 +149,9 @@ /* u8g2: a monochrome graphic library */ +/* PainterEngine: A cross-platform graphics application framework written in C language */ + + /* tools packages */ @@ -252,7 +224,6 @@ /* Other */ - /* Signal IO */ @@ -267,16 +238,12 @@ /* Onboard Peripheral Drivers */ -#define BSP_USING_SDRAM /* On-chip Peripheral Drivers */ #define BSP_USING_GPIO -#define BSP_USING_USB -#define BSP_USB0_HOST #define BSP_USING_LPUART #define BSP_USING_LPUART1 -#define BSP_USING_CACHE /* Board extended module Drivers */