Skip to content

Commit 87bb176

Browse files
committed
Support Nuvoton's M480 target
1 parent d788b97 commit 87bb176

File tree

4 files changed

+554
-0
lines changed

4 files changed

+554
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
###########################################################################
2+
#
3+
# Copyright (c) 2016-2017, Nuvoton, All Rights Reserved
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
7+
# not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
###########################################################################
19+
20+
ARCH_CORE:=CORE_ARMv7M
21+
ARCH_MPU:=MPU_ARMv7M
22+
23+
CONFIGURATIONS:=\
24+
CONFIGURATION_M480_CORTEX_M4_0x20000000_0x0

platform/m480/inc/config.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2016-2017, Nuvoton, All Rights Reserved
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
6+
* not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#ifndef __CONFIG_H__
18+
#define __CONFIG_H__
19+
20+
/* Autogenerated configurations */
21+
#include "configurations.h"
22+
23+
#endif /* __CONFIG_H__ */

platform/m480/inc/configurations.h

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright (c) 2016-2017, Nuvoton, All Rights Reserved
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
6+
* not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#ifndef __CONFIGURATIONS_H__
18+
#define __CONFIGURATIONS_H__
19+
20+
/*******************************************************************************
21+
* Family-wide configurations
22+
******************************************************************************/
23+
24+
/* The symbols below *must* be calculated from values across the family. */
25+
26+
/* Maximum number of vectors seen across the family:
27+
* NVIC_VECTORS = max(NVIC_VECTORS_i) for i in family */
28+
#define NVIC_VECTORS 96
29+
30+
/* Minimum memory requirements:
31+
* FLASH_LENGTH_MIN = min(FLASH_LENGTH_i) for i in family
32+
* SRAM_LENGTH_MIN = min(SRAM_LENGTH_i) for i in family */
33+
#define FLASH_LENGTH_MIN 0x40000
34+
#define SRAM_LENGTH_MIN 0x20000
35+
36+
/* The symbols below can be either configuration-specific or family-wide,
37+
* depending on your requirements. See the porting guide for more details. */
38+
39+
/* Memory boundaries */
40+
#define FLASH_ORIGIN 0x00000000
41+
#define FLASH_OFFSET 0x400
42+
43+
/*******************************************************************************
44+
* Hardware-specific configurations
45+
*
46+
* Configurations are named after the parameter values, in this order:
47+
* - CORE
48+
* - SRAM_ORIGIN
49+
* - SRAM_OFFSET
50+
******************************************************************************/
51+
52+
/* The symbols below are specific to each configuration. */
53+
54+
#if defined(CONFIGURATION_M480_CORTEX_M4_0x20000000_0x0)
55+
56+
/* ARM core selection */
57+
#define CORE_CORTEX_M4
58+
59+
/* Memory boundaries */
60+
#define SRAM_ORIGIN 0x20000000
61+
#define SRAM_OFFSET 0x0
62+
63+
#else /* Hardware-specific configurations */
64+
65+
#error "Unrecognized uVisor configuration. Check your Makefile."
66+
67+
#endif /* Hardware-specific configurations */
68+
69+
#endif /* __CONFIGURATIONS_H__ */

0 commit comments

Comments
 (0)