From 42be5d6815b86a3803c584536887f6d17a85c0ac Mon Sep 17 00:00:00 2001 From: Goran Mahovlic Date: Thu, 18 Aug 2022 17:34:26 +0200 Subject: [PATCH] Adding README --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/README.md b/README.md index e69de29..d4fb845 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,75 @@ +### Ownership and License + +The contributors are listed in CONTRIB.TXT. This project uses the GPL v3 license, see LICENSE.TXT. +This project uses the [C4.1 (Collective Code Construction Contract)](http://rfc.zeromq.org/spec:22) process for contributions. +To report an issue, use the [issues page](https://envox.hr/gitea/goran-mahovlic/eez-flow-template-stm32l496g-disco/issues) tracker. + +## Build + +First, build the project using EEZ Studio. + +### STM32 binary + +Import project from {{projectDirPath}} into STM32CubeIDE and build it. + +### Simulator + +#### Linux + +``` +sudo apt-get update +sudo apt-get install -y git libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev cmake build-essential libbsd-dev +cd {{projectDirPath}} +mkdir -p Src/build/linux +cd Src/build/linux +cmake ../.. +make +``` + +Start simulator with: + +``` +./{{projectName}} +``` + + +#### Windows + +Install [Visual Studio Community 2017](https://visualstudio.microsoft.com/downloads/) and [CMake](https://cmake.org/install/). + +Download and install SDL2 development libraries for Windows from https://www.libsdl.org/download-2.0.php. + +Download and install SDL2_Image development libraries for Windows from https://github.com/libsdl-org/SDL_image/releases. + +Update these environment variables in `cmake.bat` according to the location (and version) where SDL2 and SDL2_Image has been installed: + +``` +set SDL2DIR=..\SDL2-2.0.14 +set SDL2IMAGEDIR=..\SDL2_image-2.0.4 +``` + +Execute `cmake.bat`: + +``` +cd {{projectDirPath}}\Src +.\cmake.bat +``` + +Visual Studio solution is created in `{{projectDirPath}}\Src\build\win32`. + +Use Visual Studio to build the solution. + +#### Emscripten + +These instructions are for the Linux. + +[Download and install Emscripten](https://emscripten.org/docs/getting_started/downloads.html) + +``` +source /path/to/emsdk/emsdk_env.sh +export EMSCRIPTEN=/path/to/emsdk/upstream/emscripten +mkdir -p {{projectDirPath}}/Src/build/emscripten +cd {{projectDirPath}}/Src/build/emscripten +cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Emscripten.cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" ../.. +make +``` \ No newline at end of file