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: Ethernet Firmware Update

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

I've burn boot_emac_flash which is ethernet bootloader and then burn boot demo emac using LM Flasher and then burn led blinking code using LM flasher but nothing happenedalthough LM flasher showing progress while burning the code using ethernet why the code does not run ? do anyone have any idea ?  

  • Hi,

    I've burn boot_emac_flash which is ethernet bootloader and then burn boot demo emac using LM Flasher and then

    I think there are some issues I see.

    Issue 1: If this is the sequence you do in LM flash programmer, then you most likely erase the bootloader when you load the boot_demo_emac_flash. The first time you load the boot_emac_flash, it should work as this is no difference than loading any program like the hello or blinky. However, when you load boot_demo_emac_flash, the LM flash programmer is going to first erase the entire flash before it loads the next program. To circumvent this issue, you need to use Uniflash tool to load both the bootloader and the application at the same time. See below. 

     

    Issue 2: I'm not quite sure why you want to load both bootloader and the application at the same time through JTAG. if this is for debugging only then it is fine. The real use of the examples is to first load the bootloader through JTAG. Once the bootloader (boot_emac_flash) is loaded, it will run and set up the Ethernet module and then download the the application example (boot_demo_emac_flash) through the Ethernet port, not the JTAG port. Once the application is downloaded to the flash, the application will run and blink the LED. The application can also jump back to the bootloader again so that a new application image can be updated. 

    If you are going to use the bootloader to download the application firmware through the Ethernet then you need to follow the below steps. 

    Step1: Run the enet_lwip or enet_io to obtain the IP address.  On the terminal window you should see the IP address printed out. Record this address. 

     Step2: Load the boot_emac_flash via the JTAG interface using CCS. This is the bootloader to be loaded at 0x0. 

     Step 3. Bring up the LM flash programmer. See below image. Provide the IP address that you just record in step 1 and enter the IP address and also the MAC address. If you are using the LaunchPad, the MAC address is shown on the sticker on the back of the board. 

    Your PC will be your TFTP server as well as a BootP server to transfer the program image to the MCU (the client). You need to inform the BootP server for the MCU’s IP address and its MAC address. This is how a BootP server works. Unlike a DHCP server, the MAC address and its associated IP address must be manually entered and known ahead of time because BootP is static in nature. This is why we enter them in the configuration tab. However, we don’t know what IP address to enter. We cannot enter any arbitrary address that might interfere with other IP address in the network.

    This is the reason we must first run a different Ethernet example such as enet_lwip. The enet_lwip will send the DHCP request. After the IP address is acquired we will just record the IP address value for reuse in boot_emac_flash. The IP address acquired by running enet_lwip shows 10.219.14.138 in my image. Note your address will be different from mine. The reason we can use this address is that the DHCP IP address is leased for some hours. The address we acquired by running the enet_lwip will be good for a few hours.

    Step 4. Go to the Program tab. Provide the path to the application image which is the boot_demo_emac_flash.bin. This TvaWare example was already llinked to 0x4000. DO NOT change it. You can change to wherever you like in the future. But until you get the example working, do NOT change anything. 

     Step 5. if the boot_emac_flash in step 2 is still halted in CCS, you can run it now. 

     Step 6. After the boot_emac_flash is run, you can hit the Program button in the above image.

     Step 7. Suppose everything went smoothly and the boot_demo_emac_flash application was programmed and if you want to debug it, you can load the symbol by going to Run->Load->Load Symbols. The symbol is contained in the boot_demo_emac_flash.out. Note it is the .out file. Do load symbols, not to be confused with Load program. 

    I will suggest you use WireShark to view the traffic between the MCU and the TFTP/BOOTP server. Below is what you should see. The MCU will send BOOTP request to the PC and after the handshake the TFTP sever sends the program image (boot_demo_emac_flash.bin) to the MCU via the Ethernet interface.

  • i burn boot_demo_emac using lm flasher via ethernet not J-TAG 

  • If the boot_demo_emac_flash is downloaded through Ethernet then what is the problem you are facing? Have you done a reset to the board? Is the boot_demo_emac_flash is the stock example or you modify it? The boot_demo_emac_flash is supposed to blink a LED until it receives a command from Ethernet to jump back to the bootloader for another firmware update. 

  • the boot_demo_emac_flash i take the .bin file from tiva folder, i burn the bootloader from UNIFLASH alone then i burn boot_demo_emac_flash via ethernet using LM Flasher and there is no led blinks. 
    and if i need to burn another code what should i do ?

  • In CCS, look at the memory content. Do you see boot_emac_flash bootloader at 0x0 and do you see the firmware boot_demo_emac_flash at 0x4000? If you see all 0xF's in these regions then the firmware didn't get programmed. 

    If you run the boot_demo_emac_flash example firmware then it will jump back to the bootloader to burn another code if in LM flash programmer you hit the Program button again.

  • in UNIFLASH i saw both codes in the UNIFLASH there is a code starts from 0x0 which i think is boot_emac_flash and there is another one resides at 0x4000 which is the boot_demo_emac and there is no led blinks 

  • I tried it but it still there is no blinking 

  • Do you have another board to try?

    When you connect with the debugger, where is the code stopped at?

  • it stopped at pinout 

  • i run the debugger with only boot_demo_emac_flash it stops at Pinoutset() line

  • oh and i don't have another board

  • The Pinoutset() function is located at C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\drivers\pinout.c file. Please make sure when you compile your code you are using the correct file. When you say it stops at Pinoutset() what does it actually mean? This function has no while loop. It just initialize the pinux and exits. It shouldn't get stuck. If it gets stuck, which line is it stuck?

    I also try to load both the boot_emac_flash.bin and boot_demo_emac_flash.bin using Uniflash. Did you make sure the boot_demo_emac_flash starts at 0x4000. See below. After the two programs are successfully loaded, I hit the reset button on the board and I can see the LED blink at a 1 second rate.  I cannot repeat your problem. I will suggest you single step and find out exactly what is stuck? Make sure after you load the bin files, you will need to load the symbols in CCS in order to debug.