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.

Boot_loader 0x00000000 memory all FF

Other Parts Discussed in Thread: TM4C1294KCPDT

Hi,

I am using the demo program C:\ti\TivaWare_C_Series-2.1.3.156\examples\boards\dk-tm4c129x\boot_emac_flash\boot_emac_flash\ compile the flash bootloader for TM4C1294kcpdt, my cmd file:

MEMORY
{
    FLASH (RX) : origin = 0x00000000, length = 0x00010000
    SRAM (RWX) : origin = 0x20000000, length = 0x00010000
}
SECTIONS
{
    GROUP
    {
        .intvecs
        .text
        .const
        .data
    } load = FLASH, run = FLASH, LOAD_START(init_load), RUN_START(init_run), SIZE(init_size)
    GROUP
    {
        .bss
        .stack
    } run = SRAM, RUN_START(bss_run), RUN_END(bss_end), SIZE(bss_size), RUN_END(__STACK_TOP)
}

after Debug in ccs, the console display an err as follow when i put run button :

CORTEX_M4_1: Can't Run Target CPU: (Error -1268 @ 0x1090001) Device is locked up in Hard Fault or in NMI. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3)

and the memory browser display from 0 to 00001aa0 the value are all FF, the disassembly window also display all FF, why this happens.

MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
----------------------  --------  ---------  --------  --------  ----  --------
  FLASH                 00000000   00010000  00003540  0000cac0  R  X
  SRAM                  20000000   00010000  00001810  0000e7f0  RW X


SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00000000    00001aa0    00001a9a   00001a9a    r-x
  00000000    00001aa0    00000044   00000044    r-- .intvecs
  00000044    00001ae4    00001a44   00001a44    r-x .text
  00001a88    00003528    00000012   00000012    r-- .const
00001a9a    0000353a    00000006   00000006    rw-
  00001a9a    0000353a    00000006   00000006    rw- .data
20000000    20000000    00001810   00000000    rw-
  20000000    20000000    0000140d   00000000    rw- .bss
  20001410    20001410    00000400   00000000    rw- .stack


file.rar

 

  • Hello user4461578

    When you download the code before running does the code show up at 0x0?
  • No, there are 0xFF at 0x0.

    if i change the section:

    SECTIONS

    {

       GROUP

       {

           .intvecs

           .text

           .const

           .data

       } load = FLASH, run = SRAM, LOAD_START(init_load), RUN_START(init_run), SIZE(init_size)

       GROUP

       {

           .bss

           .stack

       } run = SRAM, RUN_START(bss_run), RUN_END(bss_end), SIZE(bss_size), RUN_END(__STACK_TOP)

    }

    the code and memory display OK. But the Bootloader cannot send BOOTP packet , just send the ARP packet all the way.

    why this happens?

  • Hello user4461578

    Have you programmed a MAC address?
  • Hi Amit

    I havn't done it.

    I can see the ARP pkt used the default MAC address which is locate the fun EnetReconfig:

        if((ui32User0 == 0xffffffff) || (ui32User1 == 0xffffffff))
        {
            //
            // MAC address has not been programmed, use default.
            //
            g_sMACAddr.addr[0] = 0x00;
            g_sMACAddr.addr[1] = 0x1a;
            g_sMACAddr.addr[2] = 0xb6;
            g_sMACAddr.addr[3] = 0x00;
            g_sMACAddr.addr[4] = 0x64;
            g_sMACAddr.addr[5] = 0x00;
        }

    But if I change run = SRAM to run = FLASH, BOOTP works ok.

    GROUP
        {
            .intvecs
            .text
            .const
            .data
        } load = FLASH, run = FLASH, LOAD_START(init_load), RUN_START(init_run), SIZE(init_size)

  • Hello user4461578,

    The Boot loader is stored on Flash and executes from SRAM after copying itself. If you do a power cycle and then does it show the BOOTP?
  • No , it show ARP, and the ARP pkt length is 60 not 42:

  • Hello user4461578,

    Frames must be at least 64 bytes long, not including the preamble, so, if the data field is shorter than 46 bytes, it must be compensated by the Pad field. This is as per the Ethernet Standard.