Programming my XMC easily and modernly

This tutorial is for readers who already have knowledge of any programming language and are also familiar with the object-oriented programming of Infineon's XMC microcontrollers. It is not a C ++, UML or ARM programming tutorial in the strict sense and therefore does not claim to be complete or general in these areas. Here, especially with selected aspects for the easy entry into the object-oriented programming of XMC microcontrollers is to be dealt with.

Selected sections of this tutorial are specifically designed for holders of a current SiSy license. The user has personal access data for this area after purchasing the product. The data for the first steps are universal and accessible to everyone in the public section. In cooperation with the free SiSy DEMO they should be a good start-up aid and a taster course for more knowledge for all those interested. The tutorial will also be further developed. So it pays to keep looking in and out.

Have fun with this little tutorial!

Introduction

Infineon combines its many years of experience in the XMC microcontroller family with the benefits of the ARM Cortex-M. At the same time, Infineon is working intensively on the challenges faced by developers due to increasing software complexity. One direction of development is DAVE. DAVE is an embedded Eclipse code generator designed to help developers build application-specific applications and libraries from low-level drivers and middleware. A second development direction to master the increasing software complexity is the object-oriented approach and the UML. So we are already in the content of this tutorial.

The object orientation was originally set to make programming easier. In practice, however, object-oriented languages ​​are more a hurdle, not a relief, to many. That does not have to be that way. Assembler and C are not really simpler than C ++. Make yourself opinion on the following code snippets yourself.

// "klassische" Schreibweise ///////////////////////////////////////
PORT0->IOCR4 &= ~0x0000f800UL;
PORT0->IOCR4 |= 0xC0U << 8;
PORT0->OMR = 0x00200020UL;
// objektorientierte Schreibweise /////////////////////////////////
Led led;
led.config(PORT0,5);
led.on();

I think this little example clearly shows that an object-oriented approach and programming can lead to much more understandable source code. You could also say that you have reached the goal of object orientation if the program code can be read as clear text. We do not want to be deterred by concerns and inner hurdles to work object-oriented. First, it is necessary to create the conditions for the work.

„Every new language is like an open window,
     that opens up a new view of the world
     and the concept of life widens. „

Frank Harris (1856-1931), American writer

A few theoretical basics

Before you dive into the practical side of the tutorial, you should (but do not have to) study the following theoretical basics and internalize as far as possible: * Basic concepts * object-oriented programming languages * Graphic Programming with the UML

Requirements for practical work

Working through this tutorial works best with the appropriate one    * Hardware and    * Development environment as well as a small one    * Shopping List.

Erste Schritte im klassischen C

Die Programmierung im klassischen C kann man sich ruhig einmal antun. Um so mehr wird man die Klassen aus dem XMC++ Framework schätzen lernen. Des Weiteren finden sich im Netz auch jede Menge Beispiele in klassischem C. Die folgenden Abschnitte befähigen Sie, sich diese zugänglich zu machen. Falls Sie lieber gleich objektorientiert in C++ und UML anfangen möchten, dann überspringen Sie diesen Abschnitt einfach.

Erste Schritte in C++ und der UML

So, jetzt schalten wir ein paar Gänge höher. Zum einen arbeiten wir in den nächsten Abschnitten objektorientiert und benutzen als Entwicklungsumgebung keinen herkömmlichen Zeileneditor, sondern das UML-Klassendiagramm.

Anwendungsbeispiele mit der UML programmieren

Weiterführendes