|
| 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