mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
Instead, depend directly on espressif/tinyusb component (which is otherwise transitively included via esp_tinyusb). Turns out esp_tinyusb builds a bunch of source files with symbols that conflict with our tinyusb symbols (i.e. descriptors_control.c). This only works because nothing in MicroPython causes the linker to include the esp_tinyusb.a library, however in order to override the dcd_int_handler (in following commit) this caused the linker to pull this library in and break the build. There's also a problematic header skew - TinyUSB component was building with the tusb_config.h file from esp_tinyusb component, but we have our own tusb_config.h file in shared/tinyusb. The changes in parent commit allow us to build the TinyUSB component with our tusb_config.h header. User-facing impacts are: - Can no longer override USB VID & PID via sdkconfig, have to set MICROPY_HW_USB_VID/PID instead (changes applied in this commit). - esp32 boards will have the same USB serial number as other ports (i.e. based on the hardware MAC address, not hard-coded). Side effects include: - CFG_TUD_DWC2_SLAVE_ENABLE is now set, DMA mode is disabled. Signed-off-by: Angus Gratton <angus@redyak.com.au>
23 lines
564 B
CMake
23 lines
564 B
CMake
if(NOT MICROPY_DIR)
|
|
get_filename_component(MICROPY_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../.. ABSOLUTE)
|
|
endif()
|
|
|
|
set(IDF_TARGET esp32s3)
|
|
|
|
set(SDKCONFIG_DEFAULTS
|
|
boards/sdkconfig.base
|
|
boards/sdkconfig.ble
|
|
boards/sdkconfig.240mhz
|
|
boards/sdkconfig.spiram_sx
|
|
boards/sdkconfig.spiram_oct
|
|
${MICROPY_BOARD_DIR}/sdkconfig.board
|
|
)
|
|
|
|
set(MICROPY_SOURCE_BOARD
|
|
${MICROPY_BOARD_DIR}/board_init.c
|
|
${MICROPY_BOARD_DIR}/double_tap.c
|
|
${MICROPY_DIR}/shared/tinyusb/mp_usbd_cdc.c
|
|
)
|
|
|
|
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|