mirror of https://github.com/RT-Thread/rt-thread
[libcpu][arm][arm926] Using C header file to define stack and heap size.
This commit is contained in:
parent
7d6b7dc3f0
commit
7a1f8ee1c4
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* File : rt_low_level_gcc.inc
|
|
||||||
* This file is part of RT-Thread RTOS
|
|
||||||
* COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Change Logs:
|
|
||||||
* Date Author Notes
|
|
||||||
* 2015-04-14 ArdaFu first version
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*--------- Stack size of CPU modes ------------------------------------------*/
|
|
||||||
.equ UND_STK_SIZE, 2048
|
|
||||||
.equ SVC_STK_SIZE, 4096
|
|
||||||
.equ ABT_STK_SIZE, 2048
|
|
||||||
.equ IRQ_STK_SIZE, 4096
|
|
||||||
.equ FIQ_STK_SIZE, 4096
|
|
||||||
.equ SYS_STK_SIZE, 2048
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* File : rt_low_level_iar.inc
|
* File : rt_low_level_init.h
|
||||||
* This file is part of RT-Thread RTOS
|
* This file is part of RT-Thread RTOS
|
||||||
* COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
* COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
|
@ -19,8 +19,10 @@
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2015-04-14 ArdaFu first version
|
* 2018-06-04 ArdaFu first version
|
||||||
*/
|
*/
|
||||||
|
#ifndef __RT_LOW_LEVEL_INIT_H__
|
||||||
|
#define __RT_LOW_LEVEL_INIT_H__
|
||||||
|
|
||||||
/*-------- Stack size of CPU modes -------------------------------------------*/
|
/*-------- Stack size of CPU modes -------------------------------------------*/
|
||||||
#define UND_STK_SIZE 512
|
#define UND_STK_SIZE 512
|
||||||
|
@ -29,3 +31,5 @@
|
||||||
#define IRQ_STK_SIZE 1024
|
#define IRQ_STK_SIZE 1024
|
||||||
#define FIQ_STK_SIZE 1024
|
#define FIQ_STK_SIZE 1024
|
||||||
#define SYS_STK_SIZE 512
|
#define SYS_STK_SIZE 512
|
||||||
|
#define Heap_Size 512
|
||||||
|
#endif
|
|
@ -1,33 +0,0 @@
|
||||||
;/*
|
|
||||||
; * File : rt_low_level_keil.inc
|
|
||||||
; * This file is part of RT-Thread RTOS
|
|
||||||
; * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
|
||||||
; *
|
|
||||||
; * This program is free software; you can redistribute it and/or modify
|
|
||||||
; * it under the terms of the GNU General Public License as published by
|
|
||||||
; * the Free Software Foundation; either version 2 of the License, or
|
|
||||||
; * (at your option) any later version.
|
|
||||||
; *
|
|
||||||
; * This program is distributed in the hope that it will be useful,
|
|
||||||
; * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
; * GNU General Public License for more details.
|
|
||||||
; *
|
|
||||||
; * You should have received a copy of the GNU General Public License along
|
|
||||||
; * with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
; *
|
|
||||||
; * Change Logs:
|
|
||||||
; * Date Author Notes
|
|
||||||
; * 2015-04-14 ArdaFu first version
|
|
||||||
; */
|
|
||||||
|
|
||||||
;/*-------- Stack size of CPU modes ------------------------------------------*/
|
|
||||||
UND_STK_SIZE EQU 512
|
|
||||||
SVC_STK_SIZE EQU 4096
|
|
||||||
ABT_STK_SIZE EQU 512
|
|
||||||
IRQ_STK_SIZE EQU 1024
|
|
||||||
FIQ_STK_SIZE EQU 1024
|
|
||||||
SYS_STK_SIZE EQU 512
|
|
||||||
Heap_Size EQU 512
|
|
||||||
END
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* File : rt_low_level_gcc.inc
|
|
||||||
* This file is part of RT-Thread RTOS
|
|
||||||
* COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Change Logs:
|
|
||||||
* Date Author Notes
|
|
||||||
* 2015-04-14 ArdaFu first version
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*--------- Stack size of CPU modes ------------------------------------------*/
|
|
||||||
.equ UND_STK_SIZE, 2048
|
|
||||||
.equ SVC_STK_SIZE, 4096
|
|
||||||
.equ ABT_STK_SIZE, 2048
|
|
||||||
.equ IRQ_STK_SIZE, 4096
|
|
||||||
.equ FIQ_STK_SIZE, 4096
|
|
||||||
.equ SYS_STK_SIZE, 2048
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* File : rt_low_level_iar.inc
|
* File : rt_low_level_init.h
|
||||||
* This file is part of RT-Thread RTOS
|
* This file is part of RT-Thread RTOS
|
||||||
* COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
* COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
|
@ -19,8 +19,10 @@
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2015-04-14 ArdaFu first version
|
* 2018-06-04 ArdaFu first version
|
||||||
*/
|
*/
|
||||||
|
#ifndef __RT_LOW_LEVEL_INIT_H__
|
||||||
|
#define __RT_LOW_LEVEL_INIT_H__
|
||||||
|
|
||||||
/*-------- Stack size of CPU modes -------------------------------------------*/
|
/*-------- Stack size of CPU modes -------------------------------------------*/
|
||||||
#define UND_STK_SIZE 512
|
#define UND_STK_SIZE 512
|
||||||
|
@ -29,3 +31,5 @@
|
||||||
#define IRQ_STK_SIZE 1024
|
#define IRQ_STK_SIZE 1024
|
||||||
#define FIQ_STK_SIZE 1024
|
#define FIQ_STK_SIZE 1024
|
||||||
#define SYS_STK_SIZE 512
|
#define SYS_STK_SIZE 512
|
||||||
|
#define Heap_Size 512
|
||||||
|
#endif
|
|
@ -1,32 +0,0 @@
|
||||||
;/*
|
|
||||||
; * File : rt_low_level_keil.inc
|
|
||||||
; * This file is part of RT-Thread RTOS
|
|
||||||
; * COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
|
|
||||||
; *
|
|
||||||
; * This program is free software; you can redistribute it and/or modify
|
|
||||||
; * it under the terms of the GNU General Public License as published by
|
|
||||||
; * the Free Software Foundation; either version 2 of the License, or
|
|
||||||
; * (at your option) any later version.
|
|
||||||
; *
|
|
||||||
; * This program is distributed in the hope that it will be useful,
|
|
||||||
; * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
; * GNU General Public License for more details.
|
|
||||||
; *
|
|
||||||
; * You should have received a copy of the GNU General Public License along
|
|
||||||
; * with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
; *
|
|
||||||
; * Change Logs:
|
|
||||||
; * Date Author Notes
|
|
||||||
; * 2015-04-14 ArdaFu first version
|
|
||||||
; */
|
|
||||||
|
|
||||||
;/*-------- Stack size of CPU modes ------------------------------------------*/
|
|
||||||
UND_STK_SIZE EQU 512
|
|
||||||
SVC_STK_SIZE EQU 4096
|
|
||||||
ABT_STK_SIZE EQU 512
|
|
||||||
IRQ_STK_SIZE EQU 1024
|
|
||||||
FIQ_STK_SIZE EQU 1024
|
|
||||||
SYS_STK_SIZE EQU 512
|
|
||||||
END
|
|
|
@ -24,7 +24,9 @@
|
||||||
* 2015-04-21 ArdaFu Remove remap code. Using mmu to map vector table
|
* 2015-04-21 ArdaFu Remove remap code. Using mmu to map vector table
|
||||||
* 2015-06-04 aozima Align stack address to 8 byte.
|
* 2015-06-04 aozima Align stack address to 8 byte.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "rt_low_level_init.h"
|
||||||
|
|
||||||
#define S_FRAME_SIZE (18*4) //72
|
#define S_FRAME_SIZE (18*4) //72
|
||||||
|
|
||||||
@#define S_SPSR (17*4) //SPSR
|
@#define S_SPSR (17*4) //SPSR
|
||||||
|
@ -54,9 +56,8 @@
|
||||||
#define MODE_ABT 0x17
|
#define MODE_ABT 0x17
|
||||||
#define MODE_UND 0x1B
|
#define MODE_UND 0x1B
|
||||||
#define MODEMASK 0x1F
|
#define MODEMASK 0x1F
|
||||||
#define NOINT 0xC0
|
|
||||||
|
|
||||||
.include "rt_low_level_gcc.inc"
|
#define NOINT 0xC0
|
||||||
|
|
||||||
@;----------------------- Stack and Heap Definitions ---------------------------
|
@;----------------------- Stack and Heap Definitions ---------------------------
|
||||||
.section .nobss, "w"
|
.section .nobss, "w"
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
; * 2015-04-21 ArdaFu Remove remap code. Using mmu to map vector table
|
; * 2015-04-21 ArdaFu Remove remap code. Using mmu to map vector table
|
||||||
; * 2015-06-04 aozima Align stack address to 8 byte.
|
; * 2015-06-04 aozima Align stack address to 8 byte.
|
||||||
; */
|
; */
|
||||||
|
|
||||||
|
#include "rt_low_level_init.h"
|
||||||
|
|
||||||
#define S_FRAME_SIZE (18*4) ;72
|
#define S_FRAME_SIZE (18*4) ;72
|
||||||
|
|
||||||
;#define S_SPSR (17*4) ;SPSR
|
;#define S_SPSR (17*4) ;SPSR
|
||||||
|
@ -54,9 +56,8 @@
|
||||||
#define MODE_ABT 0x17
|
#define MODE_ABT 0x17
|
||||||
#define MODE_UND 0x1B
|
#define MODE_UND 0x1B
|
||||||
#define MODEMASK 0x1F
|
#define MODEMASK 0x1F
|
||||||
#define NOINT 0xC0
|
|
||||||
|
|
||||||
#include "rt_low_level_iar.inc"
|
#define NOINT 0xC0
|
||||||
|
|
||||||
;----------------------- Stack and Heap Definitions ----------------------------
|
;----------------------- Stack and Heap Definitions ----------------------------
|
||||||
MODULE ?cstartup
|
MODULE ?cstartup
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
; * 2015-06-04 aozima Align stack address to 8 byte.
|
; * 2015-06-04 aozima Align stack address to 8 byte.
|
||||||
; */
|
; */
|
||||||
|
|
||||||
|
#include "rt_low_level_init.h"
|
||||||
|
|
||||||
S_FRAME_SIZE EQU (18*4) ;72
|
S_FRAME_SIZE EQU (18*4) ;72
|
||||||
;S_SPSR EQU (17*4) ;SPSR
|
;S_SPSR EQU (17*4) ;SPSR
|
||||||
;S_CPSR EQU (16*4) ;CPSR
|
;S_CPSR EQU (16*4) ;CPSR
|
||||||
|
@ -46,7 +48,6 @@ S_PC EQU (15*4) ;R15
|
||||||
;S_R1 EQU (1*4)
|
;S_R1 EQU (1*4)
|
||||||
;S_R0 EQU (0*4)
|
;S_R0 EQU (0*4)
|
||||||
|
|
||||||
|
|
||||||
MODE_USR EQU 0X10
|
MODE_USR EQU 0X10
|
||||||
MODE_FIQ EQU 0X11
|
MODE_FIQ EQU 0X11
|
||||||
MODE_IRQ EQU 0X12
|
MODE_IRQ EQU 0X12
|
||||||
|
@ -57,8 +58,6 @@ MODE_SYS EQU 0X1F
|
||||||
MODEMASK EQU 0X1F
|
MODEMASK EQU 0X1F
|
||||||
|
|
||||||
NOINT EQU 0xC0
|
NOINT EQU 0xC0
|
||||||
|
|
||||||
GET rt_low_level_keil.inc
|
|
||||||
|
|
||||||
;----------------------- Stack and Heap Definitions ----------------------------
|
;----------------------- Stack and Heap Definitions ----------------------------
|
||||||
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
|
Loading…
Reference in New Issue