diff --git a/apps/chrg/.config b/apps/chrg/.config index cda33ed..f3abc0e 100644 --- a/apps/chrg/.config +++ b/apps/chrg/.config @@ -324,27 +324,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 # # Network # -CONFIG_RT_USING_SAL=y -CONFIG_SAL_INTERNET_CHECK=y - -# -# Docking with protocol stacks -# -# CONFIG_SAL_USING_LWIP is not set -# CONFIG_SAL_USING_AT is not set -# CONFIG_SAL_USING_TLS is not set -# end of Docking with protocol stacks - -CONFIG_SAL_SOCKETS_NUM=16 -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_LINK_STATUS_CALLBACK is not set -# CONFIG_NETDEV_USING_IPV6 is not set -CONFIG_NETDEV_IPV4=1 -CONFIG_NETDEV_IPV6=0 +# CONFIG_RT_USING_SAL is not set +# CONFIG_RT_USING_NETDEV is not set # CONFIG_RT_USING_LWIP is not set # CONFIG_RT_USING_AT is not set # end of Network diff --git a/apps/chrg/project.uvprojx b/apps/chrg/project.uvprojx index 70099cb..9290566 100644 --- a/apps/chrg/project.uvprojx +++ b/apps/chrg/project.uvprojx @@ -10,7 +10,6 @@ rt-thread 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC 0 @@ -337,9 +336,9 @@ 0 - USE_HAL_DRIVER, STM32F405xx, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS, RT_USING_LIBC, RT_USING_ARMLIBC,USER_VECT_TAB_ADDRESS=0x08010000 + __RTTHREAD__, RT_USING_ARMLIBC, USE_HAL_DRIVER, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, STM32F405xx, __STDC_LIMIT_MACROS, USER_VECT_TAB_ADDRESS=0x08010000 - ..\..\rt-thread\components\drivers\include;..\..\lib\cmsis-core\Include;board;..\..\rt-thread\components\finsh;..\..\rt-thread\components\net\netdev\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\rt-thread\components\drivers\phy;..\..\rt-thread\libcpu\arm\common;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\include;applications;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\components\net\sal\include\socket\sys_socket;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\ipc;..\..\lib\stm32f4\STM32F4_CMSIS\Include;..\..\lib\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\lib\freemodbus\modbus\ascii;..\..\lib\freemodbus\modbus\rtu;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;..\..\rt-thread\components\drivers\smp_call;..\..\lib\freemodbus\port;..\..\lib\freemodbus\modbus\tcp;..\..\rt-thread\components\drivers\include;.;..\..\rt-thread\components\libc\posix\io\epoll;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\net\sal\include;..\..\rt-thread\components\net\sal\include\socket;..\..\lib\freemodbus\modbus\include;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\lib\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\extension;board\CubeMX_Config\Inc + ..\..\lib\freemodbus\port;..\..\rt-thread\components\libc\compilers\common\extension;board\CubeMX_Config\Inc;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;..\..\rt-thread\components\libc\posix\io\epoll;..\..\lib\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\lib\freemodbus\modbus\tcp;..\..\rt-thread\libcpu\arm\common;..\..\lib\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\phy;..\..\rt-thread\include;..\..\lib\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;..\..\rt-thread\components\finsh;..\..\lib\freemodbus\modbus\include;applications;board;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\ipc;..\..\lib\freemodbus\modbus\rtu;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\lib\cmsis-core\Include;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\lib\freemodbus\modbus\ascii;. @@ -493,7 +492,7 @@ __RT_IPC_SOURCE__ - + @@ -549,7 +548,7 @@ __RT_IPC_SOURCE__ - + @@ -605,7 +604,7 @@ __RT_IPC_SOURCE__ - + @@ -661,7 +660,7 @@ __RT_IPC_SOURCE__ - + @@ -717,7 +716,7 @@ __RT_IPC_SOURCE__ - + @@ -773,7 +772,7 @@ __RT_IPC_SOURCE__ - + @@ -829,7 +828,7 @@ __RT_IPC_SOURCE__ - + @@ -885,7 +884,7 @@ __RT_IPC_SOURCE__ - + @@ -941,7 +940,7 @@ __RT_IPC_SOURCE__ - + @@ -997,7 +996,7 @@ __RT_IPC_SOURCE__ - + @@ -1053,7 +1052,7 @@ __RT_IPC_SOURCE__ - + @@ -1109,7 +1108,7 @@ __RT_IPC_SOURCE__ - + @@ -1156,9 +1155,9 @@ ..\..\rt-thread\components\finsh\shell.c - msh.c + msh_parse.c 1 - ..\..\rt-thread\components\finsh\msh.c + ..\..\rt-thread\components\finsh\msh_parse.c cmd.c @@ -1166,9 +1165,9 @@ ..\..\rt-thread\components\finsh\cmd.c - msh_parse.c + msh.c 1 - ..\..\rt-thread\components\finsh\msh_parse.c + ..\..\rt-thread\components\finsh\msh.c @@ -1176,14 +1175,24 @@ FreeModbus - mbfuncholding.c + user_mb_app.c 1 - ..\..\lib\freemodbus\modbus\functions\mbfuncholding.c + ..\..\lib\freemodbus\port\user_mb_app.c - mb_m.c + mbfunccoils_m.c 1 - ..\..\lib\freemodbus\modbus\mb_m.c + ..\..\lib\freemodbus\modbus\functions\mbfunccoils_m.c + + + mbrtu_m.c + 1 + ..\..\lib\freemodbus\modbus\rtu\mbrtu_m.c + + + mbfuncholding_m.c + 1 + ..\..\lib\freemodbus\modbus\functions\mbfuncholding_m.c sample_mb_master.c @@ -1191,39 +1200,9 @@ ..\..\lib\freemodbus\samples\sample_mb_master.c - user_mb_app_m.c + portserial.c 1 - ..\..\lib\freemodbus\port\user_mb_app_m.c - - - mbrtu.c - 1 - ..\..\lib\freemodbus\modbus\rtu\mbrtu.c - - - mbfuncinput_m.c - 1 - ..\..\lib\freemodbus\modbus\functions\mbfuncinput_m.c - - - mbfunccoils.c - 1 - ..\..\lib\freemodbus\modbus\functions\mbfunccoils.c - - - mbutils.c - 1 - ..\..\lib\freemodbus\modbus\functions\mbutils.c - - - mbcrc.c - 1 - ..\..\lib\freemodbus\modbus\rtu\mbcrc.c - - - mbrtu_m.c - 1 - ..\..\lib\freemodbus\modbus\rtu\mbrtu_m.c + ..\..\lib\freemodbus\port\portserial.c sample_mb_slave.c @@ -1240,80 +1219,100 @@ 1 ..\..\lib\freemodbus\port\portserial_m.c + + mb_m.c + 1 + ..\..\lib\freemodbus\modbus\mb_m.c + + + portevent.c + 1 + ..\..\lib\freemodbus\port\portevent.c + + + mbrtu.c + 1 + ..\..\lib\freemodbus\modbus\rtu\mbrtu.c + + + mbfunccoils.c + 1 + ..\..\lib\freemodbus\modbus\functions\mbfunccoils.c + porttimer.c 1 ..\..\lib\freemodbus\port\porttimer.c - - portserial.c - 1 - ..\..\lib\freemodbus\port\portserial.c - mb.c 1 ..\..\lib\freemodbus\modbus\mb.c - porttimer_m.c + port.c 1 - ..\..\lib\freemodbus\port\porttimer_m.c - - - mbfuncinput.c - 1 - ..\..\lib\freemodbus\modbus\functions\mbfuncinput.c - - - mbfuncholding_m.c - 1 - ..\..\lib\freemodbus\modbus\functions\mbfuncholding_m.c + ..\..\lib\freemodbus\port\port.c mbfuncother.c 1 ..\..\lib\freemodbus\modbus\functions\mbfuncother.c - - port.c - 1 - ..\..\lib\freemodbus\port\port.c - - - mbfuncdisc_m.c - 1 - ..\..\lib\freemodbus\modbus\functions\mbfuncdisc_m.c - - - user_mb_app.c - 1 - ..\..\lib\freemodbus\port\user_mb_app.c - mbfuncdiag.c 1 ..\..\lib\freemodbus\modbus\functions\mbfuncdiag.c + + mbfuncinput_m.c + 1 + ..\..\lib\freemodbus\modbus\functions\mbfuncinput_m.c + + + user_mb_app_m.c + 1 + ..\..\lib\freemodbus\port\user_mb_app_m.c + + + mbfuncinput.c + 1 + ..\..\lib\freemodbus\modbus\functions\mbfuncinput.c + portevent_m.c 1 ..\..\lib\freemodbus\port\portevent_m.c + + porttimer_m.c + 1 + ..\..\lib\freemodbus\port\porttimer_m.c + + + mbutils.c + 1 + ..\..\lib\freemodbus\modbus\functions\mbutils.c + + + mbfuncholding.c + 1 + ..\..\lib\freemodbus\modbus\functions\mbfuncholding.c + mbfuncdisc.c 1 ..\..\lib\freemodbus\modbus\functions\mbfuncdisc.c - mbfunccoils_m.c + mbcrc.c 1 - ..\..\lib\freemodbus\modbus\functions\mbfunccoils_m.c + ..\..\lib\freemodbus\modbus\rtu\mbcrc.c - portevent.c + mbfuncdisc_m.c 1 - ..\..\lib\freemodbus\port\portevent.c + ..\..\lib\freemodbus\modbus\functions\mbfuncdisc_m.c @@ -1370,7 +1369,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1426,7 +1425,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1482,7 +1481,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1538,7 +1537,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1594,7 +1593,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1650,7 +1649,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1706,7 +1705,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1762,7 +1761,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1818,7 +1817,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1874,7 +1873,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1930,7 +1929,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1986,7 +1985,7 @@ __RT_KERNEL_SOURCE__ - + @@ -2042,7 +2041,7 @@ __RT_KERNEL_SOURCE__ - + @@ -2098,7 +2097,7 @@ __RT_KERNEL_SOURCE__ - + @@ -2154,7 +2153,7 @@ __RT_KERNEL_SOURCE__ - + @@ -2165,20 +2164,15 @@ klibc - - rt_vsscanf.c - 1 - ..\..\rt-thread\src\klibc\rt_vsscanf.c - kstdio.c 1 ..\..\rt-thread\src\klibc\kstdio.c - kstring.c + rt_vsscanf.c 1 - ..\..\rt-thread\src\klibc\kstring.c + ..\..\rt-thread\src\klibc\rt_vsscanf.c rt_vsnprintf_tiny.c @@ -2190,6 +2184,11 @@ 1 ..\..\rt-thread\src\klibc\kerrno.c + + kstring.c + 1 + ..\..\rt-thread\src\klibc\kstring.c + @@ -2222,89 +2221,84 @@ - - SAL - - - netdev.c - 1 - ..\..\rt-thread\components\net\netdev\src\netdev.c - - - netdev_ipaddr.c - 1 - ..\..\rt-thread\components\net\netdev\src\netdev_ipaddr.c - - - net_netdb.c - 1 - ..\..\rt-thread\components\net\sal\socket\net_netdb.c - - - sal_socket.c - 1 - ..\..\rt-thread\components\net\sal\src\sal_socket.c - - - STM32F4-CMSIS - - system_stm32f4xx.c - 1 - ..\..\lib\stm32f4\STM32F4_CMSIS\Source\Templates\system_stm32f4xx.c - startup_stm32f405xx.s 2 ..\..\lib\stm32f4\STM32F4_CMSIS\Source\Templates\arm\startup_stm32f405xx.s + + system_stm32f4xx.c + 1 + ..\..\lib\stm32f4\STM32F4_CMSIS\Source\Templates\system_stm32f4xx.c + STM32F4-HAL - - stm32f4xx_hal_pwr.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c - stm32f4xx_hal_crc.c 1 ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c - - stm32f4xx_hal_rcc_ex.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c - - - stm32f4xx_hal_dma_ex.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c - - - stm32f4xx_hal_cryp_ex.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c - stm32f4xx_hal_dma.c 1 ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma.c - stm32f4xx_hal_rng.c + stm32f4xx_hal_pwr_ex.c 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c + + + stm32f4xx_hal_usart.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c + + + stm32f4xx_hal_pwr.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c + + + stm32f4xx_hal_uart.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c + + + stm32f4xx_hal_cortex.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cortex.c + + + stm32f4xx_hal_cryp_ex.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c stm32f4xx_hal_gpio.c 1 ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c + + stm32f4xx_hal.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c + + + stm32f4xx_hal_dma_ex.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c + + + stm32f4xx_hal_rcc_ex.c + 1 + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c + stm32f4xx_hal_cryp.c 1 @@ -2315,35 +2309,15 @@ 1 ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c - - stm32f4xx_hal_usart.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c - - - stm32f4xx_hal_pwr_ex.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c - - - stm32f4xx_hal.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c - stm32f4xx_hal_rcc.c 1 ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c - stm32f4xx_hal_uart.c + stm32f4xx_hal_rng.c 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c - - - stm32f4xx_hal_cortex.c - 1 - ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cortex.c + ..\..\lib\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c diff --git a/apps/chrg/rtconfig.h b/apps/chrg/rtconfig.h index d00ca61..89be8ed 100644 --- a/apps/chrg/rtconfig.h +++ b/apps/chrg/rtconfig.h @@ -179,20 +179,6 @@ /* Network */ -#define RT_USING_SAL -#define SAL_INTERNET_CHECK - -/* Docking with protocol stacks */ - -/* end of Docking with protocol stacks */ -#define SAL_SOCKETS_NUM 16 -#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 /* end of Network */ /* Memory protection */ diff --git a/apps/chrg/template.uvprojx b/apps/chrg/template.uvprojx index 5ca50cf..8bc7322 100644 --- a/apps/chrg/template.uvprojx +++ b/apps/chrg/template.uvprojx @@ -274,8 +274,8 @@ 1 - 0x8000000 - 0x100000 + 0x8010000 + 0x40000 1 @@ -336,7 +336,7 @@ 0 - STM32F405xx, USE_HAL_DRIVER + STM32F405xx, USE_HAL_DRIVER, USER_VECT_TAB_ADDRESS=0x08010000 .;..\..\..\include;applications;.;board;board\CubeMX_Config\Inc;..\libraries\HAL_Drivers;..\libraries\HAL_Drivers\config;packages\led;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\STM32F4xx_HAL\STM32F4xx_HAL_Driver\Inc;..\libraries\STM32F4xx_HAL\CMSIS\Device\ST\STM32F4xx\Include;..\libraries\STM32F4xx_HAL\CMSIS\Include @@ -360,7 +360,7 @@ - 0 + 1 0 0 0