Commit Graph

445 Commits

Author SHA1 Message Date
KonstantinKondrashov
1f9260d790 all: Apply new version logic (major * 100 + minor) 2022-11-03 08:36:23 +00:00
Roland Dobai
40b48a5393 Merge branch 'tools/idf_py_size_output_file_opt' into 'master'
tools: Add --output-file argument to idf.py size commands

Closes IDF-5954

See merge request espressif/esp-idf!20354
2022-10-10 15:54:00 +08:00
Alexey Lapshin
e6f7b1a3a0 tools: cmake: check tool supported version with idf_tools.py 2022-10-03 19:01:32 +04:00
Djordje Nedic
09e61e8a23 tools: Add --output-file argument to idf.py size commands
This commit ads the corresponding --output-file option from idf_size.py to idf.py.

This is needed because piping the idf.py size output to a file would result in CMake output being present in the file as well.
2022-09-27 15:41:36 +02:00
Roland Dobai
d08898aabc Merge branch 'fix/tools-gdbinit-with-elf-symbols' into 'master'
tools: fixed elf symbols load if gdbinit specified

Closes IDF-4991 and GCC-246

See merge request espressif/esp-idf!18089
2022-09-26 16:20:19 +08:00
Alexey Lapshin
29655fe22a tools: fixed elf symbols load if gdbinit specified
ROM and bootloader symbols add to use in GDB (via 'idf.py gdb')
2022-09-21 22:39:03 +04:00
Rocha Euripedes
819dae8008 Merge branch 'feature/mqtt_cmakefile_cleanup' into 'master'
Mqtt:  Cmakelists.txt file simplification.

See merge request espressif/esp-idf!19966
2022-09-21 15:21:07 +08:00
Ivan Grokhotkov
adcf07b3b8
cmake: strip -D prefix from COMPILE_DEFINITIONS property values 2022-09-20 11:35:46 +02:00
Ivan Grokhotkov
c392c06216
cmake: remove -D prefix from COMPILE_DEFINITIONS property
Unlike COMPILE_OPTIONS, COMPILE_DEFINITIONS CMake property assumes
values without the -D prefix, such as NAME or NAME=VAL.
Previously, IDF build system was passing COMPILE_DEFINITIONS build
property to CMake COMPILE_OPTIONS property, so -D prefix was not
a problem.
Now that COMPILE_DEFINITIONS CMake property is used, -D prefix has
to be removed.

(Note that this doesn't affect 'target_compile_definitions' function,
which strips -D prefix before adding the definition to the property.)
2022-09-20 11:08:02 +02:00
Ivan Grokhotkov
49dedb77ac
cmake: use add_compile_definitions supported since 3.12
Now that the supported CMake version is >=3.16, this code can be
simplified.
2022-09-20 11:08:02 +02:00
Ivan Grokhotkov
237b2ce40c
cmake: use target_link_options and _directories supported since 3.13
Now that the supported CMake version is >=3.16, this code can be
simplified.

The code to deduplicate the directories can be removed since this is
handled by target_link_directories.
2022-09-20 11:08:02 +02:00
Euripedes Rocha
dd441ef713 Makes COMPONENT_LIB available for mock components
- COMPONENT_LIB wasn't available for parent scope
2022-09-19 09:11:15 +00:00
Ivan Grokhotkov
bfc17ce35a
tools: default to text output format in 'idf.py size' 2022-09-15 16:44:21 +02:00
Ivan Grokhotkov
56e6263350
cmake: enable CMAKE_COLOR_DIAGNOSTICS by default
Related to https://github.com/espressif/esp-idf/issues/4162

Setting this option informs CMake that it should pass
-fcolor-diagnostics flag to the compiler.

(Colorized build system output, like from GNU Make, is produced even
without this flag.)

Note that if the build is done using Ninja and the build output is
redirected (not a TTY), Ninja will still strip the escape codes from
the output. For the case of idf.py, this is handled in the next
commit.
2022-08-30 16:38:13 +02:00
Ivan Grokhotkov
b548d9345e Revert "Merge branch 'feature/build_color_output' into 'master'"
This reverts merge request !19330
2022-08-30 15:14:47 +08:00
Ivan Grokhotkov
41cffbb2f2
cmake: enable CMAKE_COLOR_DIAGNOSTICS by default
Related to https://github.com/espressif/esp-idf/issues/4162

Setting this option informs CMake that it should pass
-fcolor-diagnostics flag to the compiler.

(Colorized build system output, like from GNU Make, is produced even
without this flag.)

Note that if the build is done using Ninja and the build output is
redirected (not a TTY), Ninja will still strip the escape codes from
the output. For the case of idf.py, this is handled in the next
commit.
2022-08-29 11:05:15 +02:00
Djordje Nedic
5ee663d592 tools: Add CSV support to idf_size.py
This adds CSV support to idf_size.py and idf.py size actions and using the --format argument which accepts 'text', 'json' or 'csv' as input.

idf_size.py --json argument is deprecated but left to avoid a breaking change.

For idf.py size actions OUTPUT_JSON environment variable set at configuration time is overriden at target build time if --format is used.

Additionally, this commit refactors big parts of code, unified usage of json_dict and manually generated dictionaries for textual output and improves code quality in many parts.
2022-08-26 15:34:21 +02:00
Ivan Grokhotkov
d5973b8b14
build system: add 'linux' component to common requirements
'linux' component provides some of the common header files, such as
'sys/queue.h' and 'sys/lock.h'. For chip targets, it is possible to
include these files without having to add any extra requirements.
With this change, the same behavior will apply for the linux target.
2022-08-22 14:50:19 +02:00
songruojing
304a8f142d esp32c6: introduce the target
Add esp32c6 target to tools and Kconfig
Create directories and files that are essential for `idf.py --preview set-target esp32c6`
2022-08-19 11:13:02 +08:00
Ivan Grokhotkov
3b7eee3978
build: fix excluded components being passed to component manager
`__COMPONENT_TARGETS` is evaluated very early when components and
component directories are added to the build, which means that all
components (including the ones which are in EXCLUDE_COMPONENTS) have
a build system target defined. The component manager was given the
list of all known components (derived from the list of targets), not
the list of components after EXCLUDE_COMPONENTS were processed.
Because of that, EXCLUDE_COMPONENTS didn't effectively exclude the
component from the consideration of the component manager.
2022-08-08 13:09:20 +02:00
Ivan Grokhotkov
012fafb827
versions: Update version to 5.1.0 2022-08-04 09:55:43 +02:00
Alexey Lapshin
d10d57a597 build system: remove -Wno-format global option 2022-08-03 16:42:47 +04:00
Anton Maklakov
55dda77b98 build: add support ESP32-S3 in Clang build configuration 2022-06-30 14:03:26 +07:00
Zim Kalinowski
7d68098089 Merge branch 'bugfix/add_longcalls_to_asm' into 'master'
Build: Xtensa assembly files are now assembled with -mlongcalls option

See merge request espressif/esp-idf!18588
2022-06-23 14:52:41 +08:00
Omar Chebib
741b62d618 Build: Xtensa assembly files are now assembled with -mlongcalls option 2022-06-20 13:56:49 +08:00
Ivan Grokhotkov
7f971429bc
cmake: allow lower language versions when building for linux target 2022-06-17 16:44:17 +02:00
Ivan Grokhotkov
0a1e83c599
build system: use C17 and C++2a by default
Closes https://github.com/espressif/esp-idf/pull/4846
Related to https://github.com/espressif/esp-idf/issues/5003
Related to https://github.com/espressif/esp-idf/issues/6885
Related to https://github.com/espressif/arduino-esp32/issues/5859
2022-06-17 16:44:16 +02:00
Omar Chebib
33ac70a3ed G0: add a build example to check G0 dependencies 2022-06-14 15:00:53 +08:00
morris
aa3ddbc3c6 Merge branch 'test/enable_c2_target_tests' into 'master'
ci: enable target tests for ESP32-C2

Closes IDF-4989

See merge request espressif/esp-idf!18182
2022-06-03 16:41:24 +08:00
Anton Maklakov
457fc2d582 build: temporary suppress format warnings since xtensa toolchain has long type for int32_t 2022-06-02 10:15:23 +07:00
Anton Maklakov
c4b88d25b5 build: temporary suppress enum conversion warnings 2022-06-02 10:15:23 +07:00
Michael (XIAO Xufeng)
a0c2252756 build_system: fixed issue that default.target may override other custom configs 2022-06-02 11:08:59 +08:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
Sergei Silnov
89518ee86a build & config: Check requirements of managed components of main and add interface versioning 2022-05-30 14:36:22 +02:00
Sergei Silnov
07827ea362 build & config: Don't include common components on early expansion 2022-05-30 14:34:30 +02:00
Roland Dobai
c0a045793f Merge branch 'bugfix/return_idf_component_manager_build_property' into 'master'
build & config: Add IDF_COMPONENT_MANAGER build property

Closes PACMAN-356

See merge request espressif/esp-idf!18251
2022-05-28 13:58:34 +08:00
Roland Dobai
bdcb6715b5 Merge branch 'bugfix/mkdfu_flash_parameters' into 'master'
mkdfu.py: Support setting flash parameters

Closes IDF-4820

See merge request espressif/esp-idf!18269
2022-05-28 03:22:10 +08:00
radim.karnis
d2c918f407 mkdfu.py: Support setting flash parameters 2022-05-27 15:44:56 +02:00
Anton Maklakov
9cc2ce9f7c build: fallback to dwarf-4 format because of lesser binary size (dwarf-5 is by default in GCC 11) 2022-05-27 15:10:22 +07:00
Sergei Silnov
487603b51f build & config: Add IDF_COMPONENT_MANAGER build property 2022-05-26 12:48:27 +02:00
Marius Vikhammer
cf1b222cac build system: removed target component
After refactoring the target components (e.g. esp32) no longer contained any real functionality.
What remained in these components have been moved elsewhere and the component itself deleted from the
build system.
2022-05-24 09:12:59 +08:00
Marius Vikhammer
d485f6add8 Merge branch 'feature/arch_build_property' into 'master'
build-system: add property for architecture (riscv/xtensa)

Closes IDF-1754

See merge request espressif/esp-idf!18127
2022-05-24 08:46:09 +08:00
Marius Vikhammer
9362434c47 build-system: add property for architecture (riscv/xtensa)
riscv/xtensa is now a common component.
2022-05-20 09:00:32 +08:00
Djordje Nedic
11f3898e33 tools: Fix cmake variable propagation
This fixes the issue where component CMAKE variables propagate by default to the entire project, for instance compiler flags.
Useful for when you want to have component specific compiler flags or defines.

Closes https://github.com/espressif/esp-idf/pull/8806
Closes https://github.com/espressif/esp-idf/issues/8881
2022-05-16 16:55:34 +02:00
Roland Dobai
6cbe0ceaa7 Merge branch 'feature/enable_component_manager_by_default_for_pure_cmake' into 'master'
tools: Enable the component manager by default in CMake

Closes IDF-4322

See merge request espressif/esp-idf!17724
2022-05-13 15:39:01 +08:00
Sergei Silnov
69cf85e6a6 tools: Enable the component manager by default in CMake 2022-05-03 17:38:36 +02:00
Ivan Grokhotkov
47659be5b8
build system: remove lwip from common requirements
lwip was added to common requirements list to provide "sys/socket.h"
header to all components without additional requirements specified.

However, lwip pulls in a lot of dependencies on other components.
This commit removes lwip from common requirements to reduce the number
of components in G1-only apps.

To compensate for this removal, the following changes are made:
- newlib (which is a common requirement) has a public dependency on
  lwip if lwip is present in the build. This ensures that sys/socket.h
  is available as long as lwip component is included into the build.
- lwip is now a public requirement of esp-tls since esp_tls.h includes
  sys/socket.h header.
- lwip is now a public requirement o esp_http_client because
  sys/socket.h is included from esp_http_client.h
- lwip is now a private requirement of esp_wifi for "smartconfig_ack"
- lwip is now a private requirement of mqtt for socket functions
- lwip is now a public requirement of tcp_transport because
  esp_transport_tcp.h includes sys/socket.h header.
- mbedtls checks if lwip component is present in the build. If yes,
  net_sockets.c is added to the build, along with the dependency on
  lwip. Previously lwip was a public requirement of mbedtls
  unconditionally.

system/g1_components test app is updated to reflect the changes

Default public dependencies of a component before and after this
change, except common requirements:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)
- vfs (public dependency of lwip)
- esp_wifi (public dependency of lwip)
- esp_event (public dependency of esp_wifi)
- esp_netif (public dependency of esp_event)
- esp_eth (public dependency of esp_netif)
- esp_phy (public dependency of esp_wifi)

After:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)

Altogether, the following components have been always added as
public requirements to all other components, and are not added now
([breaking-change]):

- lwip
- vfs
- esp_wifi
- esp_event
- esp_netif
- esp_eth
- esp_phy

Application components now need to explicitly declare dependencies on
these components.
2022-05-02 20:47:17 +02:00
Ivan Grokhotkov
273633ee31
build system: add WHOLE_ARCHIVE component property
This component property allows including all component object files
into the executable. It is equivalent to wrapping the component
library with -Wl,--whole-archive and -Wl,--no-whole-archive flags.

Closes https://github.com/espressif/esp-idf/issues/8667
2022-04-05 18:50:20 +02:00
Marek Fiala
b5c374ae3e tools: Deprecated commands removed from idf.py
Remove deprecated commands from idf.py, but they are still kept working as cmake deprecated targets.
2022-03-25 09:08:53 +01:00
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