Commit Graph

48 Commits (5bb3ede8904d2488c60b1d7539dff2edcce87062)

Author SHA1 Message Date
Martin Kojtal 42d77ecd13
Merge pull request #6658 from theotherjimmy/lib-override-target
Allow library configs to override target configs
2018-04-19 17:41:34 +02:00
Jimmy Brisson 7a6f2e485a Use passed in target data everywhere when doing lib config 2018-04-18 09:12:49 -05:00
Jimmy Brisson 5b83f21cec Return correct configuration dict 2018-04-18 09:09:29 -05:00
Cruz Monrreal 934101ecf6
Merge pull request #6592 from cmonr/py3-tools-port
Updates tools to be runnable in Python 3
2018-04-17 15:55:15 -05:00
Jimmy Brisson 0e5cb66ca5 Allow library configs to override target configs 2018-04-17 15:48:55 -05:00
Cruz Monrreal II 85ce95d0ff Modified error formatting to remove unicode character.
jsonschema's error.message returns either u' or ' in strings depending on the python version.
2018-04-10 15:19:34 -05:00
Jimmy Brisson f34feddaa2 Error on invalid mbed_lib JSON 2018-04-05 14:34:00 -05:00
Jimmy Brisson 24c7b1a61a Move Mbed 5 support check so that it affects the exporters 2018-03-29 14:05:23 -05:00
Jimmy Brisson 6633fbca68 Print array indexes correctly in schema errors 2018-03-06 11:12:22 -06: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 477b947b22 Improve json schema validation errors 2018-02-28 14:39:28 -06:00
Jimmy Brisson 9f99330be6 Allow overriding offsets with "app_offset" and "header_offset" 2018-02-20 11:45:32 -06:00
Jimmy Brisson 5b2d7a27d2 Require endianness specification for ints > 8 bits 2018-02-20 11:45:32 -06:00
Jimmy Brisson 4c47f21cac Fill header in application 2018-02-20 11:45:32 -06:00
Jimmy Brisson b2c71c0fce Accept header configuration and reserve space 2018-02-20 11:45:32 -06:00
Cruz Monrreal e9fddb6eee
Merge pull request #6017 from theotherjimmy/bl-nonzero-rom
Correct auto-sizing last region of bl
2018-02-07 15:56:43 -06:00
Jimmy Brisson 9c3b489bf6 Correct auto-sizing last region in bl 2018-02-05 14:00:12 -06:00
Jimmy Brisson c93a2bfa4c Python2+3: Use absolute import where possible 2018-02-05 11:07:37 -06:00
Jimmy Brisson 4322bee175 Python2+3: tests passing 2018-02-05 11:04:36 -06:00
Jimmy Brisson cca4425af6 Python2+3: iteritems -> items 2018-02-05 11:04:36 -06:00
Jimmy Brisson 7abeec9744 Python2+3: clean argparse 2018-02-05 11:04:35 -06:00
Jimmy Brisson 380ecb1b0e Python2+3: working through many has_attr exceptions 2018-02-05 11:04:01 -06:00
Steven Cartmell b1ea3881be Fix test errors produced by JSON schema after rebase
- Modified the expected error code in some of the test cases. The error
  message is now issued by the JSON validator.

- Stop validation code being called if no application configuration is
  given to validate.

- Change test mock code to check for specific calls, instead of number of
  calls.

- Derive absolute paths for JSON schema files before loading them, which
  seems to work better with the URI path resolution of the schema parser.
2018-02-01 17:18:41 +00:00
Steven Cartmell 151f2fa3a6 Refactor common JSON schema definitions into a seperate file
- Moved all common definitions from schema_app and schema_lib into a
  separate definitions file.

- Changed the calling code to resolve multiple schema files correctly.
2018-02-01 17:18:40 +00:00
Steven Cartmell 3ff7de9771 Remove config_path setting and amend regex in mbed config JSON schema
- Removed the config_path setting from schema and moved the addition of the
config_path value after the validation is done.

- Altered the macro validation regex to be more lenient. Now verifies that
  if '=' is used in the macro definition that something comes after it.
2018-02-01 17:18:40 +00:00
Steven Cartmell fd208e6751 Add JSON schema based validation to mbed config script
- Added app and lib JSON schema definition files which specify the valid
  keys and values that can be used in mbed library and application
  configuration files. The primary different between the app and lib
  schema is that the lib config requires a name key.

- Modified the expected error code in some of the test cases. The error
  message is now issued by the JSON validator.

- Added some validation code to the config script which checks the
  validity of the mbed_app.json file when it is initially loaded.

- Added some validation code to config script which checks each of the
  mbed_lib.json scripts when they are loaded.

- Removed manual checks for allowable config keys from within the mbed_app
  and mbed_lib json files.

- Removed the check_dict_types() function which was no longer being
  called.
2018-02-01 17:18:39 +00:00
Jimmy Brisson dd3708c24c Handle target overrides that have a path correctly 2018-01-31 10:04:34 -06:00
Jimmy Brisson c180324530 Configure boot loader after scanning 2018-01-31 10:04:34 -06:00
Jimmy Brisson 855d74a968 Enable libraries to have boot loader configuration 2018-01-31 10:04:34 -06:00
sarahmarshy 58330fb858 Treat start variable as addrss in `generate_bootloader_build`
Correct spacing.
2018-01-26 13:24:29 -06:00
sarahmarshy 623b1711f9 Introduce sector ceiling/floor rounding
Use ceiling for bootloader end address
Use floor for application size
2018-01-26 13:24:29 -06:00
sarahmarshy 785dd100cf Use Config class sector variable 2018-01-26 13:24:29 -06:00
sarahmarshy 6f39d5a063 Error check existence of sectors 2018-01-26 13:24:29 -06:00
Sarah Marsh 86d4ce1991 Align managed bootloader addresses on sector boundaries
Aligns application start address to sector boundary
Aligns application end address to sector boundary
2018-01-26 13:24:29 -06:00
Sarah Marsh c74de99872 Fix typo in _generate_bootloader_build 2018-01-26 13:24:29 -06:00
Sarah Marsh a2195082cc Add functions for getting sectors in Config class 2018-01-26 13:24:29 -06:00
Jimmy Brisson b3ba9a55b9 Use Config class to find mbed_app.json 2017-12-01 15:18:04 -06:00
Sam Grove 22e82659d1 Merge pull request #4483 from c1728p9/workshop_rebase_4061
Improve error messages for bootloader build errors
2017-06-11 01:09:35 -05:00
Sam Grove ea7561ddbb Merge pull request #4494 from theotherjimmy/absolute-bootloader-paths
Use absolute paths for bootloader binaries
2017-06-08 15:51:04 -05:00
Jimmy Brisson aaaccf0290 Fix typo in tools code to handle bootloader builds
fixes a regression
2017-06-07 15:45:06 -05:00
Jimmy Brisson 9c2626fd01 Use absolute paths for bootloader binaries 2017-06-07 15:00:53 -05:00
Jimmy Brisson 1ee15560a7 Improve error messages for bootloader build errors 2017-06-06 17:57:25 -05:00
Jimmy Brisson caa50cb8a8 Allow overriding of non-cumulative target attributes 2017-06-02 12:03:53 +01:00
Jimmy Brisson fd26d5b5a7 Allow app config to override start and size 2017-05-08 13:25:28 -05:00
Jimmy Brisson 7e03d8f1b4 Merge pull request #4110 from theotherjimmy/build-metadata
Add --build-data switch to mbed compile and test
2017-05-02 11:35:47 -05:00
Jimmy Brisson 2a84ddd6e4 Error when bootloader is specified but does not exist
The changes to build_api.py make the error happen when running things
like get_config.py
2017-04-20 11:23:42 -05:00
Jimmy Brisson da9c10be48 Expand build reports in the tools 2017-04-20 11:03:15 -05:00
Jimmy Brisson 212a3dfd12 Move config to own dir
I also broke the config header template into it's own file. Further, I
fixed a bug in the config header generation where if no macros, builds
would crash.
2017-04-12 10:50:38 -05:00