Commit Graph

13 Commits (820d79d84bf0cb31ab8bcecfd9e7090cdb6872cc)

Author SHA1 Message Date
Bogdan Marinescu d83dc27fcf Add configuration mechanism
This commit adds the implementation of the configuration mechanism and
applies it for two uses cases:

- building a program (build_project in build_api.py)
- building a library (build_library in build_api.py)

There's also a new method 'get_config' in build_api.py that's used to
return the configuration of a project. Currently, it's used only for
testing, the intention is to use it for the implementation of the 'mbed
config' command.

Tested with various test configurations on the "blinky" example and also
with its own set of tests (to be added in a separate commit).

'make.py' was modified to send the target *name* to build_project, as
opposed to the target *instance*. This is needed because the
coniguration mechanism allows for creating custom targets, but these
targets are not available until the configuration file
mbed_app_config.json is parsed, which happens in build_project (so
before make.py calls 'build_project'). The API of build_project didn't
change, it now accepts both target names and target instances for the
'target' argument.

Known issues:

- doesn't currently work when doing binary builds of the SDK. Currently,
  building the SDK is broken in mbed-os, so this will be added later.
- when building tests, the build process ends up calling
  'build_project', so the configuration mechanism should play well with
  tests. However, this wasn't tested.

A later commit will all documentation for the configuration mechanism.
2016-06-02 15:09:52 +03:00
Brian Daniels a333ec8ef0 Fixing issue with binary name.
There was an issue where the binary name was incorrectly set when building
from any directory that isn't the project root. This fixes that issue by
first getting the absolute path, then finding the binary name using that.
2016-05-31 12:41:12 -05:00
Martin Kojtal 583ed4320d Merge pull request #155 from bridadan/fix-binary-naming
Fixing issue where project_name was an empty string
2016-05-30 10:36:32 +01:00
Brian Daniels 6e4d74bc24 Fixing issue where project_name was an empty string 2016-05-27 12:00:26 -05:00
Brian Daniels 6dbc9601f8 Reflecting build failures in the status code of the process 2016-05-26 09:20:24 -05:00
Brian Daniels 7a627b3fdd Allowing test builds to continue if one test build fails
This ensures that a build report is produced, even if a build fails. This
allows you to see what went wrong later.
2016-05-26 09:10:17 -05:00
Brian Daniels ec2e4a1d6a Adding default id for the build report if no id is provided 2016-05-23 10:50:21 -05:00
Mihail Stoyanov 34ec8297a4 Copy .o and .ar files for when building static library (needed for uVisor for example) 2016-05-04 12:06:57 +01:00
Mihail Stoyanov ba31ed0550 Support for response files for ARMCC, GCC and IAR archiving (static library)
Support for compiling static libraries via build.py
Support for build.py --no-archive flag which compiles static library as multiple objects
Change default number of jobs when compiling to 0 (auto)
Fix for relative path issue when compiling, which flattened the output whenever absolute path is passed to --build (make.py and build.py)
Fix for temporary files when pre-processing of assembler files with ARMCC
Fix issue with response files where one of the elements is empty string
2016-04-30 00:32:26 +01:00
Martin Kojtal 3e91490259 Build - raise exception if toolchain is not recognized
This sends the message that toolchain specified is not valid.
2016-04-20 13:16:37 +01:00
screamer ab0fc59e52 Add support for project naming based on current directory Cleanup print output 2016-04-06 16:08:11 +01:00
Marcus Shawcroft 3b2b06197a move workspace to tools 2016-04-05 16:30:51 +01:00
Bogdan Marinescu dca69e022b Preparing new layout - moved ./workspace_tools to ./tools 2016-04-05 16:26:31 +01:00