Skip to content

M2351: Support memory custom partition #10004

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

Merged
Merged
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
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#! armcc -E
#! armclang -E

/* Default flash/SRAM partition
/*
* Copyright (c) 2019-2020, Nuvoton Technology Corporation
*
* Default flash partition:
* Secure: 256KiB
* Non-secure: 256KiB
*
* Default SRAM partition:
* Secure: 32KiB
* Non-secure: 64KiB
* 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 MBED_ROM_SIZE_S
#define MBED_ROM_SIZE_S (0x40000)
#endif

#ifndef MBED_RAM_SIZE_S
#define MBED_RAM_SIZE_S (0x8000)
#endif
#include "../partition_M2351_mem.h"

#ifndef NU_TZ_NSC_SIZE
#define NU_TZ_NSC_SIZE (0x1000)
Expand All @@ -26,19 +27,19 @@
#if defined(DOMAIN_NS) && DOMAIN_NS

#ifndef MBED_APP_START
#define MBED_APP_START (0x10000000 + MBED_ROM_START + MBED_ROM_SIZE_S)
#define MBED_APP_START NU_ROM_START_NS
#endif

#ifndef MBED_APP_SIZE
#define MBED_APP_SIZE (MBED_ROM_SIZE - MBED_ROM_SIZE_S)
#define MBED_APP_SIZE NU_ROM_SIZE_NS
#endif

#ifndef MBED_RAM_APP_START
#define MBED_RAM_APP_START (0x10000000 + MBED_RAM_START + MBED_RAM_SIZE_S)
#define MBED_RAM_APP_START NU_RAM_START_NS
#endif

#ifndef MBED_RAM_APP_SIZE
#define MBED_RAM_APP_SIZE (MBED_RAM_SIZE - MBED_RAM_SIZE_S)
#define MBED_RAM_APP_SIZE NU_RAM_SIZE_NS
#endif

#if !defined(MBED_BOOT_STACK_SIZE)
Expand All @@ -48,19 +49,19 @@
#else

#ifndef MBED_APP_START
#define MBED_APP_START MBED_ROM_START
#define MBED_APP_START NU_ROM_START_S
#endif

#ifndef MBED_APP_SIZE
#define MBED_APP_SIZE MBED_ROM_SIZE_S
#define MBED_APP_SIZE NU_ROM_SIZE_S
#endif

#ifndef MBED_RAM_APP_START
#define MBED_RAM_APP_START MBED_RAM_START
#define MBED_RAM_APP_START NU_RAM_START_S
#endif

#ifndef MBED_RAM_APP_SIZE
#define MBED_RAM_APP_SIZE MBED_RAM_SIZE_S
#define MBED_RAM_APP_SIZE NU_RAM_SIZE_S
#endif

#if !defined(MBED_BOOT_STACK_SIZE)
Expand Down
172 changes: 0 additions & 172 deletions targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_STD/M2351.sct

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
/*
* Nuvoton M2351 GCC linker script file
*/

/* Default flash/SRAM partition
* Copyright (c) 2019-2020, Nuvoton Technology Corporation
*
* 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
*
* Default flash partition:
* Secure: 256KiB
* Non-secure: 256KiB
*
* Default SRAM partition:
* Secure: 32KiB
* Non-secure: 64KiB
* 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 MBED_ROM_SIZE_S
#define MBED_ROM_SIZE_S (0x40000)
#endif
/*
* Nuvoton M2351 GCC linker script file
*/

#ifndef MBED_RAM_SIZE_S
#define MBED_RAM_SIZE_S (0x8000)
#endif
#include "../partition_M2351_mem.h"

#ifndef NU_TZ_NSC_SIZE
#define NU_TZ_NSC_SIZE (0x1000)
#define NU_TZ_NSC_SIZE (0x1000)
#endif

#if defined(DOMAIN_NS) && DOMAIN_NS

#ifndef MBED_APP_START
#define MBED_APP_START (0x10000000 + MBED_ROM_START + MBED_ROM_SIZE_S)
#define MBED_APP_START NU_ROM_START_NS
#endif

#ifndef MBED_APP_SIZE
#define MBED_APP_SIZE (MBED_ROM_SIZE - MBED_ROM_SIZE_S)
#define MBED_APP_SIZE NU_ROM_SIZE_NS
#endif

#ifndef MBED_RAM_APP_START
#define MBED_RAM_APP_START (0x10000000 + MBED_RAM_START + MBED_RAM_SIZE_S)
#define MBED_RAM_APP_START NU_RAM_START_NS
#endif

#ifndef MBED_RAM_APP_SIZE
#define MBED_RAM_APP_SIZE (MBED_RAM_SIZE - MBED_RAM_SIZE_S)
#define MBED_RAM_APP_SIZE NU_RAM_SIZE_NS
#endif

#if !defined(MBED_BOOT_STACK_SIZE)
Expand All @@ -50,19 +51,19 @@
#else

#ifndef MBED_APP_START
#define MBED_APP_START MBED_ROM_START
#define MBED_APP_START NU_ROM_START_S
#endif

#ifndef MBED_APP_SIZE
#define MBED_APP_SIZE MBED_ROM_SIZE_S
#define MBED_APP_SIZE NU_ROM_SIZE_S
#endif

#ifndef MBED_RAM_APP_START
#define MBED_RAM_APP_START MBED_RAM_START
#define MBED_RAM_APP_START NU_RAM_START_S
#endif

#ifndef MBED_RAM_APP_SIZE
#define MBED_RAM_APP_SIZE MBED_RAM_SIZE_S
#define MBED_RAM_APP_SIZE NU_RAM_SIZE_S
#endif

#ifndef MBED_BOOT_STACK_SIZE
Expand Down
Loading