Commit Graph

1316 Commits (refactor_hal_greentea_cmake)

Author SHA1 Message Date
Anna Bridge d20384aaf9
Merge pull request #14456 from ladislas/ladislas/feature/fix-mbed_atomic-mac-m1
Fix define MBED_EXCLUSIVE_ACCESS for Apple M1 (__aarch64__) computers
2021-03-26 14:57:10 +00:00
Ladislas de Toldi f80ed5ef3e
Fix define MBED_EXCLUSIVE_ACCESS for Apple M1 (ARM64) computers
The new Apple M1 Mac computers are ARM based. When compiling and running
unit tests on an M1 Mac, the architecture is defined as __arm__

An extra check for __aarch64__ is needed to set MBED_EXCLUSIVE_ACCESS to 0U for the M1
Mac

If not, compilation fails with "Unknown ARM architecture for exclusive access" error
2021-03-23 11:42:02 +01:00
Lingkai Dong e6fd25df83 Enforce full-qualified path for `os_wrapper/*.h`
Some host operating systems are case-insensitive and cannot
distinguish (for example) `semaphore.h` in `os_wrapper` from
`Semaphore.h` from Mbed OS `rtos`. This causes the wrong header to be
included.

By adding `os_wrapper/.mbedignore`, we guarantee that

    #include "Semaphore.h"

always points to `rtos/Semaphore.h`, while the fully-qualified include

    #include "os_wrapper/semaphore.h"

continues to work because its parent directory is still in the include
path.
2021-03-22 16:41:52 +00:00
Martin Kojtal 96e19afdd1
Merge pull request #14396 from LDong-Arm/tfm_os_wrapper
TF-M: Switch to vanilla TF-M's OS wrapper
2021-03-22 12:06:04 +01:00
Lingkai Dong a6081e5681 Update VERSION.txt for imported TF-M files 2021-03-22 10:01:46 +00:00
George Psimenos d239ef98cd Rename USBTX/RX to CONSOLE_TX/RX 2021-03-18 17:01:54 +00:00
jeromecoutant 9d453cce68 [STD-PIN] ARDUINO_UNO pins
- hal/include/hal/ArduinoUnoAliases.h creation
- doc update
2021-03-18 17:01:50 +00:00
jeromecoutant a4350f72bd [STD-PIN] BUTTON and LED define
hal/tests/TESTS/mbed_hal/gpio/main.cpp is replaced by
hal/tests/TESTS/pin_names/generic/main.cpp now
2021-03-18 17:01:50 +00:00
jeromecoutant a6c213bb10 [STD-PIN] Replace STDIO_UART_TX by USBTX 2021-03-18 17:01:50 +00:00
Lingkai Dong eeae3d73dd Import OS wrapper from the vanilla TF-M
Previous, we patched TF-M to replace its OS wrapper with CMSIS RTOS
to resolve manage management issue when integrated with Mbed OS. But
as of TF-M v1.2, the OS wrapper has been reworked in the vanilla TF-M,
and now it makes identical calls to its underlying CMSIS RTOS as our
patches do. So, we remove our patches and use vanilla TF-M's OS
wrapper instead to avoid extra maintenance overhead.

This commit re-imports TF-M files associated with the OS wrapper.
2021-03-17 09:41:56 +00:00
mbedmain c73413893f Update Mbed version block 2021-03-15 12:45:41 +00:00
Martin Kojtal 8947e3cbeb
Merge pull request #14403 from saheerb/CY8CKIT064B0S2_4343W-115200
update baud rate of CY8CKIT064B0S2_4343W to 115200
2021-03-12 13:28:21 +00:00
Lingkai Dong 4450464fc8 Add integer overflow check to the malloc wrappers
Add a check that the combined size of the buffer to allocate and
alloc_info_t does not exceed the maximum integer value representable
by size_t.
2021-03-10 09:47:15 +00:00
Saheer Babu aba132e84c update baud rate of CY8CKIT064B0S2_4343W to 115200 2021-03-09 22:48:50 +00:00
Lingkai Dong 31cc82dabb "Updated secure binaries for [(ARM_MUSCA_S1, ARMCLANG)]"
This brings in the platform init fix:

    https://github.com/ARMmbed/trusted-firmware-m/pull/15
2021-03-09 10:22:58 +00:00
Lingkai Dong f225791fee CMake: Support signing and merging TF-M binaries
This commit adds post binary hook support for TF-M targets.

To apply this hook to a TF-M target, do the following in the target's
`CMakeLists.txt`:
* include `mbed_set_post_build_tfm.cmake`
* call `mbed_post_build_tfm_sign_image()`, passing
  - Mbed OS target name
  - TF-M target name
  - path containing the target's bootloader, layout files and signing
    keys
  - path to the secure binary
  - path to the non-secure binary (i.e. the "raw" Mbed application)
2021-03-05 16:16:26 +00:00
Martin Kojtal 8a1ce92317
Merge pull request #14368 from LDong-Arm/minimal_printf_cmake_fix
Fix CMake include path for the minimal-printf test
2021-03-05 14:22:09 +00:00
Lingkai Dong 074b0ba00c Fix CMake include path for the minimal-printf test 2021-03-02 17:27:50 +00:00
Lingkai Dong 62c8379d8d TARGET_TFM_V1_0: compatibility with Mbed TLS 2.24.0
Mbed TLS 2.24.0 requires a few new macros and an inline function in
the PSA Crypto header. This PR adds them to make sure the TF-M v1.0
target (specifically CYTFM_064B0S2_4343W) continues to compile with
the new Mbed TLS.

Note: Support for older versions of TF-M than v1.2 will be dropped,
so existing TF-M targets should migrate to TF-M v1.2 as soon as
possible.
2021-02-25 15:40:57 +00:00
Lingkai Dong 2807a01fd3 "Updated directory platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST " 2021-02-25 14:02:57 +00:00
Lingkai Dong eb0ac59494 Deprecation warnings for key enrollment algorithm
Setting/getting key enrollment algorithm is not recommended and not
part of the vanilla PSA or TF-M. For now keep the API just for
backward compatibility with existing projects, and this commit
adds deprecation warnings.
2021-02-25 14:02:57 +00:00
Lingkai Dong 12b2c89962 PSA/TF-M: support key enrollment algorithm
Add `psa_set_key_enrollment_algorithm()` and
`psa_get_key_enrollment_algorithm()` for TF-M targets.

Note: This is deprecated and for backward compatibility only.
Setting an enrollment algorithm is not recommended, because
using the same key with different algorithms can allow some
attacks based on arithmetic relations between different
computations made with the same key, or can escalate harmless
side channels into exploitable ones. Use this function only
if it is necessary to support a protocol for which it has been
verified that the usage of the key with multiple algorithms
is safe.
2021-02-25 14:02:57 +00:00
Vikas Katariya ab09a6934b Add mbedtls_ecc_group_to_psa() to PSA in TF-M 1.2
The PSA headers imported from TF-M does not contain a declaration of
mbedtls_ecc_group_to_psa(), which is expected by pk.c from Mbed TLS.
This leads to an "undefined symbol" error when using the ARM toolchain
to compile an application for a TF-M target.
2021-02-25 14:02:56 +00:00
Vikas Katariya 260a33574b core: Upgrade TFM v1.2 related files
These files have been imported/copied from:
* ARMmbed/trusted-firmware-m
* ARMmbed/tf-m-tests

These are generic files, which are required for TF-M v1.2 integration
with Mbed OS for PSA_V8M and PSA_DUAL_CORE targets.
2021-02-25 14:02:56 +00:00
Vikas Katariya b0da9d0cdf Switch to using `TARGET_TFM_LATEST`
Rather than maintaining a specific `TARGET_TFM_V1_x`, its better to use
more generic name `TARGET_TFM_LATEST` to avoid confusion on the latest
TFM version supported by Mbed OS

* Rename the folder from `TARGET_TFM_V1_1` to `TARGET_TFM_LATEST`
* Update the CmakeLists.txt
* Change the name of the MUSCA targets to maintain uniformity
with TF-M v1.2
* Update target.json for PSA_V8_M to use `TFM_LATEST`
2021-02-25 14:02:55 +00:00
Lingkai Dong 410a1bad6b Import mbedtls-2.24 and Mbed PSA Service (non-TFM)
Files have been automatically imported by setting MBED_TLS_RELEASE to
mbedtls-2.24.0 in connectivity/mbedtls/tools/importer/Makefile and
running `make` in that directory.
2021-02-25 14:02:55 +00:00
Martin Kojtal 85c2d7a25c CMake: remove IAR references as they are not supported 2021-02-17 09:19:03 +00:00
Martin Kojtal 09dd4d2582 CMake platform: remove IAR related CMakeLists
Not supported
2021-02-17 09:15:50 +00:00
mbedmain 26606218ad Update Mbed version block 2021-02-16 16:01:39 +00:00
Martin Kojtal fb0d646f23
Merge pull request #14179 from caoddx/fix-minimal-printf
Fix minimal-printf floating point decimal output error
2021-02-05 10:10:39 +00:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
mbedmain 0c6753bb82 Update Mbed version block 2021-01-25 14:58:06 +00:00
caodd 9a7b2a8647 Fix minimal-printf floating point decimal output error 2021-01-20 20:54:34 +08:00
Martin Kojtal d841c77921
Merge pull request #13968 from hugueskamba/hk_cmake_arm_ssg_support
CMake: Add support for all ARM SSG Mbed targets
2021-01-20 08:03:03 +00:00
Hugues Kamba c724d790c0 CMake: Add mbed-psa library as a dependency to mbed-core if PSA is used
Include PSA source files only if a given Mbed target needs it.
This commit also consolidates CMakeLists.txt files within the platform
directory
2021-01-18 17:39:13 +00:00
Marc Emmers a8ea7758c3 Fix make_span text in comment block 2021-01-18 15:49:29 +01:00
Marc Emmers 8551e93bf2 Fix last extra space issues 2021-01-18 14:36:17 +01:00
Marc Emmers a826c89b10 Backport dynamic extent when including <span>
Keep make_span functions even when <span> is available for compatibility
2021-01-18 14:35:47 +01:00
Marc Emmers d5459ea380 Fix missing defintion 2021-01-18 14:34:26 +01:00
Marc Emmers 8f94feb0ed Add to list of backports 2021-01-18 14:33:20 +01:00
Marc Emmers 78f2cfc0d9 Add some comment blocks 2021-01-16 21:04:16 +01:00
Marc Emmers f7e19b5232 Add deduction guides 2021-01-16 21:04:05 +01:00
Marc Emmers 2e1b360e67 Remove nonstandard as_bytes 2021-01-16 21:03:29 +01:00
Marc Emmers 69331b0cc0 Fix minor style issues 2021-01-16 21:02:47 +01:00
Marc Emmers 96954d3319 Replace classes with structs where applicable 2021-01-16 20:02:24 +01:00
Marc Emmers e0299bd7a3 Use original <span> if present and the right version 2021-01-16 20:02:24 +01:00
Marc Emmers 1dac20cded Missed a pointer operator 2021-01-16 20:02:24 +01:00
Marc Emmers 6389bcb2ee Fix pointer and reference operator style 2021-01-16 20:02:24 +01:00
Marc Emmers 405baeb559 Fix newline at end of file 2021-01-16 20:02:24 +01:00
Marc Emmers e18ce022b8 Update default initializers 2021-01-16 20:02:24 +01:00
Marc Emmers 07da1a7005 Remove explicit constructors 2021-01-16 20:02:24 +01:00
Marc Emmers 5231bec423 Fix remaining namespaces and add include files 2021-01-16 20:02:24 +01:00
Marc Emmers a5b66cf824 Remove c++17 inline of constexpr 2021-01-16 20:02:24 +01:00
Marc Emmers 1931f4e0d0 Fix namespaces and span prototype 2021-01-16 20:02:24 +01:00
Marc Emmers c89c45877c Prevent warning on subspan<0,N> 2021-01-16 20:02:24 +01:00
Marc Emmers 4097b9d956 Add container constructor and make_span 2021-01-16 20:02:24 +01:00
Marc Emmers e93ebc4cd2 Correct span constructors 2021-01-16 20:02:24 +01:00
Marc Emmers 11573a9264 Add iter_reference_t to iterator header 2021-01-16 20:02:24 +01:00
Marc Emmers c38df18dcc Fix endif comment 2021-01-16 20:02:24 +01:00
Marc Emmers 2f0bfd605e Adds basic span implementation 2021-01-16 20:02:24 +01:00
Rajkumar Kanagaraj 9596c1beea CMake: Add platform greentea test with CMake 2021-01-05 06:52:12 -08:00
mbedmain d6784c3ee6 Update Mbed version block 2020-12-11 17:08:21 +00:00
Anna Bridge 9f18c445ee
Merge pull request #13908 from LDong-Arm/kvstore_libraries
Restructure KVStore to one library per store type
2020-12-11 13:41:16 +00:00
Martin Kojtal c06fcaf5c5
Merge pull request #13548 from evva-sfw/enhance-minimal-printf
Add width modifier and prepending zeros for hexadecimal output and decimal precision for floating point
2020-12-10 09:14:59 +00:00
Lingkai Dong c2cc43875a CMake: add missing linkages of storage libraries 2020-12-09 17:26:32 +00:00
Martin Kojtal 9662e409db
Merge pull request #14001 from kjbracey-arm/mbed-os-atomic
Add missing retry to atomic exchange
2020-12-09 13:29:56 +00:00
Oliver Wildtgrube 03cf6214c3 Add width modifier and prepending zeros for integer, hexadecimal and floating point output as well as decimal precision for floating point 2020-12-08 21:07:54 +01:00
Kevin Bracey 0b30742c80 Add missing retry to atomic exchange
Atomic exchange implementation forgot to do the retry if the exclusive
store failed.
2020-12-03 16:36:23 +02:00
Leon 310b6dd127 Add crash reporting and autoreboot capability to MTS_DRAGONFLY_L471QG 2020-12-01 14:18:16 -06:00
Martin Kojtal 124afe79bb
Merge pull request #13755 from AGlass0fMilk/fix-init-os-timer
Fix MBED_ERROR call in init_os_timer
2020-11-24 13:38:46 +00:00
Martin Kojtal 57bbb4739b
Merge pull request #13085 from pea-pod/remove-deprecated-mbed-assert
Change MBED_STATIC_ASSERTs version for built-in
2020-11-24 13:38:07 +00:00
George Beckstein 7571982606 Fix MBED_ERROR call in init_os_timer 2020-11-19 12:35:34 -05:00
mbedmain f2278567d0 Update Mbed version block 2020-11-18 11:27:24 +00:00
Martin Kojtal 65097e1c07
Merge pull request #13878 from evedon/blockdevice-library
Add missing blockdevice mbed_lib.json
2020-11-12 08:44:48 +00:00
Martin Kojtal 3555ada459
Merge pull request #13867 from marcemmers/fix-systimer-overflow
SysTimer: Prevent unacknowledged tick overflow when halted for a while
2020-11-11 08:55:24 +00:00
Hugues Kamba 794e32df74 CMake: Use relative paths to list source files and directories
The absolute path is still required for listing linker
files as they are referenced from a function in the top
level CMake input source file.
2020-11-09 12:32:30 +00:00
Rajkumar Kanagaraj e7c0d93ad4 CMake: add mbed-os and mbed-baremetal targets
mbed-os consists of mbed-core and mbed-rtos
mbed-baremetal consists of mbed-core

The main change is for mbed-core. Changing from object library to be interface. This way it allows us to do the above to have 2 main targets for users to use.

This should be backward compatible change as mbed-os target we used contains the same files/options as previously set.
2020-11-06 17:25:22 +00:00
Hugues Kamba bf84a5b329 CMake: Rename CMake targets
* mbed-os renamed mbed-core
* mbed-os-<COMPONENT> renamed mbed-<COMPONENT>
2020-11-06 17:25:22 +00:00
Hugues Kamba fa98689639 CMake: Componentize Mbed OS into multiple CMake targets (#13732)
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`.

Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
2020-11-06 17:25:21 +00:00
Hugues Kamba 0f7d03ae1c CMake: Revert mbed-trace CMake input source file to match upstream repository (#13590)
As there is currently no mbed-trace library, statements related to that
target have been commented out.
2020-11-06 17:25:20 +00:00
Hugues Kamba 1b576c3046 CMake: Clean up platform 2020-11-06 17:25:20 +00:00
Hugues Kamba 9b8c5acb99 CMake: Fix build failure due to mbed-trace, mbed-client-randlib, and nanostack dir changes 2020-11-06 17:25:20 +00:00
Hugues Kamba a0fbe2947a CMake: Fix build failure due to CMSIS restructure 2020-11-06 17:25:20 +00:00
Hugues Kamba 4fc678c30d CMake: Correct file listing for PSA 2020-11-06 17:25:20 +00:00
Hugues Kamba 0c8cb3134c CMake: Fix build failure due to PSA dir move 2020-11-06 17:25:20 +00:00
Hugues Kamba c876bc1d75 CMake: Fix build issue due to platform changes 2020-11-06 17:25:18 +00:00
Hugues Kamba 929adbe936 CMake: Add support for platform dir 2020-11-06 17:25:15 +00:00
Hugues Kamba 1d6f86f553 CMake: Add support for features dir 2020-11-06 17:25:15 +00:00
Marc Emmers 8b7e7ee8f6 Make _unacknowledged_ticks uint32_t to prevent overflow 2020-11-05 15:26:44 +01:00
Evelyne Donnaes f4b7f44d93 Added missing blockdevice mbed_lib.json 2020-11-02 16:35:26 +00:00
pea-pod 507181d262 Change MBED_STATIC_ASSERTs version for built-in 2020-10-27 08:30:40 -05:00
mbedmain 8ef0a435b2 Update Mbed version block 2020-10-20 15:48:27 +01:00
Martin Kojtal 2d01a4412d
Merge pull request #13723 from boraozgen/feature/f412xg-crash-ram
Add crash RAM to STM32F412xG
2020-10-16 09:10:55 +01:00
Martin Kojtal 61aa6817f0
Merge pull request #13724 from harmut01/license_refactor
Add license notice to Arm copyrighted source files
2020-10-16 09:09:53 +01:00
Harrison Mutai d1d6bf51b3 Add license notice to Arm copyrighted source files
Scancode found missing license notices in our source files. This commit
addresses those issues by adding an Apache-2.0 notice to source files
highlighted.
2020-10-15 10:46:35 +01:00
Martin Kojtal 2cb64f5bce
Merge pull request #13549 from kjbracey-arm/readdir_r
Make readdir reentrant
2020-10-13 11:11:45 +01:00
jeromecoutant 953b50397f Platform: enable crash feature for NUCLEO_F412ZG 2020-10-09 10:28:28 +02:00
Martin Kojtal d829ac3fa8
Merge pull request #13649 from LDong-Arm/mbed-trace-default
Make mbed-trace available to bare metal
2020-09-22 16:24:18 +01:00
Martin Kojtal 2ab7b44f10
Merge pull request #13563 from paul-szczepanek-arm/circ-buf
Add mutiple push and pop for circular buffer
2020-09-21 16:29:04 +01:00
Martin Kojtal a02ea2f43a
Merge pull request #13623 from rajkan01/refactor_docs
Refactor mbed-os design docs
2020-09-21 16:28:13 +01:00
Lingkai Dong f7b82ace3a Make mbed-trace available to bare metal
Some code in "drivers" and "targets" use mbed-trace, which when
disabled has zero overhead as trace function calls are masks
by dummy macros.
2020-09-21 15:40:38 +01:00
Lingkai Dong 378046ee24 mbed-trace: if fea-ipv6 is null, check nanostack-libservice availability 2020-09-21 15:40:38 +01:00
Rajkumar Kanagaraj 19908b2b21 Refactor hal, platform, rtos docs 2020-09-17 16:03:43 +01:00
Rajkumar Kanagaraj a74120ca2e Move greentea test closure to library 2020-09-16 13:04:21 +01:00
Paul Szczeanek b335675cbd missing dependencies 2020-09-16 11:05:02 +01:00
mbedmain 0db72d0cf2 Update Mbed version block 2020-09-14 12:09:56 +01:00
Anna Bridge ad973f2f14
Merge pull request #13594 from moshe-shahar/psa-gen-rot
PSA - Generate root of trust before accessing kvstore
2020-09-11 15:46:35 +01:00
Moshe Shahar eaf9601bc9 remove redundant call to generate_root_of_trust from its test 2020-09-10 19:44:52 +03:00
Moshe Shahar 5954267859 PSA - Generate root of trust before accessing kvstore 2020-09-10 19:25:59 +03:00
Paul Szczeanek 3d827e8e86 unit tests for circular buffer 2020-09-10 15:00:20 +01:00
Paul Szczeanek d4eaa48591 allow popping and pushing of multiple items in circular buffer 2020-09-10 15:00:01 +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
Martin Kojtal 41f2ee54f9
Merge pull request #13430 from LDong-Arm/refactor_frameworks
Relocated libraries in features/frameworks
2020-09-07 09:10:56 +01:00
Kevin Bracey 5ab6f1cef6 Make readdir reentrant
Remove the static allocation for the dirent, and allocate it from the
heap during opendir().

Removing the static data can reduce RAM usage on some toolchains when
directories are not being used. The static allocation sometimes is
combined with the file handle array and can't be dropped by the linker.

Original readdir() was not thread-safe at all.

This was in violation of POSIX which states the result of readdir "is
not overwritten by another call to readdir() on a different directory
stream."

POSIX also defines readdir_r() as separate totally reentrant form where
the caller allocates the dirent, but this is generally deprecated as it
opens the door for an inadequate allocation causing a stack smash. Full
reentrancy is not typically necessary - having readdir()'s buffer data
be per-DIR is generally sufficient.
2020-09-04 16:58:23 +03:00
Martin Kojtal 4a68b8af89
Merge pull request #13486 from rajkan01/fix_malloc_overhead_calculation
Fix heap stats overhead_size calculation
2020-09-03 11:38:41 +01:00
Lingkai Dong d6a2269de3 Restructure platform/randlib
* Move mbed-client-randlib/ headers into include/
  (Note: we don't rename it to "randlib" because this library
   is mirrored to https://github.com/ARMmbed/mbed-client-randlib,
   and "mbed-client-randlib" may be reference by some projects)
* Move the standalone local unit test into tests/unit
2020-09-02 12:31:00 +01:00
Lingkai Dong 9b1e0a38fe Move mbed-client-randlib -> platform/randlib 2020-09-02 12:31:00 +01:00
Lingkai Dong af1950fb16 Add include/ path for mbed-trace 2020-09-02 12:30:59 +01:00
Lingkai Dong a88438ce04 Move mbed-trace into platform 2020-09-02 12:30:59 +01:00
Hugues Kamba 834e530abd CMSIS: Restructure ported CMSIS_5
See docs/adr/0001_cmsis_component_source_structure_recommendations.md
For details information.
2020-09-01 15:55:13 +01:00
Rajkumar Kanagaraj f3c9132637 Incorporated the review comments 2020-09-01 14:46:36 +01:00
Anna Bridge b3c19227a4
Merge pull request #13459 from 0xc0170/fix_platform_component
platform: fix internal platform headers
2020-08-25 15:53:12 +01:00
Rajkumar Kanagaraj d30ba6ba62 Fix malloc internal overhead size calculation for newlib and newlib-nano 2020-08-24 15:07:36 +01:00
Martin Kojtal 2c18e93979
Update platform/source/mbed_os_timer.cpp
fix the typo

Co-authored-by: Lingkai Dong <lingkai.dong@arm.com>
2020-08-21 14:55:58 +01:00
Rajkumar Kanagaraj 118c01016b Move FEATURE_EXPERIMENTAL_API for PSA to platform 2020-08-21 14:35:10 +01:00
Martin Kojtal 207a164c08
Merge pull request #13434 from LDong-Arm/move_drivers_platform_tests
Move Callback tests to platform, USB tests to drivers
2020-08-21 13:50:22 +01:00
Martin Kojtal a6ce2c53a0 platform: move internal headers to internal/
They belong to internal folder to follow our guideline, not in source as they were.
2020-08-20 08:58:00 +01:00
Martin Kojtal 8078e20cb4 platform: remove platform/ prefix for source
If we take platform as a component, platform/source would be outside of this component.
I removed the prefix as these are implementation specific (they are located in source folder,
not in include as the others).
2020-08-18 15:55:39 +01:00
mbedmain 83fa12183b Update Mbed version block 2020-08-16 20:59:02 +01:00
Lingkai Dong bf3e1237aa Move mbed_functional tests into platform/tests/TESTS 2020-08-14 17:53:19 +01:00
Ashok Rao a78554ebfa Fixing .astyleignore conflict 2020-07-31 15:50:03 +01:00
Ashok Rao 0d9a1cc24e Adding required host_tests 2020-07-31 15:15:08 +01:00
Matthew Macovsky b7c0e89eb9 Fix IAR assembler errors on except.S
Fixes two errors produced on except.S by the IAR assembler (as seen in
issue #13200).

The first: "'ALIGN' is illegal. Use directive ALIGNROM or ALIGNRAM (the
first parameter is raised to the power of 2, the second is a 32-bit fill
value)."
Fixed by changing ALIGN to ALIGNROM 2 to align to a 4-byte boundary
(mirroring what ALIGN does in the ARM except.S).

The second (on THUMB): "Must be placed inside a section"
Fixed by moving THUMB after the SECTION directive so that it affects
that section.
2020-07-29 08:25:41 -07:00
George Psimenos 99803be98f Relocate platform unit tests 2020-07-28 10:16:47 +01:00
Ashok Rao 09734a861d Refactoring \platform as per directory structure proposal.
Mbed OS will soon be changing directory structure to the below:

```
[component name]
├── mbed_lib.json
├── CMakeList.txt
├── README.md
├── include
│   └── [component name]
│       └── internal
├── source
└── tests
    ├── <framework>
    │   └── <test suite one>
    ├── UNITTESTS
    │   └── <unit test suite one>
    └── TESTS
        └── <greentea test suite one>
```
This PR implements the above new directory structure for the current \platform directory.
**NOTE:** This PR does NOT include the refactoring of UNITTESTS as shown in the above directory structure. This will be done in a subsequent PR.
2020-07-28 10:14:44 +01:00
adbridge a2ada74770 Update Mbed version block 2020-07-15 10:47:30 +01:00
Marc Emmers a20ff63574 Add include <iterator> 2020-07-09 12:23:00 +02:00
Marc Emmers dfa8ea714d Add begin, end, rbegin and rend iterator functions to Span 2020-07-08 17:14:39 +02:00
adbridge a6207cadad Update Mbed version block 2020-06-24 16:41:27 +01:00
Martin Kojtal 3e42991289
Merge pull request #13046 from hugueskamba/hk_use_chrono
Use std::chrono based functions
2020-06-18 22:16:00 +02: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
Martin Kojtal 62c2431344
Merge pull request #12824 from kjbracey-arm/faultasm
Optimise fault handler assembly
2020-06-18 09:43:00 +02:00
Hugues Kamba a3f4cf212d Use std::chrono based functions
The chrono based functions improve readability. Using them also removes
warnings related to usage of deprecated warnings.
2020-06-17 14:52:50 +01:00
Anna Bridge d0d35c2743
Merge pull request #12772 from pea-pod/scoped-enums
Add enum class flag definition to platform
2020-06-12 11:39:29 +01:00
Martin Kojtal b287d98d2c
Merge pull request #13002 from pea-pod/simplify-mbed-assert
Deprecate MBED_STATIC_ASSERT and MBED_STRUCT_STATIC_ASSERT for built-in keyword
2020-06-10 11:46:55 +02:00
Martin Kojtal dc30e1bf60
Merge pull request #13015 from jeromecoutant/PR_IARTRIVIAL
Force callback non-trivial for IAR
2020-06-05 10:45:21 +02:00
Martin Kojtal 7ae621ee86
Merge pull request #12988 from jeromecoutant/PR_OS_TIMER
OS timer uses LPTICKER by default, then USTICKER
2020-06-04 15:15:43 +02:00
adbridge 782fa9bb18 Update mbed version number 2020-06-02 11:38:04 +01:00
pea-pod 5fb87eb0b0 Simplify MBED_STATIC_ASSERT for C11 and C++14 2020-06-02 00:16:49 -05:00
jeromecoutant d8fc1e9121 Force callback non-trivial for IAR 2020-05-25 15:29:27 +02:00