Skip to content

Commit c30e107

Browse files
TomoYamanakaadbridge
authored andcommitted
Revise startup processing having CMSIS5/RTX5 been available on GR-PEACH
For supporting tp CMSIS5/RTX5, I changed the start-up processing of 3 toolchains(ARMCC, GCC_ARM, IAR) and updated the register definition of PEACH specific. In addition, I changed the linker script files to implement the dynamic HEAP the same as Cortex-M targets.Since GR-PEACH's HEAP was a fixed area, I changed the label name(ZI_DATA to RW_IRAM1) and replaced the allocation of STACK/HEAP.
1 parent 668883a commit c30e107

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+16988
-16894
lines changed

targets/TARGET_RENESAS/TARGET_RZ_A1H/device/MBRZA1H.h

Lines changed: 1 addition & 1059 deletions
Large diffs are not rendered by default.
Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,57 @@
1+
#! armcc -E
2+
;**************************************************
3+
; Copyright (c) 2017 ARM Ltd. All rights reserved.
4+
;**************************************************
15

6+
; Scatter-file for RTX Example on Versatile Express
27

3-
LOAD_TTB 0x20000000 0x00004000 ; Page 0 of On-Chip Data Retention RAM
8+
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
9+
10+
#include "mem_RZ_A1H.h"
11+
12+
LOAD_TTB __TTB_BASE __TTB_SIZE ; Page 0 of On-Chip Data Retention RAM
413
{
514
TTB +0 EMPTY 0x4000
615
{ } ; Level-1 Translation Table for MMU
716
}
817

9-
SFLASH 0x18000000 (0x08000000)
18+
SFLASH __ROM_BASE __ROM_SIZE ; load region size_region
1019
{
11-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12-
; S-Flash ROM : Executable cached region
13-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20+
BOOT_LOADER_BEGIN __ROM_BASE FIXED
21+
{
22+
* (BOOT_LOADER)
23+
}
1424

15-
BOOT_LOADER_BEGIN 0x18000000 FIXED
16-
{
17-
* ( BOOT_LOADER )
18-
}
25+
VECTORS __VECTOR_BASE FIXED
26+
{
27+
* (RESET, +FIRST) ; Vector table and other startup code
28+
* (InRoot$$Sections) ; All (library) code that must be in a root region
29+
* (+RO-CODE) ; Application RO code (.text)
30+
}
1931

20-
VECTORS 0x18004000 FIXED
21-
{
22-
* (RESET, +FIRST) ; Vector table and other (assembler) startup code
23-
* (InRoot$$Sections) ; All (library) code that must be in a root region
24-
* (+RO-CODE) ; Application RO code (.text)
25-
}
32+
RO_DATA +0
33+
{ * (+RO-DATA) } ; Application RO data (.constdata)
2634

27-
RO_DATA +0
28-
{ * (+RO-DATA) } ; Application RO data (.constdata)
35+
RW_DATA 0x20020000
36+
{ * (+RW) } ; Application RW data (.data)
2937

30-
RW_DATA 0x20020000
31-
{ * (+RW) } ; Application RW data (.data)
38+
RW_IRAM1 +0 ALIGN 0x10
39+
{ * (+ZI) } ; Application ZI data (.bss)
3240

33-
ZI_DATA +0 ALIGN 0x400
34-
{ * (+ZI) } ; Application ZI data (.bss)
41+
ARM_LIB_HEAP +0
42+
{ * (HEAP) } ; Application heap area (HEAP)
3543

36-
RW_DATA_NC 0x60900000 0x00100000
37-
{ * (NC_DATA) } ; Application RW data Non cached area
44+
ARM_LIB_STACK (__RAM_BASE + __NM_RAM_SIZE) EMPTY -__STACK_SIZE ; Stack region growing down
45+
{ }
3846

39-
ZI_DATA_NC +0
40-
{ * (NC_BSS) } ; Application ZI data Non cached area
41-
}
47+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
48+
; RAM-NC : Internal non-cached RAM region
49+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4250

51+
RW_DATA_NC __DATA_NC_BASE __NC_RAM_SIZE
52+
{ * (NC_DATA) } ; Application RW data Non cached area
53+
54+
ZI_DATA_NC +0
55+
{ * (NC_BSS) } ; Application ZI data Non cached area
56+
}
4357

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/**************************************************************************//**
2+
* @file mem_RZ_A1H.h
3+
* @brief Memory base and size definitions (used in scatter file)
4+
* @version V1.00
5+
* @date 10 Mar 2017
6+
*
7+
* @note
8+
*
9+
******************************************************************************/
10+
/*
11+
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
12+
*
13+
* SPDX-License-Identifier: Apache-2.0
14+
*
15+
* Licensed under the Apache License, Version 2.0 (the License); you may
16+
* not use this file except in compliance with the License.
17+
* You may obtain a copy of the License at
18+
*
19+
* www.apache.org/licenses/LICENSE-2.0
20+
*
21+
* Unless required by applicable law or agreed to in writing, software
22+
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
23+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24+
* See the License for the specific language governing permissions and
25+
* limitations under the License.
26+
*/
27+
28+
#ifndef __MEM_RZ_A1H_H
29+
#define __MEM_RZ_A1H_H
30+
31+
/*----------------------------------------------------------------------------
32+
User Stack & Heap size definition
33+
*----------------------------------------------------------------------------*/
34+
/*
35+
//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
36+
*/
37+
38+
/*--------------------- ROM Configuration ------------------------------------
39+
//
40+
// <h> ROM Configuration
41+
// <o0> ROM Base Address <0x0-0xFFFFFFFF:8>
42+
// <o1> ROM Size (in Bytes) <0x0-0xFFFFFFFF:8>
43+
// </h>
44+
*----------------------------------------------------------------------------*/
45+
#define __ROM_BASE 0x18000000
46+
#define __ROM_SIZE 0x08000000
47+
48+
#define __VECTOR_BASE 0x18004000
49+
50+
/*--------------------- RAM Configuration -----------------------------------
51+
*----------------------------------------------------------------------------*/
52+
#define __RAM_BASE 0x20000000
53+
#define __RAM_SIZE 0x00A00000
54+
#define __NC_RAM_SIZE 0x00100000
55+
#define __NM_RAM_SIZE (__RAM_SIZE - __NC_RAM_SIZE)
56+
#define __DATA_NC_BASE (__RAM_BASE + __NM_RAM_SIZE + 0x40000000)
57+
58+
#define __UND_STACK_SIZE 0x00000100
59+
#define __SVC_STACK_SIZE 0x00008000
60+
#define __ABT_STACK_SIZE 0x00000100
61+
#define __FIQ_STACK_SIZE 0x00000100
62+
#define __IRQ_STACK_SIZE 0x0000F000
63+
#define __STACK_SIZE (__UND_STACK_SIZE + __SVC_STACK_SIZE + __ABT_STACK_SIZE + __FIQ_STACK_SIZE + __IRQ_STACK_SIZE)
64+
65+
/*----------------------------------------------------------------------------*/
66+
67+
/*--------------------- TTB Configuration ------------------------------------
68+
//
69+
// <h> TTB Configuration
70+
// <o0> TTB Base Address <0x0-0xFFFFFFFF:8>
71+
// <o1> TTB Size (in Bytes) <0x0-0xFFFFFFFF:8>
72+
// </h>
73+
*----------------------------------------------------------------------------*/
74+
#define __TTB_BASE 0x20000000
75+
#define __TTB_SIZE 0x00004000
76+
77+
#endif /* __MEM_RZ_A1H_H */

0 commit comments

Comments
 (0)