Commit Graph

165 Commits (d1d6bf51b387ef39f97320b2febd5d79231682ba)

Author SHA1 Message Date
Martin Kojtal 6bfd89e656
Merge pull request #13196 from gbrtth/musca_s1_support_mbed6
Add ARM_MUSCA_S1 as a new target platform
2020-09-10 16:53:14 +01:00
Gabor Toth bdf2306f16 Add platform support to Musca S1
Change-Id: Iebdd4bc402446caba6b7bd894eddb0a85ed884d8
Signed-off-by: Mark Horvath <mark.horvath@arm.com>
Signed-off-by: Gabor Toth <gabor.toth@arm.com>
2020-09-10 14:53:41 +02:00
Roman Okhrimenko 877078003c Rename CY8CKIT_064B0S2_4343W to CY8CKIT064B0S2_4343W, which fits in 20 characters limit 2020-09-07 08:25:31 +03:00
Raymond Ngun 1be0b1f297 CYTFM_064B0S2_4343W: Inital creation of PSA target
Target is similar to CY8CKIT_064B0S2_4343W but with PSA
and TFM enabled.

Signed-off-by: Raymond Ngun <raymond.ngun@cypress.com>
2020-08-07 08:02:01 -07:00
Vikas Katariya 486e72acaa tool: Use a different key to sign Non-secure image
This applies only to `ARM_MUSCA_B1` target
When MCUBOOT repo: UPSTREAM was set as default as part of TF-M 1.1
release, few things were changed:
MCUBOOT_IMAGE_NUMBER: '2'
MCUBOOT_UPGRADE_STRATEGY: 'OVERWRITE_ONLY'
MCUBOOT_HW_KEY: 'On'(default)

Therefore the signing strategy for Non-secure image (Mbed OS)
needs to be done with its own private key, which is validated during
boot.

Signed-off-by: Vikas Katariya <vikas.katariya@arm.com>
2020-07-13 16:37:48 +01:00
Roman Okhrimenko fc42c74e7b Rework find_policy() in post build script to enable default locations 2020-06-19 16:16:54 +03:00
Roman Okhrimenko f689c05db7 Modify post build scripts to support only cysecuretools signing 2020-06-19 16:16:47 +03:00
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 939ed6940c tools: Improve PSA target identification logic
Current logic `is_TFM_target` relies on the availability of attribute
`tfm_target_name` to identify PSA targets. The API `is_TFM_target` is
used in pytest to validate PSA target configuration which again checks
the availability of `tfm_target_name`. If a target doesn't contain the
attribute `tfm_target_name` then this check will fail instead of
catching it. Therefore, we now check for `TFM` config option in `labels`
attribute.

The API `is_TFM_target()` returns true for Mbed OS PSA targets which are
supported by TF-M also.

Add a new API `is_PSA_target()` which returns true for all Mbed OS PSA
targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:26 +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
Devaraj Ranganna e2af612a99 tools: Musca B1 signing strategy
Currently, the final binary (TF-M + Mbed OS) is signed after
concatenating TF-M and Mbed OS binaries. But TF-M signs the images
separately and then concatenates them. Update the Musca B1 signing
strategy to match TF-M.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:16 +01:00
Vikas Katariya 8252f3ee6e psa: Add TF-M utility scripts to python path
When python3 is enforced to build the ARM_MUSCA_A1 or ARM_MUSCA_B1
targets, it is unable to find binary utility tool scripts which are
imported from TF-M.

The reason to use the python3 environment is as follows: Mbed OS + TFM
contained a faulty boot record TLV, which failed the attestation test
(TF-M regression). The data in the boot record TLV will be included in
the generated attestation token as 1 item in the SW_COMPONENTS claim.

This data (in the boot record TLV) is pre-encoded in CBOR format at
build time and appended to the image during the image signing process
(done by the imgtool Python3 script).

Signed-off-by: Vikas Katariya <vikas.katariya@arm.com>
2020-06-18 12:16:13 +01:00
Martin Kojtal 31748ed1a9
Merge pull request #13036 from jeromecoutant/PR_GENPERIPH_V12
STM32_gen_PeripheralPins.py script v1.12
2020-06-17 12:14:20 +02:00
Rob Walton 6ee9b161e3 Reintroduce mts_dot combine_bins. 2020-06-08 13:12:23 +01:00
Rob Walton 422931208c Reintroduce LPC4088 and Teensy3.1 post build hooks 2020-06-08 13:11:49 +01:00
Rob Walton 756fc381a9 Reintroduce NRF51 post-build hook.
The online compiler relies on this post build hook for NRF51 targets.
2020-06-08 13:08:40 +01:00
jeromecoutant dbe8e93660 STM32_gen_PeripheralPins.py script v1.12
- license header update
- TIM_MST default value
- PinNames.h is now complete
2020-06-08 11:09:52 +02:00
Marcelo Salazar ccd95f1e14 Remove nRF51 targets
The following public nRF51 targets are being removed:

- NRF51822
- NRF51_DK
- NRF51_MICROBIT
2020-05-13 10:36:50 +01:00
Martin Kojtal dbf05ceaed
Merge pull request #12735 from Patater/musca-tfm
Make MUSCA B1 and MUSCA A1 TF-M ready
2020-05-04 11:06:48 +02:00
Jaeden Amero 6f6a92c1eb musca_b1: Add TF-M compatibility
Make the MUSCA_B1 target TF-M compatible by doing the following:
    - Add flash, region definitions, and preprocessed image macros from
      TF-M (at version 6e7be077eabe "Core: Add lifecycle API")
    - Update the MUSCA_B1 linker script to create a flash image
      compatible with TF-M.
    - Update the tfm/bin_utils/assemble.py signing script to work with
      preprocessed image macros rather than flat C pre-processor defines

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-04-30 11:36:09 +01:00
Devaraj Ranganna 0ad1a988ec musca_a1: Add TF-M compatibility
Make the MUSCA_A1 target TF-M compatible by doing the following:
    - Add flash, region definitions, and preprocessed image macros from
      TF-M (at version 6e7be077eabe "Core: Add lifecycle API")
    - Update the MUSCA_A1 linker script to create a flash image
      compatible with TF-M.
    - Update the tfm/bin_utils/assemble.py signing script to work with
      preprocessed image macros rather than flat C pre-processor defines

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-04-30 11:35:05 +01:00
Marcelo Salazar 0864aa86be Remove NCS36510 target 2020-04-30 09:56:36 +01:00
MarceloSalazar f21759bc35 Remove TEENSY3_1 target 2020-04-30 09:56:35 +01:00
MarceloSalazar 5dcfe57c41 Remove LPC4088 based targets 2020-04-30 09:56:32 +01:00
Devaraj Ranganna b79b33219b psa: Remove exporters for TF-M targets
Targets that use TF-M for their PSA implementation are not compatible
with exporters at this time. Explicitly block use of exporters with TF-M
using targets, for better error messages.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-04-27 09:51:14 +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
Jaeden Amero 6b3a9cb4fa psa: Remove v8-M S targets
Remove PSA v8-M S target binaries will be built outside of Mbed OS and
added in as binaries which NS targets consume. Mbed OS no longer
implements PSA for v8-M targets, so there is no reason for it to build
PSA S targets.

Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-04-27 09:51:09 +01:00
Marcelo Salazar beee062d1f Remove MTB_MTS_DRAGONFLY target 2020-04-20 16:55:35 +01:00
Martin Kojtal fcc20b1201
Merge pull request #12765 from MultiTechSystems/update-mdot-target
Update MTS_MDOT_F411RE target and remove bootloader from tools
2020-04-16 11:53:26 +02:00
George Beckstein 958edf9923 Fix missing reference to TargetName variable 2020-04-13 11:31:24 -04:00
George Beckstein 81c3aef9fa Fixed reference to global variable instead of input argument in parse_BoardFile 2020-04-13 11:25:44 -04:00
George Beckstein bcd8ebb645 Added custom board option to STM Pins generation script 2020-04-13 11:25:19 -04:00
Taylor Heck 6d382ea969 Delete now unused MTSCode.combine_bins_mts_dot function for tools. 2020-04-07 09:00:09 -05:00
Tamas Kaman 551c3c553c Add ARM_MUSCA_B1 as a new target platform
Musca-B1 is a Cortex-M33 based target with security extension enabled.

- ARM_MUSCA_B1 is the non-secure target running mbed-os.
- ARM_MUSCA_B1_S is the secure target running TF-M.
- TF-M sources were imported and patched in previous commits.
- TF-M secure bootloader (McuBoot) for MUSCA_B1 is submitted by a
  pre-built binary.
- A post-build hook concatenates The secure and non-secure binaries,
  signs it and then concatenates the bootloader with the signed binary.

Change-Id: I4b36290941b5f0bb7aa7c12dda2f38b5c1e39ae2
Signed-off-by: Tamas Kaman <tamas.kaman@arm.com>
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
2020-02-21 14:34:39 +01:00
Anna Bridge f45a5a78b5
Merge pull request #12231 from devran01/upd_musca_a
Import latest python scripts and MCUBoot image
2020-01-25 11:53:34 +00:00
Devaraj Ranganna bc7331b96e Import latest python scripts and MCUBoot image
To help with the integration of Musca B1 into Mbed OS, python
signing scripts and MCUBoot image and RSA private key for Musca A
has been updated from latest TF-M
(https://git.trustedfirmware.org/trusted-firmware-m.git/commit/?id=6c5be4a98e4d7055ee49076ca4e515fb4b172e66).

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-21 10:25:56 +00:00
Rajkumar Kanagaraj 8a0fdd24d9 Rename "default_lib" to "c_lib". 2020-01-17 08:05:48 -08:00
Graham Hammond e723571474 Updates to `/tools` for Python 3 compatibility 2019-11-21 15:02:37 +00:00
jeromecoutant 0c740e7095 STM32H7: update PeripheralPin generation script and pin files accordingly 2019-10-31 14:11:00 +01:00
jeromecoutant 5340c00965 STM32 gen PeriphPin script update for USB 2019-10-21 14:49:17 +02:00
Chun-Chieh Li e9e85f5307 M2351: Support non-PSA secure/non-secure combined build
Support secure/non-secure combined build for non-PSA target:
1.  In secure post-build, deliver built secure image to TARGET_NU_PREBUILD_SECURE
    directory which is to combine later.
2.  In non-secure post-build, merge non-secure image with secure image saved in
    TARGET_NU_PREBUILD_SECURE directory.
3.  In non-secure post-build, user can also drop pre-built secure image saved in
    TARGET_NU_PREBUILD_SECURE directory and provide its own by adding the line below
    in mbed_app.json:
    "target.extra_labels_remove": ["NU_PREBUILD_SECURE"]
2019-09-16 10:37:08 +08:00
Martin Kojtal 940d3fdf60
Merge pull request #11291 from LMESTM/STM32_OSPI_QSPI_fallback_support
Stm32 ospi qspi fallback support
2019-09-02 12:26:55 +02:00
Roman Okhrimenko c249bf97c2 Updated target files structure to align with the following BSP PR. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko bfe1d04ba2 Removed import of version specific python modules, improved imports organization in PSOC6.py, fixed per PR comments 2019-08-30 15:10:19 +03:00
Roman Okhrimenko d289b967f7 Added check for python version before calling post build action. Fixed compilation for Python 2.7. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 515555e7ba Removed scripts for provisiongs from repository, made fixes per PR comments, adjusted Readme.md 2019-08-30 15:10:19 +03:00
Roman Okhrimenko ed9995e06c PSOC6_SB: Initial commit to add CY8CPROTO_064_SB to mbed-os sources. 2019-08-30 15:10:18 +03:00
jeromecoutant 64b11c5322 STM32 PeripheralPins generation script: add OSPI parsing 2019-08-29 12:11:58 +02:00
Alexander Zilberkant 67905bddae Use build directory in postbuild
Use build directory instead of temp directory for for
intermediate files during binaries merge.
2019-05-22 17:17:27 +03:00
Michael Schwarcz 96268d91ef Updates after rebase
- postbuild: Use find_secure_image and update prebuilt binaries
- Add CMSIS driver headers
- Align with 2-region memory model
2019-05-22 17:17:23 +03:00