Project

General

Profile

Incomplete CMakeLists.txt

Added by Supachai Vorapojpisut 7 months ago

Procedure

  1. Create a Simulink model named "blink" for blinking LED
  2. Use Build button to generate code
  3. Run Visual Studio Code with esp-idf extension
  4. Use menu File > Open Folder to open blink_esp32_build_system folder
  5. Use F1 > ESP-IDF: Build your project to build -> compilation error
  6. Modify main/CMakeLists.txt to add related source files
    set(COMPONENT_SRCS "ert_main.c blink.c waijung2_hwdrvlib.c")
    set(COMPONENT_ADD_INCLUDEDIRS "include")

Replies (3)

RE: Incomplete CMakeLists.txt - Added by Chandima Jayaneththi (จันทิมา) 7 months ago

You can follow Modify Simulink generated C code wiki page to manually flash the generated C code from Matlab Simulink.

RE: Incomplete CMakeLists.txt - Added by Supachai Vorapojpisut 7 months ago

Using VS Code with esp-idf extension is much more easier than your suggested method. I can edit, build and flash firmware without any command to remember. BTW, there is still a minor glitch of main/CMakeLists.txt with incomplete list of source files and include folder.

RE: Incomplete CMakeLists.txt - Added by Chandima Jayaneththi (จันทิมา) 7 months ago

We really appreciate your suggestion on manually flashing the firmware. We will look into those easy ways of flashing the ESP32 with the generated Simulink C code.

    (1-3/3)