Skip to content

Support Nuvoton's M480 target #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions platform/m480/Makefile.configurations
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
###########################################################################
#
# Copyright (c) 2016-2017, Nuvoton, All Rights Reserved
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################

ARCH_CORE:=CORE_ARMv7M
ARCH_MPU:=MPU_ARMv7M

CONFIGURATIONS:=\
CONFIGURATION_M480_CORTEX_M4_0x20000000_0x0
23 changes: 23 additions & 0 deletions platform/m480/inc/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (c) 2016-2017, Nuvoton, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __CONFIG_H__
#define __CONFIG_H__

/* Autogenerated configurations */
#include "configurations.h"

#endif /* __CONFIG_H__ */
69 changes: 69 additions & 0 deletions platform/m480/inc/configurations.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright (c) 2016-2017, Nuvoton, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __CONFIGURATIONS_H__
#define __CONFIGURATIONS_H__

/*******************************************************************************
* Family-wide configurations
******************************************************************************/

/* The symbols below *must* be calculated from values across the family. */

/* Maximum number of vectors seen across the family:
* NVIC_VECTORS = max(NVIC_VECTORS_i) for i in family */
#define NVIC_VECTORS 96

/* Minimum memory requirements:
* FLASH_LENGTH_MIN = min(FLASH_LENGTH_i) for i in family
* SRAM_LENGTH_MIN = min(SRAM_LENGTH_i) for i in family */
#define FLASH_LENGTH_MIN 0x40000
#define SRAM_LENGTH_MIN 0x18000

/* The symbols below can be either configuration-specific or family-wide,
* depending on your requirements. See the porting guide for more details. */

/* Memory boundaries */
#define FLASH_ORIGIN 0x00000000
#define FLASH_OFFSET 0x400

/*******************************************************************************
* Hardware-specific configurations
*
* Configurations are named after the parameter values, in this order:
* - CORE
* - SRAM_ORIGIN
* - SRAM_OFFSET
******************************************************************************/

/* The symbols below are specific to each configuration. */

#if defined(CONFIGURATION_M480_CORTEX_M4_0x20000000_0x0)

/* ARM core selection */
#define CORE_CORTEX_M4

/* Memory boundaries */
#define SRAM_ORIGIN 0x20000000
#define SRAM_OFFSET 0x0

#else /* Hardware-specific configurations */

#error "Unrecognized uVisor configuration. Check your Makefile."

#endif /* Hardware-specific configurations */

#endif /* __CONFIGURATIONS_H__ */