Now i have custom board using tm4c1294kcpdt. I compiled the C:\ti\TivaWare_C_Series-2.1.3.156\examples\boards\dk-tm4c129x\boot_emac_flash\ code for ethernet bootloader. After Recv the magic pkt from LMFlash Program, my APP enter this line :
void SoftwareUpdateBegin(uint32_t ui32SysClock)
{
//
// 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) = 0xffffffffU;
HWREG(NVIC_DIS1) = 0xffffffffU;
HWREG(NVIC_DIS2) = 0xffffffffU;
HWREG(NVIC_DIS3) = 0xffffffffU;
HWREG(NVIC_DIS4) = 0xffffffffU;
//
// Also disable the SysTick interrupt.
//
SysTickIntDisable();
SysTickDisable();
//
// 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
}
then enter the bootloader, I check the code excute the Boopt send function by led in bootloader, but I cannot find any BOOTP in wireshark.
if i inserted the uart init code as following:
void
UpdateBOOTP(void)
{
//
// Get the size of flash.
//
g_ui32FlashEnd = ROM_SysCtlFlashSizeGet();
#ifdef FLASH_RSVD_SPACE
g_ui32FlashEnd -= FLASH_RSVD_SPACE;
#endif
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTD_BASE, GPIO_PIN_0);
FeedWatchDog();
#if 1
ROM_GPIOPinConfigure(GPIO_PP0_U6RX);
ROM_GPIOPinConfigure(GPIO_PP1_U6TX);
ROM_GPIOPinTypeUART(GPIO_PORTP_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTStdioConfig(6, 115200, 120000000);
//UARTprintf("<< UART print configured Enabled >>\n");
#endif
//
// Perform the common Ethernet configuration. The frequency should
// match whatever the application sets the system clock.
//
EnetReconfig(120000000);
FeedWatchDog();
//
// Main Application Loop.
//
while(1)
{
uint32_t ui32Temp;
//
// See if there is a packet waiting to be read.
//
if(!(g_psRxDescriptor[g_ui32RxDescIndex].ui32CtrlStatus &
DES0_RX_CTRL_OWN))
{
//
// Read the packet from the Ethernet controller.
//
uip_len = PacketReceive(uip_buf, UIP_CONF_BUFFER_SIZE);
the BOOTP came in, why this happened. So confusing.
UART6 for message send;
PortD pin0 for GPIO watch dog;
PortF pin0 and 4 for ethernet led.
the code is the same as C:\ti\TivaWare_C_Series-2.1.3.156\examples\boards\dk-tm4c129x\boot_emac_flash\.