Skip to content

Commit 3c0b1e3

Browse files
authored
Add a Makefile option to a Cortex-M FPU (#3105)
Only controls the ARM GCC -mfpu. BUG=409898188
1 parent 9d35a74 commit 3c0b1e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tensorflow/lite/micro/tools/make/targets/cortex_m_generic_makefile.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ifeq ($(CMSIS_PATH), $(CMSIS_DEFAULT_DOWNLOAD_PATH))
2828
endif
2929

3030
FLOAT := soft
31+
FPU :=
3132
GCC_TARGET_ARCH := $(TARGET_ARCH)
3233
SIGNED_CHAR := false
3334

@@ -160,6 +161,8 @@ else ifeq ($(TOOLCHAIN), gcc)
160161
FLAGS_GCC += -mfpu=fpv4-sp-d16
161162
else ifeq ($(TARGET_ARCH), cortex-m7)
162163
FLAGS_GCC += -mfpu=fpv4-sp-d16
164+
else ifneq ($(FPU),)
165+
FLAGS_GCC += -mfpu=$(FPU)
163166
else
164167
FLAGS_GCC += -mfpu=auto
165168
endif
@@ -213,3 +216,4 @@ ifneq ($(TARGET_ARCH), project_generation)
213216
$(TENSORFLOW_ROOT)tensorflow/lite/micro/examples/micro_speech/Makefile.inc
214217
MICRO_LITE_EXAMPLE_TESTS := $(filter-out $(EXCLUDED_EXAMPLE_TESTS), $(MICRO_LITE_EXAMPLE_TESTS))
215218
endif
219+

0 commit comments

Comments
 (0)