To get started with Zedmon you will need to do 3 steps:
This step needs to be done only once per Zedmon device.
Make sure that you have an arm-none-eabi
gcc toolchain and dfu-util
installed.
To install the arm-none-eabi
gcc toolchain, download the latest version from this link, extract and add the path to bin
into your $PATH
.
To install dfu-util:
sudo apt-get install dfu-util
git clone https://fuchsia.googlesource.com/zedmon --recurse-submodules cd zedmon/firmware make
The builds output will end up in ./build-zedmon
.
To upload the firmware to zedmon, the device needs to be in DFU mode. To enter DFU mode:
boot0
button.reset
button.boot0
button.Once the device is in DFU mode, you can upload the firmware with dfu-util
:
dfu-util -a 0 -s 0x08000000:leave -D build-zedmon/lk.bin -d 0483:df11
zedmon
Command Line UtilityOn Debian-based systems, the following command will install packages required to build the command line utility:
sudo apt-get install golang libusb-1.0-0-dev
The zedmon
utility is written in Go. Because it is hosted on fuchsia.googlesource.com, it can not simply be fetched with go get
. Instead you'll need to check it out manually:
mkdir -p zedmonutil/src/fuchsia.googlesource.com cd zedmonutil export GOPATH=`pwd` cd src/fuchsia.googlesource.com git clone https://fuchsia.googlesource.com/zedmon cd $GOPATH go get fuchsia.googlesource.com/zedmon/cmd/zedmon go install fuchsia.googlesource.com/zedmon/cmd/zedmon
The output executable will be in ./bin/zedmon
.
zedmon
utilityTo record a zedmon
trace, run:
./bin/zedmon record
which will start a recording and it will record a power sample every 630 μsec. Send ^C
to stop. The ouput will be stored in zedmon.csv
The output is of the following format:
timestamp,shunt_voltage,bus_voltage
Sample output:
... 3381223490,0.0014124999643172487,14.06124968570657 3381224120,0.0014349999637488509,14.063749685650691 3381224749,0.0014124999643172487,14.05874968576245 ...
For the full list of the commands run:
./bin/zedmon