MSP430-JTAG-TINY-V2 & EMBlocks (MSPDebug 0.22 for Windows)

Started by Chudik, May 29, 2014, 10:06:07 PM

Previous topic - Next topic

Chudik

EMBlocks for MSP430 (free EDA) uses mspdebug 0.19 for the uC communication. It supports a list of several debug interfaces and Olimex MSP430-JTAG-TINY (V1) is among them.
Please, could anybody check whether MSP430-JTAG-TINY-V2 supported as well?

I was hoping that FETUIF would be supported, but I have V3 while mspdebug supports only old V2 version :( If Olimex debug interface can work with it, I'd rather switch to it instead of looking for the old FET USB.

Thanks.

LubOlimex

Hey Chudik,

Unfortunately, I lack the required time to test fully EMBlocks at the moment. However, I can guarantee our debuggers (both MSP430-JTAG-TINY-V2 and MSP430-JTAG-ISO-MK2) are supported in mspdebug very well. We've been in contact with Daniel Beer in the past and he also added some extra features for our debuggers. Features that are available only in mspdebug - for example, power profiling for the ISO-MK2.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Chudik


LubOlimex

Chudnik,

If it isn't very bothering to you, please, keep us updated on whether the combination works (and if there was something special you did to make it work). I installed EMBlocks and saw that there is version 2 MSP430.dll that has to be replaced with the .dll files from this driver's archive: https://www.olimex.com/Products/MSP430/JTAG/MSP430-JTAG-TINY-V2/resources/OLIMEX_MSP430-DLL_drivers.zip. However, I am not familiar enough with the software to test thoroughly.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Chudik

LubOlimex
It should come around Tuesday next week. As soon as we try, I will post the result.

Chudik

LubOlimex,
Should I use tilib or olimex-v1 option for the debugger settings?

Chudik

LubOlimex
I got the Olimex-Timy-V2 and downloaded EM::Blocks 2.00. The debugger came with small board MSP430-HG2231 (which is a good gift for trying the debugger instead of my own board)
Here is the report.
Installed drivers from https://www.olimex.com/Products/MSP430/JTAG/MSP430-JTAG-TINY-V2/resources/OLIMEX_MSP430-DLL_drivers.zip
Copied DLLs from this driver package.

Choose Debug Interface olimex-v1 on COM4.

After pressing F8 (Run/Stop debug) it recognized SBW and loaded program into the chip. Breakpoints, steps are working.
Great!!!
Now we will buy another debugger and will use EM:Blocks.

However, need to be noted: mspgcc is less effective than the IAR compiler. It could be important for some projects.

LubOlimex

Hey Chudik,

That is great news. Glad things worked ok.

The compiler effectiveness is as expected. There are some mspgcc optimization options that you might want to look at, however.

Take a look at the mspgcc manual also: http://mspgcc.sourceforge.net/manual/c1408.html

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Chudik

LubOlimex
There are some questions.
Here is what I get from mspdebug

Trying to open COM4 at 500000 bps...
Resetting Olimex command processor...
Initializing FET...
FET protocol version is 10004002
Set Vcc: 3300 mV
Configured for JTAG (2)
fet: FET returned error code 4 (Could not find device or device not supported)
fet: command C_IDENT1 failed
Using Olimex identification procedure
Device ID: 0xf249
  Code start address: 0x2100
  Code size         : 57088 byte = 55 kb
  RAM  start address: 0x200
  RAM  end   address: 0x9ff
  RAM  size         : 2048 byte = 2 kb
Device: MSP430F2410
Number of breakpoints: 3
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling
Chip ID data: f2 49
Bound to port 2000. Now waiting for connection...
Client connected from 127.0.0.1:59208
Clearing all breakpoints...


The questions are:
1. Is it normal that it tries to open COM4 at 500000 bps..
2. What does mean
fet: FET returned error code 4 (Could not find device or device not supported)
fet: command C_IDENT1 failed
Which device is not supported?
I'm using MSP430F2410. Is not supported by Olimex debugger?


3. What does mean the following?
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling

LubOlimex

Hello Chudnik,

MSP430F2410 is supported by drivers, for sure.

Quote1. Is it normal that it tries to open COM4 at 500000 bps.
Yes. It seems normal, take a look at this copy of the source, here: https://github.com/poelzi/mspdebug/blob/master/olimex.c

I believe these errors are caused because of the the old mspdebug version that had some bug with the reset of the board. It was discussed here few years ago: https://www.olimex.com/forum/index.php?topic=482.0.

It might be a good idea to post the problem in the mspdebug mailing lists or e-mail the maintainers of the project. They would give you better advice.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Chudik

Hi LubOlimex,
I have three boards: one is Olimex with MSP430G2231 (free gift), my own based on MSP430F2410, and https://www.olimex.com/Products/MSP430/Proto/MSP430-P2618/

The first board uses SBW interface and the other boards use JTAG.
I used same test projects that EMBlocks creates automatically (just nop() in loop). Definitely, each of these projects have settings for the appropriate uC.
So, on the small board the program loaded, stops at the beginning, can go step-by-step, run, stopped, etc. And both projects for F2xxx uCs could be loaded, but can't do anything else. And both these boards were working with USB UIF emulators under IAR. And we also tried this TINY emulator with IAR on my board - it worked without any problem.
So, looks like the hardware for this emulator is fine, but there is a problem with DLL that can't provide correct JTAG interface. Or firmware inside? If you have one, of course  :)
Please, please, could you fix the problem?

LubOlimex

Hey,

Thank you for the feedback!

Is it true that both test boards work with IAR and MSP430-JTAG-TINY-V2? Then I fail to see how the firmware of the Olimex product is faulty. The problem would be either in EMBlocks configurations or in mspdebug used in EMBlocks.

To determine further where exactly the problem is I recommend you to download the latest mspdebug version and use it via a command line. If it works with your target then simply try to replace the old mspdebug version in the EMBlocks with the new one. Additionally, EMBlocks staff and mspdebug maintainers can provide more information on the problem.

Of course, the above is based on the assumptions that MSP430-JTAG-TINY-V2 works fine with IAR for MSP430 (after replacing the dll again) and both your F2410 board, the F2618 one and the G2231 one.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Chudik

Hi LubOlimex,
Here is the latest news
Quote
Is it true that both test boards work with IAR and MSP430-JTAG-TINY-V2?
Yes, that is true. And both work without changing MSP430.dll

After changing (MSP430, Olimex, HIL).dll to the files from the latest package (2.0.0.7) IAR requested to change the firmware in the emulator and I agreed with that. After that IAR continued to work. And, the most important, EM:Blocks started to work too!!! I checked it with simple project and with my project for my board - all seems fine.
Except one thing - the speed of the firmware downloading is quite low. Is there a way to increase the speed? With IAR speed is much higher.
And another question - is there a way to update the firmware without using IAR?

LubOlimex

Hey Chudik,

That is some great news.

Unfortunately, I am not aware of any hardware way of increasing the speed of programming. Maybe the optimization options in EMBlocks can help? Make sure to check in their forums.

There is no stand-alone way to change the firmware. For firmware changes I usually use our programmer software since it starts faster and is really simple (I replace the MSP430.dll with the version I want, then start it and click the Quick & Easy button without a target even connected and I get prompted for the firmware change). You can find it here: https://www.olimex.com/Products/MSP430/JTAG/_resources/MSP_PROG_GUI_1.3.0.4_CLI_2.0.1.2_DLL_1.0.4.2.zip

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Chudik

Hi LubOlimex,

We tried to use EmBlocks with CC430 board by Olimex using JTAG-Tiny and could not make any step, could not set breakpoints, etc. It can only download the code and run it. With G2231 there are no problems at all.
With IAR everything was working as expected.
I believe, there is something wrong in mspdebug interface to these IDEs.
Since you told that you were contacting to the mspdebug author, could you transfer that information to him, may be he will take a look on this problem.