Commit Graph

97 Commits (01f02b4b8c776d8ca45d9b3fc917db04b317d48c)

Author SHA1 Message Date
Jimmy Brisson da9c10be48 Expand build reports in the tools 2017-04-20 11:03:15 -05:00
Jimmy Brisson 7c40343e74 Fix include paths for Windows builds 2017-04-11 14:26:14 -05:00
Sam Grove cef31a7fa6 Merge pull request #4106 from theotherjimmy/fix-typo-toolchain
Fix a scoping typo in toolchains
2017-04-10 10:51:07 -05:00
Jimmy Brisson d5ecd7adf8 Fix a scoping typo in toolchains 2017-04-03 15:43:22 -05:00
Jimmy Brisson 09afe23762 Upgrade OUTPUT_EXT and use it to pick binary type
targets.json contained a key for some targets, `OUTPUT_EXT`, which I
moved to `Target`, the root of all targets. Following on that, the tools
now use this extension provided by `OUTPUT_EXT` to determine the file
type of the output executable.
2017-03-29 16:46:21 -05:00
Jimmy Brisson d20bcba89b Remove static analysis scan
An earlier patch in this series relies on the assumption that all
toolchain construction goes through `prepare_toolchain`. This is still
not the case. The only remaining user of the `mbedToolchain` object that
does not go through `prepare_toolchain` is the static analysis scanner.
It's basically dead-code at this point. I say we remove it. So this
patch removes it.
2017-03-06 18:29:46 -06:00
Jimmy Brisson fbb6f71be8 Ignore build directory from scan resources
This is a bug fix for the following bug (Github issue #437):

If two builds were run specifying a non-default build folder, the second
build would fail to link with duplicate symbols and may not fit on the
device. The root of this problem is that these non-default build folders
are not ignored by scan-resources, and therefore included in the build.

We fix this bug by ignoring the build directory passed into the tools.
2017-03-06 17:10:57 -06:00
Jimmy Brisson 1d95604275 Remove GCC_CR
It has not worked since the introduction of build profiles
2017-02-16 15:03:24 -06:00
Jimmy Brisson c0f27597ec Add redirect support to toolchains
We create an API for generating the linker flags needed to redirect
functions in an application
2017-02-08 17:34:35 -06:00
Martin Kojtal 7316b89c1d Merge pull request #3600 from theotherjimmy/refactor-sys-libs
[toolchains] Refactor sys libs
2017-01-26 10:30:27 +02:00
Jimmy Brisson 81df273849 Move sys_libs into mbedToolchain class 2017-01-17 11:57:35 -06:00
Jimmy Brisson c14a5b94ec Add docstrings 2017-01-13 12:01:26 -06:00
Jimmy Brisson 39a5caacab Refactor scan resources to account for base_paths 2017-01-13 12:01:19 -06:00
Martin Kojtal 9a61ef0368 Fix DEBUG target keyword for GCC_ARM
Fixes mbed-cli#402 bug. -g flag was changed to g3, thus this caused
a regression in producing TARGET_DEBUG for GCC_ARM.
2016-12-06 11:32:45 +00:00
Jimmy Brisson c3915215e4 Allow dependency parsing to fail, gracefully continuing 2016-11-10 10:04:36 -06:00
Brian Daniels 0e4b841cb3 Removing need for memap to printed through toolchains 2016-10-11 18:24:01 -05:00
Brian Daniels 655c37715c Handling output of parallelized test building.
This makes use of the reports generated by the building of tests to
prevent output from interleaving when the build is parallelized. This
required some changes to memap to return a generated string from
the 'generate_output' function. I also had an option to stop the prints
from memap to prevent text from interleaving
2016-10-11 15:34:20 -05:00
Brian Daniels 14aff069b1 Modifying behavior of 'silent' option in toolchains
The 'silent' option has always been present in the toolchains API, however
it did not actually stop anything from being printed. Instead, it just
changed what was added to the build log. This make the 'silent' stop all
prints, but ensures that the output for the toolchain is still preserved
and accessible via the 'get_output' function.
2016-10-11 14:31:06 -05:00
Sam Grove 872363d809 Merge pull request #2854 from theotherjimmy/find-duplicates
[Tools] Find and report duplicates
2016-09-30 18:30:00 -05:00
Jimmy Brisson 5f8fbac56f Add documentation of exposed functions 2016-09-30 15:14:22 -05:00
Jimmy Brisson e012185602 Use toolchain notify for printing when finding dupes 2016-09-30 15:14:22 -05:00
Jimmy Brisson 9f7c82a37f Deduplicate find-duplicate functionality 2016-09-30 15:13:53 -05:00
Jimmy Brisson a85a384973 Add duplicate detection to project compilation 2016-09-30 15:13:53 -05:00
Jimmy Brisson e2b248a4aa Correct percent printing 2016-09-30 15:09:54 -05:00
Sam Grove 1047ab4562 Merge pull request #2834 from bridadan/memap-consolidate
[tools] Making memap output consistent across output formats
2016-09-30 14:59:31 -05:00
Jimmy Brisson 7348b0131b Add Debug or Release to labels depending on flags
This is a policy decision and it should /really/ be in the config system
ATM it's here for backward compatibility
2016-09-30 13:01:16 -05:00
Jimmy Brisson fd04ea2125 Added property based regression test to travis 2016-09-29 10:20:05 -05:00
Jimmy Brisson d88852d150 Replace -o with profiles 2016-09-29 10:20:05 -05:00
Jimmy Brisson ceda396e18 Add simple build profiles to toolchains 2016-09-28 17:25:24 -05:00
Brian Daniels e8b06874a3 Making memap output consistent across output formats
This commit fixes an issue where the output from memap.py was not
consistent across all output formats. This issue stemmed from the fact
that a few important calculations were being performed at output
generation time. This has been moved to the 'parse' function and saved for
future use by the 'generate' functions.

Because this commit saves more data to the MemapParser instance, there
were some name collisions. The public member 'mem_summary' has been
renamed to 'mem_report'. 'mem_report' contains the data structure used by
the json generator. This includes both the section data and the memory
summary. The 'mem_summary' member now just contains the summary. The
summary includes total allocated heap, total static RAM, etc.
2016-09-27 16:51:16 -05:00
Sam Grove 28f9b27918 Merge pull request #2788 from theotherjimmy/print-percent
Print percent complete when building
2016-09-24 16:48:03 -05:00
Jimmy Brisson 2fe201cf10 Print percent complete when building 2016-09-22 15:10:03 -05:00
Jimmy Brisson d4f9820577 Refactor Target and Config away from global variables 2016-09-20 16:09:22 -05:00
Sam Grove a6f4b58405 Merge pull request #2675 from sarahmarshy/toolchain_path_check
Revise checking toolchain path
2016-09-16 17:31:41 -05:00
Sarah Marsh 8670598115 Abstract check_executable added 2016-09-13 16:26:58 -05:00
Sarah Marsh ab92a5ace2 Toolchain check generic in mbedToolchain 2016-09-13 13:59:11 -05:00
Sarah Marsh 61dee45dca Revise checking toolchain path 2016-09-12 18:54:39 -05:00
Jimmy Brisson f48aa248b7 Correct adding repo_files 2016-09-12 16:19:55 -05:00
Tony Wu c50b5c6651 Tools - Fix fill section size variation
The linking order of object files affects the actual code placement,
which in turn affects the size of fill section due to the number of
zeros required to maintain appropriate data/code alignment may change.
This is observed when building on Mac and Linux host.

example: mbed compile -m K64F -t GCC_ARM (build 1)
+---------------------+-------+-------+-------+
| Module              | .text | .data |  .bss |
+---------------------+-------+-------+-------+
| Fill                |   120 |     4 |  2381 |
| Misc                | 28755 |  2216 |    84 |
| features/frameworks |  4236 |    52 |   744 |
| hal/common          |  2745 |     4 |   325 |
| hal/targets         | 12116 |    12 |   200 |
| rtos/rtos           |   119 |     4 |     0 |
| rtos/rtx            |  5721 |    20 |  6786 |
| Subtotals           | 53812 |  2312 | 10520 |
+---------------------+-------+-------+-------+

example: mbed compile -m K64F -t GCC_ARM (build 2)
+---------------------+-------+-------+-------+
| Module              | .text | .data |  .bss |
+---------------------+-------+-------+-------+
| Fill                |   128 |     4 |  2381 |
| Misc                | 28755 |  2216 |    84 |
| features/frameworks |  4236 |    52 |   744 |
| hal/common          |  2745 |     4 |   325 |
| hal/targets         | 12116 |    12 |   200 |
| rtos/rtos           |   119 |     4 |     0 |
| rtos/rtx            |  5721 |    20 |  6786 |
| Subtotals           | 53820 |  2312 | 10520 |
+---------------------+-------+-------+-------+

This patch fixes fill section size variation by sorting object
files before passing to linker.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2016-09-10 08:30:01 +08:00
Sarah Marsh f6a15fd3c8 Refactor export subsystem
Makes several broad changes:
 - removes dead code that dealt with the online build system
 - replaces export function with a much simpler one that:
   - does not copy any sources
   - the zip file hits the disk
   - the mbed_config.h hits the disk
   - the project files hit the disk
   - nothing else hits the disk
 - exporters use Resource object scanned with a toolchain
 - progen exporters don't optionally build a project instead they have a
   build function that may be called afterwards
 - much of the code passes pylint (have a score of 9 or above):
   - project.py
   - project_api.py
   - export/__init__.py
   - export/exporters.py
   - test/export/build_test.py
2016-09-06 14:24:00 -05:00
Sam Grove fe1f2b6066 Merge pull request #2563 from sarahmarshy/path_error_rev
Check if executble exists
2016-08-26 18:05:50 -05:00
Sarah Marsh bd0acdc527 Check executable 2016-08-26 17:32:57 -05:00
Sam Grove ea3526d657 Merge pull request #2418 from sarahmarshy/path_error_rev
Readable error when toolchain paths not set. Allow IAR and ARM toolchains to be set in user's PATH.
2016-08-26 13:10:48 -05:00
Sarah Marsh cd229bacc3 Allow users to set armcc and iccarm in path.
Raise exceptin instead of exit.
Corrected error for arm-none-eabi-gcc/g++ set in path.
2016-08-17 09:14:05 -05:00
Jimmy Brisson cb5e61028d Format and add docstrings to memmap 2016-08-16 11:48:39 -05:00
Sarah Marsh 51245ceb7a Exit non-zero for invalid toolchain path 2016-08-10 12:04:11 -05:00
Sarah Marsh 1445886844 Readable error when toolchain paths not set.
Fixes #2360.

New error:
[Error] Toolchain path does not exist for IAR.
Current value: /default/path/that/doesnt/exist
(System exit before any build system calls)
2016-08-10 11:52:45 -05:00
Sam Grove 9d1fbda9fe Merge pull request #2377 from sarahmarshy/flag_revision
Pass only relevant defines at each stage of compilation
2016-08-04 22:10:58 -05:00
Mihail Stoyanov 88564a9ac3 Differentiate ASM and CXX symbols as they are not treated the same in ARMCC and IAR compilers 2016-08-04 18:19:08 +01:00
Mihail Stoyanov a4c3469b7b Empty the multiprocessing queue before terminating it 2016-08-02 16:53:58 +01:00