Skip to content

Commit

Permalink
Merge pull request #8 from wugensheng-code/master
Browse files Browse the repository at this point in the history
[fix]:modify entry
  • Loading branch information
eclipsesw authored Jun 17, 2022
2 parents 8bef209 + e9dc507 commit d6fa066
Show file tree
Hide file tree
Showing 30 changed files with 1,163 additions and 2,416 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
******************************************************************************
* @attention
*
* Copyright (c) 2018 STMicroelectronics.
* All rights reserved.
* <h2><center>&copy; Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
* This software component is licensed by ST under 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:
* opensource.org/licenses/Apache-2.0
*
******************************************************************************
*/
Expand Down Expand Up @@ -65,40 +66,37 @@ Reset_Handler:
bl SystemInit

/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
movs r1, #0
b LoopCopyDataInit

CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4

LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit

ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss

FillZerobss:
str r3, [r2]
adds r2, r2, #4
movs r3, #0
str r3, [r2], #4

LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss

/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bl entry

LoopForever:
b LoopForever
Expand Down Expand Up @@ -434,4 +432,4 @@ g_pfnVectors:

.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
******************************************************************************
* @attention
*
* Copyright (c) 2018 STMicroelectronics.
* All rights reserved.
* <h2><center>&copy; Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
* This software component is licensed by ST under 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:
* opensource.org/licenses/Apache-2.0
*
******************************************************************************
*/
Expand Down Expand Up @@ -65,40 +66,37 @@ Reset_Handler:
bl SystemInit

/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
movs r1, #0
b LoopCopyDataInit

CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4

LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit

ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss

FillZerobss:
str r3, [r2]
adds r2, r2, #4
movs r3, #0
str r3, [r2], #4

LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss

/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bl entry

LoopForever:
b LoopForever
Expand Down Expand Up @@ -437,4 +435,4 @@ g_pfnVectors:

.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
* This software component is licensed by ST under 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:
* opensource.org/licenses/Apache-2.0
*
******************************************************************************
*/
Expand Down Expand Up @@ -65,40 +66,37 @@ Reset_Handler:
bl SystemInit

/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
movs r1, #0
b LoopCopyDataInit

CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4

LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit

ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss

FillZerobss:
str r3, [r2]
adds r2, r2, #4
movs r3, #0
str r3, [r2], #4

LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss

/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bl entry

LoopForever:
b LoopForever
Expand Down Expand Up @@ -458,4 +456,4 @@ g_pfnVectors:

.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
* This software component is licensed by ST under 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:
* opensource.org/licenses/Apache-2.0
*
******************************************************************************
*/
Expand Down Expand Up @@ -65,40 +66,37 @@ Reset_Handler:
bl SystemInit

/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
movs r1, #0
b LoopCopyDataInit

CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4

LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit

ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss

FillZerobss:
str r3, [r2]
adds r2, r2, #4
movs r3, #0
str r3, [r2], #4

LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss

/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bl entry

LoopForever:
b LoopForever
Expand Down Expand Up @@ -446,4 +444,4 @@ g_pfnVectors:

.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Loading

0 comments on commit d6fa066

Please sign in to comment.