Commit Graph

91 Commits (8f0724600864946edc38fa5db1fbca41987e2b1e)

Author SHA1 Message Date
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
Rajkumar Kanagaraj d2be577b01 CMake: split rtos from core target
Add or remove and directories containing source files, header files, and macro definitions that implement RTOS support.
This includes:
- cmsis/CMSIS_5/CMSIS/RTOS2/
- cmsis/device/rtos/
- rtos/source/ConditionVariable.cpp
- rtos/source/Thread.cpp
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 c82e8c2337 CMake: Restore rtos api and netsocket presence macro names
The old tools rely on the old names to build
2020-11-06 17:25:22 +00:00
Rajkumar Kanagaraj 8016a53400 CMake: replace usage of the mbed_add_cmake_directory_if_labels() function (#13754)
Directories that start with special prefixes (TARGET_, FEATURE_, COMPONENT_)  are added to the build based on Mbed target configuration from targets.json instead of calling utility function mbed_add_cmake_directory_if_labels().
2020-11-06 17:25:21 +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 0e257b0730 CMake: Fix location of M33 exception handler source file 2020-11-06 17:25:21 +00:00
Hugues Kamba a0fbe2947a CMake: Fix build failure due to CMSIS restructure 2020-11-06 17:25:20 +00:00
Hugues Kamba d83648937f CMake: Add support for cmsis dir 2020-11-06 17:25:15 +00:00
Martin Kojtal 0bb4ff04c6 cmsis: remove math header file
It was removed in 6.0 (see reference below), and it was reintroduced when we updated
cmsis from the upstream. We missed to remove the commit adding the file in the cmsis
importer. This fixes it and the file should not be introduced again.

Fixes #13823

Already removed in 6.0: https://github.com/ARMmbed/mbed-os/pull/12055
2020-11-02 10:23:45 +00:00
Harrison Mutai 4fad1112e5 Add SPDX license identifier to Arm files
Add license identifier to files which Arm owns the copyright to,
and contain either BSD-3 or Apache-2.0 licenses. This is to address
license errors raised by scancode analysis.
2020-10-15 10:47:27 +01:00
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
Mark Horvath 656e046113 Call mbed_tfm_init earlier
Change-Id: I0f45425058bf5cabbda877463ff1d8f4d713be8f
Signed-off-by: Mark Horvath <mark.horvath@arm.com>
2020-09-08 14:36:12 +02: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
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
Michael Schwarcz 58af676e9c CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abdb7c)
2020-05-11 11:18:02 +01:00
Deepika 856989d5d4 CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2020-05-11 11:18:00 +01:00
Bartek Szatkowski b6313331cd CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2020-05-11 11:17:57 +01:00
Martin Kojtal fb4f9e5b19 [CMSIS_5]: Updated to a65b7c9a3 2020-05-11 11:17:50 +01:00
Michael Schwarcz 80f2475a89 CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abdb7c)
2020-05-11 09:47:34 +01:00
Deepika fcaecd57ce CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2020-05-11 09:47:34 +01:00
Bartek Szatkowski 9f1e666732 CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2020-05-11 09:47:34 +01:00
Martin Kojtal 48747cdb26 [CMSIS_5]: Updated to b5f0603d6 2020-05-11 09:47:34 +01:00
Martin Kojtal 5a985a7da5 cmsis: remove arm math
Fixes #12054

Not needed file, should be part of DSP. The functionality is part of the library provided
by CMSIS.
2020-01-03 12:25:39 +00:00
Jonatan Antoni 14150bb7c6 Core(A): Fixed __FPU_Enable function not to mess registers. (#589)
- Enhanced function to use only two temporary registers.
- Added used registers to clobber list.

Change-Id: If7c9462ed4424781e40379fbe12a5e4e3257920f
2019-05-21 19:25:58 +09:00
Michael Schwarcz e8f9faee7e CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abdb7c)
2019-04-10 14:42:48 +03:00
Deepika cd54d2e02f CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2019-04-10 14:42:43 +03:00
Bartek Szatkowski 58d23afd20 CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2019-04-10 14:42:35 +03:00
Kevin Bracey 00c9005b4e [CMSIS_5]: Updated to ca812421 2019-04-10 14:41:35 +03:00
Kevin Bracey 07a2ca381b Move fault handlers to platform directory
Having them in cmsis causes grief when attempting to update CMSIS with
the importer script.
2019-04-10 14:36:52 +03:00
Martin Kojtal c08f51aa36 copyright 2019 fix 2019-02-15 13:37:40 +00:00
Martin Kojtal a32a76f014 cmsis conf: change license to apache 2.0 2019-02-14 13:54:31 +00:00
Michael Schwarcz d3f7abdb7c CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.
2019-01-10 18:06:56 +02:00
Martin Kojtal d2e9136ddb
Merge pull request #9167 from TomoYamanaka/hanlder_without_RTOS
Modify IRQ handler processing when unusing RTOS at Cortex-A
2019-01-04 08:42:11 +00:00
Martin Kojtal e245c1ecda
Merge pull request #9150 from kjbracey-arm/armc6_fpu
Check correct ARMC6 predefine for FP codegen
2018-12-20 10:47:32 +00:00
TomoYamanaka 65b4e72928 Modify IRQ handler processing without RTOS at Cortex-A IAR Compiler
In case of unusing RTOS, there is no processing against IRQ handler and it causes a linker error.
Therefore, I added this processing with WEAK attribute. Also I added cmain.S file at cmsis/TARGET_CORTEX_A folder.
2018-12-20 16:24:07 +09:00
Kevin Bracey 91f0be6ac3 Check correct ARMC6 predefine for FP codegen
For ARMC6, CMSIS headers were checking the `__ARM_PCS_VFP`, which
indicates hardfp ABI in use, when they need to check whether FP
code generation is enabled. Change this to `__ARM_FP`, so it
works for platforms using softfp ABI.

Change already present in CMSIS_5 repo, via commit
969822ae162539d50617d1e5a3634ee2fd3b60f6, but redone with local
search-and-replace.
2018-12-19 13:03:11 +02:00
Kevin Bracey f04904c6e8 CM3: Make ACTLR bit definitions conditional
The ACTLR register itself is conditional on chip revision, but its
bit definitions were always defined.

Make the the bit definitions also conditional, so it is possible to
produce portable code that sets DISDEFWBUF if available:

    #ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
       SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
    #endif

(cherry-picked from CMSIS b2b04dbeece0a046556bfc320bef6b20bef3f16f)
2018-12-13 16:31:53 +02:00
Naveen Kaje 091010e9a2 mbed_fault_handler: fix build warning
Fixes warning

BUILD\NRF52840_DK\GCC_ARM\mbed-os\cmsis\TARGET_CORTEX_M\mbed_fault_handler.o
.\mbed-os\cmsis\TARGET_CORTEX_M\mbed_fault_handler.c
[Warning] mbed_fault_handler.c@149,5: implicit declaration
of function 'memcpy' [-Wimplicit-function-declaration]
2018-12-11 14:59:36 -06:00
Senthil Ramakrishnan a07a373c9f Change the reboot-max value semantics and code style and other fixes 2018-11-16 14:00:00 -06:00
Senthil Ramakrishnan 6181394e37 Error and fault handling changes for crash reporting 2018-11-16 13:59:59 -06:00
Kevin Bracey 82a90721eb Fault handler: fix printf format specifiers 2018-10-31 14:49:21 +02:00
Senthil Ramakrishnan 230ba03582 Space optimization to fault handlers 2018-10-23 13:05:56 -05:00
Senthil Ramakrishnan 797538c854 Moving fault handlers under cmsis 2018-10-23 13:05:56 -05:00
Russ Butler c13c3e30cd Fix the CMSIS macro ARM_MPU_RASR
The update to CMSIS 5.4.0 broke the macro ARM_MPU_RASR. This patch
pulls in the upstream fix from CMSIS:
2ead2adffb (diff-e4bfba5228373d368ac2543d6e5bd4d0)
2018-09-18 17:50:21 -05:00
Russ Butler 308dfe3a53 Fix CMSIS __RESTRICT define for IAR
Revert the define __RESTRICT from "__restrict" to "restrict". This
fixes compilation for IAR.
2018-08-25 20:41:12 -05:00
Deepika fb354752eb CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)
2018-08-25 20:41:10 -05:00
Bartek Szatkowski ace5df9079 CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2018-08-25 20:41:10 -05:00
Russ Butler 342841aa0f [CMSIS_5]: Updated to 0b521765 2018-08-25 20:41:00 -05:00