RTD generated code is invalid

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

RTD generated code is invalid

Jump to solution
353 Views
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

Tags (2)
0 Kudos
Reply
1 Solution
153 Views
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.

View solution in original post

0 Kudos
Reply
2 Replies
154 Views
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 Kudos
Reply
325 Views
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 Kudos
Reply