Problems with Lpi2c_Ip_MasterConfig and Lpi2c_Ip_SlaveState struct generation on S32 DS for S32K344

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

Problems with Lpi2c_Ip_MasterConfig and Lpi2c_Ip_SlaveState struct generation on S32 DS for S32K344

Jump to solution
4,189 Views
nwKodiak
Contributor II

Hello! I am trying to do an example project for I2C Master output and found the I2c_IP_LPI2C Transfer_S32K344 project to fit my needs.

I got pretty far but I'm met with a compilation error where the I2c_Lpi2cMasterChannel0_VS_0 and I2c_Lpi2cSlaveChannel1_VS_0 is not found.

A little more digging and these are suppose to be the initialization structures for the I2C Init functions. These are defined already in my configuration.mex file but I'm not sure how to generate it using the ConfigTools.

When checking the generated files from the ConfigTools, Lpi2c_Ip_VS_0_PBcfg.h is empty and it looks like Siul2_Port_Ip_Defines.h is not generated. The Siul2_Port_Ip_Defines.h looks to be a very standard file that is easily copied and pasted from the source but the Lpi2c_Ip_VS_0_PBcfg.h looks to be the file that would hold the structs I'm interested in. Though, I'm not too sure about this and would like to check.

For reference, I can manually make the two structs but I believe this will improve the SDK and prevent frustration for future users.

Thank you in advance!

Labels (1)
Tags (3)
0 Kudos
1 Solution
3,934 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

Unfortunately RTD is not supported (tested) on Linux host OS - that's why you can't select it from Package Manager. 

 

Anyway - I spoke with the dev team and the issue is caused by case sensitive OS. The issue can be fixed by renaming these files: 

<DS_install_path>\eclipse\mcu_data\components\PlatformSDK_S32K3_2021_10\Lpi2c

               -rename Lpi2c_Ip_PBCfg.c to Lpi2c_Ip_PBcfg.c

               -rename Lpi2c_Ip_PBCfg.h to Lpi2c_Ip_PBcfg.h

 

and by modifying  .component file:

<DS_install_path>\eclipse\mcu_data\components\PlatformSDK_S32K3_2021_10\Siul2_Port\Siul2_Port.component

               -on line 26:  replace <variable value="`../siul2_port/siul2_port_codegenerator.js`" id="codegen_file"></variable>

               with  <variable value="`../Siul2_Port/siul2_port_codegenerator.js`" id="codegen_file"></variable>

 

Hope it helps. 

 

Jiri 

 

View solution in original post

0 Kudos
12 Replies
3,935 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

Unfortunately RTD is not supported (tested) on Linux host OS - that's why you can't select it from Package Manager. 

 

Anyway - I spoke with the dev team and the issue is caused by case sensitive OS. The issue can be fixed by renaming these files: 

<DS_install_path>\eclipse\mcu_data\components\PlatformSDK_S32K3_2021_10\Lpi2c

               -rename Lpi2c_Ip_PBCfg.c to Lpi2c_Ip_PBcfg.c

               -rename Lpi2c_Ip_PBCfg.h to Lpi2c_Ip_PBcfg.h

 

and by modifying  .component file:

<DS_install_path>\eclipse\mcu_data\components\PlatformSDK_S32K3_2021_10\Siul2_Port\Siul2_Port.component

               -on line 26:  replace <variable value="`../siul2_port/siul2_port_codegenerator.js`" id="codegen_file"></variable>

               with  <variable value="`../Siul2_Port/siul2_port_codegenerator.js`" id="codegen_file"></variable>

 

Hope it helps. 

 

Jiri 

 

0 Kudos
3,792 Views
nwKodiak
Contributor II

Hello @jiri_kral,

Thanks! This solved my issue!

0 Kudos
4,156 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @nwKodiak,

Which RTD version do you use?

I have tried with:

* Autosar Version : 4.4.0
* Autosar Revision : ASR_REL_4_4_REV_0000
* Autosar Conf.Variant :
* SW Version : 1.0.0
* Build Version : S32K3_RTD_1_0_0_P02_D2111_ASR_REL_4_4_REV_0000_20211115

And all the files are generated and I can compile it without any issues.

Do you see any error when you update the code:

danielmartynek_0-1638454307420.png

You can preview the files:

danielmartynek_1-1638454443373.png

 

 

Regards,

Daniel

 

0 Kudos
4,153 Views
nwKodiak
Contributor II

Hello @danielmartynek,

I'm using the extension I downloaded from the site:

SW32K3_RTD_4.4_1.0.0_DS_updatesite_D2110.zip

I think this would indicate that my RTD version = 4.4.

 

I'm not sure about Autosar version. Is there anymore information you might need to help me out?

 

0 Kudos
4,137 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Do you see any error when you click on Update Code?

danielmartynek_0-1638527581149.png

What OS do you use?

 

Thanks,

Daniel

0 Kudos
4,127 Views
nwKodiak
Contributor II

Hey Daniel,

I do not see any errors on the Update Code button. Also, I am using Ubuntu 20.04.3 LTS.

Screenshot from 2021-12-03 10-12-29c.png

0 Kudos
4,092 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @nwKodiak,

According to S32DS34 Release notes, Rev. 2.0, 04/2021

Ubuntu LTS 20.04 is not supported

danielmartynek_0-1638777583402.png

 

BR, Daniel

0 Kudos
4,025 Views
nwKodiak
Contributor II

Hi @danielmartynek,

Is there a specific date or any plans to support Ubuntu LTS 20.04?

I'm not too sure if I would want to switch over and if the date is close I can wait with the current solution that I developed.

0 Kudos
3,987 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @nwKodiak,

We could reproduce the issue in Ubuntu 18.4 too.

It is being currently investigating, it might take a while though.

Thank you for pointing it out.

I'm sorry for all the inconvenience,

 

Regards,

Daniel

 

Tags (1)
0 Kudos
3,971 Views
nwKodiak
Contributor II

Hello @danielmartynek,

Thanks for the investigation! I was already able to solve my problem through finding the struct and filling out the information for the struct.

I'll add my code for reference:

//current state of the i2c master channel status
Lpi2c_Ip_MasterStateType i2c0_dev_curr_state;

Lpi2c_Ip_BaudRateType i2c0_init_baudrate = {
		//set baudrate struct (heavily affects frequency)
		// currently set to ~400kHz
		.Prescaler = LPI2C_MASTER_PRESC_DIV_8, // <-- changes SCL
		.ClkHI = 4, // <-- changes SCL
		.ClkLO = 4, // <-- changes SCL
		.SetHold = 1, // check if changes SCL (data dependent so probably changes SDA)
		.DataValid = 2,// check if changes SCL (data dependent so probably changes SDA)
		//high speed is not used. Check configuration.mex file.
		.ClkHIHS = 1,
		.ClkLOHS = 3,
		.SetHoldHS = 2,
		.DataValidHS = 1
};

Lpi2c_Ip_MasterConfigType i2c0_master_config = {
		//set master config
	//	.SlaveAddress = 0x68, //set in runtime
		.Is10bitAddr = 0,
		.OperatingMode = LPI2C_STANDARD_MODE,
		.BaudrateParams = i2c0_init_baudrate,
		.PinLowTimeout = 0,
		.BusIdleTimeout = 0,
		.GlitchFilterSDA = 1,
		.GlitchFilterSCL = 1,
		.MasterCode = 0,
		.TransferType = LPI2C_USING_INTERRUPTS,
	//	.DmaTxChannel = NULL, //not using
	//	.DmaRxChannel = NULL, //not using
		.MasterCallback = NULL,
		.CallbackParam = 1,

		.MasterState = &i2c0_dev_curr_state,
};

 

 

0 Kudos
3,943 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @nwKodiak,

It seems like this is not an issue of the IDE but the RTD drivers that are nor supported on Linux at all.

So I would recommend using Windows if possible.

 

Regards,

Daniel

 

 

0 Kudos
3,864 Views
kawin
Contributor III

Hi there, @danielmartynek,

We are having the same problem, Siul2_Port_Ip_Defines.h is not generated in Ubuntu 18.04. I have reinstalled everything, followed S32 installation guide for S32G platform, the M7 core example for LED blinking a few times. No luck.

The problem seems to be with RTD not generating Siul2_Port_Ip_Defines.h after clicking Update Code button.

Any anything on this topic?

 

Thanks,

Kawin

0 Kudos