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.

Starterware/TM4C1294NCPDT: Eflash utility tool issue

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

Tool/software: Starterware

Hello.

Can anyone clear my doubts relating the eflash tool provided in the tools folder in Tivaware. I have read the bootloader document and it said that the the Tiva-C can be updated remotely via Ethernet connection. So i'm doing my hands on the eflash tool that is provided. 

My doubt is what IP address do we need to specify in the " -i " parameter in the cmd file. 

Also is it correct that a new image file can be sent via the internet and with the help of the eflash utility a new image can be flashed remotely from anywhere??

Also i have read in other posts that we need the boot_emac_flash code from the memory location 0x0 to enable the downloading of new image file using ethernet.

Thank you.

  • Hi Nishit,
    If you are interested to bootload via Ethernet, you can refer to the example boot_emac_flash and boot_demo_emac_flash under the <Tivaware_installtion>\examples\boards\ek-tm4c1294xl. The boot_emac_flash is the bootloader that will load the application boot_demo_emac_flash. Please also refer to the bootloader user guide under TivaWare installation.

    Below is another post for your information. You can use the eflash.exe as a lighter-weight firmware upload utility rather than the LM Flash Programmer.

    e2e.ti.com/.../1932526
  • Hello Charles,

    Thanks for your quick response. I read the boot_demo_emac_flash and boot_emac_flash c files. 

    So basically what i can understand that i need the boot_emac_flash from location 0x0000 and the boot_demo_emac_flash from location 0x4000. I flashed both the codes at the respective locations and then debugged the code. In the boot_demo_emac_flash there is a SoftwareUpdateBegin () function call. So does this function calls the bootloader present at 0x0000? If yes then how the bootloader will load data via Ethernet? 

    Can you provide me sequential steps of how i can upload a firmware file remotely using the Ethernet cable. I'm not getting the exact sequence in which i should proceed with this example.

    Best regards,

    Nishit.

  • Hi Nishit,

      The sequence is such:

      1. Load the boot_emac_flash using debugger. The boot_emac_flash is the bootloader which will never be erased. It resides at 0x0. After power up, you will first run the bootloader. The bootloader will check if there is already a valid stack pointer and reset handler for the application starting at 0x4000 (note this address is not permanent. You can change it). If there is no valid stack pointer and reset handler then it will configure the ethernet port and be ready to communicate with the external upload utility such as LM flash Programmer. If there is already a valid SP and Reset handler then it will just jump to the application and run the application.

      2. You will use the LM flash programmer. In the configuration tab, in the Quick Set menu, select "Manual Configuration". In the Interface menu, select Ethernet and provide the MAC address (shown in the back of the launchpad) and the IP address (I will suggest you first run enet_io example to first obtain the DHCP IP address and put the address).

     3. Go to Program tab under the Select .bin file menu, select the boot_demo_emac_flash.bin. The LM flash programmer is supposed to communicate with the MCU and the MCU will download bin file and write the application to the flash.

      Two more notes. You need to first delete the boot_demo_emac_flash that was present in your flash earlier. Secondly, there is caveat to this demo. I have heard that the demo may have some issue. After you try to program the .bin file by clicking the Program button in the LM flash programmer it doesn't progress and got stuck. Nevertheless, the above steps show how the bootloader demo is supposed to work. You should read the bootloader user guide where it is explained. 

  • Hi Charles,

    Thanks for the detailed steps but how this demonstrates the upgradation of firmware remotely? I want my microcontroller to download a firmware image when it is connected to the LAN via Ethernet port provided on the Launchpad.

    Is this possible? Also i have read that we need to send a series of AA AA AA characters followed by the MAC address of the Launchpad 4 times via the Ethernet port to make the controller download the firmware file. Is this information true?

    My final goal of testing this is to download a new code, suppose bilnky to the Launchpad which is connected to the LAN via Ethernet port. On a button press the TIVA-C will jump on to the bootloader mode and will wait for the magic packet on the Ethernet port which i'll be sending via TCP/IP protocol (i suppose).

    Can you give me some insight on this endeavor ?

    I have been reading the bootloader user guide and i'm trying my best to understand the flow. 

    Regards,

    Nishit.

  • Hi Nishit,

      By pressing the switch you are forcing the application to call the bootloader which will download a new application firmware. If you are looking for means to update the firmware remotely then here is an excellent thread with project demo developed by John Piliounis. 

  • Hello Charles,

    Thanks for providing me the link. Unfortunately the link is not available on John's thread. 

    Also i tried the enet_io example code that you suggested but the code gets stuck on "Waiting for link" on the serial terminal. Also the LED keeps on blinking on the board.

    Hence i'm unable to get the IP address. Also i tried changing the the parameter in the lwIPinit() function from IPADDR_USE_DHCP to IPADDR_USE_AUTOIP as it was mentioned in the CLP Workbook.

    Still the terminal shows Waiting for link and the LED keeps on blinking indefinitely.

    What could possibly the reason for this? Do i need to make any other changes in the Example code? I'm using TivaWare_C_Series-2.1.4.178.

    Regards,

    Nishit.

  • Okay. The IP address issue has been solved.
    Still the link is not available at the thread you have provided.
    Can you give me some insight on downloading files remotely via Ethernet? What steps i should follow and what pre requisites i'll be needing ?
    Regards,
    Nishit.
  • Hi Nishit,

      The demo project was provided by John Piliounis on dropbox. Will need to contact him to upload onto dropbox again.