Hi Lubin,
Thanks for the update. Yes, that made a major difference!
Build + compile times went from about ~3:40 to:
Single thread: 1:06
Multi thread: 1:17
The weird thing is, when running in multi thread mode, it seems to produce an error that is not seen in single thread mode. Please see diag output below.
Also, I tried to save the model with multithread and reopen it (to see if that made any difference in the compile times), but it would always open with single thread (even if it were saved in multi thread before).
Single thread diag window output:
### Code generation artifacts for 'Explorer1632_LCD' were unpacked from 'C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.slxc'.
Microchip Model Check before compilation
The value 'xc16 - v1.50' of the mask parameter 'COMP_LIST' for the block 'Explorer1632_LCD/Compiler Options' is not valid.
Component:Simulink | Category:Block warning
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
The model has 7 discrete rates, which is greater than the 6 discrete sample time colors available. The 6th and slower rates have been marked using the orange sample time color.
Component:Simulink | Category:Model warning
Parameter precision loss occurred for 'Gain' of 'Explorer1632_LCD/ADC 10bit-value to Voltage'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component:Simulink | Category:Block warning Suppress
### Generating code and artifacts to 'Model specific' folder structure
Code Generation 4 6
Elapsed: 38 sec
### Generating code into build folder: C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.X
The value 'xc16 - v1.50' of the mask parameter 'COMP_LIST' for the block 'Explorer1632_LCD/Compiler Options' is not valid.
Component:Simulink | Category:Block warning
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
The model has 7 discrete rates, which is greater than the 6 discrete sample time colors available. The 6th and slower rates have been marked using the orange sample time color.
Component:Simulink | Category:Model warning
Parameter precision loss occurred for 'Gain' of 'Explorer1632_LCD/ADC 10bit-value to Voltage'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component:Simulink | Category:Block warning Suppress
### Generated code for 'Explorer1632_LCD' is up to date because no structural, parameter or code replacement library changes were found.
Problem while Creating MPLAB project. MPLAB Project skipped.
.
### Processing Template Makefile: C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf
Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf. The variables are no longer required. You can remove the variables. [3 similar]
Component:Simulink | Category:Model warning
### C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.X\Explorer1632_LCD.mk which is generated from C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf is up to date
### Building Explorer1632_LCD: "C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.X\Explorer1632_LCD.bat" >> out.txt
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintMinutes':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:41:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintSeconds':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:49:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintVoltage':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:57:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintTemperature':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:69:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintCPU':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:78:5: warning: incompatible implicit declaration of built-in function 'sprintf'
Problem while Creating MPLAB project. MPLAB Project skipped.
-----------------------------------------------------------------------------------------
* Visit the Microchip Blockset Forum for any questions, issues, share tricks.
* Visit the Microchip Wiki for further informations and examples.
-----------------------------------------------------------------------------------------
* HTML report file: Explorer1632_LCD_codegen_rpt.html
-----------------------------------------------------------------------------------------
* MPLAB X project: Explorer1632_LCD.X then select the project folder
-----------------------------------------------------------------------------------------
* FLASH compiled model: Explorer1632_LCD.elf on chip 33FJ256GP710A
Flash after compilation: off switch: (on/off)
-----------------------------------------------------------------------------------------
### Successful completion of build procedure for model: Explorer1632_LCD
Build process completed successfully
Multi thread diag window output:
### Code generation artifacts for 'Explorer1632_LCD' were unpacked from 'C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.slxc'.
Microchip Model Check before compilation
The value 'xc16 - v1.50' of the mask parameter 'COMP_LIST' for the block 'Explorer1632_LCD/Compiler Options' is not valid.
Component:Simulink | Category:Block warning
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
The model has 7 discrete rates, which is greater than the 6 discrete sample time colors available. The 6th and slower rates have been marked using the orange sample time color.
Component:Simulink | Category:Model warning
Parameter precision loss occurred for 'Gain' of 'Explorer1632_LCD/ADC 10bit-value to Voltage'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component:Simulink | Category:Block warning Suppress
### Generating code and artifacts to 'Model specific' folder structure
Code Generation [5 filtered] [6 filtered]
Elapsed: 37 sec
### Generating code into build folder: C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.X
The value 'xc16 - v1.50' of the mask parameter 'COMP_LIST' for the block 'Explorer1632_LCD/Compiler Options' is not valid.
Component:Simulink | Category:Block warning
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
Warning: Parameter define as Input: minutes not found in Function declaration
Warning: Parameter value should be defined either as a block input or an output.
The model has 7 discrete rates, which is greater than the 6 discrete sample time colors available. The 6th and slower rates have been marked using the orange sample time color.
Component:Simulink | Category:Model warning
Parameter precision loss occurred for 'Gain' of 'Explorer1632_LCD/ADC 10bit-value to Voltage'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component:Simulink | Category:Block warning Suppress
### Invoking Target Language Compiler on Explorer1632_LCD.rtw
### Using System Target File: C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\blocks\MCHP_dsPIC_stf.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
...............................................................................
.................................
### Writing main
### Writing MCHP_modelInclude.h
.
--- Multi Tasking implementation (Treat each discrete rate as separate task)---
.
### Writing header file Explorer1632_LCD_types.h
### Writing header file Explorer1632_LCD.h
### Writing header file rtwtypes.h
### Writing source file Explorer1632_LCD.c
.
### Writing header file Explorer1632_LCD_private.h
### Writing source file Explorer1632_LCD_data.c
### Writing header file rtmodel.h
### Writing source file Explorer1632_LCD_main.c
### TLC code generation complete.
### Generating TLC interface API.
.................Problem while Creating MPLAB project. MPLAB Project skipped.
.
### Processing Template Makefile: C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf
Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf. The variables are no longer required. You can remove the variables. [3 similar]
Component:Simulink | Category:Model warning
COMPILATION using 9 thread.
### Creating C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.X\Explorer1632_LCD.mk from C:\Users\xxxxx\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf
### Building Explorer1632_LCD: "C:\Users\xxxxx\Desktop\MPLAB-Device-Blocks-for-Simulink-master\MCHP_examples\Explorer1632_LCD.X\Explorer1632_LCD.bat" >> out.txt
### Creating HTML report file Explorer1632_LCD_codegen_rpt.html
### Build procedure for model: 'Explorer1632_LCD' aborted due to an error.
Cannot propose to program chip from Matlab: Either file Explorer1632_LCD.elf does not exist or MPLAB X API is not available on this system.
* Visit the Microchip Blockset Forum for any questions, issues, share tricks.
* Visit the Microchip Wiki for further informations and examples.
-----------------------------------------------------------------------------------------
* MPLAB X project: Explorer1632_LCD.X then select the project folder
-----------------------------------------------------------------------------------------
***** Error detected. Links above are provided for debug purpose only (.elf file might not be current).
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintMinutes':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:41:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintSeconds':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:49:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintVoltage':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:57:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintTemperature':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:69:5: warning: incompatible implicit declaration of built-in function 'sprintf'
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c: In function 'PrintCPU':
C:/Users/xxxxx/Desktop/MPLAB-Device-Blocks-for-Simulink-master/MCHP_examples/clib/Explorer1332_LCD_customCFile.c:78:5: warning: incompatible implicit declaration of built-in function 'sprintf'
### Unable to find build success text: "+++ Created" in build log.
post edited by cooljustin - 2020/03/27 13:09:43