This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mspdebug + MSP430F5529 on linux

Other Parts Discussed in Thread: MSP430F5529, MSP-FET, MSP430F1611, MSP-GANG

Hi all,

I can flash my MSP430F5529 with MSP-FET from CCS6, but I'd like to do the same with command line tool in Linux and without any additional HW, since MCU has BSL with USB support. I saw a few postings and some web sites related to mspdebug, but I can't see any indication that 5-series MCU can be flashed by mspdebug directly over USB.


Could someone confirm that I can use mspdebug on Linux to flash MSP430F5529 connected directly to USB port without using MSP-FET?

Any reference, link or recipe would be greatly appreciated.

Regards,

Alexey

  • BSL Scripter is written in C, and you can try to transfer it to other (linux) platform. There is also MSP430 USB Firmware Upgrade Example phyton version, so maybe this is even easier to run on linux.

    Anyway, I made my own CDC BSL for MSP430F55xx that will work on any platform, with simple PC side.

  • Alexey Orishko said:
    Could someone confirm that I can use mspdebug on Linux to flash MSP430F5529 connected directly to USB port without using MSP-FET?

     Hi Alexey, with MSP430F5529 you point to a chip on your board or launchpad? LP is directly supported on Linux so I am using, this case run drivers.

     MspDebug is the debuger act also as JTAG/SBW loader but has nothing to do with BSL, as Zrno wrote to you, BSL require a serial protocol, when you fit your board in USBBOOT one device is present and you have to identify, I suppose 

    lsusb

    ..... ID 2047:0200 Texas Instruments MSP430 USB HID Bootstrap Loader

    on dev ttyACM devices are present, identify wich one is BSL then upload your program there.

     try if you can get help from here:

    http://processors.wiki.ti.com/index.php/Open_Source_Projects_-_MSP430

    http://mspgcc.sourceforge.net/tools.html

     or simply try goggle MSP430 BSL Linux, some frontend and source are available.

  • As for mspdebug, it does not talk to the BSL, but to the EEM, and requires some FET hardware for this. (Its flash-bsl driver works with a serial connection, not USB; see the man page.)

  • Roberto Romano said:

    with MSP430F5529 you point to a chip on your board or launchpad? LP is directly supported on Linux so I am using, this case run drivers.

    I have a custom board with MSP430F5529, which has USB interface to the embedded host system based on Linux. I'm looking for sw to update MCU firmware from linux command line.

    Roberto Romano said:

     MspDebug is the debuger act also as JTAG/SBW loader but has nothing to do with BSL, as Zrno wrote to you, BSL require a serial protocol, when you fit your board in USBBOOT one device is present and you have to identify, I suppose 

    lsusb

    ..... ID 2047:0200 Texas Instruments MSP430 USB HID Bootstrap Loader

    on dev ttyACM devices are present, identify wich one is BSL then upload your program there.

    Yes, I see two CDC-ACM devices on the linux host when MSP430F5529 is set in BSL mode. If I connect MSP-FET430UIF to my linux box instead I also see /dev/ttyACM0.

    Based on above, the key question: Is protocol for firmware update via MSP-FET430UIF different from firmware update with USB BSL?

    if it is similar, I assume mspdebug could be used.

    Regards,

    Alexey

  • Alexey Orishko said:

    Based on above, the key question: Is protocol for firmware update via MSP-FET430UIF different from firmware update with USB BSL?

     MSP-FET old version has an internal MSP430F1611 or similar with an TUSB430 serial bridge, it communicate serially  to aux procssor sending command for JTAG/SBW.

     Mspdebug as I know send these command to perform JTAG/SBW programming/debug.

    ******************* BSL

     BSL stay for Boootstrap Serial Loader, it is invoked by some special pint mode.

     When BSL ROM is started on MSP430 then it communicate using the serial BSL RX TX pin, they can be different from UART and generally are pin of timer.

     Special hardware is the programmer from Elprotronics, nice device but just Winzz locked and they never released a Linux driver so it is becoming obsolete, it is also expensive but this one supported all programming mode: JTAG SBW and BSL in just one interface.

     About BSL I sent you two link where all instruction and software where in place, this case BSL interface is not necessary so try if it work for you or ask again.

     When you plug in processor only just one ACM must be present otherwise unplug processor and see which one is still present and use the other one.

  • zrno soli said:

    Anyway, I made my own CDC BSL for MSP430F55xx that will work on any platform, with simple PC side.

    Is there any possibility to get access to that code?

    Regards,

    Alexey

  • Alexey Orishko said:
    Is there any possibility to get access to that code?

    Hi Alexey, I suppose this is another question, standard code is not working phyton or C?

     Are you able to compile and run C code on Linux platform? Phyton otherwise just require have interpreter installed then launch source from command line.

    http://llg.cubic.org/dmx43/bslsh.html

  • zrno soli said:
    Anyway, I made my own CDC BSL for MSP430F55xx that will work on any platform, with simple PC side

     Hi Zrno, after request of Alexey I read again, so what is different from simple standard interface on your code?

    Why you rewrote some part and what is simple PC side? F55XX are USB processor so BSL run on its own interface, I am just curious about.

  • Roberto Romano said:

     Special hardware is the programmer from Elprotronics, nice device but just Winzz locked and they never released a Linux driver so it is becoming obsolete, it is also expensive but this one supported all programming mode: JTAG SBW and BSL in just one interface.

    BTW, my msp-gang like flasher is faster, and (one day) will work on any OS. Right now it is working on Win and Linux.

    http://forum.43oh.com/topic/2972-sbw-msp430f550x-based-programmer/?p=42575

    ThinkPad:~/msp430$ flash -p /dev/ttyACM0 -f sbw_test_192.txt -e -w -mr
    
    File "sbw_test_192.txt"
    196608 bytes
    
    Get Device
    Device: 0  JTID: 91  Fuse: OK  1A04: 54 35  1A06: 10 10
    Device: 1  JTID: 91  Fuse: OK  1A04: 54 35  1A06: 10 10
    
    Erase
    
    Write
    Size: 196608 bytes  Time: 1040 ms  Speed: 184.6 KB/s
    
    Marginal Read
         File  D0   D1 
    MR0: C5CD C5CD C5CD
    MR1: C5CD C5CD C5CD
    Size: 196608 bytes  Time: 2789 ms  Speed: 68.8 KB/s
    
    Release Device
    
    ThinkPad:~/msp430$

    Roberto Romano said:

     Hi Zrno, after request of Alexey I read again, so what is different from simple standard interface on your code?

    Why you rewrote some part and what is simple PC side? F55XX are USB processor so BSL run on its own interface, I am just curious about.

    Micro code is original, not related to TI USB BSL in any way. It is written in assembler, and include software AES decryption (CDC + AES = 2 KB). PC side is minimal (100 lines of code) because it just send at once encrypted data stream to micro, nothing else.
  • Roberto Romano said:

    https://pythonhosted.org/python-msp430-tools/commandline_tools.html#msp430-bsl

    I'm a bit confused... As mentioned in the previous posts USB BSL will present CDC_ACM device to the linux host.

    The link you provided talks about Python MSP430 Boot Strap Loader software for F5xx and that USB support requires "rawhid” kernel driver on Linux.

    Why does host require raw HID driver instead of CDC-ACM?

    /Alexey

  • TI USB BSL on MSP430 use HID, not CDC. I guess that python tool (Python_Firmware_Upgrader-4_20_00.zip) should work on Linux just fine, like on Win.

    http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_USB_Developers_Package/latest/index_FDS.html

  • Alexey Orishko said:
    Why does host require raw HID driver instead of CDC-ACM?

     

     Hi Alexey, this question was obscure to me too but after reading a beautiful answer from our USB GURU Tsuneo I learned on winzz CDC is plagued of too many problem and is buggy. (Thread is in TIVA forum)

     We are on Linux so we cannot understand why some program work perfectly on same computer then crash on winzz when a spike occour.

     HID drivers are maintained and clean so I think this is the cheapest solution to have e solid communication supporting winzz also.

     If it doesn't work Zrno provided his beautiful work link, I think it is better than every other standard and I like a lot his works.

  • Roberto Romano said:
    Alexey Orishko
    Why does host require raw HID driver instead of CDC-ACM?

     Hi Alexey, this question was obscure to me too but after reading a beautiful answer from our USB GURU Tsuneo I learned on winzz CDC is plagued of too many problem and is buggy. (Thread is in TIVA forum)

     We are on Linux so we cannot understand why some program work perfectly on same computer then crash on winzz when a spike occour.

     HID drivers are maintained and clean so I think this is the cheapest solution to have e solid communication supporting winzz also.

     If it doesn't work Zrno provided his beautiful work link, I think it is better than every other standard and I like a lot his works.

    Sorry, my question was misleading. I didn't ask why hid protocol was used instead of serial one, I'm aware of windoze issues first hand.

    I was confused by one of initial posts about /dev/ttyACM0 and assumed it was the USB device class presented by USB BSL code on MCU to the host. Thus I was asking about python using hid.

    Thank you both for your input and suggestions, I'll check both python and bslsh next week.

    /alexey

  • Alexey Orishko said:
    was confused by one of initial posts about /dev/ttyACM0 and assumed it was the USB device class presented by USB BSL code on MCU to the host. Thus I was asking about python using hid.

     You are using Linux so don't worry about, unified character stream is same for CDC or HID. It is not the same on windoze so unified model just work. No need to access in special mode.

    Alexey Orishko said:
    I'll check both python and bslsh next week.

     I think it work first time, just identify the correct device.

**Attention** This is a public forum