Skip to content

Commit 0ea47c1

Browse files
Fix STM32H745 family compile failure due to failure to include cmsis_nvic.h
1 parent 8a773c2 commit 0ea47c1

File tree

15 files changed

+34
-126
lines changed

15 files changed

+34
-126
lines changed

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM4/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@ target_sources(mbed-stm32h745xi-cm4
1414
${STARTUP_FILE}
1515
)
1616

17-
target_include_directories(mbed-stm32h745xi-cm4
18-
INTERFACE
19-
.
20-
)
21-
2217
target_link_libraries(mbed-stm32h745xi-cm4 INTERFACE mbed-stm32h745xi)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM7/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@ target_sources(mbed-stm32h745xi-cm7
1414
${STARTUP_FILE}
1515
)
1616

17-
target_include_directories(mbed-stm32h745xi-cm7
18-
INTERFACE
19-
.
20-
)
21-
2217
target_link_libraries(mbed-stm32h745xi-cm7 INTERFACE mbed-stm32h745xi)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM4/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@ target_sources(mbed-stm32h747xi-cm4
1414
${STARTUP_FILE}
1515
)
1616

17-
target_include_directories(mbed-stm32h747xi-cm4
18-
INTERFACE
19-
.
20-
)
21-
2217
target_link_libraries(mbed-stm32h747xi-cm4 INTERFACE mbed-stm32h747xi)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM4/cmsis_nvic.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM7/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@ target_sources(mbed-stm32h747xi-cm7
1414
${STARTUP_FILE}
1515
)
1616

17-
target_include_directories(mbed-stm32h747xi-cm7
18-
INTERFACE
19-
.
20-
)
21-
2217
target_link_libraries(mbed-stm32h747xi-cm7 INTERFACE mbed-stm32h747xi)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM7/cmsis_nvic.h

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# Copyright (c) 2024 Jamie Smith
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5-
add_subdirectory(TOOLCHAIN_GCC_ARM)
6-
endif()
4+
add_subdirectory(STM32H745_47_FAMILY)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
2+
mbed_set_linker_script(mbed-stm32h745xi-cm4 STM32H745_H747_CM4.ld)
3+
mbed_set_linker_script(mbed-stm32h747xi-cm4 STM32H745_H747_CM4.ld)
4+
endif()
5+
6+
# Pick up cmsis-nvic.h
7+
target_include_directories(mbed-stm32h745xi-cm4 INTERFACE .)
8+
target_include_directories(mbed-stm32h747xi-cm4 INTERFACE .)

targets/TARGET_STM/TARGET_STM32H7/linker_scripts/TOOLCHAIN_GCC_ARM/STM32H745_H747_CM4.ld renamed to targets/TARGET_STM/TARGET_STM32H7/linker_scripts/STM32H745_47_FAMILY/CM4/STM32H745_H747_CM4.ld

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
******************************************************************************
1616
*/
1717

18-
#include "../cmsis_nvic.h"
18+
#include "cmsis_nvic.h"
1919

2020
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
2121
/* This value is normally defined by the tools
@@ -142,7 +142,7 @@ SECTIONS
142142
__data_end__ = .;
143143
_edata = .;
144144

145-
} > SRAM_D2
145+
} > RAM_D2
146146

147147
/* Uninitialized data section
148148
* This region is not initialized by the C/C++ library and can be used to
@@ -155,7 +155,7 @@ SECTIONS
155155
KEEP(*(.keep.uninitialized))
156156
. = ALIGN(32);
157157
__uninitialized_end = .;
158-
} > SRAM_D2
158+
} > RAM_D2
159159

160160
.bss :
161161
{
@@ -167,28 +167,28 @@ SECTIONS
167167
. = ALIGN(8);
168168
__bss_end__ = .;
169169
_ebss = .;
170-
} > SRAM_D2
170+
} > RAM_D2
171171

172172
.heap (COPY):
173173
{
174174
__end__ = .;
175175
PROVIDE(end = .);
176176
*(.heap*)
177-
. = ORIGIN(SRAM_D2) + LENGTH(SRAM_D2) - MBED_CONF_TARGET_BOOT_STACK_SIZE;
177+
. = ORIGIN(RAM_D2) + LENGTH(RAM_D2) - MBED_CONF_TARGET_BOOT_STACK_SIZE;
178178
__HeapLimit = .;
179-
} > SRAM_D2
179+
} > RAM_D2
180180

181181
/* .stack_dummy section doesn't contains any symbols. It is only
182182
* used for linker to calculate size of stack sections, and assign
183183
* values to stack symbols later */
184184
.stack_dummy (COPY):
185185
{
186186
*(.stack*)
187-
} > SRAM_D2
187+
} > RAM_D2
188188

189-
/* Set stack top to end of SRAM_D2, and stack limit move down by
189+
/* Set stack top to end of RAM_D2, and stack limit move down by
190190
* size of stack_dummy section */
191-
__StackTop = ORIGIN(SRAM_D2) + LENGTH(SRAM_D2);
191+
__StackTop = ORIGIN(RAM_D2) + LENGTH(RAM_D2);
192192
_estack = __StackTop;
193193
__StackLimit = __StackTop - MBED_CONF_TARGET_BOOT_STACK_SIZE;
194194
PROVIDE(__stack = __StackTop);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
#define MBED_CMSIS_NVIC_H
1919

2020
#define NVIC_NUM_VECTORS 166
21-
#define NVIC_RAM_VECTOR_ADDRESS 0x20000000
21+
#define NVIC_RAM_VECTOR_ADDRESS MBED_RAM_BANK_SRAM_D2_START
2222

2323
#endif

0 commit comments

Comments
 (0)