Forums » Req. WJ2(ESP32) support »
Incomplete CMakeLists.txt
Added by Supachai Vorapojpisut about 4 years ago
Procedure¶
- Create a Simulink model named "blink" for blinking LED
- Use Build button to generate code
- Run Visual Studio Code with esp-idf extension
- Use menu File > Open Folder to open blink_esp32_build_system folder
- Use F1 > ESP-IDF: Build your project to build -> compilation error
- 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 (จันทิมา) about 4 years 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 about 4 years 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 (จันทิมา) about 4 years 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.