Skip to content

Commit c593abc

Browse files
committed
Merge branch 'feature/modify_cmake_script_for_esp8266' into 'master'
feat(cmake): Modify cmake script for esp8266 See merge request sdk/ESP8266_RTOS_SDK!137
2 parents d6038a2 + 51d9216 commit c593abc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

tools/cmake/idf_functions.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ function(idf_verify_environment)
128128
# Warn if the toolchain version doesn't match
129129
#
130130
# TODO: make these platform-specific for diff toolchains
131-
gcc_version_check("5.2.0")
132-
crosstool_version_check("1.22.0-80-g6c4433a")
131+
#gcc_version_check("5.2.0")
132+
#crosstool_version_check("1.22.0-80-g6c4433a")
133133

134134
endfunction()
135135

tools/cmake/project.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ macro(project name)
8383
# Now the configuration is loaded, set the toolchain appropriately
8484
#
8585
# TODO: support more toolchains than just ESP32
86-
set(CMAKE_TOOLCHAIN_FILE $ENV{IDF_PATH}/tools/cmake/toolchain-esp32.cmake)
86+
#set(CMAKE_TOOLCHAIN_FILE $ENV{IDF_PATH}/tools/cmake/toolchain-esp32.cmake)
87+
set(CMAKE_TOOLCHAIN_FILE $ENV{IDF_PATH}/tools/cmake/toolchain-esp8266.cmake)
8788

8889
# Declare the actual cmake-level project
8990
_project(${name} ASM C CXX)

tools/cmake/toolchain-esp8266.cmake

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(CMAKE_SYSTEM_NAME Generic)
2+
3+
set(CMAKE_C_COMPILER xtensa-lx106-elf-gcc)
4+
set(CMAKE_CXX_COMPILER xtensa-lx106-elf-g++)
5+
set(CMAKE_ASM_COMPILER xtensa-lx106-elf-gcc)
6+
set(CMAKE_OBJCOPY_COMPILER xtensa-lx106-elf-objcopy)
7+
8+
set(CMAKE_EXE_LINKER_FLAGS "-nostdlib" CACHE STRING "Linker Base Flags")

0 commit comments

Comments
 (0)