Commit Graph

396 Commits

Author SHA1 Message Date
Marius Vikhammer
0ffeaf9350 Merge branch 'feature/confgen_rename_many_to_one' into 'master'
kconfig: update confgen to handle sdkconfig.rename with target specific markup

Closes IDF-4544

See merge request espressif/esp-idf!16949
2022-02-08 02:38:22 +00:00
Marius Vikhammer
23c55946a6 kconfig: also parse target specific sdkconfig.rename.TARGET files
Adds functionality for target specific sdkconfig.rename files which can be
used when certain renames are only needed for a specific target.
2022-01-31 11:36:08 +08:00
Ivan Grokhotkov
0ebf93c01e Merge branch 'bugfix/linux_taret_fixes' into 'master'
linux target: various minor fixes

See merge request espressif/esp-idf!16905
2022-01-25 08:43:38 +00:00
Ivan Grokhotkov
9901fc3058 cmake: don't pass --gc-sections to macOS linker, use -dead_strip
When building for "linux" (~POSIX) target on macOS, the system linker
is normally used. MacOS linker doesn't recognise --gc-sections, but
has a -dead_strip flag which is equivalent.
2022-01-24 18:51:40 +01:00
Roland Dobai
ef5c08a7be Revert "Tools: Don't check Python packages on every idf.py & cmake run"
This reverts commit 0265c79bcc.
2022-01-24 14:53:37 +01:00
morris
c1b79951fd cmake: assign toolchain prefix manually 2022-01-20 15:46:50 +08:00
Kevin (Lao Kaiyao)
bf8d4d55d0 Merge branch 'refactor/rename_esp8684_to_esp32c2' into 'master'
esp8684: rename esp8684 to esp32c2

Closes IDF-4530

See merge request espressif/esp-idf!16745
2022-01-19 09:08:58 +00:00
laokaiyao
cf049e15ed esp8684: rename target to esp32c2 2022-01-19 11:08:57 +08:00
Roland Dobai
0265c79bcc Tools: Don't check Python packages on every idf.py & cmake run 2022-01-18 14:55:47 +01:00
Roland Dobai
b28d7e6850 Tools: Improve the Python package system
Introduce features into the Python package management system & manage
package versions outside of ESP-IDF repo.
2022-01-17 16:54:36 +01:00
Roland Dobai
73d818eb72 tools: Add UF2 identificator for ESP32-C2 and ESP32-H2
The IDs were submitted in https://github.com/microsoft/uf2/pull/59.
2022-01-14 15:50:17 +01:00
morris
1267738149 cmake: using toolchain prefix determined by cmake itself 2022-01-10 10:06:09 +08:00
Omar Chebib
cb90544a04 Build: fix idf_as_lib example not building 2022-01-06 03:17:29 +00:00
Roland Dobai
b886dc6998 Merge branch 'feature/idf_py_savedefconfig' into 'master'
Tools: Add "idf.py save-defconfig" command to generate sdkconfig.defaults based on current sdkconfig

Closes IDF-2970

See merge request espressif/esp-idf!16409
2021-12-20 08:23:43 +00:00
Ivan Grokhotkov
5b3b5f006f Merge branch 'feature/cmake_weak_deps_helper' into 'master'
cmake: add idf_component_optional_requires utility function, simplify some component dependencies

Closes IDF-3086

See merge request espressif/esp-idf!16373
2021-12-16 13:46:45 +00:00
Roland Dobai
5118dd7cf3 Tools: Add "idf.py save-defconfig" command to generate sdkconfig.defaults 2021-12-15 17:15:31 +01:00
Ivan Grokhotkov
09e50b27ed cmake: handling of space-separated EXTRA_COMPONENT_DIRS
COMPONENT_DIRS and EXTRA_COMPONENT_DIRS should be defined as CMake
lists, using 'set' or 'list' commands. Some applications written
for earlier versions of ESP-IDF used to define these variables as
space separated strings.

For example, the following is correct:

  set(EXTRA_COMPONENT_DIRS path/to/components path/to/more/components)

The following is not correct:

  set(EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS} component1")
  set(EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS} component2")

The string "component1 component2" may indicate a single directory
name with a space, or two directory names separated by space.

However due to the fact that such way of defining EXTRA_COMPONENT_DIRS
was supported in IDF 4.3 and earlier, we need to provide backward
compatibility for it.

This commit introduces a new script, split_paths_by_spaces.py, which
is invoked if EXTRA_COMPONENT_DIRS or COMPONENT_DIRS variable contains
spaces. The script tries to determine if each space should be
interpreted as a separator or as part of the directory name.

When this cannot be done unambiguously, the script reports an error.

In all cases when space separators are detected, the script reports
a warning, and prints instructions for fixing the CMakeLists.txt.

Breaking change in this commit: specifying non-existent directories
in COMPONENT_DIRS or EXTRA_COMPONENT_DIRS is no longer allowed.
2021-12-14 19:17:53 +01:00
Ivan Grokhotkov
29489a3303 build system: fix quoting of fragments list passed to ldgen 2021-12-14 19:17:53 +01:00
Ivan Grokhotkov
8da98b864d build system: pass semicolon-separated directory lists to kconfig
New —-list-separator argument of confgen.py and
prepare_kconfig_files.py is used to select which character is used
as list separator. For compatibility with esp-docs, we still keep
support for space separator. Otherwise esp-docs would have to choose
the separator depending on the IDF version.
2021-12-14 19:17:53 +01:00
Ivan Grokhotkov
636ce4750f ldgen: remove unused variables 2021-12-14 13:14:55 +01:00
Cao Sen Miao
e81841318f CI: Enable ESP8684 build stage CI on master 2021-12-13 19:18:47 +08:00
Ivan Grokhotkov
71a884571c cmake: add idf_component_optional_requires utility function
It can be used in component CMakeLists.txt files when adding "weak"
dependencies between component. A "weak" dependency from A to B is
similar to target_link_libraries(A PRIVATE B), but it gets added only
if B is included in the build.
Use it instead of specifying B as part of PRIV_REQUIRES when the
component can be built (even if with reduced functionality) without
component B being available.
2021-12-13 10:53:22 +01:00
Ivan Grokhotkov
ae7d1fff49 cmake: add component dependency graph generation helpers
These optional feature produces a graphviz file showing component
dependencies. It is useful for debugging reasons why certain
components got added to the build.
2021-12-02 15:29:00 +01:00
Omar Chebib
0baf2c43cc Build: CMake compiler flags will be set, regardless of the cache status
Defining CMake variables from the command-line or from another CMake project,
such as `-DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS=`, caused a link failure as ESP
CMake was unable to set its proper compilation flags.
Additional CMake compiler flags can now be provided by another project.

* Closes https://github.com/espressif/esp-idf/issues/7507
2021-11-29 09:48:13 +00:00
Roland Dobai
f64b3902cf tools: Delete the old kconfig tools
The old kconfig tool is not used anymore. It was replaced with the
kconfiglib Python package.
2021-11-24 13:07:56 +01:00
Roland Dobai
9c1d4f5b54 Build & config: Remove the "make" build system
The "make" build system was deprecated in v4.0 in favor of idf.py
(cmake). The remaining support is removed in v5.0.
2021-11-10 09:53:53 +01:00
Cao Sen Miao
f6da46d798 CI: add fast_template_app and tools support 2021-11-06 17:33:44 +08:00
Cao Sen Miao
7f5c415401 ESP8684: introduce a new target esp8684 2021-11-06 17:33:44 +08:00
Roland Dobai
b1817115ce Merge branch 'feature/improve_chip_target_detection' into 'master'
tools: Improve chip target detection

Closes IDF-3751

See merge request espressif/esp-idf!15691
2021-11-05 15:31:32 +00:00
simon.chupin
bca79c75d5 tools: Improve chip target detection 2021-11-03 15:36:56 +01:00
Fu Hanxi
42405604af idf.py gdb: autoload prefix_map_gdbinit when exists in project_description.json 2021-10-26 14:20:40 +08:00
Fu Hanxi
ea1005b740 build: create BUILD_DIR/prefix_map_gdbinit when enable reproducible build
add project property BUILD_COMPONENT_DIRS
2021-10-26 10:55:00 +08:00
Ivan Grokhotkov
68233f58b4 version: starting v5.0.0 development 2021-10-20 22:25:38 +02:00
Marek Fiala
ff18a96f7d tools: replace _ with - in idf.py
Closes https://github.com/espressif/esp-idf/issues/5126
2021-10-13 17:30:38 +08:00
Roland Dobai
e55b4ff8e6 Merge branch 'feature/esp32s3_dfu' into 'master'
docs, cmake: updates for ESP32-S3 DFU support

Closes IDF-3534

See merge request espressif/esp-idf!15348
2021-10-12 15:44:02 +00:00
Ivan Grokhotkov
347884aff5 docs, cmake: updates for ESP32-S3 DFU support 2021-10-08 18:24:20 +02:00
Ivan Grokhotkov
4f3cc319af cmake: kconfig: sort results of new glob expressions
Similar to 2f811b79, see that commit for the explanation.
2021-10-06 10:16:44 +02:00
Ivan Grokhotkov
4ae1b06082 cmake: kconfig: don't add empty entries to kconfigs list 2021-10-06 10:16:35 +02:00
Ivan Grokhotkov
0ad89536ce build system: quote values in __build_write_properties 2021-10-06 10:15:10 +02:00
Ivan Grokhotkov
5a6e27b8a1 build system: quote values in __component_write_properties 2021-10-06 10:15:02 +02:00
Ivan Grokhotkov
e39d3b2160 build system: project: quote linker map file argument 2021-10-06 10:14:55 +02:00
Ivan Grokhotkov
83a7ecc7c3 build system: quote LD script search paths in target_linker_script 2021-10-06 10:14:46 +02:00
morris
0f7b90d205 cmake: don't treat the readme file as a component 2021-09-24 10:56:58 +08:00
Ivan Grokhotkov
8f0ee18931 Merge branch 'feature/clang_toolchain_compat' into 'master'
Build system: minimal changes for clang compatibility

See merge request espressif/esp-idf!15168
2021-09-23 08:19:09 +00:00
simon.chupin
844dd5075f Tools: make idf_size work with overflow
Closes https://github.com/espressif/esp-idf/issues/6914
closes https://github.com/espressif/esp-idf/issues/4234
2021-09-16 14:12:46 +02:00
Ivan Grokhotkov
6bba3ea034 cmake: only add GCC-specific flags when building with GCC
There are probably more GCC-specific flags in component CMakeLists.txt
files; these are just the one being added for all the files.
2021-09-16 11:07:54 +02:00
Ivan Grokhotkov
06c0b8a5d0 cmake: don't search for toolchain files in component directory
This feature was added when we thought that target components might be
added out of IDF tree. That never became possible, and with recent
changes in IDF architecture it is unlikely that this feature will be
necessary any time soon. Remove it, simplifying the code.
2021-09-16 10:54:27 +02:00
Ivan Grokhotkov
14e600801e cmake: allow selection of clang based toolchain
This is an experimental feature intended at the moment for ESP-IDF
developers only.

If IDF_TOOLCHAIN=clang environment variable or CMake variable is set,
use toolchain-clang-esp32xx.cmake instead of toolchain-esp32xx.cmake.

These changes aren't sufficient to actually build any IDF project with
clang; subsequent commits add a few workarounds required to do this.

Toolchain files are added for esp32 and esp32s2, which are the targets
supported in our llvm-project fork at the moment.
2021-09-16 10:54:27 +02:00
Sergei Silnov
37b791e242 Build System: Don't track dependencies.lock 2021-08-30 13:23:23 +02:00
Jakob Hasse
376559d14c [cmake]: fixed FPGA setting during early build 2021-08-26 10:11:56 +08:00