Skip to content

Commit f3b4b17

Browse files
committed
Fixed build with Cmake on STM32H7 with TEST_APPS.
As reported in #586
1 parent e07df6d commit f3b4b17

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Looking at the code, I notice that in the STM32H7 section, there's a line

Whitespace-only changes.

test-app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ if(BUILD_TEST_APPS)
126126
if(WOLFBOOT_TARGET STREQUAL "sim")
127127
target_link_options(image PRIVATE -Wl,-gc-sections -Wl,-Map=image.map)
128128
else()
129-
target_link_options(image PRIVATE -T${APP_LSCRIPT} -Wl,-gc-sections -Wl,-Map=image.map)
129+
target_link_options(image PRIVATE -T${APP_LSCRIPT} -Wl,-gc-sections -Wl,-Map=image.map -ffreestanding -nostartfiles)
130130
endif()
131131

132132
if(WOLFBOOT_TARGET IN_LIST ARM_TARGETS)

test-app/startup_arm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ extern unsigned int _start_heap;
3131

3232
#ifdef TARGET_stm32f4
3333
extern void isr_tim2(void);
34+
#else
35+
#define isr_tim2 isr_empty
3436
#endif
3537

3638
#ifdef TARGET_stm32h5

0 commit comments

Comments
 (0)