Skip to content

Commit fb91414

Browse files
committed
Updated to toolchain startup/linker files to support the 433 devices
Also added the symbolic MBED_APP_START/MBED_APP_END defines
1 parent 94c46b1 commit fb91414

File tree

8 files changed

+157
-56
lines changed

8 files changed

+157
-56
lines changed

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/device/TOOLCHAIN_ARM_MICRO/startup_stm32l433xx.S

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ __Vectors DCD __initial_sp ; Top of Stack
119119
DCD 0 ; Reserved
120120
DCD I2C1_EV_IRQHandler ; I2C1 Event
121121
DCD I2C1_ER_IRQHandler ; I2C1 Error
122-
DCD 0 ; Reserved
123-
DCD 0 ; Reserved
122+
DCD I2C2_EV_IRQHandler ; I2C2 Event
123+
DCD I2C2_ER_IRQHandler ; I2C2 Error
124124
DCD SPI1_IRQHandler ; SPI1
125-
DCD 0 ; Reserved
125+
DCD SPI2_IRQHandler ; SPI2
126126
DCD USART1_IRQHandler ; USART1
127127
DCD USART2_IRQHandler ; USART2
128-
DCD 0 ; Reserved
128+
DCD USART3_IRQHandler ; USART3
129129
DCD EXTI15_10_IRQHandler ; External Line[15:10]
130130
DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
131131
DCD 0 ; Reserved
@@ -135,7 +135,7 @@ __Vectors DCD __initial_sp ; Top of Stack
135135
DCD 0 ; Reserved
136136
DCD 0 ; Reserved
137137
DCD 0 ; Reserved
138-
DCD 0 ; Reserved
138+
DCD SDMMC1_IRQHandler ; SDMMC1
139139
DCD 0 ; Reserved
140140
DCD SPI3_IRQHandler ; SPI3
141141
DCD 0 ; Reserved
@@ -164,7 +164,7 @@ __Vectors DCD __initial_sp ; Top of Stack
164164
DCD 0 ; Reserved
165165
DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt
166166
DCD TSC_IRQHandler ; Touch Sense Controller global interrupt
167-
DCD 0 ; Reserved
167+
DCD LCD_IRQHandler ; LCD global interrupt
168168
DCD 0 ; Reserved
169169
DCD RNG_IRQHandler ; RNG global interrupt
170170
DCD FPU_IRQHandler ; FPU
@@ -265,11 +265,16 @@ Default_Handler PROC
265265
EXPORT TIM2_IRQHandler [WEAK]
266266
EXPORT I2C1_EV_IRQHandler [WEAK]
267267
EXPORT I2C1_ER_IRQHandler [WEAK]
268+
EXPORT I2C2_EV_IRQHandler [WEAK]
269+
EXPORT I2C2_ER_IRQHandler [WEAK]
268270
EXPORT SPI1_IRQHandler [WEAK]
271+
EXPORT SPI2_IRQHandler [WEAK]
269272
EXPORT USART1_IRQHandler [WEAK]
270273
EXPORT USART2_IRQHandler [WEAK]
274+
EXPORT USART3_IRQHandler [WEAK]
271275
EXPORT EXTI15_10_IRQHandler [WEAK]
272276
EXPORT RTC_Alarm_IRQHandler [WEAK]
277+
EXPORT SDMMC1_IRQHandler [WEAK]
273278
EXPORT SPI3_IRQHandler [WEAK]
274279
EXPORT TIM6_DAC_IRQHandler [WEAK]
275280
EXPORT TIM7_IRQHandler [WEAK]
@@ -291,6 +296,7 @@ Default_Handler PROC
291296
EXPORT SAI1_IRQHandler [WEAK]
292297
EXPORT SWPMI1_IRQHandler [WEAK]
293298
EXPORT TSC_IRQHandler [WEAK]
299+
EXPORT LCD_IRQHandler [WEAK]
294300
EXPORT RNG_IRQHandler [WEAK]
295301
EXPORT FPU_IRQHandler [WEAK]
296302
EXPORT CRS_IRQHandler [WEAK]
@@ -326,11 +332,16 @@ TIM1_CC_IRQHandler
326332
TIM2_IRQHandler
327333
I2C1_EV_IRQHandler
328334
I2C1_ER_IRQHandler
335+
I2C2_EV_IRQHandler
336+
I2C2_ER_IRQHandler
329337
SPI1_IRQHandler
338+
SPI2_IRQHandler
330339
USART1_IRQHandler
331340
USART2_IRQHandler
341+
USART3_IRQHandler
332342
EXTI15_10_IRQHandler
333343
RTC_Alarm_IRQHandler
344+
SDMMC1_IRQHandler
334345
SPI3_IRQHandler
335346
TIM6_DAC_IRQHandler
336347
TIM7_IRQHandler
@@ -352,6 +363,7 @@ I2C3_ER_IRQHandler
352363
SAI1_IRQHandler
353364
SWPMI1_IRQHandler
354365
TSC_IRQHandler
366+
LCD_IRQHandler
355367
RNG_IRQHandler
356368
FPU_IRQHandler
357369
CRS_IRQHandler

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/device/TOOLCHAIN_ARM_MICRO/stm32l433xx.sct

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#! armcc -E
12
; Scatter-Loading Description File
23
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34
; Copyright (c) 2015, STMicroelectronics
@@ -27,10 +28,18 @@
2728
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2829
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2930

31+
#if !defined(MBED_APP_START)
32+
#define MBED_APP_START 0x08000000
33+
#endif
34+
35+
#if !defined(MBED_APP_SIZE)
36+
#define MBED_APP_SIZE 0x40000
37+
#endif
38+
3039
; 256KB FLASH (0x40000) + 64KB SRAM (0x10000)
31-
LR_IROM1 0x08000000 0x40000 { ; load region size_region
40+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3241

33-
ER_IROM1 0x08000000 0x40000 { ; load address = execution address
42+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3443
*.o (RESET, +First)
3544
*(InRoot$$Sections)
3645
.ANY (+RO)

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/device/TOOLCHAIN_ARM_STD/startup_stm32l433xx.S

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ __Vectors DCD __initial_sp ; Top of Stack
102102
DCD 0 ; Reserved
103103
DCD I2C1_EV_IRQHandler ; I2C1 Event
104104
DCD I2C1_ER_IRQHandler ; I2C1 Error
105-
DCD 0 ; Reserved
106-
DCD 0 ; Reserved
105+
DCD I2C2_EV_IRQHandler ; I2C2 Event
106+
DCD I2C2_ER_IRQHandler ; I2C2 Error
107107
DCD SPI1_IRQHandler ; SPI1
108-
DCD 0 ; Reserved
108+
DCD SPI2_IRQHandler ; SPI2
109109
DCD USART1_IRQHandler ; USART1
110110
DCD USART2_IRQHandler ; USART2
111-
DCD 0 ; Reserved
111+
DCD USART3_IRQHandler ; USART3
112112
DCD EXTI15_10_IRQHandler ; External Line[15:10]
113113
DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
114114
DCD 0 ; Reserved
@@ -118,7 +118,7 @@ __Vectors DCD __initial_sp ; Top of Stack
118118
DCD 0 ; Reserved
119119
DCD 0 ; Reserved
120120
DCD 0 ; Reserved
121-
DCD 0 ; Reserved
121+
DCD SDMMC1_IRQHandler ; SDMMC1
122122
DCD 0 ; Reserved
123123
DCD SPI3_IRQHandler ; SPI3
124124
DCD 0 ; Reserved
@@ -147,7 +147,7 @@ __Vectors DCD __initial_sp ; Top of Stack
147147
DCD 0 ; Reserved
148148
DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt
149149
DCD TSC_IRQHandler ; Touch Sense Controller global interrupt
150-
DCD 0 ; Reserved
150+
DCD LCD_IRQHandler ; LCD global interrupt
151151
DCD 0 ; Reserved
152152
DCD RNG_IRQHandler ; RNG global interrupt
153153
DCD FPU_IRQHandler ; FPU
@@ -248,11 +248,16 @@ Default_Handler PROC
248248
EXPORT TIM2_IRQHandler [WEAK]
249249
EXPORT I2C1_EV_IRQHandler [WEAK]
250250
EXPORT I2C1_ER_IRQHandler [WEAK]
251+
EXPORT I2C2_EV_IRQHandler [WEAK]
252+
EXPORT I2C2_ER_IRQHandler [WEAK]
251253
EXPORT SPI1_IRQHandler [WEAK]
254+
EXPORT SPI2_IRQHandler [WEAK]
252255
EXPORT USART1_IRQHandler [WEAK]
253256
EXPORT USART2_IRQHandler [WEAK]
257+
EXPORT USART3_IRQHandler [WEAK]
254258
EXPORT EXTI15_10_IRQHandler [WEAK]
255259
EXPORT RTC_Alarm_IRQHandler [WEAK]
260+
EXPORT SDMMC1_IRQHandler [WEAK]
256261
EXPORT SPI3_IRQHandler [WEAK]
257262
EXPORT TIM6_DAC_IRQHandler [WEAK]
258263
EXPORT TIM7_IRQHandler [WEAK]
@@ -274,6 +279,7 @@ Default_Handler PROC
274279
EXPORT SAI1_IRQHandler [WEAK]
275280
EXPORT SWPMI1_IRQHandler [WEAK]
276281
EXPORT TSC_IRQHandler [WEAK]
282+
EXPORT LCD_IRQHandler [WEAK]
277283
EXPORT RNG_IRQHandler [WEAK]
278284
EXPORT FPU_IRQHandler [WEAK]
279285
EXPORT CRS_IRQHandler [WEAK]
@@ -309,11 +315,16 @@ TIM1_CC_IRQHandler
309315
TIM2_IRQHandler
310316
I2C1_EV_IRQHandler
311317
I2C1_ER_IRQHandler
318+
I2C2_EV_IRQHandler
319+
I2C2_ER_IRQHandler
312320
SPI1_IRQHandler
321+
SPI2_IRQHandler
313322
USART1_IRQHandler
314323
USART2_IRQHandler
324+
USART3_IRQHandler
315325
EXTI15_10_IRQHandler
316326
RTC_Alarm_IRQHandler
327+
SDMMC1_IRQHandler
317328
SPI3_IRQHandler
318329
TIM6_DAC_IRQHandler
319330
TIM7_IRQHandler
@@ -335,6 +346,7 @@ I2C3_ER_IRQHandler
335346
SAI1_IRQHandler
336347
SWPMI1_IRQHandler
337348
TSC_IRQHandler
349+
LCD_IRQHandler
338350
RNG_IRQHandler
339351
FPU_IRQHandler
340352
CRS_IRQHandler

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/device/TOOLCHAIN_ARM_STD/stm32l433xx.sct

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#! armcc -E
12
; Scatter-Loading Description File
23
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34
; Copyright (c) 2015, STMicroelectronics
@@ -27,10 +28,18 @@
2728
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2829
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2930

31+
#if !defined(MBED_APP_START)
32+
#define MBED_APP_START 0x08000000
33+
#endif
34+
35+
#if !defined(MBED_APP_SIZE)
36+
#define MBED_APP_SIZE 0x40000
37+
#endif
38+
3039
; 256KB FLASH (0x40000) + 64KB SRAM (0x10000)
31-
LR_IROM1 0x08000000 0x40000 { ; load region size_region
40+
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3241

33-
ER_IROM1 0x08000000 0x40000 { ; load address = execution address
42+
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3443
*.o (RESET, +First)
3544
*(InRoot$$Sections)
3645
.ANY (+RO)

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/device/TOOLCHAIN_GCC_ARM/STM32L433XX.ld

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
#if !defined(MBED_APP_START)
2+
#define MBED_APP_START 0x08000000
3+
#endif
4+
5+
#if !defined(MBED_APP_SIZE)
6+
#define MBED_APP_SIZE 256k
7+
#endif
8+
19
/* Linker script to configure memory regions. */
210
MEMORY
311
{
4-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
12+
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
513
SRAM1 (rwx) : ORIGIN = 0x20000188, LENGTH = 64k - 0x188
614
}
715

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

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ g_pfnVectors:
185185
.word 0
186186
.word I2C1_EV_IRQHandler
187187
.word I2C1_ER_IRQHandler
188-
.word 0
189-
.word 0
188+
.word I2C2_EV_IRQHandler
189+
.word I2C2_ER_IRQHandler
190190
.word SPI1_IRQHandler
191-
.word 0
191+
.word SPI2_IRQHandler
192192
.word USART1_IRQHandler
193193
.word USART2_IRQHandler
194-
.word 0
194+
.word USART3_IRQHandler
195195
.word EXTI15_10_IRQHandler
196196
.word RTC_Alarm_IRQHandler
197197
.word 0
@@ -201,7 +201,7 @@ g_pfnVectors:
201201
.word 0
202202
.word 0
203203
.word 0
204-
.word 0
204+
.word SDMMC1_IRQHandler
205205
.word 0
206206
.word SPI3_IRQHandler
207207
.word 0
@@ -230,7 +230,7 @@ g_pfnVectors:
230230
.word 0
231231
.word SWPMI1_IRQHandler
232232
.word TSC_IRQHandler
233-
.word 0
233+
.word LCD_IRQHandler
234234
.word 0
235235
.word RNG_IRQHandler
236236
.word FPU_IRQHandler
@@ -365,21 +365,36 @@ g_pfnVectors:
365365
.weak I2C1_ER_IRQHandler
366366
.thumb_set I2C1_ER_IRQHandler,Default_Handler
367367

368+
.weak I2C2_EV_IRQHandler
369+
.thumb_set I2C2_EV_IRQHandler,Default_Handler
370+
371+
.weak I2C2_ER_IRQHandler
372+
.thumb_set I2C2_ER_IRQHandler,Default_Handler
373+
368374
.weak SPI1_IRQHandler
369375
.thumb_set SPI1_IRQHandler,Default_Handler
370376

377+
.weak SPI2_IRQHandler
378+
.thumb_set SPI2_IRQHandler,Default_Handler
379+
371380
.weak USART1_IRQHandler
372381
.thumb_set USART1_IRQHandler,Default_Handler
373382

374383
.weak USART2_IRQHandler
375384
.thumb_set USART2_IRQHandler,Default_Handler
376385

386+
.weak USART3_IRQHandler
387+
.thumb_set USART3_IRQHandler,Default_Handler
388+
377389
.weak EXTI15_10_IRQHandler
378390
.thumb_set EXTI15_10_IRQHandler,Default_Handler
379391

380392
.weak RTC_Alarm_IRQHandler
381393
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
382394

395+
.weak SDMMC1_IRQHandler
396+
.thumb_set SDMMC1_IRQHandler,Default_Handler
397+
383398
.weak SPI3_IRQHandler
384399
.thumb_set SPI3_IRQHandler,Default_Handler
385400

@@ -406,49 +421,52 @@ g_pfnVectors:
406421

407422
.weak COMP_IRQHandler
408423
.thumb_set COMP_IRQHandler,Default_Handler
409-
424+
410425
.weak LPTIM1_IRQHandler
411426
.thumb_set LPTIM1_IRQHandler,Default_Handler
412-
427+
413428
.weak LPTIM2_IRQHandler
414-
.thumb_set LPTIM2_IRQHandler,Default_Handler
415-
429+
.thumb_set LPTIM2_IRQHandler,Default_Handler
430+
416431
.weak USB_IRQHandler
417-
.thumb_set USB_IRQHandler,Default_Handler
418-
432+
.thumb_set USB_IRQHandler,Default_Handler
433+
419434
.weak DMA2_Channel6_IRQHandler
420-
.thumb_set DMA2_Channel6_IRQHandler,Default_Handler
421-
435+
.thumb_set DMA2_Channel6_IRQHandler,Default_Handler
436+
422437
.weak DMA2_Channel7_IRQHandler
423-
.thumb_set DMA2_Channel7_IRQHandler,Default_Handler
424-
438+
.thumb_set DMA2_Channel7_IRQHandler,Default_Handler
439+
425440
.weak LPUART1_IRQHandler
426-
.thumb_set LPUART1_IRQHandler,Default_Handler
427-
441+
.thumb_set LPUART1_IRQHandler,Default_Handler
442+
428443
.weak QUADSPI_IRQHandler
429-
.thumb_set QUADSPI_IRQHandler,Default_Handler
430-
444+
.thumb_set QUADSPI_IRQHandler,Default_Handler
445+
431446
.weak I2C3_EV_IRQHandler
432-
.thumb_set I2C3_EV_IRQHandler,Default_Handler
433-
447+
.thumb_set I2C3_EV_IRQHandler,Default_Handler
448+
434449
.weak I2C3_ER_IRQHandler
435-
.thumb_set I2C3_ER_IRQHandler,Default_Handler
436-
450+
.thumb_set I2C3_ER_IRQHandler,Default_Handler
451+
437452
.weak SAI1_IRQHandler
438453
.thumb_set SAI1_IRQHandler,Default_Handler
439-
454+
440455
.weak SWPMI1_IRQHandler
441456
.thumb_set SWPMI1_IRQHandler,Default_Handler
442-
457+
443458
.weak TSC_IRQHandler
444459
.thumb_set TSC_IRQHandler,Default_Handler
445-
460+
461+
.weak LCD_IRQHandler
462+
.thumb_set LCD_IRQHandler,Default_Handler
463+
446464
.weak RNG_IRQHandler
447465
.thumb_set RNG_IRQHandler,Default_Handler
448-
466+
449467
.weak FPU_IRQHandler
450468
.thumb_set FPU_IRQHandler,Default_Handler
451-
469+
452470
.weak CRS_IRQHandler
453471
.thumb_set CRS_IRQHandler,Default_Handler
454472
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)