summaryrefslogtreecommitdiff
path: root/bsp/lm3s8962
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-08-04 14:59:29 +0800
committerBernard Xiong <[email protected]>2018-08-04 14:59:29 +0800
commitfcab0f2cb4830f8a1269fdbce9a789ffce566d0b (patch)
tree49350b016ed2c337348fddc0302800185619ff27 /bsp/lm3s8962
parent7cb670b20578588dc882544b63b5546c7929c4ee (diff)
[BSP] Fix the compiling issue with GCC6
Diffstat (limited to 'bsp/lm3s8962')
-rw-r--r--bsp/lm3s8962/Libraries/startup/gcc/start_gcc.S15
-rw-r--r--bsp/lm3s8962/lm3s_rom.ld11
2 files changed, 13 insertions, 13 deletions
diff --git a/bsp/lm3s8962/Libraries/startup/gcc/start_gcc.S b/bsp/lm3s8962/Libraries/startup/gcc/start_gcc.S
index 3a4abbe3c3..53d5471f5c 100644
--- a/bsp/lm3s8962/Libraries/startup/gcc/start_gcc.S
+++ b/bsp/lm3s8962/Libraries/startup/gcc/start_gcc.S
@@ -1,9 +1,4 @@
-.section .bss.init
-.equ Stack_Size, 0x00000200
-.space Stack_Size
-Initial_spTop:
-
- .syntax unified
+ .syntax unified
.cpu cortex-m3
.fpu softvfp
.thumb
@@ -32,13 +27,13 @@ defined in linker script */
* @retval : None
*/
- .section .text.Reset_Handler
+ .section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* restore original stack pointer */
- LDR r0, =Initial_spTop
- MSR msp, r0
+ ldr sp, =_estack /* set stack pointer */
+
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
@@ -98,7 +93,7 @@ Infinite_Loop:
g_pfnVectors:
- .word Initial_spTop
+ .word _estack
.word Reset_Handler
.word Default_Handler //NMI_Handler
.word HardFault_Handler
diff --git a/bsp/lm3s8962/lm3s_rom.ld b/bsp/lm3s8962/lm3s_rom.ld
index 5572ae4186..d4a2f968d0 100644
--- a/bsp/lm3s8962/lm3s_rom.ld
+++ b/bsp/lm3s8962/lm3s_rom.ld
@@ -10,6 +10,7 @@ MEMORY
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
}
ENTRY(Reset_Handler)
+_system_stack_size = 0x200;
SECTIONS
{
@@ -72,6 +73,13 @@ SECTIONS
_edata = . ;
} >DATA
+ .stack :
+ {
+ . = . + _system_stack_size;
+ . = ALIGN(4);
+ _estack = .;
+ } >DATA
+
__bss_start = .;
.bss :
{
@@ -85,9 +93,6 @@ SECTIONS
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
- _estack = .;
-
- *(.bss.init)
} > DATA
__bss_end = .;