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.

TivaWare_C_Series-2.1.0.12573 Software Ethernet Boot Loader Application Vector Table Bamboozles EK-TM4C1294XL Launch Pad.

Guru 55913 points

After fighting 6 mounts ago the Tivaware Ethernet Boot Loader expecting it to be some what functional, it ended up actually being flashed in DOA order. 

Revisiting software Boot Loader have now fixed a few fatal issues that were keeping it in DOA status at least with Rev 1 silicon. The DID0 register will reveal Rev1 silicon in your chip can be made to split hairs with EBL performing some magic tricks.

  

The SYSCLK was killed by a patch now (commented out) , Bamboozled CCS5 ICDI debug simulator. No Hexadecimal decode for instructions show in the disassembly window for the source listings.

Debug: Shown top is (bl_emac.c) and the addition of an (Application Return Address). Found the TFTP data transfer & Flash loads into SRAM avoids writing flash memory corrupting the Application and Boot loader. 

Packet Sniffer trace shows what appears to be a file name header sent from the TFTP client back to the server. 

Sniffer fails to capture the flash image 512 byte blocks in packets being transferred.

  • Many tanks to Amit Ashara for past and current assistance to make this bad boy Ethernet Boot Loader behave himself.
  • Above test there is actually no data being Flashed into SRAM, simulates the TFTP file handling protocol.

    Possibly the Flash code is not working correctly, flashing (APP_START_ADDRESS) mangles both the Boot Loader & Application.

    The application asserts the bool switch invoking Boot Loader from a function command. Code below for anyone wanting their application to invoke the Tiva Software Boot Loader. The Boot Loaders assigned bootp server port (67) via embedded GUI must initiate a firmware upgrade from the listening bootp client port (68) sending packets from the (*.bin) file to be flashed as blocks via TFTP server port (69). Asserting a Boot Loader Reset command then invokes the flashed application at (APP_START_ADDRESS).

    // Flag the bootloader to start.
    static volatile bool g_bStartBootloader = false;

    g_bStartBootloader = true;

    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>//
    // While (g_bStartBootLoader) = (0)-false do NOT invoke Boot Loader
    // While (g_bStartBootLoader) = (1)-true, Invoke Boot Loader

    while(1)
    {
    // Put the processor to sleep.
    SysCtlSleep(); 
     
    // Check to see if bootloader start has been requested.
    if(g_bStartBootloader)
    {
    UARTprintf("<< Invoking Boot Loader >> \n\n");
     
    // Disable the watchdog timer.
     WatchdogResetDisable(WATCHDOG0_BASE);
     
    ROM_SysCtlDelay(g_ui32SysClock * 1);
     
    // Also disable the SysTick interrupt.
    SysTickIntDisable();
     
    // Disable all processor interrupts. Instead of disabling them
    // one at a time (and possibly missing an interrupt if new sources
    // are added), a direct write to NVIC is done to disable all
    // peripheral interrupts.
    HWREG(NVIC_DIS0) = 0xffffffff;
    HWREG(NVIC_DIS1) = 0xffffffff;
     
    // Clear any active interrupts. If the boot loader uses
    // any interrupts, they will therefore respond as expected.
    HWREG(NVIC_APINT) = (NVIC_APINT_VECTKEY |
    NVIC_APINT_VECT_CLR_ACT);
     
    // Return control to the boot loader. This is a call to the SVC
    // handler in the boot loader.
    (*((void (*)(void))(*(uint32_t *)0x2c)))();
      
    // Control should never return here, but just in case it does.
     while(1)
    {
    }
    }
    }
    }

  • Boot Loader Application Vector Table Bamboozles EK-TM4C1294XL Launch Pad.

    Let the record show that only the most, "skilled" (yet conflicted) author may weave, "Bamboozles" and, "Thank you, Amit" w/in the same thread...  

    One notes that cherished vendor (this time) escapes charge of, "Bamboozled!"  Hapless "Application Vector Table" is (now) so charged - and apparently - w/out defense...

    That giant top writing resulted from the attempt to "quote" from poster's title - heralded (changed) forum SW (now) resists "title" quotes...

  • Bamboozled an understatement, some how some way Stellarisware (bl_startup_ccs.s) saved the day in hijacked Tivaware at the silicon level.

    Clues given amidst mangled object aid the misfortune of the innocent VT, not in so much silent to the very cleaver LM Flash programmer.

    Stellarisware forever changed, Tivaware cleverly bamboozles even the craftiest of byte manipulator's burning candles wee hours.

    Godzilla flash ERASE page size now required for (bl_flash.c) - (flash.c) each being equally a participant in ones burning hours.

    Should that not be enough, flash reserved space also a constrained dose of flash erase page confounds tiny parameters space requirement.

    Fear not fellow Tiva ware-ship-er's - [bl_config.h] robust memory entries can save the night for sleep. 

     http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/334425#pi239031349=3