diff options
| author | armink <[email protected]> | 2019-05-20 16:21:32 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-05-20 16:21:32 +0800 |
| commit | 35eff9a85dd1e922f98d36deed84bdfb3c8319f7 (patch) | |
| tree | ab526e2e216f5f656b9c6a53221382d07c7bac2e | |
| parent | 9ac80745fb106dcd5e33f646d940df5793a689ab (diff) | |
Fix the CI build error.
| -rw-r--r-- | .travis.yml | 1 | ||||
| -rw-r--r-- | bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm0.a | bin | 0 -> 18348 bytes | |||
| -rw-r--r-- | bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_hardabi.a | bin | 0 -> 18500 bytes | |||
| -rw-r--r-- | bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_softabi.a | bin | 0 -> 18492 bytes | |||
| -rw-r--r-- | bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power.a | bin | 0 -> 9512 bytes | |||
| -rw-r--r-- | bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power_m0.a | bin | 0 -> 8896 bytes | |||
| -rw-r--r-- | libcpu/arm/cortex-m7/cpu_cache.c | 89 |
7 files changed, 89 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 520e4ae794..c7ee04e5f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,7 +59,6 @@ env: # - RTT_BSP='microblaze' # no scons - RTT_BSP='mini2440' RTT_TOOL_CHAIN='sourcery-arm' # - RTT_BSP='mini4020' # no scons - - RTT_BSP='mm32l07x' # - RTT_BSP='nios_ii' # no scons - RTT_BSP='nuvoton_nuc472' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='nuvoton_m05x' RTT_TOOL_CHAIN='sourcery-arm' diff --git a/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm0.a b/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm0.a Binary files differnew file mode 100644 index 0000000000..98fab339a2 --- /dev/null +++ b/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm0.a diff --git a/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_hardabi.a b/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_hardabi.a Binary files differnew file mode 100644 index 0000000000..1f40c8ccf6 --- /dev/null +++ b/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_hardabi.a diff --git a/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_softabi.a b/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_softabi.a Binary files differnew file mode 100644 index 0000000000..0cdaf13a35 --- /dev/null +++ b/bsp/lpc54114-lite/Libraries/devices/LPC54114/gcc/libpower_cm4_softabi.a diff --git a/bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power.a b/bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power.a Binary files differnew file mode 100644 index 0000000000..c0a587fb0e --- /dev/null +++ b/bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power.a diff --git a/bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power_m0.a b/bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power_m0.a Binary files differnew file mode 100644 index 0000000000..481efdbc1b --- /dev/null +++ b/bsp/lpc54114-lite/Libraries/devices/LPC54114/iar/iar_lib_power_m0.a diff --git a/libcpu/arm/cortex-m7/cpu_cache.c b/libcpu/arm/cortex-m7/cpu_cache.c new file mode 100644 index 0000000000..4a1a9c2201 --- /dev/null +++ b/libcpu/arm/cortex-m7/cpu_cache.c @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-04-02 tanek first implementation + * 2019-04-27 misonyo update to cortex-m7 series + */ + +#include <rthw.h> +#include <rtdef.h> +#include <board.h> + +/* The L1-caches on all Cortex®-M7s are divided into lines of 32 bytes. */ +#define L1CACHE_LINESIZE_BYTE (32) + +void rt_hw_cpu_icache_enable(void) +{ + SCB_EnableICache(); +} + +void rt_hw_cpu_icache_disable(void) +{ + SCB_DisableICache(); +} + +rt_base_t rt_hw_cpu_icache_status(void) +{ + return 0; +} + +void rt_hw_cpu_icache_ops(int ops, void* addr, int size) +{ + rt_uint32_t address = (rt_uint32_t)addr & (rt_uint32_t) ~(L1CACHE_LINESIZE_BYTE - 1); + rt_int32_t size_byte = size + address - (rt_uint32_t)addr; + rt_uint32_t linesize = 32U; + if (ops & RT_HW_CACHE_INVALIDATE) + { + __DSB(); + while (size_byte > 0) + { + SCB->ICIMVAU = address; + address += linesize; + size_byte -= linesize; + } + __DSB(); + __ISB(); + } +} + +void rt_hw_cpu_dcache_enable(void) +{ + SCB_EnableDCache(); +} + +void rt_hw_cpu_dcache_disable(void) +{ + SCB_DisableDCache(); +} + +rt_base_t rt_hw_cpu_dcache_status(void) +{ + return 0; +} + +void rt_hw_cpu_dcache_ops(int ops, void* addr, int size) +{ + rt_uint32_t startAddr = (rt_uint32_t)addr & (rt_uint32_t)~(L1CACHE_LINESIZE_BYTE - 1); + rt_uint32_t size_byte = size + (rt_uint32_t)addr - startAddr; + + if (ops & (RT_HW_CACHE_FLUSH | RT_HW_CACHE_INVALIDATE)) + { + SCB_CleanInvalidateDCache_by_Addr((rt_uint32_t *)startAddr, size_byte); + } + else if (ops & RT_HW_CACHE_FLUSH) + { + SCB_CleanDCache_by_Addr((rt_uint32_t *)startAddr, size_byte); + } + else if (ops & RT_HW_CACHE_INVALIDATE) + { + SCB_InvalidateDCache_by_Addr((rt_uint32_t *)startAddr, size_byte); + } + else + { + RT_ASSERT(0); + } +} |
