Wykres commitów

514 Commity (57189ec1a7d90edc9d7f927e8142ced64f18ae60)

Autor SHA1 Wiadomość Data
Alexey Lapshin 04b73368e5 fix(tools): do not use builtin memcpy/memset/strcpy on xtensa chips
Closes https://github.com/espressif/esp-idf/issues/13228
2024-02-27 02:09:54 +08:00
Omar Chebib f27d65c7bc Merge branch 'contrib/github_pr_12852' into 'master'
cmake: correct the parameter annotation of idf_build_set_property (GitHub PR)

Closes IDFGH-11752

See merge request espressif/esp-idf!28067
2023-12-22 10:41:24 +08:00
Augtons a8ea638cde
cmake: correct the parameter annotation of idf_build_set_property
The value parameter should be marked as [in] instead of [out], as it is used to set the property value, not to get it.
2023-12-21 18:30:57 +08:00
Ivan Grokhotkov 7265febc31 Merge branch 'bugfix/macos_build_linux_target_misc' into 'master'
Misc fixes for IDF_TARGET=linux on macOS host

See merge request espressif/esp-idf!28015
2023-12-21 17:55:24 +08:00
Mahavir Jain 7fc9b09c34
fix(cmake): for embedded data length use .long attribute
For Linux builds if the embedded data length exceeded 16-bit value then
the build used to fail with following error:

build/x509_crt_bundle.S: Assembler messages:
build/x509_crt_bundle.S:4201: Warning: value 0x1056e truncated to 0x56e

GNU ASM for X86 systems treats .word attribute as of size 2 bytes, this commit
uses .long attribute to take the size to 4 bytes.
2023-12-20 13:59:19 +05:30
Ivan Grokhotkov b56bb7d8e4
fix(cmake): don't emit section directive when embedding files on host 2023-12-19 23:00:48 +01:00
KonstantinKondrashov 8001fabfbe feat(tools): Improves a cmake message for updating git submodules
Closes https://github.com/espressif/esp-idf/issues/12776
2023-12-12 16:00:04 +08:00
kohait00 9beda4ce48 feat(tools/cmake): Added VERSION argument to the project() macro in cmake
This commit enables the standad VERSION argument for the project() macro
in ESP-IDF. The VERSION argument is compilant with the requirements of
cmake 3.16. This commit also adds new test cases for verifying the
validity of the version argument.

Merges https://github.com/espressif/esp-idf/pull/12461

Co-authored-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2023-12-05 11:29:43 +01:00
wanglei 076aefce74 feat(esp32c5): add esp32c5 target in kconfig and tools 2023-11-28 16:14:17 +08:00
Jakob Hasse ed5a7dfa82 docs: Added C documentation page
Closes https://github.com/espressif/esp-idf/issues/12439
Closes https://github.com/espressif/esp-idf/issues/12001
2023-11-13 10:47:15 +08:00
Ivan Grokhotkov 8171b22c40
change(version): Update version to 5.3.0 2023-10-27 03:06:55 +02:00
Roland Dobai 51b104deac Merge branch 'feat/all_components' into 'master'
feat(tools): display hints for projects with trimmed down list of components

Closes IDF-8005 and IDF-8316

See merge request espressif/esp-idf!26297
2023-10-16 17:40:12 +08:00
Peter Dragun 9acf412a07 feat(tools): move uf2 generation to esptool 2023-10-09 15:38:30 +02:00
Frantisek Hrbata dba7d11096 feat(tools): export information about all components in __COMPONENT_TARGETS
Add new "all_component_info" dictionary into the
project_description.json file. It contains information about all
registered components presented in the __COMPONENT_TARGETS list.
Since components in this list are not fully evaluated, because only the first
stage of cmakefiles processing is done, it does not contain the same information
as the "build_component_info" dictionary. The "type", "file" and "sources" variables
are missing.

Most of the properties are already attached to the component target, so
this only adds INCLUDE_DIRS property to the target during the first cmakefiles
processing stage.

The "all_component_info" dict is generated in a separate function, even
though the original function for "build_component_info" could be
adjusted. This introduces a little bit of boilerplate, but keeps it
logically separated and probably easier if we want to extend it in the
future.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-10-02 15:52:58 +02:00
radim.karnis 2b8bbe0a18 fix(build_system): Allow dots in the name of an app binary 2023-08-08 08:35:08 +02:00
Omar Chebib c98d1f1619 feat(bootloader): add the possibility to ignore extra components 2023-07-28 15:04:21 +08:00
Peter Dragun d4428ca1db feat(tools/kconfig): add initial and current versions of IDF to kconfig 2023-07-10 17:01:51 +02:00
Armando 107b84eb31 tool: added UF2 identificator for esp32c6 and esp32p4
The IDs were submitted in https://github.com/microsoft/uf2/pull/76
2023-06-14 15:29:23 +08:00
Armando 101e6a18eb esp32p4: introduce the target
Add esp32p4 target to tools and Kconfig
Create directories and files that are essential for `idf.py --preview set-target esp32p4`
2023-06-13 15:16:11 +08:00
Alexey Gerenkov d4e1935ba8 Merge branch 'feature/compiler_rt_support' into 'master'
build: Adds support for compiler-rt in Clang toolchain

See merge request espressif/esp-idf!21213
2023-06-09 04:41:34 +08:00
Alexey Gerenkov dd5880cca6 build: Add Clang toolchain file for ESP32-H4 2023-06-08 16:49:42 +03:00
Alexey Gerenkov e9345bcced build: Adds support for Clangs's toolchain compiler-rt 2023-06-08 16:49:37 +03:00
Frantisek Hrbata 56289013ba tools: extend information in project_description.json
This extends information provided in the project_description.json file.
Newly added information can be used in the SBOM generating tool and
also to improve hints regarding the the component dependency issues.

Added fields

version:
   This adds versioning to the project_description.json file,
   so it's easy to identify if it contains the required information.

project_version:
   Can be used as a version for the resulting binary e.g. `hello_world.bin`.

idf_path:
   This one is probably not necessary, but it allows tools to run even without
   esp-idf environment exported(e.g. export.sh).

c_compiler:
   The `CMAKE_C_COMPILER` value with full path to the compiler binary. This can
   be used to get information about toolchain, which was used to build the project.

common_component_reqs:
   List of common components as presented in cmake's __COMPONENT_REQUIRES_COMMON
   and set in tools/cmake/build.cmake:__build_init().

build_component_info:
   Detailed information about components used during build. It's a
   dictionary with the component name as a key and each component has
   a dictionary with detailed information. Following is an example for
   the efuse component.

   "efuse": {
       "alias": "idf::efuse",
       "target": "___idf_efuse",
       "prefix": "idf",
       "dir": "/home/fhrbata/work/esp-idf/components/efuse",
       "type": "LIBRARY",
       "lib": "__idf_efuse",
       "reqs": [],
       "priv_reqs": [ "bootloader_support", "soc", "spi_flash" ],
       "managed_reqs": [],
       "managed_priv_reqs": [],
       "file": "/home/fhrbata/work/blink/build/esp-idf/efuse/libefuse.a",
       "sources": [ "/home/fhrbata/work/esp-idf/components/efuse/esp32s3/esp_efuse_table.c", ... ],
       "include_dirs": [ "include", "esp32s3/include" ]
   }

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-05-30 12:07:20 +02:00
Frantisek Hrbata 483b7ae763 tools: fix make_json_list to return empty json list for empty cmake list
Currently make_json_list() returns '[ "" ]' for empty cmake list. Fix this
so empty json list is returned instead.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-05-30 12:07:20 +02:00
Zim Kalinowski 369d8a0f8a build system: more accurate error information for git_describe
Closes https://github.com/espressif/esp-idf/issues/9071

See merge request espressif/esp-idf!23891
2023-05-23 18:30:01 +02:00
Alexey Lapshin e634137a03 Merge branch 'feature/libstd++-use-posix-pthread' into 'master'
tools: enable libstd++ to use idf posix-semaphores

Closes GCC-305 and IDFGH-9209

See merge request espressif/esp-idf!23588
2023-05-10 20:06:16 +08:00
Jakob Hasse bc7a7e8451 Merge branch 'bugfix/cmake_cxx_language_standard' into 'master'
cmake: Corrected setting of C++ language standard

See merge request espressif/esp-idf!23520
2023-05-10 10:28:43 +08:00
Jakob Hasse 0244c24c8d cmake: Corrected setting of C++ language standard
* reverted old faulty mechanism to set different
  standard according to the toolchain
* Using -std=gnu++2b now for both gcc and clang
* Added a build test app to check the C++ standard in IDF
* Updated english docs to reflect the change to C++23
2023-05-09 10:09:19 +08:00
Marius Vikhammer d17248ecdf build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES
ADDITIONAL_MAKE_CLEAN_FILES is deprecated and only worked with make.
Replaced with the new ADDITIONAL_CLEAN_FILES (CMake 3.15) which also works with ninja.
2023-05-08 15:51:48 +08:00
Alexey Lapshin f51b55dabb tools: enable libstd++ to use idf posix-semaphores
Closes https://github.com/espressif/esp-idf/issues/10598
2023-05-05 13:37:49 +08:00
Kevin (Lao Kaiyao) 6b5077f2d7 Merge branch 'refactor/remove_esp32h4_target' into 'master'
esp32h4: removed esp32h4 target (stage 2)

Closes IDF-7237, IDF-7238, and IDF-7239

See merge request espressif/esp-idf!23179
2023-04-24 23:34:19 +08:00
Ivan Grokhotkov 39580dd08c
version: update to v5.2.0
Starting IDF v5.2 development
2023-04-23 21:52:21 +02:00
laokaiyao bf2a7b2df6 esp32h4: removed esp32h4 related codes 2023-04-23 12:03:07 +00:00
laokaiyao b16ed57b2e esp32h4: removed esp32h4 related files 2023-04-23 12:03:07 +00:00
Jakob Hasse d82eb6942c Merge branch 'contrib/github_pr_11025' into 'master'
Enable support for C++23 in esp-idf (GitHub PR)

Closes IDFGH-9684

See merge request espressif/esp-idf!23144
2023-04-19 15:53:46 +08:00
Darian Leung 9509c14510 build: Add --longcalls option to clang builds of xtensa targets
This commit adds the --longcalls option to UNIQ_CMAKE_ASM_FLAGS for clang
builds of xtensa targets to prevent "dangerous relocation" errors.
2023-04-18 15:51:38 +08:00
Jakob Hasse 8f7a076619 cmake: C++23 only when not using clang 2023-04-14 17:57:01 +08:00
Djordje Nedic 3e0f612a7e tools: Move out idf_size.py in favour of using the esp-idf-size package
This commit removes all idf_size.py files and references to them and adds esp-idf-size as a dependency and adequate wrappers to avoid breaking changes.
2023-03-27 19:40:33 +02:00
0xFEEDC0DE64 a96f5bd5b0 Enable support for C++23 in esp-idf 2023-03-20 17:01:40 +01:00
Frantisek Hrbata a558ad506e tools: fix custom sdkconfig renaming in set-target
Currently the set-target has sdkconfig file name hardcoded to the
default one and doesn't honor custom config paths or names.
IMHO the only place where we can really now the config file name
is in cmake. But also the config should be really renamed only if
the set-target action is running.

This moves the config file renaming into cmake and it's performed only
when _IDF_PY_SET_TARGET_ACTION env. var. is set to 'ON'. This should
hopefully guarantee that it's really renamed only while set-target is
running.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-03-08 16:45:55 +01:00
Frantisek Hrbata 1ca9e63e79 tools: add target consistency checks to cmake
Extend target checks in cmake, in case it's run directly and not via
idf.py or if idf.py misses something. This may happen
for example if cmake variables are set in project's CMakeLists.txt.

Some clean-ups are included along with the new checks and tests.

1. __target_check() function is removed. IIUC it should never fail,
   because the selected target is explicitly passed as environmental
   variable to kconfgen. Meaning the IDF_TARGET from environment variable may
   not be actually used in kconfgen if IDF_TARGET is already set it cmake cache.
   Note that the IDF_TARGET environment variable used for kconfgen is not
   based on the actual IDF_TARGET environment variable set for idf.py, but
   rather on the value set in __target_init() with

	set(IDF_TARGET ${env_idf_target} CACHE STRING "IDF Build Target")

   My understanding is that the original check was introduced to handle
   situation, where IDF_TARGET was already set in cmake's cache and
   the IDF_TARGET from environment variable was different. Since
   the kconfgen would use the original environment variable(not
   explicitly passed as it is now) the IDF_TARGET in cmake and in
   sdkconfig could differ. IOW I think the original check was introduced
   to cope with the following cmake behaviour

	set(VARIABLE "value1" CACHE STRING "test variable")
	set(VARIABLE "value2" CACHE STRING "test variable")
	message("Variable value: ${VARIABLE}")
	output: Variable value: value1

2. I scratched by head how it is possible that the following code
   in __target_check()

   	if(NOT ${IDF_TARGET} STREQUAL ${env_idf_target})

   could fail if IDF_TARGET is not set. For example in clean project

	IDF_TARGET=esp32 idf.py reconfigure

   Here env_idf_target==esp32 and IDF_TARGET is not set, so I would
   expect that cmake will fail with error message that the cache
   and env target do not match. The thing is that the variable
   evaluation is done before the if command, so it actually
   sees this

   	if(NOT  STREQUAL esp32)

   which is false and the error is not printed. It can be seen
   with 'cmake --trace-expand' command. I don't know if this
   was used on purpose or it worked just as a coincidence, but
   I find it very confusing, so I added explicit check if the
   IDF_TARGET is defined before the actual check. Same for
   CMAKE_TOOLCHAIN_FILE.

3. Error messages are not formated(line-wrapped) by cmake's markup
   so it's easier to check the output in tests.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-03-08 16:45:47 +01:00
Frantisek Hrbata 0d859f2786 tools: move target guessing into cmake
The _guess_or_check_idf_target() function has sdkconfig and sdkconfig.defaults
file names hardcoded. Since config file names may be specified with SDKCONFIG
or SDKCONFIG_DEFAULTS cmake vars, directly in CMakeLists.txt or passed in with
the -D cmake option, they are not respected.

Problem is when SDKCONFIG or SDKCONFIG_DEFAULTS is set in
CMakeLists.txt. While idf can detect cmake vars passed through it
to cmake via the -D option, detecting SDKCONFIG and SDKCONFIG_DEFAULTS
vars settings in CMakeLists.txt would require to parse it. This seems
like error prone approach. Also if the vars defined by the -D option
are passed directly to cmake, not via idf, they will not be visible to idf.

It seems reasonable to move the logic into cmake, where we know the correct
SDKCONFIG and SDKCONFIG_DEFAULTS values. So the IDF_TARGET detection/guessing
is moved into targets.cmake, where the IDF_TARGET is actually set. The target
is guessed based on the following precendence.

1) $ENV{IDF_TARGET}
2) IDF_TARGET
3) SDKCONFIG
4) sdkconfig
5) SDKCONFIG_DEFAULTS if non-empty or
   $ENV{SDKCONFIG_DEFAULTS} if non-empty or
   sdkconfig.defaults
6) esp32

All config files referred in $ENV{SDKCONFIG_DEFAULTS} and SDKCONFIG_DEFAULTS
are searched, compared to the current behaviour. First target found in the
above chain is used.

The original _guess_or_check_idf_target() is renamed to _check_idf_target() and
used for the target consistency checks only.

The get_sdkconfig_filename() helper is now used to get the sdkconfig file
for consistency checks. It looks in SDKCONFIG specified with the -D
option and project_description.json.

With this change config full paths are reported in messages, so it's clear
e.g. from which config the target was guessed from or which config has
consistency problem. test_non_default_target.py was adjusted to this
change and also new test for testing the IDF_TARGET guessing was added.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-03-08 16:37:58 +01:00
Alexey Lapshin 2ef6215621 tools: change esp32h2 march to rv32imac_zicsr_zifencei 2023-02-22 05:33:03 +00:00
Alexey Lapshin 61a7342acd tools: add riscv zicsr/zifencei because they were separated from i
https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/aE1ZeHHCYf4
2023-02-22 05:33:03 +00:00
Alexey Lapshin c5ae3c67f1 Revert "tools: bypass atomic instruction variant for esp32c6 temporarily"
This reverts commit 08f05420c0.
2023-02-22 05:33:03 +00:00
Alexey Lapshin 5389ac4e04 tools: cmake: ignore linker RWX segment warnings 2023-02-22 05:33:03 +00:00
Peter Dragun 3e3533f918 feat(idf_monitor): move idf_monitor to separate repo 2023-02-03 11:20:15 +01:00
wuzhenghui 0cbb4227b2 feature: add build framework support 2023-02-01 17:57:25 +08:00
Angus Gratton d89652b382
build system: Add idf_component_add_link_dependency function, use for spi_flash overriding 2022-12-16 16:26:44 +01:00
Fu Hanxi 17224f3254 component manager: add build property `DEPENDENCIES_LOCK`
closes https://github.com/espressif/esp-idf/issues/9394
2022-12-13 15:25:19 +08:00