Commit Graph

48 Commits (a78554ebfac88da6d4f621c32ad5c0c29ff9b45f)

Author SHA1 Message Date
Martin Kojtal 5f1c77741a tools: fix SPDX identifiers 2020-02-21 07:01:48 +00:00
Brian Daniels b809ec6226 Make args_erroor less verbose.
This removes the arugment help from the output, making the error much
easier to find. This solves #10090.
2019-03-23 18:24:58 -05:00
Brian Daniels 08d9e32e63 Add utility functions and Exceptions
These functions will be used to handle some of the error state and
warning messages produced when the scripts attempt to select a valid
toolchain.
2019-03-23 18:24:57 -05:00
Naveen Kaje 176b750257 tools/utils: ensure default build profiles are processed first
The command-line argument '--profile' looks for build
profiles provided in mbed-os/tools/profiles/. If a
directory name exists in the root folder with the
same name as one of the profile names provided by
default [e.g debug/develop/release], that directory
is processed instead resulting in incorrect behavior.
Fix this behavior by processing the default profiles first.
2019-02-14 10:37:05 -06:00
Cruz Monrreal II 72dbc52715 Added flag to run_cmd Popen invocation to do default decoding 2019-01-28 12:59:43 -06:00
Oren Cohen dd73fa689c PSA SPM
* Intorduce PSA-SPM to mbed-os
* Add SPM tests (for PSA targets)
* Add PSA PRoT internal storage Secure implementation
* Integrate SPM into the boot proccess
* PSA manifest data generator
* Introduce PSA targets skeleton to mbed-os
* Add artifact delivery to the tools
2018-11-27 09:16:35 +02:00
Jimmy Brisson 190e77894f Merge duplicate keys in JSON.
### Description

I would love to make this an error, but we have had a duplicate key in
`targets.json` for a while now. Instead, we're merging in a semi-smart way.
This will allow you to have things like `"target.features_add"` twice, and
both will take affect.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
2018-10-23 11:23:33 -05:00
Cruz Monrreal be4bb9f610
Merge pull request #8177 from andrewleech/tools_json_python3
tools/utils: Fix issue with loading json files as ascii on python3 linux
2018-10-10 08:42:25 -05:00
Andrew Leech 41ff7b916b tools/utils: Fix issue with loading json files as ascii on python3 linux 2018-10-03 10:49:21 +10:00
Jammu Kekkonen 49572d570a Change update file format to binary to all targets
- Change the default file format to binary for all targets, even though some targets need hex as app format, updater always needs bin for now
- Unify the file name generation from generator side and usage side for the update bin
2018-09-18 12:13:29 +03:00
Olli-Pekka Puolitaival e27a26eb9d Icetea support 2018-08-31 11:51:57 +03:00
Jimmy Brisson 229a072e49 Convert option list to unicode 2018-03-14 11:03:39 -05:00
Anna Bridge 8f5b857747
Merge pull request #5950 from theotherjimmy/header-config
Reserve and Render header in managed BL mode
2018-03-01 16:25:18 +00:00
Jimmy Brisson 7b49edc7eb Simplify json-to-dict utility 2018-02-23 09:38:16 -06:00
Jimmy Brisson 9f99330be6 Allow overriding offsets with "app_offset" and "header_offset" 2018-02-20 11:45:32 -06:00
Jimmy Brisson c93a2bfa4c Python2+3: Use absolute import where possible 2018-02-05 11:07:37 -06:00
Jimmy Brisson 7abeec9744 Python2+3: clean argparse 2018-02-05 11:04:35 -06:00
Jimmy Brisson 68737f2762 Python2+3: Things import 2018-02-05 11:03:44 -06:00
Deepika d4f7291b9a Corrected the input to remove command 2017-11-15 11:31:30 -06:00
Jimmy Brisson 724112586d Fix a bug in print_large_string 2017-06-13 11:43:25 -05:00
Jimmy Brisson 9a63bfb1fb Enable boot-loader builds
To enable a boot-loader style application, override
"targets.bootloader_exec" or "targets.restrict_size" on a particular
target. These parameters are a bin or hex file, and an integer, in bytes,
respectively. If either override is present, then an application region
is created after the boot-loader region, when "targets.bootloader_exec"
is present, and before post-application, when "targets.restric_size" is
present. The size of the boot-loader region is read from the file
provided in the configuration.
2017-02-22 18:20:26 -06:00
Jimmy Brisson d9c8d1cdb8 Remove deprecated flags args
The tools will no longer accept `--cflags`, `--cppflags`, or
`--ldflags`. Instead, the ability to modify these flags is
provided by the `--profile` argument. Documentation for the
`--profile` argument may be found in
docs/Toolchain_Profiles.md
2016-12-09 12:08:52 -06:00
Brian Daniels 67c2ea771a Fixing project.py -S printing problem
Printing too large of a string can fail in Windows, as detailed here:
https://bugs.python.org/issue11395. This works around the problem by
adding a print_large_string function that breaks up the string into
smaller pieces before printing it.
2016-10-31 15:39:38 -05:00
Bartek Szatkowski 3af2c5ae14 Accept profile name as well as file path for tools/make.py --profile
--profile can be used with just a profile name eg. default, debug as
long as <name>.json file is in default profile directory.
2016-10-11 13:33:37 -05:00
Jimmy Brisson fe1cd87724 Remove flags safely in uvisions 2016-10-03 16:19:30 -05:00
Jimmy Brisson a0c8a09c89 Unify look of argument errors 2016-08-19 14:01:19 -05:00
Jimmy Brisson 99f1284a81 Stylize utils.py 2016-08-16 11:04:27 -05:00
Sam Grove c84e5d32c9 Revert "Force installation of dependencies in entry points" 2016-07-29 17:35:23 -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
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
Jimmy Brisson 0a2c35c62b Force installation of dependencies in entry points 2016-07-26 14:08:26 -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
Jimmy Brisson 52855b53cf [tools-build,make,project] Disallow parent of repo as --build args
Resolves #2081
2016-07-19 09:32:44 -05: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
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
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 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 0ec8199c55 Revert "Revert "Generalize flag handling""
This reverts commit 33cec194c6.
2016-07-07 15:29:36 -05:00
Sam Grove 33cec194c6 Revert "Generalize flag handling" 2016-06-24 16:39:01 -05:00
Jimmy Brisson d757f35d15 Update style 2016-06-24 14:23:19 -05:00
Jimmy Brisson c969a4c784 Better test completion and everything that can be is columnated 2016-06-24 14:23:17 -05:00
Jimmy Brisson c5ac2cfdec Create type combinator many 2016-06-24 14:22:47 -05:00
Jimmy Brisson b98c8c1c33 Generalize all appropriate arguments and check for file existance 2016-06-24 14:22:47 -05:00
Jimmy Brisson 52a7f64d67 Generalize parsing types 2016-06-24 14:22:41 -05:00
Mihail Stoyanov edc1fa1865 Fixes the python traceback when the user does ctrl+c during compilation 2016-06-15 01:08:35 +01:00
Mihail Stoyanov 5e6722dbab Ported updates to targets, utils and settings scripts 2016-06-09 22:05:35 +01:00
Mihail Stoyanov 3d45b2cdbb Renamed workspace_tools folder to tools 2016-06-09 21:34:53 +01:00