# 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 [] - 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