Commit Graph

753 Commits (96e1d5bd7339acc9624f7fdb5edbf637affdc9a3)

Author SHA1 Message Date
Sam Grove 054f232431 Merge pull request #2674 from theotherjimmy/correct_repo_files
tools - Correct adding repo_files
2016-09-16 17:30:13 -05:00
Sam Grove bd4d29d76c Merge pull request #2672 from stevew817/bugfix/EFM32_exporter_mbed_config
[EFM32] Fix exporter to pull root path
2016-09-16 17:29:53 -05:00
Sam Grove 1f7c341a65 Merge pull request #2671 from theotherjimmy/export-getting-started
tools-exporters! - Globally add a gettingstarted.html
2016-09-16 17:28:44 -05:00
Sam Grove 04547f671b Merge pull request #2659 from sarahmarshy/patch-5
Fix exported project file group naming
2016-09-16 17:25:40 -05:00
Sam Grove ca0b47a8be Merge pull request #2612 from MarceloSalazar/memap_fixes
Fixed bug on memap (non-default output path)
2016-09-16 17:21:07 -05:00
jeromecoutant c8c76498e8 Serial init timeout: increase default value
It seems that my test bench is very slow...
I need to increase the timeout value in order to get the port ready

Thx
2016-09-16 14:17:46 +02:00
Marcelo Salazar 64d33810fc Minor tweak on spaces 2016-09-16 10:11:07 +01:00
Jimmy Brisson 924d242b39 Add documentation about profiles to the toolcahins 2016-09-15 15:03:10 -05:00
Jimmy Brisson e507b9e1c6 export make - Surround all command line stuff with quotes.
Should eliminate any space-in-path issues
2016-09-15 11:42:52 -05:00
Jimmy Brisson a3ee5edde5 Unifiy output style of makefile and tools 2016-09-15 11:42:52 -05:00
Jimmy Brisson d9c8365828 Use cflags instead of symbols 2016-09-15 11:42:52 -05:00
Jimmy Brisson 6838aa9372 Clean code style of python code for generic make 2016-09-15 11:42:52 -05:00
Jimmy Brisson 920bb47ffd Change make exporter support to match target.json 2016-09-15 11:42:52 -05:00
Jimmy Brisson 00d2a45b91 Generalize make exporters for all toolchains 2016-09-15 11:42:52 -05:00
Jimmy Brisson 17e096b369 Move make stuff to it's own folder; add a make_gcc_arm exporter 2016-09-15 11:42:52 -05:00
Jimmy Brisson 5c9dd3c3a1 Remove "modify the checksum" message from targets without a binary hook 2016-09-15 11:42:51 -05:00
Jimmy Brisson 7b1112588d remove templates that differ uselessly in cpu/c flags 2016-09-15 11:42:51 -05:00
Jimmy Brisson c913050053 Move hex file merging to common makefile 2016-09-15 11:42:45 -05:00
Jimmy Brisson 4ac92daac9 Use common template as fallback 2016-09-15 11:41:46 -05:00
Bogdan Marinescu 7669d7f8f5 Merge pull request #2691 from ARMmbed/no_custom_targets
Removed custom targets from config system
2016-09-14 14:41:31 +03:00
Jimmy Brisson e939133355 Add a inc_repos option to the exporters 2016-09-13 17:09:15 -05:00
Sarah Marsh 8670598115 Abstract check_executable added 2016-09-13 16:26:58 -05:00
Sarah Marsh ab92a5ace2 Toolchain check generic in mbedToolchain 2016-09-13 13:59:11 -05:00
Sarah Marsh 8b74c5b3c7 Docstrings. Empty executable search path handling. 2016-09-13 12:06:01 -05:00
Bogdan Marinescu 8852b2edec Removed hidden argument to set_targets_json_location
The previous code used a variable that was internal to the Target class.
This commit removes the argument to `set_targets_json_location`
completely, which forces Target to use the default locatio internally.
2016-09-13 16:45:32 +03:00
Bogdan Marinescu d7899b4b2b Removed custom targets from config system
Custom targets were the origin of a number of issues with the mbed
tools, so it was decided that they need to be removed. This PR does just
that (and moves the "custom_targets" part of the config system tests
into a separate, per-test "targets.json" file to preserve the test
functionality).
2016-09-13 15:54:44 +03:00
Sarah Marsh 61dee45dca Revise checking toolchain path 2016-09-12 18:54:39 -05:00
Jimmy Brisson f48aa248b7 Correct adding repo_files 2016-09-12 16:19:55 -05:00
Marcelo Salazar 1192744a06 Minor fix to match with master 2016-09-12 20:12:54 +01:00
Marcelo Salazar ca35755167 Change default uvision exporter to uvision5
uVision4 is no longer maintained by the Keil team (support was stopped
long time ago).

This is why we need to make the uvision exporter able to generate uVision5
projects by default (which is based on software packs).

Also, adding note that the uvision4 exporter is now deprecated and will be
removed in the future.
2016-09-12 19:46:33 +01:00
Jimmy Brisson d033070425 Add a gettingstarted.html to all exporters 2016-09-12 13:17:35 -05:00
Steven Cooreman f4f1f6ee59 [EFM32] Fix exporter to pull root path
Simplicity Studio exporter doesnt really support header files in the root directory (looking at you, mbed_config.h), so this is a workaround for that issue.
2016-09-12 17:23:05 +02:00
jeromecoutant c3b9a74463 travis: revove rtos support for NUCLEO_L053R8 2016-09-12 12:54:00 +02:00
jeromecoutant 787a21fbd0 Disable RTOS tests for STM32 8K targets
8K RAM target is too small for
"NUCLEO_L031K6"
"NUCLEO_L053R8"
"DISCO_L053C8"
"NUCLEO_F030R8"
2016-09-12 11:48:02 +02:00
Sam Grove e9d0fbd178 Merge pull request #2604 from tung7970/fix-tools
Tools - Fix fill section size variation
2016-09-10 16:22:00 -05:00
Sam Grove c3737b4f7a Merge pull request #2593 from ConorPKeegan/devel_app_config_switch
Add app config command line switch for test and make
2016-09-10 14:30:38 -05:00
Sam Grove 8d5424347e Merge pull request #2615 from bcc6/master
[MTM_MTCONNECT04S] Added support for MTM_MTCONNECT04S
2016-09-10 11:34:44 -05:00
Conor Keegan ac51eb6638 Add unit tests for app_config 2016-09-10 15:29:19 +01:00
Conor Keegan aafcf55407 Add app config switch to options.py and make.py 2016-09-10 15:29:19 +01:00
Conor Keegan 7c72a22508 Add test command switch for app config file 2016-09-10 15:29:19 +01:00
Sam Grove da5a19f149 Merge pull request #2630 from sarahmarshy/patch-4
Test names not dependent on disk location of root
2016-09-10 07:25:04 -05:00
Sam Grove c1ee7fb494 Merge pull request #2504 from ohagendorf/disco_f769_ii
[Disco_F769NI] adding new target
2016-09-10 07:16:21 -05:00
OzzySan b5b6fdc6dc [MTM_MTCONNECT04S] Added gcc_arm template for export. 2016-09-10 15:54:44 +08:00
Tony Wu c50b5c6651 Tools - Fix fill section size variation
The linking order of object files affects the actual code placement,
which in turn affects the size of fill section due to the number of
zeros required to maintain appropriate data/code alignment may change.
This is observed when building on Mac and Linux host.

example: mbed compile -m K64F -t GCC_ARM (build 1)
+---------------------+-------+-------+-------+
| Module              | .text | .data |  .bss |
+---------------------+-------+-------+-------+
| Fill                |   120 |     4 |  2381 |
| Misc                | 28755 |  2216 |    84 |
| features/frameworks |  4236 |    52 |   744 |
| hal/common          |  2745 |     4 |   325 |
| hal/targets         | 12116 |    12 |   200 |
| rtos/rtos           |   119 |     4 |     0 |
| rtos/rtx            |  5721 |    20 |  6786 |
| Subtotals           | 53812 |  2312 | 10520 |
+---------------------+-------+-------+-------+

example: mbed compile -m K64F -t GCC_ARM (build 2)
+---------------------+-------+-------+-------+
| Module              | .text | .data |  .bss |
+---------------------+-------+-------+-------+
| Fill                |   128 |     4 |  2381 |
| Misc                | 28755 |  2216 |    84 |
| features/frameworks |  4236 |    52 |   744 |
| hal/common          |  2745 |     4 |   325 |
| hal/targets         | 12116 |    12 |   200 |
| rtos/rtos           |   119 |     4 |     0 |
| rtos/rtx            |  5721 |    20 |  6786 |
| Subtotals           | 53820 |  2312 | 10520 |
+---------------------+-------+-------+-------+

This patch fixes fill section size variation by sorting object
files before passing to linker.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2016-09-10 08:30:01 +08:00
Sam Grove 5ba3ab70c9 Merge pull request #2613 from bridadan/find-tests-directory-fix
Correctly providing directories to build_apis
2016-09-09 18:01:22 -05:00
Sam Grove b71bfd6250 Merge pull request #2576 from theotherjimmy/example-regession
Add smoke test that builds example programs with mbed-cli
2016-09-09 17:59:55 -05:00
sarahmarshy f8cae13f33 Fix uvision group naming
The previous way of finding group names found the encompassing directory of each file. If the project is exported from the online compiler, this resulted in temporary folder names like tmpyKKWv_ showing up as group names.

I propose defaulting to the project name if the file is in the project root.
2016-09-09 17:18:52 -05:00
Sam Grove 2c96001478 Merge pull request #2575 from theotherjimmy/allow-empty-config
tools-config! -  Allow an empty or mal-formed config to be passed to the config system
2016-09-09 19:32:05 +02:00
ohagendorf d0e2f1efa6 disco_f769 some rework ... (part II)
as suggested by adustm
2016-09-09 14:21:55 +02:00
ohagendorf 95c5b78f34 [disco_f769ni] adding gcc_arm exporter definitions 2016-09-09 14:18:16 +02:00
ohagendorf 3598af00c7 [disco_f769ni] adding to build_travis 2016-09-09 14:18:16 +02:00
ohagendorf 54adfe10c0 [disco_f769ni] adding rtos lib 2016-09-09 14:18:16 +02:00
Sam Grove 57ebf8bdad Merge pull request #2548 from jamike/NUCLEO_F303ZE
Nucleof303ze
2016-09-09 01:48:13 +02:00
Sarah Marsh 7ee621320a Removed projectfiles directory. debug-info default option 2016-09-06 14:24:06 -05:00
Jimmy Brisson a6be472111 Add repo_dirs, repo_files, lib_builds, and lib_refs to zips 2016-09-06 14:24:06 -05:00
Jimmy Brisson b5c189931e Fix include paths for fragmented projects; remove deadcode 2016-09-06 14:24:06 -05:00
Jimmy Brisson c550f9da75 Fix some tracebacks, add zip exporter to the CLI 2016-09-06 14:24:06 -05:00
Jimmy Brisson cadd233b8e Allow dict in addition to the other types of src_paths
The dict allows the user of the exporter api to specify the result directory
of particular groups of scanned dirs. This will be used by the online exporters
to spoof everything being in the same directory when they are not. It may also
be used by tests, if they would like to export something that looks exactly
like a normal project.
2016-09-06 14:24:05 -05:00
Jimmy Brisson 6686411220 Set vpath correctly when exporting to projectfiles directory 2016-09-06 14:24:05 -05:00
Sarah Marsh 2196d50e72 Create projectfiles directory when exporting
Compatible with new c/asm/cpp flag separation.
2016-09-06 14:24:05 -05:00
Jimmy Brisson e5de39efff Fix renaming issues in non-CI ides
Affects these ides:
 - Atmel Studio
 - Code Red (I don't think we support this)
 - Coide
 - DS-5
 - E2Studio
 - EMblocks
 - KDS
 - Simplicity v3
 - SW 4 STM32

also corrects flags usage in EMBlocks
2016-09-06 14:24:05 -05:00
Jimmy Brisson 36c750b39f Reinstated the zip exporter 2016-09-06 14:24:05 -05:00
Jimmy Brisson 3e2526a424 Made exporting safer
it will no longer barf when:
 - a linker scirpt is None
 - an attribute that is a set
it will also export the correct library include paths
2016-09-06 14:24:05 -05:00
Jimmy Brisson 67fae3a705 Allow exporting to in-memory zip file 2016-09-06 14:24:05 -05:00
Sarah Marsh 0016ddf60c progen exporter template 2016-09-06 14:24:05 -05:00
Sarah Marsh cccc5f3fca Accessing progen exporters directly 2016-09-06 14:24:05 -05:00
Jimmy Brisson 7e2ca0115b Update copyright 2016-09-06 14:24:04 -05:00
Sarah Marsh f6a15fd3c8 Refactor export subsystem
Makes several broad changes:
 - removes dead code that dealt with the online build system
 - replaces export function with a much simpler one that:
   - does not copy any sources
   - the zip file hits the disk
   - the mbed_config.h hits the disk
   - the project files hit the disk
   - nothing else hits the disk
 - exporters use Resource object scanned with a toolchain
 - progen exporters don't optionally build a project instead they have a
   build function that may be called afterwards
 - much of the code passes pylint (have a score of 9 or above):
   - project.py
   - project_api.py
   - export/__init__.py
   - export/exporters.py
   - test/export/build_test.py
2016-09-06 14:24:00 -05:00
sarahmarshy ac11d94724 Test names not dependent on disk location of root
#2613 should be merged first 
Using test_api, I found that the test names were dependent on where mbed-os (if that is the root) is stored on disk if you provide anything other than '.' as the root directory. 
This would change names like: 
```
repos-mbed-os-example-blinky-mbed-os-features-storage-feature_storage-tests-cfstore-example3
```
to
```
features-storage-feature_storage-tests-cfstore-example3
```
2016-09-06 10:23:32 -05:00
Bogdan Marinescu 5dcd546fd5 Merge pull request #2393 from theotherjimmy/argument-dependencies
[tools] Prevent trace-backs from incomplete args
2016-09-05 12:50:47 +03:00
Michel Jaouen c8d08bd952 [NUCLEO_F303ZE] test / export scripts update 2016-09-05 09:14:09 +02:00
OzzySan 85d7ff2e17 [MTM_MTCONNECT04S] Added support for MTM_MTCONNECT04S 2016-09-05 10:53:39 +08:00
Brian Daniels 8b9a6dc19d Correctly providing directories to build_apis
The shared `prepare_toolchain` and `scan_resources` functions in build_api
expect a list, not a string. This is different from the
toolchain.scan_resources function. Now the functions are being used
correctly within the `find_tests` function in test_api
2016-09-02 11:32:11 -05:00
Marcelo Salazar 56604a04c8 Fixed bug on memap (non-default output path)
Removed code that checks if the path to the map file
matches with the selected toolchain.
2016-09-02 19:05:27 +03:00
Jimmy Brisson 3437829af1 return the number of failures from the script 2016-09-01 16:01:12 -05:00
Jimmy Brisson f983292a6b Separate the import and compile steps for better integration with Jenkins 2016-08-31 15:17:29 -05:00
Jimmy Brisson ac5c685389 Use mbed-os 5 example instead of the mbed 2 one 2016-08-31 14:25:59 -05:00
Jimmy Brisson 41ec0af7aa Update Docstring 2016-08-31 13:54:41 -05:00
Jimmy Brisson 64e71e2f3a Use IPV6 feature for filtering mesh, client, and sockets 2016-08-31 13:40:34 -05:00
Jimmy Brisson 4b1dcd398c Allow filtering by target as well as by features 2016-08-31 13:40:03 -05:00
Jimmy Brisson 1f0afebbbc Allow command-line filtering of toolchains 2016-08-31 13:24:59 -05:00
Jimmy Brisson f7a1d1f749 Move to feature filter for target and toolchain detection; print passed tests 2016-08-29 14:38:16 -05:00
Jimmy Brisson 78028a9ceb Move example tests to their own folder 2016-08-29 14:01:57 -05:00
Jimmy Brisson 95ee4f6370 Use json for the example to target mapping and print failures 2016-08-29 13:46:39 -05:00
Jimmy Brisson eb11561c1f Add smoke test that builds example programs with mbed-cli 2016-08-29 11:26:37 -05:00
Jimmy Brisson c7bf3fac60 Allow an empty or mal-formed config to be passed to the config system 2016-08-29 10:03:36 -05:00
Sam Grove ea56684fff Merge pull request #2531 from radhika-raghavendran/master
ncs36510 from ON Semiconductor
2016-08-27 07:31:39 -05:00
Sam Grove fe1f2b6066 Merge pull request #2563 from sarahmarshy/path_error_rev
Check if executble exists
2016-08-26 18:05:50 -05:00
Sarah Marsh bd0acdc527 Check executable 2016-08-26 17:32:57 -05:00
Sam Grove ea3526d657 Merge pull request #2418 from sarahmarshy/path_error_rev
Readable error when toolchain paths not set. Allow IAR and ARM toolchains to be set in user's PATH.
2016-08-26 13:10:48 -05:00
Radhika 2dc38063b9 Formatting code according to ARM guidelines.
Ran pylint and astyle.
Rebased latest ARMmbed-os code.
2016-08-26 20:34:23 +05:30
Radhika 048d53134a rebasing with mbed-os latest 2016-08-26 20:34:20 +05:30
Sam Grove f147f6f3f2 Merge pull request #2471 from bridadan/copy-config-library
Copying JSON files to pick up config for built libraries
2016-08-26 09:38:35 -05:00
Sam Grove daf4b1c6b1 Merge pull request #2528 from jeremybrodt/max32620
[MAX32620HSP] Initial release.
2016-08-26 09:25:33 -05:00
Radhika daea440b6a Adding NCS36510 support in mbed-os5.1 2016-08-26 12:04:22 +05:30
Radhika b75379f353 Adding NCS36510 support in mbed-os5.1 2016-08-26 12:00:54 +05:30
Sam Grove 1dbe8d8cf8 Merge pull request #2520 from jeromecoutant/PR_L011K4
[NUCLEO_L011K4] build issues
2016-08-25 09:26:10 -05:00
Jeremy Brodt b9b6d30659 [MAX32620HSP] Initial release. 2016-08-24 16:33:47 -05:00
Brian Daniels 33672b483f Copying JSON files to pick up config for built libraries
This came up when building tests, but affects any library that's built
that uses config and included as "source" with the mbed tools.
JSON files are not copied by default when building a library, so when this
is built it loses the config data associated with the library. This commit
copies all JSON files into the build directory when building libraries.

This leads to two mbed_config.h files existing if the build directories
are different between the library and application build. This is the case
when building tests, so an option build_library was added to remove the
mbed_config.h file when compilation is done. This disabled by default when
building libraries, but it is enabled when building tests.
2016-08-23 16:42:05 -05:00
Vincent Coubard fe322adc9c Make selection of c library used consistent.
* rename "default_build" property into "default_lib"
* rename "standard" value for "default_build" into "std".
2016-08-23 16:04:56 +01:00
jeromecoutant 086d5b9a4e [NUCLEO_L011K4] build issues
Target FLASH is quiet small (16KB),
so only uARM is supported and very small applications.
2016-08-23 17:02:57 +02:00
Vincent Coubard 73a925810c Improve naming of the command line option which select the c library to use.
* rename 'small-build' into 'small-lib'
* rename 'standard-build' into 'std-lib'
2016-08-23 15:42:08 +01:00
Vincent Coubard afde624a26 Rename big-build option into standard-build.
With this change, the name is more descriptive and aligned with the targets
definitions in hal/targets.json.
2016-08-23 15:38:44 +01:00
Vincent Coubard cce10e2c0d Allow 'small-build' and 'big-build' to be used as options.
These two flags are already tested in tools/toolchains/gcc.py but can't
be used at the moment because they are not part of the argument list of
the option parameter.
2016-08-23 15:37:56 +01:00
Martin Kojtal 0231f61588 Merge pull request #2516 from NXPmicro/HEXIWEAR_KDS_Support
HEXIWEAR: Add support to create KDS projects for HEXIWEAR
2016-08-23 09:07:49 +01:00
Russ Butler 6a31ffbf3e Heap statistics
Keep track of the current size allocated, maximum size allocated,
number of allocations, failed allocations and total size allocated for
both GCC and ARM. Report the maximum size allocated at the end of
testing.

Also, add a test to verify heap metrics are working as expected.
2016-08-22 18:32:51 -05:00
Mahadevan Mahesh 2c813a051b HEXIWEAR: Add support to create KDS projects for HEXIWEAR
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-08-22 15:06:56 -05:00
Jimmy Brisson 163fa59e17 Prevent traceback 2016-08-19 14:01:19 -05:00
Jimmy Brisson a0c8a09c89 Unify look of argument errors 2016-08-19 14:01:19 -05:00
Martin Kojtal 862db41be3 Merge pull request #2468 from bridadan/fix-gcc-diagnostic-pattern
Tools - Fixing issue where GCC fails to report compile errors when non-verbose
2016-08-19 13:48:54 +01:00
Martin Kojtal f6be78dc89 Merge pull request #2429 from theotherjimmy/specialize-tests-discovery
Move find_tests to where it's has arguments
2016-08-19 12:05:45 +01:00
Martin Kojtal 5c82db8203 Merge pull request #2494 from theotherjimmy/fix-memap-table
Print module information in 'table' output format
2016-08-19 11:52:26 +01:00
Jimmy Brisson 74dd5efd48 Print module information in 'table' output format 2016-08-18 13:25:58 -05:00
Jimmy Brisson 096d17dec9 Fix macros being the exact same when generating mbed_config.h 2016-08-18 11:23:26 -05:00
Sarah Marsh cd229bacc3 Allow users to set armcc and iccarm in path.
Raise exceptin instead of exit.
Corrected error for arm-none-eabi-gcc/g++ set in path.
2016-08-17 09:14:05 -05:00
Martin Kojtal bdb4ab921f Merge pull request #2472 from ytsuboi/master
[TY51822r3] Added exporting support
2016-08-17 14:54:49 +01:00
Martin Kojtal 77e87179bd Merge pull request #2456 from NXPmicro/SDK2_FRDM_K66F
Add support for FRDM K66
2016-08-17 14:37:31 +01:00
Yoshihiro TSUBOI f8a6af161a [TY51822r3] Added exporting support 2016-08-17 10:58:48 +09:00
Jimmy Brisson dabd7b8d53 Made linting a recommendation and raised the bar for printing 2016-08-16 13:29:43 -05:00
Jimmy Brisson 7b7ca84ab3 Fix remaining issues in targets.py 2016-08-16 13:29:43 -05:00
Jimmy Brisson 3f9bedbdd9 Add pylint testing to Travis 2016-08-16 13:29:43 -05:00
Jimmy Brisson 33786130ae Format and document options.py 2016-08-16 13:29:43 -05:00
Jimmy Brisson 44efd92ca3 Format and document hooks.py 2016-08-16 13:29:31 -05:00
Brian Daniels 20ddba6e90 Fixing issue where GCC fails to report compile errors when non-verbose
The output of the GCC compiler is such that the toolchain regex sometimes
got hung up on the ':' charcter being printed in front of the drive letter when
running on Windows. This PR changes the matching logic to be more flexible
by using 'search' to check the entire string for a match, not just the
beginning of the string.
2016-08-16 12:34:18 -05:00
Jimmy Brisson ec1d0b5673 Format detect_targets.py 2016-08-16 11:48:46 -05:00
Jimmy Brisson 2831eee216 Format and document libraries.py 2016-08-16 11:48:45 -05:00
Jimmy Brisson acc59a1a86 Format paths python module 2016-08-16 11:48:45 -05:00
Jimmy Brisson 5fbcc25b46 Format and document colorize 2016-08-16 11:48:45 -05:00
Jimmy Brisson cb5e61028d Format and add docstrings to memmap 2016-08-16 11:48:39 -05:00
Jimmy Brisson ea63a4d9a7 Expand docstrings in build_api 2016-08-16 11:04:33 -05:00
Jimmy Brisson bb43f8d37a Format targets.py 2016-08-16 11:04:33 -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 b2156ceef5 Format bulid_api 2016-08-16 11:04:32 -05:00
Jimmy Brisson 99f1284a81 Stylize utils.py 2016-08-16 11:04:27 -05:00
Mahadevan Mahesh 0ad9220fb1 Add support for FRDM K66
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-08-15 15:37:25 -05:00
Martin Kojtal dd8060b798 Merge pull request #2433 from theotherjimmy/better-config-errors
[tools] Improve error for missing name from mbed_lib.json
2016-08-15 15:15:06 +01:00
Jimmy Brisson 71113a8820 Improve error for missing name from mbed_lib.json 2016-08-12 09:54:03 -05:00
Martin Kojtal 3d61535652 Merge pull request #2149 from jeromecoutant/PR_MBED_A27
Add MBED_A27 test in the common list
2016-08-12 10:57:06 +02:00
Jimmy Brisson 215f4259ce Remove argument from tool/project.py -b
resolves #2309
2016-08-12 08:37:52 +02:00
Jimmy Brisson abc7669eb7 Move find_tests to where it's has arguments 2016-08-11 10:03:23 -05:00
Bogdan Marinescu d471a4f019 Add config data to build_lib in build_api.py
`build_lib` wasn't aware of configuration data, so some of the source
files that depends on configuration data fail to compile. This commit
fixes that by making `build_lib` aware of configuration data.
2016-08-11 13:54:41 +03:00
Sarah Marsh 51245ceb7a Exit non-zero for invalid toolchain path 2016-08-10 12:04:11 -05:00
Sarah Marsh 1445886844 Readable error when toolchain paths not set.
Fixes #2360.

New error:
[Error] Toolchain path does not exist for IAR.
Current value: /default/path/that/doesnt/exist
(System exit before any build system calls)
2016-08-10 11:52:45 -05:00
Bogdan Marinescu 4f6eaaa8ec build_mbed_libs is now aware of the configuration
Previously, build_mbed_libs didn't take into account the configuration.
This is a problem when doing a binary release, since mbed_lib.json
contains configuration data relevant to the binary release.
2016-08-10 19:03:13 +03:00
jeromecoutant 463c7d20f0 Create MBED_A28 test in the common list
MBED_A28 test is the same as MBED_A27 test.
This is a CAN loopback test without any peripheral or wire.
It can then be added in the common list.
2016-08-10 15:09:00 +02:00
Sam Grove 9d1fbda9fe Merge pull request #2377 from sarahmarshy/flag_revision
Pass only relevant defines at each stage of compilation
2016-08-04 22:10:58 -05:00
Sarah Marsh 70890620f7 Uvision and IAR working cc and asm specific defines 2016-08-04 17:05:12 -05:00
sarahmarshy 4cef2c917f Merge pull request #1 from screamerbg/split_symbols
Differentiate ASM and CXX symbols
2016-08-04 19:17:27 +01:00
Mihail Stoyanov 88564a9ac3 Differentiate ASM and CXX symbols as they are not treated the same in ARMCC and IAR compilers 2016-08-04 18:19:08 +01:00
Sam Grove 8891ed1cac Merge pull request #2341 from screamerbg/backported-fixes
[Tools] Build system improvements
2016-08-04 12:15:06 -05:00
Sam Grove a6ffdd4e94 Merge pull request #2366 from sg-/hexiwear-fixups
Hexiwear fixups
2016-08-04 11:38:41 -05:00
Sam Grove 5dbdf934fd Merge pull request #2359 from sarahmarshy/armasm_fix
Removed preinclude config from asm flags
2016-08-04 10:57:25 -05:00
Sam Grove a2500f877b add HEXIWEAR to RTOS tests 2016-08-03 17:40:36 -07:00
Sarah Marsh b910cfe08c Removed incorrect list removal 2016-08-03 17:26:08 -05:00
Sarah Marsh 02cdaebc95 Removed preinclude config from asm flags 2016-08-03 13:49:50 -05:00
Russ Butler 7b65eb2d9e Remove NRF51_MICROBIT from 2.0 rtos testing
The micro:bit is running rtos tests, even though this is a 16K device
that should not be using multiple threads. This patch removes it from
the 2.0 RTOS tests.
2016-08-03 13:29:20 -05:00
Sam Grove 32b134e277 Merge pull request #2345 from pan-/fix_nrf51_export
Fix nrf51 export
2016-08-02 23:18:12 -05:00
Sam Grove d83157a6fa Merge pull request #2333 from bridadan/build-library-clean
Adding clean support back to build_library
2016-08-02 18:58:40 -05:00
Sam Grove e4db590789 Merge pull request #2330 from theotherjimmy/ds-5-toolchain
Add toolchain flag to DS-5 exporter
2016-08-02 17:18:35 -05:00
Sam Grove 76ea1ccb4a Merge pull request #2317 from geky/fix-ca-config-scan
[tools] Fixed infinite loop in config scan due to list comparison error
2016-08-02 17:05:13 -05:00
Vincent Coubard 80f296202c Fix goals for NRF51_DK makefile:
Now "all" depend on the project merged with the soft device,
the goal merged has been renamed into the file it generate and now depend
on the realization of $(PROJECT).hex
2016-08-02 22:55:15 +01:00
Vincent Coubard 0320f3b89e Change merged file name to $(PROJECT)-combined.hex . 2016-08-02 22:21:00 +01:00
Vincent Coubard 4223a257f9 Add the merge goal to the list dependent goals of all.
Fix import of the softdevice hex file.
2016-08-02 21:35:10 +01:00
Vincent Coubard 142e014a7f Add hex files to the exporter context. 2016-08-02 21:33:26 +01:00
Bogdan Marinescu c6c8d42b0f Merge pull request #2303 from theotherjimmy/export-asm-symbols
Add missing --preinclude and -input on assembly files
2016-08-02 20:57:39 +03:00
Jimmy Brisson 3873ccc232 Add -D options to iar assembler on export 2016-08-02 11:39:46 -05:00
Mihail Stoyanov a4c3469b7b Empty the multiprocessing queue before terminating it 2016-08-02 16:53:58 +01:00
Jimmy Brisson 965ffc3e28 Add CC_SYMBOLS to assembler invocation 2016-08-02 10:46:57 -05:00
Mihail Stoyanov 31a59c930d Allow targets to be reloaded using set_targets_json_location() 2016-08-02 11:42:21 +01:00
Brian Daniels 6df903f8a6 Adding clean support back to build_library
At some point, the actual code that did the "clean" for build_library was
removed. This also affected building and cleaning tests. This adds this
capability back to the build API.
2016-08-01 18:16:53 -05:00
Jimmy Brisson 9d0e65f47a Add toolchain flag to DS-5 exporter 2016-08-01 14:07:12 -05:00
Sam Grove c84e5d32c9 Revert "Force installation of dependencies in entry points" 2016-07-29 17:35:23 -05:00
Christopher Haster b45ec0ed76 [tools] Added specific config test for uvisor
Unlike other libraries, uvisor is currently integrated into the build
system, with special cases based on its addition as a feature. This
suggests we should also have tests for these special cases.
2016-07-29 12:31:54 -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
Jimmy Brisson 209cf9f167 Add config file inculde directory when present 2016-07-29 11:38:38 -05:00
Jimmy Brisson fed50f8f18 Add missing --preinclude and -input on assembly files
Except for IAR, it does not support the --preinclude option for assembly
files but all of the other exporters can. It was less code to remove it
in IAR than to explicitly add it in all of the other exporters.
2016-07-29 11:02:07 -05:00
Brian Daniels 7a07c386cb Enforcing 'standard' build for mbed OS 5.0 release
This PR enforces that the default_build in a target's definition in
hal/targets.json is set to standard to be included in the version 5
release.

This is being enforced because small builds do not support
multi-threading. This makes the capabilities more consistent across all
boards in the version 5 release.

NOTE: This removes the MOTE_L152RC and the LPC11U68
from the version 5 release list because the 'default_build' for these
targets is currently set to 'small'.
2016-07-28 18:47:49 -05:00
Bogdan Marinescu 36468c9acb Merge pull request #2281 from geky/tools-ca-set-arith-fix
[tools] Fix precedence issue in cumulative attribute set-arithmetic
2016-07-28 16:23:17 +03:00
Christopher Haster 63f9b03e35 [tools] Added test for removing features 2016-07-27 18:01:33 -05:00
Sam Grove 5df79393fc Merge pull request #2257 from theotherjimmy/install-deps
Force installation of dependencies in entry points
2016-07-27 16:49:12 -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
Brian Daniels 0e4b78f840 Changing 'release' key to 'release_versions'.
The key 'release' in hal/targets.json is ambiguous. This changes the key
to 'release_versions' to emphasize that the entries should be version
numbers/strings and that it should be an array, not a singular value.
2016-07-27 13:38:02 -05:00
Brian Daniels 45cb6c6bd0 MCU-Toolchain matrix: release versions and default to mbed OS 5
This modifies the behavior of 'mcu_toolchain_matrix' in build_api.py. It
now prints release version support in the matrix. It also defaults to only
showing targets in mbed OS 5. You can still show older release versions by
modifying the 'release_version' parameter of the function.
2016-07-27 13:36:53 -05:00
Brian Daniels edc580758e Adding concept of release versions for targets.
Previously, the condition for including a target in a release was decided
by a 'release' key being set to 'true' in hal/targets.json. This doesn't
have enough granularity when we release multiple versions of mbed. This PR
changes the 'release' key to an array of strings, where each member is a
version that the target supports. Currently the valid versions are '2' and
'5'.

This PR also adds more robust checking for invalid target configurations
in a release. This is enforced whenever the release list is built from the
data, preventing invalid targets from coming into the release.

Finally, it updates the build_release.py script to use the new api for
fetching release targets.
2016-07-27 13:36:52 -05:00
Sam Grove b171a9c4b8 Merge pull request #2202 from 0xc0170/dev_progen_improvements
Export - define ProGenDef outside of the loop
2016-07-27 02:46:56 -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
Sam Grove 64928b02df Merge pull request #2244 from bridadan/test-discovery-refactor
Test discovery refactor
2016-07-26 15:45:41 -05:00
Sam Grove 5d7317626c Merge pull request #2249 from c1728p9/client_nanostack_and_seperated
Client nanostack and seperated
2016-07-26 14:30:33 -05:00
Jimmy Brisson 0a2c35c62b Force installation of dependencies in entry points 2016-07-26 14:08:26 -05:00
Sam Grove f9d38bff37 Merge pull request #2062 from bridadan/shorten-test-binary-name
Changing name of test binaries to just test case folder name.
2016-07-26 00:24:08 -05:00
Sam Grove 381b352df5 Merge pull request #2168 from c1728p9/remove_float_printf
Remove floating point formatting in newlib nano
2016-07-26 00:20:45 -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
Brian Daniels 7b20b0f8f7 Making mcu and toolchain required parameters for test.py
Also renaming 'target' variable to 'mcu' to match make.py
2016-07-25 14:44:09 -05:00
Brian Daniels 1618e608e7 Test discovery now uses build and toolchain logic
Previously, test discovery throught test.py used its own logic to find
tests. This was mostly a subset of the rules used during the build
process. It respected .mbedignore files, but it did not respect TARGET_,
TOOLCHAIN_, and FEATURES_ directories. This change now uses the same logic
used during building to respect these folders. Tests under these folders
that are not being pulled in for the given target will be ignored.
2016-07-25 14:43:52 -05:00
Sam Grove 03e99031e7 Merge pull request #2225 from theotherjimmy/fix-project-args-traceback
Fix #2223
2016-07-22 18:03:25 -05:00
Brian Daniels 51c575dcc6 Fixed traceback in build_api (typo of resources variable in build_library) 2016-07-22 17:49:54 -05:00
Sam Grove aec3695cc5 Merge pull request #2188 from screamerbg/build-common
[Tools] Unify common routines in build_api.py
2016-07-22 17:04:25 -05:00
Mihail Stoyanov ac86584c42 Unify common routines in build_api.py
Introduce prepare_toolchain() which handles:
 * deduplication of src_paths
 * config initialization
 * toolchain initialization
 * toolchain flags
 * returns toolchain
Introduce scan_resources() which handles:
 * scanning of sources
 * scanning of include dirs
 * inclusion of addition include dirs
 * returns resources
2016-07-22 22:21:39 +01:00
Sam Grove 1880daef0d Merge pull request #2215 from geky/tools-cumulative-overrides
[tools] Modified config to aggregate cumulative overrides against targets
2016-07-22 16:16:41 -05:00
Jimmy Brisson a603bb0e01 Fix "project.py --help - typerror type argument unexpected" (#2223) 2016-07-22 12:59:57 -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
Sam Grove f817ec136c Merge pull request #2142 from theotherjimmy/anti-remove-repo
[tools-build,make,test] Disallow parent of repo as --build args
2016-07-21 22:11:28 -05:00
Sam Grove b10276cbef Merge pull request #2173 from theotherjimmy/abstract-base-class
[toolchains]Abstractify the mbedToolchain base class.
2016-07-21 22:10:49 -05:00
Sam Grove 702707dee7 Merge pull request #2166 from theotherjimmy/prevent-traceback-during-export
Preventing a traceback when a library is not built during export
2016-07-21 22:09:52 -05:00
Martin Kojtal dd010097ba Merge pull request #2159 from jeromecoutant/PR_dev_NUCLEO_F207ZG
New STM32 board : NUCLEO_F207ZG
2016-07-21 11:13:33 +01:00
0xc0170 3f5c794b6c Export - define ProGenDef outside of the loop
This saves ~329 calls.
2016-07-21 09:41:38 +01:00
Bogdan Marinescu 51540d08d5 Merge pull request #2177 from mbedmicro/build_on_config_change
Rebuild sources if configuration is changed
2016-07-20 14:52:08 +03:00
Jimmy Brisson 9759382166 prevent test form removeing the root dir 2016-07-19 09:33:03 -05:00
Jimmy Brisson 52855b53cf [tools-build,make,project] Disallow parent of repo as --build args
Resolves #2081
2016-07-19 09:32:44 -05:00
Jimmy Brisson 684644b1b1 [project.py] Preventing a traceback when a library is not built during export 2016-07-19 08:58:24 -05:00
Bogdan Marinescu fd757d3b84 Merge pull request #2180 from mbedmicro/online-build-system
[Tools] mbed Online Build System support and improvements
2016-07-19 16:30:48 +03:00
Mihail Stoyanov ad87f9da34 Document code and mark which methods are used by the online build system 2016-07-19 11:16:05 +01:00
Mihail Stoyanov 74b7f9e923 mbed Online Build System support:
* added/improved global chroot support
* added RESPONSE_FILES flag to support optional response files (on linux the cmd param length is 2 megabytes). Default True
* added unified handling for archive and link response file (similar to includes)
* added COMPILE_C_AS_CPP flag to support compiling of c files as cpp. Default False
* added mbedToolchain.init() for post __init__ hooks
* added caching to mbedToolchain.need_update() to reduce IO hits
* added support to identify compiler warning/error column (supports ARMCC, GCC and IAR). Errors/warnings now report file@line,col
* added global TOOLCHAIN_PATHS which allows overriding/changing of the toolchain paths. Also simplified ARM-related paths
* added target.json to mbed library release (by @0xc0170)* migrated compile_worker() to utils.py for lightweight thread initialization
* improved run_cmd() performance by removing unnecessary check about the command being executed (should be checked once in the relevant toolchain instead)
* removed remnants of Goanna support (should be reimplemented as hooks to compile/link/archive instead)
* fixes for Python 2.7 compatibility (by @0xc0170)
* fixes for Exporters (by @0xc0170)
2016-07-19 11:14:42 +01:00
Martin Kojtal 5cd73170ba Merge pull request #2185 from yogpan01/master
Changing -O2 parameter to -Os
2016-07-19 10:42:34 +01:00
Bogdan Marinescu 8ab89c1131 Merge pull request #2175 from mbedmicro/release
Release v122
2016-07-19 11:34:15 +03:00
Bogdan Marinescu 474915c22c Merge pull request #2186 from 0xc0170/fix_issue2183
Fix issue2183
2016-07-19 11:31:35 +03:00
0xc0170 edf015ad92 Merge branch 'master' into release
Conflicts:
	tools/export/uvision4.py
	tools/export/uvision5.py
2016-07-19 08:44:34 +01:00
0xc0170 028f722868 uvision5 - remove init, not used 2016-07-19 08:30:35 +01:00
0xc0170 f80b62ed00 exporter - fix TARGETS property via descriptors
Fixes #2183 issue.
2016-07-19 08:30:21 +01:00
0xc0170 bf2ad16c69 project - zip and src check if empty fix
Regression from #2179. Fixes #2184.
2016-07-18 15:47:01 +01:00
Yogesh Pande e6043daa04 Changing -O2 parameter to -Os
This commit includes
- Changing build option parameter from -O2 to -Os to reduce flash size of the
  final binary pacakge.
  The original parameter of -O2 is kept to circumvent the error
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762 .
 But this error has been long fixed and released in latest 4.9.x GCC compiler.

 This change is necessary to reduce the generated binary size of mbed Client component to
avoid problem of getting images over 512 kB which is causing application to crash because of
Configuration Store problem https://github.com/ARMmbed/configuration-store/issues/21
2016-07-18 13:59:39 +03:00
Martin Kojtal 3ea625c8eb Merge pull request #2161 from PrzemekWirkus/devel_memap_summary_fields
[Tools] Replace in memap CSV report fields
2016-07-18 11:41:18 +01:00
Mihail Stoyanov 4e1ac4dba2 Merge pull request #2179 from sarahmarshy/progen_build_tests_v2
IDE build tests with progen
2016-07-16 17:54:46 +01:00
Martin Kojtal 7251a8ccae Merge pull request #2176 from 0xc0170/fix_#2171
Exporters - progen TARGETS lazy evaluated
2016-07-15 23:55:48 +01:00
Sarah Marsh b969fa5bb1 IDE build tests with progen 2016-07-15 13:25:35 -05:00
Jimmy Brisson bccbe48f3f Updated all docstrings to be compatible with PEP 257
It's nicer to be compatible with the standards.

I have added one more field to the description of each function:
Side effects. This feild contains the expected side effects of
running a particular method. If the side effects of a method are
None, it is expected that the function does not change anything in
any envoronment and that running it multiple times with the same
arguments will produce the same result every time. That is when
Side effects is non, the method is expected to be pure.
2016-07-15 10:51:47 -05:00
Jimmy Brisson 4fc8c56410 Replace pass with rais NotImplemented in each abstact method
The methods themselfes do nothing within the abstract base class
mbedToolchain. This change enforces that toolchains do not call
these methods that contain no implementation.
2016-07-15 10:17:35 -05:00
Jimmy Brisson f6b8cf05b0 Add a test that exercises the abstract base class checking
The test simply tries to instantiate each class exposed as part of the
TOOLCHAIN_CLASSES map. This is a test that each toolchain class
implements the required API, as the mbedToolchain will not allow the
instantiation of a subclass without a part of that API.
2016-07-15 10:10:40 -05:00
Jimmy Brisson 17833e8f58 Abstractify the mbedToolchain base class
The mbedToolchain class calls many members of it's subclasses, expecting
them to implement a particular API. This change adds a requirement to
each subclass that requires them to implement this expected API.

The API consists of these methods:
 - parse_dependencies
 - parse_ouptut
 - get_config_option
 - compile_c
 - compile_cpp
 - link
 - archive
 - binary
2016-07-15 10:07:56 -05:00
Bogdan Marinescu a558c49240 Rebuild sources if configuration is changed
This commit adds a check for configuration data changes. If a change in
configuration data is detected, all the sources in the tree are rebuilt.

This is a fix for #2073. #2162 was originally proposed as a fix, but it
was agreed that `--preinclude` is a more convenient way to include
configuration data, since it can be used to change the behaviour of
source files that don't include "mbed_config.h" directly, which is a big
advantage when importing 3rd party source trees. Compared to #2162, this
commit has the disadvantage of rebuilding all the source files if a
configuration change is detected, but it was agreed that the advantage
of using `--preinclude` outweighs the disadvantage of the increased
compilation time.
2016-07-15 16:37:46 +03:00
0xc0170 f95265f38d Exporters - progen TARGETS lazy evaluated
To speed up project.py, use @property for TARGETS.
When exporters are used, it would ask progen for all targets support
(number of tools x number of targets), this takes a lot of  time, thus
lazily evaluated, and TARGETS are for backaward compatibility, not currently
used by project.py but by other scripts to check if a target is supported.

Profiling:
```
python tools\project.py -m K64F -i uvision -n MBED_10 -b

Before the change:
       1    0.000    0.000    0.010    0.010 definitions.py:113(get_tool_definition)
      824    0.004    0.000    2.990    0.004 definitions.py:124(is_supported)
        1    0.000    0.000    0.000    0.000 definitions.py:145(get_debugger)
        1    0.002    0.002    0.044    0.044 definitions.py:15(<module>)
      384    0.002    0.000    2.986    0.008 definitions.py:26(_load_record)
        1    0.000    0.000    0.000    0.000 definitions.py:32(ProGenMcus)
      992    0.055    0.000    1.959    0.002 definitions.py:34(__init__)
     1376    0.002    0.000    0.003    0.000 definitions.py:40(get_mcus)
      384    0.001    0.000    1.070    0.003 definitions.py:43(get_mcu_record)
        1    0.000    0.000    0.000    0.000 definitions.py:50(ProGenTargets)
      992    0.000    0.000    0.000    0.000 definitions.py:52(__init__)
     1196    0.002    0.000    0.004    0.000 definitions.py:55(get_targets)
      204    0.001    0.000    1.922    0.009 definitions.py:58(get_mcu_record)
        1    0.000    0.000    0.000    0.000 definitions.py:67(get_debugger)
        1    0.000    0.000    0.000    0.000 definitions.py:74(ProGenDef)
      992    0.008    0.000    1.973    0.002 definitions.py:83(__init__)

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 4
Milliseconds      : 723
Ticks             : 47237302
TotalDays         : 5.46728032407407E-05
TotalHours        : 0.00131214727777778
TotalMinutes      : 0.0787288366666667
TotalSeconds      : 4.7237302
TotalMilliseconds : 4723.7302

After the change:

        1    0.000    0.000    0.010    0.010 definitions.py:113(get_tool_definition)
        2    0.000    0.000    0.025    0.012 definitions.py:124(is_supported)
        1    0.000    0.000    0.000    0.000 definitions.py:145(get_debugger)
        1    0.002    0.002    0.042    0.042 definitions.py:15(<module>)
        3    0.000    0.000    0.035    0.012 definitions.py:26(_load_record)
        1    0.000    0.000    0.000    0.000 definitions.py:32(ProGenMcus)
        2    0.000    0.000    0.005    0.002 definitions.py:34(__init__)
        5    0.000    0.000    0.000    0.000 definitions.py:40(get_mcus)
        3    0.000    0.000    0.000    0.000 definitions.py:43(get_mcu_record)
        1    0.000    0.000    0.000    0.000 definitions.py:50(ProGenTargets)
        2    0.000    0.000    0.000    0.000 definitions.py:52(__init__)
        5    0.000    0.000    0.000    0.000 definitions.py:55(get_targets)
        3    0.000    0.000    0.035    0.012 definitions.py:58(get_mcu_record)
        1    0.000    0.000    0.000    0.000 definitions.py:67(get_debugger)
        1    0.000    0.000    0.000    0.000 definitions.py:74(ProGenDef)
        2    0.000    0.000    0.005    0.003 definitions.py:83(__init__)

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 1
Milliseconds      : 178
Ticks             : 11780618
TotalDays         : 1.3634974537037E-05
TotalHours        : 0.000327239388888889
TotalMinutes      : 0.0196343633333333
TotalSeconds      : 1.1780618
TotalMilliseconds : 1178.0618
```
2016-07-15 14:02:57 +01:00
Martin Kojtal 3d20b10b4d Merge pull request #2172 from theotherjimmy/enfoce-supported-toolchains
[tools-build.py]Enforce supported toolchains
2016-07-15 09:02:14 +01:00
Martin Kojtal 3a2b752169 Merge pull request #2174 from theotherjimmy/return-from-build
[tools/build_api] Retrun truthy value on success from build_*
2016-07-15 09:01:31 +01:00
Sam Grove eca0c69e6c Merge pull request #2141 from theotherjimmy/project-argparse
[Project.py] Make -i and -m optional
2016-07-14 18:00:20 -05:00
Jimmy Brisson 6aa2bbb801 [tools/build_api] Retrun truthy value on success from build_*
before:
```
$  python tools/build.py  -m NRF51_DK --source . -t GCC_ARM,ARM --build build --silent
[SNIP]
Completed in: (3.39)s

Build skipped:
  * GCC_ARM::NRF51_DK
  * ARM::NRF51_DK

```
after:
```
$  python tools/build.py  -m NRF51_DK --source . -t GCC_ARM,ARM --build build --silent
[SNIP]
Completed in: (3.43)s

Build successes:
  * GCC_ARM::NRF51_DK
  * ARM::NRF51_DK

```
2016-07-14 13:55:51 -05:00
Jimmy Brisson 24fcb4700b [tools-build.py]Enforce supported toolchains
by skipping unsupported combinations
2016-07-14 13:29:55 -05:00
0xc0170 125754bf31 Exporter uvision - fix build_dir, only windows slashes allowed
uvision errors otherwise, not possible to create a path.
2016-07-14 14:21:05 +01:00
Russ Butler 546b5dec7c Remove floating point formatting in newlib nano
Remove special case targets which have floating point enabled in
Newlib Nano from gcc.py.  To enable floating point printf/scanf
for a target configure it to use the 'standard' default build in
targets.json rather than 'small'.
2016-07-13 18:48:43 -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 d0d023ab58 Merge pull request #2122 from theotherjimmy/colorized-output
Colorized the short Warnings/Errors generated by the toolchains
2016-07-13 14:21:15 +03:00
Przemek Wirkus bba13ddad2 Replace in memap CSV report fields
Changes:
* This change impacts #2047
* In code summary columns were shortened and names changed a bit,
  see [here](https://github.com/mbedmicro/mbed/pull/2047/files?w=1#diff-f9cb941bde5647a5763e18fc220efc51R410)
* There is a need to allign memap CSV report fields (summary columns) with what
  is in code now. This discrapency may create problems when generating reports
  in the future. All columns should have the same name.
* memap CSV sumamry fields names changes:
  'total_static_ram' -> 'static_ram'
  'allocated_heap' -> 'heap'
  'allocated_stack' -> 'stack'

See example of discrepancy:

'total_static_ram' vs 'static_ram'
'allocated_heap' vs 'heap'
'allocated_stack' vs 'stack'

What is in code and presented with prettytable:

+----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+
| name                                   | target | toolchain | static_ram | stack |  heap | total_ram | total_flash |
+----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+
| tests-mbed_drivers-c_strings           | K64F   | GCC_ARM   |      11468 | 32768 | 65540 |    109776 |       74182 |
| tests-mbed_drivers-callback            | K64F   | GCC_ARM   |      11980 | 32768 | 65540 |    110288 |       88406 |
| tests-mbedmicro-rtos-mbed-threads      | K64F   | GCC_ARM   |      11468 | 32768 | 65540 |    109776 |       75918 |
| tests-mbedmicro-rtos-mbed-timer        | K64F   | GCC_ARM   |      10788 | 32768 | 65540 |    109096 |       68534 |
+----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+

vs CSV:

```
total_static_ram,allocated_heap,allocated_stack,total_ram,total_flash
10788,65540,32768,109096,67486
```

vs memstats_map.JSON:

```json
[
    {
        "module": "Fill",
        "size": {
            ".data": 4,
            ".bss": 2257,
            ".text": 173
        }
    },

    {
        "summary": {
            "total_flash": 67486,
            "allocated_stack": 32768,
            "total_static_ram": 10788,
            "total_ram": 109096,
            "allocated_heap": 65540
        }
    }
]
```
2016-07-13 11:25:04 +01:00
Bogdan Marinescu e9d225bb96 Merge pull request #2151 from mbedmicro/verbose_json_errors
More verrbose errors for JSON parsing
2016-07-13 10:29:31 +03:00
Bogdan Marinescu 33dd3fe8ad More verrbose errors for JSON parsing
This commit adds information about the location of problematic JSON
files when reporting a JSON parsing error.

Before this commit:

```
[ERROR] Expecting property name: line 7 column 9 (char 188)
```

After this commit:

```
Error parsing 'core/mbed_lib.json':
[ERROR] Expecting property name: line 7 column 9 (char 188)
```
2016-07-12 18:52:34 +03:00
jeromecoutant 8d3cdfea59 tools update to add NUCLEO_F207ZG 2016-07-12 16:38:11 +02:00
Bogdan Marinescu 9704edfca7 Fix add_py_targets and tests
Previously, add_py_targets assumed that it is not an error to add an
existing target if that target was previously added using
add_py_targets. This was done to aid testing, but it was weird, error
prone and broke with the latest changes to the caching mechanism. With
this commit:

- it is always an error to add a target that was previously added, which
  is much more consistent.
- tests for the configuration mechanism use the newly added
  'set_targets_json_location' function to clear the internal caches in
  targets.py (and thus all previously added custom targets). As a side
  effect, this commit also tests the 'set_targets_json_location'
  function itself.
2016-07-12 14:42:21 +03:00
Bogdan Marinescu 117b21df8f It's now possible to specify the location of targets.json
With this change, it becomes possible to use targets.py with any
targets.json, not just the default one in ../hal/targets.json.
targets.py will still be initialized with the default targets.json, but
the code can then call "set_targets_json_location" to specify the new
location of targets.json. set_targets_json_location modifies all the
data "in place"; that is, it doesn't create a new TARGET_MAP,
TARGET_NAMES or alike, but rather modified the existing ones. This is
important, because code using this construct:

from tools.targets import TARGET_MAP

can work unmodified with this change.
2016-07-12 13:03:47 +03:00
Jimmy Brisson 50dbce9e74 Fixes to function caching in targets.py
Now funnctions are looked up in the cache using a (function name,
arguments) key, which makes it possible to cache different invocations
of the functions (with different arguments).
Also applied the @cached attribute to get_target.
2016-07-12 13:03:40 +03:00
Jimmy Brisson cebe292c5e [Project.py] Make -i and -m optional
Resolves #2135
2016-07-11 10:38:50 -05:00
Jimmy Brisson e2c88373ee Replace color definitions with colorama constants 2016-07-11 09:41:23 -05:00
Jimmy Brisson bac254c7a3 Add documentation of the notify parameter to mbedToolchain 2016-07-11 09:41:23 -05:00
Jimmy Brisson 12492c17b8 Call colorized notify when --color for build.py, make.py, test.py 2016-07-11 09:41:23 -05:00
Jimmy Brisson 6b8bde9471 Update event dict with toolchain, use toolchain for wrapping 2016-07-11 09:41:23 -05:00
Jimmy Brisson 21f025e601 Add a setting for colorization map so that it may be overwritten by the user 2016-07-11 09:41:23 -05:00
Jimmy Brisson 3aacdb4421 Implement colorization in it's own file 2016-07-11 09:41:23 -05:00
Jimmy Brisson f4254c4fee Add colorization option to default options parser
should be picked up by most cli's
2016-07-11 09:41:14 -05:00
0xc0170 359d33cc16 Revert part of the FPU change
We keep target.core names, it defines if CPU contains FPU, as it's common - Cortex M4F/M7F.
We add Cortex M7FD for double precision FPU.
2016-07-11 10:39:23 +01:00
Jimmy Brisson 61c63b3789 Argument error when memap's input file does not exist 2016-07-07 15:29:36 -05:00
Jimmy Brisson 122fa93a70 Allow make.py to accpet just --source 2016-07-07 15:29:36 -05:00
Jimmy Brisson 6d0716c69b Ignore extra MCUs and toolchains in get_config.py 2016-07-07 15:29:36 -05:00
Jimmy Brisson 254dccdad3 Remove checking for existance of build directory 2016-07-07 15:29:36 -05:00
Jimmy Brisson 7a4bee8c0e nargs="*" -> action="append" 2016-07-07 15:29:36 -05:00
Jimmy Brisson bca12206f1 Allow --source to be specified more than once 2016-07-07 15:29:36 -05:00
Jimmy Brisson 4c5bfaa3d8 Allow --source with -n and -p, or alone; name projects conditionally 2016-07-07 15:29:36 -05:00
Jimmy Brisson 5f18943641 Revert parsing of mutiple ides on command line 2016-07-07 15:29:36 -05:00
Jimmy Brisson 9040d27967 Rework the force types to match case
for example, argparse_force_uppercase_type will now correctly parse uARM to uARM
2016-07-07 15:29:36 -05:00
Jimmy Brisson b4b514ea2f Correct test_name_known, now use argparse_many for lists
also updated all consumers of test_name_known
2016-07-07 15:29:36 -05:00
Jimmy Brisson 5052e97b17 Force conversion of all -i, -m, -t to the correct case 2016-07-07 15:29:36 -05:00
Jimmy Brisson 6fda53b8b8 Add documentation for the argparser utilities 2016-07-07 15:29:36 -05:00
Jimmy Brisson 59ae690f9b Correct style in tests.py 2016-07-07 15:29:36 -05:00
Jimmy Brisson d6bee561ab Squash weird import bug 2016-07-07 15:29:36 -05:00
Jimmy Brisson 0ec8199c55 Revert "Revert "Generalize flag handling""
This reverts commit 33cec194c6.
2016-07-07 15:29:36 -05:00
0xc0170 935f537573 Build release - add copy targets.json file 2016-07-07 12:04:49 +01:00
Przemek Wirkus 12a01f61ca Add summary for test building
When users are building tests with `mbed compile --tests` whey will by default
get memory map breakdown report.
This can be suppresed in the future with command line switch. For now it is
visible each time users build test cases.
List is sorted by project name created with `build_project` API.

Changes:
* `build_project` now returns tuple (this breaks build_api.build_project API!)
* Memmap script got a aggregation function to print summary from small 'JSON'
  partial reports.
* Report is generated by `test_api.build_tests` function only!

Example:
```
+----------------------------------------------------------------------+--------+-----------+-------------+------------+-------+-------+-----------+
| name                                                                 | target | toolchain | total_flash | static_ram | stack |  heap | total_ram |
+----------------------------------------------------------------------+--------+-----------+-------------+------------+-------+-------+-----------+
| features-feature_ipv4-tests-mbedmicro-net-nist_internet_time_service | K64F   | GCC_ARM   |      132136 |      62288 | 32768 | 65536 |    160592 |
| features-feature_ipv4-tests-mbedmicro-net-tcp_client_echo            | K64F   | GCC_ARM   |      125613 |      62448 | 32768 | 65540 |    160756 |
| features-feature_ipv4-tests-mbedmicro-net-tcp_client_hello_world     | K64F   | GCC_ARM   |      125949 |      62448 | 32768 | 65540 |    160756 |
| features-feature_ipv4-tests-mbedmicro-net-udp_echo_client            | K64F   | GCC_ARM   |      123613 |      62276 | 32768 | 65536 |    160580 |
| features-storage-tests-cfstore-add_del                               | K64F   | GCC_ARM   |       96080 |      13052 | 32768 | 65540 |    111360 |
| features-storage-tests-cfstore-close                                 | K64F   | GCC_ARM   |       95520 |      12004 | 32768 | 65540 |    110312 |
| features-storage-tests-cfstore-create                                | K64F   | GCC_ARM   |       99144 |      13036 | 32768 | 65540 |    111344 |
| features-storage-tests-cfstore-example1                              | K64F   | GCC_ARM   |       98592 |      12368 | 32768 | 65536 |    110672 |
| features-storage-tests-cfstore-example2                              | K64F   | GCC_ARM   |       95232 |      12012 | 32768 | 65540 |    110320 |
| features-storage-tests-cfstore-example3                              | K64F   | GCC_ARM   |       95264 |      11856 | 32768 | 65536 |    110160 |
| features-storage-tests-cfstore-example4                              | K64F   | GCC_ARM   |       92632 |      12012 | 32768 | 65540 |    110320 |
| features-storage-tests-cfstore-example5                              | K64F   | GCC_ARM   |       92344 |      11856 | 32768 | 65536 |    110160 |
| features-storage-tests-cfstore-find                                  | K64F   | GCC_ARM   |       96344 |      13028 | 32768 | 65540 |    111336 |
| features-storage-tests-cfstore-find2                                 | K64F   | GCC_ARM   |       93192 |      12004 | 32768 | 65540 |    110312 |
| features-storage-tests-cfstore-flash                                 | K64F   | GCC_ARM   |       97784 |      12532 | 32768 | 65540 |    110840 |
| features-storage-tests-cfstore-flush                                 | K64F   | GCC_ARM   |       96464 |      12012 | 32768 | 65540 |    110320 |
| features-storage-tests-cfstore-flush2                                | K64F   | GCC_ARM   |       95056 |      12004 | 32768 | 65540 |    110312 |
| features-storage-tests-cfstore-init                                  | K64F   | GCC_ARM   |       93120 |      12012 | 32768 | 65540 |    110320 |
| features-storage-tests-cfstore-misc                                  | K64F   | GCC_ARM   |       96808 |      12516 | 32768 | 65540 |    110824 |
| features-storage-tests-cfstore-open                                  | K64F   | GCC_ARM   |       98632 |      12540 | 32768 | 65540 |    110848 |
| features-storage-tests-cfstore-read                                  | K64F   | GCC_ARM   |       94112 |      12540 | 32768 | 65540 |    110848 |
| features-storage-tests-cfstore-write                                 | K64F   | GCC_ARM   |       94488 |      12004 | 32768 | 65540 |    110312 |
| features-storage-tests-flash_journal-basicapi                        | K64F   | GCC_ARM   |      104712 |      21236 | 32768 | 65540 |    119544 |
| frameworks-utest-tests-unit_tests-basic_test                         | K64F   | GCC_ARM   |       71534 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-case_async_validate                | K64F   | GCC_ARM   |       74598 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-case_control_async                 | K64F   | GCC_ARM   |       74630 |      11476 | 32768 | 65540 |    109784 |
| frameworks-utest-tests-unit_tests-case_control_repeat                | K64F   | GCC_ARM   |       72790 |      11452 | 32768 | 65540 |    109760 |
| frameworks-utest-tests-unit_tests-case_selection                     | K64F   | GCC_ARM   |       72302 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-case_setup_failure                 | K64F   | GCC_ARM   |       72630 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-case_teardown_failure              | K64F   | GCC_ARM   |       72790 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-control_type                       | K64F   | GCC_ARM   |       82462 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-minimal_async_scheduler            | K64F   | GCC_ARM   |       72182 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-minimal_scheduler                  | K64F   | GCC_ARM   |       71998 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup  | K64F   | GCC_ARM   |       71710 |      11460 | 32768 | 65540 |    109768 |
| frameworks-utest-tests-unit_tests-test_setup_case_selection_failure  | K64F   | GCC_ARM   |       71702 |      11468 | 32768 | 65540 |    109776 |
| frameworks-utest-tests-unit_tests-test_setup_failure                 | K64F   | GCC_ARM   |       71710 |      11468 | 32768 | 65540 |    109776 |
| tests-integration-basic                                              | K64F   | GCC_ARM   |       67566 |      10780 | 32768 | 65540 |    109088 |
| tests-integration-threaded_blinky                                    | K64F   | GCC_ARM   |       68326 |      10780 | 32768 | 65540 |    109088 |
| tests-mbed_drivers-c_strings                                         | K64F   | GCC_ARM   |       74438 |      11468 | 32768 | 65540 |    109776 |
| tests-mbed_drivers-callback                                          | K64F   | GCC_ARM   |       88310 |      11972 | 32768 | 65540 |    110280 |
| tests-mbed_drivers-dev_null                                          | K64F   | GCC_ARM   |       90213 |      10784 | 32768 | 65540 |    109092 |
| tests-mbed_drivers-echo                                              | K64F   | GCC_ARM   |       71918 |      11468 | 32768 | 65540 |    109776 |
| tests-mbed_drivers-generic_tests                                     | K64F   | GCC_ARM   |       77624 |      11468 | 32768 | 65540 |    109776 |
| tests-mbed_drivers-rtc                                               | K64F   | GCC_ARM   |       85854 |      11308 | 32768 | 65540 |    109616 |
| tests-mbed_drivers-stl_features                                      | K64F   | GCC_ARM   |       80726 |      11476 | 32768 | 65540 |    109784 |
| tests-mbed_drivers-ticker                                            | K64F   | GCC_ARM   |       70974 |      11308 | 32768 | 65540 |    109616 |
| tests-mbed_drivers-ticker_2                                          | K64F   | GCC_ARM   |       70790 |      11308 | 32768 | 65540 |    109616 |
| tests-mbed_drivers-ticker_3                                          | K64F   | GCC_ARM   |       71038 |      11308 | 32768 | 65540 |    109616 |
| tests-mbed_drivers-timeout                                           | K64F   | GCC_ARM   |       70886 |      11308 | 32768 | 65540 |    109616 |
| tests-mbed_drivers-wait_us                                           | K64F   | GCC_ARM   |       70414 |      11308 | 32768 | 65540 |    109616 |
| tests-mbedmicro-mbed-attributes                                      | K64F   | GCC_ARM   |       71534 |      11460 | 32768 | 65540 |    109768 |
| tests-mbedmicro-mbed-call_before_main                                | K64F   | GCC_ARM   |       73112 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-mbed-cpp                                             | K64F   | GCC_ARM   |       73400 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-mbed-div                                             | K64F   | GCC_ARM   |       73176 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-rtos-mbed-basic                                      | K64F   | GCC_ARM   |       68390 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-rtos-mbed-isr                                        | K64F   | GCC_ARM   |       74480 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-rtos-mbed-mail                                       | K64F   | GCC_ARM   |       74992 |      11300 | 32768 | 65540 |    109608 |
| tests-mbedmicro-rtos-mbed-mutex                                      | K64F   | GCC_ARM   |       74048 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-rtos-mbed-queue                                      | K64F   | GCC_ARM   |       74912 |      11300 | 32768 | 65540 |    109608 |
| tests-mbedmicro-rtos-mbed-semaphore                                  | K64F   | GCC_ARM   |       74296 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-rtos-mbed-signals                                    | K64F   | GCC_ARM   |       74328 |      10780 | 32768 | 65540 |    109088 |
| tests-mbedmicro-rtos-mbed-threads                                    | K64F   | GCC_ARM   |       75214 |      11460 | 32768 | 65540 |    109768 |
| tests-mbedmicro-rtos-mbed-timer                                      | K64F   | GCC_ARM   |       68430 |      10780 | 32768 | 65540 |    109088 |
| tests-storage_abstraction-basicapi                                   | K64F   | GCC_ARM   |      107808 |      28908 | 32768 | 65540 |    127216 |
+----------------------------------------------------------------------+--------+-----------+-------------+------------+-------+-------+-----------+
```

Refactored after code review

Refactored parse() function

Polishing

Moved memory usage reporting function call to test.py to group all reporters in one place

Bug-fix: on ARM toolchain we were not fetching statistics from last element of memap result list
2016-07-07 08:35:20 +01:00
Sam Grove 458b46c803 Merge pull request #1873 from theotherjimmy/file-reporter
Adds a simple text file report format
2016-07-06 16:45:43 -05:00
Sam Grove 36ff1f73ce Merge pull request #2106 from theotherjimmy/fix-makefile
[Exporter-gcc_arm] do builds from project directory when --source is specified
2016-07-06 15:33:28 -05:00
Jimmy Brisson 3697dedb78 Reverse order of relativizing paths and unixifing paths
'cause windows silly path separator is the same as the escape character
2016-07-06 13:54:33 -05:00
Jimmy Brisson 3cf8bfbfb7 Allow spaces in paths passed to mkdir and rm on bash 2016-07-06 12:51:14 -05:00
Jimmy Brisson fbccf8dfc9 Force shell use when in bash/sh mode 2016-07-06 12:49:38 -05:00
Jimmy Brisson c2d66865be Correct batch detection algorimthm
There are two shell-like things that we care about
 bash: does environment varible expansion with $
 batch: does environment varible expansion by surrounding something with %

so to detect batch, try to expand a variable on the shell with $.
If you get a $ back, you are in batch!
2016-07-06 11:32:01 -05:00
Martin Kojtal e237d157dd Merge pull request #2113 from ohagendorf/gcc_export
[bugfix gcc_arm] build+make <-> export project+make: different results
2016-07-06 13:49:10 +01:00
Olaf Hagendorf bd614a2a11 [bugfix gcc_arm] build+make <-> export project+make: different results
when in target.json "default_build": "small" is configured
- build.py+make.py
  - uses linker option --specs=nano.specs
  - macro MBED_RTOS_SINGLE_THREAD is defined
- exporting with project.py + make Makefile
  - doesn't use the linker option --specs=nano.specs
  - doesn't contain macro MBED_RTOS_SINGLE_THREAD
2016-07-06 13:35:09 +02:00
Olaf Hagendorf 7f2f0bc5c6 repairing a minor typo in exporters.py 2016-07-06 13:34:59 +02:00
Bogdan Marinescu b8c64cd275 Merge pull request #2102 from mbedmicro/fix_tests_with_config
Fix tests with config
2016-07-06 11:09:20 +03:00
Jimmy Brisson 61ee30efb2 Fix normal export (no --source) 2016-07-05 12:04:36 -05:00
Jimmy Brisson fa527cf45e Rework vpaths and include file locating 2016-07-05 11:51:27 -05:00
Jimmy Brisson 4b7f591d33 Fix the makefile template
- Corrects a python barf when something in features is None
 - Corrects makefile to prevent barf when using make -f
2016-07-05 10:16:50 -05:00
Bogdan Marinescu fbb26a405c Fix tests.py so it can work with application defined targets
With this patch in place, tests.py uses targets names instead of target
instances, which makes it possible to use application defined targets
with tests.
2016-07-05 15:52:53 +03:00
Bogdan Marinescu 36a577e1ef Make build_tests work with target names, not just Target instances
With this change, custom targets defined by the application being
tested in its mbed_app.json file can be used with tests. Note that
`build_project` already accepts both target names and instances, so the
call to `build_project` inside `build_tests` will still work.
2016-07-05 15:47:26 +03:00
Bogdan Marinescu e3d29fe5d2 Improve configuration handling in build_project
The configuration object is now created early in the build_project
function. This way, if there's a mbed_app.json that contains a custom
target, that target is taken into account. This is useful (for example)
when compiling tests for an application that defines a custom target.
2016-07-05 15:40:12 +03:00
0xc0170 3b84b42a53 Build release - use target.release to produce release tuple 2016-07-05 10:50:29 +01:00
Olaf Hagendorf 4fe41d4edd fpu with single/double precision - removing redundancy
- removing redundancy as discussed in PR #2087:
 - in target.json the core option can have only this values : "Cortex-M0", "Cortex-M0+", "Cortex-M1", "Cortex-M3", "Cortex-M4", "Cortex-M7", "Cortex-A9" - Cortex-M4F and Cortex-M7F removed
 - in target.json an additional fpu option with values: "single" and "double" can be used
- build and export scripts are changed to handle this

- tested (compiling, running on hardware) with nucleo_f767 (cortex-m7 with double precision fpu), nucleo_f746 (cortex-m7 with single precision fpu), nucleo_f446 and nucleo_l467 (cortex-m4 with single precision fpu), teensy31 (cortex-m4 without fpu - only build test), nucleo_l073 (cortex-m0)
- singletest results are added to PR #2087 comments
2016-07-04 22:08:31 +02:00
Olaf Hagendorf ea196e2adb fpu with single/double precision - bugfix and extension
- creating new core name Cortex_M7F_DP for a target with a double precision fpu
- adding new core name to arm.py to set compiler/linker flags to a double precision fpu when configured in target.json
- up to now: gcc wrote flag for a double precision fpu -> target with STM32F746 didn't run when using double variables - mcu has only single precision fpu
- changing gcc.py to use single precision for Cortex-M7 und double precision for Cortex_M7F_DP

tested with NUCLEO_F746, NUCLEO_F767 and build.py+make.py and exporting with project.py + compiling/flashing

- iar.py need a similar extention - I didn't change that yet because
  - did not run at the moment - python exception
  - currently worked on in PR #1948
2016-07-04 22:08:30 +02:00
Erwan GOURIOU eaf77ed37f [STM32F4xx][NUCLEO_F429ZI] Add on for NUCLEO_F429ZI export and tests 2016-07-04 15:20:12 +02:00
Erwan Gouriou 9bb08291ce [STM32F4xx] Add support for NUCLEO_F429ZI 2016-07-04 14:00:41 +02:00
Laurent Meunier 4e1a3351b2 [NUCLEO_F446ZE] Add to build and export scripts 2016-07-04 11:44:28 +02:00