tensorflow / tflite-micro

Infrastructure to enable deployment of ML models to low-power resource-constrained embedded targets (including microcontrollers and digital signal processors).
Apache License 2.0
1.74k stars 770 forks source link

Use posix style path separator for better compatibility. #2548

Closed Logiase closed 4 weeks ago

Logiase commented 2 months ago

Use posix separator / instead of Windows \ for better compatibility when building with Makefile on Windows.

The original version generate a wrong source file path when building with Makefile on Windows.

For example:

make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m33+nodsp OPTIMIZE_KERNEL_DIR=cmsis_nn microlite

The above command failed on both git-bash, powershell and cmd with the following error:

tensorflow/lite/micro/tools/make/downloads/flatbuffers already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/kissfft already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/pigweed already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/cmsis already exists, skipping the download.
/path/to/arm-none-eabi-g++ -std=c++11 -fno-rtti -fno-exceptions -fno-threadsafe-statics -Wnon-virtual-dtor -Werror -fno-unwind-tables -ffunction-sections -fdata-sections -fmessage-length=0 -DTF_LITE_STATIC_MEMORY -DTF_LITE_DISABLE_X86_NEON -Wsign-compare -Wdouble-promotion -Wunused-variable -Wunused-function -Wswitch -Wvla -Wall -Wextra -Wmissing-field-initializers -Wstrict-aliasing -Wno-unused-parameter -DKERNELS_OPTIMIZED_FOR_SPEED -mcpu=cortex-m33+nodsp -mfpu=auto -DTF_LITE_MCU_DEBUG_LOG -mthumb -mfloat-abi=soft -funsigned-char -mlittle-endian -Wno-type-limits -Wno-unused-private-field -fomit-frame-pointer -MD -DCPU_M33=1 -DCMSIS_DEVICE_ARM_CORTEX_M_XX_HEADER_FILE=\""ARMCM33".h\" -D"ARMCM33" -Os -I. -Itensorflow/lite/micro/tools/make/downloads -Itensorflow/lite/micro/tools/make/downloads/gemmlowp -Itensorflow/lite/micro/tools/make/downloads/flatbuffers/include -Itensorflow/lite/micro/tools/make/downloads/kissfft -Itensorflow/lite/micro/tools/make/downloads/ruy -Itensorflow/lite/micro/tools/make/downloads/cmsis/Device/ARM/"ARMCM33"/Include -Itensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include -Igen/cortex_m_generic_cortex-m33+nodsp_default_gcc/genfiles/ -Igen/cortex_m_generic_cortex-m33+nodsp_default_gcc/genfiles/ -c tensorflow/lite/micro/cortex_m_generic\debug_log.cc -o gen/cortex_m_generic_cortex-m33+nodsp_default_gcc/obj/core/tensorflow/lite/micro/cortex_m_generic\debug_log.o
cc1plus.exe: fatal error: tensorflow/lite/micro/cortex_m_genericdebug_log.cc: No such file or directory
compilation terminated.
make: *** [tensorflow/lite/micro/tools/make/Makefile:795: gen/cortex_m_generic_cortex-m33+nodsp_default_gcc/obj/core/tensorflow/lite/micro/cortex_m_generic\debug_log.o] Error 1

This simple PR would fix the separator error.

github-actions[bot] commented 1 month ago

"This PR is being marked as stale due to inactivity. Remove label or comment to prevent closure in 5 days."

github-actions[bot] commented 4 weeks ago

"This PR is being closed because it has been marked as stale for 5 days with no further activity."