Commit Graph

129 Commits (703aee4f6112ebf55a96db5dd15f22b72d43b61a)

Author SHA1 Message Date
Sam Grove 33cec194c6 Revert "Generalize flag handling" 2016-06-24 16:39:01 -05:00
Sam Grove 667d49ed8f Merge pull request #1985 from kjbracey-arm/iar_vlas
Turn on C99 VLAs in IAR
2016-06-24 16:13:22 -05:00
Sam Grove 6dd11c76e4 Merge pull request #1976 from theotherjimmy/memap-args
Generalize flag handling
2016-06-24 15:03:50 -05:00
Jimmy Brisson 7b3ef2179f Make mcu and tool arguments many and update all consumers of them 2016-06-24 14:23:19 -05:00
Jimmy Brisson d757f35d15 Update style 2016-06-24 14:23:19 -05:00
Jimmy Brisson 7e5deaa7d0 standardize on nargs="*" 2016-06-24 14:23:19 -05:00
Jimmy Brisson 3276854f49 fix parse error in test.py and make -n + -p comma separated 2016-06-24 14:23:19 -05:00
Jimmy Brisson 439d2e8539 Add -S, -L, and --source to the project.py mutually exclusive group 2016-06-24 14:23:19 -05:00
Jimmy Brisson 053efc6864 Add -S, -L, and --source to the mutually exclusive group 2016-06-24 14:23:19 -05:00
Jimmy Brisson c969a4c784 Better test completion and everything that can be is columnated 2016-06-24 14:23:17 -05:00
Jimmy Brisson 91c45a7b6f Improve test -n and -p failure messages 2016-06-24 14:22:48 -05:00
Jimmy Brisson 2fc4d64b07 Brought test_api.py and users into the new order of argument parsing 2016-06-24 14:22:48 -05:00
Jimmy Brisson 18868ff3fb Convert project.py to the new style of argument parsing 2016-06-24 14:22:47 -05:00
Jimmy Brisson c5ac2cfdec Create type combinator many 2016-06-24 14:22:47 -05:00
Jimmy Brisson e4c6bcd724 Move test parsers to tests.py 2016-06-24 14:22:47 -05:00
Jimmy Brisson b98c8c1c33 Generalize all appropriate arguments and check for file existance 2016-06-24 14:22:47 -05:00
Jimmy Brisson 43e036d6e1 Move to argparse from optparse 2016-06-24 14:22:47 -05:00
Jimmy Brisson 52a7f64d67 Generalize parsing types 2016-06-24 14:22:41 -05:00
Sam Grove 0bbac4138d Merge pull request #1999 from screamerbg/fix-ignore-root
Fixed .mbedignore logic to ignore the walk() root
2016-06-23 22:40:35 -05:00
Sam Grove d3a6ac3f5f Merge pull request #1995 from geky/fix-debug-info
[tools] Reorder option handling in toolchains
2016-06-23 22:34:18 -05:00
Mihail Stoyanov 5f92574163 Merge pull request #1986 from svastm/fix_report
Fix html report exporter row tag
2016-06-24 02:26:30 +01:00
Mihail Stoyanov 6c53baf7d2 Fixed match walk() root against the ignore list.
For example .mbedignore in tools/ contains '*' and naturally should match all files, folders including tools/ itself. Without this fix, tools/ is added to the include path
2016-06-24 01:24:09 +01:00
Jimmy Brisson ee8a02c6ab Generalize export format flag input 2016-06-23 15:45:31 -05:00
Jimmy Brisson f442fd9394 Broaden acceptable toolchain spec; improved incorrect toolchain error 2016-06-23 15:45:31 -05:00
Kevin Bracey b74546c731 Warn about or prevent VLA use in C++
ARM and GNU compilers currently are in a mode where they will accept VLAs
in C++ as an extension. IAR does not accept them in C++.

Avoid potential portability surprises by making GCC warn, and
deactivating the extension in ArmCC.
2016-06-23 09:57:05 +03:00
Kevin Bracey 80a03e1787 Turn on C99 VLAs in IAR
IAR defaults to C99 mode, but doesn't enable VLAs by default. Enable them
to make it more conformant.

We don't have much if any code using actual variable-length arrays, but
variably-modified types are occasionally used. The same switch controls
both.

(VLAs were actually already enabled in most of the project export
templates, but not the build script).
2016-06-23 09:34:12 +03:00
Christopher Haster 5a4c5df4dc [tools] Reordered option handling in toolchains
Options were parsed and logged before per-toolchain
logging was setup.

Fixes #1990
2016-06-22 09:23:33 -05:00
Bogdan Marinescu f864b8439f Merge pull request #1983 from mbedmicro/fix_config_tests
Fix K64F-based config tests
2016-06-22 16:47:32 +03:00
svastm e4f38b031f Fix html report exporter row tag 2016-06-22 11:36:22 +02:00
Mihail Stoyanov 541c478dbf Remove tracking of existing mbed_config.h in the source tree 2016-06-21 23:43:09 +01:00
Mihail Stoyanov 4d68152ef1 Rename mbed_conf.h to mbed_config.h
Following the pattern device_has to DEVICE_, features to FEATURE_,
the mbed config system should map to mbed_config.h
2016-06-21 23:41:04 +01:00
Sam Grove 3a01862a4f Merge pull request #1967 from screamerbg/fix-double-ignores
Fixed double-ignored files that cause python exception
2016-06-21 17:36:01 -05:00
Bogdan Marinescu 20583ba172 Fix K64F-based config tests
PR #1974 added a new configuration parameter to K64F, which in turn made
some tests break, because they found an unexpected configuration
parameter. Fixed by defining a special target for the tests
(test_target) that can be used independently of the actual mbed targets.
2016-06-21 19:58:03 +03:00
Mihail Stoyanov e835c48cc8 Rename ignore_ptrs to ignore_patterns
Add comments to code
2016-06-17 23:27:50 +01: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 fb5c4a6381 Fixed double-ignored files that cause python exception
Also simplify build scanning logic and add comments
2016-06-17 00:46:14 +01: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
Martin Kojtal 1e18ea230a Merge pull request #1957 from mbedmicro/config_headers
Configuration in header files - step 1
2016-06-16 18:47:15 +02:00
Bogdan Marinescu a164224acf Changed prefix file name to mbed_conf.h
Also changed some function names to make it clear that the prefix
headers feature is only used for config.
2016-06-16 17:01:41 +03:00
Bogdan Marinescu 85eca37d29 Added toolchain support for configuration in prefix headers
This commit uses the previously introduced feature of generating
configuration data as a C header file rather than as command line macro
definitions. Each toolchain was modified to use prefix headers if
requested, and build_api.py was modified to set up the toolchain's
prefix header content using the data generated by the config system.

Tested by compiling blinky for GCC and ARMCC. I'm having a few issues
with my IAR license currently, but both ARMCC and IAR use the same
`--preinclude` option for prefix headers, so this shouldn't be an issue.

Note that at the moment all exporters still use the previous
configuration data mechanism (individual macro definitions as opposed to
a prefix header). Exporters will be updated in one or more PRs that will
follow.
2016-06-16 16:13:50 +03:00
Bogdan Marinescu 80a70fcb51 Simplified string formatting expressions in get_config_data_header 2016-06-16 11:41:22 +03:00
Mihail Stoyanov e44566b319 Fix libraries being built with features support 2016-06-16 00:31:25 +01:00
Sam Grove ac1a63f1a1 Merge pull request #1956 from screamerbg/fix-features3
Fixed features not being included
2016-06-15 23:13:26 +01:00
Sam Grove 934951a002 Merge pull request #1955 from theotherjimmy/name-libs
Add -N/--artifact-name argument to parser to name libraries
2016-06-15 22:30:19 +01:00
Sam Grove 605cb86ba7 Merge pull request #1954 from 0xc0170/fix_project_report
Export - project name fix (.zip)
2016-06-15 22:29:03 +01:00
Sam Grove 44e706e5b2 Merge pull request #1948 from 0xc0170/fix_iar
iar - fix flags for cmd and exporters
2016-06-15 22:27:03 +01: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
Mihail Stoyanov a81746c8f6 Fix for features not being included
Also improve compile speed by not re-scanning the source locations
2016-06-15 22:21:31 +01:00
Jimmy Brisson 6de4ea7e6f Adds -N/--artifact-name argument to parser
Only makes sence for --source builds (which only work with --build)
2016-06-15 15:07:25 -05:00