diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 831415e..c4ad51c 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: esp32s3 path: '.' diff --git a/.github/workflows/package_main.yml b/.github/workflows/package_main.yml index 6ad826b..0925d7b 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,6 +13,9 @@ 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 @@ -21,19 +25,22 @@ jobs: - 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: esp32s3 path: '.' command: 'idf.py build' - name: Upload Build Outputs 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 @@ -42,7 +49,21 @@ jobs: 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-display_programmer' diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 8820fa2..ee13413 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@v4 - 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/jpegdec -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/.gitmodules b/.gitmodules index 027ea58..69ec130 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "components/espp"] - path = components/espp - url = git@github.com:esp-cpp/espp -[submodule "components/esp-protocols"] - path = components/esp-protocols - url = git@github.com:espressif/esp-protocols [submodule "components/jpegdec"] path = components/jpegdec url = https://github.com/esp-cpp/jpegdec diff --git a/CMakeLists.txt b/CMakeLists.txt index a4f1824..2c52662 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" ) # add compile definition ARDUINO_ARCH_ESP32, enabling jpegdec simd support 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/espp b/components/espp deleted file mode 160000 index dffe2ca..0000000 --- a/components/espp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dffe2cac2f098c7ba10532510f3f8eb81025dc24 diff --git a/components/jpegdec b/components/jpegdec index 9ce05f4..921799d 160000 --- a/components/jpegdec +++ b/components/jpegdec @@ -1 +1 @@ -Subproject commit 9ce05f474f5a712ccb277c27355325ca4fe5371a +Subproject commit 921799d3e2f93b0246aed47f5276650da7743bc5 diff --git a/main/idf_component.yml b/main/idf_component.yml new file mode 100644 index 0000000..d88b3ac --- /dev/null +++ b/main/idf_component.yml @@ -0,0 +1,14 @@ +## IDF Component Manager Manifest File +dependencies: + ## Required IDF version + idf: + version: '>=5.0' + espp/rtsp: '>=1.0' + espp/esp-box: '>=1.0' + espp/wifi: '>=1.0' + espp/monitor: '>=1.0' + espp/t-deck: '>=1.0' + espp/socket: '>=1.0' + espp/nvs: '>=1.0' + espp/task: '>=1.0' + espressif/mdns: '>=1.8' diff --git a/main/main.cpp b/main/main.cpp index d68a6e7..51ab408 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -178,11 +178,11 @@ extern "C" void app_main(void) { }; // Start the display task logger.info("Starting display task"); - auto display_task = espp::Task::make_unique({ - .name = "Display Task", - .callback = display_task_fn, - .stack_size_bytes = 5 * 1024, - }); + auto display_task = espp::Task::make_unique({.callback = display_task_fn, + .task_config = { + .name = "Display Task", + .stack_size_bytes = 5 * 1024, + }}); display_task->start(); // make the rtsp client @@ -278,6 +278,7 @@ void mdns_print_results(mdns_result_t *results) { a = r->addr; while (a) { if (a->addr.type == ESP_IPADDR_TYPE_V6) { + // cppcheck-suppress unknownMacro printf(" AAAA: " IPV6STR "\n", IPV62STR(a->addr.u_addr.ip6)); } else { printf(" A : " IPSTR "\n", IP2STR(&(a->addr.u_addr.ip4))); diff --git a/sdkconfig.defaults b/sdkconfig.defaults index f54e38c..7b5fb0c 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -27,9 +27,13 @@ CONFIG_SPI_MASTER_IN_IRAM=y # SPIRAM Configuration CONFIG_SPIRAM=y -CONFIG_SPIRAM_USE=y +CONFIG_SPIRAM_USE_MALLOC=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M=y +CONFIG_SPIRAM_SPEED_120M=y +CONFIG_SPIRAM_SPEED=120 +CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y +CONFIG_SPIRAM_RODATA=y # CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y