XMC4500 Software Design Without DAVE (Eclipse)

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

cross mob
Not applicable
I use for the microcontroller software design conventional
toolchain:
Programmer’s Notepad (or similar),
*.c and *.h text files,
Makefile,
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?

vdaniel
0 Likes
43 Replies
Not applicable
Hi
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
0 Likes
Not applicable
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
0 Likes
Not applicable
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.
0 Likes
Not applicable
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.
0 Likes
Not applicable
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
0 Likes
Not applicable
Hi,

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
itself.
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,

vdaniel
0 Likes
Not applicable
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?
0 Likes
Not applicable
Hi,

Jackson. Yes you are correct.
As an example of easy to use software you can see the TI software pack:
http://www.ti.com/tool/sw-ek-tm4c123gxl
(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.

vdaniel
0 Likes
User2235
Level 3
Level 3
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.

Ari
0 Likes
User3847
Level 3
Level 3
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.
0 Likes
Not applicable
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.
0 Likes
Not applicable
Hi Jackson,

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

Great thank in advance,

vdaniel
0 Likes
User2235
Level 3
Level 3
Jackson,

How to port a DAVE3 project to EWARM?

Ari.
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Please refer to the power point below on how we can port DAVE3 project into IAR EWARM.
0 Likes
Not applicable
Hi Jackson,

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

Great thanks in advance,

vdaniel
0 Likes
User2235
Level 3
Level 3
Jackson wrote:
Please refer to the power point below on how we can port DAVE3 project into IAR EWARM.


Jackson,
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 //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;
DAVE_Init();

Status = Eth_InitNetworkInterface();


Status = Eth_OpenNetworkInterface();


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



while(1)
{

}
return 0;
}

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


}
0 Likes
Georg_Huba
Employee
Employee
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):
_Conf.c (contains the data structure – one for each instance- that essentially holds configuration data)
_Conf.h (contains the respective declarations)
.c (contains all library functions )
.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.
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
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.
0 Likes
User6793
Level 4
Level 4
I too, chime in for a peripheral library, preferably in ROM, something like the Stellaris driverlib. Really miss that ...
0 Likes
Not applicable
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
Meyer
0 Likes
Not applicable
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?
0 Likes
Not applicable
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.


Regards
Heinz
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Thanks for the feedback. We shall see how we can improve this in the furture.
0 Likes
Not applicable
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.
0 Likes
Not applicable
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.
0 Likes
Not applicable
Dear all,

Your voice has been heard. 🙂
We are currently developing our next DAVE platform with this concept in mind.
0 Likes
Not applicable
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!
0 Likes
User3847
Level 3
Level 3
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.
0 Likes
User2235
Level 3
Level 3
Jackson,
When this new Dave platform will be released?

Ari.
0 Likes
Not applicable
hi,

any news on the new DAVE platform?
0 Likes
Not applicable
Great,

by when will this be available?

Kurt
0 Likes
Not applicable
Hi all,

As of today planning, the new platform is expected to be available on 3rd quarter this year.
0 Likes
WilhelmBrezovit
Employee
Employee
First solution authored Welcome! 10 replies posted
What “durchgebrannt” wrote is WRONG („This code can't work with any other IDE except DAVE3.“).
You can easily switch to other toolchains:
http://www.infineon.com/cms/en/product/promopages/aim-mc/DAVE_3_Support_Portal/Third-Party-Support.h...
http://www.keil.com/appnotes/docs/apnt_258.asp
http://www.keil.com/appnotes/files/apnt_258.pdf
And it would be a pity if you would not use DAVE - I mean the codegenerator!
0 Likes
User6412
Level 4
Level 4
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.
0 Likes
Not applicable
Jackson wrote:
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?!?)

WilhelmBrezovits wrote:

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.
0 Likes
Not applicable
Hi,

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.. 😉
0 Likes
Not applicable
Jackson wrote:
Hi,

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.

Jeff
0 Likes
Not applicable
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.
0 Likes
Not applicable
Jackson wrote:
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.


Sure.

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.
0 Likes