[BSP] Fix the compiling issue with GCC6
This commit is contained in:
parent
7cb670b205
commit
fcab0f2cb4
|
@ -1,8 +1,3 @@
|
||||||
.section .bss.init
|
|
||||||
.equ Stack_Size, 0x00000200
|
|
||||||
.space Stack_Size
|
|
||||||
Initial_spTop:
|
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.cpu cortex-m3
|
.cpu cortex-m3
|
||||||
.fpu softvfp
|
.fpu softvfp
|
||||||
|
@ -37,8 +32,8 @@ defined in linker script */
|
||||||
.type Reset_Handler, %function
|
.type Reset_Handler, %function
|
||||||
Reset_Handler:
|
Reset_Handler:
|
||||||
/* restore original stack pointer */
|
/* restore original stack pointer */
|
||||||
LDR r0, =Initial_spTop
|
ldr sp, =_estack /* set stack pointer */
|
||||||
MSR msp, r0
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
/* Copy the data segment initializers from flash to SRAM */
|
||||||
movs r1, #0
|
movs r1, #0
|
||||||
b LoopCopyDataInit
|
b LoopCopyDataInit
|
||||||
|
@ -98,7 +93,7 @@ Infinite_Loop:
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
g_pfnVectors:
|
||||||
.word Initial_spTop
|
.word _estack
|
||||||
.word Reset_Handler
|
.word Reset_Handler
|
||||||
.word Default_Handler //NMI_Handler
|
.word Default_Handler //NMI_Handler
|
||||||
.word HardFault_Handler
|
.word HardFault_Handler
|
||||||
|
|
|
@ -10,6 +10,7 @@ MEMORY
|
||||||
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
|
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
|
||||||
}
|
}
|
||||||
ENTRY(Reset_Handler)
|
ENTRY(Reset_Handler)
|
||||||
|
_system_stack_size = 0x200;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
@ -72,6 +73,13 @@ SECTIONS
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
} >DATA
|
} >DATA
|
||||||
|
|
||||||
|
.stack :
|
||||||
|
{
|
||||||
|
. = . + _system_stack_size;
|
||||||
|
. = ALIGN(4);
|
||||||
|
_estack = .;
|
||||||
|
} >DATA
|
||||||
|
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
|
@ -85,9 +93,6 @@ SECTIONS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .bss secion */
|
/* This is used by the startup in order to initialize the .bss secion */
|
||||||
_ebss = . ;
|
_ebss = . ;
|
||||||
_estack = .;
|
|
||||||
|
|
||||||
*(.bss.init)
|
|
||||||
} > DATA
|
} > DATA
|
||||||
__bss_end = .;
|
__bss_end = .;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
.section .bss.init
|
|
||||||
.equ Stack_Size, 0x00000200
|
|
||||||
.space Stack_Size
|
|
||||||
Initial_spTop:
|
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.cpu cortex-m3
|
.cpu cortex-m3
|
||||||
.fpu softvfp
|
.fpu softvfp
|
||||||
|
@ -37,8 +32,8 @@ defined in linker script */
|
||||||
.type Reset_Handler, %function
|
.type Reset_Handler, %function
|
||||||
Reset_Handler:
|
Reset_Handler:
|
||||||
/* restore original stack pointer */
|
/* restore original stack pointer */
|
||||||
LDR r0, =Initial_spTop
|
ldr sp, =_estack /* set stack pointer */
|
||||||
MSR msp, r0
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
/* Copy the data segment initializers from flash to SRAM */
|
||||||
movs r1, #0
|
movs r1, #0
|
||||||
b LoopCopyDataInit
|
b LoopCopyDataInit
|
||||||
|
@ -98,7 +93,7 @@ Infinite_Loop:
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
g_pfnVectors:
|
||||||
.word Initial_spTop
|
.word _estack
|
||||||
.word Reset_Handler
|
.word Reset_Handler
|
||||||
.word Default_Handler //NMI_Handler
|
.word Default_Handler //NMI_Handler
|
||||||
.word HardFault_Handler
|
.word HardFault_Handler
|
||||||
|
|
|
@ -10,6 +10,7 @@ MEMORY
|
||||||
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
|
DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
|
||||||
}
|
}
|
||||||
ENTRY(Reset_Handler)
|
ENTRY(Reset_Handler)
|
||||||
|
_system_stack_size = 0x200;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
@ -72,6 +73,13 @@ SECTIONS
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
} >DATA
|
} >DATA
|
||||||
|
|
||||||
|
.stack :
|
||||||
|
{
|
||||||
|
. = . + _system_stack_size;
|
||||||
|
. = ALIGN(4);
|
||||||
|
_estack = .;
|
||||||
|
} >DATA
|
||||||
|
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
|
@ -85,9 +93,6 @@ SECTIONS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .bss secion */
|
/* This is used by the startup in order to initialize the .bss secion */
|
||||||
_ebss = . ;
|
_ebss = . ;
|
||||||
_estack = .;
|
|
||||||
|
|
||||||
*(.bss.init)
|
|
||||||
} > DATA
|
} > DATA
|
||||||
__bss_end = .;
|
__bss_end = .;
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,6 @@
|
||||||
* 2011-07-01 lgnq first version
|
* 2011-07-01 lgnq first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.section .bss.init
|
|
||||||
.equ Stack_Size, 0x00000200
|
|
||||||
.space Stack_Size
|
|
||||||
Initial_spTop:
|
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.cpu cortex-m3
|
.cpu cortex-m3
|
||||||
.fpu softvfp
|
.fpu softvfp
|
||||||
|
@ -53,8 +48,8 @@ defined in linker script */
|
||||||
.type Reset_Handler, %function
|
.type Reset_Handler, %function
|
||||||
Reset_Handler:
|
Reset_Handler:
|
||||||
/* restore original stack pointer */
|
/* restore original stack pointer */
|
||||||
LDR r0, =Initial_spTop
|
ldr sp, =_estack /* set stack pointer */
|
||||||
MSR msp, r0
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
/* Copy the data segment initializers from flash to SRAM */
|
||||||
movs r1, #0
|
movs r1, #0
|
||||||
b LoopCopyDataInit
|
b LoopCopyDataInit
|
||||||
|
@ -111,9 +106,8 @@ Infinite_Loop:
|
||||||
.type g_pfnVectors, %object
|
.type g_pfnVectors, %object
|
||||||
.size g_pfnVectors, .-g_pfnVectors
|
.size g_pfnVectors, .-g_pfnVectors
|
||||||
|
|
||||||
|
|
||||||
g_pfnVectors:
|
g_pfnVectors:
|
||||||
.word Initial_spTop
|
.word _estack
|
||||||
.word Reset_Handler
|
.word Reset_Handler
|
||||||
.word NMI_Handler
|
.word NMI_Handler
|
||||||
.word HardFault_Handler
|
.word HardFault_Handler
|
||||||
|
|
|
@ -5,6 +5,7 @@ MEMORY
|
||||||
DATA (rw) : ORIGIN = 0x1FFFC000, LENGTH = 0x0000C000
|
DATA (rw) : ORIGIN = 0x1FFFC000, LENGTH = 0x0000C000
|
||||||
}
|
}
|
||||||
ENTRY(Reset_Handler)
|
ENTRY(Reset_Handler)
|
||||||
|
_system_stack_size = 0x200;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
@ -70,6 +71,13 @@ SECTIONS
|
||||||
_edata = . ;
|
_edata = . ;
|
||||||
} >DATA
|
} >DATA
|
||||||
|
|
||||||
|
.stack :
|
||||||
|
{
|
||||||
|
. = . + _system_stack_size;
|
||||||
|
. = ALIGN(4);
|
||||||
|
_estack = .;
|
||||||
|
} >DATA
|
||||||
|
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
.bss :
|
.bss :
|
||||||
{
|
{
|
||||||
|
@ -84,9 +92,6 @@ SECTIONS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
/* This is used by the startup in order to initialize the .bss secion */
|
/* This is used by the startup in order to initialize the .bss secion */
|
||||||
_ebss = . ;
|
_ebss = . ;
|
||||||
_estack = .;
|
|
||||||
|
|
||||||
*(.bss.init)
|
|
||||||
} > DATA
|
} > DATA
|
||||||
__bss_end = .;
|
__bss_end = .;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue