Project

General

Profile

Error: Please refer the log data above

Added by MARINA MARFIL about 2 years ago

Hello,
I'm trying to compile my program but i get the following error: An error occurred in Auto compile and download process. Please refer the log data above. But i don't know how to solve it.
what i am trying to compile is a program that generate 2 PWM signal to control a DC motor.
I attach the program (CntrlVelMotor.slx).
How i have configurated the control blocks is like this:



I am using the driver L9110 2-Chanel motor driver and the target LILYGO TTGO T7 v1.3 mini 32 ESP32.
Thank
Marina


Replies (5)

RE: Error: Please refer the log data above - Added by Krisada Sangpetchsong (เอม) about 2 years ago

Could you please share the build status message with the error message?

Thank you.

RE: Error: Please refer the log data above - Added by MARINA MARFIL about 2 years ago

of course, this the build status>
Waijung 2: System information
Computer: PCWIN64
Operating System: Microsoft Windows 10 Home
Matlab: 9.9.0.1495850 (R2020b) Update 1
Waijung 2 version: 22.2c
Waijung 2 root: C:\waijung2_22.2c\waijung2
Waijung 2 System Target File: esp32.tlc
buildopt =
'Deploy to hardware'
Waijung 2: 'RTWVerbose' is: 'on'
Waijung 2: SimulationMode is: 'normal'
Waijung 2: Removing remaing source files from previous build
  1. Starting build procedure for: CntrlVelMotor
  2. Generating code and artifacts to 'Model specific' folder structure
  3. Generating code into build folder: C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32
    The model reference sample time inheritance rule for block 'CntrlVelMotor/MCPWM Control' is not set and the model is sample time independent. The generated code from the block might produce incorrect results if it is referenced by a Model block. For S-functions, specify the model reference sample time inheritance rule through the ssSetModelReferenceSampleTimeInheritanceRule macro. You can suppress the diagnostic by setting Unspecified inheritability of sample time to 'none'. [4 similar]
    Component:Simulink | Category:Block warning
  4. Invoking Target Language Compiler on CntrlVelMotor.rtw
  5. Using System Target File: C:\waijung2_22.2c\waijung2\targets\esp32\esp32.tlc
  6. Loading TLC function libraries
  7. Generating TLC interface API for custom data
    .
  8. Initial pass through model to cache user defined code
    .
  9. Caching model source code ### Writing header file CntrlVelMotor_types.h
    . ### Writing header file waijung2_hwdrvlib.h ### Writing source file waijung2_hwdrvlib.c ### Writing header file CntrlVelMotor.h ### Writing header file rtwtypes.h ### Writing source file CntrlVelMotor.c
    . ### Writing header file CntrlVelMotor_private.h ### Writing header file rtmodel.h ### Writing source file ert_main.c
  10. TLC code generation complete.
    .
  11. Processing Template Makefile: C:\waijung2_22.2c\waijung2\targets\esp32\src\esp32.tmf
    Warning: The following preprocessor macros
    MODEL_HAS_DYNAMICALLY_LOADED_SFCNS
    are specified in the component's build information (RTW.BuildInfo) but the specified template makefile
    C:\waijung2_22.2c\waijung2\targets\esp32\src\esp32.tmf
    does not contain the token |>DEFINES_OTHER<|. [3 similar]
  12. Created makefile C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32\CntrlVelMotor.mk
  13. Building CntrlVelMotor: .\CntrlVelMotor.bat

C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32>set MATLAB=C:\Program Files\MATLAB\R2020

C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32>"C:\Program Files\MATLAB\R2020\bin\win64\gmake" -f CntrlVelMotor.mk GENERATE_ASAP2=0 OPTS="-DTID01EQ=0"
  1. BUILD_MODE : real_time
  2. PRODUCT : CntrlVelMotor.out
  3. SHRLIBTARGET : 0
  4. MODULES : waijung2_hwdrvlib.c
  5. MODELREF_TARGET_TYPE : NONE
  6. MAKEFILEBUILDER_TGT : 0
  7. STANDALONE_SUPPRESS_EXE : 0
  8. Source waijung2_hwdrvlib.c done
  9. Source CntrlVelMotor.c done
  10. Ending CntrlVelMotor.out real_time
  11. Created CntrlVelMotor.out successfully (or it was already up to date)
  12. Successful completion of build procedure for: CntrlVelMotor
    Waijung 2: Post processing started.
    Waijung 2: Deleting pre-built src files.
    Waijung 2: Copying required header and source files to the target build directory.
    1. wj2_blockref checked
      Waijung 2: Auto compile and download process started
      [1/11] Performing build step for 'bootloader'
      [1/1] cmd.exe /C "cd /D C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32_build_system\build\bootloader\esp-idf\esptool_py && C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/bootloader/bootloader.bin"
      Bootloader binary size 0x62d0 bytes. 0xd30 bytes (12%) free.
      [2/9] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/CntrlVelMotor.c.obj
      [3/9] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/waijung2_hwdrvlib.c.obj
      [4/9] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/ert_main.c.obj
      [5/9] Linking C static library esp-idf\main\libmain.a
      [6/9] Generating ld/sections.ld
      [7/9] Linking CXX executable waijung2_esp32.elf
      [8/9] Generating binary image from built executable
      esptool.py v3.2-dev
      Merged 2 ELF sections
      Generated C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/waijung2_esp32.bin
      [9/9] cmd.exe /C "cd /D C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32_build_system\build\esp-idf\esptool_py && C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/partition_table/partition-table.bin C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/waijung2_esp32.bin"
      waijung2_esp32.bin binary size 0x2b5d0 bytes. Smallest app partition is 0x200000 bytes. 0x1d4a30 bytes (92%) free.
      Executing action: all (aliases: build)
      Running ninja in directory c:\users\marina\desktop\universidad\tfg_no\programassimulink\control_vel_motor\cntrlvelmotor_esp32_build_system\build
      Executing "ninja all"...
Project build complete. To flash, run this command:
C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe ..\..\..\..\..\..\..\..\waijung2_22.2c\waijung2\targets\esp32\setup\esp_idf\components\esptool_py\esptool\esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\waijung2_esp32.bin
or run 'idf.py -p (PORT) flash'
Waijung 2: Downloading to the target
[1/5] cmd.exe /C "cd /D C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32_build_system\build\esp-idf\esptool_py && C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/partition_table/partition-table.bin C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/waijung2_esp32.bin"
waijung2_esp32.bin binary size 0x2b5d0 bytes. Smallest app partition is 0x200000 bytes. 0x1d4a30 bytes (92%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\MARINA\Desktop\UNIVERSIDAD\TFG_NO\ProgramasSimulink\Control_Vel_Motor\CntrlVelMotor_esp32_build_system\build\bootloader\esp-idf\esptool_py && C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build/bootloader/bootloader.bin"
Bootloader binary size 0x62d0 bytes. 0xd30 bytes (12%) free.
[2/3] cmd.exe /C "cd /D C:\waijung2_22.2c\waijung2\targets\esp32\setup\esp_idf\components\esptool_py && C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\tools\cmake\3.20.3\bin\cmake.exe -D IDF_PATH="C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf" -D SERIAL_TOOL="C:/waijung2_22.2c/waijung2/targets/esp32/setup/.espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build" -P C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/esptool_py/run_serial_tool.cmake"
esptool.py esp32 -p COM4 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 bootloader/bootloader.bin 0x10000 waijung2_esp32.bin 0x8000 partition_table/partition-table.bin
esptool.py v3.2-dev
Serial port COM4
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:7f:99:5d
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x0003bfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 25296 bytes to 15810...
Writing at 0x00001000... (100 )
Wrote 25296 bytes (15810 compressed) at 0x00001000 in 0.8 seconds (effective 246.5 kbit/s)...
File md5: 6c070f778874e7fd804e7af1d57fb07f
Flash md5: 06c727f4f6c6632d69af40b2191e4678
MD5 of 0xFF is e998e7e2c97b4aeab24c2414cc95ecf3
A fatal error occurred: MD5 of file does not match data in flash!
CMake Error at run_serial_tool.cmake:56 (message):
C:/waijung2_22.2c/waijung2/targets/esp32/setup/.espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe
C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/esptool_py/esptool/esptool.py
--chip esp32 failed
FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\waijung2_22.2c\waijung2\targets\esp32\setup\esp_idf\components\esptool_py &x%x
C:\waijung2_22.2c\waijung2\targets\esp32\setup\.espressif\tools\cmake\3.20.3\bin\cmake.exe -D IDF_PATH="C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf" -D SERIAL_TOOL="C:/waijung2_22.2c/waijung2/targets/esp32/setup/.espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Users/MARINA/Desktop/UNIVERSIDAD/TFG_NO/ProgramasSimulink/Control_Vel_Motor/CntrlVelMotor_esp32_build_system/build" -P C:/waijung2_22.2c/waijung2/targets/esp32/setup/esp_idf/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Executing action: flash
Running ninja in directory c:\users\marina\desktop\universidad\tfg_no\programassimulink\control_vel_motor\cntrlvelmotor_esp32_build_system\build
Executing "ninja flash"...
  1. Build procedure for CntrlVelMotor aborted due to an error.
    Build Summary 1
    Elapsed: 0.17 sec
    Top model targets built:

Model Action Rebuild Reason ========================================================
CntrlVelMotor Failed CntrlVelMotor.c does not exist.

0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 44.049s
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

RE: Error: Please refer the log data above - Added by Dhanika Mahipala (ดานิก้า) about 2 years ago

Hello Marina,

Thank you for reaching out and using Waijung 2 block set. There is nothing wrong with your model or the generated code. I was able to compile and download your model to an ESP32 board. However, the ESP32 that I used is from a different manufacturer as we do not have your exact model at the moment.

When looking at your build log, it seems to me that your error occurs while flashing: " A fatal error occurred: MD5 of file does not match data in flash! "

Have you ever managed to flash a program to your ESP32 (LILYGO TTGO T7 v1.3 mini 32 ESP32) using Waijung 2 or even directly using ESP-IDF before? Have you tried the model you have attached with an ESP32 from a different manufacturer?

Best Regards,
Dhanika

RE: Error: Please refer the log data above - Added by MARINA MARFIL almost 2 years ago

Hello
I have managed to flash some programs before that program, and all compiled ok. Even this program compiled ok at the beginning but the error I have asked you appreared another day when i wanted to try again.
I have no tried the model with an ESP32 from a different manufactures because i have only that ESP32 from LILYGO.
Thanks
Marina

RE: Error: Please refer the log data above - Added by Dhanika Mahipala (ดานิก้า) almost 2 years ago

Hello Marina,

At the moment we cannot reproduce your error on our end. We will try again after acquiring the exact hardware board which you are using. Until then please try the following,
  • Delete all the build folders and do a fresh build.
  • Try the Simulink model you attached with an ESP32 from a different manufacturer.

Kind Regards,
Dhanika

    (1-5/5)