Re: [Mspgcc-users] Problems programming MSP430F2252

2012-09-16 Thread Daniel Beer
On Fri, Sep 14, 2012 at 07:20:27PM -0500, Peter Bigot wrote:
> I can confirm that with FET firmware 2.04.09.001 and the current head
> of mspdebug git, it is necessary to specify -d /dev/ttyUSBwhatever,
> where with 2.04.05.003 mspdebug figured things out itself without
> having to be told the specific device to use.  Odd.  I find that
> annoying and will stick with 2.04.05.003.

Without the -d option, the raw USB driver is used, which searches the
busses for a matching vendor:product combination. I'm surprised that a
change of the FET firmware affects whether or not this works, since this
shouldn't directly affect the USB interface.

My best guess is that perhaps the newer firmware's behaviour is affected
by the state of the internal RTS line. I'll put together a patch for
this later this week for someone with 20409001 to try out.

- Daniel

-- 
Daniel Beer www.dlbeer.co.nz
IRC: inittab (Freenode)PGP key: 2048D/160A553B

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-09-14 Thread Peter Bigot
I can confirm that with FET firmware 2.04.09.001 and the current head
of mspdebug git, it is necessary to specify -d /dev/ttyUSBwhatever,
where with 2.04.05.003 mspdebug figured things out itself without
having to be told the specific device to use.  Odd.  I find that
annoying and will stick with 2.04.05.003.

Peter

On Thu, Aug 23, 2012 at 1:49 PM, Robert Henig  wrote:
> Hi Daniel,
>
> The FET_UIF works with 0.20 but only if I specify -d /dev/ttyUSB0.  Both the 
> rf2500 and uif correctly identify the MSP430F2252.
>
> Thanks for your help.
>
> Bob.
>
>
> On Aug 22, 2012, at 7:39 PM, Daniel Beer wrote:
>
>> On Wed, Aug 22, 2012 at 04:51:07PM -0700, Robert Henig wrote:
>>> On Aug 22, 2012, at 4:10 PM, Daniel Beer wrote:
>>>
 As for your FET-UIF, do you know what firmware version you have
 installed on it? If it's V3, you'll need to use the tilib driver.
>>>
>>> The FET is version 2.04.09.001.
>>
>> Ok, then the uif driver is the correct one to use. Raw USB access is
>> clearly not working for you (difficult to tell why), but you have a
>> kernel driver for the TI3410 anyway. Communication with the FET seems to
>> be working when you invoke it with -d:
>>
>>> $ sudo mspdebug uif -d /dev/ttyUSB0
>>> MSPDebug version 0.18 - debugging tool for MSP430 MCUs
>>> Copyright (C) 2009-2011 Daniel Beer 
>>> This is free software; see the source for copying conditions.  There is NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>>
>>> Trying to open UIF on /dev/ttyUSB0...
>>> Initializing FET...
>>> FET protocol version is 20409001
>>> Configured for Spy-Bi-Wire
>>> Set Vcc: 3000 mV
>>> fet: FET returned error code 4 (Could not find device (or device not 
>>> supported))
>>> fet: command C_IDENT1 failed
>>> fet: identify failed
>>
>> Have you connected to the chip via JTAG? If so, you'll need the -j
>> option. Apart from this, you might just need to recheck the wiring.
>> Upgrading to a later version of mspdebug couldn't hurt either, as there
>> have been quite a few bug fixes since 0.18.
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel Beer www.dlbeer.co.nz
>> IRC: inittab (Freenode)PGP key: 2048D/160A553B
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-23 Thread Robert Henig
Hi Daniel,

The FET_UIF works with 0.20 but only if I specify -d /dev/ttyUSB0.  Both the 
rf2500 and uif correctly identify the MSP430F2252.

Thanks for your help.

Bob.


On Aug 22, 2012, at 7:39 PM, Daniel Beer wrote:

> On Wed, Aug 22, 2012 at 04:51:07PM -0700, Robert Henig wrote:
>> On Aug 22, 2012, at 4:10 PM, Daniel Beer wrote:
>> 
>>> As for your FET-UIF, do you know what firmware version you have
>>> installed on it? If it's V3, you'll need to use the tilib driver.
>> 
>> The FET is version 2.04.09.001.
> 
> Ok, then the uif driver is the correct one to use. Raw USB access is
> clearly not working for you (difficult to tell why), but you have a
> kernel driver for the TI3410 anyway. Communication with the FET seems to
> be working when you invoke it with -d:
> 
>> $ sudo mspdebug uif -d /dev/ttyUSB0
>> MSPDebug version 0.18 - debugging tool for MSP430 MCUs
>> Copyright (C) 2009-2011 Daniel Beer 
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> 
>> Trying to open UIF on /dev/ttyUSB0...
>> Initializing FET...
>> FET protocol version is 20409001
>> Configured for Spy-Bi-Wire
>> Set Vcc: 3000 mV
>> fet: FET returned error code 4 (Could not find device (or device not 
>> supported))
>> fet: command C_IDENT1 failed
>> fet: identify failed
> 
> Have you connected to the chip via JTAG? If so, you'll need the -j
> option. Apart from this, you might just need to recheck the wiring.
> Upgrading to a later version of mspdebug couldn't hurt either, as there
> have been quite a few bug fixes since 0.18.
> 
> Cheers,
> Daniel
> 
> -- 
> Daniel Beer www.dlbeer.co.nz
> IRC: inittab (Freenode)PGP key: 2048D/160A553B


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-23 Thread Robert Henig
Hi Daniel,

Looks like it was added in 0.20.  That version works.  I'll let you know if 
that also helps with the FET-UIF later today.

Thanks,
Bob.


On Aug 22, 2012, at 9:46 PM, Daniel Beer wrote:

> On Wed, Aug 22, 2012 at 09:36:36PM -0700, Robert Henig wrote:
>> I tried that and it failed with errors.  Output is at the end of the 
>> previous email.  I tried forcing MSP430G2553 and erase worked.  Go figure?
> 
> Oops, I missed that part. Just checking the git log, support for the
> F2252 was added in version 0.19. Have you tried the latest release?
> 
> Cheers,
> Daniel
> 
> -- 
> Daniel Beer www.dlbeer.co.nz
> IRC: inittab (Freenode)PGP key: 2048D/160A553B


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-22 Thread Daniel Beer
On Wed, Aug 22, 2012 at 09:36:36PM -0700, Robert Henig wrote:
> I tried that and it failed with errors.  Output is at the end of the previous 
> email.  I tried forcing MSP430G2553 and erase worked.  Go figure?

Oops, I missed that part. Just checking the git log, support for the
F2252 was added in version 0.19. Have you tried the latest release?

Cheers,
Daniel

-- 
Daniel Beer www.dlbeer.co.nz
IRC: inittab (Freenode)PGP key: 2048D/160A553B

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-22 Thread Daniel Beer
On Wed, Aug 22, 2012 at 04:51:07PM -0700, Robert Henig wrote:
> On Aug 22, 2012, at 4:10 PM, Daniel Beer wrote:
> 
> > As for your FET-UIF, do you know what firmware version you have
> > installed on it? If it's V3, you'll need to use the tilib driver.
> 
> The FET is version 2.04.09.001.

Ok, then the uif driver is the correct one to use. Raw USB access is
clearly not working for you (difficult to tell why), but you have a
kernel driver for the TI3410 anyway. Communication with the FET seems to
be working when you invoke it with -d:

> $ sudo mspdebug uif -d /dev/ttyUSB0
> MSPDebug version 0.18 - debugging tool for MSP430 MCUs
> Copyright (C) 2009-2011 Daniel Beer 
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Trying to open UIF on /dev/ttyUSB0...
> Initializing FET...
> FET protocol version is 20409001
> Configured for Spy-Bi-Wire
> Set Vcc: 3000 mV
> fet: FET returned error code 4 (Could not find device (or device not 
> supported))
> fet: command C_IDENT1 failed
> fet: identify failed

Have you connected to the chip via JTAG? If so, you'll need the -j
option. Apart from this, you might just need to recheck the wiring.
Upgrading to a later version of mspdebug couldn't hurt either, as there
have been quite a few bug fixes since 0.18.

Cheers,
Daniel

-- 
Daniel Beer www.dlbeer.co.nz
IRC: inittab (Freenode)PGP key: 2048D/160A553B

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-22 Thread Daniel Beer
On Wed, Aug 22, 2012 at 04:36:23PM -0700, Robert Henig wrote:
> I'm using version 0.18 of mspdebug.  I start it using the command 'mspdebug 
> rf2500'.  I am seeing something unusual with the startup output.  The device 
> I'm using is the F2252 but it's getting identified as F2272.  It also is 
> showing the code start at 0x8000 instead of 0xc000.  Here is the output of 
> the startup:

Does erase work if you try this command instead?

sudo mspdebug rf2500 --fet-force-id MSP430F2252

The inability to identify the chip is probably what's causing the
failure, because it'll be requesting an erase at an address which
doesn't exist.

I'll see what I can do about fixing this.

Cheers,
Daniel

-- 
Daniel Beer www.dlbeer.co.nz
IRC: inittab (Freenode)PGP key: 2048D/160A553B

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-22 Thread Robert Henig
On Aug 22, 2012, at 4:10 PM, Daniel Beer wrote:

> As for your FET-UIF, do you know what firmware version you have
> installed on it? If it's V3, you'll need to use the tilib driver.

The FET is version 2.04.09.001.

I've tried these two commands with similar results:

$ sudo mspdebug uif
MSPDebug version 0.18 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2011 Daniel Beer 
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

TI3410 device is in boot config, setting active
Initializing FET...
FET protocol version is 20409001
Configured for Spy-Bi-Wire
ti3410: can't receive data: No such device
warning: fet: set VCC failed
ti3410: can't send data: No such device
fet: command C_IDENT1 failed
fet: identify failed
Trying again...
Initializing FET...
ti3410: can't send data: No such device
fet: open failed
ti3410: warning: TI_CLOSE_PORT failed: No such device

$ sudo mspdebug uif -d /dev/ttyUSB0
MSPDebug version 0.18 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2011 Daniel Beer 
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open UIF on /dev/ttyUSB0...
Initializing FET...
FET protocol version is 20409001
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
fet: FET returned error code 4 (Could not find device (or device not supported))
fet: command C_IDENT1 failed
fet: identify failed
Trying again...
Initializing FET...
FET protocol version is 20409001
Configured for Spy-Bi-Wire
Sending reset...
uif: read error: Connection timed out
warning: fet: reset failed
fet: FET returned error code 4 (Could not find device (or device not supported))
warning: fet: set VCC failed
fet: reply type mismatch
fet: command C_IDENT1 failed
fet: identify failed--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-22 Thread Robert Henig
I'm using version 0.18 of mspdebug.  I start it using the command 'mspdebug 
rf2500'.  I am seeing something unusual with the startup output.  The device 
I'm using is the F2252 but it's getting identified as F2272.  It also is 
showing the code start at 0x8000 instead of 0xc000.  Here is the output of the 
startup:

$ sudo mspdebug rf2500
MSPDebug version 0.18 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2011 Daniel Beer 
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 039
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
Device ID: 0xf227
Device: MSP430F2272
Code memory starts at 0x8000
Number of breakpoints: 2
fet: FET returned NAK
fet: warning: message 0x30 failed

Available commands:
= delbreak  gdb   load  opt   reset simio 
alias dis   help  locka prog  run   step  
break erase hexoutmdread  set   sym   
cgraphexit  isearch   mwregs  setbreak  

Available options:
color   gdb_loopiradix  
fet_block_size  gdbc_xfer_size  quiet   

Type "help " for more information.
Press Ctrl+D to quit.

(mspdebug) 

When hook up a luanchpad with a G2552 all looks good and works as expected.  In 
both cases I get the NAK from the FET and the warning.

$ sudo mspdebug rf2500
MSPDebug version 0.18 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2011 Daniel Beer 
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 036
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
Device ID: 0x2553
Device: MSP430G2553
Code memory starts at 0xc000
Number of breakpoints: 2
fet: FET returned NAK
fet: warning: message 0x30 failed

Available commands:
= delbreak  gdb   load  opt   reset simio 
alias dis   help  locka prog  run   step  
break erase hexoutmdread  set   sym   
cgraphexit  isearch   mwregs  setbreak  

Available options:
color   gdb_loopiradix  
fet_block_size  gdbc_xfer_size  quiet   

Type "help " for more information.
Press Ctrl+D to quit.

(mspdebug) 

When I try the --fet_force_id to MSP430F2252 I get errors:

$ sudo mspdebug --fet-force-id MSP430F2252 rf2500
MSPDebug version 0.18 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2011 Daniel Beer 
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 039
rf2500: warning: can't detach kernel driver: No data available
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
Device ID: 0xf227
fet: unknown device
msg28_data: [0x1a bytes]
f2 27 50 40 00 00 00 00 00 00 02 02 01 04 a1 61 
85 00 89 00 00 00 00 00 00 00 
fet: identify failed
Trying again...
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Sending reset...
Set Vcc: 3000 mV
Device ID: 0xf227
fet: unknown device
msg28_data: [0x1a bytes]
f2 27 50 40 00 00 00 00 00 00 02 02 01 04 a1 61 
85 00 89 00 00 00 00 00 00 00 
fet: identify failed

Thanks,
Bob.


On Aug 22, 2012, at 4:10 PM, Daniel Beer wrote:

> On Wed, Aug 22, 2012 at 11:36:10AM -0700, Robert Henig wrote:
>> I have a custom board with a F2252 that is programmable using a FET-UIF from 
>> a windows system using IAR and FETPro-Lite.  On Ubuntu 12.04 I am unable to 
>> get the FET-UIF to work with mspdebug ( I did see the thread about this 
>> problem with OS X and non of that helped ).  By hijacking the pins from a 
>> Lanchpad I am able to program the F2252 only if the FLASH is empty.  I am 
>> also able to look at memory and step through the code.  When I try to 
>> program a non-empty FLASH it turns the code to garbage (looks like it just 
>> changes 1's to 0's as if it was trying to program an erased FLASH).
>> 
>> I am not able to re-program the part or erase the flash using the erase 
>> command.  Has anyone seen this and hopefully have a solution?
> 
> What version of mspdebug are you using, and how are you invoking it? You
> might want to try using --fet-force-id to force the 2252 to be
> identified as a different (but compatible) chip. If you find something
> that works, let me know.
> 
> Otherwise, are you able to capture USB data from your working setup on
> Windows?
> 
> As for your FET-UIF, do you know what firmware version you have
> installed on it? If it's V3, you'll need to use the tilib driver.
> 
> - Daniel
> 
> -- 
> Daniel Beer www.dlbeer.c

Re: [Mspgcc-users] Problems programming MSP430F2252

2012-08-22 Thread Daniel Beer
On Wed, Aug 22, 2012 at 11:36:10AM -0700, Robert Henig wrote:
> I have a custom board with a F2252 that is programmable using a FET-UIF from 
> a windows system using IAR and FETPro-Lite.  On Ubuntu 12.04 I am unable to 
> get the FET-UIF to work with mspdebug ( I did see the thread about this 
> problem with OS X and non of that helped ).  By hijacking the pins from a 
> Lanchpad I am able to program the F2252 only if the FLASH is empty.  I am 
> also able to look at memory and step through the code.  When I try to program 
> a non-empty FLASH it turns the code to garbage (looks like it just changes 
> 1's to 0's as if it was trying to program an erased FLASH).
> 
> I am not able to re-program the part or erase the flash using the erase 
> command.  Has anyone seen this and hopefully have a solution?

What version of mspdebug are you using, and how are you invoking it? You
might want to try using --fet-force-id to force the 2252 to be
identified as a different (but compatible) chip. If you find something
that works, let me know.

Otherwise, are you able to capture USB data from your working setup on
Windows?

As for your FET-UIF, do you know what firmware version you have
installed on it? If it's V3, you'll need to use the tilib driver.

- Daniel

-- 
Daniel Beer www.dlbeer.co.nz
IRC: inittab (Freenode)PGP key: 2048D/160A553B

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users