The tests check a number of features of the configuration mechanism
(mostly the inheritance and overriding of configuration parameters), as
well as the behavarious in various abnormal situations.
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.
- added a method that can be used to new targets dynamically (this
will be used by the configuration mechanism).
- the JSON parser now keeps the order of the keys read from the JSON
file (will also be used by the configuration mechanism).
- there's now a global target cache in targets.py, so that a target
with a given name will only be created once.
Currently, this repository only compiles for K64F and LPC1768, so it makes
no sense to add compilation for other targets, since this only results in
tests continously failing.
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.
Pull in mbedmicro/mbed. Make the following changes in addition:
- Ignore unused directories in mbed
- Add stub mbed-drivers/mbed.h for backwards compatibility
- Remove targets.json and instead use mbed's version
Make the following changes:
-Fix keyword used in forced inline pragma
-Move alignment test variables off of the stack since alignment there
is platform dependent.
Disassembly files can unintentionally get picked up by the test build
system. This patch changes the file extension on those files from
".s" to ".s.txt" so they are ignored.
Remove all of the repos which are being automatically mirrored. The
addition of .mbedignore allows these repos to be used directly.
Also pull up on nanostack-hal-mbed-cmsis-rtos.lib to bring in new
features required by the updated repos.