cancel
Showing results for 
Search instead for 
Did you mean: 

Compile Errors Importing X-CUBE-NFC5 package

AGiml
Associate

Hello,

I am attempting to integrate the X-CUBE-NFC5 package with an existing project using a STM32F469II MCU and IAR. I have imported and setup the directories exactly as the example project , excluding the application files; however, I am receiving a significant amount of errors and I am at a loss on how to resolve the issues. I was able to successfully build the example project provided with the package for the STM32F401RE-Nucleo board.

The main issue is with the rfalIsoDepInfo struct and the rfalBitRate enum in "rfal_isoDep.h"

/*! RFAL Bit rates    */
typedef enum {
    RFAL_BR_106                      = 0,    /*!< Bit Rate 106 kbit/s (fc/128)                                     */
    RFAL_BR_212                      = 1,    /*!< Bit Rate 212 kbit/s (fc/64)                                      */
    RFAL_BR_424                      = 2,    /*!< Bit Rate 424 kbit/s (fc/32)                                      */
    RFAL_BR_848                      = 3,    /*!< Bit Rate 848 kbit/s (fc/16)                                      */
    RFAL_BR_1695                     = 4,    /*!< Bit Rate 1695 kbit/s (fc/8)                                      */
    RFAL_BR_3390                     = 5,    /*!< Bit Rate 3390 kbit/s (fc/4)                                      */
    RFAL_BR_6780                     = 6,    /*!< Bit Rate 6780 kbit/s (fc/2)                                      */
    RFAL_BR_52p97                    = 0xEB, /*!< Bit Rate 52.97 kbit/s (fc/256) Fast Mode VICC->VCD               */
    RFAL_BR_26p48                    = 0xEC, /*!< Bit Rate 26,48 kbit/s (fc/512) NFCV VICC->VCD & VCD->VICC 1of4   */
    RFAL_BR_1p66                     = 0xED, /*!< Bit Rate 1,66 kbit/s (fc/8192) NFCV VCD->VICC 1of256             */
    RFAL_BR_KEEP                     = 0xFF  /*!< Value indicating to keep the same previous bit rate              */
} rfalBitRate;
 
typedef struct {
    uint8_t            FWI;             /*!< Frame Waiting Integer                                */
    uint32_t           FWT;             /*!< Frame Waiting Time (1/fc)                            */
    uint32_t           dFWT;            /*!< Delta Frame Waiting Time (1/fc)                      */
    uint32_t           SFGI;            /*!< Start-up Frame Guard time Integer                    */
    uint32_t           SFGT;            /*!< Start-up Frame Guard Time (ms)                       */
    uint8_t            FSxI;            /*!< Frame Size Device/Card Integer (FSDI or FSCI)        */
    uint16_t           FSx;             /*!< Frame Size Device/Card (FSD or FSC)                  */
    uint32_t           MBL;             /*!< Maximum Buffer Length (optional for NFC-B)           */
    rfalBitRate        DSI;             ///////// First error here
    rfalBitRate        DRI;             /*!< Bit Rate coding from Poller (PCD) to Listener (PICC) */
    uint8_t            DID;             /*!< Device ID                                            */
    uint8_t            ***;             /*!< Node ADdress                                         */
    bool               supDID;          /*!< DID supported flag                                   */
    bool               supNAD;          /*!< *** supported flag                                   */
    bool               supAdFt;         /*!< Advanced Features supported flag                     */
} rfalIsoDepInfo;

Here are the compile errors in question. Path names are edited for brevity and privacy.

Error[Pe018]: expected a ")" D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 278 
Error[Pe079]: expected a type specifier D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 278 
Error[Pe168]: a function type is not allowed here D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 278 
Error[Pe079]: expected a type specifier D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 695 
Error[Pe090]: function returning function is not allowed D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 695 
Error[Pe079]: expected a type specifier D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 728 
Error[Pe090]: function returning function is not allowed D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_isoDep.h 728 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1184 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1311 
Error[Pe079]: expected a type specifier D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1786 
Error[Pe090]: function returning function is not allowed D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1786 
Error[Pe141]: unnamed prototyped parameters not allowed when body is present D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1786 
Error[Pe042]: operand types are incompatible ("DSI_TypeDef *" and "enum #139") D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1792 
Error[Pe031]: expression must have integral type D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1801 
Error[Pe079]: expected a type specifier D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1818 
Error[Pe090]: function returning function is not allowed D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1818 
Error[Pe141]: unnamed prototyped parameters not allowed when body is present D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1818 
Error[Pe042]: operand types are incompatible ("DSI_TypeDef *" and "enum #139") D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1825 
Error[Pe031]: expression must have integral type D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1834 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1916 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1936 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1972 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1977 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1983 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 1987 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 2036 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 2042 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 2074 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_isoDep.c 2087 
Error[Pe018]: expected a ")" D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_nfcDep.h 315 
Error[Pe079]: expected a type specifier D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_nfcDep.h 315 
Error[Pe168]: a function type is not allowed here D:\Project_Dir\Middlewares\ST\rfal\Inc\rfal_nfcDep.h 315 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 1846 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2161 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2169 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2169 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2203 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2222 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2225 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2238 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2240 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2328 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2402 
Error[Pe134]: expected a field name D:\Project_Dir\Middlewares\ST\rfal\Src\rfal_nfcDep.c 2406 

Any help would greatly be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi,

after finding that there is DSI block on STM32F469 which does not exist on STM32F401 I assume that really this is the reason. DSI being defined by your BSP.....

Regards, Ulysses

View solution in original post

4 REPLIES 4
Ulysses HERNIOSUS
ST Employee

Hi Andrew,

hard to judge. My blind guess would be that the STM32F469II  brings a define for MBL, rendering the previous line in way that it requires more data for its statement.

Maybe you search for an MBL in the MCU support code.

If this does not help I recommend to make use of the -E option of the compiler to create the preprocessed files of the rfal_isodep.c . There it should be easy to see what actually happens.

BR, Ulysses

Ulysses HERNIOSUS
ST Employee

Hi,

after finding that there is DSI block on STM32F469 which does not exist on STM32F401 I assume that really this is the reason. DSI being defined by your BSP.....

Regards, Ulysses

kostas
Associate II

The problem is that DSI(Display Serial Interface) is defined in BSP and in rfal library as well.

Maybe change the rfal DSI to something else(DSIx)?

Ulysses HERNIOSUS
ST Employee

Hi,

rfal just uses DSI as a member of a struct. BSP is kind of yielding the sledge hammer:

#define DSI         ((DSI_TypeDef *)DSI_BASE)

Probably best to try to use "#undef DSI" in platform.h.

Regards, Ulysses