Guest User

Untitled

a guest
Jul 28th, 2021
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.00 KB | None | 0 0
  1. # Settings for RISCV 32-bit MCU toolchain.
  2. TARGET_ARCH := riscv32_mcu
  3. TARGET_TOOLCHAIN_PREFIX := riscv64-unknown-elf-
  4.  
  5. PLATFORM_FLAGS = \
  6.   -march=rv32imac \
  7.   -mabi=ilp32 \
  8.   -mcmodel=medany \
  9.   -mexplicit-relocs \
  10.   -fno-builtin-printf \
  11.   -fno-exceptions \
  12.   -DTF_LITE_MCU_DEBUG_LOG \
  13.   -DTF_LITE_USE_GLOBAL_CMATH_FUNCTIONS \
  14.   -funsigned-char \
  15.   -fno-delete-null-pointer-checks \
  16.   -fomit-frame-pointer
  17.  
  18. CXXFLAGS += $(PLATFORM_FLAGS) \
  19.   -fpermissive \
  20.   -fno-rtti \
  21.   -fno-threadsafe-statics \
  22.   -fno-use-cxa-atexit \
  23.   -DTF_LITE_USE_GLOBAL_MIN \
  24.   -DTF_LITE_USE_GLOBAL_MAX \
  25.   --std=gnu++11
  26.  
  27. CCFLAGS += $(PLATFORM_FLAGS)
  28.  
  29. BUILD_TYPE := micro
  30.  
  31. MICROLITE_CC_SRCS += \
  32.   $(wildcard tensorflow/lite/micro/riscv32_mcu/*.cc)
  33.  
  34. # These are microcontroller-specific rules for converting the ELF output
  35. # of the linker into a binary image that can be loaded directly.
  36. OBJCOPY := $(TARGET_TOOLCHAIN_PREFIX)objcopy
  37. $(BINDIR)/%.bin: $(BINDIR)/%
  38.     @mkdir -p $(dir $@)
  39.     $(OBJCOPY) $< $@ -O binary
  40.  
Advertisement
Add Comment
Please, Sign In to add comment