Basic makefile for MIPS architecture (#2536) BUG=331000775
diff --git a/tensorflow/lite/micro/tools/make/targets/mips_makefile.inc b/tensorflow/lite/micro/tools/make/targets/mips_makefile.inc new file mode 100644 index 0000000..cf0d38e --- /dev/null +++ b/tensorflow/lite/micro/tools/make/targets/mips_makefile.inc
@@ -0,0 +1,41 @@ +# Copyright 2023 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== + +TARGET_ARCH := mips +TARGET_TOOLCHAIN_PREFIX := mips-elf- + + +# Allow additional flags on the command line for debugging. +MIPS_EXTRA_CFLAGS := + +export PATH := $(TARGET_TOOLCHAIN_ROOT):$(PATH) + +PLATFORM_FLAGS = \ + -fno-builtin-printf \ + -DTF_LITE_MCU_DEBUG_LOG \ + -DTF_LITE_USE_GLOBAL_CMATH_FUNCTIONS \ + -fno-delete-null-pointer-checks \ + -fomit-frame-pointer + +CXXFLAGS += $(PLATFORM_FLAGS) \ + -fpermissive \ + -fno-use-cxa-atexit \ + -DTF_LITE_USE_GLOBAL_MIN \ + -DTF_LITE_USE_GLOBAL_MAX + +CCFLAGS += $(PLATFORM_FLAGS) + +CCFLAGS += $(MIPS_EXTRA_CFLAGS) +CXXFLAGS += $(MIPS_EXTRA_CFLAGS)