Mcl module Generated by tressos causing a syntax error

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

Mcl module Generated by tressos causing a syntax error

1,997 Views
Ahmed_Attia
Contributor I

Hello,
I am configuring ADC with PWM as an external trigger source to start the conversion every 1 msec, and when I configured the Mcl the syntax error happened.

Ahmed_Attia_0-1690921426133.png

actually, I did not configure I2C and there is the same error in the Lin module in the same file I did not configure the Lin, and I did not include it in my project, so it is in file modules.h I2C and LIN Generated as (STD_OFF)
when I have a workaround to overcome this error and it works but I think there is something is not right especially the files are generated files 

0 Kudos
Reply
5 Replies

1,882 Views
NamLee
NXP Employee
NXP Employee

Hi Ahmed_Attia,

Could you check this part in makefile?

Disable_mcal_intermodule_asr.png

I see a define macro here, so the part that you mentioned will be not activated.

Please help me check this one.

Thank you,

Nam.

0 Kudos
Reply

1,887 Views
NamLee
NXP Employee
NXP Employee

Hi Ahmed_Attia,

That's really good points then i will check it now. Thank you for pointing it out.

"Note: Please try to build your example and configuring the necessary modules again without integrating Lin module and I2C module the problem will produced from your side"

>> Have you tried to compile the example inside the RTD package?

I've tried MCL example for K118, obviously not any I2C or LIN modules.

I using same package as you: SW32K1_RTD_4.4_1.0.1_HF01

Could you help me to compile example in your side?

Thank you,

Nam.

0 Kudos
Reply

1,891 Views
Ahmed_Attia
Contributor I

Hello @NamLee 

  • The file "Flexio_Mcl_Ip_Cfg_Defines.h" is generated from the MCL module.
  • Here's an example of code generated in Flexio_Mcl_Ip_Cfg_Defines.h:

#ifdef USE_LIN_MODULE
/* Check if the header file and the Flexio_Lin_Ip_CfgDefines header file have the same Autosar version */
#if ((FLEXIO_MCL_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION != FLEXIO_LIN_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION) || \
(FLEXIO_MCL_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION != FLEXIO_LIN_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION))
#error "AutoSar Version Numbers of Flexio_Mcl_Ip_Cfg_Defines.h and Flexio_Lin_Ip_CfgDefines.h are different"
#endif

  • The file checks if "USE_LIN_MODULE" is defined, but I don't have the LIN module integrated into my project. However, the macro "USE_LIN_MODULE" is always defined in "Modules.h" (also a generated file).

/**
* @brief This constant used for other modules to check if LIN is present in the project.
*/
#define USE_LIN_MODULE (STD_OFF)

  • The issue here is that "USE_LIN_MODULE" is defined, but "FLEXIO_LIN_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION" and "FLEXIO_LIN_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION" are not defined because I don't have the LIN module integrated.
  • the problem is "Flexio_Mcl_Ip_Cfg_Defines.h" always checks if the USE_LIN_MODULE is defined or not instead of checking if it is definied with STD_OFF
  • I believe "Flexio_Mcl_Ip_Cfg_Defines.h" should check if "USE_LIN_MODULE" is equal to "STD_ON" to enable the software version checking.
  • Note same issue goes for I2C ,as module is also not integrated in my package
  • Note 
*   Autosar Version      : 4.4.0
*   Autosar Revision     : ASR_REL_4_4_REV_0000
*   Autosar Conf.Variant :
*   SW Version           : 1.0.1
 
  • Note: Please try to build your example and configuring the necessary modules again without integrating Lin module and I2C module the problem will produced from your side.


Thank you for cooperation and waiting your response

Regards.

0 Kudos
Reply

1,900 Views
NamLee
NXP Employee
NXP Employee

Hi Ahmed_Attia,

In the header files alway have information part guarantee about version/patch of the release package.

I think there're some mistakes when you adding new modules, or when you try to import files into projects. Could you please check the file: Flexio_Mcl_Ip_Cfg_Defines.h and share to me the source file version information part?

This below belongs to my example with generate and compile completely no problem:

generated_include_files.pngtry_for_example.png

compile_done.png

Could you try to build a simple example in the package?

Thank you.

Nam.

0 Kudos
Reply

1,956 Views
Ahmed_Attia
Contributor I

Please Note That I am using an NXP S32K116 microcontroller and configuring ADC0 using the TRESOS tool with the SW32K1_RTD_4.4_1.0.1_HF01_D2209 package.

0 Kudos
Reply