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.

Flashing TI via bootloader using sflash utility

Other Parts Discussed in Thread: LMFLASHPROGRAMMER

Hi, 

I have a TI microcontroller than I can flash with LMFLASHPROGRAMMER in windows using UART and a bootloader 

Ideally I want to be able to reflash this unit remotely, but all I have available is a pi....

I have seen references on this forum to a "sflash" command line utility that I could perhaps build from source on the pi.....

https://e2e.ti.com/support/microcontrollers/other-microcontrollers-group/other/f/other-microcontrollers-forum/450827/flashing-tm4c123glx-with-sflash-in-linux-through-rom-boot-loader

but can't actually track down if this is the case, or where this utility can be obtained from....

Any advice welcome!

  • Download the TivaWare library if you have not already done so. You will find the SFLASH source in the directory: C:\ti\TivaWare_C_Series-2.2.0.295\tools\sflash

  • Ah thanks - I was thrown by the executable - didn't realise it would contain the code

    I managed to compile it on the pi no problem: 

    When using the LM Flash programmer tool from windows I set: 

    • Configure Baud rate 460800 and select serial port
    •  Ensure ‘Disable Auto Baud Support’ is ticked 
    • Interface UART 
    • Transfer size 60
    • Address offset zero

    And it flashes fine

    From the pi I get: 

    ./sflash ~<flash.bin> -s 60 -b 460800 -d -p 0x0 -c /dev/ttyUSB0


    Application    : /home/pi/Desktop/MI-209-5.bin
    Program Address: 0x0
           COM Port: /dev/ttyUSB0
          Baud Rate: 460800
    Erasing Flash:
    Failed to Send Download Command

    So something is failing.....any ideas? 

  • I would start by connecting a logic analyzer or protocol analyzer to the serial bus and comparing the streams.