Developing for the XMC2Go Kit with Visual Studio

This tutorial shows how to develop firmware for the Infineon XMC2Go kit with Visual Studio and VisualGDB. Before you begin, install VisualGDB.

  1. Start Visual Studio and begin creating a new project with the VisualGDB Embedded Project Wizard:b01-prjname
  2. Proceed with the default “Embedded Binary” selection:b02-binary
  3. On the “Device Selection” page select the ARM toolchain and pick the XMC1100-0064 device that is installed on the XMC2Go kit. If this is the first time you are creating a project for Infineon devices, VisualGDB will download all the necessary files automatically:xmc
  4. On the Sample Selection page proceed with the default LEDBlink sample and select the P1_0 pin where the LED on the XMC2Go module is connected:b04-sample
  5. The module comes with an on-board Segger J-Link debugger, so simply select the Segger debug method from the list and press “Finish” to generate your project:xmcdNote that the older releases of the Segger software package sometimes cannot program the XMC2Go board correctly. Please ensure you are using the latest one (v5.12 or later).
  6. Once the project is generated, you can build it by pressing Ctrl-Shift-B:b06-build
  7. Connect your module to the USB port, ensure the Segger drivers are installed and press F5 to start debugging. The red LED in the corner of the module will start blinking: ledon
  8. Set a breakpoint in the SysTick_Handler() function and wait for it to trigger. Then use the Hardware Registers window to locate the P1->OUT register:b07-step
  9. You can use the Hardware Registers window to see how the register values change when various functions are called and you can also modify the register values manually. E.g. you can set the P0 checkbox to manually set the pin state to high:b08-unflag
  10. Note how this turns off  the LED:ledoff
  11. You can use the Code Map feature provided by VisualGDB’s Clang-based IntelliSense engine to quickly visualize relations between your functions. E.g. you can quickly plot how the Reset_Handler() calls SystemInit() that calls SystemCoreClockSetup() and a few other functions:b09-codemap