Skip to content

Commit 8be2e34

Browse files
author
Cruz Monrreal
authored
Merge pull request #6832 from bcostm/PULL_REQUEST_CUBE_UPDATE_F3_V1.9.0
STM32F3: Update with STM32CubeF3 V1.9.0
2 parents 991d461 + 6154fd2 commit 8be2e34

File tree

189 files changed

+6821
-5695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+6821
-5695
lines changed

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/TOOLCHAIN_ARM_MICRO/startup_stm32f302x8.S

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
;******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
22
;* File Name : startup_stm32f302x8.s
3-
; STM32F302x8 Devices vector table for MDK ARM_MICRO toolchain
4-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5-
; Copyright (c) 2014, STMicroelectronics
6-
; All rights reserved.
3+
;* Author : MCD Application Team
4+
;* Description : STM32F302x6/x8 devices vector table for MDK-ARM toolchain.
5+
;* This module performs:
6+
;* - Set the initial SP
7+
;* - Set the initial PC == Reset_Handler
8+
;* - Set the vector table entries with the exceptions ISR address
9+
;* - Branches to __main in the C library (which eventually
10+
;* calls main()).
11+
;* After Reset the CortexM4 processor is in Thread mode,
12+
;* priority is Privileged, and the Stack is set to Main.
13+
;*
14+
;*******************************************************************************
715
;
8-
; Redistribution and use in source and binary forms, with or without
9-
; modification, are permitted provided that the following conditions are met:
16+
;* Redistribution and use in source and binary forms, with or without modification,
17+
;* are permitted provided that the following conditions are met:
18+
;* 1. Redistributions of source code must retain the above copyright notice,
19+
;* this list of conditions and the following disclaimer.
20+
;* 2. Redistributions in binary form must reproduce the above copyright notice,
21+
;* this list of conditions and the following disclaimer in the documentation
22+
;* and/or other materials provided with the distribution.
23+
;* 3. Neither the name of STMicroelectronics nor the names of its contributors
24+
;* may be used to endorse or promote products derived from this software
25+
;* without specific prior written permission.
26+
;*
27+
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28+
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29+
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30+
;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31+
;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32+
;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33+
;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34+
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35+
;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36+
;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1037
;
11-
; 1. Redistributions of source code must retain the above copyright notice,
12-
; this list of conditions and the following disclaimer.
13-
; 2. Redistributions in binary form must reproduce the above copyright notice,
14-
; this list of conditions and the following disclaimer in the documentation
15-
; and/or other materials provided with the distribution.
16-
; 3. Neither the name of STMicroelectronics nor the names of its contributors
17-
; may be used to endorse or promote products derived from this software
18-
; without specific prior written permission.
19-
;
20-
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21-
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22-
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23-
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24-
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26-
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27-
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28-
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
38+
;*******************************************************************************
3139

3240
; Amount of memory (in bytes) allocated for Stack
3341
; Tailor this value to your application needs

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/TOOLCHAIN_ARM_STD/startup_stm32f302x8.S

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
;******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
22
;* File Name : startup_stm32f302x8.s
3-
; STM32F302x8 Devices vector table for MDK ARM_STD toolchain
4-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5-
; Copyright (c) 2014, STMicroelectronics
6-
; All rights reserved.
3+
;* Author : MCD Application Team
4+
;* Description : STM32F302x6/x8 devices vector table for MDK-ARM toolchain.
5+
;* This module performs:
6+
;* - Set the initial SP
7+
;* - Set the initial PC == Reset_Handler
8+
;* - Set the vector table entries with the exceptions ISR address
9+
;* - Branches to __main in the C library (which eventually
10+
;* calls main()).
11+
;* After Reset the CortexM4 processor is in Thread mode,
12+
;* priority is Privileged, and the Stack is set to Main.
13+
;*
14+
;*******************************************************************************
715
;
8-
; Redistribution and use in source and binary forms, with or without
9-
; modification, are permitted provided that the following conditions are met:
16+
;* Redistribution and use in source and binary forms, with or without modification,
17+
;* are permitted provided that the following conditions are met:
18+
;* 1. Redistributions of source code must retain the above copyright notice,
19+
;* this list of conditions and the following disclaimer.
20+
;* 2. Redistributions in binary form must reproduce the above copyright notice,
21+
;* this list of conditions and the following disclaimer in the documentation
22+
;* and/or other materials provided with the distribution.
23+
;* 3. Neither the name of STMicroelectronics nor the names of its contributors
24+
;* may be used to endorse or promote products derived from this software
25+
;* without specific prior written permission.
26+
;*
27+
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28+
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29+
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30+
;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31+
;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32+
;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33+
;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34+
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35+
;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36+
;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1037
;
11-
; 1. Redistributions of source code must retain the above copyright notice,
12-
; this list of conditions and the following disclaimer.
13-
; 2. Redistributions in binary form must reproduce the above copyright notice,
14-
; this list of conditions and the following disclaimer in the documentation
15-
; and/or other materials provided with the distribution.
16-
; 3. Neither the name of STMicroelectronics nor the names of its contributors
17-
; may be used to endorse or promote products derived from this software
18-
; without specific prior written permission.
19-
;
20-
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21-
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22-
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23-
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24-
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26-
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27-
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28-
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
38+
;*******************************************************************************
3139

3240
__initial_sp EQU 0x20004000 ; Top of RAM
3341

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/TOOLCHAIN_GCC_ARM/startup_stm32f302x8.S

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
******************************************************************************
33
* @file startup_stm32f302x8.s
44
* @author MCD Application Team
5-
* @version V1.1.0
6-
* @date 12-Sept-2014
7-
* @brief STM32F302x6/STM32F302x8 devices vector table for
8-
* Atollic TrueSTUDIO toolchain.
5+
* @brief STM32F302x6/STM32F302x8 devices vector table for GCC toolchain.
96
* This module performs:
107
* - Set the initial SP
118
* - Set the initial PC == Reset_Handler,
@@ -16,21 +13,28 @@
1613
* After Reset the Cortex-M4 processor is in Thread mode,
1714
* priority is Privileged, and the Stack is set to Main.
1815
******************************************************************************
19-
* @attention
2016
*
21-
* <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
17+
* Redistribution and use in source and binary forms, with or without modification,
18+
* are permitted provided that the following conditions are met:
19+
* 1. Redistributions of source code must retain the above copyright notice,
20+
* this list of conditions and the following disclaimer.
21+
* 2. Redistributions in binary form must reproduce the above copyright notice,
22+
* this list of conditions and the following disclaimer in the documentation
23+
* and/or other materials provided with the distribution.
24+
* 3. Neither the name of STMicroelectronics nor the names of its contributors
25+
* may be used to endorse or promote products derived from this software
26+
* without specific prior written permission.
2227
*
23-
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
24-
* You may not use this file except in compliance with the License.
25-
* You may obtain a copy of the License at:
26-
*
27-
* http://www.st.com/software_license_agreement_liberty_v2
28-
*
29-
* Unless required by applicable law or agreed to in writing, software
30-
* distributed under the License is distributed on an "AS IS" BASIS,
31-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32-
* See the License for the specific language governing permissions and
33-
* limitations under the License.
28+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3438
*
3539
******************************************************************************
3640
*/
@@ -50,6 +54,10 @@ defined in linker script */
5054
.word _sdata
5155
/* end address for the .data section. defined in linker script */
5256
.word _edata
57+
/* start address for the .bss section. defined in linker script */
58+
.word _sbss
59+
/* end address for the .bss section. defined in linker script */
60+
.word _ebss
5361

5462
.equ BootRAM, 0xF1E0F85F
5563
/**
@@ -83,6 +91,17 @@ LoopCopyDataInit:
8391
adds r2, r0, r1
8492
cmp r2, r3
8593
bcc CopyDataInit
94+
ldr r2, =_sbss
95+
b LoopFillZerobss
96+
/* Zero fill the bss segment. */
97+
FillZerobss:
98+
movs r3, #0
99+
str r3, [r2], #4
100+
101+
LoopFillZerobss:
102+
ldr r3, = _ebss
103+
cmp r2, r3
104+
bcc FillZerobss
86105

87106
/* Call the clock system intitialization function.*/
88107
bl SystemInit

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/TOOLCHAIN_IAR/startup_stm32f302x8.S

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
;/******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
22
;* File Name : startup_stm32f302x8.s
33
;* Author : MCD Application Team
4-
;* Version : V2.1.0
5-
;* Date : 12-Sept-2014
64
;* Description : STM32F302x6/STM32F302x8 devices vector table for EWARM toolchain.
75
;* This module performs:
86
;* - Set the initial SP
@@ -15,8 +13,6 @@
1513
;* priority is Privileged, and the Stack is set to Main.
1614
;********************************************************************************
1715
;*
18-
;* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
19-
;*
2016
;* Redistribution and use in source and binary forms, with or without modification,
2117
;* are permitted provided that the following conditions are met:
2218
;* 1. Redistributions of source code must retain the above copyright notice,

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/hal_tick.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545

4646
#define TIM_MST TIM2
4747
#define TIM_MST_IRQ TIM2_IRQn
48-
#define TIM_MST_RCC __TIM2_CLK_ENABLE()
48+
#define TIM_MST_RCC __HAL_RCC_TIM2_CLK_ENABLE()
4949
#define TIM_MST_DBGMCU_FREEZE __HAL_DBGMCU_FREEZE_TIM2()
5050

51-
#define TIM_MST_RESET_ON __TIM2_FORCE_RESET()
52-
#define TIM_MST_RESET_OFF __TIM2_RELEASE_RESET()
51+
#define TIM_MST_RESET_ON __HAL_RCC_TIM2_FORCE_RESET()
52+
#define TIM_MST_RESET_OFF __HAL_RCC_TIM2_RELEASE_RESET()
5353

5454
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
5555

0 commit comments

Comments
 (0)