• AVR Freaks

Code generation issue with MATLAB R2014a

Author
gmillet
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2014/07/08 05:30:42
  • Location: France
  • Status: offline
2014/07/08 05:45:40 (permalink)
0

Code generation issue with MATLAB R2014a

Hello,
We tried to generate the code for a simple diagram (attached below) with MATLAB R2014a, Microchip toolbox v3.30, xc16 v1.21. It seems that main.c (here QEI1_main.c) is not generated, compared to a successful code generation on another platform.
 
### Generating code into build folder: C:\Users\Antoine\Documents\MATLAB\QEI1.X\src
### Invoking Target Language Compiler on QEI1.rtw
### Using System Target File: C:\Program Files (x86)\Microchip\MatlabTools\mchp\MCHP_dsPIC_stf.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file QEI1.h
### Writing header file QEI1_types.h
### Writing header file rtwtypes.h
### Writing source file QEI1.c
### Writing header file QEI1_private.h
### Writing header file rtmodel.h
### TLC code generation complete.
### Processing Template Makefile: C:\Program Files (x86)\Microchip\MatlabTools\mchp\MCHP_dsPIC.tmf
### QEI1.mk which is generated from C:\Program Files (x86)\Microchip\MatlabTools\mchp\MCHP_dsPIC.tmf is up to date
### Building QEI1: .\QEI1
C:\Users\Antoine\Documents\MATLAB\QEI1.X\src>"C:\Program Files\MATLAB\R2014a\bin\win64\gmake" -f QEI1.mk MULTI_INSTANCE_CODE=0 GENERATE_ASAP2=0 TMW_EXTMODE_TESTING=0 MCHP_AUTO_FLASH=0
xc16-gcc.exe -c -mcpu=33EP512MU810 -omf=elf -g -O3 -fschedule-insns -fschedule-insns2 -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2014a/simulink/include -IC:\PROGRA~1\MATLAB\R2014a/extern/include -IC:\PROGRA~1\MATLAB\R2014a/rtw/c/src -IC:\PROGRA~1\MATLAB\R2014a/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2014a/rtw/c/src/ext_mode/common -IC:\Users\Antoine\Documents\MATLAB\QEI1.X\src -IC:\Users\Antoine\Documents\MATLAB -IC:\PROGRA~2\MICROC~1\xc16\v1.21\include -IC:\PROGRA~2\MICROC~1\xc16\v1.21\support\dsPIC33E\h -IC:\PROGRA~2\MICROC~1\xc16\v1.21\support\generic\h -IC:\PROGRA~2\MICROC~1\xc16\v1.21\support\PERIPH~2 MCHP_UART1_Interrupt.c
Options have been disabled due to restricted license
Visit to purchase a new key.
MCHP_UART1_Interrupt.c: In function '_U1TXInterrupt':
MCHP_UART1_Interrupt.c:9:3: error: '_U1TXIF' undeclared (first use in this function)
MCHP_UART1_Interrupt.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
MCHP_UART1_Interrupt.c:10:11: error: 'U1STAbits' undeclared (first use in this function)
MCHP_UART1_Interrupt.c:12:5: error: 'U1TXREG' undeclared (first use in this function)
MCHP_UART1_Interrupt.c: In function '_U1RXInterrupt':
MCHP_UART1_Interrupt.c:22:3: error: '_U1RXIF' undeclared (first use in this function)
MCHP_UART1_Interrupt.c:23:10: error: 'U1STAbits' undeclared (first use in this function)
MCHP_UART1_Interrupt.c:25:60: error: 'U1RXREG' undeclared (first use in this function)
gmake: *** [MCHP_UART1_Interrupt.o] Error 255

 
Do you see where the problem comes from?
Best
#1
Lubin
Moderator
  • Total Posts : 352
  • Reward points : 5
  • Joined: 2007/03/31 07:38:15
  • Location: Bayonne, France
  • Status: offline
Re: Code generation issue with MATLAB R2014a 2014/07/08 15:26:45 (permalink)
0
 
The v3.30 blockset was released prior to Matlab 2014a and is unfortunately not compatible with this Matlab R2014a version. Matlab versions handled by the v3.30 are R2010a/b, R2011a/b, R2012a/b, and R2013a/b.
 
The next release v3.35 which will be released soon will handle the R2014a and hopefully next Matlab versions.
In the meantime, there is no workaround except running with an older Matlab version.
 
Let us know if this is a show stopper for you.
 
Lubin
 
#2
Jump to:
© 2019 APG vNext Commercial Version 4.5