[buildenv]
WORKAROUND_FOR_ESP32_C_FLAGS="{{ config.project.cflags if config.project.cflags}} {{config.profiles.get(profile).cflags if config.profiles.get(profile).cflags}}"
WORKAROUND_FOR_ESP32_IDF_CXX_FLAGS="{{ config.project.cxxflags if config.project.cxxflags }} {{ config.profiles.get(profile).cxxflags if config.profiles.get(profile).cxxflags }}"

[settings]
compiler=gcc
compiler.version=8
compiler.cppstd={{ config.project.cxxstandard }}
compiler.libcxx=libstdc++
os_build=Linux
arch_build=x86_64

os=baremetal
arch=xtensalx6
{# TODO: [kta] Here there is a code smell due to satisfy backwards-compatibility. Change in scargo 2.0 to: #}
{# cmake_build_type = {{ config.profiles[profile].cmake_build_type }} #}
{# This will enforce definition of cmake_build_type in scargo.toml [profile.X] section #}
build_type={{ profile if (profile in standard_profiles) else config.profiles[profile].cmake_build_type }}

[conf]
tools.cmake.cmaketoolchain:toolchain_file=/opt/esp-idf/tools/cmake/toolchain-esp32.cmake
tools.cmake.cmaketoolchain:generator=Ninja

[options]
[build_requires]