Not applicable
Feb 25, 2016
07:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 25, 2016
07:09 AM
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
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(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
1 Reply
Attachments are accessible only for community members.
Feb 27, 2016
02:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 27, 2016
02:17 AM