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 [2020/02/14 21:06]
rqurashi [How to build the fx_plan_stack libraries]
build_fx_plan [2020/06/22 11:47] (current)
sbelanger
Line 14: Line 14:
  
  
-===== Setup =====+===== Setup - Windows ​=====
  
   - Start by installing[[https://​cmake.org/​download/​ | CMake]]   - Start by installing[[https://​cmake.org/​download/​ | CMake]]
     * Note the install path, you will need to add it to the PATH later.     * 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]].+  - Next install GCC. Get a mingw64 installer from [[https://​sourceforge.net/​projects/​mingw-w64/​files/​Toolchains%20targetting%20Win32/​Personal%20Builds/​mingw-builds/​installer/​mingw-w64-install.exe ​|source forge]].
     * Use the following setting when installing mingw64 {{gcc7_3_install.png}}.     * 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     * 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
Line 30: Line 30:
       -  Select the PATH variable in system variables {{env_variables.png}}       -  Select the PATH variable in system variables {{env_variables.png}}
       -  Then add the paths from the previous installs {{add_path.png}} (note: MingW is not visible in the screenshot, but it needs to be listed)       -  Then add the paths from the previous installs {{add_path.png}} (note: MingW is not visible in the screenshot, but it needs to be listed)
 +
 +=====Setup - Linux/​Raspberry Pi=====
 +
 +These are all the packages needed for Linux/​Raspberry Pi
 +<​code>​sudo apt-get install gcc
 +sudo apt-get install g++
 +sudo apt-get install cmake
 +sudo apt-get install ninja-build</​code>​
  
 =====How to build the fx_plan_stack libraries===== =====How to build the fx_plan_stack libraries=====
Line 50: Line 58:
     - **Linux**: To build for Linux on Windows 10, install [[https://​ubuntu.com/​tutorials/​tutorial-ubuntu-on-windows#​1-overview|Ubuntu emulator]].     - **Linux**: To build for Linux on Windows 10, install [[https://​ubuntu.com/​tutorials/​tutorial-ubuntu-on-windows#​1-overview|Ubuntu emulator]].
       - Once installed, go to Bash command line and install dos2unix. ​ It's needed to change stack_builder.sh line endings to Unix style: <​code>​sudo apt-get update       - Once installed, go to Bash command line and install dos2unix. ​ It's needed to change stack_builder.sh line endings to Unix style: <​code>​sudo apt-get update
-sudo apt-get install dos2unix</​code>​+sudo apt-get install ​dos2unix 
 +sudo dos2unix ​<​path_to_stack_builder.sh>​</​code>​
       - Now navigate to folder [FlexSEA/​fx_plan_stacks] and run: <​code>​./​stack_builder.sh</​code>​       - Now navigate to folder [FlexSEA/​fx_plan_stacks] and run: <​code>​./​stack_builder.sh</​code>​
-      ​You may need to install additional packages. ​ Just keep running stack_builder.sh and installing ​the packages ​it is complaining about until it runs successfully.+        ​Make sure you've installed ​the [[build_fx_plan#​Setup - Linux/​Raspberry Pi|required ​packages]]
       - If you get a large number of error messages not related to missing packages, you might need to run with elevated privileges: <​code>​sudo ./​stack_builder.sh</​code>​       - If you get a large number of error messages not related to missing packages, you might need to run with elevated privileges: <​code>​sudo ./​stack_builder.sh</​code>​
     - **Raspberry Pi**: To build for Raspberry Pi 4 on Windows or Linux:     - **Raspberry Pi**: To build for Raspberry Pi 4 on Windows or Linux:
Line 81: Line 90:
 python fxMain.py python fxMain.py
 </​code>​ </​code>​
 +
 +===== CLion IDE =====
 +
 +It is possible to use CLion for your fx_plan_stack development. As of now, it supports file navigation and syntax highlighting,​ as well as basic compilation.
 +
 +  - Open CLion
 +  - File > Open...
 +  - Select fx_plan_stack (top directory). If you already had another project open, select New Window.
 +    * Important: you need to have the submodules in the right location (side by side).
 +    * Easiest way to do this is to clone ''​FlexSEA''​ and to open ''​FlexSEA\fx_plan_stack''​ as your project.
 +  - Confirm that the CMake project was loaded (lower console). You may have to remove some environment variable to make it work.
 +
 +You can now use CLion as your IDE. As a quick test, open src/​device.cpp. Ctrl+click on circ_buff_init() as a test; it will bring you to the flexsea-comm submodule.
 +
 +Build and release configurations should be available automatically:​
 +{{ :​compile.png?​200 |}}
 +Selecting fx_plan_stack and clicking build will compile your libraries.
 +
 +Please keep in mind that ''​stack_builder.sh''​ does more than simply compile: it moves necessary files to where they belong. Exercise caution if you decide to build with CLion.
 +
 +
 +
  
 =====How to cross-compile the libraries===== =====How to cross-compile the libraries=====
build_fx_plan.1581714403.txt.gz · Last modified: 2020/02/14 21:06 by rqurashi