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.
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.
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.
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
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.
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.
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
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)