Custom User application unable to start after SFSFU completion (Solved)
Hi.. Geeks
From few days I'm playing with SBSFU.
I'm using default application SBSFU files (STM32L496G-Discovery_AWS) with custom user application with STM32L496ZG
The default code was ported on STM32L496AG which is x-cube AWS
I have simply adopted it's default BootloaderOSC files
To get synchronized with the original application, I have been change linker script of the user application as per the default app
As per the default app,I've been linked out all applications with SBSFU script file and I'm able to generate the .sfb files
Now my problem is, when I upload the .sfb file using teraterm YMODEM then SBSU files starts executing and I'm getting logs accordingly
here is the logs
======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================
= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
INFO: A Reboot has been triggered by a Software reset!
Consecutive Boot on error counter = 0
INFO: Last execution detected error was:No error. Success.
= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD
= [SBOOT] STATE: CHECK USER FW STATUS
A valid FW is installed in the active slot - version: 1
= [SBOOT] STATE: VERIFY USER FW SIGNATURE
= [SBOOT] STATE: EXECUTE USER FIRMWARE
Jump Address: @ 8084b21
Set StackPointor: @8084b21You can see, my application going to jump on 0x8084b21, but some how my main application won't execute!
More over after reading few thread, I also have changed my vector table at system_stm32l4xx.c file as follows
#if defined(__CC_ARM)
#undef __GNUC__
#endif
#if defined(__ICCARM__)||defined(__GNUC__)
extern uint32_t __ICFEDIT_intvec_start__;
#define INTVECT_START ((uint32_t)& __ICFEDIT_intvec_start__)
#elif defined(__CC_ARM)
extern uint32_t Image$$vector_start$$Base;
#define INTVECT_START ((uint32_t)& Image$$vector_start$$Base)
#endif
void SystemInit(void)
{
.
.
.
/* Configure the Vector Table location add offset address ------------------*/
SCB->VTOR = INTVECT_START;
}Can anyone help me here?
All suggestions and comments welcome =)
Thanks
