2016-08-22 08:32:14 +00:00
|
|
|
# RTL-8710 openocd support
|
|
|
|
OpenOCD support for RTL8710 and integrated flash.
|
|
|
|
## pins:
|
2016-08-22 11:03:53 +00:00
|
|
|
### SWD
|
2016-08-22 11:28:21 +00:00
|
|
|
* SWDIO: GE3
|
|
|
|
* SWCLK: GE4
|
2016-08-22 11:03:53 +00:00
|
|
|
### JTAG
|
2016-08-22 11:28:21 +00:00
|
|
|
* TRST: GE0
|
|
|
|
* TDI: GE1
|
|
|
|
* TDO: GE2
|
|
|
|
* TMS: GE3
|
|
|
|
* TCK: GE4
|
2016-08-22 08:32:14 +00:00
|
|
|
## building:
|
2016-08-22 18:16:15 +00:00
|
|
|
```
|
2016-08-22 08:32:14 +00:00
|
|
|
make
|
2016-08-22 18:16:15 +00:00
|
|
|
```
|
2016-08-22 11:28:21 +00:00
|
|
|
## available OpenOCD commands:
|
|
|
|
### rtl8710_flash_read_id
|
|
|
|
read and parse the jedec id bytes from flash
|
2016-08-26 19:22:21 +00:00
|
|
|
### rtl8710_flash_read_mac
|
|
|
|
read MAC address from flash memory at 0xA088
|
2016-08-22 11:28:21 +00:00
|
|
|
### rtl8710_flash_mass_erase
|
|
|
|
erase whole flash
|
|
|
|
### rtl8710_flash_read [filename] [offset] [size]
|
|
|
|
dump (size) bytes from flash offset (offset) to file (filename)
|
|
|
|
### rtl8710_flash_write [filename] [offset]
|
|
|
|
write file (filename) to flash offset (offset)
|
|
|
|
### rtl8710_flash_verify [filename] [offset]
|
|
|
|
compare file (filename) with flash offset (offset)
|
|
|
|
### rtl8710_flash_auto_erase [1/0]
|
2016-08-22 14:37:32 +00:00
|
|
|
set auto_erase option on/off. flash sectors will be autoerased when writing
|
2016-08-22 11:28:21 +00:00
|
|
|
### rtl8710_flash_auto_verify [1/0]
|
2016-08-22 11:44:25 +00:00
|
|
|
set auto_verify option on/off. each block of data will be auto verified when writing
|
|
|
|
## examples:
|
2016-08-22 11:28:21 +00:00
|
|
|
```
|
|
|
|
openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_read dump.bin 0 1048576" -c "shutdown"
|
|
|
|
```
|
|
|
|
```
|
|
|
|
openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write dump.bin 0" -c "shutdown"
|
|
|
|
```
|
2016-08-23 07:10:17 +00:00
|
|
|
# About
|
2016-08-22 18:28:14 +00:00
|
|
|
RTL8710 OpenOCD support is created by Rebane (rebane@alkohol.ee)
|
|
|
|
|
|
|
|
This document and the attached source code is released under GPLv2.
|
|
|
|
|