aboutsummaryrefslogtreecommitdiff
path: root/mule/README.md
blob: d32f40a011a48b76ac4c44328e36d733a7f17925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Mule

This directory includes tools for Mule STM32 Companion Controller.

The following tools are available:
- `mule.sh` script
- OpenOCD configuration file

## mule.sh

`mule.sh` is a helper script to control the on-module companion controller.

Parameters:

    --reset              - resets the Cortex M0
    --dfu                - enables DFU loader
    --disable            - keep Cortex M0 in reset
    --flash [<firmware>] - flash the given firmware

### Dependencies

`mule.sh` requires following Debian packages:

```shell
apt-get install dfu-util usbutils
```

## OpenOCD

On RK3399 and A64 modules, GPIO based SWD support is available. A `openocd.cfg`
config file is provided for OpenOCD debugging tools.

    openocd -f openocd.cfg

To select a specific board set the q7_module variable

    openocd -c "set q7_module a64" -f openocd.cfg

OpenOCD in Debian Stretch and Ubuntu Xenial are missing the sysfsgpio
interface and you have to rebuild it from source.

Dependencies:
```
apt install git build-essential libtool autoconf automake
```

Compile:

    git clone git://repo.or.cz/openocd.git openocd-code
    cd openocd-code
    ./bootstrap
    ./configure --exec-prefix=$HOME/openocd --prefix=$HOME/openocd --enable-sysfsgpio
    make && make install