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: Ethernet based bootloader is stopped working(boot_emac_flash)

Part Number: EK-TM4C1294XL

Hello,

I am trying to implement ethernet based bootloader using EK-TM4C189XL board. I am using three tivaware examples for implementing this

1. enet_lwip - programmed initially to know the DHCP assigned to our microcontroller.

2. boot_emac_flash - Tiva bootloader programmed at location 0x0000.

3. boot_demo_emac_flash - Programmed using LM Flash frommer in manual configuration via ethernet. Programming location 0x4000.

Few months back I was successfully able implement ethernet bootloader using these files. But I have tried again, but its not working. Please tell is there any issue in boot_emac_flash demo?

After programming boot_emac_flash application, I can see BOOTP requests in wireshark as shown below image.

After this I have tried programming boot_demo_emac_flash by configuring LM flash programmer as shown below.

Captured Wireshark data when I tried programming. And I can see system is sending Magic packe to Tiva. And also I have observed Tiva is still sending BOOTP request during this.

Thank You

Regards,

Balaji TS

  • Hi,

      If it works before then I believe it should work in the same environment. Can you recall several months back if you were using a different PC or on a different network? 

      Can you disable all the network cards on your PC except the one that is connected to the same network as the MCU. There was a reporting bug in LM flash programmer that it may send the magic packet through the wrong NIC (Network Interface Card). Therefore, if you have multiple NIC on your laptop or PC, please keep only the one that is connected to the same network as the MCU. 

      This thread may also be helpful. https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1126445/ek-tm4c1294xl-tm4c1294

  • Thank you for your response Charles Tsai,

    Yes previously it was working in the same PC which I am using now. 

    And I have disable all the Network cards except the one which is connected to MCU also. Still not working. Even I have tried by reinstalling Tivaware and imported new boot_emac_flash and boot_demo_emac_flash codes. 

    If possible can you please test this at your side and confirm me wether its working or not? 

    Thank you.

    Regards,

    Balaji TS

  • Hi,

      I just ran it and it is working for me. See below wireshark. 

     My MCU client IP is 192.168.254.201

     MY MCU MAC address is 00-1A-B6-02-B4-BA

     MY PC IP address is 192.168.254.102

    As you can see in the wireshark after boot_emac_flash is loaded and running, it will send BOOTP request. It sends the BOOTP requests at 1s, 2s, 4s and 8s. This is in order not to flood the network with bunch of BOOTP requests. Therefore, if if I don't click the 'Program' button on LM flash programmer for boot_demo_emac_flash.bin then the next BOOTP request will come at 16s and then 32s. So it depends on how fast you click the 'Program' button after the bootloader starts to run. You need to give some time. For example, if you click the 'Program' button after the BOOTP has send out multiple BOOTP requests, you may need to wait up to 64s or so for the client to send out the next BOOTP request. One recommendation would be to hit 'Program' button as soon as boot_emac_flash starts to run. 

    Once the BOOTP/TFTP server receives the BOOTP request the TFTP starts to send the packets between the two IP addresses (192.168.254.201 and 192.168.254.102).

     Check and make sure your PC and the MCU client are on the same subnet. 

    [Edit]. After you program boot_emac_flash.bin, reset the device. 

  • Thank you for testing and verifying,

    I have few doubts:

    1. Can we use Static IP or should it be DHCP only.

    2. Can we directly connect ethernet cable between PC and TIVA board. Or should connect them through a Switch?

    3. Can I put MAC address in FF:FF:FF:FF:FF:FF format or is it compulsory to use FF-FF-FF-FF-FF-FF format.

    Thank you.

    Regards,

    Balaji TS

  • 1. Can we use Static IP or should it be DHCP only.

    2. Can we directly connect ethernet cable between PC and TIVA board. Or should connect them through a Switch?

    3. Can I put MAC address in FF:FF:FF:FF:FF:FF format or is it compulsory to use FF-FF-FF-FF-FF-FF format.

    I will suggest you start with the TivaWare stock example first. In that case, if you first run enet_lwip, it is using DHCP to get an IP address for the client. This address will be leased to the client for some time, maybe some hours or so. 

    You can connect between PC and TIVA but that needs to be a cross-over Ethernet cable. I will suggest you first connect to a switch first. That is what I do. 

     I suppose both MAC formats will work. I use FF-FF-FF-FF-FF-FF format.

  • Hi Charles thank you for the clarification.

    I have tested Tivaware example in another PC. Its working fine in that PC. But its in working in my PC. I have disable allthe Network cards except the one which is connected to MCU network. And I have tried reinstalling LM Flash programmer and even rebooted my PC. Still not working.

    What might be the reason its not working in my PC? 

    When I programm boot_emac_flash, I can see bootP requests in wireshark. Afterthat I pressed program button in LM flash progarmmer( by keeping proper MAC and IP) then I can see UDP magic packet getting broadcasted as shown in below image. But still Tiva is sending bootP requests only.

    Regards,

    Balaji TS

  • Hi Balaji,

      Not sure what is the problem. Seems like the BootP server is not replying the acknowledge to the BootP request from the client. If it is working on another PC then it means the example is working. It may be PC related. Are the two PC on the subnet? Please make sure your non-working PC is in the same subnet as the MCU. Does your non-working PC have a different firewall settings compared to the working PC? You might need to check with your IT support for that. Perhaps you can try a third PC if you have one to confirm that it is truly PC specific. 

      Can you try the command-line tool eflash.exe? Please first try it on your other working PC and then your non-working PC. 

    C:\ti\TivaWare_C_Series-2.2.0.295\tools\bin\eflash.exe

  • Hi Charles,

    Sorry for the late reply.

    I have tested LM flash programmer with 2 more laptops. Its working fine in those two laptops. 

    And I have tried eflash command method in my laptop. With eflash command I am able update the firmware through ethernet. But still don't know why LM flash programmer is not working in my Laptop.

    Thanks & Regards,

    Balaji TS