amiro-blt / README.txt @ 9c219069
History | View | Annotate | Download (7.346 KB)
| 1 | 4cce70a8 | Thomas Schöpping | AMiRo-BLT is the bootloader and flashing toolchain for the base version of the |
|---|---|---|---|
| 2 | 9c219069 | Thomas Schöpping | Autonomous Mini Robot (AMiRo) [1]. It is based on OpenBLT developed by Feaser |
| 3 | 4cce70a8 | Thomas Schöpping | (see <http://feaser.com/en/openblt.php>). |
| 4 | 69661903 | Thomas Schöpping | |
| 5 | 4cce70a8 | Thomas Schöpping | Copyright (C) 2016..2017 Thomas Schöpping et al. |
| 6 | 69661903 | Thomas Schöpping | (a complete list of all authors is given below) |
| 7 | |||
| 8 | 4cce70a8 | Thomas Schöpping | This program is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
||
| 10 | the Free Software Foundation, either version 3 of the License, or (at |
||
| 11 | your option) any later version. |
||
| 12 | |||
| 13 | This program is distributed in the hope that it will be useful, but |
||
| 14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||
| 16 | General Public License for more details. |
||
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License |
||
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 20 | 69661903 | Thomas Schöpping | |
| 21 | da350eab | Thomas Schöpping | This research/work was supported by the Cluster of Excellence |
| 22 | Cognitive Interaction Technology 'CITEC' (EXC 277) at Bielefeld |
||
| 23 | University, which is funded by the German Research Foundation (DFG). |
||
| 24 | 69661903 | Thomas Schöpping | |
| 25 | Authors: |
||
| 26 | - Thomas Schöpping <tschoepp[at]cit-ec.uni-bielefeld.de> |
||
| 27 | - Stefan Herbechtsmeier <sherbrec[at]cit-ec.uni-bielefeld.de> |
||
| 28 | - Marvin Barther |
||
| 29 | |||
| 30 | References: |
||
| 31 | 9c219069 | Thomas Schöpping | [1] S. Herbrechtsmeier, T. Korthals, T. Schopping and U. Rückert, "AMiRo: A |
| 32 | modular & customizable open-source mini robot platform," 2016 20th |
||
| 33 | International Conference on System Theory, Control and Computing (ICSTCC), |
||
| 34 | Sinaia, 2016, pp. 687-692. |
||
| 35 | |||
| 36 | 69661903 | Thomas Schöpping | |
| 37 | |||
| 38 | 4cce70a8 | Thomas Schöpping | ################################################################################ |
| 39 | # # |
||
| 40 | # RRRRRRRR EEEEEEEE AAA DDDDDDDD MM MM EEEEEEEE # |
||
| 41 | # RR RR EE AA AA DD DD MMM MMM EE # |
||
| 42 | # RR RR EE AA AA DD DD MMMM MMMM EE # |
||
| 43 | # RRRRRRRR EEEEEE AA AA DD DD MM MMM MM EEEEEE # |
||
| 44 | # RR RR EE AAAAAAAAA DD DD MM MM EE # |
||
| 45 | # RR RR EE AA AA DD DD MM MM EE # |
||
| 46 | # RR RR EEEEEEEE AA AA DDDDDDDD MM MM EEEEEEEE # |
||
| 47 | # # |
||
| 48 | ################################################################################ |
||
| 49 | 69661903 | Thomas Schöpping | |
| 50 | 4cce70a8 | Thomas Schöpping | This file will help you to setup all required software on your system, compile |
| 51 | the source code, and use the tools and flash the bootloader software to the |
||
| 52 | AMiRo base modules. |
||
| 53 | 69661903 | Thomas Schöpping | |
| 54 | 4cce70a8 | Thomas Schöpping | ================================================================================ |
| 55 | 69661903 | Thomas Schöpping | |
| 56 | CONTENTS: |
||
| 57 | |||
| 58 | 4cce70a8 | Thomas Schöpping | 1 Required software |
| 59 | 1.1 stm32flash |
||
| 60 | 1.2 GCC ARM Embedded Toolchain |
||
| 61 | 1.3 GNU Make |
||
| 62 | 1.4 CMake |
||
| 63 | 2 Recommended Software |
||
| 64 | 3 Compiling the source code |
||
| 65 | 3.1 target software |
||
| 66 | 3.2 host software |
||
| 67 | |||
| 68 | ================================================================================ |
||
| 69 | |||
| 70 | |||
| 71 | 69661903 | Thomas Schöpping | |
| 72 | 1 - REQUIRED SOFTWARE |
||
| 73 | --------------------- |
||
| 74 | |||
| 75 | 4cce70a8 | Thomas Schöpping | The only third party software required are stm32flash and GCC for ARM embedded |
| 76 | devices. While the latter is a compiler to build binaries that are compatible |
||
| 77 | with the microcontrollers (MCUs) of AMiRo, the former is used to write this data |
||
| 78 | to the hardware. |
||
| 79 | |||
| 80 | |||
| 81 | 69661903 | Thomas Schöpping | |
| 82 | 1.1 - stm32flash |
||
| 83 | 4cce70a8 | Thomas Schöpping | ---------------- |
| 84 | 69661903 | Thomas Schöpping | |
| 85 | 4cce70a8 | Thomas Schöpping | To build the tool from source, clone the GIT repository to a local folder on |
| 86 | your machine: |
||
| 87 | 69661903 | Thomas Schöpping | >$ git clone git://git.code.sf.net/p/stm32flash/code |
| 88 | 4cce70a8 | Thomas Schöpping | Make sure that you have selected version 0.4 or later of the tool. You can now |
| 89 | build the tool simply by executing 'make'. Finally, you must make the resulting |
||
| 90 | binary (stm32flash) globally available in your environment. You can do so by |
||
| 91 | either copying the file to an appropriate location (e.g. /usr/local/bin/) or |
||
| 92 | creating an according link. The tool must be available as 'stm32flash' in every |
||
| 93 | new shell. |
||
| 94 | 69661903 | Thomas Schöpping | |
| 95 | 4cce70a8 | Thomas Schöpping | |
| 96 | 1.2 - GCC ARM Embedded Toolchain |
||
| 97 | -------------------------------- |
||
| 98 | 69661903 | Thomas Schöpping | |
| 99 | Various versions of the GCC for ARM embedded devices can be found at |
||
| 100 | 4cce70a8 | Thomas Schöpping | <https://launchpad.net/gcc-arm-embedded>. For installation of the compiler |
| 101 | toolchain, please follow the instructions that can be found on the web page. |
||
| 102 | If you have access to the AMiRo-OS project as well, it is highly recommended |
||
| 103 | to use the setup application provided there. |
||
| 104 | |||
| 105 | |||
| 106 | 1.3 - GNU Make |
||
| 107 | -------------- |
||
| 108 | |||
| 109 | GNU Make usually comes as preinstalled tool on Ubuntu based operating systems. |
||
| 110 | If your system is missing GNU Make, it is recommended to install it from the |
||
| 111 | standard repositories since no special requirements (e.g. features of a very |
||
| 112 | recent version) are required. |
||
| 113 | |||
| 114 | |||
| 115 | 1.4 - CMake |
||
| 116 | ----------- |
||
| 117 | 69661903 | Thomas Schöpping | |
| 118 | 4cce70a8 | Thomas Schöpping | In order to build the SerialBoot host application, CMake version 2.8 or later is |
| 119 | required. If possible, it is recommended to instal it from the standard |
||
| 120 | repositories of your operating system. |
||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | 2 - RECOMMENDED SOFTWARE |
||
| 125 | ------------------------ |
||
| 126 | |||
| 127 | AMiRo-BLT provides support for the QtCreator IDE. In order to setup according |
||
| 128 | projects, use the ./setup.sh script and follow the instructions. It will |
||
| 129 | automatically generate the required files and you can import the projects by |
||
| 130 | opening the .creator files with Qtcreator IDE. |
||
| 131 | |||
| 132 | |||
| 133 | |||
| 134 | 3 - COMPILING THE SOURCE CODE |
||
| 135 | 69661903 | Thomas Schöpping | ----------------------------- |
| 136 | |||
| 137 | 4cce70a8 | Thomas Schöpping | The AMiRo-BLT project is separated into two major parts: target- and host- |
| 138 | related software. The former comprises the bootloaders for the three base |
||
| 139 | modules of the AMiRo. The latter is the SerialBoot tool, which can be used to |
||
| 140 | flash further binaries (e.g. a complex operating system) to the microcontrollers |
||
| 141 | without connecting to the module directly (data is passed through via CAN bus). |
||
| 142 | Since the programming connector of the lowermost AMiRo module is the only one |
||
| 143 | accessible when the robot is fully set up, this enables to update the firmware |
||
| 144 | even for other modules. |
||
| 145 | |||
| 146 | |||
| 147 | 3.1 - target software |
||
| 148 | --------------------- |
||
| 149 | |||
| 150 | In the ./Target/Demo/ directory there are three subfolders, one for each AMiRo |
||
| 151 | base module. Within each of these is an additional Boot/ folder |
||
| 152 | (./Target/Demo/<device>/Boot/), which contains a makefile. Each bootloader can |
||
| 153 | be compiled by executing 'make' in these directories. |
||
| 154 | |||
| 155 | In order to flash the bootloader to a microcontroller, you first have to set |
||
| 156 | full read and write permissions to the USB ports of your system. You can do so |
||
| 157 | by executing the following command: |
||
| 158 | 69661903 | Thomas Schöpping | >$ sudo echo 'KERNEL=="ttyUSB[0-9]*",NAME="tts/USB%n",SYMLINK+="%k",MODE="0666"' > /etc/udev/rules.d/50-ttyusb.rules |
| 159 | 4cce70a8 | Thomas Schöpping | Now connect the module you want to flash directly to your system (note that |
| 160 | indirect flashing is not possible for the bootloader itself) and run the command |
||
| 161 | 69661903 | Thomas Schöpping | >$ make flash |
| 162 | If the procedure was not successful, the following hints might help: |
||
| 163 | 4cce70a8 | Thomas Schöpping | - Could the makefile execute the stm32flash tool? |
| 164 | - Are the permissions for USB ports set correctly? |
||
| 165 | - Are there any other applications using the serial connection? |
||
| 166 | - Is the AMiRo module connected to your system? |
||
| 167 | - Is the AMiRo module powered up? |
||
| 168 | |||
| 169 | ATTENTION: |
||
| 170 | Never flash a bootloader to the wrong module! Doing so might cause severe errors |
||
| 171 | and damage the robot. |
||
| 172 | 69661903 | Thomas Schöpping | |
| 173 | |||
| 174 | 4cce70a8 | Thomas Schöpping | 3.2 - host software |
| 175 | ------------------- |
||
| 176 | 69661903 | Thomas Schöpping | |
| 177 | 4cce70a8 | Thomas Schöpping | The SerialBoot tool can be built by using cmake. The according CMakeLists.txt |
| 178 | file can be found in the ./Host/Source/SerialBoot/ directory. To ensure |
||
| 179 | compatibility with other software (e.g. AMiRo-OS) it is higly recommended to use |
||
| 180 | the provided ./setup.sh script to build SerialBoot. In the end the binary path |
||
| 181 | should be ./Host/Sotware/SerialBoot/build/SerialBoot. |
||
| 182 | 69661903 | Thomas Schöpping | |
| 183 | 4cce70a8 | Thomas Schöpping | ================================================================================ |