summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-02-11 09:48:07 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-11 19:51:30 +0000
commit794fd7a8a43a9e63065af00e6b5eb2411539c7e7 (patch)
tree9b6b08d7907eeeea7d954cecdf89d3b10038c197 /zephyr
parent0a36c06ebe9a055b16d3ef6ad46d820cc48f1610 (diff)
downloadchrome-ec-794fd7a8a43a9e63065af00e6b5eb2411539c7e7.tar.gz
zephyr: move CHROMIUM_EC definition to CMakeLists
Move the definition of CHROMIUM_EC from config_chip.h to CMakeLists.txt, which allows ec_commands.h to be included without config.h. This clears up an occasional build hiccup we would hit when shimming new modules. BUG=b:180008545 BRANCH=none TEST=zmake buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Id1ee8a9ab65a19e083158d3b9e6cc9f2fc377de4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2690986 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/CMakeLists.txt5
-rw-r--r--zephyr/shim/include/config_chip.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 516f014721..77541029c3 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -46,6 +46,11 @@ if(DEFINED CONFIG_PLATFORM_EC)
# time. Also, append the include directory so we can include ec_version.h.
zephyr_append_cmake_library(ec_version)
zephyr_include_directories("${CMAKE_BINARY_DIR}/ec/include/generated")
+
+ # Add CHROMIUM_EC definition, which is used by ec_commands.h to
+ # determine that the header is being compiled for the EC instead of
+ # by another third-party C codebase.
+ zephyr_compile_definitions("CHROMIUM_EC")
endif()
# If a header is needed (should only be set for npcx) run the ecst.py script to
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 029e06a2ae..608e9df1aa 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -19,7 +19,6 @@
*/
#define CONFIG_ZEPHYR
-#define CHROMIUM_EC
/*
* Obsolete configs - these are options that are not needed, either because