CapSense V7.0 ported to Keil uVision does not compile - KBA230001

Version 3

    Author: AH_96           Version: **

     

    Translation - Japanese: Keil uVisionへ移植したCapSense V7.0がコンパイルできません - KBA230001- Community Translated (JA)

     

    Issue:
    When exporting CapSense project with CapSense V7.0 component to Keil uVision, I’m getting the following error:

    Generated_Source/PSoC4/CapSense_SensingCSD_LL.c(807): error: #268: declaration may not appear after executable statement in block

              uint32 idacARegValue;

    Generated_Source/PSoC4/CapSense_SensingCSD_LL.c(809): error:  #268: declaration may not appear after executable statement in block

              uint32 idacBRegValue;

    Answer:
    This occurs as PSoC Creator compiles the project with C99 standard while Keil uVision compiles the project with C90 standard. To solve this issue, in Keil uVision, click on Project > Options for target ‘project_name’ > C/C++ tab > Tick C99 Mode. This will force Keil to use C99 standard while compiling and the issue will be resolved.