Protected AUTOSAR models code generation issue
15 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I need to protect some models I created before sharing them. They are configured as AUTOSAR Software Components (Code generation target is "autosar.tlc").
I created a referenced model and exported it to Protected Model with this configuration:
- Simulate (without password)
- Use generated code (without password)
- Code interface: Model reference
- Content type: obscured code
The model correctly runs and simulates. I have an issue when I try to generate the code:
=== Build (Elapsed: 6 sec) ===
Error:"C:/PROGRA~1/MATLAB/R2017b/sys/lcc64/lcc64/bin/lcc64" -c -w -noregistrylookup -nodeclspec -IC:/PROGRA~1/MATLAB/R2017b/sys/lcc64/lcc64/include64 -DSLMSG_ALLOW_SYSTEM_ALLOC -DMODEL=Subsystem_PROTECTED -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DSLMSG_ALLOW_SYSTEM_ALLOC -DMODEL=Subsystem_PROTECTED -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/taglico001/MATLAB/MAL/testProtected/Generated -IC:/PROGRA~1/MATLAB/R2017b/simulink/include/sf_runtime -IC:/Users/taglico001/MATLAB/MAL/testProtected/Generated/slprj/autosar/Subsystem_PROTECTED -IC:/Users/taglico001/MATLAB/MAL/testProtected/Controller -IC:/PROGRA~1/MATLAB/R2017b/extern/include -IC:/PROGRA~1/MATLAB/R2017b/simulink/include -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/ert -IC:/Users/taglico001/MATLAB/testProtected/Generated/slprj/autosar/_sharedutils -Fo"Subsystem_PROTECTED.obj" "Subsystem_PROTECTED.c"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:30 subsystem_protected.c:2 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:33 subsystem_protected.c:2 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:35 subsystem_protected.c:2 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:5 subsystem_protected.c:2 Could not find include file "Rte_Type.h"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:38 subsystem_protected.c:2 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:40 subsystem_protected.c:2 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.h:43 subsystem_protected.c:2 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: subsystem_protected.c:26 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: subsystem_protected.c:29 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: subsystem_protected.c:31 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: subsystem_protected.c:34 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: subsystem_protected.c:36 Could not find include file "Subsystem_PROTECTED_MemMap.h"
cpp: subsystem_protected.c:39 Could not find include file "Subsystem_PROTECTED_MemMap.h"
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 25 syntax error; found `*' expecting ')'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 25 skipping `*' `gcfhaovzd5_prot' `,'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 25 syntax error; found `const' expecting '{'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 Syntax error; missing semicolon before `*'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 undeclared identifier 'cwaikmsh4x_prot'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 'cwaikmsh4x_prot' is not a pointer
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 undeclared identifier 'ly0u5eogft_prot'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 Syntax error; missing semicolon before `)'
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 illegal statement termination
Error c:\users\taglico001\matlab\testprotected\generated\slprj\autosar\subsystem_protected\subsystem_protected.c: subsystem_protected.h: 26 skipping `)'
Error subsystem_protected.c: 26 redeclaration of local variable 'pe3zclz4ejb_prot'
Error subsystem_protected.h: 30 Previous definition of 'pe3zclz4ejb_prot' here
Error subsystem_protected.c: 29 redeclaration of local variable 'hykxnl5x2fa_prot'
Error subsystem_protected.h: 33 Previous definition of 'hykxnl5x2fa_prot' here
Error subsystem_protected.c: 32 redeclaration of local variable 'd4l0zhhso3y_prot'
Error subsystem_protected.h: 36 Previous definition of 'd4l0zhhso3y_prot' here
Error subsystem_protected.c: 34 syntax error; found `*' expecting ')'
Error subsystem_protected.c: 34 skipping `*' `hd01imjmrd_prot' `,'
Error subsystem_protected.c: 34 Syntax error; missing semicolon before `const'
Error subsystem_protected.c: 35 redeclaration of local variable 'NIgnitionStatus'
Error subsystem_protected.h: 25 too many errors
gmake: *** [Subsystem_PROTECTED.obj] Error 1
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
Error:Error(s) encountered while building "Subsystem_PROTECTED":
### Failed to generate all binary outputs.
I tried to include in the generated directory the "Rte_type.h" file that is created from the unprotected model, but I don't know how to figure it out with the "Subsystem_PROTECTED_MemMap.h" file.
How can I fix the code generation?
Thank you,
Costantino
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で AUTOSAR Blockset についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!