FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


build_fx_plan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
build_fx_plan [2019/01/23 16:21]
flabelle
build_fx_plan [2019/04/09 12:17] (current)
sbelanger [How to build the libraries]
Line 2: Line 2:
  
  
-=====Tools required===== +===== Requirements ​===== 
-Before you startinstall ​the following tools:+  * Git (version >= 1.47we recommend using the latest stable version available on your platform) 
 +  * Bash (Git bash works on Windows , just make sure it is the default to run .sh files) 
 +  * CMake (version >= 3.13, can be either 32 or 64 bit version based on your system'​s [[https://​support.microsoft.com/​en-us/​help/​827218/​how-to-determine-whether-a-computer-is-running-a-32-bit-version-or-64|architecture]] ) 
 +    * Get the latest version of[[https://​cmake.org/​download/​ | CMake]] and add it to your path. 
 +  * Ninja (version >= 1.3, can be either 32 or 64 bit version based on your system'​s [[https://​support.microsoft.com/​en-us/​help/​827218/​how-to-determine-whether-a-computer-is-running-a-32-bit-version-or-64|architecture]])  
 +    * We use version 1.90, which can be found at [[https://​github.com/​ninja-build/​ninja/​releases]] 
 +  * GCC 7.3
  
-__Ubuntu:__ 
-  * CMake 
-  * git 
-  * g++ (should come pre-installed) 
-  * python3 (32 / 64 bit should match your g++ version. default is 32 bit) 
  
-__Windows:​__ +===== Setup =====
-  * CMake (Note: Do not use Cygwin'​s CMake) +
-  * git +
-  * MinGW_w64 (install the 32 bit version) +
-  * python3 (32 bit version)+
  
-Here are detailed instructions on how to [[installbuildtoolswindows|install the build tools on Windows]].+  - Start by installing[[https://​cmake.org/​download/​ | CMake]] 
 +    * Note the install path, you will need to add it to the PATH later. 
 +  - Next install GCC. Get a mingw64 installer from [[https://​sourceforge.net/​projects/​mingw-w64/ ​|source forge]]. 
 +    * Use the following setting when installing mingw64 {{gcc7_3_install.png}}. 
 +    * Note the installation path and navigate to it. Go into the mingw32 folder and then the bin folder. Note this path, you will need to add it to the PATH later. That path should look like this: C:\Program Files (x86)\mingw-w64\i686-7.3.0-posix-dwarf-rt_v5-rev2\mingw32\bin 
 +  - Next install ​ninja 
 +    - Get the latest [[https://​github.com/​ninja-build/​ninja/​releases | release]] (We use 1.90) and download it 
 +    - Unzip the file 
 +    - Place it the folder containing the ninja executable to your program files directory on Windows or your /usr/bin/ directory on Linux {{2019-04-03_14_05_00-c__program_files_ninja-win.png}} 
 +    - Add it to your path, this allows you to access any executables (such as Ninja, CMake and GCC) from the command line 
 +      - On Windows this is done using the advanced setting in the environment variables {{path.png}} 
 +      -  Navigate to advanced settings and select environment variables {{system_properties.png}}  
 +      -  Select the PATH variable in system variables {{env_variables.png}} 
 +      -  Then add the paths from the previous installs {{add_path.png}}
  
 =====How to build the libraries===== =====How to build the libraries=====
-These instructions are for compiling the libraries for your system. To cross compile, read the section [[build_fx_plan#​How to cross-compile the libraries|below]].  +  - From your gitBash console 
- +  ​Start from a fresh version of Plan GUI <​code>​ git clone --recursive ​https://​github.com/​DephyInc/​plan_3_0.git </​code>​ 
-First, navigate to an empty directory where you will clone the git. +  - Make sure all your submodules are up to date <​code> ​git submodule update --init ​--recursive ​</code> 
- +  - Change directory into fx_plan_stack and run stackBuilder.sh <​code>​ cd fx_plan_stack && ./stackBuilder.sh && cd ..</code> 
-**Clone the code repositories:​** +  A successful build will print a message similar to <​code>​[83/84] Linking CXX static library libs\libfx_plan_stack_static.
-<​code>​ +[84/84] Linking CXX shared library libs\libfx_plan_stack.dll
-git clone https://​github.com/​DephyInc/​serial.git +
-git clone --recursive ​https://github.com/DephyInc/​FlexSEA-Stack-SharedLib.git +
-git clone --recursive https://github.com/DephyInc/​Actuator-Package.git+
 </​code>​ </​code>​
  
-**Compile the serial library:** 
-<​code>​ 
-cd serial 
-git checkout dev 
-mkdir build && cd build 
- 
-cmake .. #See note 1) 
-make #See note 2) 
-</​code>​ 
- 
-**Compile FlexSEA-Stack-SharedLib (see note 3):** 
-<​code>​ 
-cd ../​../​FlexSEA-Stack-SharedLib 
-mkdir build && cd build 
-cmake .. 
-make 
-</​code>​ 
- 
-The libraries are built in either a '​win'​ directory on windows or a '​unix'​ directory on unix. Copy the libraries from the build directory to the folder where they'​ll be used. You can do that graphically,​ or via command line. The libserialc.a and libFlexSEA-Stack-Plan.a libraries must be in the fx_plan_stack\lib folder. 
- 
-<​code>​ 
-cp serial/​build/​unix/​libserialc.a Actuator-Package/​fx_plan_stack/​lib/​ 
-cp FlexSEA-Stack-SharedLib/​Release_static/​libFlexSEA-Stack-Plan.a Actuator-Package/​fx_plan_stack/​lib/​ 
-</​code>​ 
- 
-**Compile fx_plan_stack:​** 
-<​code>​ 
-cd Actuator-Package/​fx_plan_stack 
-mkdir build && cd build 
-cmake .. 
-make 
-</​code>​ 
  
-**Test the library:**+====Test the library:====
   - First, make sure that Actuator-Package\Python\flexseapython\com.txt has the right COM port.   - First, make sure that Actuator-Package\Python\flexseapython\com.txt has the right COM port.
   - Navigate to the Actuator-Package\Python folder.   - Navigate to the Actuator-Package\Python folder.
build_fx_plan.1548260512.txt.gz · Last modified: 2019/01/23 16:21 by flabelle