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.

TM4C1294NCPDT: LM Flash Programmer stuck attempting to connect

Part Number: TM4C1294NCPDT

I am using the boot_emac_flash project with my own application.  I load boot_emac_flash at 0x0 and my application is loaded at 0x4000.  A software command in my application calls a routine that duplicates the code in the boot_demo_emac_flash file and I have traced it down to where it calls the bootloader in function SoftwareUpdateBegin.  What I am seeing in Wireshark is a constant UDP packet of 72 bytes that contains the MAC address.  The bootloader is in the UpdateBOOTP main application loop.

  • Hi Robert,

     Did the original example with both the boot_emac_flash (as the bootloader) and the boot_demo_emac_flash (as the application firmware) work?

     If the bootloader is executing the UpdateBOOTP then it should send out the BOOTP request to the server. What did you do from the server side? If you are using the LM flash programmer did you go to the Program tab and specify your application file and then hit the Program button? See below.

    Can you show your wireshark capture?

    Please first run the original example with the boot_demo_emac_flash application? You should see something like below?

  • Tried to get the boot demo flash running but it never gets past the BOOTP

  • Hi Robert,

     I want to know how you setup the server side. I assume you have done do but just wanted to make sure. 

     1. Erase your flash completely.

     2. Program the bootloader (boot_emac_flash) into the flash via the JTAG. The bootloader will be programmed starting at 0x0. Run the program.

     3. In LM flash programmer specify the client IP address and the MAC address. You should get the IP address in the terminal window after you run step 2.

    4. Specify the boot_demo_emac_flash.bin and hit the Program button.

    It may take a while to see the actual TFTP transfer. The reason is that immediately after you run the bootloader in step 2 the client is sending the BOOTP request. However, you have yet to click the Program button in step 4. If the client does not receive the reply from the server it will wait for 1 second before it sends the next BOOTP request. If no response from the server further then it will then 2 seconds, 4, 8, 16, 32.... Therefore, the longer you wait to hit the Program button the longer (i.e. waiting 32 seconds) before the client sends the next BOOTP request. Once you hit the Program button the TFTP should start. If this is not the problem you are seeing then it will be something else. The example always work. If the example doesn't work at your side then it is not the software side of issue on the client side. 

      Please follow two steps to attach the image. 

  • screen1.docxCharles,

    The computer, development board and network server are all connected to a network switch.  I have disabled the  firewall on the computer.

    1. I have erased the entire flash.

    2. Programmed the bootloader at 0x0.  The development board screen does not display the IP address or the MAC.  I believe the screen info is displayed by the demo application and not the bootloader.

    3. I see BOOTP messages in WireShark.

    4. I depress the program button on LM Flash Programmer

    5. WireShark continues to display BOOTP requests.  LM Flash Programmer status line displays "Attempting to connect"

    If I also program the boot demo application at 0x4000 I see the following:

    1. Development board screen displays "Waiting for signal" and the IP and MAC are displayed.  No BOOTP messages.

    2. Depress the Program button, "Waiting for signal" message changes to "Updating..." and BOOTP messages start and continue without end.

    In bl_config.h the following is defined:

    #define ENET_BOOTP_SERVER       "tivo"

    Is this correct?

    I am still not able to paste a screen shot in to the post so I pasted it in a word doc and attached it.

  • Hi Robert,

     Sorry, my bad. I need to add step 0 too.

    0. Run either enet_lwip or enet_io example to acquire the IP  address from your DHCP server. See below screenshot. The reason to first run this example is to simply acquire an IP address. The bootloader is meant to be very compact in size using the BOOTP protocol. However, the BOOTP is static in nature, unlike the DHCP which provides dynamic IP address to the client upon request. Normally your DHCP will lease an IP address to your client (the MCU) for a certain time frame, may be hours or a day. Right after you acquire the IP address by running the enet_lwip the IP address will still be valid for a while. This is the IP address you want to enter in the LM flash programmer. If you are using the launchpad then in the back of the board, there is a sticker that shows the MAC address. The LM flash programmer is acting as the BOOTP and TFTP server. It must have the association between the IP address and the MAC address pre-recorded in its system.  Please note that you must have the correct IP address and MAC address entered in the LM flash programmer. Without them, the sever cannot accept the BOOTP request from the client. 

  • Charles,

    The boot_demo_emac_flash does display the IP and MAC on the LCD of the development board.  Is this not the correct IP and MAC?

    My WireShark log is seeing the BOOTP request and the ARP broadcast for who has the IP address that is assigned to the computer connected to the development board via a switch.  the difference I see between the screen shot you sent and mine is that my ARP broadcast is asking to tell 255.255.255.255 and yours is asking to tell the assigned IP address of the device running the bootloader. 

    screen2.docx

  • Robert,
    The boot_demo_emac_flash and enet_lwip should give the same IP and MAC address. You can run the enet_lwip to check.

    It seems to me that you load the boot_demo_emac_flash application into the flash via the JTAG. Is that correct?

    Can you follow the steps I listed which is to program the boot_emac_flash (the bootloader) into the flash via the JTAG. Run the bootloader and then load the boot_demo_emac_flash via the Ethernet. I'd like to also see what you enter on the LM flash programmer.
  • Charles,

    I do load the boot_demo_emac_flash via the JTAG.

    I don't seem to get a response to the ARP broadcast.

    screen3.docx

  • Robert,
    Can you try the enet_lwip? This is a web server example? Once running you can go to your browser and type in the IP address at the URL locator. If you also have problem with the ARP running the web server problem then we at least know that you have an ARP issue that is independent of the any examples.
  • Charles,

    enet_lwip loaded and web page displays with IP 172.16.2.137.
  • Robert,
    That is not my question. I ask if you can successfully see the web server contents on your browser. Also use the wireshark to see if the enet_lwip also get stuck in the ARP.
  • Charles,

    I can see the web server.

    The first screen shot is after depressing the reset button on the development board.  The second screen shot is after entering the IP in the web browser.

    screen4.docx

    Robert

  • Robert,

     Ok. So there is nothing wrong with the ARP packet. That is a good starting point.

     I just repeated the same test on my Evaluation Board. Earlier I was testing on a LaunchPad. It is still working for me in the Evaluation board. Please see below images. Please note my client target address and MAC address will be different from yours. As a matter of fact your client address should be  172.16.2.137 and 00-1A-B6-02-96-78 and I think you entered them correctly into the LM flash programmer.

    You should see 55704 bytes transferred after it is done. 

    I really don't know why it is not working on your side. Your client seems to send out the BOOTP packets. However, you said it got stuck in the ARP. When you run the enet_lwip your PC is able reply its MAC address but not when you run the bootloader. This is where I'm lost too.

    Can you rerun the example? Now please do what I have been telling earlier. I repeat, please do NOT load the boot_demo_emac_flash via JTAG. You have been doing that in the past. Just load the boot_emac_flash (the bootloader) into the flash and run it. On the server side (the LM flash programmer), enter the IP and MAC address which you have done already. You can just go to the Program tab and hit the program button. Perhaps you want to hit the program button after you see the BOOTP sent out by the client. Let's see if you can get this work before you venture into updating new application firmware when the flash already has an running application firmware. 

  • Charles,

    I performed the following and added screen shots in the attached file;

    1. Set the LM Flash Programmer Quick Set to TM4C129X Development Board.

    2. Erased entire flash.

    3. Programmed boot_emac_flash.bin

    4. Set the LM Flash Programmer Quick Set to Manual Configuration.

    5. Program boot_demo_emac_flash.bin

    6. WireShark

    You said earlier that the LM Flash Programmer act as the BOOTP and TFTP server.  Stepping through the bootloader, I see that it processes the BOOTP reply but it times out sending a TPTP read request.

    I asked before, what should ENET_BOOTP_SERVER setting in bl_config.h be?

    screen5.docx

    Robert

  • Robert,
    Please see below.

    #define ENET_BOOTP_SERVER "tiva"
  • Charles,

    I removed the firewall from my computer running the LM Flash Programmer and the ARP handshake now works.
    Thank you for your time and assistance. Have a happy holiday.

    Robert