Commit Graph

104 Commits (e9d0fbd178332a681d37568c4ae8d4737cb6419a)

Author SHA1 Message Date
0xc0170 29f806bb64 armcc - remove libpath from ld flags
libpath is not required for exporters, as they provide default paths.
This caused problems when paths are not correct for mbed tools, a project
fails to build as path is not found.
2016-06-28 14:58:26 +02:00
Jimmy Brisson 8e11fa2071 Undelete defines from IAR 2016-06-27 14:36:35 -05:00
Jimmy Brisson 4746beb256 Switch to = style for preincludes
relpaces the --preinclude mbed_config.h with --preinclude=mbed_config.h
2016-06-27 14:06:42 -05:00
Jimmy Brisson f92d3ec9be Move name of config file to one location 2016-06-27 14:06:42 -05:00
Mihail Stoyanov 879ae8c6bd Fixed gcc.py typo
get_conifg_option -> get_config_option
2016-06-27 14:06:41 -05:00
Jimmy Brisson 5532fb8697 Export command line for including mbed_conf.h from toolchains 2016-06-27 14:06:34 -05:00
Sam Grove f7ad7d2e27 Merge pull request #2005 from screamerbg/env-var-paths
[Tools] Add environmental variables support for toolchain paths
2016-06-27 11:41:58 -05: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
Mihail Stoyanov faa427db77 Add environmental variables support for toolchain paths
Also updated license of settings.py and default_settings.py and added
comments
2016-06-24 23:03:08 +01: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 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
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
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
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
Mihail Stoyanov e835c48cc8 Rename ignore_ptrs to ignore_patterns
Add comments to code
2016-06-17 23:27:50 +01: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
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
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 44e706e5b2 Merge pull request #1948 from 0xc0170/fix_iar
iar - fix flags for cmd and exporters
2016-06-15 22:27:03 +01: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
0xc0170 c16c75f2af iar - fix flags for cmd and exporters
Exporters and cmd do not share all flags, some asm and c flags are not the same (cpu, fpu)
2016-06-15 21:04:48 +01:00
Christopher Haster ce0606a756 [build tools] Added better support for features and recursive configs
per @screamerbg
2016-06-15 08:38:20 -05:00
Sam Grove 2a4a02caa7 Merge pull request #1944 from mbedmicro/ctrl-c-traceback
Fixes the python traceback when the user does ctrl+c during compilation
2016-06-15 12:29:21 +01:00
Mihail Stoyanov edc1fa1865 Fixes the python traceback when the user does ctrl+c during compilation 2016-06-15 01:08:35 +01:00
Mihail Stoyanov d0db5c94e5 Removed IAR --vla flag which breaks compatibility with IAR Workbench 2016-06-15 00:06:43 +01:00
Sam Grove 7d0060aa7b Revert "Fix iar exporter - flags duplication and consolidations" 2016-06-14 23:31:57 +01:00
Martin Kojtal cfa4d0c855 Merge pull request #1938 from 0xc0170/fix_iar
Fix iar exporter - flags duplication and consolidations
2016-06-14 18:45:16 +02:00
0xc0170 69c3da581d iar - flags consolidation
- vla flag is not compatible with c++ (not supported), it generates an error
in the IDE. Therefore we remove it
- common flags - add dlib and thum to the common flags.
- cpu flag is for only runtime cmd, IDE sets it via defined MCU, not required.
2016-06-14 16:19:39 +01:00
Mihail Stoyanov ffa45c9935 Merge pull request #1932 from geky/fix-dup-feature-defines
Removed duplicate feature declarations
2016-06-14 15:59:47 +01:00
0xc0170 58aa227a8c armcc - fix libpath - windows spaces 2016-06-14 13:03:15 +01:00
Christopher Haster 54118c09a6 Removed duplicate feature declarations 2016-06-13 23:23:03 -05:00
Mihail Stoyanov bd2159db26 Merge pull request #1930 from mbedmicro/iar-fix
Fixed flag for IAR
2016-06-14 05:09:10 +01:00
Mihail Stoyanov 3fa9ed79a5 Fixed flag for IAR 2016-06-14 04:42:45 +01:00
Mihail Stoyanov dcff9b15e7 Minor update to tools - logging of tests and output 2016-06-14 01:57:01 +01:00
0xc0170 160030052b armcc - fix include path for armcc bin file correction 2016-06-13 16:55:56 +01:00
0xc0170 88054fa959 IAR - add ld flags to link hook 2016-06-13 16:02:50 +01:00
Jimmy Brisson a4baaf8d5c Move IAR linker flags into the DEFAULT_FLAGS dict 2016-06-13 16:02:47 +01:00
Jimmy Brisson 685f4ed648 Adds -funsigned-char to default gcc args
It would resolve #1525, but for the fact that KDS is used.
2016-06-13 16:02:45 +01:00
Jimmy Brisson e3b9def8cf Refactors all toolchains to have flags api 2016-06-13 15:58:23 +01:00
Martin Kojtal 3a0d5611dd Merge pull request #1911 from mbedmicro/config-tests
Config tests, GCC flags, requirements.txt
2016-06-13 16:52:49 +02:00
Vincenzo Frascino 4f61cfd7f6 [BEETLE] Add support for GCC ARM exporter
This patch adds support for GCC ARM exporter to the Beetle Target.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
2016-06-13 14:26:47 +01:00
Mihail Stoyanov 0034ffb716 Add tests to the config system. Add GCC flags to support uVisor 2016-06-12 19:04:41 +01:00
Russ Butler 3db2c030d2 Only allow one thread on unsafe standard libs
When using a standard library which does not support multi-threading
allow only one thread to be used.  This allows the code to remain
safe.
2016-06-12 18:18:40 +01:00
Mihail Stoyanov f6acb1ffb4 Forward ported changes to tools 2016-06-10 15:19:02 +01:00
Mihail Stoyanov 51c10165ca Fixed toolchain flags so exporters can use them 2016-06-10 13:12:21 +01:00
Mihail Stoyanov 9f62d70fbf Update project generator script to allow working with any source
Update test exporters script
Update travis build script
Added config system CLI script
Fixed building of legacy libraries and layouts
2016-06-10 02:24:27 +01:00
Mihail Stoyanov c2e3001739 Add config system, memap, updates to build_api and toolchains 2016-06-09 23:50:03 +01:00
Mihail Stoyanov 3d45b2cdbb Renamed workspace_tools folder to tools 2016-06-09 21:34:53 +01:00