Jump to content

Debugging with Energia?

Recommended Posts

Is there any chance to implement debugging with Energia?


The manual procedure works fine with Terminal windows on Mac OS X, although everything is manual.


One of the unparalleled key feature of the LaunchPad is the built-in hardware debugger. Alas, how to use in an easy way? I'd like to set breakpoint and monitor variables.



Here's the manual procedure. On a first Terminal window, launch

/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/mspdebug/mspdebug rf2500 gdb


On a second Terminal window, launch


/Applications/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/msp430-gdb /var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build2770014008396495792.tmp/mySketch.cpp.elf



with mySketch being the name of the sketch on Energia and /var/folders/kd/70m4ltxn14l086ddy860ff3c0000gn/T/build2770014008396495792.tmp/ the name of the path.


To know the name of the path, check the Show verbose output during compilation on the preference pane of Energia and have a look at the console. Something like 







should appear at the end after a successful compilation.


On the second window of the Terminal, a prompts appears:










(gdb) tar rem localhost:2000




Now you can type commands like 




(gdb) list





For more information about the gdb commands, please refer to the manual available at the http://sourceware.org/gdb/download/onlinedocs/'>GDB: The GNU Project Debugger

Link to post
Share on other sites

Of course I can not speak for Robert, or anyone else on the Energia team. But debugging, then displaying, and possibly implementing UI interaction would be a project in of its self.


Granted, you probably know more on this than me, but I have done some experimenting, and It "aint" pretty. Not to mention nakenuitil . . .heh do not even get me started.




I should mention, that at least with .NET and possibly Mono. Just calling the executables, then passing in commands would not be the hard part.  The hard part would be beautifying the output, and then interacting with that output.


With C# I have toyed around with the concept of running the executables, and then passing in commands once the executables are running. That is just to see what it would take to create such a UI build tool. It worked well, but then I saw the output, and started wondering how I could format it better . . . Yeah I am still thinking on that.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...