{"id":1866,"date":"2016-04-13T00:01:40","date_gmt":"2016-04-13T07:01:40","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=1866"},"modified":"2016-04-13T00:01:40","modified_gmt":"2016-04-13T07:01:40","slug":"developing-for-the-xmc2go-kit-with-visual-studio","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/arm\/infineon\/xmc2go\/","title":{"rendered":"Developing for the XMC2Go Kit with Visual Studio"},"content":{"rendered":"<p>This tutorial shows how to develop firmware for the <a href=\"http:\/\/www.infineon.com\/cms\/en\/product\/evaluation-boards\/KIT_XMC_2GO_XMC1100_V1\/productType.html?productType=db3a304443537c4e01436ccecb5d154f\">Infineon XMC2Go kit<\/a> with Visual Studio and VisualGDB. Before you begin, install <a href=\"http:\/\/visualgdb.com\/download\/\">VisualGDB<\/a>.<\/p>\n<ol>\n<li>Start Visual Studio and begin creating a new project with the VisualGDB Embedded Project Wizard:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b01-prjname.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1844\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b01-prjname.png\" alt=\"b01-prjname\" width=\"786\" height=\"535\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b01-prjname.png 786w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b01-prjname-300x204.png 300w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/a><\/li>\n<li>Proceed with the default &#8220;Embedded Binary&#8221; selection:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b02-binary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1845\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b02-binary.png\" alt=\"b02-binary\" width=\"738\" height=\"565\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b02-binary.png 738w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b02-binary-300x230.png 300w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/a><\/li>\n<li>On the &#8220;Device Selection&#8221; 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:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmc.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1878\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmc.png\" alt=\"xmc\" width=\"738\" height=\"565\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmc.png 738w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmc-300x230.png 300w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/a><\/li>\n<li>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:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b04-sample.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1847\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b04-sample.png\" alt=\"b04-sample\" width=\"738\" height=\"565\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b04-sample.png 738w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b04-sample-300x230.png 300w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/a><\/li>\n<li>The module comes with an on-board Segger J-Link debugger, so simply select the Segger debug method from the list and press &#8220;Finish&#8221; to generate your project:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmcd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1879\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmcd.png\" alt=\"xmcd\" width=\"738\" height=\"600\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmcd.png 738w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/xmcd-300x244.png 300w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/a>Note 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).<\/li>\n<li>Once the project is generated, you can build it by pressing Ctrl-Shift-B:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b06-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1849\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b06-build.png\" alt=\"b06-build\" width=\"925\" height=\"678\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b06-build.png 925w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b06-build-300x220.png 300w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/a><\/li>\n<li>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: <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledon1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1867\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledon1.jpg\" alt=\"ledon\" width=\"700\" height=\"208\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledon1.jpg 700w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledon1-300x89.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>Set a breakpoint in the SysTick_Handler() function and wait for it to trigger. Then use the Hardware Registers window to locate the P1-&gt;OUT register:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b07-step.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1850\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b07-step.png\" alt=\"b07-step\" width=\"925\" height=\"678\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b07-step.png 925w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b07-step-300x220.png 300w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/a><\/li>\n<li>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:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b08-unflag.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1851\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b08-unflag.png\" alt=\"b08-unflag\" width=\"925\" height=\"678\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b08-unflag.png 925w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b08-unflag-300x220.png 300w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/a><\/li>\n<li>Note how this turns off\u00a0 the LED:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledoff1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1868\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledoff1.jpg\" alt=\"ledoff\" width=\"700\" height=\"187\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledoff1.jpg 700w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/ledoff1-300x80.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>You can use the Code Map feature provided by VisualGDB&#8217;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:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b09-codemap.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1852\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b09-codemap.png\" alt=\"b09-codemap\" width=\"925\" height=\"490\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b09-codemap.png 925w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/04\/b09-codemap-300x159.png 300w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to develop firmware for the Infineon XMC2Go kit with Visual Studio and VisualGDB. Before you begin,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89],"tags":[53,127,59],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/1866"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=1866"}],"version-history":[{"count":3,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/1866\/revisions"}],"predecessor-version":[{"id":1881,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/1866\/revisions\/1881"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=1866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=1866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=1866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}