Skip to content

Commit f66e95f

Browse files
author
oco
committed
Some docs
1 parent 8903a9f commit f66e95f

File tree

3 files changed

+83
-1
lines changed

3 files changed

+83
-1
lines changed

DOCS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Documentation
2+
See examples in 'examples' folder
3+
4+
* examples/tester - words testing
5+
**make run** - run the test and then run forth in qEMU
6+
**make debug** - debug forth system in ddd
7+
**make test** - run the test, and then run the interpreter test (qEMU)
8+
**make flash** - flash the MCU
9+
**make debug2** - debug the MCU
10+
**make run3** - run the program in the MCU (openocd + semihosting)
11+
**make debug3** - debug the program in the MCU (openocd + ddd)
12+
13+
* led - flash LEDs on stm32vldiscovery
14+
**make flash** - flash the MCU
15+
**make debug2** - debug the MCU

INSTALL.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
```

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ m3forth is a forth cross-compiler for cortex-m3 ARM microcontrollers
99
* interpreter accessible via serial or USB (semihosting)
1010
* can be emulated in qEMU
1111

12+
## Installation
13+
[See here](INSTALL.md)
14+
1215
## Documentation
13-
TODO
16+
[See here](DOCS.md)

0 commit comments

Comments
 (0)