Project

General

Profile

Unable to Compile and download to ESP32

Added by Jegan Mani over 2 years ago

Hi,

I am trying to use the Waijung 2 target support package and I am not able to compile and download it to the board.

Please refer to the log generated in Simulink's diagnostic viewer. I have also attached the model file along with the generated code, please let me know if anything else is required.
oping to get the issue resolved soon.

search
  1. Starting build procedure for: ESP32_test
  2. Generating code and artifacts to 'Model specific' folder structure
  3. Generating code into build folder: E:\HAM\ESP32_Test\ESP32_test_esp32
  4. Invoking Target Language Compiler on ESP32_test.rtw
  5. Using System Target File: C:\Users\Rajana\Downloads\MathWorks\SupportPackages\R2021a\archives\win64\hardwaresupportpkgs\waijung2_20.11b\targets\esp32\esp32.tlc
  6. Loading TLC function libraries
  7. Initial pass through model to cache user defined code
  8. Caching model source code ### Writing header file ESP32_test_types.h ### Writing header file waijung2_hwdrvlib.h ### Writing source file waijung2_hwdrvlib.c ### Writing header file ESP32_test.h
    . ### Writing header file rtwtypes.h ### Writing source file ESP32_test.c ### Writing header file ESP32_test_private.h ### Writing header file rtmodel.h
    . ### Writing source file ert_main.c ### TLC code generation complete.
  9. Successful completion of code generation for: ESP32_test
    Waijung 2: Post processing started.
    Waijung 2: Copying required header and source files to the target build directory.
    Waijung 2: Generating sdkconfig file
    Python requirements from C:/Users/Rajana/Downloads/MathWorks/SupportPackages/R2021a/archives/win64/hardwaresupportpkgs/waijung2_20.11b/targets/esp32/setup/esp-idf\requirements.txt are satisfied.
    DEFCONFIG
    GENCONFIG
    Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER.
    App "waijung2_esp32" version: 1
    Waijung 2: sdkconfig file is generated
    Waijung 2: Auto compile and download process started
    Toolchain path: /xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
    Toolchain version: esp-2019r2
    Compiler version: 8.2.0
    Python requirements from C:/Users/Rajana/Downloads/MathWorks/SupportPackages/R2021a/archives/win64/hardwaresupportpkgs/waijung2_20.11b/targets/esp32/setup/esp-idf\requirements.txt are satisfied.
    GENCONFIG
    Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER.
    App "waijung2_esp32" version: 1
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_trace/heap_trace_tohost.o
    AR /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/acoustic_algorithm/libacoustic_algorithm.a
    Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER.
    CXX /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/asio/asio/asio/src/asio.o
    Python requirements from C:/Users/Rajana/Downloads/MathWorks/SupportPackages/R2021a/archives/win64/hardwaresupportpkgs/waijung2_20.11b/targets/esp32/setup/esp-idf\requirements.txt are satisfied.
    App "waijung2_esp32" version: 1
    In file included from C:/Users/Rajana/Downloads/MathWorks/SupportPackages/R2021a/archives/win64/hardwaresupportpkgs/waijung2_20.11b/targets/esp32/setup/esp-idf/components/asio/asio/asio/include/asio/impl/error.ipp:19,
    from C:/Users/Rajana/Downloads/MathWorks/SupportPackages/R2021a/archives/win64/hardwaresupportpkgs/waijung2_20.11b/targets/esp32/setup/esp-idf/components/asio/asio/asio/include/asio/impl/src.hpp:22,
    from C:/Users/Rajana/Downloads/MathWorks/SupportPackages/R2021a/archives/win64/hardwaresupportpkgs/waijung2_20.11b/targets/esp32/setup/esp-idf/components/asio/asio/asio/src/asio.cpp:11:
    c:\users\rajana\downloads\mathworks\supportpackages\r2021a\archives\win64\hardwaresupportpkgs\waijung2_20.11b\targets\esp32\setup\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\string:38:10: fatal error: bits/c++config.h: No such file or directory
    #include <bits/c++config.h>
    ^~~~~~~~~~~~~~~~
    compilation terminated.
    make1: * [/esp-idf/make/component_wrapper.mk:292: asio/asio/src/asio.o] Error 1
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_update/esp_app_desc.o
    make:
    [C:\Users\Rajana\Downloads\MathWorks\SupportPackages\R2021a\archives\win64\hardwaresupportpkgs\waijung2_20.11b\targets\esp32\setup\esp-idf/make/project.mk:590: component-asio-build] Error 2
    make: *
    * Waiting for unfinished jobs....
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_trace/app_trace.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_trace/host_file_io.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/bootloader_random.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_update/esp_ota_ops.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_trace/app_trace_util.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_trace/gcov/gcov_rtio.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/flash_encrypt.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/esp_image_format.o
    AR /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_trace/libapp_trace.a
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/flash_partitions.o
    AR /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/app_update/libapp_update.a
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/bootloader_flash_config.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/bootloader_clock.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/bootloader_common.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/bootloader_utility.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/flash_qio_mode.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/bootloader_flash.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/idf/bootloader_sha.o
    CC /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/src/idf/secure_boot_signatures.o
    AR /cygdrive/e/HAM/ESP32_Test/ESP32_test_esp32_build_system/build/bootloader_support/libbootloader_support.a
    CC build/bootloader/log/log.o
    CC build/bootloader/spi_flash/spi_flash_rom_patch.o
    CC build/bootloader/micro-ecc/micro-ecc/uECC.o
    CC build/bootloader/bootloader_support/src/bootloader_random.o
    CC build/bootloader/soc/esp32/emac_hal.o
    AR build/bootloader/log/liblog.a
    AR build/bootloader/spi_flash/libspi_flash.a
    CC build/bootloader/bootloader_support/src/flash_encrypt.o
    CC build/bootloader/main/bootloader_start.o
    CC build/bootloader/soc/esp32/rtc_clk.o
    AR build/bootloader/micro-ecc/libmicro-ecc.a
    CC build/bootloader/efuse/esp32/esp_efuse_table.o
    CC build/bootloader/bootloader_support/src/esp_image_format.o
    AR build/bootloader/main/libmain.a
    CC build/bootloader/bootloader_support/src/flash_partitions.o
    CC build/bootloader/soc/esp32/rtc_time.o
    CC build/bootloader/efuse/src/esp_efuse_fields.o
    CC build/bootloader/soc/esp32/rtc_sleep.o
    CC build/bootloader/bootloader_support/src/bootloader_flash_config.o
    CC build/bootloader/bootloader_support/src/bootloader_clock.o
    CC build/bootloader/soc/esp32/gpio_periph.o
    CC build/bootloader/efuse/src/esp_efuse_utility.o
    CC build/bootloader/soc/esp32/rtc_clk_init.o
    CC build/bootloader/soc/esp32/spi_periph.o
    CC build/bootloader/bootloader_support/src/bootloader_common.o
    CC build/bootloader/bootloader_support/src/bootloader_utility.o
    CC build/bootloader/efuse/src/esp_efuse_api.o
    CC build/bootloader/soc/esp32/rtc_init.o
    CC build/bootloader/soc/esp32/sdio_slave_periph.o
    CC build/bootloader/bootloader_support/src/bootloader_init.o
    CC build/bootloader/bootloader_support/src/flash_qio_mode.o
    AR build/bootloader/efuse/libefuse.a
    CC build/bootloader/soc/esp32/rtc_wdt.o
    CC build/bootloader/soc/esp32/sdmmc_periph.o
    CC build/bootloader/bootloader_support/src/bootloader_flash.o
    CC build/bootloader/bootloader_support/src/esp32/flash_encrypt.o
    CC build/bootloader/soc/esp32/cpu_util.o
    CC build/bootloader/soc/esp32/rtc_periph.o
    CC build/bootloader/bootloader_support/src/esp32/bootloader_sha.o
    CC build/bootloader/soc/esp32/rtc_pm.o
    CC build/bootloader/bootloader_support/src/esp32/secure_boot.o
    CC build/bootloader/bootloader_support/src/esp32/secure_boot_signatures.o
    CC build/bootloader/soc/esp32/soc_memory_layout.o
    CC build/bootloader/soc/src/soc_include_legacy_warn.o
    CC build/bootloader/soc/src/memory_layout_utils.o
    CC build/bootloader/soc/src/lldesc.o
    CC build/bootloader/soc/src/hal/spi_hal.o
    CC build/bootloader/soc/src/hal/spi_hal_iram.o
    AR build/bootloader/bootloader_support/libbootloader_support.a
    CC build/bootloader/soc/src/hal/spi_flash_hal.o
    CC build/bootloader/soc/src/hal/spi_flash_hal_iram.o
    CC build/bootloader/soc/src/hal/spi_slave_hal.o
    CC build/bootloader/soc/src/hal/spi_slave_hal_iram.o
    AR build/bootloader/soc/libsoc.a
    LD build/bootloader/bootloader.elf
    esptool.py v2.8
  10. Build procedure for ESP32_test aborted due to an error.
    Build Summary 1
    Elapsed: 0.10 sec
    Top model targets built:
Initialize 1
12:01 PM Elapsed: 0.4 sec
Update Diagram
12:06 PM Elapsed: 1 sec
Model Save (untitled)
12:06 PM Elapsed: 0.751 sec
Build 2 1
12:06 PM Elapsed: 2:28 min
Top Model Build 1
Elapsed: 2:28 min
Waijung 2: System information
Computer: PCWIN64
Operating System: Microsoft Windows 10 Home
Matlab: 9.10.0.1602886 (R2021a)
Waijung 2 version: 20.11b
Waijung 2 root: C:\Users\Rajana\Downloads\MathWorks\SupportPackages\R2021a\archives\win64\hardwaresupportpkgs\waijung2_20.11b

Model Action Rebuild Reason ======================================================================
ESP32_test Failed Code generation information file does not exist.

0 of 1 models built (0 models already up to date)
Build duration: 0h 2m 28.4s
The call to esp32_make_rtw_hook, during the exit hook generated the following error:
An error occurred in Auto compile and download process. Please refer the log data above.

The build process will terminate as a result.
Caused by:
An error occurred in Auto compile and download process. Please refer the log data above.
Component: Simulink | Category: Block diagram error


Replies (1)

RE: Unable to Compile and download to ESP32 - Added by Chandima Jayaneththi (จันทิมา) over 2 years ago

Hello Jegan,

Thank you for using Waijung2.

It is not necessary to save the Waijung2 blockset inside the support packages directory in Matlab. So for a quick solution, could you please try uninstalling Waijung2 (by running uninstall_waijung2.m )and remove the waijung2_20.11b folder from hardwaresupportpkgs directory. Then get a fresh extract from waijung2_20.11b.7z and reinstall Waijung2 in different directory. This solution may help to resolve your issue. Let us know if it is not.

Regards,
Chandima

    (1-1/1)