Commit 4215955e authored by Yestin Sun's avatar Yestin Sun Committed by Ioannis Glaropoulos
Browse files

modules: trusted-firmware-m: Allow to adjust hex file base address



This commit allows to append an optional --hex-addr argument to
the wrapper script if speficied. This can adjust the base address
of the output hex file when signing the non-secure or secure
firmware images.

Signed-off-by: default avatarYestin Sun <sunyi0804@gmail.com>
parent dde796a1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -278,6 +278,14 @@ if (CONFIG_BUILD_WITH_TFM)
    set(TFM_PUBLIC_KEY_FORMAT "full")
  endif()

  if(DEFINED TFM_HEX_BASE_ADDRESS_S)
    set(HEX_ADDR_ARGS_S "--hex-addr=${TFM_HEX_BASE_ADDRESS_S}")
  endif()

  if(DEFINED TFM_HEX_BASE_ADDRESS_NS)
    set(HEX_ADDR_ARGS_NS "--hex-addr=${TFM_HEX_BASE_ADDRESS_NS}")
  endif()

  function(tfm_sign OUT_ARG SUFFIX PAD INPUT_FILE OUTPUT_FILE)
    if(PAD)
      set(pad_args --pad --pad-header)
@@ -290,6 +298,7 @@ if (CONFIG_BUILD_WITH_TFM)
      --align 1
      -v ${TFM_IMAGE_VERSION_${SUFFIX}}
      ${pad_args}
      ${HEX_ADDR_ARGS_${SUFFIX}}
      ${ADD_${SUFFIX}_IMAGE_MIN_VER}
      -s auto
      -H ${CONFIG_ROM_START_OFFSET}