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
Next revision
Previous revision
manage:software [2019/06/06 15:47]
kandoni Update repo name
manage:software [2019/08/15 19:56] (current)
mmurray
Line 12: Line 12:
 - Download Windows ZIP download of 7-2018-q2-update - Download Windows ZIP download of 7-2018-q2-update
     + Make sure you get the correct version!!!     + Make sure you get the correct version!!!
-- Extract the downloaded contents to a path with no spaces i.e. C:​\toolchains+- Extract the downloaded contents to a path with no spaces i.e. C:​\toolchains\gcc-arm-none-eabi-7-2018-q2-update-win32\
  
 #### CMake #### CMake
Line 20: Line 20:
     + Make sure to select the "Add CMake to the system PATH" option when prompted     + 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 - 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"​+- Links can disappear so a known source of instructions is using a search engine ​like google ​to search "add directory to path windows"​
  
 #### Ninja #### Ninja
 - Navigate to this link in a web browser: https://​github.com/​ninja-build/​ninja/​releases - 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\) - 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+- Add the location of the ninja installation ​folder to the system path
 - Links can disappear so the known source of instructions is searching "add directory to path windows"​ - Links can disappear so the known source of instructions is searching "add directory to path windows"​
  
 #### Clone this repository #### Clone this repository
-Download and install Git Bash https://​gitforwindows.org/​+Download and install Git Bash https://​gitforwindows.org/​ 
 +- During installation,​ be sure to select the "​Associate .sh files to be run with Bash" at the Select Components screen. 
 +- Open a Git Bash terminal in the desired folder and run the following command:
 ``` ```
 git clone --recursive https://​github.com/​DephyInc/​FlexSEA-Embedded-STM.git git clone --recursive https://​github.com/​DephyInc/​FlexSEA-Embedded-STM.git
Line 50: Line 52:
  
 ``` ```
-git clone --recursive https://​github.com/​DephyInc/​fx-rigid-m7.git+git clone --recursive https://​github.com/​DephyInc/​FlexSEA-Embedded-STM.git
 ``` ```
  
 ## Building Target Applications ## Building Target Applications
 +This project is built using cmake so technically it is possible to build directly from the command line using only cmake but below are 3 easier ways to work with the project. If you prefer to use an IDE CLion is a great choice as it is entirely built around using cmake and has a number of great features. It is normally $199 but it is possible to get a free license if you are a student or professor: https://​www.jetbrains.com/​student/​. System Workbench from STMicroelectronics also works and has all necessary tools for working with STM32 microcontrollers bundled with the IDE. However Eclipse prefers to generate its own Makefiles so there can be issues using cmake but as of 8/2/2019 we did find a plugin that works fine and instructions are below. The other main option is to build and download the project using the included bash script. This is best if you prefer to use your favorite text editor like Vim, Sublime, etc.
  
-### First Time+### CLion 
 +##### Setup 
 +- Download and install CLion from this link: 
 +- https://​www.jetbrains.com/​clion/​download/​ 
 +- The fastest/​easiest installation is to use all default settings 
 +- Copy the file named workspace_template.xml in the .idea directory of this repository and rename it workspace.xml (replace the existing workspace.xml file if it exists). Make sure that you now have a file called workspace.xml in the .idea directory, this is where the cmake profiles for different build targets are stored and it is very important to have. 
 +- You're now ready to open CLion and finish the setup 
 +    + Open this project in CLion 
 +        + Navigate to File -> Open 
 +        + Navigate to the location of this repo on your PC 
 +    + Once CLion is open click File -> Settings... 
 +    + Click the Apperarance & Behavior tab on the left 
 +    + Click on the Path Variables menu 
 +    + Click the + symbol on the right to add a new path variable with the following info: 
 +        + Name: TOOLCHAIN_PATH 
 +        + Value: /​path/​to/​the/​toolchain/​gcc-arm-none-eabi-7-2018-q2-update 
 +            + your path will probably look like "​C:​\toolchains\gcc-arm-none-eabi-7-2018-q2-update"​ or "/​home/​dephy/​toolchains/​gcc-arm-none-eabi-7-2018-q2-update"​ 
 +- Congratulations,​ if you've been diligent in reading these instructions and these instructions are still accurate you should be good to go. 
 +##### Building 
 +- In the top right corner there should be a dropdown menu with build targets 
 +    + Click the drop down then click on fx_manage 
 +    + You can the select the build target, current options include Exo-rigid2.0-left,​ ActPack-rigid2.0,​ etc. 
 +- CLion will attempt to compile the project and compile output should appear in the window at the bottom
  
 +### Bash script
 +##### 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 - 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 - Open local_settings.sh in a text editor
 - Change the value of TOOLCHAIN_DIR to the path where the GNU Arm Toolchain was installed. ​ - 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! ​   + On Windows make sure the path does not have spaces! ​
- +##### General Usage 
-### General Usage +- Open a Bash terminal (on Windows use Git Bash) and enter the root directory of this repository. 
- +Running the command ./manage_builder.sh with no arguments will print some of the possible build targets. 
-The project can be built from the command line or with an IDE like CLion or Eclipse. +In the root directory these are some of the commands that can be run:
- +
-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 +./manage_builder.sh ActPack-rigid1.0 
-./build.sh ActPack-rigid0.2 download +./manage_builder.sh ActPack-rigid0.2 download 
-./build.sh Exo-rigid2.0 +./manage_builder.sh Exo-rigid2.0 
-./build.sh Exo-rigid3.0-left+./manage_builder.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. 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.
  
Line 87: Line 106:
 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. 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+#### Windows
 - stlink is a command line utility for flashing STM32s - stlink is a command line utility for flashing STM32s
 - Download the stlink Windows zip from the following link: https://​github.com/​texane/​stlink/​releases/​tag/​1.3.0 - Download the stlink Windows zip from the following link: https://​github.com/​texane/​stlink/​releases/​tag/​1.3.0
Line 94: Line 113:
 - Connect the ST-Link programmer to the programming header of the target device - Connect the ST-Link programmer to the programming header of the target device
 - For example, running the following command will flash manage on a rigid board: - For example, running the following command will flash manage on a rigid board:
- 
 ``` ```
-./build.sh Exo-rigid3.0-left download+./manage_builder.sh Exo-rigid3.0-left download
 ``` ```
- +#### Windows (Optional GUI)
-### Windows (Optional GUI) +
 - Download ST-LINK Utility - Download ST-LINK Utility
 - https://​www.st.com/​en/​development-tools/​stsw-link004.html - https://​www.st.com/​en/​development-tools/​stsw-link004.html
 - Connect the ST-Link programmer to the programming header of the target device - 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 - Open ST-LINK Utility, open the .bin file in the build directory, and flash the device
-### Linux 
  
 +#### Linux
 - stlink is a command line linux utility for flashing STM32s - stlink is a command line linux utility for flashing STM32s
- 
 ``` ```
 git clone https://​github.com/​texane/​stlink.git git clone https://​github.com/​texane/​stlink.git
 ``` ```
- 
 - On ubuntu it may be necessary to download the repo and compile - 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 - 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   - 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 - running this command will flash manage on a rigid board
- 
 ``` ```
-./build.sh Exo-rigid3.0-left download+./manage_builder.sh Exo-rigid3.0-left download
 ``` ```
- +## Troubleshooting!
-## 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. 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+/​bin/​bash ​manage_builder.sh ActPack-rigid2.0
 Please copy local_settings_template.sh to local_settings.sh! Please copy local_settings_template.sh to local_settings.sh!
 Process finished with exit code 0 Process finished with exit code 0
Line 166: Line 144:
 3. Triple check you have the right compiler version (7-2018-q2-update) 3. Triple check you have the right compiler version (7-2018-q2-update)
  
-#### Debugging 
 </​markdown>​ </​markdown>​
  
manage/software.1559836063.txt.gz · Last modified: 2019/06/06 15:47 by kandoni