Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build with latest esp idf #1331

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/device/cdc_msc_freertos/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ target_include_directories(${COMPONENT_TARGET} PUBLIC
"${TOP}/src"
)

target_compile_definitions(${COMPONENT_TARGET} PUBLIC
ESP_PLATFORM
)

target_sources(${COMPONENT_TARGET} PUBLIC
"${TOP}/src/tusb.c"
"${TOP}/src/common/tusb_fifo.c"
Expand Down
4 changes: 4 additions & 0 deletions examples/device/hid_composite_freertos/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ target_include_directories(${COMPONENT_TARGET} PUBLIC
"${TOP}/src"
)

target_compile_definitions(${COMPONENT_TARGET} PUBLIC
ESP_PLATFORM
)

target_sources(${COMPONENT_TARGET} PUBLIC
"${TOP}/src/tusb.c"
"${TOP}/src/common/tusb_fifo.c"
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/esp32s2/boards/esp32s2.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include "hal/usb_hal.h"
#include "soc/usb_periph.h"

#include "driver/periph_ctrl.h"
#include "driver/rmt.h"
#include "esp_private/periph_ctrl.h"

#ifdef NEOPIXEL_PIN
#include "led_strip.h"
Expand Down
1 change: 1 addition & 0 deletions hw/bsp/esp32s2/family.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build: all
fullclean:
if test -f sdkconfig; then $(RM) -f sdkconfig ; fi
if test -d $(BUILD); then $(RM) -rf $(BUILD) ; fi
idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@

clean flash bootloader-flash app-flash erase monitor dfu-flash dfu size size-components size-files:
idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/esp32s3/boards/esp32s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include "hal/usb_hal.h"
#include "soc/usb_periph.h"

#include "driver/periph_ctrl.h"
#include "driver/rmt.h"
#include "esp_private/periph_ctrl.h"

#ifdef NEOPIXEL_PIN
#include "led_strip.h"
Expand Down
4 changes: 3 additions & 1 deletion src/osal/osal_freertos.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl, bool in_isr)
BaseType_t res = xSemaphoreGiveFromISR(sem_hdl, &xHigherPriorityTaskWoken);

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

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

#endif /* _TUSB_OSAL_FREERTOS_H_ */
#endif
2 changes: 1 addition & 1 deletion src/osal/osal_rtx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ static inline bool osal_queue_empty(osal_queue_t qhdl)
}
#endif

#endif /* _TUSB_OSAL_FREERTOS_H_ */
#endif