Commit Graph

126 Commits (c70baa92893dea61bbe6ae17839b88a4ef9351bd)

Author SHA1 Message Date
Devaraj Ranganna c9c593f7ca tools: Remove obsolete API
The API is_PSA_non_secure_target() uses obsolete labels to detect if a
target is PSA non-secure target and is not needed anymore.

Mbed OS depends on TF-M for PSA SPM and services. TF-M is built using
it's own build system. Therefore, we don't need to differentiate secure
and non-secure targets anymore in Mbed OS as all PSA targets in Mbed OS
are non-secure targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:28 +01:00
Devaraj Ranganna 76e911c5ef psa: Replace Mbed PSA with TF-M
Add TF-M to Mbed OS, replacing the previous PSA implementation for
TF-M-capable targets. This commit adds files imported from TF-M, without
modification. The version of TF-M imported can be found in
`features/FEATURE_PSA/TARGET_TFM/VERSION.txt`.

These changes switch to TF-M as the sole PSA implementation for v8-M and
dual core targets, with TF-M running on the secure side and Mbed OS
running on the non-secure side. Single core v7-M targets will continue
to have PSA implemented via PSA emulation, implemented by Mbed OS.

Move or remove many PSA-implementing files, as PSA will be provided by
TF-M on non-single-v7-M targets. Delete any files that are not relevant
for PSA emulation mode.
 - Remove imported TF-M SPM
 - Remove Mbed SPM and tests
 - Remove Mbed-implemented PSA services and tests
 - Remove PSA_SRV_IMPL, PSA_SRV_IPC, PSA_SRV_EMUL and NSPE.
 - Replace PSA_SRV_EMUL and PSA_SRV_IMPL with MBED_PSA_SRV
 - Remove any files autogenerated by
   "tools/psa/generate_partition_code.py", which no longer exists.

Add new feature `PSA` to support PSA in Mbed OS.

Move the Mbed OS implementation of PSA services for v7-M targets (which
employ PSA emulation, and don't yet use TF-M) to
features/FEATURE_PSA/TARGET_MBED_PSA_SRV. Update the `requires`
attribute in TESTS/configs/baremetal.json to avoid breaking baremetal
testing builds.

Update .astyleignore to match new directory structure

Update Mbed TLS importer to place files into FEATURE_PSA

Create the following generic PSA targets:

* `PSA_Target` (Root level PSA generic target)
* `PSA_V7_M` (Single v7-M PSA generic target)
* `PSA_DUAL_CORE` (Dual-core PSA generic target)
* `PSA_V8_M` (v8-M PSA generic target)

Flatten MUSCA_NS and private MUSCA targets into public MUSCA targets.

Move mcuboot.bin to flat location (removing prebuilt folder)

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-06-18 12:16:20 +01:00
pea-pod 1de7008f8b Python reference equality changed to value equality 2020-06-07 15:47:43 -05:00
Darryl Green 7aadee9ab7 Add experimental feature folder
Signed-off-by: Darryl Green <darryl.green@arm.com>
2020-05-29 13:19:11 +01:00
Darryl Green cf17d7a178 Change unrecognised features to a warning, rather than error
Give a warning rather than error if an unrecognised feature is used.
This will help compatibility when new features are added.

Signed-off-by: Darryl Green <darryl.green@arm.com>
2020-05-29 13:19:11 +01:00
Jaeden Amero 4e47c38701 tools: Fix grammar in feature error message
Use "not a supported feature" instead of "not a supported features".
2020-05-27 16:37:59 +01:00
Devaraj Ranganna fd74d678a7 psa: Remove PSA secure binary building tools
The PSA-implementing secure binary is not built using Mbed OS build
tools anymore. Instead, the TrustedFirmware-M (TF-M) build system is
used to produce the secure binary. As such, we remove PSA related hooks
from the build system, remove PSA related scripts from tools/test
folder, and also remove the psa-autogen job from travis which was
running the now unecessary and removed generate_partition_code.py.

Remove the ability to generate new PSA binaries in the old manner, where
Mbed OS implements PSA. We don't yet remove any PSA binaries or break
the currently checked-in Mbed-implemented PSA support. PSA targets
integrated in the old manner will continue working at this point.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-04-27 09:51:14 +01:00
Chun-Chieh Li 8e8b546cbf Fix build failure when target's cmsis doesn't exist
For bootloader enabled target, it needs to have cmsis pack or provide memory override. This change fixes build failure in case of no cmsis pack but providing memory override with start being zero.
2020-02-20 17:39:20 +08:00
Michael Quested ce0d611dd0 Fix call to sorted by providing key to sort on.
This call to sorted does nothing in Python 2, as there is no way to sort a list
of Exceptions without providing a key.

In Python 3 this call fails with an error as there is no comparison implemented
for the jsonschema.exceptions.ValidationError Exception.

This is fixed by providing the key str, which sorts by the str representation of
the Exception.
2020-01-17 13:04:57 +00:00
fred.li 38e088eadd remove blank line 2019-04-25 09:56:52 +08:00
fred.li 7941d34e35 Size should be calculate after confirm the start address 2019-04-22 11:53:15 +08:00
ccli8 da7035eb6b Fix MBED_RAM_START/MBED_RAM_SIZE symbol generation
1. Fix MBED_RAM_START/MBED_RAM_SIZE are not generated when there are
   target.mbed_ram_start/target.mbed_ram_size overrides
2. Fix MBED_RAM_START/MBED_RAM_SIZE are duplicated.
2019-03-26 09:34:59 +08:00
Oren Cohen 021faf24cd Merge remote-tracking branch 'jimmy/targets-json-sectors' into rollup 2019-03-21 18:19:12 +02:00
Jimmy Brisson 03f9a0cd23 Configure sector information in targets.json 2019-03-21 10:04:19 -05:00
Jimmy Brisson c475a4a995 Fall back to target.json memories when CMSIS has empty memories 2019-03-21 09:42:47 -05:00
Jimmy Brisson c37a31c5d4 Use PSA overrides for RAM 2019-03-19 13:38:44 -05:00
Jimmy Brisson e798276917 Override rom used by managed bootloader with PSA roms 2019-03-14 14:41:51 -05:00
Jimmy Brisson 10c6a277d3 Test that secure/non-secure memories are passed
To managed bootloader mode
2019-03-14 14:33:29 -05:00
Jimmy Brisson a666e976a2 Clean all lint errors in configuration system 2019-03-14 12:15:34 -05:00
Brian Daniels dbbf336949 Avoid KeyError Exceptions.
Co-Authored-By: theotherjimmy <theotherjimmy@gmail.com>
2019-03-04 11:24:47 -06:00
Jimmy Brisson 4af70dcaa1 Use updated CPM info in config system 2019-03-04 11:24:47 -06:00
Naveen Kaje 4cc21820bb tools: support cases where bootloader is in chunks
Support the requirement where bootloader can be in chunks and enable
placing the application at a particular offset specified by config.
With FEATURE_BOOTLOADER support, the bootloader can be placed at a
high address. Add support to the tools so that application can be
placed in the available space before the beginning of the bootloader.
2019-02-21 15:11:44 -06:00
Cruz Monrreal b820ec8922
Merge pull request #9561 from theotherjimmy/test-resources
Tools changes for bare metal
2019-02-13 12:31:54 -06:00
Michael Schwarcz 9013dc8e5d
Update tools/config/__init__.py
Co-Authored-By: orenc17 <oren.cohen@arm.com>
2019-02-09 13:55:32 +02:00
Oren Cohen e162d69f56 Make delivery_dir relative to the json it was declared in 2019-02-07 19:13:01 +02:00
Oren Cohen 44c1a2cea3 Make delivery_dir relative to mbed_os root 2019-02-07 14:56:57 +02:00
Oren Cohen 04a22a2e69 Improvement to artifact delivery method
A target can define a delivery directory instead of the default option
2019-02-06 15:26:59 +02:00
Jimmy Brisson 5335faf6c2 Pass only libraries to include_libaries 2019-01-31 11:04:47 -06:00
Cruz Monrreal II de4b7607a0 Simplified max/min condition 2019-01-28 14:01:48 -06:00
Cruz Monrreal II d9add3447d Added None check for min in config tools 2019-01-28 12:59:43 -06:00
Jimmy Brisson 5cf07df264 Filter libs with absolute paths
as the config system uses only abspaths
2019-01-16 13:32:52 -06:00
Jimmy Brisson 0b64c9cbbf Filter resources by included libraries 2019-01-16 11:15:13 -06:00
Jimmy Brisson 7a360efe8a Raise config error when missing dependencies 2019-01-15 17:48:08 -06:00
Jimmy Brisson 79eccd1733 Resolve library dependencies 2019-01-15 17:28:12 -06:00
Jimmy Brisson 243b079d2b Pass requires in mbed_app.json test 2019-01-15 17:05:43 -06:00
Cruz Monrreal 442cbba141
Merge pull request #7799 from bridadan/remove_allowed_features
Removing feature names from the "allowed feature" config list.
2018-12-19 13:37:59 -06:00
Brian Daniels 0af1a4bcd2 Removing feature names from the "allowed feature" config list.
These features have all been removed from Mbed OS in the past. This
prevents their use in the future.
2018-12-07 10:02:42 -06:00
Brian Daniels fa4ead048d Config parameters override macros 2018-12-06 11:19:24 -06:00
Brian Daniels 5957ffd306 Ensure macros and parameters with the same name are not repeated.
This covers the case when a macro is set with the same name as a
parameter. Previously, the macro would be repeated on the command line,
which causes certain toolchains to break (ex. IAR assembler). Now the
config system will override the parameter's value with the macro's
value.
2018-12-06 10:31:38 -06:00
Cruz Monrreal a1625895c3
Merge pull request #8097 from JammuKekkonen/fix_bootloader_build_for_nrf52
Add support for nrf52_dk bootloader
2018-12-04 16:10:15 -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
Martin Kojtal 5b42e2886f
Merge pull request #8607 from aashishc1988/ram_rom_fetch
Fetch ram/rom start/size
2018-11-22 10:49:50 +01:00
Martin Kojtal 13b60c2991
Merge pull request #8673 from kegilbert/config-range-limits-dev
Add Mbed Configuration Option Range Limits
2018-11-19 13:14:02 +00:00
Brian Daniels 6cab1e0018 Fixing traceback when running mbed test 2018-11-16 15:28:50 -06:00
Aashish chaddha 0c594a42dc The check for managed bootloader support should be in regions and we need a try/catch when we call it.
Moved "bootloader_not_supported" check to where it was and handle that exception at only one place.

Removed ram/rom size info for realtek from targets.json. THe info we have is not correct.

was Not handling config exceptions from regions and ram_regions property

adding rom-ram info for REALTEK_RTL8195AM
2018-11-15 15:28:14 -06:00
kegilbert 9116b9921b Remove redundent line 2018-11-15 11:44:53 -06:00
Brian Daniels 5ec1d7c221
Update tools/config/__init__.py
Co-Authored-By: kegilbert <K.Gilbert.CH@gmail.com>
2018-11-15 11:43:41 -06:00
kegilbert 9d9cd84942 Refactor logic to improve readability
Move JSON accepted value ranges back to JSON array
2018-11-14 18:31:59 -06:00
kegilbert 7a436660e9 Handle None and hex values in string format 2018-11-13 16:12:35 -06:00
Aashish chaddha 1627968bcb Missed one change to convert into right data type 2018-11-12 13:37:27 -06:00