-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A prerequisite for supporting targets other than the original ESP32. #564
- Loading branch information
Showing
34 changed files
with
179 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
set(PYTHON_DEPS_CHECKED 1) # Save some build time | ||
set(EXTRA_CFLAGS $ENV{EXTRA_CFLAGS}) | ||
set(EXTRA_CPPFLAGS $ENV{EXTRA_CPPFLAGS}) | ||
set(EXTRA_CXXFLAGS $ENV{EXTRA_CXXFLAGS}) | ||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project($ENV{APP}) | ||
|
||
# Add binary libs. | ||
separate_arguments(app_bin_libs NATIVE_COMMAND "$ENV{APP_BIN_LIBS}") | ||
foreach(bin_lib ${app_bin_libs}) | ||
get_filename_component(target_name ${bin_lib} NAME_WLE) | ||
add_prebuilt_library(${target_name} ${bin_lib}) | ||
target_link_libraries(${CMAKE_PROJECT_NAME}.elf ${target_name}) | ||
endforeach() | ||
|
||
# ESP-IDF passes component libs multiple times to the linker. | ||
# This looks like a bug but is not a problem unless they are --whole-archive's. | ||
# Which is what we want to do, since that is the only way to make sure weak | ||
# functions are overridden by non-weak ones, which we definitely want to happen. | ||
# We wrap the link command with a script that dedupes the static libs, | ||
# puts them in a group and wraps with --whole-archive. | ||
set(CMAKE_CXX_LINK_EXECUTABLE "/mongoose-os/tools/link.py <CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
separate_arguments(app_srcs NATIVE_COMMAND "$ENV{APP_SOURCES}") | ||
idf_component_register( | ||
SRCS ${app_srcs} | ||
REQUIRES main | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
separate_arguments(gen_srcs NATIVE_COMMAND "$ENV{GEN_SOURCES}") | ||
separate_arguments(mgos_srcs NATIVE_COMMAND "$ENV{MGOS_SOURCES}") | ||
idf_component_register( | ||
INCLUDE_DIRS "." | ||
SRCS ${app_srcs} ${gen_srcs} ${mgos_srcs} | ||
) | ||
# In ffi exports file we use fake signatures: void func(void), and it conflicts | ||
# with the builtin functions like fopen, etc. | ||
set_source_files_properties(${FFI_EXPORTS_C} PROPERTIES COMPILE_FLAGS -fno-builtin) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker.io/mgos/esp32-build:4.4.1-r1 | ||
docker.io/mgos/esp32-build:4.4.1-r3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.