We have scripts (written in python) that are run after a binary image is
created in the tools. These scripts are not really exportable, as they
are part of the tools and may include and use any bits of python code
they please. So we don't export them. This patch disables export
combinations that would not work because the post-binary hook is not
exported. A white-list is used for forward compatibility.
- configure the jinja Environment to raise exception when substitution
variables are not defined
- trim spaces and lines, to avoid empty lines in generated files
Assert that the length is greater than one rather than the value
itself. This bug was introduced in the commit:
329be06ad0 -
"exporters - group by directories in prj root"
Update exporter grouping code to group by directories in the root
of the project rather than by the parent directory of each file. This
reduces the number of groups and allows all mbed-os code to reside
in its own folder.
*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
The previous way of finding group names found the encompassing directory of each file. If the project is exported from the online compiler, this resulted in temporary folder names like tmpyKKWv_ showing up as group names.
I propose defaulting to the project name if the file is in the project root.
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
Except for IAR, it does not support the --preinclude option for assembly
files but all of the other exporters can. It was less code to remove it
in IAR than to explicitly add it in all of the other exporters.
* added/improved global chroot support
* added RESPONSE_FILES flag to support optional response files (on linux the cmd param length is 2 megabytes). Default True
* added unified handling for archive and link response file (similar to includes)
* added COMPILE_C_AS_CPP flag to support compiling of c files as cpp. Default False
* added mbedToolchain.init() for post __init__ hooks
* added caching to mbedToolchain.need_update() to reduce IO hits
* added support to identify compiler warning/error column (supports ARMCC, GCC and IAR). Errors/warnings now report file@line,col
* added global TOOLCHAIN_PATHS which allows overriding/changing of the toolchain paths. Also simplified ARM-related paths
* added target.json to mbed library release (by @0xc0170)* migrated compile_worker() to utils.py for lightweight thread initialization
* improved run_cmd() performance by removing unnecessary check about the command being executed (should be checked once in the relevant toolchain instead)
* removed remnants of Goanna support (should be reimplemented as hooks to compile/link/archive instead)
* fixes for Python 2.7 compatibility (by @0xc0170)
* fixes for Exporters (by @0xc0170)
if we work with relative sources, the flag should be set to True, otherwise
False.
This fixes wrong paths when exporting with --source argument. The exporter would
assume sources were copied, and thus reference them all within the root of the generated
project.