Forums » Req. WJ2(ESP32) support »
Not able to build a simulink model for ESP32
Added by Marco Cini 9 months ago
Hello,
I am new in this comunity and in the usage of WJ2 for ESP32.
I am trying to build a Simulink model that contain only a digital port write ad pulse generator for LED blinking function.
I installed all the software reported in https://waijung2-doc.aimagin.com/system-requirements.html but it seems that something it is still not working.
Full diagnositc report is attached.
Can anyone elp me with this issue?
ESPtest.txt | ESPtest.txt | 103 KB |
Replies (11)
RE: Not able to build a simulink model for ESP32 - Added by Parth Maheshwari (พาร์ท) 9 months ago
Hi Marco,
Thank you for reaching out.
I have checked the error and it seems to be related to the generated C code. I would need to see the the generated project folder. Could you please attach that?
Thank you.
Sincere regards,
Parth
RE: Not able to build a simulink model for ESP32 - Added by Marco Cini 9 months ago
Hi Parth,
thank you for your quick answer. It is very appreciated!
Attacched here you find all the autogerated files and the simulink model.
Best regards,
Marco Cini
ESPtest_esp32.zip | ESPtest_esp32.zip | 30.4 MB |
RE: Not able to build a simulink model for ESP32 - Added by Parth Maheshwari (พาร์ท) 9 months ago
Hi Marco,
Thank you for your patience.
We have checked and it seems like some files that are normally present during code generation are missing. This may well be due to the MATLAB version you are using, which is R2023b.
There may be a possibility that the core of MATLAB R2023b was updated, and we have tested the working of our software up to R2022b only.
If you have R2022b, please try with that. It will also make it easier for us to support you if you are using a MATLAB version that we are currently running or an older version than us, as we have tested our software with those versions.
Sometimes newer MATLAB versions create issues which we can't always solve immediately and it may take us some time to get back to you.
Sincere regards,
Parth
RE: Not able to build a simulink model for ESP32 - Added by Marco Cini 9 months ago
Hi Parth,
thank you for the support, I installed Matlab22b and now I am able to build and deploy my model.
For the sake of curiosity, do you think you will debug Waijoung2 even for Matlab releases newer than 2022b?
Thank you again,
Marco Cini
RE: Not able to build a simulink model for ESP32 - Added by Parth Maheshwari (พาร์ท) 9 months ago
At the moment it is not on our roadmap.
Glad it is working for you now.
Sincere regards,
Parth
RE: Not able to build a simulink model for ESP32 - Added by Marco Cini 6 months ago
Hi,
I saw that there is a new patch to let WJ2 be compatible with Matlab versions from 2023b and later.
I tried to follow the steps listed at the link [[https://waijung2-doc.aimagin.com/patch-files.html]] using Matlab 2024a but I got the same error as before.
Compiled code attached.
It could be useful to have a WJ2 compatible even with newer Matlab versions.
Please, let me know something about it.
Marco
RE: Not able to build a simulink model for ESP32 - Added by Parth Maheshwari (พาร์ท) 6 months ago
Hi Marco,
May I please know which error you are referring to when trying to install the patch?
Sincere regards,
Parth
RE: Not able to build a simulink model for ESP32 - Added by Marco Cini 6 months ago
Hi Parth,
I am getting the error once I try to build a model.
The error is the same as the one shown in the first message. To be clear I report here a copy:
Thenk you in advance,
Marco
RE: Not able to build a simulink model for ESP32 - Added by Parth Maheshwari (พาร์ท) 6 months ago
Hi Marco,
After applying the patch, please try the following:
1) Open a new Simulink model.
2) Import a new Waijung 2 Target Setup block.
3) Copy all the blocks (except the target setup block) from the old model.
4) Compile.
Sincere regards,
Parth
RE: Not able to build a simulink model for ESP32 - Added by Marco Cini 6 months ago
Hi Parth,
I tried to execute again all the steps for the patch installation, including the last one mentioned by you, now it works fine.
Thank you!
RE: Not able to build a simulink model for ESP32 - Added by Marco Cini 6 months ago
Investigating beter this new patch I have a further question: are you sure that even "esp32_target_setup_callback.p" need to be replaced?
Is it possible that repleacing this file I get "Target setup block" that jumps back from v24.1 to v23.5 with the system that stops to work properly?