DAVE 3.1.2 - Error on compile

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

cross mob
Not applicable
I made a simple project for XMC-HiLight board from hitex which toggle a LED using PWMSP001 App, then I exported the project for Keil (v4.5) with uVision plugin, but when I tried to compile I get some errors even in DAVE3.
The actual version of DAVE3 which I use is 3.1.2 (2012-05-22). I have used before DAVE3 3.1.0 (2012-03-21) and I exported the project for Keil and it worked.
I think that the source of problem is comming from "system_XMC4500.c" file.

Keil error: "L6218E: Undefined symbol SystemInit (referred from startup_xmc4500_arm.o)" (I tried to attach 2 pictures)
0 Likes
12 Replies
Not applicable
I upgraded today the Apps, but firstly i had some problems because the DAVE couldn't find new updates and finally after some more another attempts with "Check for DAVE Apps Updates" ... the Apps were updated and now i can use DAVE 3.1.2 without problems on compiling.

For testing i used "WEBSERVER001_Example2", i compiled the project with DAVE and it was relative ok, the compiler is only warning me about some messages with "Invalid project path..." , then i exported the project for Keil and on compiling process i get an error.

After this test, i made a simple project also for testing, i wanted to toggle a led trough PWMSP001 App. On compiling process with DAVE it was relative ok as the same result with Keil, but after programming the XMC4500 the application was not running, the led was not toggling. Then i checked with the debugger (ULINK-ME) the code and i saw that the code will not continue to execute after this code is executed "if((*InitStatusQueryPtr)())" from CLCK001.c and the code execution will stop (into an infinite branch, which i think that is generated by UsageFault interrupt/Hard Fault exception).
0 Likes
Not applicable
Sorry, but i have another problem on a very simple project. The project it will be compiled on DAVE but not in Keil (.\UV4Build\pr2d.axf: Error: L6218E: Undefined symbol AllowPLLInitByStartup (referred from system_xmc4500.o).)
I only make a pin high in this project and i use only 2 instances of IO004 App (IO004/0 and IO004/1) for turning on the led attached on P3.7 from XMC-HiLight board.

The main.c is looking like that:

#include //SFR declarations of the selected device
#include //Declarations from DAVE3 Code Generation

int main(void)
{
status_t status; // Declaration of return variable for DAVE3 APIs
DAVE_Init(); // Initialization of DAVE Apps

IO004_SetPin(IO004_Handle1);

while(1);
}


IO004_Handle1 correspond to P3.7 pin.
0 Likes
Not applicable
dorinjj wrote:
Sorry, but i have another problem on a very simple project. The project it will be compiled on DAVE but not in Keil (.\UV4Build\pr2d.axf: Error: L6218E: Undefined symbol AllowPLLInitByStartup (referred from system_xmc4500.o).)
I only make a pin high in this project and i use only 2 instances of IO004 App (IO004/0 and IO004/1) for turning on the led attached on P3.7 from XMC-HiLight board.

The main.c is looking like that:

#include //SFR declarations of the selected device
#include //Declarations from DAVE3 Code Generation

int main(void)
{
status_t status; // Declaration of return variable for DAVE3 APIs
DAVE_Init(); // Initialization of DAVE Apps

IO004_SetPin(IO004_Handle1);

while(1);
}


IO004_Handle1 correspond to P3.7 pin.


I forgot to include CLK App. After adding CLK001 the led was still off because the code execution remain stuck on the:
CLK001_Init -> Reset_Handler -> Reset_Handler -> SystemInit -> SystemClockSetup -> AllowPLLInitByStartup -> CLK001_Init -> UsageFault_Handler which can be seen in "Call Stack + Locals" from Keil when i debug the application with ULINK-ME using the free version of Keil with 32KB code size limit.
0 Likes
Georg_Huba
Employee
Employee
Hi dorinjj,
We can confirm there are some problems when trying to import DAVE 3 projects into µVision MDK.
We are currently in contact with Keil to sort this out. Give us a couple of days to identify what is wrong.

BTW, if the clock App is not required by another DAVE App it is not required to include the clock App manually. The clock App is only required by DAVE Apps that uses peripheral resources with own clock features (enable, divider, alternative clock source,…). This is not the cases for the simple IO004 App. In this case the default clock setup from the SystemInit (systemXMC4500.c) is used.

Thanks,
Georg Huba
0 Likes
Not applicable
How about DAVE3, it's working correctly? I'm thinking that i could use a "DAP miniWiggler" or another debugger for using with XMC board and DAVE3 IDE until the problem will be solved. Thank You.
0 Likes
Georg_Huba
Employee
Employee
Yes, DAP miniWiggler is working, you have to connect with the cortex M (9 pins) debug cable and you have to select the "Universal Debug Access Server" in the Debug Configuration View.
Best regards,
Georg Huba
0 Likes
Georg_Huba
Employee
Employee
Hi dorinjj,
Here is the explanation of the problem when importing DAVE3 created code into µVision:
In the new version of the Clock App we tried to synchronize the clock initialization of the SystemInit with the Clock initialization from the Clock App. This essentially works in DAVE 3 but not when importing generated code in other tool chains like Keil µVision. Reason is that a function pointer is not correctly initialized which causes a bus fault. We will update the Clock App to correct this latest by end of next week. If you are interested I can provide more details and how to patch the existing Clock App and startup.s.
0 Likes
Not applicable
Hello Georg Huba,
I could try to patch the Clock App and startup.s using instructions provided by you, this is a good reason for starting to work on my project more quickly, because i don't have a DAP miniWiggler.
Thank You
0 Likes
Georg_Huba
Employee
Employee
Hi dorinjj,

Here is the patch that should work for the first trials:
Download a zip file that contains an update of the Clock App template file (clk001c.jet) and startup_XMC4500_arm.s.

http://media.infineon.com/DAVE3/Forum/KeilPatch/PatchforMicrovisionImport.zip

Replace the template of the Clock App in the following place in the project folder:

\Dave\Model\clk001\1.0.4\Templates

Replace the attached startup_XMC4500_arm.s with the one in the µVsion project (after importing).


Georg Huba
0 Likes
chipper
Employee
Employee
Hi dorinjj - I am trying to figure out why you could not attach the pictures. The limit we have is 10 MB and a resolution of 620x280; are your pictures within this range?

kind regards
-chipper-
0 Likes
Not applicable
Hello,

I tested today a simple project with 3 Apps: PWMSP001, IO004 and SYSTM001 using the necessary files for update and it seems to be ok, but when I compiled the project with Keil I got some warnings, excluding that warnings like "...last line of file ends without a newline":


Rebuild target 'XMC4500-1024'

compiling DAVE3.c...
./Dave/Generated/src/DAVESupport/../../inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling MULTIPLEXER.c...
./Dave/Generated/src/DAVESupport/../../inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline
./Dave/Generated/src/DAVESupport/MULTIPLEXER.c(89): warning: #61-D: integer operation result is out of range
./Dave/Generated/src/DAVESupport/MULTIPLEXER.c(89): warning: #68-D: integer conversion resulted in a change of sign


compiling IO004.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling IO004_Conf.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling CCU8PWMLIB.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling Main.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline
./Main.c(45): warning: #111-D: statement is unreachable
./Main.c(17): warning: #177-D: variable "status" was declared but never referenced

compiling system_XMC4500.c...
assembling startup_XMC4500_arm.s...
..\..\DAVE312Patch\startup_XMC4500_arm.s(580): warning: A1581W: Added 2 bytes of padding at address 0x62

compiling CCU4GLOBAL.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling CCU4GLOBAL_Conf.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling CLK001.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling IO002.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling IO002_Conf.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling PWMSP001.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

compiling PWMSP001_Conf.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(83): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(90): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(91): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(92): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(93): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(111): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/PWMSP001/PWMSP001_Conf.c(112): warning: #188-D: enumerated type mixed with another type


compiling RESET001.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline
./Dave/Generated/src/RESET001/RESET001.c(133): warning: #188-D: enumerated type mixed with another type
./Dave/Generated/src/RESET001/RESET001.c(168): warning: #1-D: last line of file ends without a newline

compiling SYSTM001.c...
Dave/Generated/inc/DAVESupport/../../inc/SYSTM001/SYSTM001.h(558): warning: #1-D: last line of file ends without a newline

linking...
Program Size: Code=7964 RO-data=652 RW-data=36 ZI-data=1924
".\UV4Build\KeilTestDAVE312.axf" - 0 Error(s), 29 Warning(s).
Load "C:\\Temp\\workspace\\KeilTestDAVE312\\UV4Build\\KeilTestDAVE312.AXF"
Erase Done.
Programming Done.
Verify OK.
Application running ...
0 Likes
Not applicable
chipper wrote:
Hi dorinjj - I am trying to figure out why you could not attach the pictures. The limit we have is 10 MB and a resolution of 620x280; are your pictures within this range?

kind regards
-chipper-


Hello chipper,

Maybe because of the resolution from my pictures. My pictures had a Desktop resolution.
0 Likes