Commit Graph

28211 Commits (bb0172289bccf7ed29661e2200c122ee9fe1d29d)

Author SHA1 Message Date
Devaraj Ranganna bb0172289b Code refactoring and toolchain validation
* Refactor methods _build_tfm() and _run_cmake_build()
* Update `tfm_target_name` to psoc64_1m for CY8CPROTO_064_SB_S
* Add new attribute `"OUTPUT_EXT": "hex"` for CY8CPROTO_064_SB_S
* Update documentation

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Devaraj Ranganna 50d6b58b6c Change the location of tf-m build folder
Use the folder `features/FEATURE_PSA/TARGET_TFM/TARGET_IGNORE` as the
build folder to clone and build tf-m.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Devaraj Ranganna fe759b1a12 Fix review comments
* Add python2 support
* Use fix version of trusted-firmware-m and it's dependencies
* Remove `--clean-build` and `-v` command-line options
* Code refactoring
* By default a temporary folder is used as tf-m build folder. But when
  `--develop` command line option is used then a new folder
  (tfm_build_dir) under the parent folder of Mbed OS is used as tf-m
  build folder
* Updated documentation
* Adding both .bin and .axf into dedicated directory for every tf-m
target

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Devaraj Ranganna 79738dfea5 Update comments in python files
Add a space after `#` for comments in python files

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Devaraj Ranganna 5abfceb3b8 Exporters are not supported for TF-M targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Devaraj Ranganna 59eccf85c5 Validating Mbed OS target default attributes
Do not check for Mbed OS target default attributes in case of targets
which supports TF-M

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Devaraj Ranganna 6405b44ff6 Python script automate tf-m build build process
The python script (tools/psa/build_tfm.py) automates tf-m build process
for a particular target or all supported tf-m targets and copies generated
binary to a predefined location.

Updated documentation describing steps to add single v7-m  and dual v7-M
targets and building tf-m using python script.

Added following attributes to dual v7-M and v8-M SPE generic target,

* inherits: PSA generic target PSA_DUAL_V7_M_SPE
* tfm_target_name: Target name in TF-M
* tfm_bootloader_supported: If TF-M bootloader is supported by the target.
			    Values supported are "true" and "false"
* tfm_default_toolchain: Default TF-M toolchain supported. Values supported
			 are "ARMCLANG" and "GNUARM"
* tfm_supported_toolchains: Supported TF-M toolchains. Values supported
			    are "ARMCLANG" and "GNUARM"
* delivery_dir: The directory to which TF-M binary will be copied to

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 15:17:16 +00:00
Vikas Katariya e7f2d62e16 Rollback Post Binary Hook - NU_PFM_M2351_NPSA_NS
Revert the changes from 3bdc378171
to include back the class M2351Code() to support the target with
Post Binary Hook.

Signed-off-by: Vikas Katariya <vikas.katariya@arm.com>
2020-01-16 15:17:16 +00:00
Vikas Katariya 0ff97fe5e3 ARM linker changes for CY8CPROTO_064_SB
Adhere with TF-M region map and flash partition to aid integration.
Changes:
* Use the region_defs.h to the derive region map for the following.
   -- RAM START, SIZE.
   -- STACK SIZE (MSP).
   -- ROM START, SIZE.
* Define new region for DATA_SHARED for
   Non-secure (Cortex M4) <--> Secure (Cortex M0+) communication.
* Align the RAM regions (HEAP,  STACK (MSP), and DATA_SHARED) to
  4 bytes.
* Correctly specify the flash region size as 1MB, not 832KB.

These changes are referenced from the TF-M Non-Secure partition build.

Signed-off-by: Vikas Katariya <Vikas.Katariya@arm.com>
2020-01-16 15:17:16 +00:00
Vikas Katariya ec9efffdbb GCC linker changes for CY8CPROTO_064_SB
Adhere with TF-M region map and flash partition to aid integration.
Changes:
* Use the region_defs.h to the derive region map for the following.
   -- RAM START, SIZE.
   -- STACK SIZE (MSP).
   -- ROM START, SIZE.
* Define new region for DATA_SHARED for
   Non-secure (Cortex M4) <--> Secure (Cortex M0+) communication.
* Align the RAM regions (HEAP,  STACK (MSP), and DATA_SHARED) to
  4 bytes.
* Correctly specify the flash region size as 1MB, not 832KB.

These changes are referenced from the TF-M Non-Secure partition build.

Signed-off-by: Vikas Katariya <Vikas.Katariya@arm.com>
2020-01-16 15:17:16 +00:00
Vikas Katariya b6c0a763dc Add TF-M based partition files - CY8CPROTO_064_SB
These files are directly leveraged from the TF-M target (psoc64_1m).
Git hash - https://git.trustedfirmware.org/trusted-firmware-m.git/commit/?h=feature-twincpu&id=14d4a73cae631ea291f4d8d04e3c588ea9e955c8
Reason: They are going to provide region definitions and flash
partition details of the target which runs TF-M based Secure image
defining the memory map needed for successful integration.

Folder structure:
TARGET_CY8CPROTO_064_SB
    -- partition
      -- flash_layout.h
      -- region_defs.h

Signed-off-by: Vikas Katariya <Vikas.Katariya@arm.com>
2020-01-16 14:59:47 +00:00
Devaraj Ranganna 20ddc3ae90 Improve multiple inheritance support
Current algorithm doesn't support multiple inheritance when inheritance
depth is more than 1 on two parents. It'll not parse the "_add" or
"_remove" attributes on a second parent which is at the same level
as that of a parent that defines the attribute.

This change ensures that second parent which is at the same level
as that of a parent that defines the attribute is parsed for "_add" or
"_remove" attributes. However, this change will parse the parent which
defines the attributes twice, once to evaluate the attribute and then to
evaluate the "_add" or "_remove" attribute. But, no target is allowed to
define an attribute and also "_add" or "_remove" for the same attribute.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 14:59:47 +00:00
Devaraj Ranganna 6ac9c6eb04 Disable mbed-os-example-atecc608a compilation
The example `mbed-os-example-atecc608a` needs the secure element driver
which is removed from feature branch. The secure element support should
be added to TF-M and when we import TF-M to mbed-os, secure element
will be supported in mbed-os. Because of this compilation of the
example `mbed-os-example-atecc608a` is disabled.

Note: DO NOT merge this to `master` without secure element support in
mbed-os.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 14:59:47 +00:00
Devaraj Ranganna 8c2765ec95 Remove v8-M targets
Removed MUSCA A1 and LPC55S69 targets as they are not supported on
feature branch. The targets will be re-introduced before merging feature
branch to master.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 14:59:47 +00:00
Devaraj Ranganna d8d7ad0217 Cleanup tools folder and update travis file
1. Remove psa related hooks from the build system.
2. Remove PSA related scripts from tools/test folder
3. Remove psa-autogen job from travis which was running
generate_partition_code.py and is not needed anymore
4. Install python modules needed for events and littlefs tests

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 13:21:57 +00:00
Devaraj Ranganna 4b070bf2b5 Update .astyleignore to match new directory structure
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 13:21:48 +00:00
Devaraj Ranganna fdc4a0831a Refactor Mbed PSA service code base
The Mbed OS PSA services is moved to
features/FEATURE_PSA/TARGET_MBED_PSA_SRV.

Removed PSA_SRV_IMPL, PSA_SRV_EMUL and NSPE.

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

Created following generic PSA targets:

* `PSA_Target` (Root level PSA target)
* `PSA_V7_M_NSPE` (Single v7-M NSPE generic target)
* `PSA_V7_M_SPE` (Single v7-M SPE generic target)
* `PSA_DUAL_V7_M_NSPE` (Dual v7-M NSPE generic target)
* `PSA_DUAL_V7_M_SPE` (Dual v7-M SPE generic target)
* `PSA_V8_M_NSPE` (v8-M NSPE generic target)
* `PSA_V8_M_SPE` (v8-M SPE generic target)

Added document features/FEATURE_PSA/supporting_psa_in_mbed-os.md which
describes PSA support in Mbed OS.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 13:21:41 +00:00
Devaraj Ranganna da5b641ed7 Remove imported TF-M SPM related files
These changes are the first step towards switching to TF-M SPM and
services which will be running on the secure side and mbed-os
will be running on the non-secure side.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 12:55:06 +00:00
Devaraj Ranganna 5624ad123a Remove MBED SPM implementation and test cases
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 12:54:44 +00:00
Devaraj Ranganna 5c83d9f1e7 Trusted Firmware (TF-M) build script
Create a script (tools/psa/build_tfm.py) to build Trusted
Firmware M (TF-M) image. Current version of the script only
clones the TF-M git repo and its dependencies and computes
the version information of TF-M repo and write it to
'features/FEATURE_PSA/FEATURE_TFM/VERSION.txt'

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-01-16 12:54:19 +00:00
Martin Kojtal 18c941cc84
Merge pull request #12207 from hugueskamba/hk-add-buffered_serial
Add BufferedSerial class to replace UARTSerial
2020-01-16 10:06:22 +00:00
Martin Kojtal ba27e6cba6
Merge pull request #12255 from 0xc0170/dev_mergify
add mergify to automate our workflow
2020-01-16 09:48:19 +00:00
Martin Kojtal 22042e5349
Merge pull request #12241 from OpenNuvoton/nuvoton_m2351_npsa_secure-minimal-build
M2351: Remove LPTICKER to spare memory for non-PSA minimal secure build
2020-01-16 09:42:44 +00:00
Martin Kojtal de7768ce29
Merge pull request #12261 from kivaisan/fix_cellular_build_with_apn_lookup
Cellular: Fix compilation fail with APN lookup enabled
2020-01-16 09:33:16 +00:00
Martin Kojtal 77fa743740
Merge pull request #12245 from JanneKiiskila/target_upd_NUCLEO_WB55RG
NUCLEO_WB55RG - add device name "STM32WB55RGVx"
2020-01-16 09:00:30 +00:00
Martin Kojtal dd54804763
Merge pull request #12262 from fkjagodzinski/test_update-uart_flush_delay
Test: Increase the UART flush delay
2020-01-16 08:49:50 +00:00
Martin Kojtal c27e644b96
Merge pull request #12240 from yarbcy/pr/add-new-tests-softap-2
Cypress: Initial commit of SoftAP host tests
2020-01-16 08:36:47 +00:00
Chun-Chieh Li 359d41adef M2351: Remove LPTICKER to spare memory for non-PSA minimal secure build 2020-01-16 09:58:32 +08:00
Martin Kojtal b96d3ad5be
Merge pull request #12263 from maciejbocianski/fix_unittests_coverage_filtering
unittest: fix coverage filtering
2020-01-15 17:57:21 +00:00
Kimmo Vaisanen 2c4194bbe3 Cellular: Fix compilation fail with APN lookup enabled
Compilation failed if cellular APN lookup was enabled as stop command has been
removed.
2020-01-15 14:42:04 +02:00
Filip Jagodzinski e8bbbaf1fb Test: LP_Ticker: Increase the UART flush wait 2020-01-15 13:34:50 +01:00
Filip Jagodzinski fa7eb7d888 Test: Sleep: Increase the UART flush wait 2020-01-15 13:34:45 +01:00
Filip Jagodzinski 7f1ed02291 Test: ResetReason: Increase the UART flush wait 2020-01-15 13:34:42 +01:00
Filip Jagodzinski 7d575af4b9 Test: Watchdog: Increase the UART flush wait 2020-01-15 13:34:28 +01:00
Maciej Bocianski 2768300ada unittest: fix coverage filtering
change coverage filter pattern from ^pattern* to *pattern*
2020-01-15 13:29:05 +01:00
Janne Kiiskila fabd02d1f6 Enable bootloader for NUCLEO_WB55RG
That's whole reason we wanted to start the changes... Bootloader is
supported.
2020-01-15 14:09:09 +02:00
Janne Kiiskila 7517d95ab6 NUCLEO_WB55RG - add device name "STM32WB55RGVx"
Bootloader compilation will require the device to be in place,
it uses that to pick up the CMSIS-pack info from the index.json.
2020-01-15 14:08:32 +02:00
Martin Kojtal 0fd8bb651c
Merge pull request #12257 from Patater/psa-setup-tpl-fix
psa: Ensure spaces before partition name comment
2020-01-15 13:08:09 +01:00
Martin Kojtal 4c4ed0ab78
Merge pull request #12258 from trowbridgec/disable-ep_agora-cell-aux-uart-by-default
Disable the cell AUX UART by default on EP_AGORA
2020-01-15 13:07:28 +01:00
Martin Kojtal 606f3a35a7
Merge pull request #12260 from Szalacinski/master
Add KSZ8041 as a supported PHY for the LPC17xx series
2020-01-15 13:07:11 +01:00
Martin Kojtal 631b581ee7
Merge pull request #12254 from maciejbocianski/fix_unittest_ATCmdParser_segfault
unittest: fix ATCmdParser test segfault
2020-01-15 13:06:48 +01:00
Martin Kojtal 1b11d2cb02
Merge pull request #12249 from kivaisan/remove_deprecated_cellulardevice_stop
Cellular: Remove deprecated CellularDevice::stop()
2020-01-15 13:06:27 +01:00
Martin Kojtal bfbed2de7b
Merge pull request #12243 from 0xc0170/fix_12242_recreate
Add timer shutdown after time stop on deinit
2020-01-15 13:04:04 +01:00
Martin Kojtal 40b6f12dfd
Merge pull request #12239 from tymoteuszblochmobica/testfix
Fix DNS multiple query hints to perform both IP4 and IP6 tests
2020-01-15 13:02:43 +01:00
Martin Kojtal 88f48d240e
Merge pull request #12237 from mprse/stm_serial_free_fix
STM serial free: Set pin function only if pin is defined (not NC)
2020-01-15 13:02:20 +01:00
Martin Kojtal 194fc6667e
Merge pull request #12234 from michalpasztamobica/esp8266_builtin_dns
ESP8266: Add built-in hostname resolution handling (disabled by default)
2020-01-15 13:00:57 +01:00
Martin Kojtal 1a58d07c04
Merge pull request #12199 from ARMmbed/targets-json-format
Format targets.json
2020-01-15 13:00:26 +01:00
Martin Kojtal 978a9665f0
Merge pull request #12201 from jeromecoutant/PR_G0REFACTOR
TARGET_STM: FW driver files refactor proposition
2020-01-15 12:59:49 +01:00
Martin Kojtal c53f4d2344
Merge pull request #12227 from AnttiKauppila/BG96_fix
Cellular: AT + QICSGP set up APN fix
2020-01-15 12:59:09 +01:00
Martin Kojtal cbca99d38f
Merge pull request #12160 from AGlass0fMilk/fix-prs-config
nRF52: Properly configure nRF SDK for nRF52-series targets
2020-01-15 12:58:32 +01:00