Skip to content

Commit

Permalink
Basic makefile for MIPS architecture (#2536)
Browse files Browse the repository at this point in the history
BUG=331000775
  • Loading branch information
shlmregev authored Apr 3, 2024
1 parent bb4fc83 commit 7aa0d93
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions tensorflow/lite/micro/tools/make/targets/mips_makefile.inc
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 7aa0d93

Please sign in to comment.