Merge pull request #14588 from Patater/mbed-libs-for-m55

Add v8.1-M architecture awareness
pull/14548/head
Martin Kojtal 2021-05-10 15:13:33 +02:00 committed by GitHub
commit e18d280ede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 3 deletions

View File

@ -649,6 +649,7 @@ private:
#if (__ARM_ARCH_7M__ == 1U) || \
(__ARM_ARCH_7EM__ == 1U) || \
(__ARM_ARCH_8M_MAIN__ == 1U) || \
(__ARM_ARCH_8_1M_MAIN__ == 1U) || \
(__ARM_ARCH_7A__ == 1U)
/* ARM that has Thumb-2 - same unified assembly is good for either ARM or Thumb state (LSRS; IT CS; EORCS reg/imm) */
#define MBED_CRC_ARM_THUMB2 1

View File

@ -18,7 +18,7 @@
#include "platform/mbed_assert.h"
#include "cmsis.h"
#if ((__ARM_ARCH_8M_BASE__ == 1U) || (__ARM_ARCH_8M_MAIN__ == 1U)) && \
#if ((__ARM_ARCH_8M_BASE__ == 1U) || (__ARM_ARCH_8M_MAIN__ == 1U) || (__ARM_ARCH_8_1M_MAIN__ == 1U)) && \
defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) && \
!defined(MBED_MPU_CUSTOM)

View File

@ -177,7 +177,10 @@ utest::v1::status_t fault_override_teardown(const Case *const source, const size
Case cases[] = {
Case("MPU - init", fault_override_setup, mpu_init_test, fault_override_teardown),
Case("MPU - free", fault_override_setup, mpu_free_test, fault_override_teardown),
#if !((__ARM_ARCH_8M_BASE__ == 1U) || (__ARM_ARCH_8M_MAIN__ == 1U))
#if !((__ARM_ARCH_8M_BASE__ == 1U) || \
(__ARM_ARCH_8M_MAIN__ == 1U) || \
(__ARM_ARCH_8_1M_MAIN__ == 1U) \
)
// Skip fault tests for ARMv8-M until a fault handler hook is provided
Case("MPU - data fault", fault_override_setup, mpu_fault_test_data, fault_override_teardown),
Case("MPU - bss fault", fault_override_setup, mpu_fault_test_bss, fault_override_teardown),

View File

@ -69,7 +69,8 @@ typedef enum mbed_memory_order {
#if ((__ARM_ARCH_7M__ == 1U) || \
(__ARM_ARCH_7EM__ == 1U) || \
(__ARM_ARCH_8M_BASE__ == 1U) || \
(__ARM_ARCH_8M_MAIN__ == 1U)) || \
(__ARM_ARCH_8M_MAIN__ == 1U) || \
(__ARM_ARCH_8_1M_MAIN__ == 1U)) || \
(__ARM_ARCH_7A__ == 1U)
#define MBED_EXCLUSIVE_ACCESS 1U
#define MBED_EXCLUSIVE_ACCESS_THUMB1 (__ARM_ARCH_8M_BASE__ == 1U)

View File

@ -17,6 +17,14 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
)
endif()
# We'd like to use just "-mcpu=cortex-m55" in common_options, but due to a bug
# in armclang passing options to armasm, we use the following flags as a
# workaround to select M55.
list(APPEND asm_compile_options
-mcpu=cortex-r7
-Wa,--cpu=cortex-m55
)
function(mbed_set_cpu_core_definitions target)
target_compile_definitions(${target}
INTERFACE