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.

Bootloader for sys/bios app and how to debug it

Other Parts Discussed in Thread: SYSBIOS

I have s sysbios app that I want to run with a custom bootloader. I want the bootloader to start at add 0 and the app at 0x2800. So I have set cmd file to place my code at 0x2800 and changed sysbios to 

//
// Set up a flash-based vector table
//
m3Hwi.resetVectorAddress = 0x2800;
m3Hwi.vectorTableAddress = 0x2800;

Is this all I need to do to relocate the app. Also if I want to debug the app without any bootloader installed, how do I set it up so that it knows to jump to the start of the app. 

  • What device are you using and what version of TI-RTOS / SYSBIOS? Have you checked the .map file to see if there are any references below 0x2800?
  • I think I have a solution working now. I have my main code all shifted to 0x2800 with sysbios places the vectors there. I then added a reset vector that jumped to where my program starts. Then once I start using the booloader my reset jump will no longer be needed but will not get programmed in through my bootloader. I was looking for a way for my main code to allow debugging without having the bootloader installed and not have to change any linker placements. The chip I was using is TM4E123. Which is a TM4C123 with special peripherals. Below is what I added. 

    void
    ResetISR(void)
    {
    // Set the vector table to the beginning of the app in flash.
    HWREG(NVIC_VTABLE) = APP_START_ADDRESS;

    // Load the stack pointer from the application's vector table.
    //
    __asm(" ldr r1, [r0]\n"
    " mov sp, r1");


    // Load the initial PC from the application's vector table and branch to
    // the application's entry point.
    //
    __asm(" ldr r0, [r0, #4]\n"
    " bx r0\n");
    }