Skip to content

Fix compilation with CONFIG_TFM_BL2=n for STM32 #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tpambor
Copy link

@tpambor tpambor commented Mar 19, 2025

Compiling with CONFIG_TFM_BL2=n fails with:

CMake Error at platform/ext/accelerator/stm/CMakeLists.txt:17 (target_compile_definitions):
  Cannot specify compile definitions for target "platform_bl2" which is not
  built by this project.


CMake Error at platform/ext/accelerator/stm/CMakeLists.txt:34 (target_include_directories):
  Cannot specify include directories for target "platform_bl2" which is not
  built by this project.

Add guards to fix compilation with BL2 disabled. This also has been fixed upstream by TrustedFirmware-M/trusted-firmware-m@c6c2511. As this commit is very large, this PR only contains the relevant parts.

Add guards to fix compilation with BL2 disabled.

Signed-off-by: Tim Pambor <[email protected]>
Copy link

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with nitpicking comment addressed or not.

@@ -13,10 +13,12 @@ cmake_policy(SET CMP0076 NEW)
if(NOT DEFINED PLATFORM_DIR)
set(PLATFORM_DIR ../../.. CACHE PATH "Path to plaform dir")
endif()
if(BL2)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an empty line above would be nice.

@etienne-lms
Copy link

@tpambor, FYI I've created a P-R for STM32WBA65I support (#133) that also addresses your issue. See the last commit on my series: "platform: ext: accelerator: stm: fix build when BL2 is disable". In case your change gets merged first I'll rebase on top of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants