FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


manage:software

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
manage:software [2018/06/06 20:34]
jfduval
manage:software [2019/05/13 12:53] (current)
mmurray linking to readme in github
Line 1: Line 1:
-===== FlexSEA-Manage ​Software =====+<​markdown>​ 
 +# STM32 Repository for FlexSEA ​devices 
 + 
 +## Setup 
 + 
 +### Windows 
 + 
 +*Install/​download prerequisites* 
 + 
 +#### GNU Arm Embedded Toolchain: 7-2018-q2-update 
 +- Navigate to this link in a web browser: https://​developer.arm.com/​tools-and-software/​open-source-software/​developer-tools/​gnu-toolchain/​gnu-rm/​downloads 
 +- Download Windows ZIP download of 7-2018-q2-update 
 +    + Make sure you get the correct version!!! 
 +- Extract the downloaded contents to a path with no spaces i.e. C:​\toolchains 
 + 
 +#### CMake 
 +- Download CMake from this link: https://​cmake.org/​download/​ 
 +- Download the latest binary distribution for your Windows platform 
 +- Run the .msi installer and proceed through the steps 
 +    + Make sure to select the "Add CMake to the system PATH" option when prompted 
 +- If not done during the installation process, add the location of the CMake installation folder to the system path 
 +- Links can disappear so a known source of instructions is using a search engine to search "add directory to path windows"​ 
 + 
 +#### Ninja 
 +- Navigate to this link in a web browser: https://​github.com/​ninja-build/​ninja/​releases 
 +- Download the version for your platform and extract the zip file. Place the file in a folder in the Program Files directory (i.e. C:\Program Files\ninja-win\) 
 +- Add the location of the folder to the system path 
 +- Links can disappear so the known source of instructions is searching "add directory to path windows"​ 
 + 
 +#### Clone this repository 
 +Download and install Git Bash https://​gitforwindows.org/​ 
 +``` 
 +git clone --recursive https://​github.com/​DephyInc/​fx-rigid-m7.git 
 +``` 
 + 
 +### Linux 
 + 
 +*Install/​download prerequisites* 
 + 
 +#### GNU Arm Embedded Toolchain: 7-2018-q2-update 
 +- Navigate to this link in a web browser: https://​developer.arm.com/​tools-and-software/​open-source-software/​developer-tools/​gnu-toolchain/​gnu-rm/​downloads 
 +- Download Linux 64-bit download of 7-2018-q2-update 
 +- Install cmake and ninja: 
 + 
 +``` 
 +sudo apt-get install cmake ninja-build 
 +``` 
 + 
 +- Clone this repository:​ 
 + 
 +``` 
 +git clone --recursive https://​github.com/​DephyInc/​fx-rigid-m7.git 
 +``` 
 + 
 +## Building Target Applications 
 + 
 +### First Time 
 + 
 +- Copy the file in the root directory of the cloned repo called local_settings_template.sh to a new file named local_settings.sh 
 +- Open local_settings.sh in a text editor 
 +- Change the value of TOOLCHAIN_DIR to the path where the GNU Arm Toolchain was installed.  
 +  + On Windows make sure the path does not have spaces!  
 + 
 +### General Usage 
 + 
 +The project can be built from the command line or with an IDE like CLion or Eclipse. 
 + 
 +IDE target configurations are being setup now so the current way to see, use on command line, or add them to an IDE are by opening a Bash terminal (on Windows use Git Bash) and entering the root directory of this repository. 
 + 
 +Running the command ./build.sh with no arguments will print some of the possible build targets. 
 + 
 +In the root directory these are some of the commands that can be run: 
 + 
 +``` 
 +./build.sh ActPack-rigid1.0 
 +./build.sh ActPack-rigid0.2 download 
 +./build.sh Exo-rigid2.0 
 +./build.sh Exo-rigid3.0-left 
 +``` 
 + 
 +The basic format of the arguments is APP-HARDWARE_PLATFORM but subproject can be added with an additional - symbol as seen in the last example and download can be added to the end of the arguments to also flash a device. 
 + 
 +These options can be added as build configurations for CLion or Eclipse. 
 + 
 +## Downloading firmware to target 
 + 
 +Both a .hex and a .bin file are generated in the build directory after compiling an application. This is the firmware image and the only difference between the hex and bin files are the format. 
 + 
 +### Windows 
 + 
 +- Download ST-LINK Utility 
 +- https://​www.st.com/​en/​development-tools/​stsw-link004.html 
 +- Connect the ST-Link programmer to the programming header of the target device 
 +- Open ST-LINK Utility, open the .bin file in the build directory, and flash the device 
 + 
 +### Linux 
 + 
 +- stlink is a command line linux utility for flashing STM32s 
 + 
 +``` 
 +git clone https://​github.com/​texane/​stlink.git 
 +``` 
 + 
 +- On ubuntu it may be necessary to download the repo and compile 
 +- After you have a copy of the st-flash binary add it to your path 
 +  - The easiest way is to append it to the PATH variable in the bottom of your ~/.bashrc file 
 +- running this command will flash manage on a rigid board 
 + 
 +``` 
 +./build.sh Exo-rigid3.0-left download 
 +``` 
 + 
 +## IDE Integration 
 + 
 +The bash script above can be used to build any of the projects, but they can also be built and run with a debugger in an IDE. 
 + 
 +### CLion 
 + 
 +#### Setup 
 + 
 +- Download and install CLion from this link: 
 +- https://​www.jetbrains.com/​clion/​download/​ 
 +- The fastest/​easiest is to use all default settings 
 +- Open CLion and install Bash support to use our build scripts 
 +    + Click File -> Settings... 
 +    + Click the Plugins tab on the left 
 +    + Under BashSupport click the Install button 
 +    + After installation restart CLion 
 +    + Once CLion is open again click File -> Settings ... 
 +    + Under the Languages & Frameworks section select BashSupport 
 +    + Fill out the default interpreter field (this is the location of the bash executable) 
 +        * Enter the location of bash.exe for Windows 
 +            - Often times C:\Program Files\Git\bin\bash.exe 
 +        * For linux it will usually be /bin/bash 
 +- TODO: need to test on fresh machine and finalize this section 
 + 
 +#### Building 
 + 
 +- Open this project in CLion 
 +    + Navigate to File -> Open 
 +    + Navigate to the location of this repo on your PC 
 +- In the top right corner there should be a dropdown menu with build targets 
 +    + Current options include Exo-rigid2.0,​ ActPack-rigid2.0,​ etc. 
 +    + Select the desired build option and to build click the green run arrow to the right of the drop down menu of the targets 
 +- CLion will attempt to compile the project and compile output should appear in the window at the bottom 
 + 
 +##### Troubleshooting! 
 +1. Make sure you made a local_settings.sh file in the root of the repo with the correct path to your compiler. 
 +``` 
 +/bin/bash build.sh ActPack-rigid2.0 
 +Please copy local_settings_template.sh to local_settings.sh! 
 +Process finished with exit code 0 
 +``` 
 +2. CMake or Ninja not found - make sure you installed these tools and added to your path! 
 +3. Triple check you have the right compiler version (7-2018-q2-update) 
 + 
 +#### Debugging 
 +</​markdown>
  
-This page has not been ported to the Wiki yet. Please refer to http://​flexsea.media.mit.edu/​2016/​05/​14/​installing-the-manage-development-environment-on-your-host-computer/​ and http://​flexsea.media.mit.edu/​2016/​05/​14/​program-debug-manage/​ or reach out to us for more up to dat information. 
manage/software.txt · Last modified: 2019/05/13 12:53 by mmurray