From 4b443f625d8bbb1c438c85805f6a76de94e27846 Mon Sep 17 00:00:00 2001 From: rebane Date: Mon, 22 Aug 2016 21:28:14 +0300 Subject: [PATCH] added GPL headers --- Makefile | 7 ++++++- README.md | 5 +++++ rtl8710_cpu.tcl | 8 -------- rtl8710_flasher.c | 18 ++++++++++++++++++ script/rtl8710.ocd | 3 ++- spi_flash.c | 18 ++++++++++++++++++ spi_flash.h | 18 ++++++++++++++++++ 7 files changed, 67 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b201041..5ae74df 100644 --- a/Makefile +++ b/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 diff --git a/README.md b/README.md index e664846..6607a55 100644 --- a/README.md +++ b/README.md @@ -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. + diff --git a/rtl8710_cpu.tcl b/rtl8710_cpu.tcl index 14ad27f..9c97f04 100644 --- a/rtl8710_cpu.tcl +++ b/rtl8710_cpu.tcl @@ -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 } diff --git a/rtl8710_flasher.c b/rtl8710_flasher.c index 9415d54..faa62dc 100644 --- a/rtl8710_flasher.c +++ b/rtl8710_flasher.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 "rtl8710.h" #include #include "spi_flash.h" diff --git a/script/rtl8710.ocd b/script/rtl8710.ocd index 08ffb4d..226f061 100644 --- a/script/rtl8710.ocd +++ b/script/rtl8710.ocd @@ -1,5 +1,6 @@ # -# script for RTL8710 +# OpenOCD script for RTL8710 +# Copyright (C) 2016 Rebane, rebane@alkohol.ee # source [find target/swj-dp.tcl] diff --git a/spi_flash.c b/spi_flash.c index 00e0990..d17d92e 100644 --- a/spi_flash.c +++ b/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" diff --git a/spi_flash.h b/spi_flash.h index 07f0420..1538a8a 100644 --- a/spi_flash.h +++ b/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_