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.

EK-TM4C1294XL: LM Flash Programmer, GUI and Command Line Documentation (And examples?)

Part Number: EK-TM4C1294XL
Other Parts Discussed in Thread: LMFLASHPROGRAMMER, UNIFLASH

When I visit the Ti web page for the LM Flash Programmer ti.com/tool/LMFLASHPROGRAMMER  I found no documentation on how to use it there.  No user manual and no programing manual.
We are using the TM4C1294 in our produce and have started production programing units with CCS8 but want to move to a command line interface method and we have to use LM Flash to set the MAC address.

Thanks,

  • I found my install of the LM Flash programer and at the command line typed in lmflash.exe -h and got some help.


    Usage: lmflash [OPTION]... [FILE]
    Program the FILE to the internal flash of a TI Stellaris microcontroller
    using the specified OPTIONs or perform another operation as specified by the
    OPTIONs.  Only the necessary flash pages will be erased prior to a program
    operation unless otherwise specified using the -e option.  FILE must be a
    binary image (.bin) file.

    Mandatory arguments to long options are mandatory for short options too.
      -b, --baud-rate=RATE       specifies the baud rate used for the COM port. The
                                   default is '115200'. This option is not valid
                                   unless used with "-i serial".
      -c, --check                checks that the flash contents match the expected
                                   result of the specified operation. The specified
                                   operation will not be performed. If -c is used
                                   with both -e and a program operation, then only
                                   the result of the program operation will be
                                   checked. This option is not valid when used with
                                   the -u or --debug_unlock options.
          --commit               permanently commits the value programmed to the
                                   user registers when used with the --user0,
                                   --user1, or --mac options.  Committing is
                                   permanent and cannot be reversed.
          --debug-port=TYPE      specifies to debug port to be used. TYPE can be
                                   'JTAG' or 'SWD'. 'JTAG' is the default. This
                                   option is only valid when used with "-i ICDI"
                                   or "-i RedProbe".
          --debug-unlock=CLASS   unlocks the JTAG/SWD debug pins if they were
                                   configured as GPIO. CLASS can be 'sandstorm',
                                   'fury', 'dustdevil', or 'tempest' corresponding
                                   to the class of the Stellaris device to be
                                   unlocked. This operation will not work for the
                                   sandstorm class if pins PC0 or PC1 are
                                   configured as GPIO. This option is only valid
                                   when used with "-i ICDI" or "-i RedProbe".
      -d, --disable-autobaud     disables the autobaud feature used by the
                                   Stellaris Boot Loader. This option is not valid
                                   unless used with "-i serial".
      -e, --erase=RANGE          erases the flash according to RANGE. RANGE can be
                                   'all', a single address, or an address range.
                                   If 'all' is specified, the entire contents of
                                   the flash will be erased. If a single address is
                                   specified (ex. 0x0), then the flash page
                                   containing that address will be erased.  If an
                                   address range is specified (ex. 0x0-0x3FFF),
                                   then the flash pages corresponding to the
                                   address range will be erased. When an address
                                   range is specified, the start and end addresses
                                   are both inclusive. This option is not valid
                                   when used with "-i serial".
          --force                forces the user register programming operation to
                                   occur without confirmation. Also forces the
                                   specified combination of an erase and a program
                                   operation to occur even if the address range to
                                   be erased does not encompass the address range
                                   to be programmed.
          --hreset               Performs a hardware reset on the connected
                                   target device.
      -i, --interface=TYPE       specifies the interface to be used. TYPE can be
                                   'ICDI', 'RedProbe', 'serial', 'ethernet' or
                                   'USB'. ICDI and RedProbe use the debug port
                                   interface. 'serial' uses the UART interface.
                                   'ethernet' uses the ethernet interface. 'USB'
                                   is the USB Device Firmware Upgrade interface.
                                   The default is 'ICDI'. The option is not valid
                                   unless used with "-q manual".
          --icdi-update          Performs an update of the ICDI firmware on the
                                   connected EK.  This command will determine if
                                   the connected device has a Stellaris ICDI interface
                                   and update the firmware, if the firmware is out
                                   of date.
          --device=INDEX         specifies the 0-based index of the USB DFU device
                                   to access when used with --interface=USB. The
                                   default is the first device, index 0.
          --mac[=MAC]            programs the MAC address to the User0 and User1
                                   registers. If --commit is specified, then the
                                   MAC address will be permanently programmed.  If
                                   the MAC address is not provided, the registers
                                   will be read and displayed in MAC address
                                   format.  MAC needs to be a '-' or ':' separated
                                   MAC address (ex: 00-1A-B6-02-74).  MAC Address
                                   of 00-1A-B6-00-02-74 will be stored as
                                   User0=0x00B61A00 and User1=0x00740200.
      -n, --net-config=SERVERIP,CLIENTIP,CLIENTMAC
                                 specifies the network configuration to be used for
                                   programming over Ethernet.  SERVERIP is the IP
                                   address of the network adapter on the PC.  Use
                                   "lmflash --netadapters" for the list of active
                                   network adapters.  CLIENTIP is the IP address to
                                   be assigned to the target.  CLIENTMAC is the MAC
                                   address of the target.  SERVERIP and CLIENTIP
                                   need to be '.' separated IP addresses (ex:
                                   169.254.19.70). CLIENTMAC needs to be a '-' or
                                   ':' separated MAC address (ex:
                                   00-1A-B6-00-02-74).  There is no default for
                                   this option.
      -o, --offset=VALUE         specifies the offset from address 0x0 to be used
                                   for the programming operation. The default
                                   is '0x0'.
      -p, --com-port=PORT        specifies the COM port to be used.  PORT can be
                                   from 'COM1' to 'COM25'.  The default is 'COM1'.
                                   This option is not valid unless used with "-i
                                   serial".
      -q, --quick-set=CONFIG     specifies the quick set configuration.  CONFIG can
                                   be 'manual', 'list', and a set of boards. Use
                                   "lmflash -q list" to get the set of supported
                                   boards. If CONFIG is 'manual', then the
                                   configuration needs to be set up manually using
                                   the other options provided.  Otherwise, the
                                   configuration options will be automatically
                                   configured based on which configuration is
                                   specified by CONFIG.  The default is 'manual'.
      -r, --reset                resets the microcontroller after the programming
                                   or erase operation has completed. If -v is
                                   specified, then the reset will occur after the
                                   verify.
      -s, --speed=SPEED          specifies the debug port speed in Hertz. The
                                   default is '1000000'. This option is only valid
                                   when used with "-i ICDI" or "-i RedProbe".
      -u, --upload=RANGE,FILE    uploads the flash contents of the specified RANGE
                                   to the specified binary image (.bin) FILE. RANGE
                                   can be 'all', or an address range.  If 'all' is
                                   specified, the entire contents of the flash will
                                   be uploaded. If an address range is specified
                                   (ex. 0x0-0x3FFF), then the contents of the
                                   address range will be uploaded. When an address
                                   range is specified, the start and end addresses
                                   are both inclusive.  This option is not valid
                                   when used with "-i serial".
          --user0[=VALUE]        programs VALUE to the User0 register. If --commit
                                   is specified, then the value will be permanently
                                   programmed.  If VALUE is not provided, the
                                   register will be read and displayed.
          --user1[=VALUE]        programs VALUE to the User1 register. If --commit
                                   is specified, then the value will be permanently
                                   programmed.  If VALUE is not provided, the
                                   register will be read and displayed.
      -v, --verify               verifies the result of the specified operation by
                                   comparing the flash contents to the expected
                                   result.  The specified operation will be
                                   performed first.  If -v is used with both -e and
                                   a program operation, then only the result of the
                                   program operation will be checked. This option
                                   is not valid when used with the -u or
                                   --debug-unlock options.
      -x, --frequency=FREQ       specifies the frequency in MHz of the clock source
                                   provided to the microcontroller.  If the clock
                                   source is not a whole number, then the frequency
                                   should be rounded up to the closest whole
                                   number.  For example, if the clock source is
                                   5.12MHz, then a value of 6 should be used for
                                   FREQ.  The default is '8'. This option is not
                                   valid when used with "-i serial".
          --xfer-size=SIZE       specifies in bytes the transfer size to be used
                                   when programming via the serial interface. The
                                   value must be a multiple of 4 between 8 and 252.
                                   The default is 60 which corresponds with the
                                   default buffer size used in the boot loader and
                                   serial flash loader.  
          --help         displays this help and exits
          --examples     displays usage examples and exits
          --netadapters  displays network adapter information and exits
          --usbdevices   displays connected USB DFU devices
          --version      outputs version information and exits

    Report bugs to
    <e2e.ti.com/.../default.aspx>.

  • Hello Forrest,

    I would not recommend using LMFlash as a command line interface.

    Better options would be:

    1) The eflash tool provided in TivaWare which is a command line equivalent to LM Flash for Ethernet boot loading. See Section 4 of the Tools User Guide for more details, but I think this is basically what you are looking for.

    2) CCS Uniflash which has better command line support and supports a wider array of programming tools. See details in the Quick Start Guide: http://downloads.ti.com/ccs/esd/uniflash/docs/latest_qsguide.html

  • Hello Ralph,

    First I have heard of the "eflash tool". I am working with assumptions to use LM Flash Programmer developed by engineers before I got here. 

    We have been loading firmware using CCS8 to date and now is the time I though I would get a command line interface working.

    FYI I have been trying to come up to speed on UniFlash for the CC3220 in our produce through the GUI and have just today received my Certificate Authority flash drive and now hope to make progress programing the CC3220.

    Regardless of these new or alternate tools, TI should have links for something like a user manual or programmers guide for the LM Flash Program on their web page where they still allow the down load of the exe for the same.

  • Hello Forrest,

    Well, the problem with linking a User Manual or Programming guide is that one simply doesn't exist. It's a handy tool but the original developers never put together official documentation for it. Back when it was made, development of tools like that was a bit more 'wild west' and so situations like that happened, and while it lacks documentation to go with it, the tool remains useful enough that it has survived to times like now where documentation is expected and practically required.

  • Thanks for getting back to me even if it is with the bad news of no manual.

  • I have marked this resolved.

    Others who come across this may get help from LM Flash by using the lmflash.exe -h