Skip to content

Commit 4612332

Browse files
authored
Merge pull request hathach#1331 from hathach/fix-esp-build
fix build with latest esp idf
2 parents 553767c + 52645fc commit 4612332

File tree

7 files changed

+15
-4
lines changed

7 files changed

+15
-4
lines changed

examples/device/cdc_msc_freertos/src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ target_include_directories(${COMPONENT_TARGET} PUBLIC
1313
"${TOP}/src"
1414
)
1515

16+
target_compile_definitions(${COMPONENT_TARGET} PUBLIC
17+
ESP_PLATFORM
18+
)
19+
1620
target_sources(${COMPONENT_TARGET} PUBLIC
1721
"${TOP}/src/tusb.c"
1822
"${TOP}/src/common/tusb_fifo.c"

examples/device/hid_composite_freertos/src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ target_include_directories(${COMPONENT_TARGET} PUBLIC
1313
"${TOP}/src"
1414
)
1515

16+
target_compile_definitions(${COMPONENT_TARGET} PUBLIC
17+
ESP_PLATFORM
18+
)
19+
1620
target_sources(${COMPONENT_TARGET} PUBLIC
1721
"${TOP}/src/tusb.c"
1822
"${TOP}/src/common/tusb_fifo.c"

hw/bsp/esp32s2/boards/esp32s2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "hal/usb_hal.h"
3333
#include "soc/usb_periph.h"
3434

35-
#include "driver/periph_ctrl.h"
3635
#include "driver/rmt.h"
36+
#include "esp_private/periph_ctrl.h"
3737

3838
#ifdef NEOPIXEL_PIN
3939
#include "led_strip.h"

hw/bsp/esp32s2/family.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ build: all
1010
fullclean:
1111
if test -f sdkconfig; then $(RM) -f sdkconfig ; fi
1212
if test -d $(BUILD); then $(RM) -rf $(BUILD) ; fi
13+
idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@
1314

1415
clean flash bootloader-flash app-flash erase monitor dfu-flash dfu size size-components size-files:
1516
idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@

hw/bsp/esp32s3/boards/esp32s3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "hal/usb_hal.h"
3333
#include "soc/usb_periph.h"
3434

35-
#include "driver/periph_ctrl.h"
3635
#include "driver/rmt.h"
36+
#include "esp_private/periph_ctrl.h"
3737

3838
#ifdef NEOPIXEL_PIN
3939
#include "led_strip.h"

src/osal/osal_freertos.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl, bool in_isr)
6868
BaseType_t res = xSemaphoreGiveFromISR(sem_hdl, &xHigherPriorityTaskWoken);
6969

7070
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 || CFG_TUSB_MCU == OPT_MCU_ESP32S3
71+
// not needed after https://github.com/espressif/esp-idf/commit/c5fd79547ac9b7bae06fa660e9f814d18d3390b7
7172
if ( xHigherPriorityTaskWoken ) portYIELD_FROM_ISR();
7273
#else
7374
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
@@ -151,6 +152,7 @@ static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in
151152
BaseType_t res = xQueueSendToBackFromISR(qhdl, data, &xHigherPriorityTaskWoken);
152153

153154
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 || CFG_TUSB_MCU == OPT_MCU_ESP32S3
155+
// not needed after https://github.com/espressif/esp-idf/commit/c5fd79547ac9b7bae06fa660e9f814d18d3390b7
154156
if ( xHigherPriorityTaskWoken ) portYIELD_FROM_ISR();
155157
#else
156158
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
@@ -169,4 +171,4 @@ static inline bool osal_queue_empty(osal_queue_t qhdl)
169171
}
170172
#endif
171173

172-
#endif /* _TUSB_OSAL_FREERTOS_H_ */
174+
#endif

src/osal/osal_rtx4.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ static inline bool osal_queue_empty(osal_queue_t qhdl)
167167
}
168168
#endif
169169

170-
#endif /* _TUSB_OSAL_FREERTOS_H_ */
170+
#endif

0 commit comments

Comments
 (0)