I am in the process of developing a custom boot-loader (which does not use the boot-loader functions or OTP) for the TMS320F28035 MCU. I am using the "standard" implementation for boot-loaders that have been used for quite some time. I've partitioned the boot-loader and application code into two separate projects. The boot-loader makes use of flash sector A to store the boot-loader and the application uses the remaining flash. I am able to use the boot-loader to transfer S-Records to flash and have been able to verify that the application is stored properly in the flash. As part of the application loading process I write the reset vector for the application to flash at address 0x3F3FC0. I want the main function of the application to be executed so I have stored my "reset" vector by using the following code:
typedef void (*fptr)(void);
void main(void);
#pragma DATA_SECTION(App_Reset, "App_Reset")
const fptr App_Reset[] =
{
main
};
By doing this the location of the main function is stored in the "reset" location in the linker which is 0x3F3FCO.
In the boot-loader, I test that the flash has been programmed and if it has then I use a function pointer to call the function (application main) located at the reset address as follows:
const uint32* ptr = (uint32*)(0x3F3FC0);
fptr = Reset_Vector = (fptr)*ptr;
if(*ptr != 0xFFFFFFFF)
{
// Jump to the application
(*Reset_Vector)();
}
else
{
// Bootloader initialization is ran.
}
Now when (*Reset_Vector)() is called the code jumps to an Illegal_ISR function in the default ISR module. I don't fully understand why this fault is occurring. Can anyone recommend another method for jumping to the application code? In other boot-loaders I would use assembly language to load the reset vector location and begin execution but I have not been able to find sufficient examples for this processor on how to do this. I would also like to understand if there is something in the general strategy I am doing that is incorrect.
Help is greatly appreciated. Thanks.

