From e0da7e029b618a5b701f553ffb94efe869edcdb3 Mon Sep 17 00:00:00 2001 From: Jonas Ohlsson Date: Tue, 4 May 2021 12:38:27 +0200 Subject: MLBEDSW-4228 Building on Windows Changes to facilitate building on Windows systems. Signed-off-by: Jonas Ohlsson Change-Id: Ib95bd89fe476790333bafccc3f6fa402b6569166 --- README_WINDOWS.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 README_WINDOWS.md (limited to 'README_WINDOWS.md') diff --git a/README_WINDOWS.md b/README_WINDOWS.md new file mode 100644 index 0000000..d453cd9 --- /dev/null +++ b/README_WINDOWS.md @@ -0,0 +1,48 @@ +# Building on Windows Systems +Linux is the main development environment recommended ("Windows Subsystem for +Linux" can be used for a full Linux Bash environment under Windows), especially +with regards to building the TensorFlow Lite for Microcontrollers (TFLu) +library, which depends on GNU Make and are using a number of Bash shell scripts. +However, there are a number of possibilities for building on a Windows system. + +## Requirements +- **CMake**. E.g. Windows native CMake, MSYS CMake, Cygwin CMake, or MinGW + CMake. (Note: Supported generators may differ). +- **make tool**. E.g. GNU Make, NMAKE, Jom, mingw32-make, GNU Make under MSYS or + Cygwin. +- **ARM toolchain**. + [Arm Clang](https://developer.arm.com/tools-and-software/embedded/arm-compiler) + or + [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm) + +### Building with TensorFlow Lite for Microcontrollers +- **Shell**. E.g. "MSYS shell", "GIT Bash", or "Cygwin Terminal" +- **GNU Make**. (NOTE: required when building TFLu even if another generator is + used in CMake). +- **GNU Wget**. + +### Using a prebuilt TensorFlow Lite for Microcontrollers library +A prebuilt TFLu library can be supplied via the variable + `TFLU_PREBUILT_LIBRARY_PATH`. The project can then be built without the +requirements under +[Building with TensorFlow Lite for Microcontrollers](#Building-with-TensorFlow-Lite-for-Microcontrollers) +(apart from the initially build of the library). + +## Troubleshooting +There are many options for tools and environment to build in, and the behaviour +in each specific development environment might differ slightly. + +* Cross drive locations might not work. If this is the case mount to a usable + path in the shell used. +* There might be issues with NSYS/CMake and some toolchain paths, i.e. 'Program + Files (x86)'. Can be solved by mounting in MSYS to a usable path, or the + native Windows CMake can be called from the MSYS shell. +* GNU Wget is needed for downloads in TFLu. +* There might be issues rebuilding with CMake 3.20, with erroneous dependency + make files generated. Update to CMake 3.20.1, or downgrade to an earlier CMake + version. +* May need to unset TMPDIR environmental variable to get FlatBuffers download in + TFLu to work. +* When using Cygwin Terminal there might be error messages concerning '\r' in + the TFLu Bash scripts. In this case run dos2unix on these scripts. + -- cgit v1.2.1