soc: st: stm32: add '-align' flag for signing tool v2.21.0+

Starting in v2.21.0, the STM32 signing tool ('STM32_SigningTool_CLI')
stopped automatically adding padding bytes at the beginning of the
payload to align it to the 0x400 offset. To restore this behavior, the
'-align' flag must be passed to the signing tool post-build command.

This commit checks for signing tool version v2.21.0 or higher and
appends the '-align' flag to the post-build signing command. It also
changes local CMake variable names to lower case and corrects some
indentation issues.

Fixes zephyrproject-rtos/zephyr#99456

Signed-off-by: Chris Wilson <chris@binho.io>
1 file changed