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:
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
Solved! Go to Solution.
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.
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.
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