{"id":3025,"date":"2017-08-16T11:20:03","date_gmt":"2017-08-16T18:20:03","guid":{"rendered":"https:\/\/visualgdb.com\/w\/?p=3025"},"modified":"2018-09-07T17:20:44","modified_gmt":"2018-09-08T00:20:44","slug":"developing-cc3220s-wi-fi-projects-with-visual-studio","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/arm\/cc3200\/cc3220\/","title":{"rendered":"Developing CC3220 Wi-Fi Projects with Visual Studio"},"content":{"rendered":"<p>This tutorial shows how to use VisualGDB to create, build and debug a basic WiFi-enabled application for the CC3220S chip. We will start with creating a simple &#8220;Blinking LED&#8221; application, show how to verify the debug settings and then proceed to making and exploring a simple WiFi application.<\/p>\n<p>Before you begin, install VisualGDB.<\/p>\n<ol>\n<li>Start Visual Studio and select File-&gt;New Project-&gt;VisualGDB-&gt;Embedded Project Wizard:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/01-newprj1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4197\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/01-newprj1.png\" alt=\"01-newprj\" width=\"941\" height=\"653\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/01-newprj1.png 941w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/01-newprj1-300x208.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/01-newprj1-392x272.png 392w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/01-newprj1-130x90.png 130w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/a><\/li>\n<li>Proceed with the &#8220;Create a new project -&gt; Embedded Binary&#8221; choice:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/02-binary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4198\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/02-binary.png\" alt=\"02-binary\" width=\"886\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/02-binary.png 886w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/02-binary-300x235.png 300w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/a><\/li>\n<li>On the next page select the ARM toolchain and choose the CC3200S device. In this tutorial we will be using the <a href=\"http:\/\/www.ti.com\/tool\/cc3220sf-launchxl\">CC3220SF-Launchpad<\/a> board with the CC3220SF device featuring 1MB of FLASH memory, so ensure you select the &#8216;CC3220SF&#8217; version:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/03-device.png\"><br \/>\n<\/a><a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/03-device2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4199\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/03-device2.png\" alt=\"03-device\" width=\"886\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/03-device2.png 886w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/03-device2-300x235.png 300w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/a><\/li>\n<li>On the next page select the &#8220;Network Terminal&#8221; sample:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/04-terminal.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4200\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/04-terminal.png\" alt=\"04-terminal\" width=\"886\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/04-terminal.png 886w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/04-terminal-300x235.png 300w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/a><\/li>\n<li>Go to the Debug Method page and connect the board to your computer via USB. If you are using the latest OpenOCD package, VisualGDB will automatically recognize the TI XDS110 debug probe and the CC3220SF device and will configure OpenOCD accordingly:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/05-debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4201\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/05-debug.png\" alt=\"05-debug\" width=\"886\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/05-debug.png 886w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/05-debug-300x235.png 300w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/a><\/li>\n<li>Press &#8220;Test&#8221; to verify the settings.\u00a0VisualGDB will launch OpenOCD and ensure that the chip can be debugged:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/06-success.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4202\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/06-success.png\" alt=\"06-success\" width=\"886\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/06-success.png 886w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/06-success-300x235.png 300w\" sizes=\"(max-width: 886px) 100vw, 886px\" \/><\/a><\/li>\n<li>Press &#8220;Finish&#8221; to create the project and build it by pressing Ctrl-Shift-B:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/07-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4203\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/07-build.png\" alt=\"07-build\" width=\"1201\" height=\"739\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/07-build.png 1201w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/07-build-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/07-build-1024x630.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/li>\n<li>The network terminal sample will accept user commands over the on-board COM port. If you are using the Custom edition or higher, configure the Raw Terminal to open on the &#8220;XDS110 Class Application\/User UART&#8221; port:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/08-com10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4204\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/08-com10.png\" alt=\"08-com10\" width=\"1047\" height=\"655\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/08-com10.png 1047w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/08-com10-300x188.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/08-com10-1024x641.png 1024w\" sizes=\"(max-width: 1047px) 100vw, 1047px\" \/><\/a>If you are using a lower edition of VisualGDB,\u00a0you can use our free <a href=\"http:\/\/smartty.sysprogs.com\/\">SmarTTY<\/a> tool to open\u00a0the COM port outside Visual Studio.<\/li>\n<li>If the port doesn&#8217;t show up, try installing the latest XDS110 drivers from TI and\u00a0double-check the ports in\u00a0Device Manager:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-uart.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3039\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-uart.png\" alt=\"14-uart\" width=\"781\" height=\"572\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-uart.png 781w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-uart-300x220.png 300w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><\/a><\/li>\n<li>Start debugging your project and note how the program shows the help screen via the COM port:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/10-help.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4205\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/10-help.png\" alt=\"10-help\" width=\"1201\" height=\"739\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/10-help.png 1201w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/10-help-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/10-help-1024x630.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/li>\n<li>Run the following command to create a new Wi-Fi network:\n<pre class=\"\">wlan_ap_start -s CC3220<\/pre>\n<p><a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/11-started.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4206\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/11-started.png\" alt=\"11-started\" width=\"1201\" height=\"739\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/11-started.png 1201w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/11-started-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/11-started-1024x630.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/li>\n<li>Note the IP address reported by the demo program. Then connect to the CC3220 Wi-Fi network from your computer and open that address in a browser:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/18-page.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3043\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/18-page.png\" alt=\"18-page\" width=\"1106\" height=\"521\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/18-page.png 1106w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/18-page-300x141.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/18-page-1024x482.png 1024w\" sizes=\"(max-width: 1106px) 100vw, 1106px\" \/><\/a><\/li>\n<li>Now we will show how to run a basic TCP\/IP test. Open the socket_cmd.c file and locate the TCPServer() function:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/12-tcpserver.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4207\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/12-tcpserver.png\" alt=\"12-tcpserver\" width=\"1201\" height=\"739\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/12-tcpserver.png 1201w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/12-tcpserver-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/12-tcpserver-1024x630.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/li>\n<li>Use the &#8220;find all references&#8221; command to find that TCPServer() is called by the cmdSendCallback() function that is in turn registered as a callback for the &#8220;send&#8221; command. Set a breakpoint in the beginning of the TCPServer() function and type &#8220;send -p 1234&#8221; in the network terminal console:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/13-send.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4208\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/13-send.png\" alt=\"13-send\" width=\"1201\" height=\"739\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/13-send.png 1201w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/13-send-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/13-send-1024x630.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/li>\n<li>Run &#8220;telnet &lt;IP address of the board&gt; 1234&#8221; to connect to the board. Note how the sl_Send() function will get called to send test data via the connection:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-sent.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4209\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-sent.png\" alt=\"14-sent\" width=\"1201\" height=\"739\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-sent.png 1201w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-sent-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/14-sent-1024x630.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/li>\n<li>You can use the Code Map provided by the VisualGDB Clang IntelliSense engine to quickly find out the functions called by TCPServer() to get a quick overview of the TCP-related CC3220 API:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/22-methods.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3047\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/22-methods.png\" alt=\"22-methods\" width=\"1080\" height=\"789\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/22-methods.png 1080w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/22-methods-300x219.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/08\/22-methods-1024x748.png 1024w\" sizes=\"(max-width: 1080px) 100vw, 1080px\" \/><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to use VisualGDB to create, build and debug a basic WiFi-enabled application for the CC3220S chip.<\/p>\n","protected":false},"author":1,"featured_media":3049,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89],"tags":[55,146,56,102],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/3025"}],"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=3025"}],"version-history":[{"count":4,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/3025\/revisions"}],"predecessor-version":[{"id":4210,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/3025\/revisions\/4210"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media\/3049"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=3025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=3025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=3025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}