In my last post, I have walked you through on how to write firmware for the MSP430 using Visual Studio and VisualGDB. This post however is now focused on developing for the CC3200 using Visual Studio.
TI's CC3200 was not officially supported by VisualGDB, and so will have to follow their legacy tutorial on how to setup the development environment. This tutorial however is a bit cumbersome and you will have to extract the GCC flags from the example make files. Below are the VisualGDB (GCC) settings used for this approach. Ensure that the CC3200 SDK has been installed in the default directory.
Argument | Value |
Include Directories | C:\ti\CC3200SDK_1.0.0\cc3200-sdk\inc C:\ti\CC3200SDK_1.0.0\cc3200-sdk\driverlib ${ProjectDir} |
PreProcessor macros | gcc |
Entry Point Argument |
|
Linker Script | C:\ti\CC3200SDK_1.0.0\cc3200-sdk\tools\gcc_scripts\cc3200.ld |
Additional Libraries | "add path as required." C:\ti\CC3200SDK_1.0.0\cc3200-sdk\driverlib\gcc\exe\libdriver |
CPU type flag | -mcpu=cortex-m4 |
There is one big hurdle with this approach, and that is debugging. Setting up the environment to debug the firmware was a bit tricky such that it requires changes to OpenOCD, one needs to configure the connection interface with LaunchpadXL, etc. which I had serious struggle getting that up and running. So I contacted SysProgs support team and ask them to lend me a hand on how to get debugging work on the CC3200. Kudos to the support team, that not only they helped me out on how to configure the debugger, they actually made updates and patches to OpenOCD and officially support the CC3200. My contribution to them was really about testing the update and providing feedback. The tutorial can be found here.
I have tried the TI's sample applications by following the tutorials and they do work as expected. Then I tried creating another project based on the tcpSocket example from which I will build my firmware for the sensor nodes. My current VS solution now looks like the image below.
Some important stuff:
- If you have setup VisualGDB before and have OpenOCD already installed, you will have to manually delete the folder C:\Users\<CurrentUser>\AppData\Local\VisualGDB\EmbeddedDebugPackage\com.sysprogs.arm.openocd. If this folder has not been deleted, VisualGDB will throw an error in Step 5 of the tutorial.
- When selecting the CC3200 MCU variant, if your CC3200 LaunchpadXL board is rev 3.2, choose XCC3200HZ (170Kb RAM variant). Better yet, check the chip marking.
- Possibly the most important part. Microsoft has released Visual Studio Community Edition which has all the capabilities of the VS Professional variant but FREE. You can download Visual Studio Community Edition here.
Now that the development environment has been setup for my sensor nodes, my next posts will be more design-focused and will go through the guts of the CFMS (Carbon Footprint Monitoring System).
Top Comments