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: EK-TM4C1294XL

Part Number: EK-TM4C1294XL

Dear TI Support,

I have a EK-TM4C1294XL evaluation kit. I downloaded SPMA072 (Serial to Ethernet Converter for TM4C129x).

I am able to compile using CCS 11.2.0. The application is running fine and I am able to open webserver.

One of our requirements is ability to do firmware updates using  Ethernet. 

I tried the following examples from Tiva Ware:

boot_emac_flash

boot_demo_emac_flash

Using LM Flash Programmer I was able to install boot boot_demo_emac_flash aplication. This works consistently well.

I tried to do the same using our application. I know that boot_demo_emac_flash checks for magic packet. When magic packet is received, it transfers control to 

boot_emac_flash. I tried to do the same in my application by inspecting boot_demo_emac_flash code. However I cannot duplicate behavior.

I have spent several weeks so far and I would like to find a solution. I think part of the problem, is that I cannot run CC while boot_demo_emac_flash is running. Using debugger, I would like to 

verify that magic packet is detected and swupdate function is called. Based on this I would try to do the same using my code and find out why it doesn't work.

Do you have any suggestions on how can I implement boot_demo_emac_flash in my application?

After I flash boot_emac_flash, is it possible for me to run debugger on boot_demo_emac_flash? 

I appreciate your help,

Felix V.

  • Hi Felix,

      After you loaded the boot_demo_emac_flash (the application) successfully by the bootloader (boot_emac_flash), you can debug the application by loading the symbols for the application. See below. Select Load Symbols and provide boot_demo_emac_flash.out as it contains the symbols in it. 

      

  • Hi Charles, thanks for your response. I am able to breakpoint in my application code now. In swupdate.c (which I basically copied from boot_demo_emac_flash), after I press Program in LM Flash, I can see that SoftwareUpdateBegin() is called up. ROM_UpdateEMAC is invoked, which indicates that control was transferred to boot_emac_flash. In LM Flash I see the progress bar running and the correct number of bytes transferred. However, when I cycle the power, application doesn't run. It seems like something went wrong, however I don't get any error message. I am going to check using Wireshark if the data was sent.

    Felix

  • Hi Felix,

    ROM_UpdateEMAC is invoked, which indicates that control was transferred to boot_emac_flash.

    I don't think boot_demo_emac_flash calls ROM_UpdateEMAC. You might have changed it. The example that will call ROM_UpdateEMAC is boot_demo_emac_rom. These two examples ( boot_demo_emac_flash  and boot_demo_emac_rom) are very similar with one making a Service call to 0x2C and the other calling ROM_UpdateEMAC. 

    //
    // Return control to the boot loader. This is a call to the SVC
    // handler in the flashed-based boot loader, or to the ROM if configured.
    //
    #if ((defined ROM_UpdateEMAC) && !(defined USE_FLASH_BOOT_LOADER))
    ROM_UpdateEMAC(ui32SysClock);
    #else
    (*((void (*)(void))(*(uint32_t *)0x2c)))();
    #endif

    With that said, please go through this below post at the end. I have seen people with problem that after the firmware is updated using ROM_UpdateEMAC the bootloader is unable to jump to the application. Make sure before you call ROM_UpdateEMAC, all the running peripherals in the application are stopped from generating any interrupts. I have seen some posters even suggesting that by disabling the peripherals before calling ROM_UpdateEMAC will solve the problem. For example, if you have a UART or SPI running in your application, disable these modules before calling ROM_UpdateEMAC. 

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1124755/ek-tm4c129exl-rom-bootloader-image-requirements/4174309?tisearch=e2e-sitesearch&keymatch=ROM_UpdateEMAC#4174309

  • Hi Charles, thanks so much for the information. What I did was to force service call to 0x2C by commenting out ROM_UpdateEMAC() and it worked. I didn't  have to add additional code to disable interrupts. The ones already in there seem to work.

    Thanks again for the great support!

    Felix