View Full Version : XMC4500 Software Design Without DAVE (Eclipse)

Apr 5th, 2013, 03:52 AM
I use for the microcontroller software design conventional
Programmer’s Notepad (or similar),
*.c and *.h text files,
Linker script *.ld file,
GCC compiler.
UART debugging.

I have successful projects with STM32, LPC_ARM and LPC_Cortex, LM4FG120.
Now I want to use the XMC4500 as well.

Is it possible to get the XMC4500 software examples with
plane *.c and *.h text files?


Apr 6th, 2013, 03:29 AM
I'm quite sure that there aren't any codeexamples included in the general documentation dealing with the XMC's registers because I found only tutorials and explames with DAVE apps.
But the DAVE3 IDE povides a complet header file where all registers and bitfields are definend as you can see here: http://www.infineonforums.com/threads/397-CCU4-Modul-PWM?p=1145&viewfull=1#post1145
Regards Jannis

Apr 9th, 2013, 02:04 AM
Pity, because DAVE hides many details of the low level code, which are
necessary to design new applications using the microcontroller
Reference Manual.
Maybe somebody of Infineon can comment this thread.

Best regards

Apr 9th, 2013, 02:54 AM
Hi vdaniel,

As DAVE3 is the main toolchains for XMC4500 micrcontroller, therefore, all the examples provided are based on DAVE3.
Nevertheless, like what Jannis said in this thread, DAVE3 IDE do provide the complete header file.
Therefore, you could use it and implement your software design in plain c. and.h files.
However, it is encourage to use DAVE apps for your software implementation as it will give you a correct initialization of the peripherals.

Apr 10th, 2013, 02:04 AM
Hi Jackson,

Thank you for response.
New questions.
1. What do you mean "DAVE3 IDE do provide the complete header file"?
What header file you write about?

2. I tried to copy and use come DAVE files in other IDE. Maybe I am
somehow blind, but how to understand the code from the UART001_Conf.c:
const UART001_HandleType UART001_Handle0 =
// Temp Code for testing Eval functions
.UartRegs = USIC0_CH0, /* Usic Channel offset value */
.Mode = 0, /* Mode */
.StopBit = 0,/* StopBit */
.Parity = 0,/* Parity */
.DataBits = 7,/* Word Length */
.BaudRate = 19200,/*Baud Rate */
.TxLimit = 1,/* FIFO Tigger Level */
.RxLimit = 1,/* FIFO Tigger Level */
.TxFifoSize = 1,/* Tx FIFO Size */
.RxFifoSize = 1,/* Rx FIFO Size */
.RecvNoiseEn = 0, /* Protocol specific interrupt enable */
.FormatErrEn = 0, /* Protocol specific interrupt enable */
.FrameFinEn = 0 /* Protocol specific interrupt enable */
If the C identifier can include the '.' character?

Great thanks in advance.

Apr 10th, 2013, 06:48 AM
The code you posted belongs to a DAVE APP which is a concept to minimize evaluation time at maximum functionality. This code can't work with any other IDE except DAVE3.
When using the registers of the XMC4500 you need to read the referencmanual and copy the headerfile XMC4500.h into your include path. You also need the standard startup code which is also provided with DAVE.
A short code example which generates a PWM signal on Port1 Pin3 can be found the post I linked in in a previous post.
Regards Jannis

Apr 25th, 2013, 04:27 AM

First I want to ask durchebrand not to response for this message.
It is addressed to Jackson as an Infineon Employee.
I want to note, that CMSIS standard if especially designed to simplify the applications
porting from one Cortex microcontroller to another.
So it is not clear to me, why it is used in the DAVE, which does not allow porting
Please, can you describe any procedure to strip the XMC4000 microcontroller
examples from DAVE specific code and made them accessible to programmers,
which use other software packages for Cortex applications development in the
plain C language.

It seems, that Infineon company should be interested to motivate as much
hardware and software designers to use their microcontrollers.

Best regards,


Apr 26th, 2013, 02:20 AM
Hi vdaniel,

Just to confirm your question, so you want to do the configuration using DAVE Apps and port the generated code into other IDE with only .c and .h file?
Am I correct?

Apr 26th, 2013, 03:58 AM

Jackson. Yes you are correct.
As an example of easy to use software you can see the TI software pack:
(need free registration).

Some explanation. I am co-worker of Munich Max Planck Institute for Physics and
have a lot of code written for other ARM and ARM Cortes microcontrollers (STM32, LPC) and
now for some reasons I plan to use the Infineon XLC series and port my existing code.
But I need to use DAVE Apps library for microcontroller specific peripherals, without
spending a lot of time to "reinvent the bicycle".
I hope you can help me, great thanks in advance.


Apr 28th, 2013, 11:48 AM
I also don't understand why Infineon don't release a XMC4000 peripheral library with examples for IDEs like GCC, Keil and EWARM. They need to understand that XMC4000 came after, so most customers are already working with other cortex-M4 and other toolchains. To facilitate the move to XMC4000 would be much better if we had a peripheral library, since the Cortex-M4 projects from the ST, Texas and others are based on peripheral libraries.


May 1st, 2013, 02:37 AM
Agreed too. I think Dave makes some things easier but also makes a lot of things more complex. I would prefer a thousand times a well documented library for each peripheral with a solid initialization procedure than what we got.

May 1st, 2013, 11:39 PM
Hi vdaniel,

Since you want to use DAVE3 for the configuration, so basically you just need to reference all the generated source and header files to your new tools.
The DAVE3 generated code can be compiled with all major compilers such as GCC, Keil-MDK, IAR or Tasking.
The only toolchain dependent is the startup.s and the linker script. This is something that you might need to added manually into your respective toolchain.

There are ways to port the whole DAVE3 project into IDE such as Keil or IAR EWARM.
If you need further info on this, please let me know.

May 2nd, 2013, 12:13 AM
Hi Jackson,

Sure I need (and as showed this discussion, not only me) information about

Great thank in advance,


May 3rd, 2013, 11:07 AM

How to port a DAVE3 project to EWARM?


May 8th, 2013, 03:19 AM
Please refer to the power point below on how we can port DAVE3 project into IAR EWARM.

May 8th, 2013, 10:01 AM
Hi Jackson,

Can you send references to similar materials about porting DAVE3 project into GCC (CodeSourcery) and Keil?

Great thanks in advance,


May 10th, 2013, 09:52 AM
Please refer to the power point below on how we can port DAVE3 project into IAR EWARM.

I follow the instruction, when I tried to build the project with EWARM I got the error message: "Build error: Multiple tools write to the same file."

I just did a ETH001 app configured to use with Relax kit.

main.c file:

#include <DAVE3.h> //Declarations from DAVE3 Code Generation (includes SFR declaration)

unsigned char GetBuffer[64];
long mylen;
unsigned char mydata[20];

int main(void)
unsigned short i;
status_t Status = DAVEApp_SUCCESS;

Status = Eth_InitNetworkInterface();

Status = Eth_OpenNetworkInterface();

for(i=0;i<64;i++) GetBuffer[i] = i+1;
Status = Eth_TransmitFrames(GetBuffer, 64);


return 0;

void Eth_Received_Data_Handler(uint32_t PacketBuffer, uint32_t PacketLength)
unsigned short i;
mylen = PacketLength;


Georg Huba
May 12th, 2013, 02:04 PM
Hi vdaniel and others,

I think this thread requires some clarification about the concept of DAVE version 3 and interfaces to other tools

What is DAVE v. 3?
DAVE v.3 is a free development tool platform (Eclipse IDE, ARM GCC, TASKING debugger, …)
The unique thing is the code generation feature based on DAVE Apps. DAVE Apps are predefined Application use case oriented SW components. DAVE Apps abstract the application use case (and the required chip HW).

Concept of generated code:
Essentially the generated code is a library. Each DAVE App provides a well documented set of APIs that the user can use like a library. Unless the static libraries provided for other microcontrollers with DAVE it is possible to configure the library via a GUI and to manage resources and pin assignment (resource solver that prevents conflicts): Based on the project requirements the user selects the required SW components (DAVE Apps), configures them and generates the respective library code.

In most of the cases the following files are generated per DAVE App (see the Dave\Generated\... folder in the project):
<appname>_Conf.c (contains the data structure – one for each instance- that essentially holds configuration data)
<appname>_Conf.h (contains the respective declarations)
<appname>.c (contains all library functions )
<appname>.h (contains the related declarations)

Each project contains a default SW component called DAVESupport App. This DAVE App provides top level initialization code to configure multiplexers and ports (e.g. to provide the correct connectivity if a PWM signal should trigger and ADC start) and the top level init function that consolidates the chip initialization in a correct manner.

Using the generated code in other tools
The generated code (or if you will the generated library) can be used in any other tool. It is not at all required to only use it in DAVE. To use the generated code in any other tool, essentially copy or reference the complete generated folder to the other tool and make sure that include paths and possibly library paths are set correctly in the settings of the other tool. If the other tool doesn’t include the CMSIS header and startup files(and linker script) they also have to be added to the project. Some tools like Keil and IAR provide specific support to use the DAVE generated code in their IDE. We are currently preparing a tutorial how this can be done for the various tools.

May 12th, 2013, 08:48 PM
Hi Amsantos,

Sorry, just found out that the current template in the EWARM is not compatible.
Attached the correct template to use the DAVE generated code.

After you unzipped the attached zipped file, there is a folder called "Infineon".
Please replace all the contains in the Infineon folder to C:\Program Files\IAR Systems\Embedded Workbench 6.5_2\arm\examples\Infineon .
And then you can follow the instructions that provided by the power point previously.

May 22nd, 2013, 05:57 AM
I too, chime in for a peripheral library, preferably in ROM, something like the Stellaris driverlib. Really miss that ...

Aug 1st, 2013, 02:03 AM
Hey Infineon team,

I would like to open this thread again cause I am new to Xmc4500 and i would learn the basics. I've managed to implement the simple Blinky demo without dave.
I am using the arm yagarto toolchain and tools.
After that I wanted to use code generated by dave "Example UART001". This example compiled with dave works. So i copied the generated data into my project, adjust the makefile and I got no erros..

But the Uart doesn´t work.
while((UART001_GetFlagStatus(&UART001_Handle0,UART001_FIFO_STD_RECV_BUF_FLAG))!= UART001_SET);
I came not out of this loop.

Please help

best regards

Aug 1st, 2013, 03:31 AM
I got it..At the beginning I clear the flaq"UART 001_FIFO_STD_RECV_BUF_FLAG" and now it works.

Is it due to my starup file?

Aug 8th, 2013, 01:05 AM
DAVE created code is very complex, written to be universal or whatever. You also have to look at different generated modules, Like code for the clock, code for pin multiplexing, code for the UART and may be more.
I went through the same hell while building a CANopen application with the help of some code generated with the DAVE CAN examples and the Rowleys CrossWorks IDE. I really wonder if the DAVE code has to be that complex.


Aug 11th, 2013, 10:00 PM
Thanks for the feedback. We shall see how we can improve this in the furture.

Dec 5th, 2013, 08:18 PM
Dear All

I agree with Heinz opinion that DAVE apps generate universal code that rather quite complex. However, the DAVE apps surely give fast implementation with the provided apps but losing the detail with low level configuration. I hope that Infineon would release peripheral library that can be used easily with other tool chain.

Feb 27th, 2014, 01:46 PM
I'd like to bring this to the forefront again in requesting a peripheral library separate from DAVE (similar to ST's Standard Peripheral Library or Atmel's ASF).

I have several large, fairly complex codebases with involved build systems, and have already spent quite a lot of time designing hardware agnostic device drivers. Having the ability to simply re-write the lowest level HAL code and link it against your library would make me switch to the XMC4500 in a second.

Feb 27th, 2014, 10:01 PM
Dear all,

Your voice has been heard. :)
We are currently developing our next DAVE platform with this concept in mind.

Mar 7th, 2014, 06:10 PM
Other vendors: take note, this is customer service done right :D.

With this now in the works and given that your processors documentation is top notch, my company has decided to select the XMC4500 for our next project. Thank you so much!

Mar 11th, 2014, 03:46 AM
My two cents:

Just take a programmer-centric path and don't focus too much on GUIs and helpers; Having a GUI to put parameters is nice, but having a well done library that can be compiled with defines and other tools to give you what you want is far better. You can also make something similar to Keil and allow special pragmas in the .h config files to allow GUI edition (I think they had something along those lines). GUI is good, but first ensure the code base is good and easy to use, then put an optional wrapper on top.

Mar 11th, 2014, 03:29 PM
When this new Dave platform will be released?


May 6th, 2014, 01:34 AM

any news on the new DAVE platform?

May 10th, 2014, 11:21 AM

by when will this be available?


May 14th, 2014, 01:51 AM
Hi all,

As of today planning, the new platform is expected to be available on 3rd quarter this year.

May 19th, 2014, 02:42 AM
What “durchgebrannt” wrote is WRONG („This code can't work with any other IDE except DAVE3.“).
You can easily switch to other toolchains:
And it would be a pity if you would not use DAVE - I mean the codegenerator!

Dmitry Podobedov
May 19th, 2014, 04:21 AM
There are enough examples where the code generator makes wrong code or just can't be used. Moreover, it generates sometimes too much overhead and not efficient code.

Oct 1st, 2014, 09:45 PM
Hi all,

As of today planning, the new platform is expected to be available on 3rd quarter this year.

Any news on this?

It is now Q4, I downloaded the latest dave (in zipfile configuration), unzipped, had to install Wine since there was a windows only executable that was contained within the zip file annnnnd..... No libraries. Just the same old Eclipsed based rubbish.
(Why would you offer a zip option as an alternative to the windows installer if you're just going to zip up a windows installer?!?)

And it would be a pity if you would not use DAVE - I mean the codegenerator!

I hate to beat a dead horse, but the absolute _last_ thing I want is for my hardware abstraction libraries to be autogenerated. It's a pity that you would force people to use it.
It doesn't give me value (especially since I cant use it...), and it doesn't save me time, it just creates frustration.

Oct 1st, 2014, 10:32 PM

The new platform is currently on internal testing.
It is expected to be released to the market on Q1 next year.
Hope you guys will be looking forward to it.. ;)

Oct 2nd, 2014, 06:18 PM

The new platform is currently on internal testing.
It is expected to be released to the market on Q1 next year.
Hope you guys will be looking forward to it.. ;)

Thanks for the update!

Sorry to get grumpy about it, but I'm sort of blocked on starting a project until this issue is resolved.


Oct 2nd, 2014, 07:29 PM
Hi Jeff,

Mind to tell us your problem?
Perhaps we can guide you along the way..
We do have customer using our DAVE and has started their prototype and ready for SOP.

Oct 4th, 2014, 05:01 PM
Hi Jeff,

Mind to tell us your problem?
Perhaps we can guide you along the way..
We do have customer using our DAVE and has started their prototype and ready for SOP.


I would summarize it as follows:
1) We don't want to have any vendor or platform specific tooling in our build chain. Vendor code is fine in source form as it can be checked in and compiled into a library archive, but having to use a windows only tool to generate source is out.
2) We have a fairly varied team in terms of development environment preference, therefore everything is designed to the lowest common denominator (GCC / Make) to allow each developer to use their editor of choice. If we decide to add in a new peripheral (USB for example), it should be as easy as reading the documentation and using the supplied code and headers to implement a solution. We shouldn't need a GUI based tool to check off some boxes and have to generate new code.
3) We try to keep our VCS clean, and don't want it littered with project files from some codegen tool.
4) According to above posts, there will be source form libraries coming out in the future, and I don't want to duplicate effort and roll my own using the CMSIS headers and banging values into registers if I can use a vendor provided/supported library in the near future.

Nov 19th, 2014, 04:28 PM

The new platform is currently on internal testing.
It is expected to be released to the market on Q1 next year.
Hope you guys will be looking forward to it.. ;)

Great! Can't wait to see the new reborn development library.

Nov 20th, 2014, 11:10 AM

I would summarize it as follows: ...

Great summary! This is exactly what is needed.


Dec 11th, 2014, 11:40 AM

The new platform is currently on internal testing.
It is expected to be released to the market on Q1 next year.
Hope you guys will be looking forward to it.. ;)

Can't wait to see/hear more about this also. Can we get on an e-mail list for updates?

Feb 25th, 2015, 11:10 PM
Hi, XMC Lib finally has been released:


with a new version of DAVE 4.0