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.

system can't boot up after modifying APP start address

Other Parts Discussed in Thread: EK-TM4C123GXL

Hi,

I got a problem about the app start address.

Basically, the system works normal, when I set the start address as 0x00000000 in link command file.

But I change the start address as 0x00002000 or others, the system can't be bootup, that is blocked in some function.

What I do is change the start address in link command file only.

Is there something I miss?

thank
Gavin

  • Hello Gavin,

    The AP Start Address has a reset value of 0x0. By changing it in the linker command file to 0x2000, the code will be linked and loaded at 0x2000. The CPU when reset will always go to 0x0 and since it does not find a valid SP and PC at 0x0, it will not execute the program.

    If you need to have the code at 0x2000, then you have to write a small boot strap code at 0x0 which will modify the APP Start address to 0x2000 and then load the SP and PC from 0x2000, 0x2004 respectively.

    Regards

    Amit

  • Hi Amit

    I compare the sample project "boot demo2" in TivaWare_C_Series-2.1.0.12573. I can change the APP start address in linker command file and system can boot up normally. But I don't see any "small boot strap code" like your previous post.

    I'm confused about it. Could you please provide some suggestion? Or how to implement "small boot strap code", actually I don't have idea about it.

    thanks

    Gavin

  • Hello Gavin.

    Do you mean that the boot_demo2 code is compiled and linked for address 0x2000 and it works on after a Power ON Reset? I would strongly doubt that.

    Could you please attach your CCS project so in case it is working so that I can check how?

    Regards

    Amit

  • Hi Amit

    I attach boot_demo2 project, please help to check it.

    BTW, I set the offeset address is 0x2800, not 0x2000.

    thanks
    Gavin

    http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/908/2821.boot_5F00_demo2.7z

  • Hi Gavin,

         What Tiva Kit are you using?

         FYI, boot_demo1 works with boot_demo2. If just loading boot_demo2, it won't work.

    - kel

  • Hi Kel

    I'm using EK-TM4C123GXL EVM.

    I don't get your point. I only flash boot_demo2 on my platform, and it works. 

    thanks

    Gavin

  • Hi Gavin,

          Sorry, what I meant was the boot_serial works with boot_demo1 and boot_demo2.

          The instructions for using boot_serial with either boot_demo1 and boot demo2 are provided by Sue at the post link below.

           http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/85249.aspx

           But, I think that is different from your problem in this post.

    - kel

  • Hi Kel

    Actually, I'd like to apply bootloader on my platform. 

    In my understanding, app and bootloader should be independent with each other. So I think if I can make app starts at the required address and then I can apply bootloader on the platform.

    thanks

    Gavin 

  • Hello Gavin,

    I would need to check the boot_demo2.7z file that you sent on my device board. I will get back to you with the information at the earliest. Please do let me know which device is being used for the boot_demo2 (TM4C123 or TM4C129)?

    Regards

    Amit

  • Hi Amit

    TM4C123

    thanks

    Gavin

  • Hello Gavin,

    I tried the code you sent and when you download it through CCS it works as the CCS sets the SP and PC based on the bin file. However if I disconnect the Power or Reset the board the RED LED never glows again.

    Regards

    Amit

  • Hi Amit

    Whether you mean that boot_demo2 can't work alone, unless it works with bootloader together?

    Another question, just like your previous post, if APP start address is not 0x00000000, it needs the boot strap code at 0x00000000. Whether there is boot strap code in bootloader, because bootloader starts at 0x00000000, and then application can work properly.

    thanks

    Gavin

  • Hello Gavin,

    Yes. the boot_demo2 can't work alone. I was working on the ROM Boot Loaders yesterday. Basically what I did was to use the BOOTCFG register to make the device jump to the ROM Boot Loaders. For this I configured the PE0 pin to be polarity high by programming the BOOTCFG to 0xFFFF8200 and comitting it to Flash.

    When ever the Pin PE0 is high, I press the reset causing the ROM Boot Loader to be called even though there is a code in the Flash and then putting a new bin file over serial interface.

    Regards

    Amit