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.

CC1312R: Bootloader jumping to application is not working

Part Number: CC1312R


I have a simple cc1312R bootloader based on the project BIM, compiled with CSS TI-RTOS. This bootloader is written to the flash from 0x0 to 0x3000. The CCFG is written at the end of the flash. It's working well as it can blink a led. The bootloader main function only does:

static void jumpToPrgEntry(uint32_t prgEntry) {
    static uint32_t temp;
    temp = prgEntry;
    temp +=4;
    asm(" LDR SP, [R0, #0x0] ");
    ((void (*)(void))(*((uint32_t*)temp)))();
}

using the address 0x3000.

I have a standard TI-RTOS application that is working well. This application is written to the flash starting at 0x3000. In this application, I have modified in the cfg file:

m3Hwi.resetVectorAddress = 0x3000;

I have not modified the cmd file. This is not working. The application is not starting from the bootloader (or something is crashing). What am I missing?

  • someone will be assigned to this thread. In the meantime, please provide information regarding which version of the SDK you are using and which example you are using as a starting point for your code.

    BR

    Siri

  • I'm using SimpleLink 4.20. I'm reluctant to upgrade that framework because I have some very complicated fixes in Simplelink not easy to port and I don't think that my problem is related to a version of Simplelink.

    I have made progress and I think that I'm close to my goal.

    - I can put my bootloader at 0x56000, modify the ccfg VALID_IMG address, and write my unmodified app at 0x0. The chip boots to my bootloader and jumps to my application. Success!

    I wish to do the "opposite": my bootloader is at 0x0 with a default ccfg VALID_IMG. My application is copied to 0x2000 in the flash. When the bootloader starts and jumps to 0x2000, it's not working: the application is not starting. The only modification in my application is m3Hwi.resetVectorAddress = 0x2000; in the cfg file.

    What else am I missing in my application because it's physically moved to 0x2000?

  • Hi Gregoire,

    I'm not sure it's possible to change the location of the bootloader. It would at least require a CCFG change.

    Did you see the EnhancedOAD SimpleLink Academy? Even though it's mainly directed at BLE users, I think you will find some parts useful:

    https://dev.ti.com/tirex/explore/node?node=AIixxGE2y6tnPJ7cm65SFQ__pTTHBmu__LATEST

    Cheers,

    Marie H.