Make changes for Cortex-A5 support

pull/14718/head
Meano 2021-06-04 18:17:13 +08:00
parent a57b892cb8
commit ff2188150a
7 changed files with 8 additions and 6 deletions

View File

@ -21,7 +21,7 @@
#include<stdint.h>
#if defined(__CORTEX_M0PLUS) || defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)\
|| defined(__CORTEX_M23) || defined(__CORTEX_A9) || defined(__CORTEX_M33)
|| defined(__CORTEX_M23) || defined(__CORTEX_A9) || defined(__CORTEX_A5) || defined(__CORTEX_M33)
#define MBED_APPLICATION_SUPPORT 1
#else
#define MBED_APPLICATION_SUPPORT 0

View File

@ -23,7 +23,7 @@
#if MBED_APPLICATION_SUPPORT
#if defined(__CORTEX_A9)
#if defined(__CORTEX_A9) || defined(__CORTEX_A5)
static void powerdown_gic(void);

View File

@ -91,7 +91,7 @@ void wait_us(int us)
#define LOOP_SCALER 2000
#endif
#elif defined __CORTEX_A
#if __CORTEX_A == 9
#if __CORTEX_A == 9 || __CORTEX_A == 5
// Cortex-A9 can dual issue for 3 cycles per iteration (SUB,NOP) = 1, (NOP,BCS) = 2
#define LOOP_SCALER 3000
#endif

View File

@ -33,7 +33,7 @@ DigitalOut led1(LED1);
#endif
// Targets with these cores have their RAM enough size to create threads with bigger stacks
#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(__CORTEX_M7)
#if defined(__CORTEX_A9) || defined(__CORTEX_A5) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(__CORTEX_M7)
#define MAX_THREAD_STACK 512
#else
#define MAX_THREAD_STACK 384

View File

@ -32,7 +32,7 @@ volatile bool thread_should_continue = true;
#define NUM_THREADS 4
#define THREAD_MALLOC_SIZE 100
#if defined(__CORTEX_A9)
#if defined(__CORTEX_A9) || defined(__CORTEX_A5)
#define THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512

View File

@ -32,7 +32,7 @@
#include <type_traits>
#define THREAD_STACK_SIZE 512
#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(TARGET_ARM_FM) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
#if defined(__CORTEX_A9) || defined(__CORTEX_A5) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(TARGET_ARM_FM) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
#define PARALLEL_THREAD_STACK_SIZE 512
#define CHILD_THREAD_STACK_SIZE 512
#else

View File

@ -25,6 +25,8 @@ endfunction()
# Set the system processor depending on the CPU core type
if (MBED_CPU_CORE STREQUAL Cortex-A9)
set(CMAKE_SYSTEM_PROCESSOR cortex-a9)
elseif (MBED_CPU_CORE STREQUAL Cortex-A5)
set(CMAKE_SYSTEM_PROCESSOR cortex-a5)
elseif (MBED_CPU_CORE STREQUAL Cortex-M0+)
set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus)
elseif (MBED_CPU_CORE STREQUAL Cortex-M0)