Skip to content

Commit 35eff9a

Browse files
committed
Fix the CI build error.
1 parent 9ac8074 commit 35eff9a

File tree

7 files changed

+89
-1
lines changed

7 files changed

+89
-1
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ env:
5959
# - RTT_BSP='microblaze' # no scons
6060
- RTT_BSP='mini2440' RTT_TOOL_CHAIN='sourcery-arm'
6161
# - RTT_BSP='mini4020' # no scons
62-
- RTT_BSP='mm32l07x'
6362
# - RTT_BSP='nios_ii' # no scons
6463
- RTT_BSP='nuvoton_nuc472' RTT_TOOL_CHAIN='sourcery-arm'
6564
- RTT_BSP='nuvoton_m05x' RTT_TOOL_CHAIN='sourcery-arm'
17.9 KB
Binary file not shown.
18.1 KB
Binary file not shown.
18.1 KB
Binary file not shown.
9.29 KB
Binary file not shown.
8.69 KB
Binary file not shown.

libcpu/arm/cortex-m7/cpu_cache.c

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* Copyright (c) 2006-2018, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2018-04-02 tanek first implementation
9+
* 2019-04-27 misonyo update to cortex-m7 series
10+
*/
11+
12+
#include <rthw.h>
13+
#include <rtdef.h>
14+
#include <board.h>
15+
16+
/* The L1-caches on all Cortex®-M7s are divided into lines of 32 bytes. */
17+
#define L1CACHE_LINESIZE_BYTE (32)
18+
19+
void rt_hw_cpu_icache_enable(void)
20+
{
21+
SCB_EnableICache();
22+
}
23+
24+
void rt_hw_cpu_icache_disable(void)
25+
{
26+
SCB_DisableICache();
27+
}
28+
29+
rt_base_t rt_hw_cpu_icache_status(void)
30+
{
31+
return 0;
32+
}
33+
34+
void rt_hw_cpu_icache_ops(int ops, void* addr, int size)
35+
{
36+
rt_uint32_t address = (rt_uint32_t)addr & (rt_uint32_t) ~(L1CACHE_LINESIZE_BYTE - 1);
37+
rt_int32_t size_byte = size + address - (rt_uint32_t)addr;
38+
rt_uint32_t linesize = 32U;
39+
if (ops & RT_HW_CACHE_INVALIDATE)
40+
{
41+
__DSB();
42+
while (size_byte > 0)
43+
{
44+
SCB->ICIMVAU = address;
45+
address += linesize;
46+
size_byte -= linesize;
47+
}
48+
__DSB();
49+
__ISB();
50+
}
51+
}
52+
53+
void rt_hw_cpu_dcache_enable(void)
54+
{
55+
SCB_EnableDCache();
56+
}
57+
58+
void rt_hw_cpu_dcache_disable(void)
59+
{
60+
SCB_DisableDCache();
61+
}
62+
63+
rt_base_t rt_hw_cpu_dcache_status(void)
64+
{
65+
return 0;
66+
}
67+
68+
void rt_hw_cpu_dcache_ops(int ops, void* addr, int size)
69+
{
70+
rt_uint32_t startAddr = (rt_uint32_t)addr & (rt_uint32_t)~(L1CACHE_LINESIZE_BYTE - 1);
71+
rt_uint32_t size_byte = size + (rt_uint32_t)addr - startAddr;
72+
73+
if (ops & (RT_HW_CACHE_FLUSH | RT_HW_CACHE_INVALIDATE))
74+
{
75+
SCB_CleanInvalidateDCache_by_Addr((rt_uint32_t *)startAddr, size_byte);
76+
}
77+
else if (ops & RT_HW_CACHE_FLUSH)
78+
{
79+
SCB_CleanDCache_by_Addr((rt_uint32_t *)startAddr, size_byte);
80+
}
81+
else if (ops & RT_HW_CACHE_INVALIDATE)
82+
{
83+
SCB_InvalidateDCache_by_Addr((rt_uint32_t *)startAddr, size_byte);
84+
}
85+
else
86+
{
87+
RT_ASSERT(0);
88+
}
89+
}

0 commit comments

Comments
 (0)