Jump to content
Sign in to follow this  
adrianF

Import Energia sketches into Code Composer Studio v6 // enabling true debugging on a sketch

Recommended Posts

Hi 43oh folks!

 

I wrote a quick blog post & tutorial on the www.energia.nu website. I wanted to walk through the process of setting up Code Composer Studio v6 to enable Energia sketch imports. This is a cool new feature that takes full advantage of the on-board hardware debugger that is available on our LaunchPad kits & allows developers to go beyond Serial.print().

 

This provides a nice migration path from Energia to CCS. Energia is great for rapid prototyping, but there are times when a true debugger could be helpful. With CCSv6, we can now import Energia sketches & get full debug features such as:

- Hardware breakpoints

- Watching variables

- Stepping through code line-by-line

- More!

 

You can see my blog post & tutorial @ http://energia.nu/go-beyond-serial-print-put-the-launchpads-on-board-debugger-to-work-import-energia-sketches-into-ccsv6/

 

Thanks!
Adrian

Share this post


Link to post
Share on other sites

That sounds really useful. I've always been confused as to why Arduino/Energia was so popular with an essential feature like debugging completely missing.

Share this post


Link to post
Share on other sites

That sounds really useful. I've always been confused as to why Arduino/Energia was so popular with an essential feature like debugging completely missing.

In a nutshell, there's a big misunderstanding about Arduino and Energia.

 

Actually, they pack 2 different things:

 

 

Share this post


Link to post
Share on other sites

That sounds really useful. I've always been confused as to why Arduino/Energia was so popular with an essential feature like debugging completely missing.

 

Just to echo what Rei Vilo says, the power of Energia is collection of abstracted APIs that enable developers to rapidly prototype a solution without having to worry about flipping bits at the underlying MCU-specific register level. 

This is great for someone who wants to get something up and running quickly, completely skipping the step of learning the registers of a potentially new MCU device.

 

In addition, with Energia being based on the Wiring Framework, it allows a community to use a set of "known" functions for toggling I/O, PWM, I2C, SPI, etc, which allows libraries to be created and built upon using these core APIs. This means someone could write 1 library that leverages underlying Energia core APIs, and their library would port across many MCU platforms. This is why there is such a huge & growing collection of sensor libraries, display libraries, wireless libaries, etc in the Wiring/Energia/Arduino communities.

 

Lastly, the CCSv6 import capability is interesting because it provides a way for people to rapidly prototype in Energia, then once a rev 0.1 is up and running, they can import into CCSv6 & optimize towards version 1.0

 

Thanks!

Adrian

Share this post


Link to post
Share on other sites

@ReiVilo @@adrianF I get what Arduino/Energia is and what it does. (I even tried Energia recently.) I understand the benefits and I'm all for making life and coding easier. For instance I find Grace a real timesaver and I'm not ashamed to admit getting some help setting up my peripherals. I always say "of course, that's obvious" when I see the Grace code but know I'd spend a while frustrated if I did it all from scratch myself.

 

However for Arduino I just think that the benefits are outweighed by the drawbacks. Breakpoints and debugging are so useful that it's too much of a loss. Also if you have a HAL that means you don't need to know the details of the device you're using, then you tend to lose access to what made that microcontroller better than the competition.

 

Getting back to the original post, I'm glad to see one of these points has been addressed.

Share this post


Link to post
Share on other sites

However for Arduino I just think that the benefits are outweighed by the drawbacks. Breakpoints and debugging are so useful that it's too much of a loss. Also if you have a HAL that means you don't need to know the details of the device you're using, then you tend to lose access to what made that microcontroller better than the competition.

 

About the first point, you can use both CCS6 for breakpoints and debugging and the Energia framework for high level interface at the same time. This was the major novelty of CCS6 over previous releases. 

 

Both are complementary and work well together. I use debugging on Xcode with the embedXcode plug-in.

 

?I agree with the scone point: the hardware abstraction layer may let the user ignore what's going on underneath. However, the other layers are very easy to call, for example for high performance routines: I'm using TivaROM and then, MSP430Ware or TivaWare

 

?I don't know other platform with so large a choice of software interfaces, from high hardware independent level to low register level.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×