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.

LMFLASHPROGRAMMER: Ethernet programming does not send out the UDP packets on correct interface

Part Number: LMFLASHPROGRAMMER

I have two active ethernet nics on my pc (win10 pro).

One is a 192.168.2.x network and the other is a 172.16.x.y network

I wish to program units that are on the 172.16 network. I select it from the drop down list under ethernet adapter and fill in the IP and MAC of the device, but it is never able to connect.

Using wireshark I can see that the UDP packets are still going out the 192.168.2.x network even when i select the 172.16.x.y network adapter.

If i move the device to my 192.168.x network (and update the IP field to its new ip on that network) i can program it just fine.

It doesn't look like this is a tool that is being maintained, but does anyone have a workaround short of implementing my own programmer?

  • It doesn't look like this is a tool that is being maintained, but does anyone have a workaround short of implementing my own programmer?

    I haven't tried it myself, but found Using the LM Flash Programmer for automatic flash updates over ethernet has a possible work-around.

  • And in TivaWare TivaWare_C_Series-2.2.0.295 there is tools/bin/eflash.exe which is a command line "Ethernet Boot Loader Download Utility", for which the source is in the tools/eflash directory.

  • Hi Chester,

      Thanks for pointing out eflash.exe but I'm a bit skeptical that it may produce the same result but one can modify the source if needed. 

    Hi David,

      There is a bug in LM Flash Programmer . If you want to use LM flash program the workaround would be by disabling all network adapters in the Windows control panel except for the interface you are using, LMFlash will send the magic packet to the correct interface. Please also try as suggested by Chester as there is currently no plan to update the LM flash programmer. 

  • That seems like a pretty easy fix (probably need to correctly set localendpoint on your socket?) to not have been fixed in the 7 years :-(

  • Ok I *WAS* able to fix it using the source code mentioned in the tools/eflash directory.

    For others, I had to:

    Find a working copy of getopt.c/getopt.h for windows and stick them in my project.

    Add

    #pragma warning(disable : 4996)
    #pragma comment(lib, "Ws2_32.lib")

    Add a --localip= option to the command arguments

    Correct the line 

     sUpdateSocket = CreateSocket(ui32LocalAddr, htons(MPACKET_PORT), 1, FALSE);

    to be 

     sUpdateSocket = CreateSocket(ui32LocalAddr, htons(MPACKET_PORT), 1, TRUE);