There is also a doubt about Advance Secure Boot, which involves the design of our software architecture.
Our products need to realize the upgrade function of APP. Our software is designed to configure the Advance Secure Boot while the product is in the factory.
After that, we provide an app upgrade package to replace the original app, and our upgrade package is with Cmac_tag.

cmac_tag_first,cmac_tag_new1,cmac_tag_new2,,, are different.
However, after updating the app_new and cmac_tag_new, I can't start the app normally.
I personally understand that when installing SmrEntry, the important information is the smr_src, smr_size, key_handle, authentication scheme, cmac_tag_pointer and legth.
I have always understood that cmac_tag_pointer is provided with location information, and the specific content of this location can be different, as long as it matches the calculation result of the corresponding region content.
If the HSE_FW also records the specific content of the cmac_tag_pointer, then the SMR entry must be reconfigured for each APP upgrade, which is too inflexible.
I hope my understanding is wrong, and I look forward to hearing from you,
Here's how I tested it:
1.Create new branch
1.1 new branch of cl_factory_s32k312_hse_app0_blinky Project

1.2 new branch of cl_factory_s32k312_hse_fw_install Project

2.modify cl_factory_s32k312_hse_app0_blinky Project
2.1.modify cl_factory_s32k312_hse_app0_blinky ld file

2.2 modify main.c

main.c of cl_factory_s32k312_hse_app0_blinky is shared with cl_factory_s32k312_hse_fw_install ,Store in cl_factory_s32k312_hse_fw_install project,if you use git,pay attention to it
3.Get app_new de cmac_tag
3.1 compile cl_factory_s32k312_hse_app0_blinky
3.2compile cl_factory_s32k312_hse_fw_install
3.3 debug cl_factory_s32k312_hse_fw_install , get cmac_tag in log

3.4 modify main.c with cmac_tag in step 3.3

4.Debugging app_new
4.1 compile cl_factory_s32k312_hse_app0_blinky
4.2compile cl_factory_s32k312_hse_fw_install
4.3Debug cl_factory_s32k312_hse_fw_install
APP_boot ok,
Now, cl_factory_s32k312_hse_app0_blinky.hex image is with cmac_tag,Save this file

5. Both projects return to the original branch and recompile and run,
Up to now, the image in the MCU is called app_first, and then update the app_new directly (the image saved in step 4.3)
Then app_new can not boot successfully