cancel
Showing results for 
Search instead for 
Did you mean: 

I want to start the update out of my application as the UserApp does. I have ported the functions but I'm searching for the definition of SlotEndAdd and SlotStartAdd. They are defined as external in sfu_fwimg_regions.h.

peterd
Associate II
 
23 REPLIES 23
Jocelyn RICARD
ST Employee

Hello Clark,

Thank you for providing information to reproduce the issue.

This issue is related to the definition of const values inside the sfu_fwimg_regions.h.

I'm not fan of this way of doing things but it was done like this ...

The const values are protected by this flag TEST_PROTECTIONS_C

The name is really not the good one because the definitions are related to the mapping;

So, sfu_fwimg_regions.h. can be included by several c files, but only one should define the TEST_PROTECTIONS_C flag,

In the example, this flag is defined in test_protections.c.

If you remove this from the build, you can for instance set the #define TEST_PROTECTIONS_C in fw_update_app.c before the #include "sfu_fwimg_regions.h"

If you also comment the call to TEST_PROTECTIONS_RunMenu() in main.c you should get a successful build.

I hope this will help

Best regards

Jocelyn

Clark Sann
Senior

@Jocelyn RICARD​ Thank you for providing help to resolve this problem. Of course, your solution works perfectly. I've also adapted your earlier solution, which fixes the problems caused by the new compiler, somy app to use certain functions needed after I turn on ENABLE_IMAGE_STATE_HANDLING. Right now I think I have all the tools I need to complete my custom app using SBSFU.

Jocelyn RICARD
ST Employee

Hi @Clark Sann​ ,

thank you for your feedback.

Good to know this is working fine now :)

Best regards

Jocelyn

ATura.1
Associate

I would suggest reusing the fw_update_app.c provided in example application

You can see it is including sfu_fwimg_regions.h which defines these symbols.