From fbd12902ebf88b6548fe9b570ec0fed86b2269fd Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Sun, 22 Mar 2020 20:44:23 +0800 Subject: [PATCH] cmake: show error message on encrypted flash targets without proper config --- components/esptool_py/project_include.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/esptool_py/project_include.cmake b/components/esptool_py/project_include.cmake index 53f42e6398..48750a929f 100644 --- a/components/esptool_py/project_include.cmake +++ b/components/esptool_py/project_include.cmake @@ -173,6 +173,11 @@ esptool_py_custom_target(app-flash app "app") if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT) esptool_py_custom_target(encrypted-flash encrypted_project "app;partition_table;bootloader") esptool_py_custom_target(encrypted-app-flash encrypted_app "app") +else() + fail_target(encrypted-flash "Error: The target encrypted-flash requires" + "CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT to be enabled.") + fail_target(encrypted-app-flash "Error: The target encrypted-app-flash requires" + "CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT to be enabled.") endif() # esptool_py_flash_project_args