FreeRTOS/iot-reference-esp32

Cannot find ota_pal_test.cmake

Closed this issue · 18 comments

abarke commented

Describe the bug
When opening the config in ESP-IDF, cmake fails as FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake is not found although referenced here: https://github.com/FreeRTOS/iot-reference-esp32c3/blob/main/components/FreeRTOS-Libraries-Integration-Tests/CMakeLists.txt#L11

System information

  • Hardware board: ESP32-C3
  • IDE used: VSCode
  • Operating System: Windows
  • Code version: main
  • Project/Demo:

Expected behavior
No error... although when I removed this line it works: https://github.com/FreeRTOS/iot-reference-esp32c3/blob/main/components/FreeRTOS-Libraries-Integration-Tests/CMakeLists.txt#L11

Screenshots or console output
If appropriate, please paste the console output/error log explaining the issue. If possible, include the call stack.

Steps to reproduce bug
Example:
1. git clone --recursive https://github.com/FreeRTOS/iot-reference-esp32c3.git
2. Click on ESP-IDF: SDK Configuration Editor (menuconfig)

the same issue.
using git cmd to download the soure code just like this: git clone https://github.com/FreeRTOS/iot-reference-esp32c3.git --recurse-submodules
and the result is(can not found error):
Cloning into 'D:/T4/iot-reference-esp32c3/components/esp-aws-iot/libraries/corePKCS11/corePKCS11/source/dependency/3rdparty/pkcs11'...
remote: Enumerating objects: 570, done.
remote: Counting objects: 100% (127/127), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 570 (delta 63), reused 94 (delta 34), pack-reused 443
Receiving objects: 100% (570/570), 168.63 KiB | 235.00 KiB/s, done.
Resolving deltas: 100% (328/328), done.
Submodule path 'components/esp-aws-iot/libraries/corePKCS11/corePKCS11/source/dependency/3rdparty/pkcs11': checked out '478bfc5077901865993e3a193777c1a9f6516cdf'

using VS Code bulding(IDF version 5.2.2), result:

  • Executing task: C:\JasonSoftware\Espressif\tools\cmake\3.24.0\bin\cmake.exe -G=Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B=d:\99ESP\T4\iot-reference-esp32c3\build -S=d:\99ESP\T4\iot-reference-esp32c3

-- Found Git: C:/JasonSoftware/Espressif/tools/idf-git/2.44.0/cmd/git.exe (found version "2.44.0.windows.1")
-- Component directory D:/99ESP/T4/iot-reference-esp32c3/components/esp-aws-iot/libraries/common does not contain a CMakeLists.txt file. No component will be added
-- Component directory D:/99ESP/T4/iot-reference-esp32c3/components/esp-aws-iot does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32c3
Processing 4 dependencies:
[1/4] espressif/cbor (0.6.0~1)
[2/4] espressif/esp_secure_cert_mgr (2.4.1) from file:///C:/JasonSoftware/Espressif/registry
[3/4] espressif/led_strip (2.5.4) from file:///C:/JasonSoftware/Espressif/registry
[4/4] idf (5.2.2)
CMake Error at C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/component.cmake:224 (message):
CMake Warning (dev) at build_properties.temp.cmake:8:

Syntax Warning in cmake code at column 106



Argument not separated from preceding token by whitespace.

Call Stack (most recent call first):

C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/scripts/component_get_requirements.cmake:3 (include)

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at
D:/99ESP/T4/iot-reference-esp32c3/components/FreeRTOS-Libraries-Integration-Tests/CMakeLists.txt:11
(include):

include could not find requested file:



  D:/99ESP/T4/iot-reference-esp32c3/components/FreeRTOS-Libraries-Integration-Tests/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake

Call Stack (most recent call first):

C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/scripts/component_get_requirements.cmake:107 (include)
C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/scripts/component_get_requirements.cmake:127 (__component_get_requirements)

Call Stack (most recent call first):
C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/build.cmake:578 (__component_get_requirements)
C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/project.cmake:605 (idf_build_process)
CMakeLists.txt:8 (project)

-- Configuring incomplete, errors occurred!
See also "D:/99ESP/T4/iot-reference-esp32c3/build/CMakeFiles/CMakeOutput.log".

  • The terminal process "C:\JasonSoftware\Espressif\tools\cmake\3.24.0\bin\cmake.exe '-G=Ninja', '-DPYTHON_DEPS_CHECKED=1', '-DESP_PLATFORM=1', '-B=d:\99ESP\T4\iot-reference-esp32c3\build', '-S=d:\99ESP\T4\iot-reference-esp32c3'" terminated with exit code: 1.

then using IDE_ESP-IDF 5.2 CMD running "idf.py menuconfig", result:
D:\99ESP\T4\iot-reference-esp32c3>idf.py menuconfig
Executing action: menuconfig
Running cmake in directory D:\99ESP\T4\iot-reference-esp32c3\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\JasonSoftware\Espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 D:\99ESP\T4\iot-reference-esp32c3"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: C:/JasonSoftware/Espressif/tools/idf-git/2.44.0/cmd/git.exe (found version "2.44.0.windows.1")
-- Component directory D:/99ESP/T4/iot-reference-esp32c3/components/esp-aws-iot/libraries/common does not contain a CMakeLists.txt file. No component will be added
-- Component directory D:/99ESP/T4/iot-reference-esp32c3/components/esp-aws-iot does not contain a CMakeLists.txt file. No component will be added
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/JasonSoftware/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/JasonSoftware/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/JasonSoftware/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
Target changed from esp32c3 to esp32, solving dependencies.
..........Updating lock file at D:\99ESP\T4\iot-reference-esp32c3\dependencies.lock
Processing 4 dependencies:
[1/4] espressif/cbor (0.6.0~1)
[2/4] espressif/esp_secure_cert_mgr (2.4.1) from file:///C:/JasonSoftware/Espressif/registry
[3/4] espressif/led_strip (2.5.4) from file:///C:/JasonSoftware/Espressif/registry
[4/4] idf (5.2.2)
CMake Error at C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/component.cmake:224 (message):
CMake Warning (dev) at build_properties.temp.cmake:8:

Syntax Warning in cmake code at column 106



Argument not separated from preceding token by whitespace.

Call Stack (most recent call first):

C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/scripts/component_get_requirements.cmake:3 (include)

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at
D:/99ESP/T4/iot-reference-esp32c3/components/FreeRTOS-Libraries-Integration-Tests/CMakeLists.txt:11
(include):

include could not find requested file:



  D:/99ESP/T4/iot-reference-esp32c3/components/FreeRTOS-Libraries-Integration-Tests/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake

Call Stack (most recent call first):

C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/scripts/component_get_requirements.cmake:107 (include)
C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/scripts/component_get_requirements.cmake:127 (__component_get_requirements)

Call Stack (most recent call first):
C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/build.cmake:578 (__component_get_requirements)
C:/JasonSoftware/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/project.cmake:605 (idf_build_process)
CMakeLists.txt:8 (project)

-- Configuring incomplete, errors occurred!
See also "D:/99ESP/T4/iot-reference-esp32c3/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1

In the project folder, go to Components -> FreeRTOS-Libraries-Integration-Tests, and edit the CMakeLists.txt, and comment out the following line
# This gives OTA_PAL_TEST_SOURCES, and OTA_PAL_TEST_INCLUDE_DIRS
#include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)

After this MenuConfig worked. It appears ota_pal_test.cmake was dropped 1/12 ago.

In the project folder, go to Components -> FreeRTOS-Libraries-Integration-Tests, and edit the CMakeLists.txt, and comment out the following line # This gives OTA_PAL_TEST_SOURCES, and OTA_PAL_TEST_INCLUDE_DIRS #include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)

After this MenuConfig worked. It appears ota_pal_test.cmake was dropped 1/12 ago.

after this MenuConfig worked. But can not buid. error as:

D:/99ESP/T4/iot-reference-esp32c3/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c:232:36: error: 'otaconfigMAX_NUM_OTA_DATA_BUFFERS' undeclared here (not in a function)
232 | static OtaDataEvent_t dataBuffers[ otaconfigMAX_NUM_OTA_DATA_BUFFERS ] = { 0 };

can I ask when I make a define for otaconfigMAX_NUM_OTA_DATA_BUFFERS, then build, an error like this:
[1075/1077] Linking CXX executable FeaturedFreeRTOSIoTIntegration.elf
FAILED: FeaturedFreeRTOSIoTIntegration.elf
cmd.exe /C "cd . && C:\JasonSoftware\Espressif\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc_zicsr_zifencei -nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0 -Wl,--Map=D:/99ESP/T4/iot-reference-esp32c3/build/FeaturedFreeRTOSIoTIntegration.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32c3.peripherals.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T memory.ld -T sections.ld @CMakeFiles\FeaturedFreeRTOSIoTIntegration.elf.rsp -o FeaturedFreeRTOSIoTIntegration.elf && cd ."
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: FeaturedFreeRTOSIoTIntegration.elf section .dram0.bss' will not fit in region dram0_0_seg'
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: section .iram0.text VMA [40380000,40394fa9] overlaps section .dram0.bss VMA [3fc98380,404a4baf]
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 8217760 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

  • The terminal process "C:\JasonSoftware\Espressif\tools\ninja\1.11.1\ninja.exe" terminated with exit code: 1.

Hi @abarke,
Thanks for bringing this to us! I'm looking into this and create PR as soon as I can.

Thank you again!

Hi @abarke, @JasonYan324,
Could you help re-compile with #99? I fixed the issue locally, but I'd like to have your result with the change.

Thank you.

Hi @abarke, @JasonYan324, Could you help re-compile with #99? I fixed the issue locally, but I'd like to have your result with the change.

Thank you.

sorry, so much informations. i do not know whic should follow. I just check this:

"Test Steps
idf.py menuconfig (Featured FreeRTOS IoT Integration -> Enable OTA demo -> check)
idf.py build"

and it is checked as default, and i do uncheck, check, then save. after then, comment out my define for "otaconfigMAX_NUM_OTA_DATA_BUFFERS", buil result:

D:/99ESP/T4/iot-reference-esp32c3/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c:234:36: error: 'otaconfigMAX_NUM_OTA_DATA_BUFFERS' undeclared here (not in a function)
234 | static OtaDataEvent_t dataBuffers[ otaconfigMAX_NUM_OTA_DATA_BUFFERS ] = { 0 };

And i do the test as follow:
1.make a define otaconfigMAX_NUM_OTA_DATA_BUFFERS 1024
2.comment out vStartOTACodeSigningDemo
#if 0 //CONFIG_GRI_ENABLE_OTA_DEMO
#if CONFIG_GRI_OUTPUT_CERTS_KEYS
ESP_LOGI( TAG, "\nCS Cert: \nLength: %zu\n%s",
strlen( pcAwsCodeSigningCertPem ),
pcAwsCodeSigningCertPem );
#endif /* CONFIG_GRI_OUTPUT_CERTS_KEYS */

        ESP_LOGI( TAG, "Application version number: %u.%u.%u",
                  CONFIG_GRI_OTA_DEMO_APP_VERSION_MAJOR,
                  CONFIG_GRI_OTA_DEMO_APP_VERSION_MINOR,
                  CONFIG_GRI_OTA_DEMO_APP_VERSION_BUILD );

        if( otaPal_SetCodeSigningCertificate( pcAwsCodeSigningCertPem ) )
        {
            vStartOTACodeSigningDemo();
        }
        else
        {
            ESP_LOGE( TAG,
                      "Failed to set the code signing certificate for the AWS OTA "
                      "library. OTA demo will not be started." );
        }
    #endif /* CONFIG_GRI_ENABLE_OTA_DEMO */

build result:
[6/8] Linking CXX executable FeaturedFreeRTOSIoTIntegration.elf
FAILED: FeaturedFreeRTOSIoTIntegration.elf
cmd.exe /C "cd . && C:\JasonSoftware\Espressif\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc_zicsr_zifencei -nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0 -Wl,--Map=D:/99ESP/T4/iot-reference-esp32c3/build/FeaturedFreeRTOSIoTIntegration.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32c3.peripherals.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T memory.ld -T sections.ld @CMakeFiles\FeaturedFreeRTOSIoTIntegration.elf.rsp -o FeaturedFreeRTOSIoTIntegration.elf && cd ."
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: FeaturedFreeRTOSIoTIntegration.elf section .dram0.bss' will not fit in region dram0_0_seg'
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: section .iram0.text VMA [40380000,40394f03] overlaps section .dram0.bss VMA [3fc98380,404a3ddf]
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 8214224 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Actually, before fix the keep alive issue, the code form master branch can be build and running. I use git to download the soure code at 2024.07.16

Hi @abarke, @JasonYan324, Could you help re-compile with #99? I fixed the issue locally, but I'd like to have your result with the change.

Thank you.

Actually, in my iot-reference-esp32c3\main\demo_tasks\ota_over_mqtt_demo\ota_over_mqtt_demo_config.h does not hav a define name "otaconfigMAX_NUM_OTA_DATA_BUFFERS"

sorry to make trouble. may be is git download issue. i download againt and make the change as follow, build ok, menuconfig works too, amazing!!!!!!

1.components\FreeRTOS-Libraries-Integration-Tests\CMakeLists.txt

This gives OTA_PAL_TEST_SOURCES, and OTA_PAL_TEST_INCLUDE_DIRS

#include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)

comment out include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)

2\main\demo_tasks\ota_over_mqtt_demo\ota_over_mqtt_demo.c
static OtaDataEvent_t dataBuffers[512] = {0};//[ otaconfigMAX_NUM_OTA_DATA_BUFFERS ] = { 0 };

does not use otaconfigMAX_NUM_OTA_DATA_BUFFERS

sorry to make trouble. may be is git download issue. i download againt and make the change as follow, build ok, menuconfig works too, amazing!!!!!!

1.components\FreeRTOS-Libraries-Integration-Tests\CMakeLists.txt

This gives OTA_PAL_TEST_SOURCES, and OTA_PAL_TEST_INCLUDE_DIRS

#include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)

comment out include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)

2\main\demo_tasks\ota_over_mqtt_demo\ota_over_mqtt_demo.c static OtaDataEvent_t dataBuffers[512] = {0};//[ otaconfigMAX_NUM_OTA_DATA_BUFFERS ] = { 0 };

does not use otaconfigMAX_NUM_OTA_DATA_BUFFERS

But, when input Broker endpoint in menuconfig, build result: dram0_0_seg' overflowed by 4019360 bytes. i dont understand
[1057/1059] Linking CXX executable FeaturedFreeRTOSIoTIntegration.elf
FAILED: FeaturedFreeRTOSIoTIntegration.elf
cmd.exe /C "cd . && C:\JasonSoftware\Espressif\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc_zicsr_zifencei -nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0 -Wl,--Map=D:/0/build/FeaturedFreeRTOSIoTIntegration.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32c3.peripherals.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T memory.ld -T sections.ld @CMakeFiles\FeaturedFreeRTOSIoTIntegration.elf.rsp -o FeaturedFreeRTOSIoTIntegration.elf && cd ."
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: FeaturedFreeRTOSIoTIntegration.elf section .dram0.bss' will not fit in region dram0_0_seg'
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 4019360 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

sorry to make trouble. may be is git download issue. i download againt and make the change as follow, build ok, menuconfig works too, amazing!!!!!!
1.components\FreeRTOS-Libraries-Integration-Tests\CMakeLists.txt

This gives OTA_PAL_TEST_SOURCES, and OTA_PAL_TEST_INCLUDE_DIRS

#include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)
comment out include(${CMAKE_CURRENT_LIST_DIR}/FreeRTOS-Libraries-Integration-Tests/src/ota_pal_test.cmake)
2\main\demo_tasks\ota_over_mqtt_demo\ota_over_mqtt_demo.c static OtaDataEvent_t dataBuffers[512] = {0};//[ otaconfigMAX_NUM_OTA_DATA_BUFFERS ] = { 0 };
does not use otaconfigMAX_NUM_OTA_DATA_BUFFERS

But, when input Broker endpoint in menuconfig, build result: dram0_0_seg' overflowed by 4019360 bytes. i dont understand [1057/1059] Linking CXX executable FeaturedFreeRTOSIoTIntegration.elf FAILED: FeaturedFreeRTOSIoTIntegration.elf cmd.exe /C "cd . && C:\JasonSoftware\Espressif\tools\riscv32-esp-elf\esp-13.2.0_20230928\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc_zicsr_zifencei -nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0 -Wl,--Map=D:/0/build/FeaturedFreeRTOSIoTIntegration.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32c3.peripherals.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T memory.ld -T sections.ld @CMakeFiles\FeaturedFreeRTOSIoTIntegration.elf.rsp -o FeaturedFreeRTOSIoTIntegration.elf && cd ." C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: FeaturedFreeRTOSIoTIntegration.elf section .dram0.bss' will not fit in region dram0_0_seg' C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit. C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: DRAM segment data does not fit. C:/JasonSoftware/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 4019360 bytes collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed.

I have found the reason. After compare the new and the old SDKconfig, i found then the new SDKconfig miss the follow define(but have in the sdkconfig.defaults)

AWS OTA

CONFIG_LOG2_FILE_BLOCK_SIZE=12
CONFIG_MAX_NUM_BLOCKS_REQUEST=8
CONFIG_MAX_NUM_OTA_DATA_BUFFERS=8
CONFIG_ALLOW_DOWNGRADE=0
CONFIG_OTA_DATA_OVER_MQTT=y

CONFIG_OTA_DATA_OVER_HTTP is not set

CONFIG_OTA_DATA_OVER_MQTT_PRIMARY=y
CONFIG_OTA_PRIMARY_DATA_PROTOCOL=1

and befor my define for otaconfigMAX_NUM_OTA_DATA_BUFFERS is 512, so dram0_0_seg overflowed, after i make as 8, bulide succeed.

so, the big problem is why the update code at 2024.7.26 will miss the OTA define

Hi @JasonYan324,
Thanks for your feedback! Yes, it needs a clean build after changing SDKconfig file.

Hi @JasonYan324, Thanks for your feedback! Yes, it needs a clean build after changing SDKconfig file.

no, my point is the new sdkconfig missing these define
CONFIG_LOG2_FILE_BLOCK_SIZE=12
CONFIG_MAX_NUM_BLOCKS_REQUEST=8
CONFIG_MAX_NUM_OTA_DATA_BUFFERS=8
CONFIG_ALLOW_DOWNGRADE=0
CONFIG_OTA_DATA_OVER_MQTT=y

Hi @JasonYan324, Thanks for your feedback! Yes, it needs a clean build after changing SDKconfig file.

and, can you help me to find out what cause this problem? Thanks. Afer i fix the bulid issue, it can not running, reboot and reboot...

I (269) uart: queue free spaces: 10
I (269) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (269) main:
CS Cert:
Length: 0

I (269) main: Application version number: 0.0.0
E (269) temp_sub_pub_and_led_control_demo: Subscribe Topic: /Meshed/Jason/Subscribe
I (269) temp_sub_pub_and_led_control_demo: Sending subscribe request to agent for topic filter: /Meshed/Jason/Subscribe with id 1
I (269) ota_over_mqtt_demo: OTA over MQTT demo, Application version 0.0.0
I (269) pp: pp rom version: 9387209
I (269) net80211: net80211 rom version: 9387209
I (279) wifi:wifi driver task: 3fcc3cfc, prio:23, stack:6656, core=0
I (279) wifi:wifi firmware version: 0caa81945
I (279) wifi:wifi certification version: v7.0
I (279) wifi:config NVS flash: enabled
I (279) wifi:config nano formating: disabled
I (279) wifi:Init data frame dynamic rx buffer num: 32
I (279) wifi:Init static rx mgmt buffer num: 5
I (279) wifi:Init management short buffer num: 32
I (279) wifi:Init dynamic tx buffer num: 32
I (279) wifi:Init static tx FG buffer num: 2
I (279) wifi:Init static rx buffer size: 1600
I (279) wifi:Init static rx buffer num: 10
I (279) wifi:Init dynamic rx buffer num: 32
I (279) wifi_init: rx ba win: 6
I (279) wifi_init: accept mbox: 6
I (279) wifi_init: tcpip mbox: 32
I (279) wifi_init: udp mbox: 6
I (279) wifi_init: tcp mbox: 6
I (279) wifi_init: tcp tx win: 5760
I (279) wifi_init: tcp rx win: 5760
I (279) wifi_init: tcp mss: 1440
I (279) wifi_init: WiFi IRAM OP enabled
I (279) wifi_init: WiFi RX IRAM OP enabled
I (279) wifi_prov_scheme_ble: BT memory released
I (289) app_wifi: Already provisioned, starting Wi-Fi STA
I (289) wifi_prov_scheme_ble: BTDM memory released
I (289) phy_init: phy_version 1180,01f2a49,Jun 4 2024,16:34:25
I (329) wifi:mode : sta (40:4c:ca:89:c1:84)
I (329) wifi:enable tsf
I (2739) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (2739) wifi:state: init -> auth (0xb0)
I (2739) wifi:state: auth -> assoc (0x0)
I (2769) wifi:state: assoc -> run (0x10)
I (2789) wifi:connected with Rompa Guest, aid = 23, channel 1, BW20, bssid = f6:2a:7d:1e:d6:b9
I (2789) wifi:security: WPA2-PSK, phy: bgn, rssi: -47
I (2789) wifi:pm start, type: 1

I (2789) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (2789) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 25000, mt_pti: 14, mt_time: 10000
I (2819) wifi:idx:0 (ifx:0, f6:2a:7d:1e:d6:b9), tid:4, ssn:8, winSize:64
I (2829) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (3789) core_mqtt_agent_manager: WiFi connected.
I (3789) app_wifi: Connected with IP Address:192.168.2.158
I (3789) esp_netif_handlers: sta ip: 192.168.2.158, mask: 255.255.255.0, gw: 192.168.2.1
I (3789) main_task: Returned from app_main()
I (3799) wifi:idx:1 (ifx:0, f6:2a:7d:1e:d6:b9), tid:0, ssn:1018, winSize:64
I (5799) core_mqtt_agent_manager: TLS connection established.
I (6539) coreMQTT: MQTT connection established with the broker.
I (6539) core_mqtt_agent_manager: Session present: 0

I (6539) core_mqtt_agent_manager: coreMQTT-Agent connected.
I (6539) sub_pub_unsub_demo: coreMQTT-Agent connected.
I (6539) ota_over_mqtt_demo: coreMQTT-Agent connected. Resuming OTA agent.
I (6539) temp_sub_pub_and_led_control_demo: coreMQTT-Agent connected.
I (6549) sub_pub_unsub_demo: Task "SubPub0" sending subscribe request to coreMQTT-Agent for topic filter: /Meshed/Jason/Filter/SubPub0 with id 1
Guru Meditation Error: Core 0 panic'ed (Stack protection fault).

Detected in task "OTADemoTask" at 0x42009362
0x42009362: processOTAEvents at D:/0/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c:1072

Stack pointer: 0x3fcbe950
Stack bounds: 0x3fcbeeb0 - 0x3fcbfaa0

Core 0 register dump:
MEPC : 0x42009364 RA : 0x42009fca SP : 0x3fcbe950 GP : 0x3fc97600
0x42009364: processOTAEvents at D:/0/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c:1073
0x42009fca: prvOTADemoTask at D:/0/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c:1398

TP : 0x3fcbfaa0 T0 : 0xfffff000 T1 : 0x3fcb3000 T2 : 0xffffffff
S0/FP : 0x3c0e7000 S1 : 0x0000000b A0 : 0x00000001 A1 : 0x00000001
A2 : 0x3fcb3000 A3 : 0x00001000 A4 : 0x000010d0 A5 : 0x00000000
A6 : 0xa0000000 A7 : 0x00000014 S2 : 0x3fcb3000 S3 : 0x00000000
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x3fcb3000 T4 : 0x00000001 T5 : 0x3fcb3000 T6 : 0x00000001
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x0000001b MTVAL : 0x000077fd
0x40380001: _vector_table at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/riscv/vectors_intc.S:54

MHARTID : 0x00000000

Stack memory:
3fcbe950: 0x00000000 0x00000000 0x00000000 0x3fcbe960 0xffffffff 0x3fcbe960 0x3fcbe960 0x00000000
3fcbe970: 0x3fcbe974 0xffffffff 0x3fcbe974 0x3fcbe974 0x00000001 0x00000001 0x00000000 0x4001ffff
0x4001ffff: r_lld_rpa_renew_instant_cbk in ROM

3fcbe990: 0x00000000 0x403947ba 0x3fcbe940 0x00000054 0x3fcbe9a0 0x3fcbe9a0 0x3fcbe9a0 0x3fcbe9a0
0x403947ba: pm_sleep at ??:?

3fcbe9b0: 0x00000000 0x3fcbe9b8 0xffffffff 0x3fcbe9b8 0x3fcbe9b8 0x00000000 0x3fcbe9cc 0xffffffff
3fcbe9d0: 0x3fcbe9cc 0x3fcbe9cc 0x00000000 0x00000001 0x00000000 0x4001ffff 0x00000000 0x40392c4c
0x4001ffff: r_lld_rpa_renew_instant_cbk in ROM
0x40392c4c: ppMapTxQueue at ??:?

3fcbe9f0: 0x3fcbe998 0x00000054 0x3fcbe9f8 0x3fcbe9f8 0x3fcbe9f8 0x3fcbe9f8 0x00000000 0x3fcbea10
3fcbea10: 0xffffffff 0x3fcbea10 0x3fcbea10 0x00000000 0x3fcbea24 0xffffffff 0x3fcbea24 0x3fcbea24
3fcbea30: 0x00000000 0x00000001 0x00000000 0x4201ffff 0x00000000 0x40001848 0x3fcbe9f0 0x00000054
0x4201ffff: ble_hs_conn_addrs at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_conn.c:437
0x40001848: __call_ic_ebuf_recycle_tx in ROM

3fcbea50: 0x3fcbea50 0x3fcbea50 0x3fcbea50 0x3fcbea50 0x00000000 0x3fcbea68 0xffffffff 0x3fcbea68
3fcbea70: 0x3fcbea68 0x00000000 0x3fcbea7c 0xffffffff 0x3fcbea7c 0x3fcbea7c 0x00000001 0x00000001
3fcbea90: 0x00000000 0x4001ffff 0x00000000 0x4000182c 0x3fcbea48 0x00000028 0x3fcb5294 0x3fcb5294
0x4001ffff: r_lld_rpa_renew_instant_cbk in ROM
0x4000182c: __call_ampdu_dispatch_as_many_as_possible in ROM

3fcbeab0: 0x4000184c 0x400018a4 0x42087072 0x42086bd8 0x4000187c 0x40001878 0x4207bcb2 0x3fcbeaa0
0x4000184c: __call_ic_reset_rx_ba in ROM
0x400018a4: __call_ieee80211_set_tx_pti in ROM
0x42087072: ieee80211_sta_new_state at ??:?
0x42086bd8: sta_eapol_txdone_cb at ??:?
0x4000187c: __call_wifi_rf_phy_enable in ROM
0x40001878: __call_wifi_rf_phy_disable in ROM
0x4207bcb2: cnx_update_bss_more at ??:?

3fcbead0: 0x0000000c 0x3fcbeae4 0x00000000 0x3fcbeacc 0x0000000c 0x05540008 0x00000000 0x3fcbedfc
3fcbeaf0: 0x00000028 0x42042cae 0x42042ae8 0x42042b80 0x42042c82 0x42042d1c 0x3fcbeb20 0x3fcbee28
0x42042cae: led_strip_rmt_set_pixel at D:/0/managed_components/espressif__led_strip/src/led_strip_rmt_dev.c:39
0x42042ae8: led_strip_rmt_set_pixel_rgbw at D:/0/managed_components/espressif__led_strip/src/led_strip_rmt_dev.c:54
0x42042b80: led_strip_rmt_refresh at D:/0/managed_components/espressif__led_strip/src/led_strip_rmt_dev.c:66
0x42042c82: led_strip_rmt_clear at D:/0/managed_components/espressif__led_strip/src/led_strip_rmt_dev.c:81
0x42042d1c: led_strip_rmt_del at D:/0/managed_components/espressif__led_strip/src/led_strip_rmt_dev.c:89

3fcbeb10: 0x00000001 0x00000003 0x3f000000 0x000000f4 0x00000000 0x00000002 0x00000001 0x00000001
3fcbeb30: 0x3fcbedb4 0x00000000 0x00000000 0x00989680 0x3fcbedec 0x00000001 0x00000000 0x60016400
3fcbeb50: 0x00000000 0x00000000 0x4204e998 0x4204e600 0x4204e778 0x4204e480 0x00000000 0x00000000
0x4204e998: rmt_del_tx_channel at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/esp_driver_rmt/src/rmt_tx.c:384
0x4204e600: rmt_tx_modulate_carrier at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/esp_driver_rmt/src/rmt_tx.c:870
0x4204e778: rmt_tx_enable at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/esp_driver_rmt/src/rmt_tx.c:755
0x4204e480: rmt_tx_disable at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/esp_driver_rmt/src/rmt_tx.c:801

3fcbeb70: 0x0000001a 0x00000018 0x00000018 0x00000004 0x00000000 0x3fcbec18 0x3fcbec84 0x3fcbecf0
3fcbeb90: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x3fcbee28 0x3fcbeb15 0x00000003
3fcbebb0: 0x00000000 0x00000000 0x0000001a 0x00000002 0x00000000 0x00000000 0x00000000 0x00000000
3fcbebd0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcbebf0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcbec10: 0x00000000 0x00000054 0x3fcbec70 0x3fcbec74 0x3fcbec80 0x3fcbec70 0x00000000 0x3fcbec30
3fcbec30: 0xffffffff 0x3fcbec30 0x3fcbec30 0x00000000 0x3fcbec44 0xffffffff 0x3fcbec44 0x3fcbec44
3fcbec50: 0x00000004 0x00000004 0x00000004 0x0001ffff 0x00000000 0x00000000 0x3fcbec10 0x00000010
3fcbec70: 0x3fcbeba4 0x3fcbebc0 0x3fcbebdc 0x3fcbebf8 0x00000054 0x3fcbecdc 0x3fcbece0 0x3fcbecec
3fcbec90: 0x3fcbecdc 0x00000000 0x3fcbec9c 0xffffffff 0x3fcbec9c 0x3fcbec9c 0x00000000 0x3fcbecb0
3fcbecb0: 0xffffffff 0x3fcbecb0 0x3fcbecb0 0x00000000 0x00000004 0x00000004 0x0001ffff 0x00000000
3fcbecd0: 0x00000019 0x3fcbec7c 0x00000010 0x3fcbeba4 0x3fcb5294 0x3fcafc40 0x3fcbecd4 0x00000054
3fcbecf0: 0x3fcbed48 0x3fcbed4c 0x3fcbed58 0x3fcbed48 0x00000000 0x3fcbed08 0xffffffff 0x3fcbed08
3fcbed10: 0x3fcbed08 0x00000000 0x3fcbed1c 0xffffffff 0x3fcbed1c 0x3fcbed1c 0x00000000 0x00000004
3fcbed30: 0x00000004 0x0001ffff 0x00000000 0x00000000 0x3fcbece8 0x00000010 0x3fcbeba4 0x3fcb5294

ELF file SHA256: 313fa59c2

Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xe (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380702
0x40380702: esp_restart_noos at D:/_00SDK/Espressif/frameworks/esp-idf-v5.3/components/esp_system/port/soc/esp32c3/system_internal.c:110

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1188
load:0x403cc710,len:0x8d4
load:0x403ce710,len:0x2c8c
entry 0x403cc710
I (235) cpu_start: Unicore app
I (243) cpu_start: Pro cpu start user code
I (244) cpu_start: cpu freq: 160000000 Hz
I (244) app_init: Application information:
I (244) app_init: Project name: FeaturedFreeRTOSIoTIntegration
I (244) app_init: App version: v202212.00-93-g87cc57a-dirty
I (244) app_init: Compile time: Jul 29 2024 11:46:27
I (244) app_init: ELF file SHA256: 313fa59c2...
I (245) app_init: ESP-IDF: v5.3-dirty
I (245) efuse_init: Min chip rev: v0.3
I (245) efuse_init: Max chip rev: v1.99
I (245) efuse_init: Chip rev: v0.4
I (245) heap_init: Initializing. RAM available for dynamic allocation:
I (245) heap_init: At 3FCB5280 len 0000AD80 (43 KiB): RAM
I (245) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (246) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (246) heap_init: At 50000200 len 00001DE8 (7 KiB): RTCRAM
I (247) spi_flash: detected chip: generic
I (247) spi_flash: flash io: dio
I (248) sleep: Configure to isolate all GPIO pins in sleep state
I (248) sleep: Enable automatic switching of GPIO sleep configuration
I (248) coexist: coex firmware version: dab85ae96
I (249) coexist: coexist rom version 9387209
I (249) main_task: Started on CPU0
I (249) main_task: Calling app_main()
I (249) esp_secure_cert: Pre-provisioned partition information:
I (249) esp_secure_cert: partition format: CUST_FLASH, partition name: esp_secure_cert
W (249) mmap: paddr block is mapped already, vaddr_start: 0x3c120000, size: 0x10000
W (249) mmap: paddr block is mapped already, vaddr_start: 0x3c120000, size: 0x10000
I (249) main:

Hi @JasonYan324,

CONFIG_LOG2_FILE_BLOCK_SIZE=12
CONFIG_MAX_NUM_BLOCKS_REQUEST=8
CONFIG_MAX_NUM_OTA_DATA_BUFFERS=8
CONFIG_ALLOW_DOWNGRADE=0
CONFIG_OTA_DATA_OVER_MQTT=y

Those macros are used in old OTA demo. It's replaced with newer one by #88.
Could you help try new OTA?
BTW, this issue is resolved by #99, I'll close this one.
If you have any new finding, please create a new issue then we can discuss in a clear thread.

Thank you.

This issue is resolved by #99.

abarke commented

Thanks @ActoryOu I pulled main and now it's working