mirror of
https://github.com/sandeepmistry/rtl8710-openocd.git
synced 2024-12-04 12:10:28 +00:00
added GPL headers
This commit is contained in:
parent
2f0181f672
commit
4b443f625d
7 changed files with 67 additions and 10 deletions
7
Makefile
7
Makefile
|
@ -7,7 +7,12 @@ all:
|
|||
arm-none-eabi-gcc -Wall -g -Os -mlittle-endian -mlong-calls -mthumb -mcpu=cortex-m3 -mfloat-abi=soft -mthumb-interwork -ffunction-sections -ffreestanding -fsingle-precision-constant -Wstrict-aliasing=0 -Wl,-T,rtl8710.ld -nostartfiles -nostdlib -u main -Wl,--section-start=.text=$(FIRMWARE_ADDRESS) -DBUFFER_ADDRESS=$(BUFFER_ADDRESS) rtl8710_flasher.c spi_flash.c -o rtl8710_flasher.elf
|
||||
arm-none-eabi-objcopy -O binary rtl8710_flasher.elf rtl8710_flasher.bin
|
||||
gcc make_array.c -o make_array
|
||||
cp rtl8710_cpu.tcl rtl8710.ocd
|
||||
echo "#" >rtl8710.ocd
|
||||
echo "# OpenOCD script for RTL8710" >>rtl8710.ocd
|
||||
echo "# Copyright (C) 2016 Rebane, rebane@alkohol.ee" >>rtl8710.ocd
|
||||
echo "#" >>rtl8710.ocd
|
||||
echo >>rtl8710.ocd
|
||||
cat rtl8710_cpu.tcl >>rtl8710.ocd
|
||||
echo "set rtl8710_flasher_firmware_ptr $(FIRMWARE_ADDRESS)" >>rtl8710.ocd
|
||||
echo "set rtl8710_flasher_buffer $(BUFFER_ADDRESS)" >>rtl8710.ocd
|
||||
echo "set rtl8710_flasher_buffer_size $(BUFFER_SIZE)" >>rtl8710.ocd
|
||||
|
|
|
@ -36,3 +36,8 @@ openocd -f interface/stlink-v2-1.cfg -f rtl8710.ocd -c "init" -c "reset halt" -c
|
|||
```
|
||||
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"
|
||||
```
|
||||
## About
|
||||
RTL8710 OpenOCD support is created by Rebane (rebane@alkohol.ee)
|
||||
|
||||
This document and the attached source code is released under GPLv2.
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
#
|
||||
# script for RTL8710
|
||||
#
|
||||
|
||||
source [find target/swj-dp.tcl]
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
|
@ -16,8 +12,6 @@ if { [info exists ENDIAN] } {
|
|||
set _ENDIAN little
|
||||
}
|
||||
|
||||
# Work-area is a space in RAM used for flash programming
|
||||
# By default use 2kB
|
||||
if { [info exists WORKAREASIZE] } {
|
||||
set _WORKAREASIZE $WORKAREASIZE
|
||||
} else {
|
||||
|
@ -41,8 +35,6 @@ adapter_khz 500
|
|||
adapter_nsrst_delay 100
|
||||
|
||||
if {![using_hla]} {
|
||||
# if srst is not fitted use SYSRESETREQ to
|
||||
# perform a soft reset
|
||||
cortex_m reset_config sysresetreq
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2016 Rebane, rebane@alkohol.ee
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
* Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "rtl8710.h"
|
||||
#include <stdio.h>
|
||||
#include "spi_flash.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# script for RTL8710
|
||||
# OpenOCD script for RTL8710
|
||||
# Copyright (C) 2016 Rebane, rebane@alkohol.ee
|
||||
#
|
||||
|
||||
source [find target/swj-dp.tcl]
|
||||
|
|
18
spi_flash.c
18
spi_flash.c
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2016 Rebane, rebane@alkohol.ee
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
* Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "spi_flash.h"
|
||||
#include "rtl8710.h"
|
||||
#include "mask.h"
|
||||
|
|
18
spi_flash.h
18
spi_flash.h
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2016 Rebane, rebane@alkohol.ee
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
* Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SPI_FLASH_H_
|
||||
#define _SPI_FLASH_H_
|
||||
|
||||
|
|
Loading…
Reference in a new issue