Commit Graph

25 Commits (latest)

Author SHA1 Message Date
Martin Kojtal 77f8a30749 cmsis: fix iar asm build error with including header
mbed-cli1 does not pass -I to IAR for iarasm (comparing to other toolchains). Because old tools are frozen,
we implement this workaround for fixing the build.

We use preprocessor macros that are passed to .S files anyway, so we do not loose anything but we do diverge again from CMSIS, for now..
2021-08-20 13:22:56 +01:00
Martin Kojtal 180eb75f09 cmsis: patch fpu in asm for armcc5
For FPU, use armasm to select fpu selection. This will be fixed upstream in the next version of CMSIS. Meanwhile, we use our local patch.

Taken from --cpu selection for armasm:

--cpu           | {FPU}
Cortex-M4.fp.sp | VFPv4_SP_D16
Cortex-M7.fp.sp | FPv5-SP
Cortex-M7.fp.dp | FPv5_D16

Tracking issue: https://github.com/ARM-software/CMSIS_5/issues/1266
2021-07-29 14:31:39 +01:00
Martin Kojtal c122158d49 cmsis: preprocess irq files
We use preprocessor for asm files even for Armcc. If symbol is defined it's replaced by preprocessor,
asembler would just see 1 or 0 in this case and errors:
TARGET_M33\\irq_armv8mml.S", line 31: Error: A1185E: Symbol missing

Use preprocessor instead.
2021-07-29 14:31:39 +01:00
Martin Kojtal dca1d5c42e cmsis: fix armcc compat header redefition of enable/disable irq
The fix will be in the 5.8.1 CMSIS, we cherry-pick it to our imported version.
See e797cca3f4
2021-07-29 14:31:39 +01:00
Martin Kojtal 00580ce3f5 cmsis: fix rtx_def inclusion in .S files for Gcc Arm
rtx_def includes two CMSIS headers that pull in C/C++ headers in our case. As I found out,
they should only define macros. We can fix it but it will require some refactoring as our targets
use mbed rtx headers to define heap using stdin header, plus some other offenders.

Workaround is to exclude the headers we do not need in irq assembly files.

Tracking issue https://github.com/ARMmbed/mbed-os/issues/14962
2021-07-29 14:31:38 +01:00
Martin Kojtal 218e93c97f cmsis: fix license header in rtx_def
Upstream fix was merged https://github.com/ARM-software/CMSIS_5/pull/1238. Included here as it will be overwritten once again updated
2021-07-29 14:29:57 +01:00
Bartek Szatkowski 4744fdb2f3 CMSIS/RTX: Allow overwriting mutex ops for ARMC
(cherry picked from commit 08ab8cc47d)
2021-07-27 10:06:39 +01:00
Deepika 06b815a9d2 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)
2021-07-27 10:06:38 +01:00
Bartek Szatkowski 8ade0d46ec CMSIS/RTX: Patch RTX4 to preserve osThreadDef compatibility
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.

(cherry picked from commit 428acae1b2ac15c3ad523e8d40755a9301220822)
(cherry picked from commit 4360b7bbf8)
2021-07-27 10:06:37 +01:00
Martin Kojtal 7941286531 [CMSIS_5]: Updated to 13b9f72f2 2021-07-27 10:06:34 +01:00
Werner Lewis c97dcd0bae CMSIS: Modify M0/M0+ GCC asm to support ARMC6 2021-05-24 13:56:19 +01:00
Werner Lewis 204dd5b1a8 cmake: Use GCC CMSIS assembly with ARM toolchain
CMSIS provides both GNU and legacy ARM assembly files. Instead of using
armasm and legacy asm with ARM Compiler 6, CMakeLists is modified to
use the GNU format with both GCC_ARM and ARM C6.
2021-05-24 13:56:19 +01:00
Rajkumar Kanagaraj a88f43f367 CMake: Update mbed os, unittest CMake and add CMAKE_CROSSCOMPILING guard
- Add a new MbedOS project in mbed os root CMake which can be used along with
  BUILD_TESTING conditional check for enabling the unittest build
- Update UNITTEST CMake for setting the CMake configuration like c, cxx flags etc.,
- Add if CMAKE_CROSSCOMPILING conditional check wherever target configuration check
  and toolchain configuration to avoid such configuration gets included for unittest build.
2021-05-11 02:49:03 -07:00
Martin Kojtal 88a242f749
Merge pull request #14306 from hugueskamba/hk_cmake_create_cmsis_cortex_libs
CMake: Create CMSIS library targets to remove dependency on MBED_TARGET_LABELS
2021-02-23 08:36:49 +00:00
Hugues Kamba 2c3481297c CMake: Create CMSIS library targets to remove dependency on MBED_TARGET_LABELS
This goes towards eventually removing reliance on targets.json to specify
the requirements of Mbed targets.
2021-02-19 13:39:32 +00:00
Martin Kojtal 85c2d7a25c CMake: remove IAR references as they are not supported 2021-02-17 09:19:03 +00:00
Martin Kojtal 09e0ffda6e CMake rtos: add M55 to irq handlers, use m33 handlers = the same 2021-01-29 14:23:01 +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
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
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 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
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
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