Porting SBSFU from running on STM32H7B3i-DK to STM32H7B0 custom board.
I am currently trying to port SBSFU from running on STM32H7B3i-DK to run on a custom board that has a STM32H7B0 microcontroller onboard developing with Keil MDK version 5.
I am using the example standalone loader project STM32H7B3I_DISCO_2_Images_Loader from ST as my base. Using the STM32H7B3i-DK I have been able to build the following 4 projects contained in STM32CubeExpansion_SBSFU_V2.3.0.
More specifically I am using the STM32CubeExpansion_SBSFU_V2.3.0\Projects\STM32H7B3I-DK\Applications\2_Images_ExtFlash example.
I have also been able to make changes to the STM32H7B3I_DISCO_2_Images_UserApp and load the firmware with the SBSFU loader using STM32CubeProgrammer.
The problem I am having now is getting the SBSFU to run on our custom board but not getting any joy.
I have tried following AN5056 Application note but not getting far for the following two reasons
(1) Using IAR development tool (Linker example)
(2) Not showing external flash example.
I can confirm that our custom board is working fine as I have been able to successfully create a standalone project that runs
and which I can also debug (set breakpoints, single step, and run with debugger)
Since the STM32H7B0 only has 128Kbytes onboard flash while the STM32H7B3i-DK has 2Mbytes flash I made changes to the mapping_sbsfu.h
file by changing the following entries
/* LOADER code region */
#define LOADER_REGION_ROM_START 0x08018000 (Previously was 0x08020000)
/* Aligned LOADER end at the end of the 32Kbytes block for WRP protection */
#define LOADER_REGION_ROM_END 0x0801FFFF (Previously was 0x08027FFF)Before I made the above change to the mapping_sbsfu file change I was not able to load my code at all with either Keil or STM32CubeProgrammer but with the changes I can now load the code but unfortunately does not run.
When I was using the STM32H7B3i-DK I can load the binary image using STM32CubeProgrammer and see the programming running by seeing the debug print statement with the Virtual Com port using Tera-term.
When I attempt to run I get the following error
Cannot access Memory
*** error 122: AGDI: memory read failed (0xFFFFFFFE)
Cannot access Memory
Cannot access Memory
Cannot access Memory
Cannot access Memory