From 5311fa5403254a0e37a7e10f0ebbb4759be377d8 Mon Sep 17 00:00:00 2001 From: Li Bo Date: Wed, 6 Sep 2023 13:12:55 +0800 Subject: [PATCH] Rename to cherryusb_esp32 to keep consistency with upstream fix https://github.com/CherryUSB/cherryusb_esp32/issues/4 --- .github/workflows/sync_esp_pkgmng.yml | 9 ++++++++- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- additions/esp_cherryusb.c | 2 +- .../cherryusb_device_cdc/main/CMakeLists.txt | 14 +++++++------- .../cherryusb_device_cdc/main/idf_component.yml | 6 +++--- idf_component.yml | 8 +++----- 7 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/sync_esp_pkgmng.yml b/.github/workflows/sync_esp_pkgmng.yml index 17907f3..8b04c75 100644 --- a/.github/workflows/sync_esp_pkgmng.yml +++ b/.github/workflows/sync_esp_pkgmng.yml @@ -8,13 +8,20 @@ jobs: upload_components: runs-on: ubuntu-latest steps: + - name: Check the repository name + run: | + if [[ ${{ github.repository }} != "leeebo/cherryusb_esp32" ]]; then + echo "This action is only for leeebo/cherryusb_esp32 repository" + fi - uses: actions/checkout@v2 + if: github.repository == 'leeebo/cherryusb_esp32' with: submodules: "recursive" - name: Upload component to the component registry + if: github.repository == 'leeebo/cherryusb_esp32' uses: espressif/upload-components-ci-action@v1 with: - name: "esp_cherryusb" + name: "cherryusb_esp32" namespace: "leeebo" api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a65f5e..7db5b41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # ChangeLog +## v0.0.3 - 2023-09-06 + +* Rename component name to `cherryusb_esp32` to keep consistency with upstream + ## v0.0.2 - 2023-09-05 * Fix github build action diff --git a/README.md b/README.md index 35ae261..9c27312 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CherryUSB Component and Examples for ESP -[![Component Registry](https://components.espressif.com/components/leeebo/esp_cherryusb/badge.svg)](https://components.espressif.com/components/leeebo/esp_cherryusb) [![Build Status](https://github.com/leeebo/esp_cherryusb/actions/workflows/build_examples.yml/badge.svg)](https://github.com/leeebo/esp_cherryusb/actions/workflows/build_examples.yml) +[![Component Registry](https://components.espressif.com/components/leeebo/cherryusb_esp32/badge.svg)](https://components.espressif.com/components/leeebo/cherryusb_esp32) [![Build Status](https://github.com/leeebo/cherryusb_esp32/actions/workflows/build_examples.yml/badge.svg)](https://github.com/leeebo/cherryusb_esp32/actions/workflows/build_examples.yml) This is the component and examples repository for the [CherryUSB](https://github.com/cherry-embedded/CherryUSB), which is a tiny and portable USB Stack (device & host) for embedded system with USB IP. @@ -15,13 +15,13 @@ Just add ``idf_component.yml`` to your main component with the following content ```yaml ## IDF Component Manager Manifest File dependencies: - leeebo/esp_cherryusb: "*" + leeebo/cherryusb_esp32: "*" ``` Or simply run: ``` -idf.py add-dependency "leeebo/esp_cherryusb" +idf.py add-dependency "leeebo/cherryusb_esp32" ``` During the build process, the ESP-IDF build system will automatically download and install this component. @@ -31,7 +31,7 @@ During the build process, the ESP-IDF build system will automatically download a Please use the component manager command `create-project-from-example` to create the project from example template ``` -idf.py create-project-from-example "leeebo/esp_cherryusb=*:cherryusb_device_cdc" +idf.py create-project-from-example "leeebo/cherryusb_esp32=*:cherryusb_device_cdc" ``` ## How to build the examples diff --git a/additions/esp_cherryusb.c b/additions/esp_cherryusb.c index 3a6e985..5c92fd5 100644 --- a/additions/esp_cherryusb.c +++ b/additions/esp_cherryusb.c @@ -51,7 +51,7 @@ void usb_dc_low_level_init(void) return; } USB_LOG_INFO("cherryusb, version: 0x%06x\r\n", CHERRYUSB_VERSION); - USB_LOG_INFO("esp_cherryusb, version: %d.%d.%d\r\n", ESP_CHERRYUSB_VER_MAJOR, ESP_CHERRYUSB_VER_MINOR, ESP_CHERRYUSB_VER_PATCH); + USB_LOG_INFO("cherryusb_esp32, version: %d.%d.%d\r\n", CHERRYUSB_ESP32_VER_MAJOR, CHERRYUSB_ESP32_VER_MINOR, CHERRYUSB_ESP32_VER_PATCH); } void usb_dc_low_level_deinit(void) diff --git a/examples/device/cherryusb_device_cdc/main/CMakeLists.txt b/examples/device/cherryusb_device_cdc/main/CMakeLists.txt index 5dfd361..6213d15 100644 --- a/examples/device/cherryusb_device_cdc/main/CMakeLists.txt +++ b/examples/device/cherryusb_device_cdc/main/CMakeLists.txt @@ -4,15 +4,15 @@ idf_component_register(SRCS "." ) -# Determine whether esp_cherryusb is fetched from the component registry or from the local path +# Determine whether cherryusb_esp32 is fetched from the component registry or from the local path idf_build_get_property(build_components BUILD_COMPONENTS) -if(esp_cherryusb IN_LIST build_components) - set(esp_cherryusb_name esp_cherryusb) # Local component +if(cherryusb_esp32 IN_LIST build_components) + set(cherryusb_esp32_name cherryusb_esp32) # Local component else() - set(esp_cherryusb_name leeebo__esp_cherryusb) # Managed component + set(cherryusb_esp32_name leeebo__cherryusb_esp32) # Managed component endif() -# Pass usb_config.h.h from this component to esp_cherryusb -idf_component_get_property(_esp_cherryusb_lib ${esp_cherryusb_name} COMPONENT_LIB) +# Pass usb_config.h.h from this component to cherryusb_esp32 +idf_component_get_property(_cherryusb_esp32_lib ${cherryusb_esp32_name} COMPONENT_LIB) cmake_policy(SET CMP0079 NEW) -target_link_libraries(${_esp_cherryusb_lib} PRIVATE ${COMPONENT_LIB}) +target_link_libraries(${_cherryusb_esp32_lib} PRIVATE ${COMPONENT_LIB}) diff --git a/examples/device/cherryusb_device_cdc/main/idf_component.yml b/examples/device/cherryusb_device_cdc/main/idf_component.yml index 6536cd1..8bb82d6 100644 --- a/examples/device/cherryusb_device_cdc/main/idf_component.yml +++ b/examples/device/cherryusb_device_cdc/main/idf_component.yml @@ -3,6 +3,6 @@ targets: - esp32s3 dependencies: idf: ">=4.4.1" - leeebo/esp_cherryusb: - version: "*" - override_path: "../../../../../esp_cherryusb" + leeebo/cherryusb_esp32: + version: "0.0.*" + override_path: "../../../../../cherryusb_esp32" diff --git a/idf_component.yml b/idf_component.yml index 3f20148..825e3ed 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -3,12 +3,10 @@ targets: - esp32s2 - esp32s3 description: CherryUSB Port and Examples for ESP SoC with USB-OTG (S2/S3/C5/P4) -url: https://github.com/leeebo/esp_cherryusb -repository: https://github.com/leeebo/esp_cherryusb.git -issues: https://github.com/leeebo/esp_cherryusb/issues +url: https://github.com/leeebo/cherryusb_esp32 +repository: https://github.com/leeebo/cherryusb_esp32.git +issues: https://github.com/leeebo/cherryusb_esp32/issues dependencies: idf: ">=4.4.1" leeebo/cherryusb: "~=0.10.1" cmake_utilities: "0.*" -examples: - - path: examples/device/cherryusb_device_cdc