Commit graph

211 commits

Author SHA1 Message Date
Angus Gratton
fa527dc6b3 Merge branch 'bugfix/make_to_cmake_msys_py3_v4.0' into 'release/v4.0'
tools: Make Unicode from subprocess result in the CMake convert script (v4.0)

See merge request espressif/esp-idf!8544
2020-05-27 07:49:34 +08:00
Angus Gratton
a748457a70 version: Update to v4.0.1 2020-05-25 14:05:55 +10:00
Roland Dobai
7f4b651434 tools: Make Unicode from subprocess result in the CMake convert script
Fixes an issue with Python 3 in MSYS where it fails while trying to join
paths where one part is Unicode (default string on Python3) and the
second part are bytes (returned by the subprocess call).

Closes https://github.com/espressif/esp-idf/issues/5189
2020-04-28 15:22:27 +02:00
Renz Christian Bagaporo
35839232c8 cmake: utility to create a failing target 2020-03-22 21:09:23 +08:00
Angus Gratton
3d0ecfdc70 cmake: Add warnings that convert_to_cmake.py doesn't calculate component requirements
Any component which requires another component will need this manually
added to its CMakeLists.txt file.
2020-03-05 17:06:38 +11:00
Angus Gratton
e85c4a65a4 cmake: convert_to_cmake: Fix possible whitespace issues
As reported on forum:
https://esp32.com/viewtopic.php?f=2&t=13565&p=53476#p53453

split() with no arg will match any whitespace sequence not just
a single space, so takes care of case where two spaces are
inserted in the variable value.
2020-03-05 17:06:38 +11:00
Angus Gratton
a8fe083017 cmake: Set uninitialized variable warnings in ULP & bootloader subprojects
Fixes issue where PYTHON was not being expanded when running ulp_mapgen.py,
causing Windows launch setting to be used - reported here:
https://esp32.com/viewtopic.php?f=13&t=12640&p=50283#p50283

Closes https://github.com/espressif/esp-idf/issues/4785
2020-02-25 17:16:42 +11:00
Angus Gratton
c2bce897b8 idf.py: Add environment variable to enable ccache by default 2020-01-30 12:14:54 +01:00
Renz Christian Bagaporo
989dac1e64 cmake: implement utility to import prebuilt libraries 2020-01-06 09:39:49 +08:00
Angus Gratton
83813f830d Merge branch 'bugfix/menuconfig_confirm_v4.0' into 'release/v4.0'
Menuconfig: Don't ask to save configuration when nothing has changed (backport v4.0)

See merge request espressif/esp-idf!6813
2019-12-20 13:11:00 +08:00
Angus Gratton
3ba9eae86c Merge branch 'feature/ci_optimize_artifact_download_v4.0' into 'release/v4.0'
CI: optimize example build and artifact download (backport v4.0)

See merge request espressif/esp-idf!6940
2019-12-13 11:36:04 +08:00
Angus Gratton
30ac846112 Merge branch 'bugfix/cmake_secure_boot_v4.0' into 'release/v4.0'
secure boot: CMake bug fixes (v4.0)

See merge request espressif/esp-idf!6630
2019-12-12 06:30:37 +08:00
He Yin Ling
e9be102224 CI: build system do not check submodule for CI 2019-12-11 15:57:49 +11:00
Ivan Grokhotkov
afeed3cc6f build system: explicitly disable LTO plugin
... to reduce the number of simultaneously open files at link time.

When plugin support is enabled in the linker, BFD's (and the
corresponding file handles) are cached for the plugin to use. This
results in quite a large number of simultaneously open files, which
hits the default limit on macOS (256 files).

Since we aren't using LTO now, disable it explicitly when invoking the
linker.

Closes IDF-923
Closes IDFGH-1764
Closes https://github.com/espressif/esp-idf/issues/3989
2019-11-28 11:02:18 +01:00
Roland Dobai
97488fe806 Menuconfig: Don't ask to save configuration when nothing has changed
Closes https://github.com/espressif/esp-idf/issues/4303
2019-11-25 11:29:58 +01:00
Renz Christian Bagaporo
e4137cc6ca cmake: support git worktree
Use rev-parse to get the HEAD directory instead of manually looking for
it. This method works in the main repository, worktrees and submodules.

Closes https://github.com/espressif/esp-idf/issues/4136
2019-11-11 18:09:15 +08:00
Renz Christian Bagaporo
308e4fcce1 cmake: do not check if sdkconfig exists 2019-11-11 18:06:48 +08:00
Renz Christian Bagaporo
95b5745c3c cmake: treat unregistered components as unresolved 2019-11-11 18:03:26 +08:00
Renz Christian Bagaporo
ecce2bc926 cmake: introduce BUILD_COMPONENT_ALIASES
This commit makes it so that BUILD_COMPONENT holds only the component,
and a new property BUILD_COMPONENT_ALIASES hold the full name of the
component.

This also removes erroneous check for duplicate components, as this can
never happen:

(1) if two components have the same name but different prefixes,
the internal names are still unique between them

(2)if two components happen to have the same name and same prefix, the
latter would override the former
2019-11-11 18:01:00 +08:00
Renz Christian Bagaporo
b69898257a cmake: make build components available before immediately
Previous implementation only builds list of components included in the
build during component registration.

Since the build components is known as the requirements expansion is
ongoing, update the list here instead.
2019-11-11 18:00:50 +08:00
Renz Christian Bagaporo
22548d0ea4 cmake: hide internal targets
Use imported library, which does not create additional rules, but still
allows attaching arbitraty properties instead of custom targets. This
allows the targets to not appear in the target list of IDEs such as
CLion.
2019-11-11 17:58:02 +08:00
Angus Gratton
90568fbf00 secure boot: Fix bug where verification key was not embedded in app 2019-11-08 11:39:01 +08:00
Ivan Grokhotkov
3d0466ccd1 C++: add provisions for optional RTTI support
Ref. https://github.com/espressif/esp-idf/issues/1684

This change allows RTTI to be enabled in menuconfig. For full RTTI
support, libstdc++.a in the toolchain should be built without
-fno-rtti, as it is done now.

Generally if libstdc++.a is built with RTTI, applications which do not
use RTTI (and build with -fno-rtti) could still include typeinfo
structures referenced from STL classes’ vtables. This change works
around this, by moving all typeinfo structures from libstdc++.a into
a non-loadable section, placed into a non-existent memory region
starting at address 0. This can be done because when the application
is compiled with -fno-rtti, typeinfo structures are not used at run
time. This way, typeinfo structures do not contribute to the
application binary size.

If the application is build with RTTI support, typeinfo structures are
linked into the application .rodata section as usual.

Note that this commit does not actually enable RTTI support.
The respective Kconfig option is hidden, and will be made visible when
the toolchain is updated.
2019-10-18 11:22:39 +02:00
Roland Dobai
783ef22dd3 Fix cmake typo 2019-10-10 09:11:01 +02:00
Ivan Grokhotkov
da8c09c463 cmake: check mconf-idf binary version
Print a warning if an outdated version of mconf-idf is found in
the PATH.
2019-09-10 17:15:15 +02:00
Angus Gratton
ebb9384681 Merge branch 'bugfix/various_cmake_fixes_v4.0' into 'release/v4.0'
CMake: Various backports

See merge request espressif/esp-idf!5933
2019-09-02 12:46:40 +08:00
Renz Christian Bagaporo
e71e4da388 cmake: check include directories 2019-08-28 10:28:17 +08:00
Renz Christian Bagaporo
3f1ec39a8d cmake: fix issue with checking build process args 2019-08-28 10:28:17 +08:00
Renz Christian Bagaporo
f62798cb8b cmake: make default version 1 2019-08-28 10:28:17 +08:00
Renz Christian Bagaporo
b6c89984a9 cmake: fix build failure when git repo is initialized but no first commit
Closes https://github.com/espressif/esp-idf/issues/3920
2019-08-28 10:28:17 +08:00
Per Malmberg
b669495d97 Make sure ESP_PLATFORM is defined when processing CMake files. 2019-08-28 10:28:17 +08:00
Renz Christian Bagaporo
8778c551eb cmake: set build dir for mconf-idf
Fixes an issue where if idf_build_process is called in a CMake
subdirectory, menuconfig looks for the mconf-idf binary in the wrong
place (in the subdirectory build dir instead of root binary dir).
2019-08-28 10:28:17 +08:00
Renz Christian Bagaporo
4c9f30a869 cmake: set component properties 2019-08-27 13:35:21 +08:00
Mahavir Jain
b72ff61899 cmake: fix issue with handling of EXCLUDE_SRCS 2019-08-26 11:49:30 +05:30
Roland Dobai
a8e8919bbf tools: Support sdkconfig.rename files from outside IDF in confgen.py 2019-08-19 17:44:18 +10:00
Angus Gratton
56afdedf7c Merge branch 'bugfix/do_not_require_new_target_link_library_signature' into 'master'
CMake: Do not force use of new target_link_libraries signature

See merge request espressif/esp-idf!5471
2019-07-16 13:36:35 +08:00
Renz Christian Bagaporo
d3e814fe19 cmake: set COMPONENT_DIR in early expansion
Gives same treatment to COMPONENT_DIR as COMPONENT_PATH in
https://gitlab.espressif.cn:6688/espressif/esp-idf/merge_requests/4557

Closes https://github.com/espressif/esp-idf/issues/3771
2019-07-12 16:22:18 +08:00
Renz Christian Bagaporo
2a5b02097b cmake: do not force use of new signature for target_link_libraries 2019-07-08 19:43:57 +08:00
Angus Gratton
2639d5b6c3 cmake: Fix some bugs building mconf-idf from scratch
- Makefile didn't quite work with out-of-tree build unless there was already an in-tree build done.
- CMake needs to delete some of the in-tree build artifacts or they're used instead of the correct
 files.
2019-07-03 18:40:55 +10:00
Angus Gratton
9ef37270f6 Merge branch 'bugfix/make_ccache_opt_in' into 'master'
cmake: make use of ccache opt-in

See merge request idf/esp-idf!5368
2019-07-01 15:48:31 +08:00
Angus Gratton
f1e07663c4 cmake: Use environment variables file for all config binaries 2019-07-01 15:54:27 +10:00
Angus Gratton
26db058339 cmake kconfig: Pass environment variables to confgen.py via a file
Works around "command line too long" errors when using Windows
and CMake < 3.11

Closes IDF-711
2019-07-01 15:54:10 +10:00
Renz Christian Bagaporo
72a5762525 cmake: make use of ccache opt-in 2019-06-29 00:22:57 +00:00
Angus Gratton
265d7dc4e5 Merge branch 'bugfix/fix_secure_boot_support' into 'master'
Fixes to secure boot support in CMake

See merge request idf/esp-idf!4977
2019-06-28 15:38:59 +08:00
Angus Gratton
d9ca915fa4 Merge branch 'bugfix/cmake_project_vars_not_set_by_redefinition' into 'master'
cmake: set variables set by project call

See merge request idf/esp-idf!5187
2019-06-28 15:31:10 +08:00
Renz Christian Bagaporo
e4a4063e4c cmake: fix issue with fail at build time
Fix issue that next build retry does not succeed once the requirement is
satisfied.
2019-06-28 10:54:21 +08:00
Angus Gratton
9a412d3a08 Merge branch 'feature/use_new_component_registration_apis' into 'master'
Use new component registration API

See merge request idf/esp-idf!4898
2019-06-25 10:24:11 +08:00
Angus Gratton
396131433a Merge branch 'feature/idf_size_json' into 'master'
idf_size: Support JSON output

Closes IDF-264

See merge request idf/esp-idf!4987
2019-06-24 19:06:12 +08:00
Renz Christian Bagaporo
047cf71c01 tools: update make converter to use new component registration api 2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
11924d76cb cmake: clarify build trimming docs
How idf_build_component and the COMPONENTS argument to idf_build_process
interact is not clear/misleading. Clarify their interaction in the docs.

Closes: https://github.com/espressif/esp-idf/issues/3630
2019-06-20 16:02:22 +08:00