|
| 1 | +# INSTALLATION |
| 2 | + |
| 3 | +## ARM toolchain |
| 4 | +Get the ARM toolchain (this is GCC with utilities for ARM), e.g. [here](https://launchpad.net/gcc-arm-embedded). It's not needed if you don't want to debug your apps. |
| 5 | +Unpack it to any folder, e.g. ~/arm. Add this to **~/.bashrc**: |
| 6 | +```bash |
| 7 | +if [ -d "$HOME/arm/bin" ] ; then |
| 8 | + PATH="$HOME/arm/bin:$PATH" |
| 9 | +fi |
| 10 | +``` |
| 11 | +Log off, and log in. The toolchain is enabled. |
| 12 | + |
| 13 | +## ST-link |
| 14 | +Get the **st-link** to flash the controller. Download it [here](https://github.com/texane/stlink/), unpack, then compile it: |
| 15 | +```bash |
| 16 | +$ ./autogen.sh |
| 17 | +$ ./configure |
| 18 | +$ make |
| 19 | +``` |
| 20 | +Make **/etc/modprobe.d/usb-storage** file: |
| 21 | +```bash |
| 22 | +options usb-storage quirks=483:3744:i |
| 23 | +``` |
| 24 | +Reload **usb-storage** kernel module |
| 25 | +```bash |
| 26 | +sudo modprobe -r usb-storage |
| 27 | +sudo modprobe usb-storage |
| 28 | +``` |
| 29 | + |
| 30 | +## qEMU |
| 31 | +Get **qEMU** for ARM to debug your programs without a real device. Install **qemu-system-arm** package using your package manager. |
| 32 | + |
| 33 | +## libelf |
| 34 | +Get **libelf** library for elf-files production. Install **libelf1** package |
| 35 | + |
| 36 | +## libdwarf |
| 37 | +Get **libdwarf** library for debug symbols generation. |
| 38 | +You can just copy **libdwarf.so** from this repo to **/usr/lib**. If you see any errors, you should make it by yourself. |
| 39 | +Install **dwarfutils** from source: |
| 40 | +```bash |
| 41 | +apt-get source dwarfutils |
| 42 | +``` |
| 43 | +In the **libdwarf** folder run: |
| 44 | +```bash |
| 45 | +./configure --enable-shared |
| 46 | +make |
| 47 | +``` |
| 48 | +You'll get libdwarf.so |
| 49 | + |
| 50 | +## ddd |
| 51 | +Get **ddd** (data display debugger). Install **ddd** package. |
| 52 | + |
| 53 | +## openocd |
| 54 | +Get **openocd** if you want to get USB connection to your device via semihosting and program in Forth on you device directly!. You can get it [here](http://sourceforge.net/projects/openocd). Unpack and compile: |
| 55 | +```bash |
| 56 | +./configure |
| 57 | +make |
| 58 | +sudo make install |
| 59 | +``` |
| 60 | +## test |
| 61 | +To test your installation go to **examples/tester** and run: |
| 62 | +```bash |
| 63 | +make test |
| 64 | +``` |
0 commit comments