summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-10-22 16:01:01 +1100
committerDamien George <damien@micropython.org>2024-10-28 11:24:15 +1100
commit043ba45bc36a4bb19e732ae3f68181a05137906b (patch)
treeae5016bf577c51203bf3813cb9e5f9402f295e8f
parentff70a91581448983d9bdf1251f659ed7bc8189fb (diff)
esp32: Add some notes about the different CMake files.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r--ports/esp32/CMakeLists.txt5
-rw-r--r--ports/esp32/esp32_common.cmake6
2 files changed, 10 insertions, 1 deletions
diff --git a/ports/esp32/CMakeLists.txt b/ports/esp32/CMakeLists.txt
index 9ca9065af..d695170fa 100644
--- a/ports/esp32/CMakeLists.txt
+++ b/ports/esp32/CMakeLists.txt
@@ -1,5 +1,8 @@
# Top-level cmake file for building MicroPython on ESP32.
-
+#
+# Note for maintainers: Where possible, functionality should be put into
+# esp32_common.cmake not this file. This is because this CMakeLists.txt file
+# needs to be duplicated for out-of-tree builds, and can easily get out of date.
cmake_minimum_required(VERSION 3.12)
# Retrieve IDF version
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index 48f067deb..9d51a03aa 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -1,3 +1,9 @@
+# This is the common ESP-IDF "main component" CMakeLists.txt contents for MicroPython.
+#
+# This file is included directly from a main_${IDF_TARGET}/CMakeLists.txt file
+# (or included from an out-of-tree main component CMakeLists.txt for out-of-tree
+# builds.)
+
# Set location of base MicroPython directory.
if(NOT MICROPY_DIR)
get_filename_component(MICROPY_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)