CMakeLists.txt 589 B

123456789101112131415
  1. # The following lines of boilerplate have to be in your project's
  2. # CMakeLists in this exact order for cmake to work correctly
  3. cmake_minimum_required(VERSION 3.16)
  4. # Here we remove all unecessary components from the build to make the binary smaller
  5. set(COMPONENTS main)
  6. include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  7. project(hello_world)
  8. # This generates a binary file from the elf, as the RAM build doesn't do that automatically
  9. add_custom_command(TARGET ${PROJECT_NAME}.elf
  10. POST_BUILD
  11. COMMAND esptool.py --chip ${IDF_TARGET} elf2image --output app.bin ${PROJECT_NAME}.elf
  12. )