Commit Graph

60 Commits (06f3fca6cfda04ef1e8d6b6799af09944214c7b3)

Author SHA1 Message Date
Jimmy Brisson 2d8cf737e4 Move resource scanning into it's own module 2018-07-16 14:10:21 -05:00
Jimmy Brisson 5795f5326e Allow missing "bootloader_supported" key 2018-06-28 10:36:18 -05:00
Jimmy Brisson 2a9923f86e Skip invalid undefined errors 2018-06-28 10:26:00 -05:00
Jimmy Brisson 12f490fa02 Make sure that there is always a config_errors member 2018-06-28 10:26:00 -05:00
Jimmy Brisson c380304b93 Persist config errors until validation occurs 2018-06-28 10:26:00 -05:00
Cruz Monrreal 95d2b3d55c
Merge pull request #7133 from OpenNuvoton/nuvoton_support_tz_partition
Override ROM/RAM start/size for TrustZone targets
2018-06-21 17:49:47 -05:00
Jimmy Brisson 52e640fc1d Add Rom config info getter and rom defines
* MBED_ROM_START = start of current rom (independent of BL modes)
 * MBED_ROM_SIZE = size of current rom (independent of BL modes)
2018-06-20 10:47:04 -05:00
Jimmy Brisson 92abbb7599 Use memories passed in when getting memory specs 2018-06-13 09:33:39 -05:00
Jimmy Brisson 8e26e2c198 Skip second header when every bl config paramater used 2018-06-12 09:02:14 -05:00
Jimmy Brisson 09cdc0631d Move from tc constructor to config vars 2018-06-08 09:59:19 -05:00
ccli8 0cee003bd9 Fix flash start/size in bootloader related build
This fix relies on target configuration options (mbed_rom_start/mbed_rom_size) defined
to override CMSIS pack or no CMSIS pack.

This is useful for a target which:
1. Doesn't support CMSIS pack, or
2. Supports TrustZone and user needs to change its flash partition
2018-06-06 09:45:44 +08:00
Ron Eldor 23ba8bc1f5 Change Cryptocell target to a feature
Change the Cryptocell310 target to `FEATURE_CRYPTOCELL310`
2018-05-21 13:40:43 +03:00
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