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.

F28377D Bootloader Jump to App Code



Hi all,

I am developing a bootloader on the F28377D device which will read in a binary file from a USB. I am able to read in the data from the USB and write it to Flash, but when I try to branch to the start of the application code I get an error that says that no source is available for the at  0x080000, which is the begin address specified in my application code linker file. 

Every section of my application code is defined to be within Flash sector A.

Flash A in my bootloader project has a start address of 0x080000

The bootloader is put into Flash sectors K to N. 

The bootloader is using the interrupts for the USB to read out the data. Before branching to the application code the interrupts are disabled.

However once the program branches, the application code doesnt run.

Any help on resolving this issue would be appreciated.

Regards,

Anish

  • Anish,

    If CCS is giving you a message about no source being available, you probably need to load the symbols from your application code's .out file. You can do this in the menus: Run -> Load -> Load Symbols...

    If that's the only problem, you should be good to go. If your application code really isn't running, make sure you're programming ECC along with your flash data. (There's an option in the API for this.) Make sure you see the correct flash code in the CCS disassembler. You might try replacing the first instruction of your code with an infinite loop to make debugging easier. Let me know if none of that helps and I'll try to come up with some more suggestions.

  • Hi Adam, 

    I loaded in the symbols . When I step through the symbols source file , at InitSysPll(XTAL_OSC,IMULT_20,FMULT_1,PLLCLK_BY_2);    the code steps into the middle of InitPeripheralClocks() function.

    I am not programming ECC along with the flash data as I am using :

    oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Index,(uint16)dataStorageBuffer+i,
    wordsRemaining,
    0,
    0,
    Fapi_DataOnly);

    I am able to see the correct Flash code in the disassembler , when compared to the blinky code memory . I have attached it below. 

    Also , when branching my code to Flash E , I use 

     asm (" LB 0x088000"); 


    Is this corect?



  • Anish,

    Programming ECC is mandatory if you want to read or execute the flash data.

    Your use of LB is correct. If you'd rather use pure C, you can create a function pointer to the address:

    void (*funcPtr)(void) = (void (*)(void))loadAddr;    //Assign the address to the pointer
    (*funcPtr)();    //Call the "function" at address 0x088000

    This will get compiled into an LCR instruction, which will cost you 32 bits of stack space.