Jump to content
xpg

Eclipse plugin for mspdebug and msp430-gcc

Recommended Posts

I've just had a message from the author saying that it's not fixed yet. I can't really use that workaround because I'm working with contiki (an embedded OS), and the main() function is defined as part of the OS.

 

I think I'm going to look at code composer for linux and see if that works any better.

Share this post


Link to post
Share on other sites
Hi XPG,

 

Thanks you for your huge contribution :)

 

Thanks. However, I am a bit sorry that I have not had time to develop on it for some time now. I have a lot of nice things on the roadmap, just need the time to do it :-)

Share this post


Link to post
Share on other sites

I try this on windows, using zylin plugin to gdb.

 

Works ok, but its easy to see how msp430-gdb uses wrong address for local variable:

(gdb) p &varname # gives address of local variable

(gdb) info registers # lists registers

see address of sp, and try something like

(gdb) p *(0x2bfc) # or whatever is sp

 

Also, I have been told that if you want to reset the target, you do (in console) "monitor reset" and then "flushregs" to update gdb, then you can single step from reset vector.

 

I have mspdebug running in another msys window, using tilib driver because i have v3 FET.

Share this post


Link to post
Share on other sites
I try this on windows, using zylin plugin to gdb.

 

Works ok, but its easy to see how msp430-gdb uses wrong address for local variable:

 

Thanks for the information. Haven't had time to try it on Windows myself yet.

Share this post


Link to post
Share on other sites
Almost there ... my only problem with debug, is the mspdebug is not a JATG option in the debuger configuration.

 

Any thoughts?

 

In the newest release it is possible to choose between SBW and JTAG fo mspdebug. Go to your project's properties and select the MSP430 item on the left-side pane. You should have the option to select the protocol here.

 

Cheers,

Paul

Share this post


Link to post
Share on other sites

Thanks Paul,

 

I finally realised that the versions had advanced. I found that the under "Debug Configutation", there was a "MSP430 Debug" section which seemed to get further. :) The video made it obvious ..

 

Now, the application will load onto the MCU, but when I run the debugger, it fires up mspdebug listening on port 2000, but then complains with

 

Failed to start debug session

Giving up waiting for mspdebug

Giving up waiting for mspdebug

Giving up waiting for mspdebug

 

I am using a FET with the uif driver via JTAG. The mspdebug process is left open, I can connect to it with msp430-gdb from your toolchan and execute debug command. The eclipse plugin seems unable and there are no obvious options I am missing.

 

Thoughts?

 

Thanks again,

David

Share this post


Link to post
Share on other sites

I finally realised that the versions had advanced. I found that the under "Debug Configutation", there was a "MSP430 Debug" section which seemed to get further. :) The video made it obvious ..

 

Great, good to hear there there is progress..

 

Now, the application will load onto the MCU, but when I run the debugger, it fires up mspdebug listening on port 2000, but then complains with

 

Failed to start debug session

Giving up waiting for mspdebug

Giving up waiting for mspdebug

Giving up waiting for mspdebug

 

That, on the other hand is not so good to hear. I will look into what can be causing this. Thanks for reporting it.

 

Cheers,

Paul

Share this post


Link to post
Share on other sites
I very much appreciate your assistance Paul. Please let me know if there is anything you'd like me to try or test.

 

Do you have a Launchpad you could try with, to see if the problem is related to using JTAG?

Share this post


Link to post
Share on other sites
I very much appreciate your assistance Paul. Please let me know if there is anything you'd like me to try or test.

 

Do you have a Launchpad you could try with, to see if the problem is related to using JTAG?

 

Alas, no :(

Share this post


Link to post
Share on other sites

Failed to start debug session

Giving up waiting for mspdebug

Giving up waiting for mspdebug

Giving up waiting for mspdebug

 

I am using a FET with the uif driver via JTAG. The mspdebug process is left open, I can connect to it with msp430-gdb from your toolchan and execute debug command. The eclipse plugin seems unable and there are no obvious options I am missing.

 

Are you using the mspdebug version installed on your system or the packaged version I provide for msp430eclipse ?

I think I have screwed up support for using a system provided mspdebug.

In order to be sure that mspdebug has started listening on the debug port, Eclipse is waiting for a specific string being printed by mspdebug. However, per default stdout is buffered in such a way that Eclipse will never receive the line. I have solved this in the packaged version by providing a small wrapper script that uses 'stdbuf' to disable output buffering. I used to use 'stdbuf' for the system provided mspdebug as well, but got reports that 'stdbuf' is not available on all Linux installations. After moving it to the wrapper script, I forgot all about it.

I'll try to come up with a way to fix this (check that stdbuf is installed and use it when using system provided mspdebug).

Share this post


Link to post
Share on other sites
In order to be sure that mspdebug has started listening on the debug port, Eclipse is waiting for a specific string being printed by mspdebug. However, per default stdout is buffered in such a way that Eclipse will never receive the line.

Is it still the case with 0.19 as well (which has this)?

 

Don't know what that string is, but if it's a full line (ie. terminated with LF), that should help your case. If not, I suggest to take it up with Daniel -- pretty sure he'll come up with something.

Share this post


Link to post
Share on other sites

Is it still the case with 0.19 as well (which has this)?

 

Don't know what that string is, but if it's a full line (ie. terminated with LF), that should help your case. If not, I suggest to take it up with Daniel -- pretty sure he'll come up with something.

 

That is exactly what is needed in order for Eclipse to work properly with it. Great. Thanks, Gordon (and Daniel of course).

Share this post


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.

Guest
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...