diff --git a/bsp/lpc54608-LPCXpresso/.config b/bsp/lpc54608-LPCXpresso/.config new file mode 100644 index 0000000000000000000000000000000000000000..b8829d0e7b39403069d1a29543e0bf838c127cb9 --- /dev/null +++ b/bsp/lpc54608-LPCXpresso/.config @@ -0,0 +1,260 @@ +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Configuration +# + +# +# RT-Thread Kernel +# +CONFIG_RT_NAME_MAX=8 +CONFIG_RT_ALIGN_SIZE=4 +CONFIG_RT_THREAD_PRIORITY_MAX=32 +CONFIG_RT_TICK_PER_SECOND=1000 +CONFIG_RT_DEBUG=y +CONFIG_RT_USING_OVERFLOW_CHECK=y +CONFIG_RT_DEBUG_INIT=0 +CONFIG_RT_DEBUG_THREAD=0 +CONFIG_RT_USING_HOOK=y +CONFIG_IDLE_THREAD_STACK_SIZE=256 +CONFIG_RT_USING_TIMER_SOFT=y +CONFIG_RT_TIMER_THREAD_PRIO=4 +CONFIG_RT_TIMER_THREAD_STACK_SIZE=512 + +# +# Inter-Thread communication +# +CONFIG_RT_USING_SEMAPHORE=y +CONFIG_RT_USING_MUTEX=y +CONFIG_RT_USING_EVENT=y +CONFIG_RT_USING_MAILBOX=y +CONFIG_RT_USING_MESSAGEQUEUE=y +# CONFIG_RT_USING_SIGNALS is not set + +# +# Memory Management +# +CONFIG_RT_USING_MEMPOOL=y +CONFIG_RT_USING_MEMHEAP=y +CONFIG_RT_USING_HEAP=y +CONFIG_RT_USING_SMALL_MEM=y +# CONFIG_RT_USING_SLAB is not set + +# +# Kernel Device Object +# +CONFIG_RT_USING_DEVICE=y +# CONFIG_RT_USING_INTERRUPT_INFO is not set +CONFIG_RT_USING_CONSOLE=y +CONFIG_RT_CONSOLEBUF_SIZE=128 +CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" +# CONFIG_RT_USING_MODULE is not set + +# +# RT-Thread Components +# +CONFIG_RT_USING_COMPONENTS_INIT=y +# CONFIG_RT_USING_USER_MAIN is not set + +# +# C++ features +# +# CONFIG_RT_USING_CPLUSPLUS is not set + +# +# Command shell +# +CONFIG_RT_USING_FINSH=y +CONFIG_FINSH_USING_HISTORY=y +CONFIG_FINSH_USING_SYMTAB=y +CONFIG_FINSH_USING_DESCRIPTION=y +CONFIG_FINSH_THREAD_PRIORITY=20 +CONFIG_FINSH_THREAD_STACK_SIZE=4096 +CONFIG_FINSH_CMD_SIZE=80 +# CONFIG_FINSH_USING_AUTH is not set +CONFIG_FINSH_USING_MSH=y +CONFIG_FINSH_USING_MSH_DEFAULT=y +# CONFIG_FINSH_USING_MSH_ONLY is not set + +# +# Device virtual file system +# +CONFIG_RT_USING_DFS=y +CONFIG_DFS_USING_WORKDIR=y +CONFIG_DFS_FILESYSTEMS_MAX=2 +CONFIG_DFS_FD_MAX=4 +CONFIG_RT_USING_DFS_ELMFAT=y + +# +# elm-chan's FatFs, Generic FAT Filesystem Module +# +CONFIG_RT_DFS_ELM_CODE_PAGE=437 +CONFIG_RT_DFS_ELM_WORD_ACCESS=y +CONFIG_RT_DFS_ELM_USE_LFN_0=y +# 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 is not set +CONFIG_RT_DFS_ELM_USE_LFN=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_USING_DFS_DEVFS is not set +# CONFIG_RT_USING_DFS_NET is not set +# CONFIG_RT_USING_DFS_ROMFS is not set +# CONFIG_RT_USING_DFS_RAMFS is not set +# CONFIG_RT_USING_DFS_UFFS is not set +# CONFIG_RT_USING_DFS_NFS is not set + +# +# Device Drivers +# +CONFIG_RT_USING_DEVICE_IPC=y +CONFIG_RT_USING_SERIAL=y +# CONFIG_RT_USING_CAN is not set +# CONFIG_RT_USING_HWTIMER is not set +CONFIG_RT_USING_I2C=y +CONFIG_RT_USING_I2C_BITOPS=y +CONFIG_RT_USING_PIN=y +# CONFIG_RT_USING_MTD_NOR is not set +CONFIG_RT_USING_MTD_NAND=y +# CONFIG_RT_MTD_NAND_DEBUG is not set +CONFIG_RT_USING_RTC=y +CONFIG_RT_USING_SDIO=y +CONFIG_RT_USING_SPI=y +# CONFIG_RT_USING_SFUD is not set +# CONFIG_RT_USING_W25QXX is not set +# CONFIG_RT_USING_GD is not set +CONFIG_RT_USING_ENC28J60=y +# CONFIG_RT_USING_SPI_WIFI is not set +# CONFIG_RT_USING_WDT is not set +# CONFIG_RT_USING_USB_HOST is not set +# CONFIG_RT_USING_USB_DEVICE is not set + +# +# POSIX layer and C standard library +# +CONFIG_RT_USING_LIBC=y +CONFIG_RT_USING_PTHREADS=y +# CONFIG_RT_USING_POSIX is not set + +# +# Network stack +# + +# +# light weight TCP/IP stack +# +CONFIG_RT_USING_LWIP=y +CONFIG_RT_USING_LWIP141=y +# CONFIG_RT_USING_LWIP202 is not set +# CONFIG_RT_LWIP_IGMP is not set +CONFIG_RT_LWIP_ICMP=y +# CONFIG_RT_LWIP_SNMP is not set +CONFIG_RT_LWIP_DNS=y +CONFIG_RT_LWIP_DHCP=y +CONFIG_IP_SOF_BROADCAST=1 +CONFIG_IP_SOF_BROADCAST_RECV=1 +# CONFIG_LWIP_USING_DHCPD is not set + +# +# Static IPv4 Address +# +CONFIG_RT_LWIP_IPADDR="192.168.1.30" +CONFIG_RT_LWIP_GWADDR="192.168.1.1" +CONFIG_RT_LWIP_MSKADDR="255.255.255.0" +CONFIG_RT_LWIP_UDP=y +CONFIG_RT_LWIP_TCP=y +# CONFIG_RT_LWIP_RAW is not set +# CONFIG_RT_LWIP_PPP is not set +# CONFIG_RT_LWIP_PPPOE is not set +# CONFIG_RT_LWIP_PPPOS is not set +CONFIG_RT_LWIP_PBUF_NUM=16 +CONFIG_RT_LWIP_RAW_PCB_NUM=4 +CONFIG_RT_LWIP_UDP_PCB_NUM=4 +CONFIG_RT_LWIP_TCP_PCB_NUM=4 +CONFIG_RT_LWIP_TCP_SEG_NUM=40 +CONFIG_RT_LWIP_TCP_SND_BUF=8196 +CONFIG_RT_LWIP_TCP_WND=8196 +CONFIG_RT_LWIP_TCPTHREAD_PRIORITY=10 +CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=8 +CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=1024 +CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12 +CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=1024 +CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8 +# CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set +CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 +CONFIG_SO_REUSE=1 +CONFIG_LWIP_SO_RCVTIMEO=1 +CONFIG_LWIP_SO_SNDTIMEO=1 +CONFIG_LWIP_SO_RCVBUF=1 + +# +# Modbus master and slave stack +# +# CONFIG_RT_USING_MODBUS is not set +# CONFIG_RT_USING_NETUTILS is not set + +# +# RT-Thread UI Engine +# +# CONFIG_RT_USING_GUIENGINE is not set + +# +# VBUS(Virtual Software BUS) +# +# CONFIG_RT_USING_VBUS is not set + +# +# RT-Thread online packages +# + +# +# system packages +# +# CONFIG_PKG_USING_PARTITION is not set +# CONFIG_PKG_USING_SQLITE is not set + +# +# IoT - internet of things +# +# CONFIG_PKG_USING_PAHOMQTT is not set +# CONFIG_PKG_USING_WEBCLIENT is not set +# CONFIG_PKG_USING_MONGOOSE is not set +# CONFIG_PKG_USING_WEBTERMINAL is not set +# CONFIG_PKG_USING_CJSON is not set +# CONFIG_PKG_USING_EZXML is not set + +# +# Marvell WiFi +# +# CONFIG_PKG_USING_MARVELLWIFI is not set + +# +# security packages +# +# CONFIG_PKG_USING_MBEDTLS is not set + +# +# language packages +# +# CONFIG_PKG_USING_JERRYSCRIPT is not set + +# +# multimedia packages +# +# CONFIG_PKG_USING_FASTLZ is not set + +# +# tools packages +# +# CONFIG_PKG_USING_CMBACKTRACE is not set +# CONFIG_PKG_USING_EASYLOGGER is not set +# CONFIG_PKG_USING_SYSTEMVIEW is not set + +# +# miscellaneous packages +# +# CONFIG_PKG_USING_HELLO is not set +CONFIG_RT_USING_UART0=y +CONFIG_USE_EXT_SDRAM=y diff --git a/bsp/lpc54608-LPCXpresso/Kconfig b/bsp/lpc54608-LPCXpresso/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..0418da633128372d60c03cec66529c211fb7611c --- /dev/null +++ b/bsp/lpc54608-LPCXpresso/Kconfig @@ -0,0 +1,29 @@ +mainmenu "RT-Thread Configuration" + +config $BSP_DIR + string + option env="BSP_ROOT" + default "." + +config $RTT_DIR + string + option env="RTT_ROOT" + default "../.." + +# you can change the RTT_ROOT default "../.." to your rtthread_root, +# example : default "F:/git_repositories/rt-thread" + +config $PKGS_DIR + string + option env="PKGS_ROOT" + default "packages" + +source "$RTT_DIR/KConfig" +source "$PKGS_DIR/KConfig" +source "$BSP_DIR/drivers/Kconfig" + + + + + + \ No newline at end of file diff --git a/bsp/lpc54608-LPCXpresso/applications/mnt.c b/bsp/lpc54608-LPCXpresso/applications/mnt.c index 863a62fbe16096ef5cad710bbad1d81b3e971dd3..85603fa45f34b9ffeea7dc4d57d6e6dc29ba8c53 100644 --- a/bsp/lpc54608-LPCXpresso/applications/mnt.c +++ b/bsp/lpc54608-LPCXpresso/applications/mnt.c @@ -53,14 +53,16 @@ int mnt_init(void) #endif /* initilize sd card */ - mci_hw_init("sd0"); + mci_hw_init("sd0"); + +#ifdef RT_DFS_ELM_REENTRANT /* mount sd card fat partition 1 as root directory */ if (dfs_mount("sd0", SD_ROOT, "elm", 0, 0) == 0) rt_kprintf("File System initialized!\n"); else rt_kprintf("File System init failed!\n"); - - +#endif + return 0; } INIT_ENV_EXPORT(mnt_init); diff --git a/bsp/lpc54608-LPCXpresso/drivers/Kconfig b/bsp/lpc54608-LPCXpresso/drivers/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..235b190f97ca8d3c58b2f9cbbb7c1987a6c79a3f --- /dev/null +++ b/bsp/lpc54608-LPCXpresso/drivers/Kconfig @@ -0,0 +1,11 @@ +config RT_USING_UART0 + bool "Enable UART0" + default y + +config RT_DFS_ELM_REENTRANT + bool "Enable SD Card" + default y + +config USE_EXT_SDRAM +bool "Enable SDRAM" +default y \ No newline at end of file diff --git a/bsp/lpc54608-LPCXpresso/drivers/board.c b/bsp/lpc54608-LPCXpresso/drivers/board.c index 273d9798659f326d87327a5f1e6926c62b0865db..a63c012dcc01b9df9fae57e5321e8995d0368bf2 100644 --- a/bsp/lpc54608-LPCXpresso/drivers/board.c +++ b/bsp/lpc54608-LPCXpresso/drivers/board.c @@ -65,7 +65,10 @@ void rt_hw_board_init() /*init uart device*/ rt_hw_uart_init(); + +#ifdef RT_USING_CONSOLE rt_console_set_device(RT_CONSOLE_DEVICE_NAME); +#endif #if LPC_EXT_SDRAM == 1 lpc_sdram_hw_init(); diff --git a/bsp/lpc54608-LPCXpresso/drivers/board.h b/bsp/lpc54608-LPCXpresso/drivers/board.h index 1817e00bca67c38b67052dcb54fc9324b0861889..abf1769918a6f8401695759da916ce4f47e7e9c3 100644 --- a/bsp/lpc54608-LPCXpresso/drivers/board.h +++ b/bsp/lpc54608-LPCXpresso/drivers/board.h @@ -24,7 +24,7 @@ #include /* disable SDRAM in default */ -#ifndef LPC_EXT_SDRAM +#ifndef USE_EXT_SDRAM #define LPC_EXT_SDRAM 1 #endif @@ -35,14 +35,6 @@ // #define LPC_EXT_SDRAM_END 0xA0800000 -// -#define RT_USING_UART0 -// -//#define RT_USING_UART1 -// -//#define RT_USING_UART2 -// -#define RT_CONSOLE_DEVICE_NAME "uart0" // diff --git a/bsp/lpc54608-LPCXpresso/drivers/drv_uart.c b/bsp/lpc54608-LPCXpresso/drivers/drv_uart.c index 23692de17ddea35d4d84153e6c2f5d53be13b712..d08d192617d9e49e9688a6c38741117ba7b6b30e 100644 --- a/bsp/lpc54608-LPCXpresso/drivers/drv_uart.c +++ b/bsp/lpc54608-LPCXpresso/drivers/drv_uart.c @@ -149,7 +149,8 @@ void rt_hw_uart_init(void) struct lpc_uart *uart; struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; - +#ifdef RT_USING_UART0 + uart = &uart0; serial0.ops = &lpc_uart_ops; @@ -191,4 +192,5 @@ void rt_hw_uart_init(void) rt_hw_serial_register(&serial0, "uart0", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM, uart); +#endif } diff --git a/bsp/lpc54608-LPCXpresso/project.uvoptx b/bsp/lpc54608-LPCXpresso/project.uvoptx index d8d8b3666080bd0fb2a969ce1bc6426503dc2747..a50fe3d54de4f21d7a69b1a5063f9b2ce4790d6d 100644 --- a/bsp/lpc54608-LPCXpresso/project.uvoptx +++ b/bsp/lpc54608-LPCXpresso/project.uvoptx @@ -77,7 +77,7 @@ 0 1 - 7 + 8 0 1 @@ -100,7 +100,8 @@ 1 0 0 - 12 + 1 + 2 @@ -122,7 +123,7 @@ 0 UL2CM3 - UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0NEW_DEVICE -FL080000 -FS00 -FP0($$Device:ARMCM4_FP$Device\ARM\Flash\NEW_DEVICE.FLM) + UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0LPC5460x_512 -FL080000 -FS00 -FP0($$Device:LPC54608J512ET180$Flash\LPC5460x_512.FLM) @@ -158,9 +159,12 @@ 0 - - - 0 + 0 + 0 + + + + 1 0 @@ -1263,8 +1267,8 @@ 0 0 0 - ..\..\components\dfs\filesystems\devfs\devfs.c - devfs.c + ..\..\components\dfs\filesystems\elmfat\dfs_elm.c + dfs_elm.c 0 0 @@ -1275,43 +1279,43 @@ 0 0 0 - ..\..\components\dfs\filesystems\elmfat\dfs_elm.c - dfs_elm.c + ..\..\components\dfs\filesystems\elmfat\ff.c + ff.c 0 0 + + + + DeviceDrivers + 0 + 0 + 0 + 0 - 7 + 8 89 1 0 0 0 - ..\..\components\dfs\filesystems\elmfat\ff.c - ff.c + ..\..\components\drivers\i2c\i2c_core.c + i2c_core.c 0 0 - 7 + 8 90 1 0 0 0 - ..\..\components\dfs\filesystems\elmfat\option\ccfile.c - ccfile.c + ..\..\components\drivers\i2c\i2c_dev.c + i2c_dev.c 0 0 - - - - DeviceDrivers - 0 - 0 - 0 - 0 8 91 @@ -1319,8 +1323,8 @@ 0 0 0 - ..\..\components\drivers\i2c\i2c_core.c - i2c_core.c + ..\..\components\drivers\i2c\i2c-bit-ops.c + i2c-bit-ops.c 0 0 @@ -1331,8 +1335,8 @@ 0 0 0 - ..\..\components\drivers\i2c\i2c_dev.c - i2c_dev.c + ..\..\components\drivers\misc\pin.c + pin.c 0 0 @@ -1343,6 +1347,18 @@ 0 0 0 + ..\..\components\drivers\mtd\mtd_nand.c + mtd_nand.c + 0 + 0 + + + 8 + 94 + 1 + 0 + 0 + 0 ..\..\components\drivers\rtc\rtc.c rtc.c 0 @@ -1350,7 +1366,67 @@ 8 - 94 + 95 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\block_dev.c + block_dev.c + 0 + 0 + + + 8 + 96 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\mmcsd_core.c + mmcsd_core.c + 0 + 0 + + + 8 + 97 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\sd.c + sd.c + 0 + 0 + + + 8 + 98 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\sdio.c + sdio.c + 0 + 0 + + + 8 + 99 + 1 + 0 + 0 + 0 + ..\..\components\drivers\sdio\mmc.c + mmc.c + 0 + 0 + + + 8 + 100 1 0 0 @@ -1362,7 +1438,7 @@ 8 - 95 + 101 1 0 0 @@ -1374,7 +1450,7 @@ 8 - 96 + 102 1 0 0 @@ -1386,7 +1462,19 @@ 8 - 97 + 103 + 1 + 0 + 0 + 0 + ..\..\components\drivers\spi\enc28j60.c + enc28j60.c + 0 + 0 + + + 8 + 104 1 0 0 @@ -1398,7 +1486,7 @@ 8 - 98 + 105 1 0 0 @@ -1410,7 +1498,7 @@ 8 - 99 + 106 1 0 0 @@ -1422,7 +1510,7 @@ 8 - 100 + 107 1 0 0 @@ -1434,7 +1522,7 @@ 8 - 101 + 108 1 0 0 @@ -1446,7 +1534,7 @@ 8 - 102 + 109 1 0 0 @@ -1466,7 +1554,7 @@ 0 9 - 103 + 110 1 0 0 @@ -1478,7 +1566,7 @@ 9 - 104 + 111 1 0 0 @@ -1490,7 +1578,7 @@ 9 - 105 + 112 1 0 0 @@ -1502,7 +1590,7 @@ 9 - 106 + 113 1 0 0 @@ -1514,7 +1602,7 @@ 9 - 107 + 114 1 0 0 @@ -1526,7 +1614,7 @@ 9 - 108 + 115 1 0 0 @@ -1538,7 +1626,7 @@ 9 - 109 + 116 1 0 0 @@ -1550,7 +1638,7 @@ 9 - 110 + 117 1 0 0 @@ -1562,7 +1650,7 @@ 9 - 111 + 118 1 0 0 @@ -1574,7 +1662,7 @@ 9 - 112 + 119 1 0 0 @@ -1586,7 +1674,7 @@ 9 - 113 + 120 1 0 0 @@ -1598,7 +1686,7 @@ 9 - 114 + 121 1 0 0 @@ -1610,7 +1698,7 @@ 9 - 115 + 122 1 0 0 @@ -1622,7 +1710,7 @@ 9 - 116 + 123 1 0 0 @@ -1634,7 +1722,7 @@ 9 - 117 + 124 1 0 0 @@ -1646,7 +1734,7 @@ 9 - 118 + 125 1 0 0 @@ -1666,7 +1754,7 @@ 0 10 - 119 + 126 1 0 0 @@ -1678,7 +1766,7 @@ 10 - 120 + 127 1 0 0 @@ -1690,7 +1778,7 @@ 10 - 121 + 128 1 0 0 @@ -1702,7 +1790,7 @@ 10 - 122 + 129 1 0 0 @@ -1714,7 +1802,7 @@ 10 - 123 + 130 1 0 0 @@ -1734,7 +1822,7 @@ 0 11 - 124 + 131 1 0 0 @@ -1746,7 +1834,7 @@ 11 - 125 + 132 1 0 0 @@ -1758,7 +1846,7 @@ 11 - 126 + 133 1 0 0 @@ -1770,7 +1858,7 @@ 11 - 127 + 134 1 0 0 @@ -1782,7 +1870,7 @@ 11 - 128 + 135 1 0 0 @@ -1794,7 +1882,7 @@ 11 - 129 + 136 1 0 0 @@ -1806,7 +1894,7 @@ 11 - 130 + 137 1 0 0 @@ -1818,7 +1906,7 @@ 11 - 131 + 138 1 0 0 @@ -1830,7 +1918,7 @@ 11 - 132 + 139 1 0 0 @@ -1842,7 +1930,7 @@ 11 - 133 + 140 1 0 0 @@ -1854,7 +1942,7 @@ 11 - 134 + 141 1 0 0 @@ -1866,7 +1954,7 @@ 11 - 135 + 142 1 0 0 @@ -1886,7 +1974,7 @@ 0 12 - 136 + 143 1 0 0 @@ -1898,7 +1986,7 @@ 12 - 137 + 144 1 0 0 @@ -1910,7 +1998,7 @@ 12 - 138 + 145 1 0 0 @@ -1922,7 +2010,7 @@ 12 - 139 + 146 1 0 0 @@ -1934,7 +2022,7 @@ 12 - 140 + 147 1 0 0 @@ -1946,7 +2034,7 @@ 12 - 141 + 148 1 0 0 @@ -1958,7 +2046,7 @@ 12 - 142 + 149 1 0 0 @@ -1970,7 +2058,7 @@ 12 - 143 + 150 1 0 0 @@ -1982,7 +2070,7 @@ 12 - 144 + 151 1 0 0 @@ -1994,7 +2082,7 @@ 12 - 145 + 152 1 0 0 @@ -2006,7 +2094,7 @@ 12 - 146 + 153 1 0 0 @@ -2018,7 +2106,7 @@ 12 - 147 + 154 1 0 0 @@ -2030,7 +2118,7 @@ 12 - 148 + 155 1 0 0 @@ -2042,7 +2130,7 @@ 12 - 149 + 156 1 0 0 @@ -2054,7 +2142,7 @@ 12 - 150 + 157 1 0 0 @@ -2066,7 +2154,7 @@ 12 - 151 + 158 1 0 0 @@ -2078,7 +2166,7 @@ 12 - 152 + 159 1 0 0 @@ -2090,7 +2178,7 @@ 12 - 153 + 160 1 0 0 @@ -2102,7 +2190,7 @@ 12 - 154 + 161 1 0 0 @@ -2114,7 +2202,7 @@ 12 - 155 + 162 1 0 0 @@ -2126,7 +2214,7 @@ 12 - 156 + 163 1 0 0 @@ -2138,7 +2226,7 @@ 12 - 157 + 164 1 0 0 @@ -2150,7 +2238,7 @@ 12 - 158 + 165 1 0 0 @@ -2162,7 +2250,7 @@ 12 - 159 + 166 1 0 0 @@ -2174,7 +2262,7 @@ 12 - 160 + 167 1 0 0 @@ -2186,7 +2274,7 @@ 12 - 161 + 168 1 0 0 @@ -2198,7 +2286,7 @@ 12 - 162 + 169 1 0 0 @@ -2210,7 +2298,7 @@ 12 - 163 + 170 1 0 0 @@ -2222,7 +2310,7 @@ 12 - 164 + 171 1 0 0 @@ -2234,7 +2322,7 @@ 12 - 165 + 172 1 0 0 @@ -2246,7 +2334,7 @@ 12 - 166 + 173 1 0 0 @@ -2258,7 +2346,7 @@ 12 - 167 + 174 1 0 0 @@ -2270,7 +2358,7 @@ 12 - 168 + 175 1 0 0 @@ -2282,7 +2370,7 @@ 12 - 169 + 176 1 0 0 @@ -2294,7 +2382,7 @@ 12 - 170 + 177 1 0 0 diff --git a/bsp/lpc54608-LPCXpresso/project.uvprojx b/bsp/lpc54608-LPCXpresso/project.uvprojx index f4b0dc2de9dabdb699c814031b8b3966543e41f6..a498cdb847ef11f85cc91880a45fe7913f971322 100644 --- a/bsp/lpc54608-LPCXpresso/project.uvprojx +++ b/bsp/lpc54608-LPCXpresso/project.uvprojx @@ -10,19 +10,19 @@ rtthread-lpc546xx 0x4 ARM-ADS - 5060061::V5.06 update 1 (build 61)::ARMCC + 5060422::V5.06 update 4 (build 422)::ARMCC - ARMCM4_FP - ARM - ARM.CMSIS.4.5.0 + LPC54608J512ET180:M4 + NXP + Keil.LPC54000_DFP.2.5.0 http://www.keil.com/pack/ - IROM(0x00000000,0x80000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ESEL ELITTLE + IROM(0x00000000,0x00080000) IRAM(0x20000000,0x00028000) IRAM2(0x04000000,0x00008000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL080000 -FP0($$Device:ARMCM4_FP$Device\ARM\Flash\NEW_DEVICE.FLM)) + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0LPC5460x_512 -FS00 -FL080000 -FP0($$Device:LPC54608J512ET180$Flash\LPC5460x_512.FLM)) 0 - $$Device:ARMCM4_FP$Device\ARM\ARMCM4\Include\ARMCM4_FP.h + $$Device:LPC54608J512ET180$Device\Include\LPC54608.h @@ -32,7 +32,7 @@ - $$Device:ARMCM4_FP$Device\ARM\SVD\ARMCM4.svd + $$Device:LPC54608J512ET180$SVD\LPC54608.svd 0 0 @@ -137,7 +137,7 @@ 1 BIN\UL2CM3.DLL - + "" () @@ -183,11 +183,11 @@ 0 0 2 - 0 + 1 0 8 1 - 1 + 0 0 0 3 @@ -243,7 +243,7 @@ 0 0x20000000 - 0x20000 + 0x28000 1 @@ -298,12 +298,12 @@ 0 0x20000000 - 0x20000 + 0x28000 0 - 0x0 - 0x0 + 0x4000000 + 0x8000 @@ -328,11 +328,14 @@ 0 1 1 + 0 + 0 + 0 --library_interface=armcc --library_type=standardlib --diag_suppress=66,1296,186 CPU_LPC54608J512ET180=1, CPU_LPC54608, CORE_M4, RT_USING_ARM_LIBC - applications;.;drivers;SDK_2.2_LPCXpresso54608\CMSIS\Include;SDK_2.2_LPCXpresso54608\devices\LPC54608;SDK_2.2_LPCXpresso54608\devices\LPC54608\drivers;SDK_2.2_LPCXpresso54608\devices\LPC54608\utilities;SDK_2.2_LPCXpresso54608\sdmmc_2.1.2\inc;SDK_2.2_LPCXpresso54608\sdmmc_2.1.2\src;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\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\spi;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\pthreads;..\..\components\net\lwip-1.4.1\src;..\..\components\net\lwip-1.4.1\src\include;..\..\components\net\lwip-1.4.1\src\include\ipv4;..\..\components\net\lwip-1.4.1\src\arch\include;..\..\components\net\lwip-1.4.1\src\include\netif + applications;.;drivers;SDK_2.2_LPCXpresso54608\CMSIS\Include;SDK_2.2_LPCXpresso54608\devices\LPC54608;SDK_2.2_LPCXpresso54608\devices\LPC54608\drivers;SDK_2.2_LPCXpresso54608\devices\LPC54608\utilities;SDK_2.2_LPCXpresso54608\sdmmc_2.1.2\inc;SDK_2.2_LPCXpresso54608\sdmmc_2.1.2\src;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\spi;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\pthreads;..\..\components\net\lwip-1.4.1\src;..\..\components\net\lwip-1.4.1\src\include;..\..\components\net\lwip-1.4.1\src\include\ipv4;..\..\components\net\lwip-1.4.1\src\arch\include;..\..\components\net\lwip-1.4.1\src\include\netif @@ -345,6 +348,7 @@ 0 0 0 + 0 @@ -835,11 +839,6 @@ 1 ..\..\components\dfs\src\dfs_posix.c - - devfs.c - 1 - ..\..\components\dfs\filesystems\devfs\devfs.c - dfs_elm.c 1 @@ -850,11 +849,6 @@ 1 ..\..\components\dfs\filesystems\elmfat\ff.c - - ccfile.c - 1 - ..\..\components\dfs\filesystems\elmfat\option\ccfile.c - @@ -870,11 +864,51 @@ 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 + + + mtd_nand.c + 1 + ..\..\components\drivers\mtd\mtd_nand.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 @@ -890,6 +924,11 @@ 1 ..\..\components\drivers\spi\spi_dev.c + + enc28j60.c + 1 + ..\..\components\drivers\spi\enc28j60.c + completion.c 1 @@ -1286,4 +1325,10 @@ + + + + + + diff --git a/bsp/lpc54608-LPCXpresso/rtconfig.h b/bsp/lpc54608-LPCXpresso/rtconfig.h index 6521ceb4c4065c5a9a1d69fef20fa0d0fe9e527f..2ed87c10688f4c0b5858fd559b5b6e05349916ca 100644 --- a/bsp/lpc54608-LPCXpresso/rtconfig.h +++ b/bsp/lpc54608-LPCXpresso/rtconfig.h @@ -1,268 +1,235 @@ -/* RT-Thread config file */ - -#ifndef __RTTHREAD_CFG_H__ -#define __RTTHREAD_CFG_H__ - -// - -// -#define RT_NAME_MAX 8 -// -#define RT_ALIGN_SIZE 4 -// -// 8 -// 32 -// 256 -// -#define RT_THREAD_PRIORITY_MAX 32 -// -#define RT_TICK_PER_SECOND 1000 -// -#define IDLE_THREAD_STACK_SIZE 512 -// -// #define RT_USING_MODULE -//
+#ifndef RT_CONFIG_H__ +#define RT_CONFIG_H__ + +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Configuration */ + +/* RT-Thread Kernel */ + +#define RT_NAME_MAX 8 +#define RT_ALIGN_SIZE 4 +#define RT_THREAD_PRIORITY_MAX 32 +#define RT_TICK_PER_SECOND 1000 #define RT_DEBUG -// -#define RT_DEBUG_INIT 0 -// -// #define RT_THREAD_DEBUG -// #define RT_USING_OVERFLOW_CHECK -//
- -// +#define RT_DEBUG_INIT 0 +#define RT_DEBUG_THREAD 0 #define RT_USING_HOOK -//
+#define IDLE_THREAD_STACK_SIZE 256 #define RT_USING_TIMER_SOFT -// -#define RT_TIMER_THREAD_PRIO 4 -// -#define RT_TIMER_THREAD_STACK_SIZE 512 -//
- -//
-// +#define RT_TIMER_THREAD_PRIO 4 +#define RT_TIMER_THREAD_STACK_SIZE 512 + +/* Inter-Thread communication */ + #define RT_USING_SEMAPHORE -// #define RT_USING_MUTEX -// #define RT_USING_EVENT -// #define RT_USING_MAILBOX -// #define RT_USING_MESSAGEQUEUE -//
+/* RT_USING_SIGNALS is not set */ + +/* Memory Management */ -//
-// #define RT_USING_MEMPOOL -// #define RT_USING_MEMHEAP -// #define RT_USING_HEAP -// #define RT_USING_SMALL_MEM -// -// #define RT_USING_SLAB -//
+/* RT_USING_SLAB is not set */ + +/* Kernel Device Object */ -//
#define RT_USING_DEVICE -// -#define RT_USING_DEVICE_IPC -// -#define RT_USING_SERIAL -// -#define RT_UART_RX_BUFFER_SIZE 2048 -// -// #define RT_USING_MTD_NAND -// -// #define RT_MTD_NAND_DEBUG -// -// #define RT_USING_NFTL -// -#define RT_USING_SPI -// -#define RT_USING_I2C -//#define RT_USING_I2C_BITOPS -// -#define RT_USING_RTC -// -#define RT_MMCSD_THREAD_PREORITY 15 -//
+/* RT_USING_INTERRUPT_INFO is not set */ #define RT_USING_CONSOLE -// -#define RT_CONSOLEBUF_SIZE 128 -// -#define RT_CONSOLE_DEVICE_NAME "uart0" -//
+#define RT_CONSOLEBUF_SIZE 128 +#define RT_CONSOLE_DEVICE_NAME "uart0" +/* RT_USING_MODULE is not set */ + +/* RT-Thread Components */ -// #define RT_USING_COMPONENTS_INIT -//
+/* RT_USING_USER_MAIN is not set */ + +/* C++ features */ + +/* RT_USING_CPLUSPLUS is not set */ + +/* Command shell */ + #define RT_USING_FINSH -// +#define FINSH_USING_HISTORY #define FINSH_USING_SYMTAB -// #define FINSH_USING_DESCRIPTION -// -#define FINSH_THREAD_STACK_SIZE 4096 -// +#define FINSH_THREAD_PRIORITY 20 +#define FINSH_THREAD_STACK_SIZE 4096 +#define FINSH_CMD_SIZE 80 +/* FINSH_USING_AUTH is not set */ #define FINSH_USING_MSH -// #define FINSH_USING_MSH_DEFAULT -// -// #define FINSH_USING_MSH_ONLY -//
+/* FINSH_USING_MSH_ONLY is not set */ -//
-// -#define RT_USING_LIBC -// -#define RT_USING_PTHREADS -//#define RT_USING_CPLUSPLUS -//
+/* Device virtual file system */ -//
#define RT_USING_DFS -// #define DFS_USING_WORKDIR -// -#define DFS_FILESYSTEM_TYPES_MAX 4 -// -#define DFS_FILESYSTEMS_MAX 4 -// -#define DFS_FD_MAX 32 -// +#define DFS_FILESYSTEMS_MAX 2 +#define DFS_FD_MAX 4 #define RT_USING_DFS_ELMFAT -// -#define RT_DFS_ELM_DRIVES 4 -// + +/* elm-chan's FatFs, Generic FAT Filesystem Module */ + +#define RT_DFS_ELM_CODE_PAGE 437 +#define RT_DFS_ELM_WORD_ACCESS +#define RT_DFS_ELM_USE_LFN_0 +/* RT_DFS_ELM_USE_LFN_1 is not set */ +/* RT_DFS_ELM_USE_LFN_2 is not set */ +/* RT_DFS_ELM_USE_LFN_3 is not set */ +#define RT_DFS_ELM_USE_LFN 0 +#define RT_DFS_ELM_MAX_LFN 255 +#define RT_DFS_ELM_DRIVES 2 +#define RT_DFS_ELM_MAX_SECTOR_SIZE 512 +/* RT_DFS_ELM_USE_ERASE is not set */ #define RT_DFS_ELM_REENTRANT -// -// 1 -// 2 -// 3 -// -#define RT_DFS_ELM_USE_LFN 3 -// -#define RT_DFS_ELM_CODE_PAGE 437 -// -#define RT_DFS_ELM_CODE_PAGE_FILE -// -#define RT_DFS_ELM_MAX_LFN 128 -// -#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 -// -// #define RT_DFS_ELM_USE_ERASE -// -// #define RT_USING_DFS_YAFFS2 -// -// #define RT_USING_DFS_UFFS -// -#define RT_USING_DFS_DEVFS -// -//#define RT_USING_DFS_ROMFS -// -// #define RT_USING_DFS_NFS -// -#define RT_NFS_HOST_EXPORT "192.168.1.20:/" -//
- -//
+/* RT_USING_DFS_DEVFS is not set */ +/* RT_USING_DFS_NET is not set */ +/* RT_USING_DFS_ROMFS is not set */ +/* RT_USING_DFS_RAMFS is not set */ +/* RT_USING_DFS_UFFS is not set */ +/* RT_USING_DFS_NFS is not set */ + +/* Device Drivers */ + +#define RT_USING_DEVICE_IPC +#define RT_USING_SERIAL +/* RT_USING_CAN is not set */ +/* RT_USING_HWTIMER is not set */ +#define RT_USING_I2C +#define RT_USING_I2C_BITOPS +#define RT_USING_PIN +/* RT_USING_MTD_NOR is not set */ +#define RT_USING_MTD_NAND +/* RT_MTD_NAND_DEBUG is not set */ +#define RT_USING_RTC +#define RT_USING_SDIO +#define RT_USING_SPI +/* RT_USING_SFUD is not set */ +/* RT_USING_W25QXX is not set */ +/* RT_USING_GD is not set */ +#define RT_USING_ENC28J60 +/* RT_USING_SPI_WIFI is not set */ +/* RT_USING_WDT is not set */ +/* RT_USING_USB_HOST is not set */ +/* RT_USING_USB_DEVICE is not set */ + +/* POSIX layer and C standard library */ + +#define RT_USING_LIBC +#define RT_USING_PTHREADS +/* RT_USING_POSIX is not set */ + +/* Network stack */ + +/* light weight TCP/IP stack */ + #define RT_USING_LWIP -// #define RT_USING_LWIP141 -// +/* RT_USING_LWIP202 is not set */ +/* RT_LWIP_IGMP is not set */ #define RT_LWIP_ICMP -// -// #define RT_LWIP_IGMP -// -#define RT_LWIP_UDP -// -#define RT_LWIP_TCP -// +/* RT_LWIP_SNMP is not set */ #define RT_LWIP_DNS -// -#define RT_LWIP_PBUF_NUM 8 -// -#define RT_LWIP_TCP_PCB_NUM 8 -// -#define RT_LWIP_TCP_SND_BUF 8192 -// -#define RT_LWIP_TCP_WND 4096 -// -// #define RT_LWIP_SNMP -// -//#define RT_LWIP_DHCP -// -#define RT_LWIP_TCPTHREAD_PRIORITY 12 -// -#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8 -// -#define RT_LWIP_TCPTHREAD_STACKSIZE 4096 -// -#define RT_LWIP_ETHTHREAD_PRIORITY 14 -// -#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 -// -#define RT_LWIP_ETHTHREAD_STACKSIZE 512 -// -#define RT_LWIP_IPADDR "192.168.1.30" -// -#define RT_LWIP_GWADDR "192.168.1.1" -// +#define RT_LWIP_DHCP +#define IP_SOF_BROADCAST 1 +#define IP_SOF_BROADCAST_RECV 1 +/* LWIP_USING_DHCPD is not set */ + +/* Static IPv4 Address */ + +#define RT_LWIP_IPADDR "192.168.1.30" +#define RT_LWIP_GWADDR "192.168.1.1" #define RT_LWIP_MSKADDR "255.255.255.0" -//
- -//
-//#define RT_USING_RTGUI -//#define RTGUI_USING_TTF -#define UTF8_TO_UNICODE -// -#define RTGUI_NAME_MAX 12 -// -#define RTGUI_SVR_THREAD_STACK_SIZE 16384 -// -// #define RTGUI_USING_SMALL_SIZE -// -#define RTGUI_USING_FONT16 -// -// #define RTGUI_USING_FONT12 -// -#define RTGUI_USING_FONTHZ -// -#define RTGUI_DEFAULT_FONT_SIZE 16 -// -#define RTGUI_USING_DFS_FILERW -// -// #define RTGUI_USING_HZ_BMP -// -#define RTGUI_USING_HZ_FILE -// -// #define RTGUI_USING_MOUSE_CURSOR -// -// #define RTGUI_IMAGE_XPM -// -// #define RTGUI_IMAGE_BMP -// -// #define RTGUI_IMAGE_JPEG -// -// #define RTGUI_IMAGE_TJPGD -// -// #define RTGUI_IMAGE_PNG -// -#define RTGUI_IMAGE_LODEPNG -// -// #define RTGUI_USING_NOTEBOOK_IMAGE -// -//#define RTGUI_USING_HW_CURSOR -// -// #define RTGUI_USING_CALI -#define RTGUI_IMAGE_CONTAINER -//
- -// +#define RT_LWIP_UDP +#define RT_LWIP_TCP +/* RT_LWIP_RAW is not set */ +/* RT_LWIP_PPP is not set */ +/* RT_LWIP_PPPOE is not set */ +/* RT_LWIP_PPPOS is not set */ +#define RT_LWIP_PBUF_NUM 16 +#define RT_LWIP_RAW_PCB_NUM 4 +#define RT_LWIP_UDP_PCB_NUM 4 +#define RT_LWIP_TCP_PCB_NUM 4 +#define RT_LWIP_TCP_SEG_NUM 40 +#define RT_LWIP_TCP_SND_BUF 8196 +#define RT_LWIP_TCP_WND 8196 +#define RT_LWIP_TCPTHREAD_PRIORITY 10 +#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8 +#define RT_LWIP_TCPTHREAD_STACKSIZE 1024 +#define RT_LWIP_ETHTHREAD_PRIORITY 12 +#define RT_LWIP_ETHTHREAD_STACKSIZE 1024 +#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 +/* RT_LWIP_REASSEMBLY_FRAG is not set */ +#define LWIP_NETIF_STATUS_CALLBACK 1 +#define SO_REUSE 1 +#define LWIP_SO_RCVTIMEO 1 +#define LWIP_SO_SNDTIMEO 1 +#define LWIP_SO_RCVBUF 1 + +/* Modbus master and slave stack */ + +/* RT_USING_MODBUS is not set */ +/* RT_USING_NETUTILS is not set */ + +/* RT-Thread UI Engine */ + +/* RT_USING_GUIENGINE is not set */ + +/* VBUS(Virtual Software BUS) */ + +/* RT_USING_VBUS is not set */ + +/* RT-Thread online packages */ + +/* system packages */ + +/* PKG_USING_PARTITION is not set */ +/* PKG_USING_SQLITE is not set */ + +/* IoT - internet of things */ + +/* PKG_USING_PAHOMQTT is not set */ +/* PKG_USING_WEBCLIENT is not set */ +/* PKG_USING_MONGOOSE is not set */ +/* PKG_USING_WEBTERMINAL is not set */ +/* PKG_USING_CJSON is not set */ +/* PKG_USING_EZXML is not set */ + +/* Marvell WiFi */ + +/* PKG_USING_MARVELLWIFI is not set */ + +/* security packages */ + +/* PKG_USING_MBEDTLS is not set */ + +/* language packages */ + +/* PKG_USING_JERRYSCRIPT is not set */ + +/* multimedia packages */ + +/* PKG_USING_FASTLZ is not set */ + +/* tools packages */ + +/* PKG_USING_CMBACKTRACE is not set */ +/* PKG_USING_EASYLOGGER is not set */ +/* PKG_USING_SYSTEMVIEW is not set */ + +/* miscellaneous packages */ + +/* PKG_USING_HELLO is not set */ +#define RT_USING_UART0 +#define USE_EXT_SDRAM #endif diff --git a/components/dfs/filesystems/nfs/rpc/clnt_generic.c b/components/dfs/filesystems/nfs/rpc/clnt_generic.c index 4e4e6a16581c2c231f6b7f8d4d4e45336eff7cc0..dcc2eb2097c95f1b156c2c8d747653fea43aadfb 100644 --- a/components/dfs/filesystems/nfs/rpc/clnt_generic.c +++ b/components/dfs/filesystems/nfs/rpc/clnt_generic.c @@ -50,7 +50,7 @@ CLIENT *clnt_create (const char *hostname, const unsigned long prog, struct timeval tv; CLIENT *client; - h = gethostbyname(hostname); + h = (struct hostent *)gethostbyname(hostname); if (h == NULL) { rt_kprintf("unknown host\n"); return (NULL); diff --git a/components/net/freemodbus/port/port.h b/components/net/freemodbus/port/port.h index 73d2177c9a36769d11d31bb200b393bbea3d495e..97b648a8bb73932b74273f88a5169e5d744201ee 100644 --- a/components/net/freemodbus/port/port.h +++ b/components/net/freemodbus/port/port.h @@ -22,7 +22,6 @@ #ifndef _PORT_H #define _PORT_H -#include #include "mbconfig.h" #include #include @@ -35,7 +34,7 @@ #define PR_END_EXTERN_C } #define ENTER_CRITICAL_SECTION() EnterCriticalSection() -#define EXIT_CRITICAL_SECTION() ExitCriticalSection() +#define EXIT_CRITICAL_SECTION() ExitCriticalSection() typedef uint8_t BOOL;