Skip to content

Commit c316763

Browse files
committed
switch to stm32l151cb-a & work around flash size field width.
1 parent 495f8e4 commit c316763

File tree

11 files changed

+188
-103
lines changed

11 files changed

+188
-103
lines changed

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_MICRO/startup_stm32l151xb.S renamed to targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_MICRO/startup_stm32l151xba.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Stack_Size EQU 0x00000400
5454
EXPORT __initial_sp
5555

5656
Stack_Mem SPACE Stack_Size
57-
__initial_sp EQU 0x20004000 ; Top of RAM (16 KB)
57+
__initial_sp EQU 0x20008000 ; Top of RAM (32 KB)
5858

5959

6060
; <h> Heap Configuration

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_MICRO/stm32l151cb.sct renamed to targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_MICRO/stm32l151cba.sct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2929

30-
; STM32L151CB: 128KB FLASH + 16KB SRAM
30+
; STM32L151CB: 128KB FLASH + 32KB SRAM
3131
LR_IROM1 0x08000000 0x20000 { ; load region size_region
3232

3333
ER_IROM1 0x08000000 0x20000 { ; load address = execution address
@@ -37,7 +37,7 @@ LR_IROM1 0x08000000 0x20000 { ; load region size_region
3737
}
3838

3939
; 61 vectors = 244 bytes (0xF4) to be reserved in RAM
40-
RW_IRAM1 (0x20000000+0xF4) (0x4000-0xF4) { ; RW data
40+
RW_IRAM1 (0x20000000+0xF4) (0x8000-0xF4) { ; RW data
4141
.ANY (+RW +ZI)
4242
}
4343

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_STD/startup_stm32l151xb.S renamed to targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_STD/startup_stm32l151xba.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
4949
; </h>
5050

51-
__initial_sp EQU 0x20004000 ; Top of RAM (16 KB)
51+
__initial_sp EQU 0x20008000 ; Top of RAM (32 KB)
5252

5353
PRESERVE8
5454
THUMB

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_STD/stm32l151cb.sct renamed to targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_ARM_STD/stm32l151cba.sct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2929

30-
; STM32L151CB: 128KB FLASH + 16KB SRAM
30+
; STM32L151CB: 128KB FLASH + 32KB SRAM
3131
LR_IROM1 0x08000000 0x20000 { ; load region size_region
3232

3333
ER_IROM1 0x08000000 0x20000 { ; load address = execution address
@@ -37,7 +37,7 @@ LR_IROM1 0x08000000 0x20000 { ; load region size_region
3737
}
3838

3939
; 61 vectors = 244 bytes (0xF4) to be reserved in RAM
40-
RW_IRAM1 (0x20000000+0xF4) (0x4000-0xF4) { ; RW data
40+
RW_IRAM1 (0x20000000+0xF4) (0x8000-0xF4) { ; RW data
4141
.ANY (+RW +ZI)
4242
}
4343

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_GCC_ARM/STM32L151XB.ld renamed to targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/TOOLCHAIN_GCC_ARM/STM32L151XB-A.ld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
MEMORY
44
{
5-
/* 128KB FLASH, 16KB RAM, Reserve up till 0xF4. There are 61 vectors = 244
5+
/* 128KB FLASH, 32KB RAM, Reserve up till 0xF4. There are 61 vectors = 244
66
* bytes (0xF4) in RAM.
77
*/
88
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128k
9-
RAM (rwx) : ORIGIN = 0x200000F4, LENGTH = 0x4000-0xF4
9+
RAM (rwx) : ORIGIN = 0x200000F4, LENGTH = 0x8000-0xF4
1010
}
1111

1212
/* Linker script to place sections and symbol values. Should be used together

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/stm32l151xb.h renamed to targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/stm32l151xba.h

Lines changed: 171 additions & 88 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32L1/TARGET_MTB_RAK811/device/stm32l1xx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
/* #define STM32L100xB */ /*!< STM32L100C6, STM32L100R and STM32L100RB Devices */
9696
/* #define STM32L100xBA */ /*!< STM32L100C6-A, STM32L100R8-A and STM32L100RB-A Devices */
9797
/* #define STM32L100xC */ /*!< STM32L100RC Devices */
98-
#define STM32L151xB /*!< STM32L151C6, STM32L151R6, STM32L151C8, STM32L151R8, STM32L151V8, STM32L151CB, STM32L151RB and STM32L151VB */
99-
/* #define STM32L151xBA */ /*!< STM32L151C6-A, STM32L151R6-A, STM32L151C8-A, STM32L151R8-A, STM32L151V8-A, STM32L151CB-A, STM32L151RB-A and STM32L151VB-A */
98+
/* #define STM32L151xB */ /*!< STM32L151C6, STM32L151R6, STM32L151C8, STM32L151R8, STM32L151V8, STM32L151CB, STM32L151RB and STM32L151VB */
99+
#define STM32L151xBA /*!< STM32L151C6-A, STM32L151R6-A, STM32L151C8-A, STM32L151R8-A, STM32L151V8-A, STM32L151CB-A, STM32L151RB-A and STM32L151VB-A */
100100
/* #define STM32L151xC */ /*!< STM32L151CC, STM32L151UC, STM32L151RC and STM32L151VC */
101101
/* #define STM32L151xCA */ /*!< STM32L151RC-A, STM32L151VC-A, STM32L151QC and STM32L151ZC */
102102
/* #define STM32L151xD */ /*!< STM32L151QD, STM32L151RD, STM32L151VD & STM32L151ZD */

targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_flash.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ typedef struct
139139
* @{
140140
*/
141141

142+
#ifndef FLASH_SIZE
142143
#define FLASH_SIZE (uint32_t)(*((uint16_t *)FLASHSIZE_BASE) * 1024U)
144+
#endif
143145
#define FLASH_PAGE_SIZE ((uint32_t)256U) /*!< FLASH Page Size in bytes */
144146

145147
/**

targets/TARGET_STM/mbed_rtx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747

4848
#elif (defined(TARGET_STM32F070RB) ||\
4949
defined(TARGET_STM32F072RB) ||\
50-
defined(TARGET_STM32F302R8) ||\
51-
defined(TARGET_STM32L151CB))
50+
defined(TARGET_STM32F302R8))
5251
#define INITIAL_SP (0x20004000UL)
5352

5453
#elif (defined(TARGET_STM32F103RB) ||\
@@ -60,6 +59,7 @@
6059

6160
#elif (defined(TARGET_STM32F091RC) ||\
6261
defined(TARGET_STM32F410RB) ||\
62+
defined(TARGET_STM32L151CBA)||\
6363
defined(TARGET_STM32L151CC) ||\
6464
defined(TARGET_STM32L151RC) ||\
6565
defined(TARGET_STM32L152RC))

targets/targets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,11 +2032,11 @@
20322032
"inherits": ["FAMILY_STM32"],
20332033
"core": "Cortex-M3",
20342034
"default_toolchain": "ARM",
2035-
"extra_labels_add": ["STM32L1", "STM32L151xB", "STM32L151CB"],
2035+
"extra_labels_add": ["STM32L1", "STM32L151xBA", "STM32L151CBA"],
20362036
"supported_toolchains": ["ARM", "GCC_ARM"],
2037-
"device_has_add": ["ANALOGOUT", "FLASH"],
2037+
"device_has_add": ["ANALOGOUT"],
20382038
"release_versions": ["5"],
2039-
"device_name": "STM32L151CB",
2039+
"device_name": "STM32L151CBA",
20402040
"bootloader_supported": true
20412041
},
20422042
"MOTE_L152RC": {

0 commit comments

Comments
 (0)