Skip to content

Commit 9b79b9f

Browse files
authored
Allow signed char for Cortex M cores (#3035)
BUG=384562154
1 parent 10ebaab commit 9b79b9f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ endif
2828

2929
FLOAT := soft
3030
GCC_TARGET_ARCH := $(TARGET_ARCH)
31+
SIGNED_CHAR := false
3132

3233
# Explicitly set this to true to include the kissfft symbols.
3334
INCLUDE_MICRO_SPEECH := false
@@ -174,14 +175,19 @@ PLATFORM_FLAGS = \
174175
-DTF_LITE_MCU_DEBUG_LOG \
175176
-mthumb \
176177
-mfloat-abi=$(FLOAT) \
177-
-funsigned-char \
178178
-mlittle-endian \
179179
-Wno-type-limits \
180180
-Wno-unused-private-field \
181181
-fomit-frame-pointer \
182182
-MD \
183183
-DCPU_$(CORE)=1
184184

185+
ifeq ($(SIGNED_CHAR), false)
186+
PLATFORM_FLAGS += -funsigned-char
187+
else
188+
PLATFORM_FLAGS += -fsigned-char
189+
endif
190+
185191
# For DWT/PMU counters. Header file name is depending on target architecture.
186192
PLATFORM_FLAGS += -DCMSIS_DEVICE_ARM_CORTEX_M_XX_HEADER_FILE=\"$(ARM_CPU).h\"
187193
PLATFORM_FLAGS += -D$(ARM_CPU)

0 commit comments

Comments
 (0)