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.

Linux/MSP430F5438: udpate software MSP with a Rasberry and Python_Firmware_Upgrader

Part Number: MSP430F5438
Other Parts Discussed in Thread: , MSPBSL

Tool/software: Linux

Hello I'm trying to update a board with a MSP430F5438 with a Raspberry, but without success:

The step I followed:

  • Download  Python_Firmware_Upgrader   for linux on my Raspberry
  • Correct the setup scrip by adding the ".py" to the script list inside ("scripts=[..") since it doesn't work otherwise
  • launch the command : sudo python setup.py install
  • connect the MSP430 pin  /RST and TEST to the Raspberry GPIO and the MSP P1.1 and P1.2 to the raspberry UART.
  • Launch a python script that :
    • trigger the reset(MSP is running) then trigger 3 time the TEST to enter BSL mode
    • then launch the command: python -m msp430.bsl5.uart -p /dev/ttyS0 -e -v -P ./firmware.txt

My problem :

is that it seem to go to BSL mode but the flashing doesn't work and output an error message :

./test_flash_MSP_acc.py:26: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(PIN_RST, GPIO.OUT, initial=GPIO.LOW)
./test_flash_MSP_acc.py:27: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(PIN_TEST, GPIO.OUT, initial=GPIO.LOW)

An error occurred:
(22, 'Invalid argument')
Cleaning up after error...

^CTraceback (most recent call last):
File "./test_flash_MSP_acc.py", line 50, in <module>
time.sleep(2)

  • I also tried this way :

    cat out.elf|python -m msp430.bsl5.uart -p /dev/ttyS0 -e -v --input-format=elf
    Debug is False
    Verbosity level set to 2
    Python version: 2.7.13 (default, Jan 19 2017, 14:48:08)
    [GCC 6.3.0 20170124]
    pySerial version: 3.4
    action list:
    mass_erase()
    reset()

    An error occurred:
    BSL reports error: unknown error
    Cleaning up after error...
    ---------------------
    And the second time I don't obtain the same result:

    cat out.elf|python -m msp430.bsl5.uart -p /dev/ttyS0 -e -v --input-format=elf
    Debug is False
    Verbosity level set to 2
    Python version: 2.7.13 (default, Jan 19 2017, 14:48:08)
    [GCC 6.3.0 20170124]
    pySerial version: 3.4
    action list:
    mass_erase()
    reset()

    An error occurred:
    (22, 'Invalid argument')
    Cleaning up after error...

    -----------------------------------------------------
    -----------------------------------------------------
    And I also tried this way:

    python -m msp430.bsl5.uart -p /dev/ttyS0 -e -v --input-format=elf -P ./out.elf
    Debug is False
    Verbosity level set to 2
    Python version: 2.7.13 (default, Jan 19 2017, 14:48:08)
    [GCC 6.3.0 20170124]

    An error occurred:
    'NoneType' object is not iterable

    ----------------------------------------------------
    ---------------------------------------------------
  • Hello Aurelia,

    Just to confirm, are you using the MSP430F5438 or the MSP430F5438A? If you are using the non-A version, I highly recommend switching to the pin compatible A version as major bug fixes where implemented and the non-A version is not recommended for new designs.

    That being said, the Python FW upgrader tool is meant to be used with the USB BSL and not does not work with UART/I2C BSLs. If you want an embedded Linux based BSL Host, please see the following application note, which is also featured on our MSPBSL Web page (http:/.../MSPBSL )

    MSP430 Bootloader With Sitara Embedded Linux Host (http://www.ti.com/lit/slaa760 )

  • BTW, Pi can be also used as JTAG hardware master, without glue logic or /and extra hardware...

    forum.43oh.com/.../

**Attention** This is a public forum