Skip to content

Commit 3801b49

Browse files
Merge pull request #587 from danielinux/cmake-fix-stm32h7
Fixed build with Cmake on STM32H7 with TEST_APPS.
2 parents e07df6d + 273c618 commit 3801b49

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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)