Commit graph

91 commits

Author SHA1 Message Date
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
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
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
Eyob
cdc7396f97 Make sure LD -L option is calculated correctly when the project Makefile has specified SRCDIRS components that are not directly below Makefile folder level.
For example,
SRCDIRS = comp_a  happy/comp_b  /c/dev/comp_c

Then the following are built:
build/comp_a/libcomp_a.a
build/comp_b/libcomp_b.a
build/comp_c/libcomp_c.a

But when LD is run the -L is calculated as follows
-L build/comp_a
-L build/happy/comp_b
-L build//c/dev/comp_c

This means comp_b and comp_c are not found by LD. With this change set -L is calculated correctly for comp_b and comp_c

Merges #504 https://github.com/espressif/esp-idf/pull/504
2017-04-21 11:03:07 +10:00
Anton Maklakov
06798a2b35 build: Fix for old version of git (< 1.8.5) 2017-04-11 19:14:07 +08:00
Ivan Grokhotkov
dbb6d20aac make: remove version parameter from git status porcelain option
Version parameter was added in git 2.11, while default git on macOS is
currently 2.10. According to the latest git docs, if the version
parameter is not provided, it defaults to ‘v1’, so removing it doesn’t
change the format.
2017-03-28 14:22:27 +08:00
Angus Gratton
16ef01dc69 Merge branch 'bugfix/windows_setup' into 'master'
Windows setup improvements

* Tweak Makefile to significantly reduce startup time on Windows (also reduced on other platforms, but less obvious.)
* Revise windows setup installation script to fix various issues, use latest toolchain.
* Tweak Windows config docs

See merge request !597
2017-03-28 10:49:08 +08:00
Angus Gratton
b9a06e68dd Merge branch 'bugfix/minor_fixes' into 'master'
Minor fixes and PRs cherry-picked from Github



See merge request !602
2017-03-23 17:57:28 +08:00
Angus Gratton
a3ce95e482 build system: Add explicit DEBUG_FLAGS variable, pass to assembler also 2017-03-23 10:30:42 +08:00
Edmund Huber
5272bd899b build: Check for .git, but it doesn't have to be a directory, so that esp-idf will work as a submodule
Merges #438 https://github.com/espressif/esp-idf/pull/438
2017-03-22 15:03:53 +08:00
Edmund Huber
6a58e173b8 build: pass more arguments to git describe so that it always works even if detached branch, etc
Merges #441 https://github.com/espressif/esp-idf/pull/441
2017-03-22 14:51:47 +08:00
Angus Gratton
39e728622f build system: Call 'git status' w/ machine-readable output once to check submodules
This is substantially faster than the 'git submodule status' command, has same effect. Particularly noticeable on
Windows, where 'submodule status' takes 2 seconds and 'status' takes 0.2 seconds.
2017-03-21 16:00:03 +08:00
Angus Gratton
02fdf8271d Merge branch 'feature/idf_monitor' into 'master'
Expand  'make monitor' support

New 'make monitor' idf_monitor tool for better monitor output. Running 'make monitor' will now:
* Automatically look up code addresses via addr2line and print function, source file, line number in terminal.
* Can reset the ESP32 by typing Ctrl-T Ctrl-R.
* Can run "make flash" by typing Ctrl-T Ctrl-F.
* Can run "make app-flash" by typing Ctrl-T Ctrl-A.
* If gdb stub starts, monitor will automatically run gdb and connect. When gdb exits, ESP32 resets and monitor resumes.
* Exit is still Ctrl-[

Have some more features I'd like to add (log output to file, crash dump support) but I think this is at the point of being useful.


See merge request !565
2017-03-15 10:41:08 +08:00
Angus Gratton
1544544f8a tools: New idf_monitor 'make monitor' tool for smarter monitor output 2017-03-13 09:31:45 +08:00
Ivan Grokhotkov
61c33ca24e make: don’t override TEST_COMPONENTS
When idf_monitor is launched from make, it gets modified TEST_COMPONENTS
variable which contains full paths to the test components instead of the
names. This causes TEST_COMPONENT_PATHS to be empty and the unit test
app gets built without any test components.

This change introduces an internal TEST_COMPONENTS_LIST variable which
gets set either from $(COMPONENTS) if TESTS_ALL is 1, and from
TEST_COMOPONENTS otherwise.
Bootloader makefile is also fixed to avoid propagating TESTS_ALL to the
bootloader build step.
2017-03-09 19:43:39 +08:00
Ivan Grokhotkov
bf7f0bf52c make: look for TEST_COMPONENTS in all component directories
fixes https://github.com/espressif/esp-idf/issues/354
2017-03-01 11:12:29 +08:00
Angus Gratton
d28ee9a25e build system: Account for Windows behaviour of make wildcard for some dirs
See github #166
2017-02-22 11:59:37 +11:00
Angus Gratton
e91d436e45 build system: Probable fix for errors due to bad config bypassing components
See github #311 https://github.com/espressif/esp-idf/issues/311

Should fix weird compiler/linker bugs where config says something is
enabled, but build system says it is disabled.
Particularly noticeable when WiFi/BT libraries fail to
compile/link despite being enabled.

Underlying cause is configuration file regenerating, but component
Makefiles not reevaluating.

Entirely removes the idea that we don't need to generate config for some
targets (like 'clean'). We need valid config for these targets,
otherwise they don't know which files to clean (etc).
2017-02-22 11:58:49 +11:00
Angus Gratton
cdf8836ceb build: Use greedy match for toolchain version detection (fixes macOS) 2017-01-16 15:09:20 +11:00
Angus Gratton
5c9c08eabb Toolchain detection: Fix issue when run in a clean project
If the makefile config entry hasn't been generated yet, don't test the toolchain.

Closes #226 https://github.com/espressif/esp-idf/issues/226
2017-01-13 14:09:01 +11:00
Angus Gratton
233fde166b Toolchain detection: Allow for Windows executable name and not-yet-configured toolchain path
Windows executable name based on fix suggested by @krzysztof
2017-01-13 13:55:26 +11:00
Ivan Grokhotkov
aece3d6fc6 Merge branch 'bugfix/mbedtls_tests' into 'master'
fix mbedtls unit tests, fix IDF_VER when building a project outside ESP-IDF tree

- mbedTLS test needs about 5% more time to run (in debug mode) when building with 5.2.0, compared to 4.8.5. Increase the timeout to let the test pass.
- when doing `git describe` in IDF_VER definition, `-C $(IDF_PATH)` is needed to get the version of ESP-IDF, and not the project being built (which may not even be in git)

See merge request !411
2017-01-12 09:47:15 +08:00
Ivan Grokhotkov
dd73a40556 build system: fix IDF_VER for projects outside of ESP-IDF tree 2017-01-11 22:47:44 +08:00
Ivan Grokhotkov
8d2199e36c docs: update toolchain version 2017-01-11 15:03:14 +08:00
Ivan Grokhotkov
8c26dd8d38 Merge branch 'feature/idf_version' into 'master'
build system: add IDF_VER environment variable and preprocessor define

This adds an `IDF_VER` preprocessor define which is obtained from `git describe`.

Looks like `v1.0-275-g0efaa4f` for non-release version or `v2.0` for a tagged (release) version.

See merge request !403
2017-01-11 11:34:28 +08:00
Ivan Grokhotkov
89e0ecc272 build system: add IDF_VER environment variable and preprocessor define 2017-01-11 00:24:50 +08:00
Ivan Grokhotkov
845cd09570 cxx: link against libstdc++, remove abi.cpp 2017-01-06 14:56:02 +08:00
Angus Gratton
03551ec2da build system: Add 'make monitor' target from arduino-esp32
Originally added to arduino-esp32 by @me-no-dev. It's so useful, we
want it in esp-idf as well! :)
2017-01-03 10:59:10 +11:00
Angus Gratton
578b627d9b Merge branch 'bugfix/build_system_tilde' into 'master'
Build system: Allow IDF_PATH to contain ~ or C:/

See github issues
* https://github.com/espressif/esp-idf/issues/118
* https://github.com/espressif/esp-idf/issues/166

(This is easier to work around in the build system than to document.)

See merge request !315
2016-12-22 12:14:16 +08:00
Ivan Grokhotkov
a760eb3980 Merge branch 'feature/erase_flash' into 'master'
Build system: Add `make erase_flash` target



See merge request !328
2016-12-22 09:53:25 +08:00
Angus Gratton
de8ecdd3c1 build system: Fix Windows case when IDF_PATH contains colons (ie C:/)
Closes github #166 https://github.com/espressif/esp-idf/issues/166
2016-12-22 10:36:25 +11:00
Angus Gratton
59e0f63d37 Build system: Add make erase_flash target 2016-12-20 10:00:04 +11:00
Angus Gratton
d6fafd00db Secure boot: Option for app & partition table signing to happen outside build system 2016-12-19 13:12:05 +11:00
Angus Gratton
9d8e110202 Build system: Deal with the case where IDF_PATH contains ~
See github issue https://github.com/espressif/esp-idf/issues/118

(This is easier to work around in the build system than to document.)
2016-12-16 11:30:37 +11:00
Angus Gratton
49be64a716 build system: Generate dependency make rules for assembler source
Was previously only C, C++.
2016-12-15 08:44:48 +11:00
Angus Gratton
487548e7dd Merge branch 'bugfix/build_system_linker_script_deps' into 'master'
build system: Linker scripts or binary libraries should trigger a re-link

Add binary libraries and linker scripts to the list of dependencies for the ELF file.

Fixes TW7816.


See merge request !307
2016-12-15 05:38:54 +08:00
Angus Gratton
311b7040d5 Merge branch 'feature/make_size' into 'master'
Add the size target to project Makefile

Github pull request https://github.com/espressif/esp-idf/pull/154

See merge request !305
2016-12-13 07:25:35 +08:00
Jonathan Dumaresq
2a22dc082b Add the size target to project Makefile 2016-12-13 10:03:51 +11:00
Angus Gratton
bbe1bceda8 build system: Project ELF should depend on linker scripts, binary libraries
TW#7816
2016-12-12 15:58:53 +11:00
Angus Gratton
9a378bca0e build system: Be specific about esp-idf submodule update warnings 2016-12-12 15:58:50 +11:00
Angus Gratton
506c8cd964 secure boot & flash encryption: Rework configuration options
Add UART bootloader disable options for flash encryption
2016-12-01 23:49:12 -08:00
antti
15d96eccdb add build all unit tests in project.mk and update doc 2016-11-23 11:42:12 +08:00