2022-01-27 09:53 AM
I have an undefined reference error to several secure engine functions, for example SE_APP_GetActiveFwState
I have read this thread:
And what I think needs to be done to resolve this problem is to:
-add the function names to se_interface.txt in the SBSFU folder
-rebuild SBSFU
-add the generated se_interface_app.o as additional object file in my project settings > MCU GCC Linker > Misc
-Add other flags, in project settings > MCU GCC Linker > Misc to be the same as the userapp
After doing this however the problem still persists, and I'm having a hard time finding it. I made sure to copy all project settings from the SBSFU UserApp example, added all the includes and compared the linker scripts, now I have reached a dead end...
The contents of my se_interface.txt file is:
SE_APP_GetActiveFwInfo
SE_APP_GetActiveFwState
SE_APP_ValidateFw
2022-01-28 02:12 AM
Found the problem, needed to add defines for ENABLE_IMAGE_STATE_HANDLING not only in my user app, but also in SECoreBin and SBSFU
2022-01-28 06:05 AM
Now the problem is back for some reason. To make sure it is not in my own app, I took the SBSFU UserApp example and added defines for ENABLE_IMAGE_STATE_HANDLING to SBSFU, SECoreBin and the user app itself.
So the only change I made was to add those defines, and then building fails undefined reference to
SE_APP_ValidateFw and SE_APP_GetActiveFwState.
This is poorly documented in the manuals. Some help would be greatly appreciated. The UserApp example also contains two instances of se_interface.txt both with different content. This is confusing and I do not know what to do with those. The paths for these are:
C:\STM32CubeExpansion_SBSFU_V2.6.0\Projects\B-L475E-IOT01A\Applications\2_Images\2_Images_SBSFU\MDK-ARM\B-L475E-IOT01_2_Images_SBSFU\se_interface.txt
C:\STM32CubeExpansion_SBSFU_V2.6.0\Projects\B-L475E-IOT01A\Applications\2_Images\2_Images_SBSFU\STM32CubeIDE\se_interface.txt