Thanks for really fast response! I tried this new blockset and there are couple of things which might be just different compared to Zynq / Arm support packages. I'm just not sure what should happen and what is wrong or ok. These notes are just what are differences between different support pakcages.
1) Answering to originial question: now the model is translated and it could be flashed immedietely!
Earlier the model was not translated, but somehow if there was some files (elf or something) the script continued just with warnings. End result was that mcu was flashed with wrong model. I think that this could be changed with compiler or script settings to stop if warnings are shown. It's difficult to see if model is changed and it's not what you see on the pc screen. In this model I used the leds to observe if the newer is compiled or not. But both cases it was re-flashed.
2) If I change any parameter or for example manual switch state in the model, I have to save and close to simulink. Then again -> compile model -> and observe the behaviour.
If I don't close the model, the results will something like:
"### Build procedure for model: 'MCLV2_V' aborted due to an error.
Project root folder is incorrect. Cannot generate MPLAB X project.
Cannot propose to program chip from Matlab: Either file MCLV2_V.hex does not exist or MPLAB X API is not available on this system."
Compared to other blockset I haven't seen same behaviour. Is this just what needs to do or is this something else?
3) With fresh model when it's compiled, there will be available in blue text "ModelName.x" "then select the project folder."
If I click this, then MPLAB will open, but every file is in same folder/view. I was just thinking that is there a feature which will open MPLAB in a way that source c coude is correct folder and header files are in different folder in MPLAB. Or should I do this manually?
4) The model could be finally compiled and flashed to mcu, when running in the external mode. I could observe behaviour in scope window. But what is strange I could not change state for example manual switch in Simulink. The other blockset allows to change gains and switch, but this does not.
I can debug the communication in real osciloscope that communication behaves correctly. But why the manual switch state change is not allowed in external mode?
5) Finally I tried to go SIL mode. I did reset config and changed the parameter to SIL. Then re-opening the model.
When tried to compile the model I got the message:
### Processing Template Makefile: C:\...\mchp\MCHP_pic32.tmf
Error using setup_for_lcc (line 53)
No supported compiler detected. A compiler is required by some simulation modes and the build process. Install a supported compiler. For options, see https://www.mathworks.com/support/compilers.
After installing a supported compiler, restart MATLAB.
Is there some parameters which is just not correct?
What I can see with picInfo command is :
- Blockset in C:\..MPLAB Device Blocks for Simulink(2)
- Link to MPLAB X to program chip is Ok
1 Compiler(s) found for 16 bits chip:
- C:/Program Files (x86)/Microchip/xc16/v1.36
1 Compiler(s) found for 32 bits chip:
- C:/Program Files (x86)/Microchip/xc32/v2.20
Microchip Blockset 3.45.03 installed. See info and examples.
And PIL compiling is stopped for this message.
Best Regards Antti