diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 431937b..b90a274 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,11 +11,11 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: true - name: Build Main uses: espressif/esp-idf-ci-action@v1 with: - esp_idf_version: v5.2.2 + esp_idf_version: release-v5.4 target: esp32 path: '.' diff --git a/.github/workflows/package_main.yml b/.github/workflows/package_main.yml index c49d4a5..582abd4 100644 --- a/.github/workflows/package_main.yml +++ b/.github/workflows/package_main.yml @@ -5,6 +5,7 @@ on: branches: [main] release: types: [published] + workflow_dispatch: jobs: build: @@ -12,36 +13,56 @@ jobs: runs-on: ubuntu-latest continue-on-error: false + outputs: + zipfile-id: ${{ steps.zip_step.outputs.artifact-id }} + steps: - name: Checkout repo uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: true - name: Build Main Code uses: espressif/esp-idf-ci-action@v1 with: - esp_idf_version: v5.2.2 + esp_idf_version: release-v5.4 target: esp32 path: '.' - name: Upload Build Outputs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 + id: zip_step with: name: build-artifacts path: | + build/*.bin + build/*.elf build/bootloader/bootloader.bin build/partition_table/partition-table.bin - build/*.bin + build/flasher_args.json build/flash_args - name: Attach files to release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: ${{ github.event.release && github.event.action == 'published' }} with: files: | build/*.bin + build/*.elf build/bootloader/bootloader.bin build/partition_table/partition-table.bin + build/flasher_args.json build/flash_args + package: + name: Package the binaries into an executables for Windows, MacOS, and Linux (Ubuntu) + needs: build + strategy: + matrix: + os: [windows-latest, macos-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: esp-cpp/esp-packaged-programmer-action@v1.0.5 + with: + zipfile-id: ${{ needs.build.outputs.zipfile-id }} + programmer-name: 'camera-streamer_programmer' diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 54bf1b2..a35a74c 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -9,8 +9,6 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v2 - with: - submodules: 'recursive' - name: Run static analysis uses: esp-cpp/StaticAnalysis@master @@ -18,8 +16,8 @@ jobs: # Do not build the project and do not use cmake to generate compile_commands.json use_cmake: false - # Use the 5.2 release version since it's what we build with - esp_idf_version: release/v5.2 + # Use the 5.4 release version since it's what we build with + esp_idf_version: release/v5.4 # (Optional) cppcheck args - cppcheck_args: -i$GITHUB_WORKSPACE/components/espp -i$GITHUB_WORKSPACE/components/esp32-camera -i$GITHUB_WORKSPACE/components/esp-protocols --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt + cppcheck_args: --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt diff --git a/.gitignore b/.gitignore index d99e497..b4ef190 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ sdkconfig sdkconfig.old .DS_Store dependencies.lock +managed_components/ diff --git a/.gitmodules b/.gitmodules index 133a0e3..21c8215 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "components/espp"] - path = components/espp - url = git@github.com:esp-cpp/espp [submodule "components/esp32-camera"] path = components/esp32-camera - url = git@github.com:espressif/esp32-camera -[submodule "components/esp-protocols"] - path = components/esp-protocols - url = git@github.com:espressif/esp-protocols + url = git@github.com:esp-cpp/esp32-camera diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cae7d4..8f7360b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,11 @@ # The following lines of boilerplate have to be in your project's CMakeLists # in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.20) include($ENV{IDF_PATH}/tools/cmake/project.cmake) # add the component directories that we want to use set(EXTRA_COMPONENT_DIRS - "components/espp/components" - "components/esp-protocols/components/mdns" ) add_compile_definitions(BOARD_HAS_PSRAM) diff --git a/components/esp-protocols b/components/esp-protocols deleted file mode 160000 index 5964ead..0000000 --- a/components/esp-protocols +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5964eadbf5591e8c12ffa5c724c7ace083423239 diff --git a/components/esp32-camera b/components/esp32-camera index 7aa37d4..0fe33c0 160000 --- a/components/esp32-camera +++ b/components/esp32-camera @@ -1 +1 @@ -Subproject commit 7aa37d4f22503fdac9ccd449e4678c4894c40055 +Subproject commit 0fe33c0346b9a348bb68190d2b81e830fc46a58b diff --git a/components/espp b/components/espp deleted file mode 160000 index 8e84d34..0000000 --- a/components/espp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8e84d34eb4a9decb8869b0faa71e422c00db69b0 diff --git a/main/idf_component.yml b/main/idf_component.yml new file mode 100644 index 0000000..49898de --- /dev/null +++ b/main/idf_component.yml @@ -0,0 +1,17 @@ +## IDF Component Manager Manifest File +dependencies: + ## Required IDF version + idf: + version: '>=5.0' + espressif/mdns: '>=1.8' + # NOTE: we cannot use the idf component because for anything ESP-IDF >= 5.4 it + # automatically uses the new I2C driver, which espp doesn't support yet. + # + # espressif/esp32-camera: '>=2.0' + espp/rtsp: '>=1.0' + espp/wifi: '>=1.0' + espp/monitor: '>=1.0' + espp/socket: '>=1.0' + espp/nvs: '>=1.0' + espp/task: '>=1.0' + espp/esp32-timer-cam: '>=1.0' diff --git a/main/main.cpp b/main/main.cpp index 508f270..3924ebc 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -176,7 +176,7 @@ extern "C" void app_main(void) { // initialize the camera logger.info("Creating camera task"); - auto camera_task_fn = [&rtsp_server, &logger](auto &m, auto &cv) -> bool { + auto camera_task_fn = [&rtsp_server, &logger](const auto &m, const auto &cv) -> bool { // take image static camera_fb_t *fb = NULL; static size_t _jpg_buf_len; diff --git a/sdkconfig.defaults b/sdkconfig.defaults index f92f417..d12b298 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -16,7 +16,6 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=32768 # SPIRAM Configuration CONFIG_SPIRAM=y CONFIG_SPIRAM_USE_MALLOC=y -CONFIG_SPIRAM_MODE_OCT=y CONFIG_SPIRAM_SPEED_80M=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y @@ -31,3 +30,6 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=240 + +# ESP32-Camera specific +CONFIG_SCCB_HARDWARE_I2C_DRIVER_LEGACY=y