mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-21 00:56:38 +08:00
Merge branch 'chore/add_cmake_script_for_esp8266' into 'master'
feat(esp8266): Add cmake script See merge request sdk/ESP8266_RTOS_SDK!135
This commit is contained in:
57
components/esp8266/CMakeLists.txt
Normal file
57
components/esp8266/CMakeLists.txt
Normal file
@ -0,0 +1,57 @@
|
||||
set(COMPONENT_SRCDIRS source driver)
|
||||
|
||||
set(COMPONENT_ADD_INCLUDEDIRS include)
|
||||
|
||||
set(COMPONENT_PRIV_INCLUDEDIRS include/driver)
|
||||
|
||||
set(COMPONENT_REQUIRES lwip)
|
||||
set(COMPONENT_PRIV_REQUIRES freertos)
|
||||
|
||||
register_component()
|
||||
|
||||
target_link_libraries(${COMPONENT_NAME} "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
||||
if(NOT CONFIG_NO_BLOBS)
|
||||
target_link_libraries(${COMPONENT_NAME} airkiss crypto espnow gcc hal core mirom
|
||||
net80211 phy pp pwm smartconfig ssc wpa wps cirom)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${COMPONENT_NAME} "-u call_user_start")
|
||||
|
||||
set(ESPTOOLPY_FLASHSIZE ${CONFIG_ESPTOOLPY_FLASHSIZE})
|
||||
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "512KB")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.512.${CONFIG_ESPTOOLPY_APP_NUM}.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "1MB")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.1024.${CONFIG_ESPTOOLPY_APP_NUM}.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "2MB")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.1024.${CONFIG_ESPTOOLPY_APP_NUM}.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "2MB-c1")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.2048.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "4MB")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.1024.${CONFIG_ESPTOOLPY_APP_NUM}.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "4MB-c1")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.2048.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "8MB")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.2048.ld)
|
||||
endif()
|
||||
if(ESPTOOLPY_FLASHSIZE STREQUAL "16MB")
|
||||
set(ESP8266_LINKER_SCRIPTS eagle.app.v6.new.2048.ld)
|
||||
endif()
|
||||
|
||||
target_linker_script(${COMPONENT_NAME}
|
||||
ld/${ESP8266_LINKER_SCRIPTS}
|
||||
ld/eagle.app.v6.common.ld
|
||||
ld/eagle.rom.addr.v6.ld)
|
||||
|
||||
target_compile_options(${COMPONENT_NAME} PUBLIC -Wno-error=char-subscripts -Wno-error=unknown-pragmas -Wno-error=implicit-function-declaration
|
||||
-Wno-error=pointer-sign -Wno-error=switch -Wno-error=maybe-uninitialized -Wno-error=format=
|
||||
-Wno-error=unused-value -Wno-error=address -Wno-error=return-type -Wno-error=format-extra-args
|
||||
-Wno-error=format-zero-length -Wno-error=unused-label -Wno-error=sizeof-pointer-memaccess)
|
||||
|
||||
target_compile_options(${COMPONENT_NAME} PUBLIC -DMEMLEAK_DEBUG -DICACHE_FLASH)
|
Reference in New Issue
Block a user