XMC4100 System File Errors

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

cross mob
Not applicable
I am creating a new XMC4108 project with Dave v4. The project generates code and builds fine on Dave. When i import the project to Keil it is unable to build due to the following line in the system_XMC4100.c

#if !defined(XMC4108_F64x64) && !defined(XMC4108-Q48x64)


The problem is there is a '-' instead of '_' in XMC4108_Q48x64. But looking at Dave the problem doesn't occur because it never preprocesses that line. The full set of code can be seen below. Even if i fix that line it doesn't fix my build issue because then the var on the next line never gets created in any other instance so i get linker errors.

If __CC_ARM is defined by default because of using the Keil compiler, should the #if check be removed so that g_hrpwm_char_data[3] is initialized?



#if defined ( __CC_ARM )
uint32_t SystemCoreClock __attribute__((at(0x20002FC0)));
uint8_t g_chipid[16] __attribute__((at(0x20002FC4)));
#if !defined(XMC4108_F64x64) && !defined(XMC4108-Q48x64)
uint32_t g_hrpwm_char_data[3] __attribute__((at(0x20002FD4)));
#endif
#elif defined ( __ICCARM__ )
__no_init uint32_t SystemCoreClock;
__no_init uint8_t g_chipid[16];
__no_init uint32_t g_hrpwm_char_data[3];
#elif defined ( __GNUC__ )
uint32_t SystemCoreClock __attribute__((section(".no_init")));
uint8_t g_chipid[16] __attribute__((section(".no_init")));
uint32_t g_hrpwm_char_data[3] __attribute__((section(".no_init")));
#elif defined ( __TASKING__ )
uint32_t SystemCoreClock __at( 0x20002FC0 );
uint8_t g_chipid[16] __at( 0x20002FC4 );
#if !defined(XMC4108_F64x64) && !defined(XMC4108-Q48x64)
uint32_t g_hrpwm_char_data[3] __at( 0x20002FD4 );
#endif
#endif
0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Thanks for reporting the issue.
Find attached a fixed system_XMC4100.c (please change the extension of the file). It will be part of the next release planned for end of April.

Best regards,
Jesus
0 Likes