Commit Graph

29 Commits (6157563ae354a889befc97c9e51dc6c7b22c6578)

Author SHA1 Message Date
Jimmy Brisson 096d17dec9 Fix macros being the exact same when generating mbed_config.h 2016-08-18 11:23:26 -05:00
Jimmy Brisson 9d09f8e049 Reveal cumulative attributes from Targets 2016-08-16 11:04:32 -05:00
Jimmy Brisson 57af5cd053 Edit the English of the docstrings 2016-08-16 11:04:32 -05:00
Jimmy Brisson acf5c40af4 Glorify config.py (passes pylint) 2016-08-16 11:04:32 -05:00
Jimmy Brisson 71113a8820 Improve error for missing name from mbed_lib.json 2016-08-12 09:54:03 -05:00
Christopher Haster 6ea4006b5a [tools] Fixed infinite loop in config scan due to list comparison error
Previously a scanning for config terminated on comparison of the feature
set, however at some point the set was changed to a list. This resulted
in non-deterministic failures based on list order.
2016-07-29 12:20:52 -05:00
Christopher Haster f3c0ea3664 [tools] Fixed precedence issue in cumulative attribute set-arithmetic
Basically this:
a | b - c  !=  (a | b) - c
2016-07-27 16:47:23 -05:00
Simon Hughes c2d849133f Adding mbed-os/features/storage to mbed/features/storage/FEATURE_STORAGE (before deleting mbed-os/features/storage). 2016-07-26 23:07:24 -05:00
Russ Butler cef844f6bf Break apart client and nanostack dependencies
Move the library files used by both nanostack and client into a common
location.  This allows both client and nanostack to be built stand-alone.

The patch moves the following libraries into a common location:
-mbed-client-c
-mbed-client-randlib
-mbed-trace
-nanostack-hal-mbed-cmsis-rtos
-nanostack-libservice
-sal-stack-nanostack-eventloop

And moves the library 'coap-service' from client into nanostack.
2016-07-26 00:00:20 -05:00
Christopher Haster a5ea143c77 Updated config tests to match change in error message 2016-07-22 00:35:13 -05:00
Christopher Haster 9bd7a2fe72 Added proper support for the extra_labels target override
Due to dependencies between the config/target systems, the config
has been modified to preparse the mbed_app.json for overrides.
This means that attributes with dependencies in the targets are
only valid at the application level. A hard error has been
added for these attributes if they are supplied at the library
level.
2016-07-22 00:35:13 -05:00
Christopher Haster f2051b217a Modified config to explicitly update cumulative attributes in targets
Modified '_process_config_and_overrides' to update cumulative
attributes based on cumulative overrides found during walking config
files.

This should remove most of the disparity between the config target
cumulative overrides and cumulative attributes set in targets.json.
These cumulative overrides are updated after the global target
instantiation though, which may cause internal build tool state
dependent on cumulative attributes to not correctly reflect all
cumulative overrides.
2016-07-22 00:35:13 -05:00
Christopher Haster 0fcb20e8c1 Generalized handling of cumulative attributes in target overrides
In tools/config.py, Config now aggregates all cumulative attributes in
target overrides.

{
  "target_overrides": {
    "K64F": {
      "target.features_add": ["UVISOR"],
      "target.extra_labels_add": ["UVISOR_SUPPORTED"],
      "target.macros_add": ["UVISOR_MACRO"],
      "target.device_has_add": ["UVISOR_HAS"]
    }
  }
}

Note: no action is performed on overrides yet
2016-07-22 00:35:13 -05:00
0xc0170 9c3801b7b5 Config - fix - use basetring to check if a target is string 2016-07-13 14:59:48 +01:00
Bogdan Marinescu b4e8cf655d Fixed config-related options for the IAR assembler
The IAR assembler doesn't accept '--preinclude', but it accepts -D.
This commit changes the way the config-related macros are propagated
to the IAR assembler to use '-D' instead of '--preinclude'. This is
the only change related to functionality, the others are small,
backward compatible changes to the config code to make passing arguments
to the toolchain instances easier.

Tested by compiled blinky with IAR, GCC_ARM and ARM for K64F.
2016-06-27 15:54:38 +03:00
Bogdan Marinescu 6858117ff2 Conversion of boolean configuration parameters to integers
Boolean configuration parameters will now be generated as integers (1
for True, 0 for False).
2016-06-17 12:56:10 +03:00
Bogdan Marinescu 8f8733480a Remove redundant whitespaces 2016-06-17 12:19:11 +03: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
Bogdan Marinescu 80a70fcb51 Simplified string formatting expressions in get_config_data_header 2016-06-16 11:41:22 +03:00
Bogdan Marinescu ab0a5a53c2 Configuration in header files - step 1
The current implementation of the configuration system "compiles" the
configuration parameters to macros defined on the command line. This
works, but has a few limitations:

- it can bring back the maximum command line length issues in Windows.
- depending on the type of the configuration parameter, it might require
  special quoting of its value in the command line.
- various 3rd party IDE/tools seem to have some limitations regarding
  the total length of the macros that can be defined.

This commit is the first step in replacing the current mechanism with
one that generates configuration in header files that will be
automatically included, instead of command line macro definitions. The
commit only adds the method for generating the header file, it doesn't
actually change the way config is used yet (that will happen in step 2),
thus it is backwards compatible. The logic of the configuration system
itself is unchanged (in fact, the whole change (not only this commit) is
supposed to be completely transparent for the users of the configuration
system).

The commit also fixes an issue in tools/get_config.py that appeared as a
result of a recent PR: the signature of "get_config" in
tools/build_api.py changed, but tools/get_config.py was not updated.
2016-06-16 00:23:04 +03:00
Christopher Haster 0d9d4639cd [build tools] Added proper namespace for features
per @bogdanm
2016-06-15 10:34:32 -05:00
Christopher Haster 41daccf8d9 [build tools] Fixed masked out configuration error 2016-06-15 08:38:20 -05:00
Christopher Haster e70efe3a41 [build tools] Made config settings compatible with features system
per @screamerbg
2016-06-15 08:38:20 -05:00
Christopher Haster d9749b0447 [build tools] Added list of supported features
per @screamerbg
2016-06-15 08:38:20 -05:00
Christopher Haster ce0606a756 [build tools] Added better support for features and recursive configs
per @screamerbg
2016-06-15 08:38:20 -05:00
Christopher Haster 2d38065e1f [build tools] Added support for completely overriding cumulative attributes 2016-06-11 15:45:11 -05:00
Christopher Haster 36904fad1f [build tools] Moved cumulative attributes into target overrides
Attributes now get the filtering provided by target_overrides:
{
    "name": "cmsis-nodejs-SQL-x86",
    "target_overrides": {
        "*": {
            "device_has": ["SILLY_STRING", "FIRE"]
        },
        "SHOE": {
            "features_add": ["SMELLS_FUNNY"],
            "features_remove": ["SMELLS_NICE"],
        }
    }
}

per @screamerbg
2016-06-11 15:30:26 -05:00
Christopher Haster e3bde44b87 [build tools] Added support for cumulative attributes in configs directly
in mbed_lib.json:
{
    "name": "cmsis-nodejs-SQL-x86",
    "features_add": ["SMELLS_FUNNY"],
    "features_remove": ["SMELLS_NICE"],
    "device_has": ["SILLY_STRING", "FIRE"]
}
2016-06-11 14:44:59 -05:00
Mihail Stoyanov c2e3001739 Add config system, memap, updates to build_api and toolchains 2016-06-09 23:50:03 +01:00