IMC302A header files error

Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
sohail
Level 3
Level 3
50 sign-ins 10 questions asked 10 replies posted

Hi,

       I am using EVAL-M3-302F I want to run simple program Blink led. I tried compile but there is error in IMC300A.h header file & imc300a_port1.h header file.  I am beginner in Imotion have a background of Arduino programming where lot of example & doc available. 

 my understanding is I have to call function from program write,set,read port bits

write_PORT1_PortControlForPort0Pin8_IOCR8(PORT1_PC8_Output_PushPull__Generalpurpose_output);/*P0.8, set as output*/

 

but if header file have error I cant solved it.

 

Build started: Project: IMC302A_UART
*** Using Compiler 'V6.18', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'Target 1'
main.c(3): error: expected "FILENAME" or <FILENAME>
**********************************************************************************************************************/
^
main.c(4): warning: In file included from...
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\IMC300A.h(60): warning: commas at the end of enumerator lists are a C99-specific feature [-Wc99-extensions]
SysTick_IRQn = -1, /*!< 15 System Tick Timer */
^~
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\IMC300A.h(191): warning: anonymous unions are a C11 extension [-Wc11-extensions]
union {
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\IMC300A.h(443): warning: anonymous unions are a C11 extension [-Wc11-extensions]
union {
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\IMC300A.h(452): warning: anonymous unions are a C11 extension [-Wc11-extensions]
union {
^
main.c(6): warning: In file included from...
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(27): warning: In file included from...
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_library.h(24): warning: non-portable path to file '<IMC300A.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include <imc300a.h>
^~~~~~~~~~~
<IMC300A.h>
main.c(6): warning: In file included from...
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(43): error: unknown type name 'inline'
static inline void write_PORT1_OUT( uint32_t out )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(48): error: unknown type name 'inline'
static inline uint32_t read_PORT1_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(48): error: expected ';' after top level declarator
static inline uint32_t read_PORT1_OUT( void )
^
;
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(63): error: unknown type name 'inline'
static inline void write_PORT1_Port1OutputBit0_OUT( PORT1_OUT_P0_t p0 )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(63): error: unknown type name 'PORT1_OUT_P0_t'
static inline void write_PORT1_Port1OutputBit0_OUT( PORT1_OUT_P0_t p0 )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(69): error: unknown type name 'inline'
static inline void setbit_PORT1_Port1OutputBit0_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(74): error: unknown type name 'inline'
static inline void clearbit_PORT1_Port1OutputBit0_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(79): error: unknown type name 'inline'
static inline uint32_t read_PORT1_Port1OutputBit0_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(79): error: expected ';' after top level declarator
static inline uint32_t read_PORT1_Port1OutputBit0_OUT( void )
^
;
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(94): error: unknown type name 'inline'
static inline void write_PORT1_Port1OutputBit1_OUT( PORT1_OUT_P1_t p1 )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(94): error: unknown type name 'PORT1_OUT_P1_t'
static inline void write_PORT1_Port1OutputBit1_OUT( PORT1_OUT_P1_t p1 )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(100): error: unknown type name 'inline'
static inline void setbit_PORT1_Port1OutputBit1_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(105): error: unknown type name 'inline'
static inline void clearbit_PORT1_Port1OutputBit1_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(110): error: unknown type name 'inline'
static inline uint32_t read_PORT1_Port1OutputBit1_OUT( void )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(110): error: expected ';' after top level declarator
static inline uint32_t read_PORT1_Port1OutputBit1_OUT( void )
^
;
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(125): error: unknown type name 'inline'
static inline void write_PORT1_Port1OutputBit2_OUT( PORT1_OUT_P2_t p2 )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(125): error: unknown type name 'PORT1_OUT_P2_t'
static inline void write_PORT1_Port1OutputBit2_OUT( PORT1_OUT_P2_t p2 )
^
C:/Users/HP/AppData/Local/Arm/Packs/Infineon/IMC300A_DFP/1.1.0/Device/IMC300_series/Include\imc300a_port1.h(131): error: unknown type name 'inline'
static inline void setbit_PORT1_Port1OutputBit2_OUT( void )
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
5 warnings and 20 errors generated.
compiling main.c...
".\Objects\IMC302A_UART.axf" - 19 Error(s), 5 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01

 

2022-06-01 (2).png2022-06-01 (4).png

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @sohail,

The IMC300A example code is supported in

MDK Version : 5.36 

compiler : V5.06 update 7(build 960) 

Krupashankar_0-1654162053756.png

Code example is developed based on  ARM Compiler 5 so it is not supported in higher compiler version ( ARM Compiler 6) please follow this document: Migrate ARM Compiler 5 to ARM Compiler 6 to build the code example in higher compiler version.

 

Thanks,

Krupashankar

 

View solution in original post

0 Likes
1 Reply
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @sohail,

The IMC300A example code is supported in

MDK Version : 5.36 

compiler : V5.06 update 7(build 960) 

Krupashankar_0-1654162053756.png

Code example is developed based on  ARM Compiler 5 so it is not supported in higher compiler version ( ARM Compiler 6) please follow this document: Migrate ARM Compiler 5 to ARM Compiler 6 to build the code example in higher compiler version.

 

Thanks,

Krupashankar

 

0 Likes