Commit graph

148 commits

Author SHA1 Message Date
Angus Gratton
22514c1dd9 cmake: For gcc8 use linker to find paths to libc, libm, libstdc++, etc
Removes the need to know/guess the paths to these libraries. Once we are gcc 8 only, we
can remove -nostdlib and no additional arguments are needed for system libraries.

The catch is: any time IDF overrides a symbol in the toolchain sysroot, we need
an undefined linker marker to make sure this symbol is seen by linker.
2019-05-28 12:54:37 +08:00
Renz Christian Bagaporo
83ce35d638 cmake: do not use link groups 2019-05-28 10:51:02 +08:00
Angus Gratton
801f5d6e82 Merge branch 'bugfix/more_cmake_fixes' into 'master'
More CMake fixes

See merge request idf/esp-idf!5060
2019-05-27 15:48:25 +08:00
Renz Christian Bagaporo
25b539d4fc cmake: make project includes know gcc version as well 2019-05-23 18:39:31 +08:00
Renz Christian Bagaporo
74c6c926ea nghttp: move HAVE_CONFIG_H compile definition to component 2019-05-23 18:39:31 +08:00
Renz Christian Bagaporo
f125a9aaf4 cmake: restore creation of kconfig_menus.json 2019-05-23 18:39:31 +08:00
Roland Dobai
a52451258e Fix cmake confserver target 2019-05-23 08:29:05 +02:00
Angus Gratton
c879aff6f5 Merge branch 'bugfix/cmake_git_describe' into 'master'
cmake: Project & IDF git revisions: Show un-annotated tags and -dirty flag

See merge request idf/esp-idf!5042
2019-05-23 12:36:49 +08:00
Angus Gratton
95dcfecedc cmake: Project & IDF git revisions: Show un-annotated tags and -dirty flag
Adds --tags and --dirty flags to cmake git_describe() calls, and not
pass the HEAD commit hash (incompatible with --dirty)

Makes IDF_VER output the same as in Make build system

Thanks to @william-ferguson-au for reporting this:
https://github.com/espressif/esp-idf/issues/3378#event-2355460974
2019-05-23 13:46:23 +10:00
Angus Gratton
e8ade3c68d Merge branch 'feature/Kconfig_rename' into 'master'
Rename Kconfig options

Closes IDF-265

See merge request idf/esp-idf!4883
2019-05-22 11:08:36 +08:00
Roland Dobai
997b29a9ca Rename Kconfig options (components/esptool_py) 2019-05-21 09:32:55 +02:00
Renz Christian Bagaporo
b4ad6c1426 cmake: refactor quick check given component dirs 2019-05-20 19:24:17 +08:00
Renz Christian Bagaporo
e1726a91ce cmake: project includes should know about ESP_PLATFORM variable 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
e3eb945fd2 cmake: restore use of GNU extensions from libc 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
5175a152d9 cmake: exclude dot-dirs from added components 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
078c69e689 cmake: remove redundant variable setting 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
7493bd2e28 cmake: add command to get config value 2019-05-14 18:01:14 +08:00
Renz Christian Bagaporo
de9bb5a160 cmake: fix scope issues 2019-05-14 18:01:14 +08:00
Renz Christian Bagaporo
c564d1730f esp_common: append gc sections link flag 2019-05-14 18:01:14 +08:00
Angus Gratton
99f8a811fd cmake: Warn if something which looks like a component directory isn't
Otherwise, fails build at the add_subdirectory stage
2019-05-13 19:57:39 +08:00
Angus Gratton
3cf56ea6b6 cmake: Fix menuconfig target
need to load mconf path as build property
2019-05-13 19:57:39 +08:00
Renz Christian Bagaporo
c6dc47b3e2 cmake: build system changes 2019-05-13 19:57:39 +08:00
Renz Christian Bagaporo
459dd29444 cmake: restore ccache use when present
Closes https://github.com/espressif/esp-idf/issues/3116
2019-05-06 20:04:07 +08:00
Renz Christian Bagaporo
b1ecd75d83 ldgen: pass component libraries directly 2019-04-26 20:06:53 +08:00
Roland Dobai
23ee93ea76 Rename deprecated Kconfig options in a backward compatible way 2019-04-24 12:53:02 +02:00
Angus Gratton
a20d02b7f1 Merge branch 'feature/remove_dependency_to_soc' into 'master'
global: remove dependency to soc everywhere except driver and kernel components

See merge request idf/esp-idf!4678
2019-04-18 08:08:41 +08:00
Anton Maklakov
410f5c3f7d build: Add a standard way to use GNU extensions from libc, since we have a general configured newlib in the toolchain 2019-04-17 12:08:36 +07:00
Michael (XIAO Xufeng)
562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
Anton Maklakov
2e6c8cdce3 esp32: disable -Wframe-address
Since the behavior is well defined on Xtensa with Window ABI we can
suppress a frame-address warning. Also fix the CMAKE_C*_FLAGS parsing.
2019-04-10 13:52:30 +08:00
suda-morris
78034879a8 make bootloader depend on IDF_TARGET 2019-04-08 11:08:06 +08:00
morris
dbdb299bb1 create xtensa component
1. move xtensa specific files out of esp32 component
2. merge xtensa-debug-module component into xtensa
2019-03-27 20:24:28 +08:00
morris
a2f07b0806 move common include files from esp32 into esp_common 2019-03-26 11:57:03 +08:00
Angus Gratton
abdc9f50d8 cmake: Set COMPONENT_PATH during early expansion of dependencies
Works around bug where components/soc/CMakeLists.txt was testing "EXISTS
${COMPONENT_PATH}/${SOC_NAME}" and this test could pass during early
expansion if COMPONENT_PATH was empty and a directory /esp32 exists
on Windows.

Closes https://github.com/espressif/esp-idf/issues/3195
2019-03-20 10:45:45 +11:00
Konstantin Kondrashov
f8ca296438 cmake: Trim IDF_VER to fit a 32-bit field 2019-03-13 20:04:43 +08:00
Renz Christian Bagaporo
d0b2d5ec95 cmake: Fix for Python files executed directly, not via PYTHON variable
A problem if the Python interpreter used for idf.py (or set via PYTHON
variable) didn't match
"/usr/bin/env python" (or the associated executable for .py files, on
Windows).

Closes https://github.com/espressif/esp-idf/issues/3160
Possibly also fix for https://github.com/espressif/esp-idf/issues/2936

Adds build system test to catch any future direct execution of Python in
the standard build process.
2019-03-12 13:31:44 +08:00
morris
9297b07a97 cmake: add spaces2list for COMPONENT_SRCS
According to ESP-IDF Cmake build system document, COMPONENT_SRCS should support using spaces to sperate source files.

Closes https://github.com/espressif/esp-idf/issues/3130
2019-03-06 20:55:38 +08:00
Angus Gratton
da390618c2 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-02-26 04:07:51 +00:00
Renz Christian Bagaporo
24284b3afd ldgen: remove resolution of template includes 2019-02-22 08:25:56 +08:00
Renz Christian Bagaporo
acd0be8239 cmake,make: add dependencies on template included scripts 2019-02-14 18:58:48 +08:00
KonstantinKondrashov
187f9945bc tools: Add --always option to git describe for Cmake
Fixed differences in getting of the project version for Make and Cmake.
2019-01-24 12:06:55 +08:00
Angus Gratton
58acac883d Merge branch 'bugfix/regenerate_sdkconfig_fails' into 'master'
Fix issues with regenerating sdkconfig on modification

Closes #58

See merge request idf/esp-idf!4115
2019-01-24 11:56:52 +08:00
Sagar Bijwe
05220d9cda CMake: Make IDF_PATH available to Kconfiglib when not explicitly set.
When IDF_PATH is not set by the user, cmake infers the same through
other means and sets it as an environment variable. However, some
sub-invocation of cmake may not see this variable as it is not set
in the parent. This change adds a custom command for exporting IDF_PATH
just before invoking ldgen so that IDF_PATH can be used in Kconfig
without any errors.
2019-01-21 17:02:31 +05:30
Renz Christian Bagaporo
08f472ad1e cmake: only generate sdkconfig on top level project 2019-01-16 08:16:09 +08:00
Angus Gratton
6578673ed4 Merge branch 'feature/esp_platform_cmake_pr2601' into 'master'
cmake: Add ESP_PLATFORM in CMake build (PR 2601)

See merge request idf/esp-idf!3823
2019-01-02 14:03:52 +08:00
Renz Christian Bagaporo
50fa7c5a89 cmake: fix unable to start confserver on windows 2018-12-23 19:52:58 +08:00
Angus Gratton
849088d467 cmake: Add ESP_PLATFORM in idf_set_variables() as well
(Handles case where idf.py is not being used.)

Ref https://github.com/espressif/esp-idf/pull/2601
2018-12-21 18:59:28 +11:00
Per Malmberg
25333b59c2 Add ESP_PLATFORM to build environment.
Merges https://github.com/espressif/esp-idf/pull/2601
2018-12-21 18:59:28 +11:00
Ivan Grokhotkov
88dc626fd7 Merge branch 'feature/example_defconfig_ci' into 'master'
ci, examples: use sdkconfig.ci as an extra defaults file, if present

See merge request idf/esp-idf!3934
2018-12-21 12:14:57 +08:00
Angus Gratton
16854e1f40 Merge branch 'bugfix/cmake_list_component_config_alphabetically' into 'master'
List menuconfig component config items alphabetically via component name

See merge request idf/esp-idf!3939
2018-12-21 07:50:31 +08:00
Angus Gratton
78487123bf Merge branch 'feature/cut_len_for_header_struct' into 'master'
build: Add trimming PROJECT_VER and PROJECT_NAME vars

See merge request idf/esp-idf!3927
2018-12-21 07:45:22 +08:00