diff --git a/apps/chrg/.config b/apps/chrg/.config index 32e82d5..cafe1aa 100644 --- a/apps/chrg/.config +++ b/apps/chrg/.config @@ -426,19 +426,14 @@ CONFIG_RT_USING_USB_DEVICE=y CONFIG_RT_USBD_THREAD_STACK_SZ=4096 CONFIG_USB_VENDOR_ID=0x0483 CONFIG_USB_PRODUCT_ID=0x5740 -CONFIG_RT_USB_DEVICE_COMPOSITE=y -CONFIG_RT_USB_DEVICE_CDC=y +# CONFIG_RT_USB_DEVICE_COMPOSITE is not set +CONFIG__RT_USB_DEVICE_NONE=y +# CONFIG__RT_USB_DEVICE_CDC is not set +# CONFIG__RT_USB_DEVICE_MSTORAGE is not set +# CONFIG__RT_USB_DEVICE_HID is not set +# CONFIG__RT_USB_DEVICE_WINUSB is not set +# CONFIG__RT_USB_DEVICE_AUDIO is not set CONFIG_RT_USB_DEVICE_NONE=y -# CONFIG_RT_USB_DEVICE_MSTORAGE is not set -# CONFIG_RT_USB_DEVICE_HID is not set -# CONFIG_RT_USB_DEVICE_WINUSB is not set -# CONFIG_RT_USB_DEVICE_AUDIO is not set -CONFIG_RT_VCOM_TASK_STK_SIZE=512 -CONFIG_RT_CDC_RX_BUFSIZE=128 -# CONFIG_RT_VCOM_TX_USE_DMA is not set -CONFIG_RT_VCOM_SERNO="32021919830108" -CONFIG_RT_VCOM_SER_LEN=14 -CONFIG_RT_VCOM_TX_TIMEOUT=1000 # end of Using USB legacy version # CONFIG_RT_USING_FDT is not set diff --git a/apps/chrg/applications/bsp/chrg_usbd.c b/apps/chrg/applications/bsp/chrg_usbd.c new file mode 100644 index 0000000..28958a3 --- /dev/null +++ b/apps/chrg/applications/bsp/chrg_usbd.c @@ -0,0 +1,39 @@ + +#include +#include + +#if 0 +void usb_dc_low_level_init (uint8_t busid) +{ + extern void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd); + HAL_PCD_MspInit(&(PCD_HandleTypeDef){ + .Instance = USB_OTG_FS + }); +} + +void OTG_FS_IRQHandler (void) +{ + extern void USBD_IRQHandler(uint8_t busid); + USBD_IRQHandler(0); +} + +int usbd_init(void) +{ + usb_dc_low_level_init(0); + return 0; +} + +INIT_BOARD_EXPORT(usbd_init); + + +int chrg_usbd_init (void) +{ + extern void cdc_acm_init(uint8_t busid, uintptr_t reg_base); + cdc_acm_init(0, USB_OTG_FS_PERIPH_BASE); + + return 0; +} +#endif +//INIT_COMPONENT_EXPORT(chrg_usbd_init); + + diff --git a/apps/chrg/applications/main.c b/apps/chrg/applications/main.c index 004d9ea..a2a97a2 100644 --- a/apps/chrg/applications/main.c +++ b/apps/chrg/applications/main.c @@ -25,9 +25,6 @@ int main(void) finsh_set_prompt("chrg "); #endif - extern void cdc_acm_init(uint8_t busid, uintptr_t reg_base); - cdc_acm_init(0, USB_OTG_FS_PERIPH_BASE); - while (1) { rt_thread_mdelay(1000); chrg_wdt_feed(); diff --git a/apps/chrg/board/ports/usb_config.h b/apps/chrg/board/ports/usb_config.h index 2deaec9..745d696 100644 --- a/apps/chrg/board/ports/usb_config.h +++ b/apps/chrg/board/ports/usb_config.h @@ -17,7 +17,7 @@ #endif #ifndef CONFIG_USB_DBG_LEVEL -#define CONFIG_USB_DBG_LEVEL USB_DBG_INFO +#define CONFIG_USB_DBG_LEVEL USB_DBG_LOG #endif #ifndef CONFIG_USBDEV_EP_NUM diff --git a/apps/chrg/chrg.uvprojx b/apps/chrg/chrg.uvprojx index d30bb04..dff27b3 100644 --- a/apps/chrg/chrg.uvprojx +++ b/apps/chrg/chrg.uvprojx @@ -337,9 +337,9 @@ 0 - STM32F405xx, __CLK_TCK=RT_TICK_PER_SECOND, USE_HAL_DRIVER, __STDC_LIMIT_MACROS, RT_USING_LIBC, __RTTHREAD__, RT_USING_ARMLIBC + __CLK_TCK=RT_TICK_PER_SECOND, STM32F405xx, RT_USING_ARMLIBC, __RTTHREAD__, USE_HAL_DRIVER, __STDC_LIMIT_MACROS, RT_USING_LIBC - ..\..\rt-thread\components\drivers\usb\cherryusb\common;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;board;..\..\rt-thread\components\finsh;..\..\rt-thread\components\drivers\usb\cherryusb\class\wireless;..\..\rt-thread\components\drivers\usb\cherryusb\class\cdc;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\net;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\rt-thread\components\libc\posix\ipc;..\..\rt-thread\components\drivers\usb\cherryusb\core;..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_flash;..\..\rt-thread\components\fal\inc;.;..\..\rt-thread\components\libc\compilers\common\include;applications\utils;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb\class\dfu;..\..\rt-thread\components\drivers\usb\cherryusb\class\video;..\..\rt-thread\components\drivers\usb\cherryusb\class\hid;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\extension;..\..\rt-thread\components\drivers\include;applications\thread;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\wifi;..\..\rt-thread\components\libc\posix\io\epoll;..\..\rt-thread\components\drivers\usb\cherryusb\class\hub;..\..\rt-thread\components\drivers\usb\cherryusb;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\serial;applications\bsp;..\..\rt-thread\components\drivers\phy;applications;..\..\rt-thread\components\drivers\usb\cherryusb\class\midi;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\include;board\CubeMX_Config\Inc;..\..\libs\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\rt-thread\components\drivers\usb\cherryusb\osal;board\ports;..\..\rt-thread\include;..\..\rt-thread\components\libc\posix\io\poll;..\..\libs\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\components\drivers\usb\cherryusb\class\msc;..\..\libs\cmsis-core\Include;..\..\rt-thread\libcpu\arm\common;..\..\rt-thread\components\drivers\usb\cherryusb\class\adb;..\..\libs\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;..\..\rt-thread\components\drivers\usb\cherryusb\class\audio;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\components\legacy\usb\usbdevice + ..\..\rt-thread\components\libc\compilers\common\include;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\libc\posix\ipc;..\..\rt-thread\components\drivers\include;..\..\libs\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb;..\..\rt-thread\components\drivers\usb\cherryusb\class\audio;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\net;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\serial;applications\bsp;..\..\rt-thread\components\fal\inc;..\..\rt-thread\components\libc\posix\io\epoll;..\..\rt-thread\components\drivers\usb\cherryusb\class\midi;..\..\rt-thread\components\legacy\usb\usbdevice;..\..\rt-thread\components\drivers\usb\cherryusb\class\cdc;applications\thread;..\..\rt-thread\components\libc\compilers\common\extension;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\components\drivers\include;..\..\libs\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\components\finsh;..\..\rt-thread\include;..\..\rt-thread\components\drivers\usb\cherryusb\class\hub;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\wifi;..\..\rt-thread\components\drivers\include;applications\utils;..\..\rt-thread\libcpu\arm\common;..\..\libs\cmsis-core\Include;board;..\..\rt-thread\components\drivers\phy;..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_flash;board\CubeMX_Config\Inc;..\..\rt-thread\components\drivers\usb\cherryusb\class\msc;..\..\libs\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\components\drivers\usb\cherryusb\osal;..\..\rt-thread\components\drivers\include;applications;..\..\rt-thread\components\drivers\usb\cherryusb\class\hid;..\..\rt-thread\components\drivers\include;board\ports;.;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb\class\video;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\rt-thread\components\drivers\usb\cherryusb\class\dfu;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\components\drivers\usb\cherryusb\class\adb;..\..\rt-thread\components\drivers\usb\cherryusb\common;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\rt-thread\components\drivers\usb\cherryusb\class\wireless;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb\core @@ -394,9 +394,14 @@ Applications/bsp - chrg_i2c.c + chrg_wdt.c 1 - applications\bsp\chrg_i2c.c + applications\bsp\chrg_wdt.c + + + chrg_switch.c + 1 + applications\bsp\chrg_switch.c chrg_fal.c @@ -404,9 +409,14 @@ applications\bsp\chrg_fal.c - chrg_clk.c + chrg_i2c.c 1 - applications\bsp\chrg_clk.c + applications\bsp\chrg_i2c.c + + + chrg_usbd.c + 1 + applications\bsp\chrg_usbd.c chrg_pin.c @@ -414,44 +424,44 @@ applications\bsp\chrg_pin.c - chrg_intr.c + chrg_clk.c 1 - applications\bsp\chrg_intr.c + applications\bsp\chrg_clk.c chrg_tmr.c 1 applications\bsp\chrg_tmr.c - - chrg_wdt.c - 1 - applications\bsp\chrg_wdt.c - chrg_tty.c 1 applications\bsp\chrg_tty.c - chrg_switch.c + chrg_intr.c 1 - applications\bsp\chrg_switch.c + applications\bsp\chrg_intr.c Applications/thread + + chrg_north.c + 1 + applications\thread\chrg_north.c + chrg_lcd.c 1 applications\thread\chrg_lcd.c - chrg_roll.c + chrg_comm.c 1 - applications\thread\chrg_roll.c + applications\thread\chrg_comm.c chrg_south.c @@ -459,39 +469,34 @@ applications\thread\chrg_south.c - chrg_north.c + chrg_roll.c 1 - applications\thread\chrg_north.c - - - chrg_comm.c - 1 - applications\thread\chrg_comm.c + applications\thread\chrg_roll.c Applications/utils - - chrg_source.c - 1 - applications\utils\chrg_source.c - chrg_pkg.c 1 applications\utils\chrg_pkg.c + + chrg_utils.c + 1 + applications\utils\chrg_utils.c + chrg_pcf8574.c 1 applications\utils\chrg_pcf8574.c - chrg_utils.c + chrg_source.c 1 - applications\utils\chrg_utils.c + applications\utils\chrg_source.c chrg_sink.c @@ -503,26 +508,11 @@ CherryUSB - - usb_check.c - 1 - ..\..\rt-thread\components\drivers\usb\cherryusb\platform\rtthread\usb_check.c - usbd_cdc_acm.c 1 ..\..\rt-thread\components\drivers\usb\cherryusb\class\cdc\usbd_cdc_acm.c - - usbd_core.c - 1 - ..\..\rt-thread\components\drivers\usb\cherryusb\core\usbd_core.c - - - usb_glue_st.c - 1 - ..\..\rt-thread\components\drivers\usb\cherryusb\port\dwc2\usb_glue_st.c - usb_msh.c 1 @@ -534,15 +524,30 @@ ..\..\rt-thread\components\drivers\usb\cherryusb\osal\usb_osal_rtthread.c - cdc_acm_template.c + usb_check.c 1 - ..\..\rt-thread\components\drivers\usb\cherryusb\demo\cdc_acm_template.c + ..\..\rt-thread\components\drivers\usb\cherryusb\platform\rtthread\usb_check.c + + + usbd_core.c + 1 + ..\..\rt-thread\components\drivers\usb\cherryusb\core\usbd_core.c + + + usb_glue_st.c + 1 + ..\..\rt-thread\components\drivers\usb\cherryusb\port\dwc2\usb_glue_st.c usb_dc_dwc2.c 1 ..\..\rt-thread\components\drivers\usb\cherryusb\port\dwc2\usb_dc_dwc2.c + + cdc_acm_template.c + 1 + ..\..\rt-thread\components\drivers\usb\cherryusb\demo\cdc_acm_template.c + @@ -1662,40 +1667,30 @@ Fal - fal.c + fal_partition.c 1 - ..\..\rt-thread\components\fal\src\fal.c + ..\..\rt-thread\components\fal\src\fal_partition.c fal_flash.c 1 ..\..\rt-thread\components\fal\src\fal_flash.c - - fal_partition.c - 1 - ..\..\rt-thread\components\fal\src\fal_partition.c - fal_rtt.c 1 ..\..\rt-thread\components\fal\src\fal_rtt.c + + fal.c + 1 + ..\..\rt-thread\components\fal\src\fal.c + Finsh - - shell.c - 1 - ..\..\rt-thread\components\finsh\shell.c - - - msh.c - 1 - ..\..\rt-thread\components\finsh\msh.c - msh_parse.c 1 @@ -1706,6 +1701,16 @@ 1 ..\..\rt-thread\components\finsh\cmd.c + + shell.c + 1 + ..\..\rt-thread\components\finsh\shell.c + + + msh.c + 1 + ..\..\rt-thread\components\finsh\msh.c + @@ -2562,14 +2567,9 @@ ..\..\rt-thread\src\klibc\kstring.c - kstdio.c + rt_vsnprintf_tiny.c 1 - ..\..\rt-thread\src\klibc\kstdio.c - - - rt_vsscanf.c - 1 - ..\..\rt-thread\src\klibc\rt_vsscanf.c + ..\..\rt-thread\src\klibc\rt_vsnprintf_tiny.c kerrno.c @@ -2577,9 +2577,14 @@ ..\..\rt-thread\src\klibc\kerrno.c - rt_vsnprintf_tiny.c + rt_vsscanf.c 1 - ..\..\rt-thread\src\klibc\rt_vsnprintf_tiny.c + ..\..\rt-thread\src\klibc\rt_vsscanf.c + + + kstdio.c + 1 + ..\..\rt-thread\src\klibc\kstdio.c @@ -2626,11 +2631,6 @@ 1 ..\..\rt-thread\components\legacy\usb\usbdevice\core\usbdevice_core.c - - cdc_vcom.c - 1 - ..\..\rt-thread\components\legacy\usb\usbdevice\class\cdc_vcom.c - @@ -2651,165 +2651,165 @@ STM32F4-HAL + + stm32f4xx_hal_dma_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c + stm32f4xx_hal_iwdg.c 1 ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_iwdg.c - - stm32f4xx_hal_i2c_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c_ex.c - - - stm32f4xx_hal_tim.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim.c - - - stm32f4xx_hal_tim_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim_ex.c - - - stm32f4xx_hal_lptim.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_lptim.c - - - stm32f4xx_hal_rcc.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c - - - stm32f4xx_hal_uart.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c - stm32f4xx_hal_cryp.c 1 ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp.c - - stm32f4xx_hal_pcd.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd.c - - - stm32f4xx_ll_usb.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_ll_usb.c - - - stm32f4xx_hal_cec.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c - - - stm32f4xx_hal_pcd_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd_ex.c - - - stm32f4xx_hal_rcc_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c - - - stm32f4xx_hal_gpio.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c - - - stm32f4xx_hal_usart.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c - - - stm32f4xx_hal_pwr.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c - - - stm32f4xx_hal_crc.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c - - - stm32f4xx_hal_cortex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cortex.c - - - stm32f4xx_hal_flash_ramfunc.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ramfunc.c - stm32f4xx_hal_dma.c 1 ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma.c - - stm32f4xx_hal_flash.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash.c - - - stm32f4xx_hal_pwr_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c - - - stm32f4xx_hal_flash_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ex.c - - - stm32f4xx_hal_rng.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c - - - stm32f4xx_hal_can.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_can.c - - - stm32f4xx_hal_cryp_ex.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c - - - stm32f4xx_hal_wwdg.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_wwdg.c - - - stm32f4xx_hal_hcd.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_hcd.c - - - stm32f4xx_hal_i2c.c - 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c.c - stm32f4xx_hal.c 1 ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c + + stm32f4xx_hal_lptim.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_lptim.c + + + stm32f4xx_hal_pcd.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd.c + + + stm32f4xx_hal_flash.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash.c + + + stm32f4xx_hal_i2c_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c_ex.c + stm32f4xx_hal_pccard.c 1 ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pccard.c - stm32f4xx_hal_dma_ex.c + stm32f4xx_ll_usb.c 1 - ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_ll_usb.c + + + stm32f4xx_hal_pwr_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c + + + stm32f4xx_hal_usart.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c + + + stm32f4xx_hal_cryp_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c + + + stm32f4xx_hal_pcd_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd_ex.c + + + stm32f4xx_hal_rcc.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c + + + stm32f4xx_hal_wwdg.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_wwdg.c + + + stm32f4xx_hal_i2c.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c.c + + + stm32f4xx_hal_tim.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim.c + + + stm32f4xx_hal_flash_ramfunc.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ramfunc.c + + + stm32f4xx_hal_tim_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim_ex.c + + + stm32f4xx_hal_uart.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c + + + stm32f4xx_hal_crc.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c + + + stm32f4xx_hal_can.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_can.c + + + stm32f4xx_hal_cortex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cortex.c + + + stm32f4xx_hal_rng.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c + + + stm32f4xx_hal_cec.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c + + + stm32f4xx_hal_flash_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ex.c + + + stm32f4xx_hal_gpio.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c + + + stm32f4xx_hal_pwr.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c + + + stm32f4xx_hal_hcd.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_hcd.c + + + stm32f4xx_hal_rcc_ex.c + 1 + ..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c diff --git a/apps/chrg/rtconfig.h b/apps/chrg/rtconfig.h index 75600f8..d487adf 100644 --- a/apps/chrg/rtconfig.h +++ b/apps/chrg/rtconfig.h @@ -217,14 +217,8 @@ #define RT_USBD_THREAD_STACK_SZ 4096 #define USB_VENDOR_ID 0x0483 #define USB_PRODUCT_ID 0x5740 -#define RT_USB_DEVICE_COMPOSITE -#define RT_USB_DEVICE_CDC +#define _RT_USB_DEVICE_NONE #define RT_USB_DEVICE_NONE -#define RT_VCOM_TASK_STK_SIZE 512 -#define RT_CDC_RX_BUFSIZE 128 -#define RT_VCOM_SERNO "32021919830108" -#define RT_VCOM_SER_LEN 14 -#define RT_VCOM_TX_TIMEOUT 1000 /* end of Using USB legacy version */ /* end of RT-Thread Components */ diff --git a/mdks/all_mdks.uvmpw b/mdks/all_mdks.uvmpw index 1e4ccbb..750406b 100644 --- a/mdks/all_mdks.uvmpw +++ b/mdks/all_mdks.uvmpw @@ -9,12 +9,12 @@ ..\apps\boot\boot.uvprojx - 1 1 ..\apps\chrg\chrg.uvprojx + 1 1 diff --git a/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbd.c b/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbd.c index 6acfad2..29a23e3 100644 --- a/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbd.c +++ b/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbd.c @@ -289,3 +289,5 @@ int stm_usbd_register(void) } INIT_DEVICE_EXPORT(stm_usbd_register); #endif + + diff --git a/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.c b/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.c index f5370b3..ab4eae6 100644 --- a/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.c +++ b/rt-thread/bsp/stm32/libraries/HAL_Drivers/drivers/drv_usbh.c @@ -9,6 +9,8 @@ * 2019-12-19 tyustli port to stm32 series */ +#ifdef BSP_USING_USBH + #include "drv_usbh.h" #include "board.h" @@ -257,3 +259,6 @@ int stm_usbh_register(void) return RT_EOK; } INIT_DEVICE_EXPORT(stm_usbh_register); + +#endif +