{"id":125,"date":"2014-03-25T20:57:31","date_gmt":"2014-03-26T03:57:31","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=125"},"modified":"2021-03-09T12:02:43","modified_gmt":"2021-03-09T20:02:43","slug":"arm-kinetis-twr-k60","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/arm\/kinetis\/twr-k60\/","title":{"rendered":"Creating TWR-K60 module projects with Visual Studio"},"content":{"rendered":"<p>This tutorial shows how to create a basic project for the TWR-K60D100M module based on the MK60DN512VMD10 microcontroller using Visual Studio and VisualGDB.<\/p>\n<p>Before you begin ensure that you have <a href=\"http:\/\/visualgdb.com\/download\/\">VisualGDB 4.1<\/a> or later installed.<\/p>\n<ol>\n<li>Launch Visual Studio. Open the New Project window and select VisualGDB Embedded Project Wizard:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/01-projectname.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/01-projectname.png\" alt=\"01-projectname\" width=\"700\" height=\"394\" \/><\/a><\/li>\n<li>In this tutorial we will create a simple stand-alone project. Select &#8220;embedded binary&#8221; and continue to the next page. <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/02-binary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/02-binary.png\" alt=\"02-binary\" width=\"702\" height=\"616\" \/><\/a><\/li>\n<li>On the next page select the arm-eabi toolchain. If you don&#8217;t have it installed, VisualGDB will download it for you automatically:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/03-arm.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/03-arm.png\" alt=\"03-arm\" width=\"702\" height=\"616\" \/><\/a><\/li>\n<li>Click &#8220;download support for more devices&#8221; and select Freescale Kinetis in the list. VisualGDB will download headers and libraries for Kinetis devices:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/04-bspdownload.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/04-bspdownload.png\" alt=\"04-bspdownload\" width=\"500\" height=\"300\" \/><\/a><\/li>\n<li>Select <strong>MK60DN512xxx10<\/strong> from the device list. In this tutorial we will create a project that will be placed in the SRAM memory, keeping the FLASH contents unchanged. Select &#8220;SRAM&#8221; in the list below: <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/05-device.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/05-device.png\" alt=\"05-device\" width=\"702\" height=\"616\" \/><\/a><\/li>\n<li>Click &#8220;Next&#8221;. VisualGDB will test the toolchain and ensure that it can compile and link binaries for your device:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/06-test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/06-test.png\" alt=\"06-test\" width=\"484\" height=\"294\" \/><\/a><\/li>\n<li>The next page allows customizing the &#8216;Blinking LED &#8216;sample generated by VisualGDB. According to TWR-K60100M schematics, a green LED is connected to PA29:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/07-led-sch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/07-led-sch.png\" alt=\"07-led-sch\" width=\"668\" height=\"431\" \/><\/a>Select &#8220;PTA&#8221; and &#8220;29&#8221; as &#8220;LED Port group&#8221; and &#8220;LED Port Number&#8221; respectively: <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/08-led.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/08-led.png\" alt=\"08-led\" width=\"702\" height=\"508\" \/><\/a><\/li>\n<li>The module contains the OSBDM\/OSJTAG interface that allows debugging the microcontroller without any external hardware. We will use the OpenOCD tool to connect to it. Select OpenOCD as the debug method on the next page. If it&#8217;s not available, click &#8220;Download support for more debug methods&#8221;. Select &#8220;OSBDM&#8221; as the interface:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/10-openocd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/10-openocd.png\" alt=\"10-openocd\" width=\"702\" height=\"586\" \/><\/a><\/li>\n<li>Click &#8220;Test selected OpenOCD settings&#8221; to test their validity. VisualGDB will launch OpenOCD and ensure that it can connect to your board:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/14-test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/14-test.png\" alt=\"14-test\" width=\"663\" height=\"542\" \/><\/a><\/li>\n<li>You can always switch to the manual mode to customize various OpenOCD settings:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/10a-manual.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/10a-manual.png\" alt=\"10a-manual\" width=\"702\" height=\"655\" \/><\/a><\/li>\n<li>Press &#8220;Finish&#8221; to have your project created. Build it by pressing Ctrl-Shift-B:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/15-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/15-build.png\" alt=\"15-build\" width=\"698\" height=\"695\" \/><\/a><\/li>\n<li>Press F5 to start debugging your project. Once you see the LED blinking, put a breakpoint on the line that turns on the LED:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/16-breakpoint.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/16-breakpoint.png\" alt=\"16-breakpoint\" width=\"698\" height=\"695\" \/><\/a><\/li>\n<li>Press F10 to step over the line. See how the LED turns on:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/17-green-led.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/17-green-led.png\" alt=\"17-green-led\" width=\"700\" height=\"512\" \/><\/a><\/li>\n<li>You can change between SRAM and FLASH modes and customize many other settings in the VisualGDB Project Properties dialog that can be opened by right-clicking on your project in Solution Explorer and selecting &#8220;VisualGDB Project Properties&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/18-properties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/arm\/kinetis\/twr-k60\/18-properties.png\" alt=\"18-properties\" width=\"700\" height=\"638\" \/><\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to create a basic project for the TWR-K60D100M module based on the MK60DN512VMD10 microcontroller using Visual<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[53,207,59],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/125"}],"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=125"}],"version-history":[{"count":1,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":192,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/125\/revisions\/192"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}