Commit Graph

117 Commits (a70780fc1264eba4b8b8ead77c3d01cb07227e39)

Author SHA1 Message Date
Martin Kojtal 07c3a108ef Merge pull request #218 from screamerbg/use-memap
Add memory analysis to mbed-os build system
2016-06-07 12:57:59 +01:00
Martin Kojtal 9b707292a4 Merge pull request #211 from bridadan/fix-test-list
Fix test listing
2016-06-07 12:55:03 +01:00
Bogdan Marinescu 9bbc532f4f Merge pull request #186 from screamerbg/library-build-fix
Fix the differences between how projects and libraries are built
2016-06-07 12:35:52 +01:00
Mihail Stoyanov 647ba3da89 Add memory analysis via https://github.com/ARMmbed/memap for every successful compile. Memap generates thorough output of the memory map files generated by ARMCC5, GCC_ARM and IAR. Also save json file of the printed data.
Deprecate the use of elftools which are no longer needed
2016-06-07 10:22:06 +01:00
Brian Daniels 9e012bb2c2 Fixing traceback when listing tests 2016-06-06 22:41:15 +01:00
Brian Daniels 427664c789 Passing verbose option to build apis in test.py 2016-06-06 12:31:13 +01:00
Martin Kojtal c6b51d7fe3 Merge pull request #204 from theotherjimmy/1830-counterpart
added support for features array to build tools
2016-06-06 10:23:02 +01:00
Martin Kojtal b1aba7f3c4 Merge pull request #170 from bridadan/build_everything
Adding a "build everything" script
2016-06-06 10:00:11 +01:00
Jimmy Brisson 90ecda6b73 added support for features array to toolchains 2016-06-03 16:18:59 -05:00
Bogdan Marinescu 6f1298b02b Added support for viewing the configuration
get_config.py can be used to view the configuration of the mbed project
that's being compiled:

- without '-v' it displays a simple list of configuration parameters and
  their values
- with '-v' it displays additional data for each configuration parameter
  (like the place of definition and the last place that set a value for
   the configuration parameter).

Tested by running "get_config.py" on a few tests from
tools/test/config_test.
2016-06-03 19:06:21 +03:00
Mihail Stoyanov 4060efc830 This fixes the differences between how projects and libraries are built (build_project() vs build_library()). Issue #181 2016-06-02 15:51:31 +01:00
Bogdan Marinescu 0549b1e7c5 Added tests for the configuration mechanism
The tests check a number of features of the configuration mechanism
(mostly the inheritance and overriding of configuration parameters), as
well as the behavarious in various abnormal situations.
2016-06-02 15:09:56 +03:00
Bogdan Marinescu d83dc27fcf Add configuration mechanism
This commit adds the implementation of the configuration mechanism and
applies it for two uses cases:

- building a program (build_project in build_api.py)
- building a library (build_library in build_api.py)

There's also a new method 'get_config' in build_api.py that's used to
return the configuration of a project. Currently, it's used only for
testing, the intention is to use it for the implementation of the 'mbed
config' command.

Tested with various test configurations on the "blinky" example and also
with its own set of tests (to be added in a separate commit).

'make.py' was modified to send the target *name* to build_project, as
opposed to the target *instance*. This is needed because the
coniguration mechanism allows for creating custom targets, but these
targets are not available until the configuration file
mbed_app_config.json is parsed, which happens in build_project (so
before make.py calls 'build_project'). The API of build_project didn't
change, it now accepts both target names and target instances for the
'target' argument.

Known issues:

- doesn't currently work when doing binary builds of the SDK. Currently,
  building the SDK is broken in mbed-os, so this will be added later.
- when building tests, the build process ends up calling
  'build_project', so the configuration mechanism should play well with
  tests. However, this wasn't tested.

A later commit will all documentation for the configuration mechanism.
2016-06-02 15:09:52 +03:00
Bogdan Marinescu 031cc7fbc5 Added scanning for JSON files in the resource scanner
Also added a method to add new macros to the toolchain instance.
Both of these changes are needed by the configuration mechanism.
2016-06-02 11:32:58 +03:00
Bogdan Marinescu 7c920259cc Improvements to the targets implementation
- added a method that can be used to new targets dynamically (this
  will be used by the configuration mechanism).
- the JSON parser now keeps the order of the keys read from the JSON
  file (will also be used by the configuration mechanism).
- there's now a global target cache in targets.py, so that a target
  with a given name will only be created once.
2016-06-02 11:32:58 +03:00
Brian Daniels f649a2a2a8 Making the default number of build jobs 0 (auto/fully parallel) 2016-06-01 09:07:20 -05:00
Brian Daniels 8877ac40f6 Adding a script to build mbed OS and all tests for all targets and toolchains 2016-05-31 17:34:02 -05:00
Brian Daniels a333ec8ef0 Fixing issue with binary name.
There was an issue where the binary name was incorrectly set when building
from any directory that isn't the project root. This fixes that issue by
first getting the absolute path, then finding the binary name using that.
2016-05-31 12:41:12 -05:00
Martin Kojtal 583ed4320d Merge pull request #155 from bridadan/fix-binary-naming
Fixing issue where project_name was an empty string
2016-05-30 10:36:32 +01:00
Russ Butler 3dac400d38 Pull in mbedmicro/mbed
Pull in mbedmicro/mbed.  Make the following changes in addition:
- Ignore unused directories in mbed
- Add stub mbed-drivers/mbed.h for backwards compatibility
- Remove targets.json and instead use mbed's version
2016-05-28 00:40:59 -05:00
Russ Butler aa3c0deb70 Merge pull request #156 from theotherjimmy/mbedignore-fix
check for .mbedignore in root of source folders
2016-05-27 15:36:25 -05:00
Russ Butler 4443116172 Merge pull request #137 from bridadan/continue-test-build-if-fail
Allowing test builds to continue if one test build fails
2016-05-27 14:48:58 -05:00
Jimmy Brisson ba29012abb check for .mbedignore in root of source folders 2016-05-27 14:01:06 -05:00
Brian Daniels 6e4d74bc24 Fixing issue where project_name was an empty string 2016-05-27 12:00:26 -05:00
Jimmy Brisson 2d47ab1cdd projects are now named via command line -n 2016-05-27 09:46:03 +01:00
Jimmy Brisson d772ea7a00 Allowed multiple --source specifications on the export command
The project name is set to the first --source argument.
Resources (the class) is now a monoid.
2016-05-27 09:45:45 +01:00
Russ Butler bb17d6ada9 Rename disassembly file to fix testing with IAR
Disassembly files can unintentionally get picked up by the test build
system.  This patch changes the file extension on those files from
".s" to ".s.txt" so they are ignored.
2016-05-26 17:37:43 -05:00
Brian Daniels 6dbc9601f8 Reflecting build failures in the status code of the process 2016-05-26 09:20:24 -05:00
Brian Daniels 7a627b3fdd Allowing test builds to continue if one test build fails
This ensures that a build report is produced, even if a build fails. This
allows you to see what went wrong later.
2016-05-26 09:10:17 -05:00
Martin Kojtal c71e81b371 Merge pull request #122 from bridadan/test-script-macros
Adding macro option to test.py script
2016-05-26 13:12:01 +01:00
Martin Kojtal bfe4c20e4b Merge pull request #130 from bridadan/default-parallel-test-build
Defaulting to parallel builds for tests
2016-05-25 13:53:30 +01:00
Brian Daniels c29f66e851 Defaulting to parallel builds for tests 2016-05-24 16:44:42 -05:00
Russ Butler 960941cb0a Add IAR support
Make the following changes for IAR support:
-define __deprecated_message for IAR
-fix python error in iar.py
-move variable length array in buffered serial from cpp file to c file.
    IAR only supports variable length arrays in c.
2016-05-24 14:37:14 -05:00
Brian Daniels d676b19105 Adding macro option to test.py script 2016-05-24 09:10:37 -05:00
Bogdan Marinescu 8a6e9c3a26 Merge pull request #98 from ARMmbed/json_targets
Moved target definitions to JSON format
2016-05-24 12:58:59 +03:00
Sam Grove 42624d06af Merge pull request #89 from bridadan/test-build-reporting
Test build reporting
2016-05-24 08:18:25 +08:00
Brian Daniels 40cc3eef9e Splitting the upload of tests.
Added a parameter '-l' to control how many project runs are uploaded at a
time. The default is 1000. The prevents HTTP errors when the POST request
is too large.
2016-05-23 10:51:52 -05:00
Brian Daniels bc86aa92a0 Adding JUnit build reporting option to test.py 2016-05-23 10:50:22 -05:00
Brian Daniels ec2e4a1d6a Adding default id for the build report if no id is provided 2016-05-23 10:50:21 -05:00
Sam Grove 6c3ce1ea64 Merge pull request #112 from SeppoTakalo/master
Implement the .mbedignore functionality.
2016-05-23 23:30:44 +08:00
Sam Grove 59f5751b6d Merge pull request #113 from theotherjimmy/error-bad-source
added a check for existance of sources
2016-05-20 16:40:52 -05:00
Sam Grove c4ed177930 Merge pull request #68 from 0xc0170/dev_gcc_sizes
gcc - print section sizes
2016-05-20 15:49:28 -05:00
Sam Grove 373fb55441 Merge pull request #114 from c1728p9/iar_vla
Turn on variable length arrays in C for IAR
2016-05-20 15:36:21 -05:00
Bogdan Marinescu cdfa46c790 Fixes to the new targets code
It is now possible to remove a macro using "_remove" for both macros
without vale (MACRO) and macros with value (MACRO=VALUE) simply by
specifying the macro name.
2016-05-20 17:27:43 +03:00
Russ Butler c4986eed9f Create map file when building
Add compiler flags to ARM, GCC and IAR so map files get created.
2016-05-19 15:52:02 -05:00
Russ Butler 080f9e2371 Turn on variable length arrays in C for IAR
Turn on support for variable length arrays for the IAR C compiler.
This provides greater compatibility with GCC and ARMCC.

Note: The current version of iccarm at the time of this patch
(V7.40.3.8902) does not support variable length arrays in C++.
2016-05-18 19:58:46 -05:00
Jimmy Brisson f44b8fc9bf added a check for existance of sources
I ran into this earlier today and yesterday:
If you spelled something wrong/forgot to tab complete and had build succesfully before it woild silently and incorrectly build successfully
2016-05-18 17:28:33 -05:00
Seppo Takalo 3d3b0a771f Implement the .mbedignore functionality.
Check the content of `.mbedignore` files and try to match the file
patterns against the directories and source files found while travelling
the directory structure.

Every line in `.mbedignore` file is treated as a unix style glob pattern.
Before matching, the pattern is appended with its directory location, so
it will match only folder on same level, or deeper in the directory structure.

For example:
Directory ./source/test contains .mbedignore with content:
`unittest/*`

Then everything under ./source/test/unittest/ is ignored, including the
unittest folder itself.

Another example:
When .mbedignore file contains just `*`, then everything under the folder
it is located, is ignored. It won't even be added to include paths.
2016-05-19 00:23:37 +03:00
Martin Kojtal c357216217 Add static ram/rom info
After a build has been completed print out ram and rom usage.
The sizes shown are the same as those reported by
arm-none-eabi-size.exe.  The output looks like:

Memory sections sizes:
text                 37244
data                 60
bss                  7800
2016-05-18 15:55:10 -05:00
Mihail Stoyanov faa9ce76af Removed fixes intended for different PR 2016-05-17 19:46:42 +01:00