MATLAB Answers

mpLAB dsPIC "Code generation information file does not exist." [SOLVED]

45 views (last 30 days)
delil codes
delil codes on 16 Jun 2021
Answered: Lubin Kerhuel on 16 Jun 2021
why am i getting this error?
Microchip Model Check before compilation
Warning: Unable to remove spaces from file path 'E:\Program Files\Microchip\xc16\v1.70'. Spaces in build-related folder paths can cause the build process to fail. For more information, see Build Process Support for Folder Names with Spaces or Special Characters. [23 similar]
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: E:\calismalar\matlab_rtc_fuzzy\u1_hello_world\u1_hello_world.X
### Invoking Target Language Compiler on u1_hello_world.rtw
### Using System Target File: C:\Users\degir\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\blocks\MCHP_dsPIC_stf.tlc
### Loading TLC function libraries
### Generating TLC interface API for custom data
.
### Initial pass through model to cache user defined code
.
### Caching model source code
### Writing main
### Writing MCHP_modelInclude.h
.
--- Single Tasking implementation ---
.
### Writing header file u1_hello_world_types.h
### Writing header file u1_hello_world.h
### Writing header file rtwtypes.h
.
### Writing source file u1_hello_world.c
### Writing header file u1_hello_world_private.h
### Writing header file rtmodel.h
### Writing source file u1_hello_world_main.c
### TLC code generation complete.
### Generating TLC interface API.
.Compile with DFP:
E:\Program Files\Microchip\MPLABX\v5.50\packs\Microchip\dsPIC33F-GP-MC_DFP\1.3.64\xc16
### MPLAB X project information extracted from buildInfo structure.
### MPLAB X project created.
.
### Processing Template Makefile: C:\Users\degir\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\MPLAB Device Blocks for Simulink\mchp\MCHP_dsPIC.tmf
COMPILATION using 9 thread.
### Created makefile E:\calismalar\matlab_rtc_fuzzy\u1_hello_world\u1_hello_world.X\u1_hello_world.mk
### Building u1_hello_world: "E:\calismalar\matlab_rtc_fuzzy\u1_hello_world\u1_hello_world.X\u1_hello_world.bat"
E:\calismalar\matlab_rtc_fuzzy\u1_hello_world\u1_hello_world.X>"E:\Program Files\Polyspace\R2021a\bin\win64\gmake" -f u1_hello_world.mk MATLAB_ROOT= ALT_MATLAB_ROOT= MATLAB_BIN= ALT_MATLAB_BIN= GENERATE_ASAP2=0 MCHP_AUTO_FLASH=0 MCHP_MULTITHREAD_COMPILATION=1 LinkWithMaster=0 OPTS="-DTID01EQ=0 -mdfp=E:\Program Files\Microchip\MPLABX\v5.50\packs\Microchip\dsPIC33F-GP-MC_DFP\1.3.64\xc16" -j 9 -l 9
Compiling: u1_hello_world_main.c
"E:/Program Files/Microchip/xc16/v1.70/bin/xc16-gcc.exe" -c -mcpu=33FJ32MC204 -omf=elf -O1 -mno-eds-warn -mconst-in-data -msmall-data -g -DTID01EQ=0 -mdfp=E:\Program Files\Microchip\MPLABX\v5.50\packs\Microchip\dsPIC33F-GP-MC_DFP\1.3.64\xc16 -I. -I".." -I"/rtw/c/ert" -I"/extern/include" -I"/simulink/include" -I"/rtw/c/src" -I"/rtw/c/src/ext_mode/common" -I"E:/calismalar/matlab_rtc_fuzzy/u1_hello_world" -I"E:/calismalar/matlab_rtc_fuzzy/u1_hello_world/u1_hello_world.X" -I"/extern/include" -I"/simulink/include" -I"/rtw/c/src" -I"/rtw/c/src/ext_mode/common" -I"/rtw/c/ert" u1_hello_world_main.c -o u1_hello_world_main.o
Compiling: u1_hello_world.c
"E:/Program Files/Microchip/xc16/v1.70/bin/xc16-gcc.exe" -c -mcpu=33FJ32MC204 -omf=elf -O1 -mno-eds-warn -mconst-in-data -msmall-data -g -DTID01EQ=0 -mdfp=E:\Program Files\Microchip\MPLABX\v5.50\packs\Microchip\dsPIC33F-GP-MC_DFP\1.3.64\xc16 -I. -I".." -I"/rtw/c/ert" -I"/extern/include" -I"/simulink/include" -I"/rtw/c/src" -I"/rtw/c/src/ext_mode/common" -I"E:/calismalar/matlab_rtc_fuzzy/u1_hello_world" -I"E:/calismalar/matlab_rtc_fuzzy/u1_hello_world/u1_hello_world.X" -I"/extern/include" -I"/simulink/include" -I"/rtw/c/src" -I"/rtw/c/src/ext_mode/common" -I"/rtw/c/ert" u1_hello_world.c -o u1_hello_world.o
elf-cc1.exe: warning: Could not open resource file: E:\Program/bin/c30_device.info
elf-cc1.exe: error: Invalid -mcpu option. CPU 33FJ32MC204 not recognized.
elf-cc1.exe: warning: Could not open resource file: E:\Program/bin/c30_device.info
elf-cc1.exe: error: Invalid -mcpu option. CPU 33FJ32MC204 not recognized.
elf-gcc.exe: Files\Microchip\MPLABX\v5.50\packs\Microchip\dsPIC33F-GP-MC_DFP\1.3.64\xc16: No such file or directory
elf-gcc.exe: Files\Microchip\MPLABX\v5.50\packs\Microchip\dsPIC33F-GP-MC_DFP\1.3.64\xc16: No such file or directory
gmake: *** [u1_hello_world_main.o] Error 255
gmake: *** Waiting for unfinished jobs....
gmake: *** [u1_hello_world.o] Error 255
### Build procedure for model: 'u1_hello_world' aborted due to an error.
Cannot propose to program chip from Matlab: Either file u1_hello_world.hex 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: u1_hello_world.X then select the project folder
-----------------------------------------------------------------------------------------
***** Error detected. Links above are provided for debug purpose only (.elf file might not be current).
Build Summary 1
Elapsed: 0.11 sec
Top model targets built:
Model Action Rebuild Reason
==========================================================================
u1_hello_world Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 40.913s
Error(s) encountered while building "u1_hello_world"
Simulink generated c code but not .hex.

Answers (2)

delil codes
delil codes on 16 Jun 2021
I solved the problem. You need to set "Device Family Pack" to "from compiler" ;

Lubin Kerhuel
Lubin Kerhuel on 16 Jun 2021
Hi Delil
Some path get shortened to their 8.3 short compatible name to avoid potential issues with space or special characters which might cause problem with one of the tool used.
On some drive setup (or windows setup ?), the 8.3 compatibility name is not available ; I suspect this is the case here.
Could you try the instruction: RTW.transformPaths('E:\Program Files\Microchip\xc16\v1.70') and see if you get a shortened "8.3" path ?
If 8.3 compatibility name is not available, you might encounter issues when enabling more features.
Lubin

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!