Commit Graph

753 Commits (96e1d5bd7339acc9624f7fdb5edbf637affdc9a3)

Author SHA1 Message Date
Brian Daniels 69448d7d8d Copying main config json file for mbed lib builds 2016-09-29 16:08:16 -05:00
Jimmy Brisson 73e811a9a0 Fix style of implementation of toolchain profiles 2016-09-29 10:20:05 -05:00
Jimmy Brisson fd04ea2125 Added property based regression test to travis 2016-09-29 10:20:05 -05:00
Jimmy Brisson d88852d150 Replace -o with profiles 2016-09-29 10:20:05 -05:00
Jimmy Brisson df32effd8a Add profiles for default, nanolib, and debug 2016-09-29 10:20:03 -05:00
Seppo Takalo f91d8eb4c3 Add Nanostack configurations 2016-09-29 13:52:15 +03:00
Brian Daniels abb6d2681e Adding memap tests and adding to travis ci 2016-09-28 17:27:25 -05:00
Jimmy Brisson ceda396e18 Add simple build profiles to toolchains 2016-09-28 17:25:24 -05:00
Brian Daniels 10534019b9 Making all toolchains print final compiler message.
This functionality was already present in the ARM toolchain script, but
this commit adds this across all toolchain scripts. Solves an issue that
cropped up where a build error wasn't being printed unless the verbose
flag was used. This should now print any existing error messages that have
been printed when the compiler output is being parsed.
2016-09-28 14:42:35 -05:00
Brian Daniels cadcc80371 Handling Exceptions better when building tests
Previously, when building tests with test.py, if an exception occurred, the
error message would be masked by the function 'build_tests'. This commit
handles NotSupportedExceptions and ToolExceptions, but lets all other
Exceptions propigate up to the caller function. In most cases, this is the
CLI scripts, which will print a traceback. This will allow us to better
debug the python tools if errors occur.
2016-09-28 14:13:23 -05:00
Brian Daniels 1448aa5770 Limiting uvisor example to just GCC_ARM toolchain 2016-09-28 13:09:11 -05:00
Brian Daniels 53ecfdb856 Adding the ability to filter examples by toolchains
This change was driven by the fact that certain
examples only support a subset of the toolchains.
2016-09-28 13:04:14 -05:00
Javier Gomez Moreno f8af872870 Added -d paremeter to unfold 'Misc' contents in memap.py 2016-09-28 11:58:27 +02:00
svastm 4226a17d6f SW4STM32 - Use targets.json to find fp config 2016-09-28 10:26:26 +02:00
Sam Grove f22d5a7415 Merge pull request #2811 from bcostm/fix_sw4stm32_exporter_fpu
Fix sw4stm32 exporter fpu
2016-09-27 21:54:10 -07:00
Sam Grove 816f028c5a Merge pull request #2756 from theotherjimmy/export-bld-dir
exporters - Add .bld directories to exported project
2016-09-27 21:52:57 -07:00
Brian Daniels e8b06874a3 Making memap output consistent across output formats
This commit fixes an issue where the output from memap.py was not
consistent across all output formats. This issue stemmed from the fact
that a few important calculations were being performed at output
generation time. This has been moved to the 'parse' function and saved for
future use by the 'generate' functions.

Because this commit saves more data to the MemapParser instance, there
were some name collisions. The public member 'mem_summary' has been
renamed to 'mem_report'. 'mem_report' contains the data structure used by
the json generator. This includes both the section data and the memory
summary. The 'mem_summary' member now just contains the summary. The
summary includes total allocated heap, total static RAM, etc.
2016-09-27 16:51:16 -05:00
Sarah Marsh a8213e7441 ARMC5 pyocd settings do not load executable 2016-09-27 16:08:30 -05:00
Sarah Marsh 32b1203b6c Generic makefile in eclipse 2016-09-27 16:08:29 -05:00
Sarah Marsh f949a6d4f8 Initial Eclipse suport 2016-09-27 16:08:17 -05:00
bcostm 89430b95bb Remove extra spaces 2016-09-27 16:35:34 +02:00
Sarah Marsh d166c9a1bf Removed --no_static_destruction from IAR IDE flags 2016-09-26 23:08:56 -07:00
bcostm 464dbc446b Correct fpu option for Cortex-M7FD devices 2016-09-26 15:56:46 +02:00
Martin Kojtal 93e9b486aa Merge pull request #2712 from bridadan/test-building-and-config
Fixing constant cleaning when compiling tests
2016-09-26 09:54:33 +01:00
bcostm e4c2ea8e55 Add tabs 2016-09-26 10:36:36 +02:00
bcostm d1902def21 sw4stm32 exporter - add hw floating point option 2016-09-26 10:30:56 +02:00
Sam Grove 28f9b27918 Merge pull request #2788 from theotherjimmy/print-percent
Print percent complete when building
2016-09-24 16:48:03 -05:00
Sam Grove acdab5e284 Merge pull request #2773 from sarahmarshy/quotes_error
[Exporters] [Makefile] Single quotes for escaping commands
2016-09-24 16:46:25 -05:00
Sam Grove 3c6776f9bf Merge pull request #2753 from jeromecoutant/PR_NUCLEO_F767ZI_CAN
[NUCLEO_F767ZI] Add CAN capability
2016-09-24 16:41:10 -05:00
Sam Grove aad2372df7 Merge pull request #2727 from jeromecoutant/PR_Serial_Init_Timeout
Serial init timeout: increase default value
2016-09-24 16:33:45 -05:00
Sam Grove 8e473be5f3 Merge pull request #2622 from egostm/dev_i2c_asynch
[STM32F4] Add asynchronous I2C
2016-09-24 16:27:20 -05:00
Sam Grove e9c556d356 Merge pull request #2757 from theotherjimmy/non-global-config
Refactor Target and Config away from global variables
2016-09-22 17:23:04 -05:00
Jimmy Brisson 2fe201cf10 Print percent complete when building 2016-09-22 15:10:03 -05:00
Sarah Marsh 16913b93a6 New build tests.
*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
2016-09-22 10:03:34 -05:00
Brian Daniels aeca796641 Fixing constant cleaning when compiling tests
This addresses the issue where building tests via test.py always triggered
a clean build. This is because the mbed_config.h file was being deleted from
the shared OS build to ensure that the correct config was always being
used. However, this contanstly triggered a rebuild of the OS since the
config file was not present.

Due to the shared build, having multiple app configurations that could
override the OS settings is not possible. For this reason, we now ignore
app config files unless explicitly set via the command line option
'--app-config'. Though there will now be two mbed_config.h files in the
include path of the build, it shouldn't matter since the contents will be
the same.
2016-09-22 08:30:21 -04:00
Erwan GOURIOU d7dda282c2 [dev_asynch_i2c] Extend asynch I2C to STM32F4 boards
Move i2c_s to common_objects.h
Introduce I2C Master/Slave asynch test
Test I2C asynch master/slave on STM32F4 boards
2016-09-22 09:52:21 +02:00
Erwan GOURIOU 8982ff1971 [dev_i2c] Fix I2C byte transfer API to enable Master/Slave test on F411RE
i2c_byte_write could be used to send byte and address.
In case used for address, ADDR Flag should be reset.
2016-09-22 09:39:10 +02:00
Erwan GOURIOU 4b42fc5a22 [dev_asynch_i2c] Test Asynch I2C on F411RE
Add single board I2C master/slave asynch test
2016-09-22 09:39:10 +02:00
Sam Grove 0c0455bf3f Merge pull request #2745 from pan-/disable_global_objects_destruction
Disable global objects destruction
2016-09-22 00:48:08 -05:00
Sam Grove 6fce892f05 Merge pull request #2614 from MarceloSalazar/uvision_default
Change default uvision exporter to uvision5
2016-09-22 00:46:18 -05:00
Sarah Marsh b39fbd3273 Use single quotes to escape make commands 2016-09-21 11:30:58 -05:00
Jimmy Brisson d4f9820577 Refactor Target and Config away from global variables 2016-09-20 16:09:22 -05:00
Jimmy Brisson ed3ee52c3b Add .bld directories to exported project 2016-09-20 15:33:00 -05:00
jeromecoutant 012f2c3353 [NUCLEO_F767ZI] Add CAN capability 2016-09-20 16:18:11 +02:00
Vincent Coubard f4f8b491d1 Override exit and atexit functions from newlib.
This change simplify the exit and initialization process.
It also reduce the number of hidden memory allocation made by atexit.
2016-09-19 15:17:39 +01:00
Vincent Coubard 2f0b772c77 Disable destruction of global C++ objects when IAR is used.
This behavior is realized by enabling the flag --no_static_destruction
when the compilerin the invoked.
2016-09-19 11:59:24 +01:00
Brian Daniels ba5ab753b1 Fixing missing import for os.path.exists 2016-09-17 21:12:47 -05:00
Sam Grove 663fdb796f Merge pull request #2721 from theotherjimmy/profile-documentation
tools - Add documentation about profiles to the toolcahins
2016-09-16 17:38:13 -05:00
Sam Grove bdf221349e Merge pull request #2697 from theotherjimmy/export-repos-togleable
tools-exporters! - disable inclusion of repo-dirs in zips by default
2016-09-16 17:33:55 -05:00
Sam Grove a6f4b58405 Merge pull request #2675 from sarahmarshy/toolchain_path_check
Revise checking toolchain path
2016-09-16 17:31:41 -05:00
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