Skip to content

Commit dcc066d

Browse files
committed
STM32L4 : alignment with STM32Cube_FW_L4_V1.14.0
1 parent 3b14c47 commit dcc066d

File tree

38 files changed

+340
-374
lines changed

38 files changed

+340
-374
lines changed

targets/TARGET_STM/TARGET_STM32L4/STM32Cube_FW/STM32L4xx_HAL_Driver/stm32l4xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
/* Includes ------------------------------------------------------------------*/
3030
#include "stm32l4xx.h"
31-
#include "stm32_hal_legacy.h" /* Aliases file for old names compatibility */
31+
#include "Legacy/stm32_hal_legacy.h" /* Aliases file for old names compatibility */
3232
#include <stddef.h>
3333

3434
/* Exported types ------------------------------------------------------------*/

targets/TARGET_STM/TARGET_STM32L4/STM32Cube_FW/stm32l4xx_hal_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
#endif /* HAL_CAN_MODULE_ENABLED */
278278

279279
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
280-
#include "stm32l4xx_hal_can_legacy.h"
280+
#include "Legacy/stm32l4xx_hal_can_legacy.h"
281281
#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
282282

283283
#ifdef HAL_COMP_MODULE_ENABLED

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TOOLCHAIN_ARM/startup_stm32l432xx.S

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
;* opensource.org/licenses/BSD-3-Clause
2323
;*
2424
;*******************************************************************************
25-
25+
;
2626
PRESERVE8
2727
THUMB
2828

@@ -32,9 +32,9 @@
3232
EXPORT __Vectors
3333
EXPORT __Vectors_End
3434
EXPORT __Vectors_Size
35-
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
3635

37-
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
36+
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
37+
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
3838
DCD Reset_Handler ; Reset Handler
3939
DCD NMI_Handler ; NMI Handler
4040
DCD HardFault_Handler ; Hard Fault Handler
@@ -327,6 +327,11 @@ CRS_IRQHandler
327327
ENDP
328328

329329
ALIGN
330-
END
330+
331+
;*******************************************************************************
332+
; User Stack and Heap initialization
333+
;*******************************************************************************
334+
335+
END
331336

332337
;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TOOLCHAIN_ARM/stm32l432xc.sct

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
#define MBED_APP_SIZE MBED_ROM_SIZE
2626
#endif
2727

28-
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
2928
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
30-
# if defined(MBED_BOOT_STACK_SIZE)
31-
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
32-
# else
33-
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
34-
# endif
29+
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
30+
#if defined(MBED_BOOT_STACK_SIZE)
31+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
32+
#else
33+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
34+
#endif
3535
#endif
3636

3737
/* Round up VECTORS_SIZE to 8 bytes */

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TOOLCHAIN_GCC_ARM/startup_stm32l432xx.S

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* - Set the initial SP
88
* - Set the initial PC == Reset_Handler,
99
* - Set the vector table entries with the exceptions ISR address,
10-
* - Configure the clock system
10+
* - Configure the clock system
1111
* - Branches to main in the C library (which eventually
1212
* calls main()).
1313
* After Reset the Cortex-M4 processor is in Thread mode,
@@ -92,20 +92,12 @@ LoopFillZerobss:
9292

9393
/* Call the clock system intitialization function.*/
9494
bl SystemInit
95-
/* Call static constructors */
96-
//bl __libc_init_array
97-
/* Call the application's entry point.*/
98-
//bl main
99-
// Calling the crt0 'cold-start' entry point. There __libc_init_array is called
100-
// and when existing hardware_init_hook() and software_init_hook() before
101-
// starting main(). software_init_hook() is available and has to be called due
102-
// to initializsation when using rtos.
103-
bl _start
104-
bx lr
95+
bl _start
96+
bx lr
10597

10698
LoopForever:
10799
b LoopForever
108-
100+
109101
.size Reset_Handler, .-Reset_Handler
110102

111103
/**
@@ -404,49 +396,49 @@ g_pfnVectors:
404396

405397
.weak COMP_IRQHandler
406398
.thumb_set COMP_IRQHandler,Default_Handler
407-
399+
408400
.weak LPTIM1_IRQHandler
409401
.thumb_set LPTIM1_IRQHandler,Default_Handler
410-
402+
411403
.weak LPTIM2_IRQHandler
412-
.thumb_set LPTIM2_IRQHandler,Default_Handler
413-
404+
.thumb_set LPTIM2_IRQHandler,Default_Handler
405+
414406
.weak USB_IRQHandler
415-
.thumb_set USB_IRQHandler,Default_Handler
416-
407+
.thumb_set USB_IRQHandler,Default_Handler
408+
417409
.weak DMA2_Channel6_IRQHandler
418-
.thumb_set DMA2_Channel6_IRQHandler,Default_Handler
419-
410+
.thumb_set DMA2_Channel6_IRQHandler,Default_Handler
411+
420412
.weak DMA2_Channel7_IRQHandler
421-
.thumb_set DMA2_Channel7_IRQHandler,Default_Handler
422-
413+
.thumb_set DMA2_Channel7_IRQHandler,Default_Handler
414+
423415
.weak LPUART1_IRQHandler
424-
.thumb_set LPUART1_IRQHandler,Default_Handler
425-
416+
.thumb_set LPUART1_IRQHandler,Default_Handler
417+
426418
.weak QUADSPI_IRQHandler
427-
.thumb_set QUADSPI_IRQHandler,Default_Handler
428-
419+
.thumb_set QUADSPI_IRQHandler,Default_Handler
420+
429421
.weak I2C3_EV_IRQHandler
430-
.thumb_set I2C3_EV_IRQHandler,Default_Handler
431-
422+
.thumb_set I2C3_EV_IRQHandler,Default_Handler
423+
432424
.weak I2C3_ER_IRQHandler
433-
.thumb_set I2C3_ER_IRQHandler,Default_Handler
434-
425+
.thumb_set I2C3_ER_IRQHandler,Default_Handler
426+
435427
.weak SAI1_IRQHandler
436428
.thumb_set SAI1_IRQHandler,Default_Handler
437-
429+
438430
.weak SWPMI1_IRQHandler
439431
.thumb_set SWPMI1_IRQHandler,Default_Handler
440-
432+
441433
.weak TSC_IRQHandler
442434
.thumb_set TSC_IRQHandler,Default_Handler
443-
435+
444436
.weak RNG_IRQHandler
445437
.thumb_set RNG_IRQHandler,Default_Handler
446-
438+
447439
.weak FPU_IRQHandler
448440
.thumb_set FPU_IRQHandler,Default_Handler
449-
441+
450442
.weak CRS_IRQHandler
451443
.thumb_set CRS_IRQHandler,Default_Handler
452444
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TOOLCHAIN_IAR/startup_stm32l432xx.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;/********************* COPYRIGHT(c) 2017 STMicroelectronics ********************
1+
;********************************************************************************
22
;* File Name : startup_stm32l432xx.s
33
;* Author : MCD Application Team
44
;* Description : STM32L432xx Ultra Low Power Devices vector

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TOOLCHAIN_IAR/stm32l432xc.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
3232
}
3333

3434
if (!isdefinedsymbol(MBED_CONF_TARGET_BOOT_STACK_SIZE)) {
35-
/* This value is normally defined by the tools
35+
/* This value is normally defined by the tools
3636
to 0x1000 for bare metal and 0x400 for RTOS */
3737
define symbol MBED_CONF_TARGET_BOOT_STACK_SIZE = 0x400;
3838
}

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/TOOLCHAIN_ARM/startup_stm32l433xx.S

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
;* opensource.org/licenses/BSD-3-Clause
2323
;*
2424
;*******************************************************************************
25-
25+
;
2626
PRESERVE8
2727
THUMB
2828

@@ -32,9 +32,9 @@
3232
EXPORT __Vectors
3333
EXPORT __Vectors_End
3434
EXPORT __Vectors_Size
35-
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
3635

37-
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
36+
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
37+
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
3838
DCD Reset_Handler ; Reset Handler
3939
DCD NMI_Handler ; NMI Handler
4040
DCD HardFault_Handler ; Hard Fault Handler
@@ -339,6 +339,11 @@ CRS_IRQHandler
339339
ENDP
340340

341341
ALIGN
342-
END
342+
343+
;*******************************************************************************
344+
; User Stack and Heap initialization
345+
;*******************************************************************************
346+
347+
END
343348

344349
;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/TOOLCHAIN_ARM/stm32l433xc.sct

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
#define MBED_APP_SIZE MBED_ROM_SIZE
2626
#endif
2727

28-
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
2928
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
30-
# if defined(MBED_BOOT_STACK_SIZE)
31-
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
32-
# else
33-
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
34-
# endif
29+
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
30+
#if defined(MBED_BOOT_STACK_SIZE)
31+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
32+
#else
33+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
34+
#endif
3535
#endif
3636

3737
/* Round up VECTORS_SIZE to 8 bytes */

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/TOOLCHAIN_GCC_ARM/startup_stm32l433xx.S

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* - Set the initial SP
88
* - Set the initial PC == Reset_Handler,
99
* - Set the vector table entries with the exceptions ISR address,
10-
* - Configure the clock system
10+
* - Configure the clock system
1111
* - Branches to main in the C library (which eventually
1212
* calls main()).
1313
* After Reset the Cortex-M4 processor is in Thread mode,
@@ -92,20 +92,12 @@ LoopFillZerobss:
9292

9393
/* Call the clock system intitialization function.*/
9494
bl SystemInit
95-
/* Call static constructors */
96-
//bl __libc_init_array
97-
/* Call the application's entry point.*/
98-
//bl main
99-
// Calling the crt0 'cold-start' entry point. There __libc_init_array is called
100-
// and when existing hardware_init_hook() and software_init_hook() before
101-
// starting main(). software_init_hook() is available and has to be called due
102-
// to initializsation when using rtos.
103-
bl _start
104-
bx lr
95+
bl _start
96+
bx lr
10597

10698
LoopForever:
10799
b LoopForever
108-
100+
109101
.size Reset_Handler, .-Reset_Handler
110102

111103
/**

0 commit comments

Comments
 (0)