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.

DK-TM4C129X: Is there an example for Ethernet ROM-based boot loader?

Part Number: DK-TM4C129X

Hello,

I am looking for a sample project that uses ethernet ROM based boot loader for the DK-TM4C129X. The samples I found are flash based. But it looks like the ROM based is a more straightforward implementation. I have already implemented a UART ROM based in the past. I'm not sure if Ethernet implementation would be similar. 

Thanks.

AJ 

  • I forgot to add, I am using TI-RTOS in this application.


    Thanks.
    AJ
  • Hi,
    No, there is no ROM based Ethernet bootloader. The ROM only has bootloader for UART, I2C and SSI.
  • Hi Charles,

    Thanks. I have been doing some digging though and I noticed that there are posts that show ROM based Ethernet for TM4C129. This one for instance

    https://e2e.ti.com/support/microcontrollers/other/f/908/t/510876?How-to-update-firmware-in-TM4C129EXL-through-Ethernet-

    I am assuming it applies to all TM4C129. Please clarify 

    Regards,

    AJ 

  • Hi Charles,

    Also in this post, Amit seems to imply that ROM ethernet is possible I just don't know how to go about it

    e2e.ti.com/.../567064

    Thanks.
    AJ
  • Hi,

     Ok, my bad. I got things mixed up. I was wrong in my earlier reply. I just tried it and it works. You can try it for yourself just like the UART. See below. You will need to run a TivaWare Ethernet example like enet_lwip first and record the IP address. Afterward, you must erase the flash completely. See below screen to provide the IP address you just recorded from running the enet_lwip example and the MAC address. If you have a LaunchPad the MAC address is displayed in the sticker on the back of the board. You will then go to the Program tab and provide your .bin file. Once you hit the program button the LM flash programmer should receive the BOOTP request from the MCU and start the TFTP download. 

  • Hi Charles,

    Thanks. Just another question, but before I could use LM flash, what's the function call I should use and are there steps to do first before the function call. I did the ROM based UART before and before I could use LM Flash, I had to include some steps in the code like the one below. What are the lines of code to include in the application to call ROM ethernet before I could use the LM flash and what is the exact function call is it ROM_UpdateEthernet()? I could not find this anywhere.


    //
    // Disable all processor interrupts. Instead of disabling them one at a
    // time, a direct write to NVIC is done to disable all peripheral
    // interrupts.
    //
    HWREG(NVIC_DIS0) = 0xffffffff;
    HWREG(NVIC_DIS1) = 0xffffffff;
    HWREG(NVIC_DIS2) = 0xffffffff;
    HWREG(NVIC_DIS3) = 0xffffffff;
    HWREG(NVIC_DIS4) = 0xffffffff;

    //
    // Call the ROM UART boot loader.
    //
    ROM_UpdateUART();


    Regards,
    AJ
  • Ok, I see what you are trying to do. You want to call ROM_UpdateEMAC from your application code. Yes, do as you what you did for UART to disable all interrupts.
  • Hi Charles,

    One more thing, it looks like the steps you mentioned apply to a Non-RTOS based project. Are there any additional stuff to do since I am using TI RTOS/SYS BIOS? And I am not using LWIP but NDK instead. However, If I do a Bios_exit, won't that stop NDK from running? I'm a bit confused here but here is what I have in mind and please let me know if there is something I am missing.. Or if anyone has done this, having some documentation of the actual steps would be of great help.

    I got the idea I have below from this post

    e2e.ti.com/.../723031


    System_atexit( SomeFunction ); //See SomeFunction below
    BIOS_exit(0); //

    SomeFunction
    {

    I'll do all the LWIP and network initialization here.. question is, should I disable NDK before doing the LWIP initialization and other stuff to set up the system for LM flash?
    If so, how do I do this?
    Or do I even need to disable NDK?
    Or does the Bios_exit happen first before this SomeFunction is executed therefore that takes care of disabling NDK?
    Or do I even need LWIP since NDK is the RTOS network stack?
    If I don't use LWIP. won't The BIOS_exit disable NDK, so how will LM flash communicate?


    and then after dealing with all the network stuff above I'll call the lines below

    HWREG(NVIC_DIS0) = 0xffffffff;
    HWREG(NVIC_DIS1) = 0xffffffff;
    HWREG(NVIC_DIS2) = 0xffffffff;
    HWREG(NVIC_DIS3) = 0xffffffff;
    HWREG(NVIC_DIS4) = 0xffffffff;

    //
    // Call the ROM UART boot loader.
    //
    ROM_UpdateEMAC();
    }

    Any thoughts about the steps above?

    Thanks
    AJ
  • I'm not too sure why are you doing the LwIP initiation stuffs? As you pointed out from the other post, you want to exit BIOS and disable all NDK stuffs. You don't want the prior Ethernet settings to stay active when you call ROM_UpdateEMAC. We don't have example to call the ROM Ethernet bootloader when running a TI-RTOS NDK. It will be great if you can get it to work and share with the community.
  • The thing is, once I exit BIOS and disable NDK, how will the LM flash communicate with the device if there is no enabled network stack? By your previous message, I am assuming that ROM_UpdateEMAC takes care of all the network stuff and is that the case then?
  • After you disable NDK you will want to initialize the EMAC/PHY again. I'm not sure if you can retain the EMAC/PHY configuration what was previously set by the NDK. Maybe it is ok to retain the same setting. Try and see if that works. If not, then reinitialize the EMAC/PHY by referencing the TivaWare ethernet examples.