RTD generated code is invalid

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RTD generated code is invalid

跳至解决方案
378 次查看
durga_choudhury
Contributor III

The details of my environment is as follows:

S32 Design Studio for S32 Platform

Version: 3.6.2

Build id: 250529 (Update 2)

 

RTD details is as per the screen shot:

 

durga_choudhury_0-1759333044763.png

MCU: S32K148

The generated code is sometimes invalid (i.e. won't compile). A way to reproduce is as follows:

(this is a convoluted way, but still shows the problem without discussing the details of our internal project)

 

1. Open Spi_Transfer_S32K148 project

2. Delete 'Platform' MCAL driver

3. Update code

4. Add it back

5. Update code

Part of the generated Flexio_Spi_Ip_CfgDefines.h is as follows. Note the multiply defined macros that break the build.

 

/*==================================================================================================

* DEFINES AND MACROS

==================================================================================================*/

/* Macros that indicate FLEXIO channels used by SPI */

#ifndef FLEXIO_0_CH_0_USED

#define FLEXIO_0_CH_0_USED

#else

#error "CHANNEL_0 cannot be used by SPI driver to configure as TX and CLK channels. Channel locked by another driver!"

#endif

 

#ifndef FLEXIO_0_CH_0_USED

#define FLEXIO_0_CH_0_USED

#else

#error "CHANNEL_0 cannot be used by SPI driver to configure as RX and CS channels. Channel locked by another driver!"

#endif

 

/* Macros that indicate FLEXIO pins used by SPI */

#ifndef FLEXIO_0_PIN_0_USED

#define FLEXIO_0_PIN_0_USED

#else

#error "PIN_0 cannot be used by SPI driver to configure for TX channel. PIN locked by another driver!"

#endif

 

#ifndef FLEXIO_0_PIN_0_USED

#define FLEXIO_0_PIN_0_USED

#else

#error "PIN_0 cannot be used by SPI driver to configure for RX channel. PIN locked by another driver!"

#endif

 

#ifndef FLEXIO_0_PIN_0_USED

#define FLEXIO_0_PIN_0_USED

#else

#error "PIN_0 cannot be used by SPI driver to configure for CLK channel. PIN locked by another driver!"

#endif

标记 (2)
0 项奖励
回复
1 解答
178 次查看
durga_choudhury
Contributor III

Hello @VaneB 

When the code generator gets into this state, it does not recover on its own; i.e. manually deleting the duplicated lines and regenerating the code puts them back. Since you cannot reproduce the issue, I am going to close this thread; let's hope that it has been fixed in the 3.6.4 version of the IDE.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
179 次查看
durga_choudhury
Contributor III

Hello @VaneB 

When the code generator gets into this state, it does not recover on its own; i.e. manually deleting the duplicated lines and regenerating the code puts them back. Since you cannot reproduce the issue, I am going to close this thread; let's hope that it has been fixed in the 3.6.4 version of the IDE.

0 项奖励
回复
350 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @durga_choudhury 

I have followed the steps you outlined, and I am afraid I was not able to reproduce the issue on my end.

However, since the problem seems to be related to the files generated by ConfigTools, could you please try deleting the generated files for the project? Then, go to ConfigTools → Update Code to regenerate them.

If the issue persists after that, please let me know.

 

BR, VaneB

0 项奖励
回复