Commit graph

295 commits

Author SHA1 Message Date
Anton Maklakov
812a49bd0d Merge branch 'bugfix/shell_exit' into 'master'
scripts: Fix shell exit

See merge request idf/esp-idf!3908
2018-12-07 00:49:52 +08:00
Angus Gratton
8ab2f20c3a ldgen make: Use "sed -E" for extended POSIX regular expression syntax w/ BSD sed 2018-12-06 15:28:18 +11:00
Angus Gratton
ef4a4105f4 make/ldgen: Fix generation of ldgen.section_infos file when shell is bash
bash doesn't escape by default from "echo", so use "printf"

Closes https://github.com/espressif/esp-idf/pull/2797
Closes https://github.com/espressif/esp-idf/issues/2796
2018-12-06 10:20:35 +11:00
Anton Maklakov
34109c4171 scripts: Fix shell exit. Really exit from current process, not from child process 2018-12-05 21:25:16 +08:00
Ivan Grokhotkov
8a7b46aa90 Merge branch 'feature/anti_rollback_exp' into 'master'
esp32: Add firmware version to app

See merge request idf/esp-idf!3461
2018-12-05 11:10:04 +08:00
Konstantin Kondrashov
3b9cb25fe1 esp32: Add firmware version to app
Added a new structure esp_app_desc_t. It has info about firmware:
version, secure_version, project_name, time/date build and IDF version.
Added the ability to add a custom structure with a description of the firmware.

The esp_app_desc_t is located in fixed place in start of ROM secotor. It is located after structures esp_image_header_t and esp_image_segment_header_t.

app_version is filed from PROJECT_VER variable (if set in custom make file) or PROJECT_PATH/version.txt or git repo (git describe).

Add API to get app_desc from partition.
2018-12-03 16:52:04 +08:00
Renz Christian Bagaporo
a7a1c32a8e cmake, make: fix long cmd line args for ldgen 2018-12-03 12:26:38 +08:00
Angus Gratton
a34a27010b Merge branch 'feature/partition_tools' into 'master'
Partition level tools

See merge request idf/esp-idf!3355
2018-11-30 14:15:51 +08:00
Renz Christian Bagaporo
a2f63c09bf make, ldgen: remove uncessary passed target env variable 2018-11-29 13:21:31 +08:00
Renz Christian Bagaporo
5e08698039 make: use otatool and parttool for build 2018-11-28 15:57:20 +08:00
Angus Gratton
4f4edcf676 ldgen: Fix ENOENT errors on Windows with MSYS2 and GNU Make 2018-11-20 17:25:20 +11:00
Ivan Grokhotkov
99dd08943c make/ldgen: fix line continuation 2018-11-20 01:27:25 +08:00
Renz Bagaporo
63411fc556 tools: implement linker script generation 2018-11-16 12:42:02 +08:00
Ivan Grokhotkov
ccfa134533 build system: support for multiple targets 2018-11-11 21:46:02 +08:00
Anton Maklakov
1658833470 build system: Fix checking the toolchain version on Windows 2018-09-26 14:42:01 +08:00
Anton Maklakov
9a55557ad8 build system: Add a compatible old GCC flag 2018-09-20 18:53:14 +08:00
Anton Maklakov
10ec85f848 build system: and gcc8 warnings compatibility option 2018-09-20 18:53:14 +08:00
Anton Maklakov
cce02e45f1 build system: print some information about the compiler 2018-09-20 18:53:14 +08:00
Anton Maklakov
ab21644df4 toolchain: Set the supported toolchain version in a separate file 2018-09-20 18:53:13 +08:00
Angus Gratton
b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Roland Dobai
f755a0371d Use check_python_dependencies everywhere as order-only-prerequisite 2018-09-03 11:42:10 +02:00
Angus Gratton
a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Angus Gratton
1d2bcb77af make: Don't invoke check_python_dependencies in bootloader subproject 2018-08-23 08:28:57 +02:00
Angus Gratton
31ae3fe683 make: Use order-only prereq to check python dependencies 2018-08-23 08:28:57 +02:00
Roland Dobai
62cad3a7d7 Add python-future by using python requirements file 2018-08-23 08:28:57 +02:00
Angus Gratton
ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
Konstantin Kondrashov
de2b1cb02a make: Add feature to cmd 'make flash' - reset ota_data partition
Add a command `make erase_ota` - erases otadata if it there is in the
partition table otherwise error 'Partition table does not have ota_data partition'.

Closes https://github.com/espressif/esp-idf/issues/1821
2018-07-25 11:22:15 +00:00
Renz Bagaporo
70e68c99d3 Modifications for fs profiling tool 2018-07-23 05:24:33 +00:00
Konstantin Kondrashov
bec14ad8ee build: Add TEST_EXCLUDE_COMPONENTS
To exclude during the build process of unit tests some components.
2018-07-10 13:44:41 +05:00
Angus Gratton
43b6c76bba Merge branch 'feature/expansion_space_for_bootloader' into 'master'
partition_table: Moving to custom offset

See merge request idf/esp-idf!2263
2018-06-18 12:34:53 +08:00
Ivan Grokhotkov
b2f498f7da build: allow EXCLUDE_COMPONENTS to contain quotes
'dequote' macro can’t be used at this point yet, use subst directly.
Also prevent EXCLUDE_COMPONENTS from being passed to bootloader build.
2018-06-11 23:26:56 +08:00
Konstantin Kondrashov
3e0ac4db79 partition_table: Expanding the space under the bootloader
Allows you to move the partition table, it gives more space for the bootloader.
Added a new utility - parttool.py. This utility can search for the offset and/or size of the partitions by name and type/subtype. Use for getting APP_OFFSET and PHY_DATA_OFFSET.
The linker(esp32.bootloader.ld) made changes that allow you to write a custom bootloader code more.

TW14125
2018-06-08 18:47:29 +05:00
Angus Gratton
6b9784cc45 Merge branch 'master' into feature/cmake_update 2018-05-31 14:46:23 +10:00
Angus Gratton
f6cd55d2ac config: Rename mconf to mconf-idf & conf to conf-idf
These versions of conf/mconf are forked from the upstream, and the CMake system allows mconf-idf to
be installed externally on the path. So the best option is to rename.

Includes changes to Windows installer for v1.1
2018-05-29 16:34:45 +10:00
Angus Gratton
2f4079ebb2 cmake: Hide serial port settings in menuconfig when using cmake 2018-05-29 16:34:45 +10:00
Angus Gratton
036dbce3d0 Fix "undefined variable which git" warning when submodules not initialized 2018-05-14 16:07:27 +08:00
Ivan Grokhotkov
4e982d4b18 Merge branch 'feature/idf_size_report_symbols' into 'master'
Feature/idf-size: report per-archive symbols and their sizes

See merge request idf/esp-idf!1956
2018-04-20 23:55:19 +08:00
Ivan Grokhotkov
96b4a45cde Merge branch 'feature/remove_make_dependency_on_git' into 'master'
make: remove build system dependency on `git` using some hooks

See merge request idf/esp-idf!2211
2018-04-19 13:01:12 +08:00
Ivan Grokhotkov
790049b3dd build: remove some debug lines printed when V=0
With V=0, build process would print “including .../Makefile.projbuild" lines, causing problems for print_flash_cmd target.
The issue was due to the way macro expansion works in make. To delay evaluation of info function until the execution of expanded block, two dollar signs are required.
Test for print_flash_cmd target added.
2018-04-17 08:04:38 +08:00
Mahavir Jain
344e757a6a make: remove build system dependency on git using some hooks
Currently for checking IDF version and submodules existence,
build system uses `git` commands. But, it could be possible use-case
where `git` is not installed (assuming IDF is flattened in source format)
on system and build happens without any warnings.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-13 17:13:44 +05:30
Ivan Grokhotkov
bcbcdf6f99 build: fix excluding source files outside of component root
Since !2190, source files located outside of the component root
produce object files inside build directory. This change fixes
handling of COMPONENT_OBJEXCLUDE variable for such files. Tests are
added.
2018-04-12 14:28:54 +08:00
Angus Gratton
c626a8fe74 Merge branch 'feature/build_out_of_tree_srcs' into 'master'
make: Build out of tree component srcs under component build dir

See merge request idf/esp-idf!2190
2018-04-12 08:49:56 +08:00
Roland Dobai
33480d1a2c Enable -Wwrite-strings when compiling IDF's own C files 2018-04-10 08:53:33 +02:00
ndotb
765824e1fd make: EXCLUDE_COMPONENTS
Add project build variable, documentation for EXCLUDE_COMPONENTS
2018-04-08 13:07:43 -04:00
Angus Gratton
5b05a1f822 make: Build out of tree component srcs under component build dir
Strips leading ../ when generating object file paths, keeps these in sync with the source files
otherwise.

This prevents object files landing in other directories, including outside the build directory, if
the component_srcdirs start with ../
2018-04-06 13:10:19 +10:00
Anton Maklakov
f3d61015f7 build: Fix problems with building kconfig and generating sdkconfig
We had some problems:
    simultaneous compiling of kconfig in the same tree;
    attempt to use menuconfig in some examples and ut in batch mode (w/o interactive console)

Also increase debug abilities in CI:
    force non-interactive building;
    add variable DEBUG_SHELL to toggle verbosity of scripts
2018-03-28 10:39:20 +08:00
Kedar Sovani
1061170787 Create a make size-symbols target for fine grained footprint 2018-02-20 11:46:54 +05:30
Angus Gratton
853736afe2 Toolchain: Update to version 1.22.0-80-g6c4433a
Includes updated prebuilt Windows MSYS2 environment.
2018-01-10 07:49:24 +00:00
Angus Gratton
ef5d6cf64a eclipse: Add space between -I and build directory
See https://github.com/espressif/esp-idf/pull/1474
2018-01-09 09:27:00 +11:00
Alexander Sparkowsky
77adf85722 Add space between -I and path for CPPFLAGS
In order for the Eclipse CDT GCC Build Output Parser to be able to
pick up the include paths for C++/cpp files a space is required
between the compiler option (-I) and the actual path.

Merges https://github.com/espressif/esp-idf/pull/1474
2018-01-08 13:34:26 +11:00
Anton Maklakov
301751ede0 build system: Fix undefined variables
make/project.mk:315: warning: undefined variable `CC'
    make/project.mk:316: warning: undefined variable `LD'
    make/project.mk:317: warning: undefined variable `AR'
    make/project.mk:62: warning: undefined variable `MAKECMDGOALS'
    components/partition_table/Makefile.projbuild:24: warning: undefined variable `quote'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'BOOTLOADER_DIGEST_BIN'
    components/bootloader/Makefile.projbuild:123: warning: undefined variable 'SECURE_BOOTLOADER_KEY'
2017-12-28 19:21:34 +08:00
Jeroen Domburg
1be1e747c4 Add support for Makefile.componentbuild files 2017-12-20 10:35:27 +08:00
Paul Reimer
78855211fe build system: Add *.cc files to list of file extensions compiled by default
Merges https://github.com/espressif/esp-idf/pull/1318
2017-12-07 10:17:03 +11:00
Ivan Grokhotkov
0f503dee50 toolchain: update to 1.22.0-75-gbaf03c2
- enable condition variable support in gthread
- add provisions to allow emergency exception pool size to be configured
2017-11-21 19:30:52 +08:00
Alexey Gerenkov
692a890232 esp32: Adds Stack Smashing Protection Feature
These changes add posibility to enable GCC stack protector via menuconfig
for all source files in project.
2017-11-17 12:08:36 +03:00
Angus Gratton
a4cf094fd7 Merge branch 'bugfix/component_depends' into 'master'
build system: Fix COMPONENT_DEPENDS

See merge request !1530
2017-11-15 13:53:26 +08:00
He Yin Ling
8ed14791d0 make: add make command print_flash_cmd 2017-10-31 17:42:20 +08:00
YAMAMOTO Masaya
de61c096a1 Fix COMPONENT_DEPENDS 2017-10-31 17:29:20 +09:00
Angus Gratton
9c7477ef34 cxx: Add KConfig option for C++ exceptions, disable by default
Fixes https://github.com/espressif/esp-idf/issues/1072

(Additional 20KB is still used if C++ exception support is enabled in
menuconfig.)
2017-10-17 15:29:25 +08:00
Angus Gratton
63fdf998b8 Merge branch 'feature/windows_build_check_msys2' into 'master'
build system: Detect wrong Windows MSYSTEM version and warn

See merge request !1356
2017-10-13 08:50:09 +08:00
Angus Gratton
d98934d56b doc: Fix mentions of Cygwin-style paths to Unix-style
Cygwin-style is really only /cygpath/xxx and IDF doesn't support these.

Closes https://github.com/espressif/esp-idf/pull/1033
2017-10-09 14:22:53 +11:00
Angus Gratton
fc86c71574 build system: Detect wrong Windows MSYSTEM version and warn 2017-10-06 15:57:40 +11:00
Angus Gratton
85ce07e6fd build system: Fix bad partial builds after updates, sdkconfig changes
Fixes accidental regression merging 9903ea1c11.

Add test case for this kind of rebuilding.
2017-09-20 18:11:15 +10:00
Ivan Grokhotkov
7551e1d310 make,docs: update toolchain to 1.22.0-72-g4d49225 2017-09-18 10:32:44 +08:00
Ivan Grokhotkov
dfaf166436 Merge branch 'feature/toolchain-update' into 'master'
Toolchain update

See merge request !1204
2017-09-13 18:05:09 +08:00
Ivan Grokhotkov
82fb2768aa build system: trim crosstool-ng commit ID when checking version
Since 2.11.0, git does not default to 7 characters for short commit IDs,
instead automatically estimating the number of characters based on
repository size [1]. If the toolchain was compiled on a computer with
new version of git installed, commit ID will contain 8 characters, and
the check for the toolchain version will fail. As a workaround, trim the
commit ID to 7 characters when checking the version.

[1] e6c587c733
2017-09-13 17:27:47 +08:00
Ivan Grokhotkov
100889f124 build system: update the expected toolchain version 2017-09-13 17:27:47 +08:00
Ivan Grokhotkov
0205e5f2fc build system: enable C++ exceptions support by default 2017-09-13 17:27:47 +08:00
Ivan Grokhotkov
b6d82eeceb Merge branch 'feature/gcov_over_apptrace' into 'master'
esp32: Adds gcov over JTAG feature

See merge request !1117
2017-09-12 18:54:26 +08:00
Angus Gratton
fccb10c313 build system: Restore "make V=1" for verbose builds
Fix regression in 5f3cb9f9dc
2017-09-08 17:34:02 +10:00
Alexey Gerenkov
891f0db31d esp32: Adds gcov over JTAG feature
Implements function to dump GCOV data to host via JTAG.
The following functionality was added:
 - Host file I/O
 - GCOV runtime I/O stubs
 - GCOV example
2017-09-07 18:13:16 +03:00
Ivan Grokhotkov
3c3c5e69c6 build system: fix building tests specified via TEST_COMPONENTS 2017-09-05 18:07:00 +08:00
Angus Gratton
95c2aed126 build system: Remove obsolete GenerateBuildDirTarget macro eval 2017-09-05 16:28:42 +10:00
Angus Gratton
5f3cb9f9dc build system: Document --warn-undefined-variables and add a config item for it 2017-09-05 16:11:03 +10:00
Angus Gratton
8670844acf build system: Restore ifdef/ifndef in Makefiles, clean up examples build 2017-09-05 16:11:03 +10:00
Deomid Ryabkov
9903ea1c11 Add --warn-undefined-variables to MAKEFLAGS
Fix warnings where undefined vars are used.

Make Kconfig emit "FOO=" for unset bool options
To ensure make variables are always defined, even if empty.

When writing auto.conf, include symbols disabled by dependency to make sure all make variables are always defined.

Fixes espressif/esp-idf#137

Cherry-picked from https://github.com/espressif/esp-idf/pull/138
2017-09-05 16:10:46 +10:00
Angus Gratton
2806b57fc1 build system: Don't make menuconfig if "make clean" run with no sdkconfig 2017-09-04 17:40:15 +10:00
Angus Gratton
867b20837f build system: Explicitly disallow 'clean' along with non-cleaning targets
Too hard to stage the dependencies so that all clean steps complete before any build steps begin. Also, using and then
deleting and then regenerating SDKCONFIG_MAKEFILE in one pass is really hard to manage successfully.
2017-09-04 17:40:15 +10:00
Angus Gratton
c275ad4ca4 build system: Add dependencies to component clean steps
Build directory must exist, component_project_vars.mk must be generated if it is going to be.
2017-09-04 17:40:15 +10:00
Kedar Sovani
0cc59d5f67 build: Print real paths for 'ulp' build objects as well
Signed-off-by: Kedar Sovani <kedars@gmail.com>
2017-08-11 14:26:44 +05:30
Kedar Sovani
b73c5ddc7d build: Print real paths for generated build objects 2017-08-10 09:34:44 +05:30
Ivan Grokhotkov
967611cfaa Revert "bootloader: Add option to build with Link Time Optimisation enabled"
This reverts commit d1b66a08c1.
2017-07-24 05:14:31 +08:00
Angus Gratton
b88c8d19fd Merge branch 'bugfix/project_makefile_recompile' into 'master'
build system: Updating project Makefile should trigger a full rebuild

See merge request !990
2017-07-20 10:10:00 +08:00
Angus Gratton
d1b66a08c1 bootloader: Add option to build with Link Time Optimisation enabled 2017-07-19 18:31:59 +10:00
Angus Gratton
d436331faf Merge branch 'feature/component_include_order' into 'master'
build system: Order private include directories before public ones

See merge request !955
2017-07-19 12:58:50 +08:00
Angus Gratton
8d42fe3953 build system: Don't error out if an already-build project or IDF directory has moved 2017-07-19 09:10:48 +10:00
Angus Gratton
d664e32394 build system: Use component.mk for all components, refactor bootloader build
For config-only components, component.mk should now contain "COMPONENT_CONFIG_ONLY := 1"

Also refactored some of the generation of linker paths, library list. This required cleaning up the way the bootloader
project works, it's now mostly independent from the parent.
2017-07-19 09:10:48 +10:00
Angus Gratton
2571e66a29 build system: Make component searching more explicit, obsolete SRCDIRS
Each COMPONENT_DIRS directory can now either be a component directory, or a parent directory containing component
subdirectories.

When searching for components, skip any directory which doesn't have component.mk, Kconfig.projbuild, or
Makefile.projbuild in it. This helps with debugging, list-components output, etc.
2017-07-19 09:07:53 +10:00
Angus Gratton
2c1fe6663d build system: Add list-components target for debugging component discovery 2017-07-19 09:07:53 +10:00
Angus Gratton
b7fc16a408 build system: Updating project Makefile should trigger a full rebuild
Project Makefile can set CFLAGS, macro defines, etc.
2017-07-13 10:51:24 +08:00
Angus Gratton
7b565e4b25 assertions: Add "silent" option
Reduces assertion codesize overhead by approximately 35%
2017-07-12 17:29:26 +08:00
Angus Gratton
6d6fd1deda Merge branch 'feature/split_compiler_optimisations' into 'master'
build system: Split setting of compiler optimisation level from assertions on/off

See merge request !886
2017-07-06 10:47:07 +08:00
Angus Gratton
0881ba83ff build system: Order private include directories before public ones
This allows the component to override a header in a public include
directory, when only its own source files are being compiled.
2017-07-05 11:56:41 +08:00
Anton Maklakov
35609de417 CI: Move the ci-related staff to a separate directory 2017-06-30 11:57:07 +08:00
Angus Gratton
2e49249a71 build system: Split setting of compiler optimisation level from assertions on/off 2017-06-30 09:01:33 +10:00
Angus Gratton
5055290baf build system: Add idf_size.py tool for better "make size" output & analysis
Add new "make size_components" and "make size_files" targets for analysing makeup of the ELF file.

Plain "make size" output now looks like this:

Total sizes:
 DRAM .data size:   11156 bytes
 DRAM .bss  size:   22304 bytes
Used static DRAM:   33460 bytes ( 294220 available, 10.2% used)
Used static IRAM:   80480 bytes (  50592 available, 61.4% used)
      Flash code:  421463 bytes
    Flash rodata:  103824 bytes
Total image size:~ 616923 bytes (.bin may be padded larger)
2017-06-21 15:43:22 +10:00
Anton Maklakov
c5b5dd88f9 CI: Build examples in parallel
Now you can create several 'build_examples_N' jobs
    in the .gitlab-ci.yaml and get parallel execution.
2017-06-09 14:15:43 +08:00
Anton Maklakov
6606c51728 CI: Fix build_examples to cover the deep hierarchy examples
Now we have 57 building examples against 49 before.

    Also, a short message prints at the end of the job for found warnings.
2017-06-09 13:24:39 +08:00
Angus Gratton
ae05787a51 Merge branch 'bugfix/make_srcdirs_order' into 'master'
build system: Fix bug where component src subdirs needed listing before parent source dirs

See merge request !778
2017-06-06 14:37:21 +08:00
jack
fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00