[xfel]update some readme.md

This commit is contained in:
JianjunJiang 2021-08-04 11:48:31 +08:00
parent a3da27facb
commit fe5b1d5796
4 changed files with 37 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
*.d
*.o
*.map
*.exe
*~
#

View File

@ -6,7 +6,10 @@ Tiny FEL tools for allwinner SOC, support RISC-V D1 chip.
## How to build
### Linux platform
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
```
@ -19,9 +22,39 @@ make
sudo make install
```
### Window platform
Install some build tools
```shell
sudo apt install mingw-w64
sudo apt install autoconf
sudo apt install libtool-bin
```
```shell
git clone https://github.com/libusb/libusb.git
cd libusb
./autogen.sh
./configure --host=i686-w64-mingw32 --prefix=/usr/i686-w64-mingw32/
make
sudo make install
```
Build xfel source code
```shell
cd xfel
CROSS=i686-w64-mingw32- make
```
For 64-bits windows, you can using `x86_64-w64-mingw32-` instead of `i686-w64-mingw32` above.
## Usage
```
```shell
xfel(v1.1.3) - https://github.com/xboot/xfel
usage:
xfel version - Show chip version

2
main.c
View File

@ -59,7 +59,7 @@ static void hexdump(uint32_t addr, void * buf, size_t len)
for(j = 0; j < len; j += 16)
{
printf("%08zx: ", addr + j);
printf("%08x: ", (uint32_t)(addr + j));
for(i = 0; i < 16; i++)
{
if(j + i < len)

1
x.h
View File

@ -15,6 +15,7 @@ extern "C" {
#elif defined(__WINDOWS__)
# include <winsock2.h>
# include <sys/param.h>
# include <sys/time.h>
#else
# error "platform not supported!"
#endif