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