Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
I've got a project on a custom board using the CC2652R7 with SDK 6.30 and a custom Bootloader. The Application project is based on the simplePeripheral TI-RTOS example, and the Bootloader is based on the no-RTOS nvsExternal example. The Bootloader does its thing and then jumps to the Application using a call to jumpToPrgEntry(0x00000000);
void jumpToPrgEntry(uint32_t prgEntry)
{
static uint32_t temp;
temp = prgEntry;
// Reset the stack pointer,
temp +=4;
asm(" LDR SP, [R0, #0x0] ");
((void (*)(void))(*((uint32_t*)temp)))();
}
This works fine, and the Application code runs. When we've downloaded a new version for the Bootloader to install, however, the Application calls SysCtrlSystemReset(); This is the part that does not work, and I'm certain it has something to do with how the reset vector is configured. I have been trying to change the reset vector for the Application to point to the Bootloader, with various results, none of which is the one I want. I have gotten it to simply restart the Application (skipping the bootloader), I've gotten it to hang in a FaultISR, and I've gotten it to hang in a WaitHibProdNext(), but never have I gotten it to go back to the bootloader on its own. I will point out that I am aware of "halt in boot", and the hangs occur even off the debugger, even after a power cycle. With the debugger, if I press the CPU Reset button in CCS, it goes to _c_int00() in the Application code, but if I click the Reset button, it goes to main() in the bootloader.
There appear to be like 6 different places to define all these things, and I can't find any documentation that actually specifies which one controls what. I can attach the linker command file, but can someone explain to me what all these actually do?
- Linker command file:
- Application and Bootloader:
- /* Retain interrupt vector table variable */
--retain=g_pfnVectors
- /* Retain interrupt vector table variable */
- Application and Bootloader:
- Linker command file:
- Application:
- /* Override default entry point. */
--entry_point ResetISR
- /* Override default entry point. */
- Bootloader:
- /* Override default entry point. */
--entry_point resetISR
- /* Override default entry point. */
- Note those are different functions, with different capitalization, as defined elsewhere by TI in their respective example projects
- Application:
- Linker command file:
- Application (FLASH_START = 0x00000000:
- SECTIONS
{
.intvecs : > FLASH_START
- SECTIONS
- Bootloader (BOOTLOAD_BASE = 0x000AA100):
- SECTIONS
{
.intvecs : > BOOTLOAD_BASE
- SECTIONS
- Application (FLASH_START = 0x00000000:
- Linker command file:
- Application:
-
-u_c_int00
--retain "*(.resetVecs)"
--retain "*(.vecs)"SECTIONS
{
.resetVecs: load > 0
.vecs: load > 0x20000000, type = NOLOAD
.ramVecs: > SRAM, type = NOLOAD, ALIGN(256)
}
-
- Bootloader:
- Same except .resetVecs: load > BOOTLOAD_BASE
- Application:
- Sysconfig GUI editor
- Device Configuration
- "Set Address of Flash Vector Table"
- Device Configuration
- Sysconfig text file
- Application only, from example project:
- Hwi.resetVectorAddress = system.utils.bigInt("00000090",16);
- Application only, from example project:
There are so many references to vectors, and they seem somewhat contradictory, and I didn't even know about that last one until I found the related question while trying to search here first. What do all these do, and which ones do I actually want?


