Revision 75f9dc42
| README.txt | ||
|---|---|---|
| 57 | 57 |
|
| 58 | 58 |
1 Required software |
| 59 | 59 |
1.1 Git |
| 60 |
1.2 stm32flash |
|
| 61 |
1.3 GCC ARM Embedded Toolchain |
|
| 62 |
1.4 GNU Make |
|
| 63 |
1.5 CMake |
|
| 60 |
1.2 GNU Make |
|
| 61 |
1.3 GCC |
|
| 62 |
1.4 stm32flash |
|
| 63 |
1.5 GCC ARM Embedded Toolchain |
|
| 64 |
1.6 CMake |
|
| 64 | 65 |
2 Recommended Software |
| 65 | 66 |
3 Compiling the source code |
| 66 |
3.1 target software
|
|
| 67 |
3.2 host software
|
|
| 67 |
3.1 host software
|
|
| 68 |
3.2 target software
|
|
| 68 | 69 |
|
| 69 | 70 |
================================================================================ |
| 70 | 71 |
|
| ... | ... | |
| 86 | 87 |
recent version of the tool is mandatory. |
| 87 | 88 |
|
| 88 | 89 |
|
| 89 |
1.2 - stm32flash |
|
| 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 |
|
|
| 98 |
|
|
| 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 |
|
| 90 | 110 |
---------------- |
| 91 | 111 |
|
| 92 | 112 |
This tool is required to flash the bootloader binaries to the microcontrollers. |
| ... | ... | |
| 94 | 114 |
script in the root directory: |
| 95 | 115 |
>$ ./setup.sh |
| 96 | 116 |
Follow the instructions to download the source code and compile the tool. The |
| 97 |
resulting binary path is ./Host/Source/stm32flash/stm32flash. |
|
| 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. |
|
| 98 | 119 |
|
| 99 | 120 |
The setup script does not install the tool to your system path, though, since |
| 100 | 121 |
this usually requires root permissions. However, stm32flash provides a Makefile |
| ... | ... | |
| 102 | 123 |
./Host/Source/stm32flash/INSTALL. |
| 103 | 124 |
|
| 104 | 125 |
|
| 105 |
1.3 - GCC ARM Embedded Toolchain
|
|
| 126 |
1.5 - GCC ARM Embedded Toolchain
|
|
| 106 | 127 |
-------------------------------- |
| 107 | 128 |
|
| 108 | 129 |
Various versions of the GCC for ARM embedded devices can be found at |
| 109 | 130 |
<https://launchpad.net/gcc-arm-embedded>. For installation of the compiler |
| 110 |
toolchain, please follow the instructions that can be found on the web page.
|
|
| 111 |
If you have access to the AMiRo-OS project as well, it is highly recommended
|
|
| 112 |
to use the setup application provided there.
|
|
| 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.
|
|
| 113 | 134 |
|
| 114 |
If you are running a 64-bit operating system, you will have to install several
|
|
| 135 |
If you are running a 64-bit operating system, you may have to install several
|
|
| 115 | 136 |
32-bit libraries in order to make the compiler work. The required packages are |
| 116 | 137 |
libc6, libstdc++6, and libncurses5. You can run the following shell commands to |
| 117 | 138 |
install the according 32-bit versions of the packages: |
| ... | ... | |
| 119 | 140 |
>$ sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 |
| 120 | 141 |
|
| 121 | 142 |
|
| 122 |
1.4 - GNU Make |
|
| 123 |
-------------- |
|
| 124 |
|
|
| 125 |
GNU Make usually comes as preinstalled tool on Ubuntu based operating systems. |
|
| 126 |
If your system is missing GNU Make, it is recommended to install it from the |
|
| 127 |
standard repositories since no special requirements (e.g. features of a very |
|
| 128 |
recent version) are required. |
|
| 129 |
|
|
| 130 |
|
|
| 131 |
1.5 - CMake |
|
| 143 |
1.6 - CMake |
|
| 132 | 144 |
----------- |
| 133 | 145 |
|
| 134 | 146 |
In order to build the SerialBoot host application, CMake version 2.8 or later is |
| ... | ... | |
| 160 | 172 |
even for other modules. |
| 161 | 173 |
|
| 162 | 174 |
|
| 163 |
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 |
|
| 164 | 190 |
--------------------- |
| 165 | 191 |
|
| 166 | 192 |
In the ./Target/Demo/ directory there are three subfolders, one for each AMiRo |
| ... | ... | |
| 172 | 198 |
full read and write permissions to the USB ports of your system. To do so, first |
| 173 | 199 |
create a new file by executing the following command: |
| 174 | 200 |
>$ sudo touch /etc/udev/rules.d/50-usb-serial.rules |
| 175 |
Open the file in a text editor of your choice (sudo required) and add the lines: |
|
| 201 |
Open the file in a text editor of your choice (sudo required) and add the |
|
| 202 |
following lines: |
|
| 176 | 203 |
|
| 177 | 204 |
# Future Technology Devices International Ltd. - TTL-232RG |
| 178 | 205 |
SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*", |
| ... | ... | |
| 186 | 213 |
indirect flashing is not possible for the bootloader itself) and run the command |
| 187 | 214 |
>$ make flash |
| 188 | 215 |
If the procedure was not successful, the following hints might help: |
| 189 |
- Did your system apply the new rules? |
|
| 216 |
- Did your system apply the new udev rules?
|
|
| 190 | 217 |
Reboot and try again! |
| 191 | 218 |
- Could the makefile execute the stm32flash tool? |
| 192 | 219 |
Reinitialize the submodule and try again! |
| ... | ... | |
| 203 | 230 |
Never flash a bootloader to the wrong module! Doing so might cause severe errors |
| 204 | 231 |
and damage the robot. |
| 205 | 232 |
|
| 206 |
|
|
| 207 |
3.2 - host software |
|
| 208 |
------------------- |
|
| 209 |
|
|
| 210 |
The SerialBoot tool can be built by using cmake. The according CMakeLists.txt |
|
| 211 |
file can be found in the ./Host/Source/SerialBoot/ directory. To ensure |
|
| 212 |
compatibility with other software (e.g. AMiRo-OS) it is higly recommended to use |
|
| 213 |
the provided ./setup.sh script to build SerialBoot. In the end the binary path |
|
| 214 |
should be ./Host/Source/SerialBoot/build/SerialBoot. |
|
| 215 |
|
|
| 216 | 233 |
================================================================================ |
| 234 |
|
|
Also available in: Unified diff