Commit Graph

68 Commits (72582b0622ada8b9c82fa5616d8200cf519ae8e6)

Author SHA1 Message Date
Brian Daniels fb6fcc5324 Only enable uvision postbuild when in a non-zipped exported project.
Projects that are zipped are typically from the online compiler or they
are meant to be used in a separate environment. Since the postbuild
script requires the Mbed OS tools to present in the project, we will
disable the postbuild script when the project is exported to a zipped
project.
2019-04-09 14:10:38 -05:00
Brian Daniels 3b4a463dce Move all generated file paths to FileRefs in the exporters.
The FileRefs allow you to preserve the correct file paths in the online
compiler. It also allows you to preserve the correct file paths for
generated files.
2019-04-08 13:07:12 -05:00
Martin Kojtal e665df9c47
Merge pull request #10045 from bridadan/uvision_exporter_fixes
Uvision exporter fixes for Python 3, CPM updates, and Windows path issues
2019-03-18 08:12:47 +01:00
Artturi Ramanen 19562fff30 Selectively append changes to exported config files
In case of a non-overwriting change to an exported config file
the previous logic appended a new block of text to the previous file
every time the to-be-written block of text was not exactly matched.

This parses the old config file and the to-be-written changes into
sets, which can then be compared. If all of the incoming lines are
found in the old config file set, no changes are made. If some
incoming lines are not found in the old config file, only these are
appended.
2019-03-15 12:07:02 +02:00
Brian Daniels 00f204fce5 Ensure all exported paths use Posix style separators.
mbed_config.h is a file that is placed in your project root when you
export. This allows the configuration to be used by your IDE. When this
file already exists (due to a previous export), it changed the compiler
include option on Windows from "-include mbed_config.h" to "-include
.\mbed_config.h". The "\" character was interpreted as an escape
character "\m" and broke the build. This converts all resource paths to
use the Posix path separator "/" before writing project files to avoid
this issue.
2019-03-11 19:09:08 -05:00
Martin Kojtal e59166289f
Merge pull request #9756 from vmedcy/psoc6-cmake-export
PSOC6: enable export to CMake
2019-02-20 09:39:35 +01:00
Volodymyr Medvid cf0ea92104 tools/export: move hex_files selection to base Exporter class
CMake and makefile exporters share a common logic for hex file
selection. Factor it as a common property in the base class
to avoid code duplication.
2019-02-19 20:03:06 +02:00
Martin Kojtal 195965fd5e tools: move string description after import modules 2019-02-19 10:49:04 +00:00
Martin Kojtal c8f698ca36 tools: add license headers 2019-02-15 13:32:45 +00:00
Jimmy Brisson 0924d6618e Fix a few flag-related things 2018-08-08 09:52:49 -05:00
Jimmy Brisson 9f00a9be70 Fix python3 compatibility of exporter base class 2018-08-08 09:07:58 -05:00
Jimmy Brisson 3b7a5bb35e Filter libraries by extension in exporters 2018-07-16 14:11:09 -05:00
Jimmy Brisson 6a87510192 Correct several exporter uses of file_basepath with a dedupe 2018-07-16 14:11:08 -05:00
Jimmy Brisson de913e1ea2 Improve resources API to include more use cases 2018-07-16 14:11:08 -05:00
Jimmy Brisson 9a3ad69ee9 Ensure that files generated have a directory 2018-07-12 10:27:14 -05:00
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