***
# XFEL
Tiny FEL tools for allwinner SOC, support RISC-V D1 chip.
## How to build
The xfel tools depends on the `libusb-1.0` library, you need to install `libusb-1.0-0-dev` before compile, for example in ubuntu:
```shell
sudo apt install libusb-1.0-0-dev
```
The just type `make` at the root directory, you will see a binary program.
```shell
cd xfel
make
sudo make install
```
## Usage
```
xfel(v1.1.0) - https://github.com/xboot/xfel
usage:
xfel version - Show brom version
xfel hexdump
- Dumps memory region in hex
xfel dump - Binary memory dump to stdout
xfel exec - Call function address
xfel read32 - Read 32-bits value from device memory
xfel write32 - Write 32-bits value to device memory
xfel read - Read memory to file
xfel write - Write file to memory
xfel reset - Reset device using watchdog
xfel sid - Show 128-bits sid information
xfel jtag - Enable jtag debug
xfel ddr [type] - Initial ddr controller with optional type
xfel spinor - Detect spi nor flash
xfel spinor read - Read spi nor flash to file
xfel spinor write - Write file to spi nor flash
xfel spinand - Detect spi nand flash
xfel spinand read - Read spi nand flash to file
xfel spinand write - Write file to spi nand flash
```
## Links
* [The chinese discussion posts](https://whycan.com/t_6546.html)
* [The linux-sunxi community](http://sunxi.org/)
## License
This library is free software; you can redistribute it and or modify it under the terms of the MIT license. See [MIT License](LICENSE) for details.