Commit Graph

53 Commits (f55f9d36fbab96628f6b8ad7141b20ceb25483d3)

Author SHA1 Message Date
Jimmy Brisson b60729d147 Move filter dot into exporter base class 2018-03-27 14:30:36 -05:00
Jimmy Brisson bd5b34f59c Correct exporter clean behavior 2018-02-21 09:28:24 -06:00
Jimmy Brisson 8d7311d38d Avoid blowing away .mbedignore files in exporters 2018-02-16 14:45:55 -06:00
Jimmy Brisson cca4425af6 Python2+3: iteritems -> items 2018-02-05 11:04:36 -06:00
Jimmy Brisson e9d3166a5e Expose present get_compile_options API in Toolcahins 2017-09-11 13:20:32 -05:00
Jimmy Brisson 78a1eddf61 Merge pull request #4804 from johanstokking/fix/4802-copy-static-files
Copy static files only
2017-07-27 09:47:32 -05:00
Jimmy Brisson d2ad8867e7 Merge pull request #4742 from theotherjimmy/deprecate-exporters
Deprecate unsupported exporters
2017-07-27 09:40:12 -05:00
Johan Stokking 382e030bdc Use immutable tuple instead of mutable list
Signed-off-by: Johan Stokking <johan@stokking.nl>
2017-07-25 13:48:53 +02:00
Johan Stokking b0f5b3d768 Copy static files only
Signed-off-by: Johan Stokking <johan@stokking.nl>
2017-07-24 20:39:28 +02:00
Jimmy Brisson 39f8a7d261 Create deprecated exporter class decorator 2017-07-11 11:14:52 -05:00
Jimmy Brisson 81446f69be Generate exporter suppored lists when needed 2017-07-07 14:45:32 -05:00
Jimmy Brisson 43bd303db3 Add `mbed new .` output to export 2017-04-26 09:52:07 -05:00
Jimmy Brisson fcef9a7c50 Add post-build hook white-list to exporters
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.
2017-03-02 15:01:14 -06:00
Martin Kojtal 57ec7493f2 Merge pull request #3608 from ilg-ul/jinja
Exporters: make jinja engine strict
2017-01-26 10:32:55 +02:00
Jimmy Brisson 87ee33d56b Allow keyword arguments to jinja env from exporters gen_file 2017-01-19 08:00:03 -06:00
Liviu Ionescu 36de50d28a Exporters: make jinja engine strict
- configure the jinja Environment to raise exception when substitution
variables are not defined
- trim spaces and lines, to avoid empty lines in generated files
2017-01-18 19:31:59 +02:00
Russ Butler 06ca004bfa Fix invalid assert in exporters
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"
2017-01-12 11:25:09 -06:00
Russ Butler 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.
2017-01-10 11:42:36 -06:00
Sarah Marsh 406ddf0674 Exporter documentation 2016-11-03 11:53:23 -05:00
Sarah Marsh cc154a48cd [Exporters] Build method documentation. Removal of unused Exception classes. 2016-11-01 15:03:31 -05:00
Sarah Marsh 986af0dd5e New export-build tests.
Allows command line workflow of:
mbed import
mbed export

Also revises exporter supported target checks
2016-11-01 15:03:31 -05:00
Sarah Marsh 45ad394ca6 New build tests.
*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
2016-10-04 14:13:36 -05:00
Sarah Marsh db696f8f4a Remove progen and progen def dependencies. 2016-10-04 14:13:36 -05:00
Sarah Marsh 6fd1c77727 Refactor uvision. Add support for CMSIS project files 2016-10-04 14:13:36 -05:00
Sarah Marsh 16913b93a6 New build tests.
*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
2016-09-22 10:03:34 -05:00
Sam Grove 1f7c341a65 Merge pull request #2671 from theotherjimmy/export-getting-started
tools-exporters! - Globally add a gettingstarted.html
2016-09-16 17:28:44 -05:00
Jimmy Brisson d033070425 Add a gettingstarted.html to all exporters 2016-09-12 13:17:35 -05:00
sarahmarshy f8cae13f33 Fix uvision group naming
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.
2016-09-09 17:18:52 -05:00
Sarah Marsh 2196d50e72 Create projectfiles directory when exporting
Compatible with new c/asm/cpp flag separation.
2016-09-06 14:24:05 -05:00
Sarah Marsh 0016ddf60c progen exporter template 2016-09-06 14:24:05 -05:00
Sarah Marsh cccc5f3fca Accessing progen exporters directly 2016-09-06 14:24:05 -05:00
Jimmy Brisson 7e2ca0115b Update copyright 2016-09-06 14:24:04 -05: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
Sarah Marsh 70890620f7 Uvision and IAR working cc and asm specific defines 2016-08-04 17:05:12 -05:00
Sarah Marsh 02cdaebc95 Removed preinclude config from asm flags 2016-08-03 13:49:50 -05:00
Jimmy Brisson 209cf9f167 Add config file inculde directory when present 2016-07-29 11:38:38 -05:00
Jimmy Brisson fed50f8f18 Add missing --preinclude and -input on assembly files
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.
2016-07-29 11:02:07 -05:00
Mihail Stoyanov 74b7f9e923 mbed Online Build System support:
* 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)
2016-07-19 11:14:42 +01:00
0xc0170 f80b62ed00 exporter - fix TARGETS property via descriptors
Fixes #2183 issue.
2016-07-19 08:30:21 +01:00
Sarah Marsh b969fa5bb1 IDE build tests with progen 2016-07-15 13:25:35 -05:00
Olaf Hagendorf 7f2f0bc5c6 repairing a minor typo in exporters.py 2016-07-06 13:34:59 +02:00
Jimmy Brisson 7b83c30ba1 for file in `ls tofor file in `ls tools/export`; do sed -i tools/export/$file -e "s/MBED_CONF_ACTIVE/MBED_CONFIG_HEADER_SUPPORTED/"; done 2016-06-27 14:06:42 -05:00
Jimmy Brisson f92d3ec9be Move name of config file to one location 2016-06-27 14:06:42 -05:00
Jimmy Brisson 3a273f78f2 Create and enable exporter flag mbed_conf_active for exporters
The mbed_conf_active feature disables configuration macros on the
command line and replaces them with a preinclude header file
2016-06-27 14:06:42 -05:00
Jimmy Brisson a1b73c9b7e Fix typo after rebase 2016-06-27 14:06:41 -05:00
Jimmy Brisson d9b4109143 Update progen-style flags with the toolchains include mbed_conf.h 2016-06-27 14:06:41 -05:00
Jimmy Brisson 4f29483255 Update exporters to include the generated mbed_conf.h 2016-06-27 13:59:56 -05:00
Martin Kojtal 5800af11b3 Exporters - add source_relative flag
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.
2016-06-27 15:25:44 +02:00
Mihail Stoyanov 89bb38f683 Fixed exporters to support features
Unified how resources are loaded into the configuration system
(Config.load_resources) and applied it to build_api and exporters
2016-06-16 18:12:04 +01:00
Mihail Stoyanov e44566b319 Fix libraries being built with features support 2016-06-16 00:31:25 +01:00