S32M LIN Stack compilation errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32M LIN Stack compilation errors

Jump to solution
2,254 Views
hns80
Senior Contributor I

I am using S32DS 3.5 and S32M24 RTD 2.0.0 and installed the S32K1_S32M24X_LINSTACK_RTM_1_0_2_D2308_updatesite.zip.

I imported the master and slave examples, fixed the backslash problem in the mex file (<setting name="LDFRelativePath" value="src\LIN21.ldf"/>), and generated the configuration code.

Neither project will build.

The slave code has these errors:

Description Resource Path Location Type
'LinIf_Channel_State' undeclared (first use in this function) lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 520 C/C++ Problem
'LINIF_IDLE' undeclared (first use in this function); did you mean 'LINIF_CODE'? lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 520 C/C++ Problem
Field 'lin_baudrate_adjusted_flg' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 199 Semantic Error
Field 'lin_max_frame_res_timeout_val' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 193 Semantic Error
Field 'lin_protocol_state' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 172 Semantic Error
Field 'lin_protocol_state' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 438 Semantic Error
Field 'lin_protocol_state' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 443 Semantic Error
Field 'lin_protocol_state' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 488 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 128 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 146 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 176 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 181 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 302 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 411 Semantic Error
Field 'lin_virtual_interface' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 489 Semantic Error
Field 'max_idle_timeout_cnt' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 528 Semantic Error
Field 'response_buffer_ptr' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 443 Semantic Error
Field 'response_length' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 438 Semantic Error
implicit declaration of function 'OsIf_ResumeAllInterrupts' [-Werror=implicit-function-declaration] lin_commontl_proto.c /Lin_Master_S32M244_Example_DS/stacks/lin/src line 1241 C/C++ Problem
implicit declaration of function 'OsIf_ResumeAllInterrupts' [-Werror=implicit-function-declaration] lin_commontl_proto.c /Lin_Slave_S32M244_Example_DS/stacks/lin/src line 1241 C/C++ Problem
implicit declaration of function 'OsIf_SuspendAllInterrupts' [-Werror=implicit-function-declaration] lin_commontl_proto.c /Lin_Master_S32M244_Example_DS/stacks/lin/src line 1172 C/C++ Problem
implicit declaration of function 'OsIf_SuspendAllInterrupts' [-Werror=implicit-function-declaration] lin_commontl_proto.c /Lin_Slave_S32M244_Example_DS/stacks/lin/src line 1172 C/C++ Problem
make: *** [stacks/lin/lin_dal/src/subdir.mk:20: stacks/lin/lin_dal/src/lin_dal.o] Error 1 Lin_Slave_S32M244_Example_DS C/C++ Problem
make: *** [stacks/lin/src/subdir.mk:36: stacks/lin/src/lin_commontl_proto.o] Error 1 Lin_Master_S32M244_Example_DS C/C++ Problem
make: *** [stacks/lin/src/subdir.mk:36: stacks/lin/src/lin_commontl_proto.o] Error 1 Lin_Slave_S32M244_Example_DS C/C++ Problem
make: *** Waiting for unfinished jobs.... Lin_Master_S32M244_Example_DS C/C++ Problem
make: *** Waiting for unfinished jobs.... Lin_Slave_S32M244_Example_DS C/C++ Problem
Symbol 'LinIf_Channel_State' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 520 Semantic Error
Symbol 'LINIF_IDLE' could not be resolved lin_dal.c /Lin_Slave_S32M244_Example_DS/stacks/lin/lin_dal/src line 520 Semantic Error

The master code has fewer errors:

Description Resource Path Location Type
implicit declaration of function 'OsIf_ResumeAllInterrupts' [-Werror=implicit-function-declaration] lin_commontl_proto.c /Lin_Master_S32M244_Example_DS/stacks/lin/src line 1241 C/C++ Problem
implicit declaration of function 'OsIf_SuspendAllInterrupts' [-Werror=implicit-function-declaration] lin_commontl_proto.c /Lin_Master_S32M244_Example_DS/stacks/lin/src line 1172 C/C++ Problem

How can these errors be resolved?

0 Kudos
Reply
1 Solution
2,186 Views
hns80
Senior Contributor I

I deleted both projects completely from my workspace, then re-imported the Lin_Slave and Lin_Master projects. Before opening the configurator, I fixed the backslash problem on the LDF source line mentioned in the original post.

I then opened the configurator, updated the code, and was able to build successfully.

Why is this line of the configurator consistently broken across all versions of this code? I see the same problem in the S32K118 implementation. 

 

View solution in original post

0 Kudos
Reply
2 Replies
2,247 Views
hns80
Senior Contributor I

I needed to add an include to lin_commontl_proto.c for the master and slave code:
#include "OsIf_Internal.h"

The master code will build now, but the slave code still has errors:

1. LINIF_IDLE is not defined

2. stacks/lin/lin_dal/src/lin_dal.c:520:23: error: 'LinIf_Channel_State' undeclared 

 

0 Kudos
Reply
2,187 Views
hns80
Senior Contributor I

I deleted both projects completely from my workspace, then re-imported the Lin_Slave and Lin_Master projects. Before opening the configurator, I fixed the backslash problem on the LDF source line mentioned in the original post.

I then opened the configurator, updated the code, and was able to build successfully.

Why is this line of the configurator consistently broken across all versions of this code? I see the same problem in the S32K118 implementation. 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2067519%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32M%20LIN%20Stack%20compilation%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2067519%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20using%20S32DS%203.5%20and%20S32M24%20RTD%202.0.0%20and%20installed%20the%20S32K1_S32M24X_LINSTACK_RTM_1_0_2_D2308_updatesite.zip.%3C%2FP%3E%3CP%3EI%20imported%20the%20master%20and%20slave%20examples%2C%20fixed%20the%20backslash%20problem%20in%20the%20mex%20file%20(%3CSETTING%20name%3D%22LDFRelativePath%22%20value%3D%22src%26lt%3BSTRONG%26gt%3B%5C%26lt%3B%2FSTRONG%26gt%3BLIN21.ldf%22%3E%3C%2FSETTING%3E)%2C%20and%20generated%20the%20configuration%20code.%3C%2FP%3E%3CP%3ENeither%20project%20will%20build.%3C%2FP%3E%3CP%3EThe%20slave%20code%20has%20these%20errors%3A%3C%2FP%3E%3CP%3EDescription%20Resource%20Path%20Location%20Type%3CBR%20%2F%3E'LinIf_Channel_State'%20undeclared%20(first%20use%20in%20this%20function)%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20520%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3E'LINIF_IDLE'%20undeclared%20(first%20use%20in%20this%20function)%3B%20did%20you%20mean%20'LINIF_CODE'%3F%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20520%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3EField%20'lin_baudrate_adjusted_flg'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20199%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_max_frame_res_timeout_val'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20193%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_protocol_state'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20172%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_protocol_state'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20438%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_protocol_state'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20443%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_protocol_state'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20488%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20128%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20146%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20176%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20181%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20302%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20411%20Semantic%20Error%3CBR%20%2F%3EField%20'lin_virtual_interface'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20489%20Semantic%20Error%3CBR%20%2F%3EField%20'max_idle_timeout_cnt'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20528%20Semantic%20Error%3CBR%20%2F%3EField%20'response_buffer_ptr'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20443%20Semantic%20Error%3CBR%20%2F%3EField%20'response_length'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20438%20Semantic%20Error%3CBR%20%2F%3Eimplicit%20declaration%20of%20function%20'OsIf_ResumeAllInterrupts'%20%5B-Werror%3Dimplicit-function-declaration%5D%20lin_commontl_proto.c%20%2FLin_Master_S32M244_Example_DS%2Fstacks%2Flin%2Fsrc%20line%201241%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Eimplicit%20declaration%20of%20function%20'OsIf_ResumeAllInterrupts'%20%5B-Werror%3Dimplicit-function-declaration%5D%20lin_commontl_proto.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Fsrc%20line%201241%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Eimplicit%20declaration%20of%20function%20'OsIf_SuspendAllInterrupts'%20%5B-Werror%3Dimplicit-function-declaration%5D%20lin_commontl_proto.c%20%2FLin_Master_S32M244_Example_DS%2Fstacks%2Flin%2Fsrc%20line%201172%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Eimplicit%20declaration%20of%20function%20'OsIf_SuspendAllInterrupts'%20%5B-Werror%3Dimplicit-function-declaration%5D%20lin_commontl_proto.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Fsrc%20line%201172%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Emake%3A%20***%20%5Bstacks%2Flin%2Flin_dal%2Fsrc%2Fsubdir.mk%3A20%3A%20stacks%2Flin%2Flin_dal%2Fsrc%2Flin_dal.o%5D%20Error%201%20Lin_Slave_S32M244_Example_DS%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Emake%3A%20***%20%5Bstacks%2Flin%2Fsrc%2Fsubdir.mk%3A36%3A%20stacks%2Flin%2Fsrc%2Flin_commontl_proto.o%5D%20Error%201%20Lin_Master_S32M244_Example_DS%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Emake%3A%20***%20%5Bstacks%2Flin%2Fsrc%2Fsubdir.mk%3A36%3A%20stacks%2Flin%2Fsrc%2Flin_commontl_proto.o%5D%20Error%201%20Lin_Slave_S32M244_Example_DS%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Emake%3A%20***%20Waiting%20for%20unfinished%20jobs....%20Lin_Master_S32M244_Example_DS%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Emake%3A%20***%20Waiting%20for%20unfinished%20jobs....%20Lin_Slave_S32M244_Example_DS%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3ESymbol%20'LinIf_Channel_State'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20520%20Semantic%20Error%3CBR%20%2F%3ESymbol%20'LINIF_IDLE'%20could%20not%20be%20resolved%20lin_dal.c%20%2FLin_Slave_S32M244_Example_DS%2Fstacks%2Flin%2Flin_dal%2Fsrc%20line%20520%20Semantic%20Error%3C%2FP%3E%3CP%3EThe%20master%20code%20has%20fewer%20errors%3A%3C%2FP%3E%3CP%3EDescription%20Resource%20Path%20Location%20Type%3CBR%20%2F%3Eimplicit%20declaration%20of%20function%20'OsIf_ResumeAllInterrupts'%20%5B-Werror%3Dimplicit-function-declaration%5D%20lin_commontl_proto.c%20%2FLin_Master_S32M244_Example_DS%2Fstacks%2Flin%2Fsrc%20line%201241%20C%2FC%2B%2B%20Problem%3CBR%20%2F%3Eimplicit%20declaration%20of%20function%20'OsIf_SuspendAllInterrupts'%20%5B-Werror%3Dimplicit-function-declaration%5D%20lin_commontl_proto.c%20%2FLin_Master_S32M244_Example_DS%2Fstacks%2Flin%2Fsrc%20line%201172%20C%2FC%2B%2B%20Problem%3C%2FP%3E%3CP%3EHow%20can%20these%20errors%20be%20resolved%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2072064%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32M%20LIN%20Stack%20compilation%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2072064%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20deleted%20both%20projects%20completely%20from%20my%20workspace%2C%20then%20re-imported%20the%20Lin_Slave%20and%20Lin_Master%20projects.%20Before%20opening%20the%20configurator%2C%20I%20fixed%20the%20backslash%20problem%20on%20the%20LDF%20source%20line%20mentioned%20in%20the%20original%20post.%3C%2FP%3E%3CP%3EI%20then%20opened%20the%20configurator%2C%20updated%20the%20code%2C%20and%20was%20able%20to%20build%20successfully.%3C%2FP%3E%3CP%3EWhy%20is%20this%20line%20of%20the%20configurator%20consistently%20broken%20across%20all%20versions%20of%20this%20code%3F%20I%20see%20the%20same%20problem%20in%20the%20S32K118%20implementation.%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2067524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32M%20LIN%20Stack%20compilation%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2067524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20needed%20to%20add%20an%20include%20to%20lin_commontl_proto.c%20for%20the%20master%20and%20slave%20code%3A%3CBR%20%2F%3E%23include%20%22OsIf_Internal.h%22%3C%2FP%3E%3CP%3EThe%20master%20code%20will%20build%20now%2C%20but%20the%20slave%20code%20still%20has%20errors%3A%3C%2FP%3E%3CP%3E1.%26nbsp%3BLINIF_IDLE%20is%20not%20defined%3C%2FP%3E%3CP%3E2.%26nbsp%3Bstacks%2Flin%2Flin_dal%2Fsrc%2Flin_dal.c%3A520%3A23%3A%20error%3A%20'LinIf_Channel_State'%20undeclared%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E