瀏覽代碼

cmake: show error message on encrypted flash targets without proper config

Renz Christian Bagaporo 6 年之前
父節點
當前提交
eb865008d5
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      components/esptool_py/project_include.cmake

+ 5 - 0
components/esptool_py/project_include.cmake

@@ -226,7 +226,12 @@ $<JOIN:$<TARGET_PROPERTY:encrypted-${target_name},IMAGES>,\n>")
                     CONTENT "${flash_args_content}")
         file(GENERATE OUTPUT "${build_dir}/encrypted_${target_name}_args"
                     INPUT "${CMAKE_CURRENT_BINARY_DIR}/encrypted_${target_name}_args.in")
+    else()
+        fail_target(encrypted-${target_name} "Error: The target encrypted-${target_name} requires"
+                    "CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT to be enabled.")
+
     endif()
+
 endfunction()