I am writing here to suggest the addition of the Espressif ESP8266, ESP32 and ESP32S2
SoC to the list ot toolchains known to CMake. I know that the toolchain offered by Espressif
is a customized version of GCC and I think there may better support from CMake… or
perhaps that is not needed and is an error from my part.
A toolchain file is usually necessary (or at least very helpful) for cross compilation. @brad.king would know better whether adding it to CMake makes sense.
This is just a case of cross compilation. Given the small memory of the ESP32, no native compilation may be achieved, at least using GCC or CLang… perhaps TCC may be used
to compile C user code exclusively ?
@cplusplus what is the output of the compiler’s
Please also see the cross-compiling section of the cmake-toolchains(7) manual for information on creating a
xtensa-esp32-elf-cc.exe (crosstool-NG esp-2019r2) 8.2.0
Copyright © 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thanks. That looks like a gcc cross-compiler so CMake should just be able to use it with a proper toolchain file. See my previous link for help writing one.
@cplusplus you might want to have a look at https://github.com/espressif/esp-idf/tree/master/tools/cmake, especially the