diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index f8c6f115..9df394ac 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -708,6 +708,7 @@ + diff --git a/demos/host/host_freertos/.project b/demos/host/host_freertos/.project index 1381e7fc..44750058 100644 --- a/demos/host/host_freertos/.project +++ b/demos/host/host_freertos/.project @@ -85,6 +85,11 @@ 2 PARENT-2-PROJECT_LOC/bsp + + fatfs + 2 + PARENT-3-PROJECT_LOC/vendor/fatfs + freertos 2 diff --git a/demos/host/host_freertos/host_freertos.uvopt b/demos/host/host_freertos/host_freertos.uvopt index b337afc7..9aedc752 100644 --- a/demos/host/host_freertos/host_freertos.uvopt +++ b/demos/host/host_freertos/host_freertos.uvopt @@ -319,7 +319,7 @@ app - 1 + 0 0 0 0 @@ -331,7 +331,7 @@ 0 0 0 - 98 + 99 102 0 ..\src\main.c @@ -377,10 +377,10 @@ 1 0 0 - 0 + 7 0 - 44 - 73 + 68 + 74 0 ..\src\mouse_app.c mouse_app.c @@ -423,7 +423,7 @@ boards - 1 + 0 0 0 0 @@ -591,7 +591,7 @@ tinyusb - 1 + 0 0 0 0 @@ -843,7 +843,7 @@ 0 0 0 - 104 + 105 110 0 ..\..\..\tinyusb\class\msc_host.c @@ -865,9 +865,9 @@ 1 0 0 - 53 + 54 0 - 350 + 351 355 0 ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_uart.c @@ -983,7 +983,7 @@ freertos - 1 + 0 0 0 0 @@ -1107,7 +1107,7 @@ 0 27 0 - 24 + 25 29 0 ..\..\..\vendor\freertos\freertos\Source\portable\RVDS\ARM_CM4F\port.c @@ -1117,4 +1117,60 @@ + + fatfs + 0 + 0 + 0 + 0 + + 7 + 48 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\..\..\vendor\fatfs\ccsbcs.c + ccsbcs.c + 0 + 0 + + + 7 + 49 + 1 + 0 + 0 + 5 + 0 + 51 + 62 + 0 + ..\..\..\vendor\fatfs\diskio.c + diskio.c + 0 + 0 + + + 7 + 50 + 1 + 0 + 0 + 14 + 0 + 1698 + 1710 + 0 + ..\..\..\vendor\fatfs\ff.c + ff.c + 0 + 0 + + + diff --git a/demos/host/host_freertos/host_freertos.uvproj b/demos/host/host_freertos/host_freertos.uvproj index ea93dd53..100b8681 100644 --- a/demos/host/host_freertos/host_freertos.uvproj +++ b/demos/host/host_freertos/host_freertos.uvproj @@ -44,7 +44,7 @@ 1 .\UV4Build\ - host_os_none + host_freertos 1 0 0 @@ -350,7 +350,7 @@ --gnu --c99 --diag_suppress=66 CORE_M4 MCU=MCU_LPC43XX BOARD=BOARD_EA4357 TUSB_CFG_OS=TUSB_OS_FREERTOS TUSB_CFG_OS_TASK_PRIO=configMAX_PRIORITIES-5 - ..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos + ..\src;..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\inc;..\..\bsp;..\..\..\tinyusb;..\..\..\vendor\freertos;..\..\..\vendor\freertos\freertos\Source\include;..\host_freertos;..\..\..\vendor\fatfs @@ -653,6 +653,26 @@ + + fatfs + + + ccsbcs.c + 1 + ..\..\..\vendor\fatfs\ccsbcs.c + + + diskio.c + 1 + ..\..\..\vendor\fatfs\diskio.c + + + ff.c + 1 + ..\..\..\vendor\fatfs\ff.c + + + @@ -1342,6 +1362,26 @@ + + fatfs + + + ccsbcs.c + 1 + ..\..\..\vendor\fatfs\ccsbcs.c + + + diskio.c + 1 + ..\..\..\vendor\fatfs\diskio.c + + + ff.c + 1 + ..\..\..\vendor\fatfs\ff.c + + + diff --git a/demos/host/host_os_none/host_os_none.uvopt b/demos/host/host_os_none/host_os_none.uvopt index f7edae87..8b223e2a 100644 --- a/demos/host/host_os_none/host_os_none.uvopt +++ b/demos/host/host_os_none/host_os_none.uvopt @@ -132,11 +132,6 @@ Segger\JL2CM3.dll - - 0 - DLGUARM - - 0 DLGTARM @@ -162,7 +157,7 @@ 0 0 - 316 + 405 1 0 0 @@ -175,22 +170,6 @@ - - 1 - 0 - 116 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Users\hathach\Dropbox\tinyusb\workspace\tinyusb\demos\host\src\msc_app.c - - - @@ -223,6 +202,11 @@ 1 disk_state + + 6 + 1 + **path + @@ -407,7 +391,7 @@ 0 0 - 316 + 405 1 0 0 @@ -420,22 +404,6 @@ - - 1 - 0 - 116 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - C:\Users\hathach\Dropbox\tinyusb\workspace\tinyusb\demos\host\src\msc_app.c - - - @@ -480,7 +448,7 @@ app - 1 + 0 0 0 0 @@ -492,7 +460,7 @@ 0 25 0 - 154 + 155 160 0 ..\src\main.c @@ -586,10 +554,10 @@ 1 0 0 - 0 + 35 0 - 1 - 1 + 399 + 405 0 ..\src\cli.c cli.c @@ -600,7 +568,7 @@ boards - 1 + 0 0 0 0 @@ -642,10 +610,10 @@ 1 0 0 - 44 + 1 0 95 - 106 + 132 0 ..\..\bsp\boards\printf_retarget.c printf_retarget.c @@ -768,7 +736,7 @@ tinyusb - 1 + 0 0 0 0 @@ -842,10 +810,10 @@ 1 0 0 - 21 + 0 0 - 3 - 8 + 356 + 362 0 ..\..\..\tinyusb\host\usbh.c usbh.c @@ -1092,7 +1060,7 @@ 0 3 0 - 575 + 576 580 0 ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_cgu.c @@ -1146,10 +1114,10 @@ 2 0 0 - 35 + 19 0 - 145 - 153 + 146 + 152 0 ..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s startup_LPC43xx.s @@ -1160,7 +1128,7 @@ fatfs - 1 + 0 0 0 0 @@ -1172,7 +1140,7 @@ 0 23 0 - 108 + 109 113 0 ..\..\..\vendor\fatfs\diskio.c @@ -1186,10 +1154,10 @@ 1 0 0 - 0 + 12 0 - 2785 - 2795 + 91 + 97 0 ..\..\..\vendor\fatfs\ff.c ff.c diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index dcb4e73a..f36c279a 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -391,7 +391,8 @@ tusb_error_t enumeration_body_subtask(void) 4, enum_data_buffer ), error ); - SUBTASK_ASSERT_STATUS( error ); +// SUBTASK_ASSERT_STATUS( error ); + SUBTASK_ASSERT_STATUS_WITH_HANDLER(error, hub_status_pipe_queue( usbh_devices[0].hub_addr) ); // TODO hub refractor // Acknowledge Port Connection Change OSAL_SUBTASK_INVOKED_AND_WAIT( hub_port_clear_feature_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port, HUB_FEATURE_PORT_CONNECTION_CHANGE), error ); @@ -408,7 +409,8 @@ tusb_error_t enumeration_body_subtask(void) else { // Connection Event OSAL_SUBTASK_INVOKED_AND_WAIT ( hub_port_reset_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port), error ); - SUBTASK_ASSERT_STATUS( error ); +// SUBTASK_ASSERT_STATUS( error ); + SUBTASK_ASSERT_STATUS_WITH_HANDLER(error, hub_status_pipe_queue( usbh_devices[0].hub_addr) ); // TODO hub refractor usbh_devices[0].speed = hub_port_get_speed(); @@ -427,15 +429,16 @@ tusb_error_t enumeration_body_subtask(void) 8, enum_data_buffer ), error ); - SUBTASK_ASSERT_STATUS(error); // TODO some slow device is observed to fail the very fist controller xfer, can try more times //------------- Reset device again before Set Address -------------// if (usbh_devices[0].hub_addr == 0) { // connected directly to roothub + SUBTASK_ASSERT_STATUS(error); // TODO some slow device is observed to fail the very fist controller xfer, can try more times hcd_port_reset( usbh_devices[0].core_id ); // reset port after 8 byte descriptor // osal_task_delay(50); // TODO reset is recommended to last 50 ms (NXP EHCI passes this) }else { // connected via a hub + SUBTASK_ASSERT_STATUS_WITH_HANDLER(error, hub_status_pipe_queue( usbh_devices[0].hub_addr) ); // TODO hub refractor OSAL_SUBTASK_INVOKED_AND_WAIT ( hub_port_reset_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port), error ); if ( TUSB_ERROR_NONE == error )