Skip to content

Commit 345b6f0

Browse files
committed
Revert "STM32F7 ARM SCT file update to define correct RAM_SIZE"
This reverts commit 356de44.
1 parent 8831d70 commit 345b6f0

File tree

4 files changed

+135
-98
lines changed

4 files changed

+135
-98
lines changed

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/device/TOOLCHAIN_ARM_STD/stm32f746xg.sct

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
#! armcc -E
22
; Scatter-Loading Description File
3-
;******************************************************************************
4-
;* @attention
5-
;*
6-
;* Copyright (c) 2016-2019 STMicroelectronics.
7-
;* All rights reserved.
8-
;*
9-
;* This software component is licensed by ST under BSD 3-Clause license,
10-
;* the "License"; You may not use this file except in compliance with the
11-
;* License. You may obtain a copy of the License at:
12-
;* opensource.org/licenses/BSD-3-Clause
13-
;*
14-
;******************************************************************************
15-
16-
; STM32F746xG:
17-
; FLASH: 1024K (0x100000) @0x08000000
18-
; RAM1: 256K (0x40000) @0x20010000
19-
; RAM2: 64K (0x10000) @0x20000000
3+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4+
; Copyright (c) 2016, STMicroelectronics
5+
; All rights reserved.
6+
;
7+
; Redistribution and use in source and binary forms, with or without
8+
; modification, are permitted provided that the following conditions are met:
9+
;
10+
; 1. Redistributions of source code must retain the above copyright notice,
11+
; this list of conditions and the following disclaimer.
12+
; 2. Redistributions in binary form must reproduce the above copyright notice,
13+
; this list of conditions and the following disclaimer in the documentation
14+
; and/or other materials provided with the distribution.
15+
; 3. Neither the name of STMicroelectronics nor the names of its contributors
16+
; may be used to endorse or promote products derived from this software
17+
; without specific prior written permission.
18+
;
19+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2030

2131
#if !defined(MBED_APP_START)
2232
#define MBED_APP_START 0x08000000
@@ -32,15 +42,16 @@
3242

3343
#define Stack_Size MBED_BOOT_STACK_SIZE
3444

35-
#define MBED_RAM_START 0x20010000
36-
#define MBED_RAM_SIZE 0x40000
37-
#define MBED_VECTTABLE_RAM_START 0x20000000
45+
#define MBED_RAM_START 0x20000000
46+
#define MBED_RAM_SIZE 0x50000
47+
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
3848
#define MBED_VECTTABLE_RAM_SIZE 0x1C8
3949
#define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
4050
#define MBED_CRASH_REPORT_RAM_SIZE 0x100
41-
#define MBED_RAM0_START (MBED_RAM_START)
42-
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
51+
#define MBED_RAM0_START (MBED_CRASH_REPORT_RAM_START + MBED_CRASH_REPORT_RAM_SIZE)
52+
#define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE - MBED_CRASH_REPORT_RAM_SIZE)
4353

54+
; STM32F746xG: 1024 KB FLASH (0x100000) + 320 KB SRAM (0x50000)
4455
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4556

4657
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
@@ -52,6 +63,7 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
5263
RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
5364
}
5465

66+
; Total: 114 vectors = 456 bytes (0x1C8) to be reserved in RAM
5567
RW_IRAM1 (MBED_RAM0_START) (MBED_RAM0_SIZE-Stack_Size) { ; RW data
5668
.ANY (+RW +ZI)
5769
}

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/device/TOOLCHAIN_ARM_STD/stm32f756xg.sct

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
#! armcc -E
22
; Scatter-Loading Description File
3-
;******************************************************************************
4-
;* @attention
5-
;*
6-
;* Copyright (c) 2016-2019 STMicroelectronics.
7-
;* All rights reserved.
8-
;*
9-
;* This software component is licensed by ST under BSD 3-Clause license,
10-
;* the "License"; You may not use this file except in compliance with the
11-
;* License. You may obtain a copy of the License at:
12-
;* opensource.org/licenses/BSD-3-Clause
13-
;*
14-
;******************************************************************************
15-
16-
; STM32F756xG:
17-
; FLASH: 1024K (0x100000) @0x08000000
18-
; RAM1: 256K (0x40000) @0x20010000
19-
; RAM2: 64K (0x10000) @0x20000000
3+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4+
; Copyright (c) 2016, STMicroelectronics
5+
; All rights reserved.
6+
;
7+
; Redistribution and use in source and binary forms, with or without
8+
; modification, are permitted provided that the following conditions are met:
9+
;
10+
; 1. Redistributions of source code must retain the above copyright notice,
11+
; this list of conditions and the following disclaimer.
12+
; 2. Redistributions in binary form must reproduce the above copyright notice,
13+
; this list of conditions and the following disclaimer in the documentation
14+
; and/or other materials provided with the distribution.
15+
; 3. Neither the name of STMicroelectronics nor the names of its contributors
16+
; may be used to endorse or promote products derived from this software
17+
; without specific prior written permission.
18+
;
19+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2030

2131
#if !defined(MBED_APP_START)
2232
#define MBED_APP_START 0x08000000
@@ -32,15 +42,16 @@
3242

3343
#define Stack_Size MBED_BOOT_STACK_SIZE
3444

35-
#define MBED_RAM_START 0x20010000
36-
#define MBED_RAM_SIZE 0x40000
37-
#define MBED_VECTTABLE_RAM_START 0x20000000
45+
#define MBED_RAM_START 0x20000000
46+
#define MBED_RAM_SIZE 0x50000
47+
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
3848
#define MBED_VECTTABLE_RAM_SIZE 0x1C8
3949
#define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
4050
#define MBED_CRASH_REPORT_RAM_SIZE 0x100
41-
#define MBED_RAM0_START (MBED_RAM_START)
42-
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
51+
#define MBED_RAM0_START (MBED_CRASH_REPORT_RAM_START + MBED_CRASH_REPORT_RAM_SIZE)
52+
#define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE - MBED_CRASH_REPORT_RAM_SIZE)
4353

54+
; STM32F746xG: 1024 KB FLASH (0x100000) + 320 KB SRAM (0x50000)
4455
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4556

4657
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
@@ -52,6 +63,7 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
5263
RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
5364
}
5465

66+
; Total: 114 vectors = 456 bytes (0x1C8) to be reserved in RAM
5567
RW_IRAM1 (MBED_RAM0_START) (MBED_RAM0_SIZE-Stack_Size) { ; RW data
5668
.ANY (+RW +ZI)
5769
}

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_ARM_STD/stm32f767xi.sct

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
#! armcc -E
22
; Scatter-Loading Description File
3-
;******************************************************************************
4-
;* @attention
5-
;*
6-
;* Copyright (c) 2016-2019 STMicroelectronics.
7-
;* All rights reserved.
8-
;*
9-
;* This software component is licensed by ST under BSD 3-Clause license,
10-
;* the "License"; You may not use this file except in compliance with the
11-
;* License. You may obtain a copy of the License at:
12-
;* opensource.org/licenses/BSD-3-Clause
13-
;*
14-
;******************************************************************************
15-
16-
; STM32F767xI:
17-
; FLASH: 2048K (0x200000) @0x08000000
18-
; RAM1: 384K (0x60000) @0x20020000
19-
; RAM2: 128K (0x20000) @0x20000000
3+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4+
; Copyright (c) 2016, STMicroelectronics
5+
; All rights reserved.
6+
;
7+
; Redistribution and use in source and binary forms, with or without
8+
; modification, are permitted provided that the following conditions are met:
9+
;
10+
; 1. Redistributions of source code must retain the above copyright notice,
11+
; this list of conditions and the following disclaimer.
12+
; 2. Redistributions in binary form must reproduce the above copyright notice,
13+
; this list of conditions and the following disclaimer in the documentation
14+
; and/or other materials provided with the distribution.
15+
; 3. Neither the name of STMicroelectronics nor the names of its contributors
16+
; may be used to endorse or promote products derived from this software
17+
; without specific prior written permission.
18+
;
19+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2030

2131
#if !defined(MBED_APP_START)
2232
#define MBED_APP_START 0x08000000
@@ -32,26 +42,28 @@
3242

3343
#define Stack_Size MBED_BOOT_STACK_SIZE
3444

35-
#define MBED_RAM_START 0x20020000
36-
#define MBED_RAM_SIZE 0x60000
37-
#define MBED_VECTTABLE_RAM_START 0x20000000
45+
#define MBED_RAM_START 0x20000000
46+
#define MBED_RAM_SIZE 0x80000
47+
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
3848
#define MBED_VECTTABLE_RAM_SIZE 0x1F8
3949
#define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
4050
#define MBED_CRASH_REPORT_RAM_SIZE 0x100
41-
#define MBED_RAM0_START (MBED_RAM_START)
42-
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
51+
#define MBED_RAM0_START (MBED_CRASH_REPORT_RAM_START + MBED_CRASH_REPORT_RAM_SIZE)
52+
#define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE - MBED_CRASH_REPORT_RAM_SIZE)
4353

54+
; STM32F767ZI: 2048 KB FLASH (0x200000) + 512 KB SRAM (0x80000)
4455
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4556

4657
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
4758
*.o (RESET, +First)
4859
*(InRoot$$Sections)
4960
.ANY (+RO)
5061
}
51-
62+
5263
RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
5364
}
5465

66+
; Total: 126 vectors = 504 bytes (0x1F8) to be reserved in RAM
5567
RW_IRAM1 (MBED_RAM0_START) (MBED_RAM0_SIZE-Stack_Size) { ; RW data
5668
.ANY (+RW +ZI)
5769
}
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
#! armcc -E
22
; Scatter-Loading Description File
3-
;******************************************************************************
4-
;* @attention
5-
;*
6-
;* Copyright (c) 2016-2019 STMicroelectronics.
7-
;* All rights reserved.
8-
;*
9-
;* This software component is licensed by ST under BSD 3-Clause license,
10-
;* the "License"; You may not use this file except in compliance with the
11-
;* License. You may obtain a copy of the License at:
12-
;* opensource.org/licenses/BSD-3-Clause
13-
;*
14-
;******************************************************************************
15-
16-
; STM32F769xI:
17-
; FLASH: 2048K (0x200000) @0x08000000
18-
; RAM1: 384K (0x60000) @0x20020000
19-
; RAM2: 128K (0x20000) @0x20000000
3+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4+
; Copyright (c) 2016, STMicroelectronics
5+
; All rights reserved.
6+
;
7+
; Redistribution and use in source and binary forms, with or without
8+
; modification, are permitted provided that the following conditions are met:
9+
;
10+
; 1. Redistributions of source code must retain the above copyright notice,
11+
; this list of conditions and the following disclaimer.
12+
; 2. Redistributions in binary form must reproduce the above copyright notice,
13+
; this list of conditions and the following disclaimer in the documentation
14+
; and/or other materials provided with the distribution.
15+
; 3. Neither the name of STMicroelectronics nor the names of its contributors
16+
; may be used to endorse or promote products derived from this software
17+
; without specific prior written permission.
18+
;
19+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2030

2131
#if !defined(MBED_APP_START)
2232
#define MBED_APP_START 0x08000000
2333
#endif
2434

35+
; 2048 KB FLASH (0x200000)
2536
#if !defined(MBED_APP_SIZE)
2637
#define MBED_APP_SIZE 0x200000
2738
#endif
@@ -32,15 +43,6 @@
3243

3344
#define Stack_Size MBED_BOOT_STACK_SIZE
3445

35-
#define MBED_RAM_START 0x20020000
36-
#define MBED_RAM_SIZE 0x60000
37-
#define MBED_VECTTABLE_RAM_START 0x20000000
38-
#define MBED_VECTTABLE_RAM_SIZE 0x1F8
39-
#define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
40-
#define MBED_CRASH_REPORT_RAM_SIZE 0x100
41-
#define MBED_RAM0_START (MBED_RAM_START)
42-
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
43-
4446
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4547

4648
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
@@ -49,14 +51,13 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4951
.ANY (+RO)
5052
}
5153

52-
RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
53-
}
54-
55-
RW_IRAM1 (MBED_RAM0_START) (MBED_RAM0_SIZE-Stack_Size) { ; RW data
54+
; 512KB SRAM (0x80000)
55+
; Total: 126 vectors = 504 bytes (0x1F8 + 0 byte for 8-byte data alignment) to be reserved in RAM
56+
RW_IRAM1 (0x20000000+0x1F8) (0x80000-0x1F8-Stack_Size) { ; RW data
5657
.ANY (+RW +ZI)
5758
}
5859

59-
ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
60+
ARM_LIB_STACK (0x20000000+0x80000) EMPTY -Stack_Size { ; stack
6061
}
6162
}
6263

0 commit comments

Comments
 (0)