Clean Starter project for FreeRTOS and ESP32

c2mw4 wrote on February 02, 2020:

Like @TJirsch and @MateoElmo, I am struggling terribly to migrate from the standard ESP-IDF v4 environment to the AFR environment. I am beginning to be successful using the directory structure and other info at Getting Started (https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html#getting_started_espressif_cmake_project). Thank you!!! The directory structure is
project-root/

  • amazon-freertos/
  • AFR-configs/
  • build/
  • components/ # my components per Getting Started
  • src / # my main
    — and so on

However, I haven't found a solution using menuconfig and sdkconfig which lives in project-root/ rather than in build/. Of course I need menuconfig to configure the various ESP components of my project, and it is possible to tell menuconfig to save the sdkconfig at project-root/. It is important that sdkconfig does not live in build/ because build/ is often cleaned out and I don't want to re-configure my project each time. I saw the Getting Started suggestion for relocating sdkconfig.defults, but what about sdkconfig itself? The problem is: how to tell the CMake build system to look for, and use, sdkconfig in project-root/ rather than in build/?