1# The following lines of boilerplate have to be in your project's
2# CMakeLists in this exact order for cmake to work correctly
3cmake_minimum_required(VERSION 3.5)
4
5include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6project(test_build)
7
8add_custom_target(check_bootloader_sections ALL
9                  COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
10                  --rtl-dir ${CMAKE_BINARY_DIR}/bootloader
11                  --elf-file ${CMAKE_BINARY_DIR}/bootloader/bootloader.elf
12                  find-refs
13                  --from-sections=.iram_loader.text
14                  --to-sections=.iram.text
15                  --exit-code
16                  DEPENDS bootloader
17                  )
18