Revision 6feb42c8 README.txt
README.txt | ||
---|---|---|
1 | 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
|
|
2 |
Autonomous Mini Robot (AMiRo) [1]. It is based on OpenBLT developed by Feaser |
|
3 | 3 |
(see <http://feaser.com/en/openblt.php>). |
4 | 4 |
|
5 |
Copyright (C) 2016..2017 Thomas Schöpping et al.
|
|
5 |
Copyright (C) 2016..2018 Thomas Schöpping et al.
|
|
6 | 6 |
(a complete list of all authors is given below) |
7 | 7 |
|
8 | 8 |
This program is free software: you can redistribute it and/or modify |
... | ... | |
24 | 24 |
|
25 | 25 |
Authors: |
26 | 26 |
- Thomas Schöpping <tschoepp[at]cit-ec.uni-bielefeld.de> |
27 |
- Stefan Herbechtsmeier <sherbrec[at]cit-ec.uni-bielefeld.de>
|
|
27 |
- Stefan Herbrechtsmeier <sherbrec[at]cit-ec.uni-bielefeld.de>
|
|
28 | 28 |
- Marvin Barther |
29 | 29 |
|
30 | 30 |
References: |
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. |
|
37 |
|
|
31 |
[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 |
|
|
38 | 36 |
|
39 | 37 |
|
40 | 38 |
################################################################################ |
... | ... | |
58 | 56 |
CONTENTS: |
59 | 57 |
|
60 | 58 |
1 Required software |
61 |
1.1 stm32flash |
|
62 |
1.2 GCC ARM Embedded Toolchain |
|
63 |
1.3 GNU Make |
|
64 |
1.4 CMake |
|
59 |
1.1 Git |
|
60 |
1.2 GNU Make |
|
61 |
1.3 GCC |
|
62 |
1.4 stm32flash |
|
63 |
1.5 GCC ARM Embedded Toolchain |
|
64 |
1.6 CMake |
|
65 | 65 |
2 Recommended Software |
66 | 66 |
3 Compiling the source code |
67 |
3.1 target software
|
|
68 |
3.2 host software
|
|
67 |
3.1 host software
|
|
68 |
3.2 target software
|
|
69 | 69 |
|
70 | 70 |
================================================================================ |
71 | 71 |
|
... | ... | |
80 | 80 |
to the hardware. |
81 | 81 |
|
82 | 82 |
|
83 |
1.1 - Git |
|
84 |
--------- |
|
85 |
|
|
86 |
Since all main- and subprojects are available as Git repositories, installing a |
|
87 |
recent version of the tool is mandatory. |
|
88 |
|
|
89 |
|
|
90 |
1.2 - GNU Make |
|
91 |
-------------- |
|
92 |
|
|
93 |
GNU Make usually comes as preinstalled tool on Ubuntu based operating systems. |
|
94 |
If your system is missing GNU Make, it is recommended to install it from the |
|
95 |
standard repositories since no special requirements (e.g. features of a very |
|
96 |
recent version) are required. |
|
97 |
|
|
83 | 98 |
|
84 |
1.1 - stm32flash |
|
99 |
1.3 - GCC |
|
100 |
--------- |
|
101 |
|
|
102 |
In order to build some required tools from source, GCC is required. It usually |
|
103 |
comes as preinstalled tool on Ubuntu based operating systems. If your system is |
|
104 |
missing GCC, it is recommended to install it from the standard repositories |
|
105 |
since no special requirements (e.g. features of a very recent version) are |
|
106 |
required. |
|
107 |
|
|
108 |
|
|
109 |
1.4 - stm32flash |
|
85 | 110 |
---------------- |
86 | 111 |
|
87 |
To build the tool from source, clone the GIT repository to a local folder on |
|
88 |
your machine: |
|
89 |
>$ git clone git://git.code.sf.net/p/stm32flash/code |
|
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. |
|
112 |
This tool is required to flash the bootloader binaries to the microcontrollers. |
|
113 |
Since it is included in this project as a submodule, you can just run the setup |
|
114 |
script in the root directory: |
|
115 |
>$ ./setup.sh |
|
116 |
Follow the instructions to download the source code and compile the tool. The |
|
117 |
resulting binary path is ./Host/Source/stm32flash/stm32flash. Other scripts that |
|
118 |
require stm32flash will search for the binary at this location by default. |
|
96 | 119 |
|
120 |
The setup script does not install the tool to your system path, though, since |
|
121 |
this usually requires root permissions. However, stm32flash provides a Makefile |
|
122 |
with installation capabilities. Just Follow the instructions given in the file |
|
123 |
./Host/Source/stm32flash/INSTALL. |
|
97 | 124 |
|
98 |
1.2 - GCC ARM Embedded Toolchain |
|
125 |
|
|
126 |
1.5 - GCC ARM Embedded Toolchain |
|
99 | 127 |
-------------------------------- |
100 | 128 |
|
101 | 129 |
Various versions of the GCC for ARM embedded devices can be found at |
102 | 130 |
<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 |
|
|
131 |
toolchain and managing of multiple versions, it is highly recommended to use the |
|
132 |
provided setup script. Alternatively you can install the compiler manually by |
|
133 |
following the instructions that can be found on the web page. |
|
107 | 134 |
|
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. |
|
135 |
If you are running a 64-bit operating system, you may have to install several |
|
136 |
32-bit libraries in order to make the compiler work. The required packages are |
|
137 |
libc6, libstdc++6, and libncurses5. You can run the following shell commands to |
|
138 |
install the according 32-bit versions of the packages: |
|
139 |
>$ sudo dpkg --add-architecture i386 && sudo apt-get update |
|
140 |
>$ sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 |
|
115 | 141 |
|
116 | 142 |
|
117 |
1.4 - CMake
|
|
143 |
1.6 - CMake
|
|
118 | 144 |
----------- |
119 | 145 |
|
120 | 146 |
In order to build the SerialBoot host application, CMake version 2.8 or later is |
... | ... | |
146 | 172 |
even for other modules. |
147 | 173 |
|
148 | 174 |
|
149 |
3.1 - target software |
|
175 |
3.1 - host software |
|
176 |
------------------- |
|
177 |
|
|
178 |
The stm32flash tool is requried to flash bootloader binaries to the MCUs. |
|
179 |
Instructions for builing the tool are given in chapter 1.4 of this file. |
|
180 |
|
|
181 |
The SerialBoot tool can be built by using cmake. The according CMakeLists.txt |
|
182 |
file can be found in the ./Host/Source/SerialBoot/ directory. To ensure |
|
183 |
compatibility with other software (e.g. AMiRo-OS) it is higly recommended to use |
|
184 |
the provided ./setup.sh script to build SerialBoot. In the end the binary path |
|
185 |
should be ./Host/Source/SerialBoot/build/SerialBoot, which is the default for |
|
186 |
any scripts and tools that use SerialBoot. |
|
187 |
|
|
188 |
|
|
189 |
3.2 - target software |
|
150 | 190 |
--------------------- |
151 | 191 |
|
152 | 192 |
In the ./Target/Demo/ directory there are three subfolders, one for each AMiRo |
... | ... | |
155 | 195 |
be compiled by executing 'make' in these directories. |
156 | 196 |
|
157 | 197 |
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: |
|
160 |
>$ sudo echo 'KERNEL=="ttyUSB[0-9]*",NAME="tts/USB%n",SYMLINK+="%k",MODE="0666"' > /etc/udev/rules.d/50-ttyusb.rules |
|
198 |
full read and write permissions to the USB ports of your system. To do so, first |
|
199 |
create a new file by executing the following command: |
|
200 |
>$ sudo touch /etc/udev/rules.d/50-usb-serial.rules |
|
201 |
Open the file in a text editor of your choice (sudo required) and add the |
|
202 |
following lines: |
|
203 |
|
|
204 |
# Future Technology Devices International Ltd. - TTL-232RG |
|
205 |
SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*", |
|
206 |
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666" |
|
207 |
|
|
208 |
# Future Technology Devices International Ltd. - FT231X |
|
209 |
SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*", |
|
210 |
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="0666" |
|
211 |
|
|
161 | 212 |
Now connect the module you want to flash directly to your system (note that |
162 | 213 |
indirect flashing is not possible for the bootloader itself) and run the command |
163 | 214 |
>$ make flash |
164 | 215 |
If the procedure was not successful, the following hints might help: |
216 |
- Did your system apply the new udev rules? |
|
217 |
Reboot and try again! |
|
165 | 218 |
- Could the makefile execute the stm32flash tool? |
219 |
Reinitialize the submodule and try again! |
|
166 | 220 |
- Are the permissions for USB ports set correctly? |
221 |
Check the udev rules! |
|
167 | 222 |
- Are there any other applications using the serial connection? |
223 |
Close any other applications using the serial connection! |
|
168 | 224 |
- Is the AMiRo module connected to your system? |
225 |
Use the programming cable to connect the module to your system. |
|
169 | 226 |
- Is the AMiRo module powered up? |
227 |
Keep a charger plugged in during flashing. |
|
170 | 228 |
|
171 | 229 |
ATTENTION: |
172 | 230 |
Never flash a bootloader to the wrong module! Doing so might cause severe errors |
173 | 231 |
and damage the robot. |
174 | 232 |
|
175 |
|
|
176 |
3.2 - host software |
|
177 |
------------------- |
|
178 |
|
|
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. |
|
184 |
|
|
185 | 233 |
================================================================================ |
186 | 234 |
|
Also available in: Unified diff