move core init code to dwc2 common. update/correct build for esppressif

This commit is contained in:
hathach
2024-10-15 17:55:24 +07:00
parent 10a3aa3cc8
commit 4012e15075
42 changed files with 172 additions and 141 deletions

View File

@@ -48,7 +48,7 @@
// Include MCU header
#include "bsp/board_mcu.h"
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 || CFG_TUSB_MCU == OPT_MCU_ESP32S3
#if TUSB_MCU_VENDOR_ESPRESSIF
#error "ESP32-Sx should use IDF's FreeRTOSConfig.h"
#endif

View File

@@ -30,7 +30,7 @@
#include "bsp/board_api.h"
#include "tusb.h"
#if TUP_MCU_ESPRESSIF
#if TUSB_MCU_VENDOR_ESPRESSIF
// ESP-IDF need "freertos/" prefix in include path.
// CFG_TUSB_OS_INC_PATH should be defined accordingly.
#include "freertos/FreeRTOS.h"
@@ -111,14 +111,14 @@ int main(void) {
#endif
// skip starting scheduler (and return) for ESP32-S2 or ESP32-S3
#if !TUP_MCU_ESPRESSIF
#if !TUSB_MCU_VENDOR_ESPRESSIF
vTaskStartScheduler();
#endif
return 0;
}
#if TUP_MCU_ESPRESSIF
#if TUSB_MCU_VENDOR_ESPRESSIF
void app_main(void) {
main();
}

View File

@@ -59,7 +59,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
#if TUP_MCU_ESPRESSIF
#if TUSB_MCU_VENDOR_ESPRESSIF
#define CFG_TUSB_OS_INC_PATH freertos/
#endif