SBSFU jump into userAPP but userAPP main() not execute and hang
- August 27, 2020
- 1 reply
- 1867 views
Hi,
I am working on stm32wb55 NUCLEO Board.
I run sbsfu default code and userapp run correctly.
Now i replace userapp with my customize app with few feature enable and it's working fine.
If i add further features(additional code) it hang after printing below messages
= [SBOOT] System Security Check successfully passed. Starting...
= [FWIMG] Slot #0 @: 8010000 / Slot #1 @: 804f000 / Swap @: 808d000
======================================================================
= (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 Hardware 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
A valid FW is installed in the active slot - version: 1
= [SBOOT] STATE: VERIFY USER FW SIGNATURE
= [SBOOT] STATE: EXECUTE USER FIRMWAREto resolve this i change optimize level Optimize for debug(-Og) to Optimize for size(-Os) and it's working fine. below is my working userapp memory detail.
arm-none-eabi-objcopy -O ihex aws_demos.elf "aws_demos.hex"
text data bss dec hex filename
201152 3024 150212 354388 56854 aws_demos.elfnow if i further implement in my code it again hang at same place and this time it's not resolve by Optimize flag.below is my non working userapp memory detail.
arm-none-eabi-objcopy -O binary aws_demos.elf "aws_demos.bin"
text data bss dec hex filename
223012 4536 155692 383240 5d908 aws_demos.elfPlease help me what was the issue here?
how i can resolve this? i doubt on memory mapping.
Please find attached my modified mapping_fwimg.ld and mapping_sbsfu.ld in Linker_Common.zip
Regards,
Arjun
