Compare commits
3 Commits
v0.12.0-rc
...
v0.3.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
371530224c | ||
|
|
c6ac97cf3b | ||
|
|
7de1c892cd |
@@ -1,29 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
--max-line-length=120
|
||||
--tab-size=4
|
||||
--show-types
|
||||
--strict
|
||||
|
||||
--typedefsfile tools/scripts/typedefs.txt
|
||||
|
||||
--ignore AVOID_EXTERNS
|
||||
--ignore BLOCK_COMMENT_STYLE
|
||||
--ignore COMPLEX_MACRO
|
||||
--ignore CONST_STRUCT
|
||||
--ignore ENOSYS
|
||||
--ignore FILE_PATH_CHANGES
|
||||
--ignore GERRIT_CHANGE_ID
|
||||
--ignore LINE_SPACING
|
||||
--ignore LOGICAL_CONTINUATIONS
|
||||
--ignore MACRO_WITH_FLOW_CONTROL
|
||||
--ignore NEW_TYPEDEFS
|
||||
--ignore PARENTHESIS_ALIGNMENT
|
||||
--ignore PREFER_DEFINED_ATTRIBUTE_MACRO
|
||||
--ignore PREFER_FALLTHROUGH
|
||||
--ignore PREFER_KERNEL_TYPES
|
||||
--ignore SPLIT_STRING
|
||||
--ignore SSCANF_TO_KSTRTO
|
||||
--ignore SWITCH_CASE_INDENT_LEVEL
|
||||
--ignore TRACING_LOGGING
|
||||
--ignore VOLATILE
|
||||
111
.github/workflows/snapshot.yml
vendored
111
.github/workflows/snapshot.yml
vendored
@@ -1,111 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copyright (C) 2020 by Tarek BOUCHKATI <tarek.bouchkati@gmail.com>
|
||||
|
||||
on: push
|
||||
|
||||
name: OpenOCD Snapshot
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: [ubuntu-18.04]
|
||||
env:
|
||||
DL_DIR: ../downloads
|
||||
BUILD_DIR: ../build
|
||||
steps:
|
||||
- name: Install needed packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autotools-dev autoconf automake libtool pkg-config cmake texinfo texlive g++-mingw-w64-i686
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v1
|
||||
- run: ./bootstrap
|
||||
- name: Prepare libusb1
|
||||
env:
|
||||
LIBUSB1_VER: 1.0.26
|
||||
run: |
|
||||
mkdir -p $DL_DIR && cd $DL_DIR
|
||||
wget "https://github.com/libusb/libusb/releases/download/v${LIBUSB1_VER}/libusb-${LIBUSB1_VER}.tar.bz2"
|
||||
tar -xjf libusb-${LIBUSB1_VER}.tar.bz2
|
||||
echo "LIBUSB1_SRC=$PWD/libusb-${LIBUSB1_VER}" >> $GITHUB_ENV
|
||||
- name: Prepare hidapi
|
||||
env:
|
||||
HIDAPI_VER: 0.11.2
|
||||
run: |
|
||||
mkdir -p $DL_DIR && cd $DL_DIR
|
||||
wget "https://github.com/libusb/hidapi/archive/hidapi-${HIDAPI_VER}.tar.gz"
|
||||
tar -xzf hidapi-${HIDAPI_VER}.tar.gz
|
||||
cd hidapi-hidapi-${HIDAPI_VER}
|
||||
./bootstrap
|
||||
echo "HIDAPI_SRC=$PWD" >> $GITHUB_ENV
|
||||
- name: Prepare libftdi
|
||||
env:
|
||||
LIBFTDI_VER: 1.5
|
||||
run: |
|
||||
mkdir -p $DL_DIR && cd $DL_DIR
|
||||
wget "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-${LIBFTDI_VER}.tar.bz2"
|
||||
tar -xjf libftdi1-${LIBFTDI_VER}.tar.bz2
|
||||
echo "LIBFTDI_SRC=$PWD/libftdi1-${LIBFTDI_VER}" >> $GITHUB_ENV
|
||||
- name: Prepare capstone
|
||||
env:
|
||||
CAPSTONE_VER: 4.0.2
|
||||
run: |
|
||||
mkdir -p $DL_DIR && cd $DL_DIR
|
||||
CAPSTONE_NAME=${CAPSTONE_VER}
|
||||
CAPSTONE_FOLDER=capstone-${CAPSTONE_VER}
|
||||
wget "https://github.com/aquynh/capstone/archive/${CAPSTONE_VER}.tar.gz"
|
||||
tar -xzf ${CAPSTONE_VER}.tar.gz
|
||||
echo "CAPSTONE_SRC=$PWD/capstone-${CAPSTONE_VER}" >> $GITHUB_ENV
|
||||
- name: Package OpenOCD for windows
|
||||
env:
|
||||
MAKE_JOBS: 2
|
||||
HOST: i686-w64-mingw32
|
||||
LIBUSB1_CONFIG: --enable-shared --disable-static
|
||||
HIDAPI_CONFIG: --enable-shared --disable-static --disable-testgui
|
||||
LIBFTDI_CONFIG: -DSTATICLIBS=OFF -DEXAMPLES=OFF -DFTDI_EEPROM=OFF
|
||||
CAPSTONE_CONFIG: "CAPSTONE_BUILD_CORE_ONLY=yes CAPSTONE_STATIC=yes CAPSTONE_SHARED=no"
|
||||
run: |
|
||||
# check if there is tag pointing at HEAD, otherwise take the HEAD SHA-1 as OPENOCD_TAG
|
||||
OPENOCD_TAG="`git tag --points-at HEAD`"
|
||||
[ -z $OPENOCD_TAG ] && OPENOCD_TAG="`git rev-parse --short HEAD`"
|
||||
# check if there is tag pointing at HEAD, if so the release will have the same name as the tag,
|
||||
# otherwise it will be named 'latest'
|
||||
RELEASE_NAME="`git tag --points-at HEAD`"
|
||||
[ -z $RELEASE_NAME ] && RELEASE_NAME="latest"
|
||||
[[ $RELEASE_NAME = "latest" ]] && IS_PRE_RELEASE="true" || IS_PRE_RELEASE="false"
|
||||
# set env and call cross-build.sh
|
||||
export OPENOCD_TAG=$OPENOCD_TAG
|
||||
export OPENOCD_SRC=$PWD
|
||||
export OPENOCD_CONFIG=""
|
||||
mkdir -p $BUILD_DIR && cd $BUILD_DIR
|
||||
bash $OPENOCD_SRC/contrib/cross-build.sh $HOST
|
||||
# add missing dlls
|
||||
cd $HOST-root/usr
|
||||
cp `$HOST-gcc --print-file-name=libwinpthread-1.dll` ./bin/
|
||||
cp `$HOST-gcc --print-file-name=libgcc_s_sjlj-1.dll` ./bin/
|
||||
# prepare the artifact
|
||||
ARTIFACT="openocd-${OPENOCD_TAG}-${HOST}.tar.gz"
|
||||
tar -czf $ARTIFACT *
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "IS_PRE_RELEASE=$IS_PRE_RELEASE" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_PATH=$PWD/$ARTIFACT" >> $GITHUB_ENV
|
||||
- name: Publish OpenOCD packaged for windows
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: ${{ env.ARTIFACT_PATH }}
|
||||
- name: Delete 'latest' Release
|
||||
uses: dev-drprasad/delete-tag-and-release@v0.2.0
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: ${{ env.RELEASE_NAME }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ env.RELEASE_NAME }}
|
||||
commit: ${{ github.sha }}
|
||||
draft: false
|
||||
artifacts: ${{ env.ARTIFACT_PATH }}
|
||||
prerelease: ${{ env.IS_PRE_RELEASE }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
60
.gitignore
vendored
60
.gitignore
vendored
@@ -3,35 +3,17 @@
|
||||
# build output
|
||||
.libs
|
||||
.deps
|
||||
.dirstamp
|
||||
*.o
|
||||
*.o.??????
|
||||
*.a
|
||||
*.lo
|
||||
*.la
|
||||
*.in
|
||||
|
||||
# generated source files
|
||||
src/jtag/minidriver_imp.h
|
||||
src/jtag/jtag_minidriver.h
|
||||
|
||||
# OpenULINK driver files generated by SDCC
|
||||
src/jtag/drivers/OpenULINK/*.rel
|
||||
src/jtag/drivers/OpenULINK/*.asm
|
||||
src/jtag/drivers/OpenULINK/*.lst
|
||||
src/jtag/drivers/OpenULINK/*.sym
|
||||
src/jtag/drivers/OpenULINK/*.map
|
||||
src/jtag/drivers/OpenULINK/*.mem
|
||||
src/jtag/drivers/OpenULINK/*.lk
|
||||
src/jtag/drivers/OpenULINK/*.ihx
|
||||
src/jtag/drivers/OpenULINK/*.rst
|
||||
|
||||
# editor files
|
||||
*.swp
|
||||
|
||||
src/startup.tcl
|
||||
startup_tcl.inc
|
||||
xscale_debug.inc
|
||||
startup_tcl.c
|
||||
xscale_debug.h
|
||||
|
||||
bin2char
|
||||
bin2char.exe
|
||||
@@ -52,54 +34,32 @@ doc/openocd.pg
|
||||
doc/openocd.toc
|
||||
doc/openocd.tp
|
||||
doc/openocd.vr
|
||||
doc/texinfo.tex
|
||||
doc/version.texi
|
||||
src/openocd
|
||||
src/openocd.exe
|
||||
|
||||
# configure/autotools output
|
||||
/build-aux/
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
compile
|
||||
config.*
|
||||
configure
|
||||
depcomp
|
||||
doxygen
|
||||
doxygen.log
|
||||
Doxyfile
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
Makefile
|
||||
!contrib/loaders/**/Makefile
|
||||
mdate-sh
|
||||
missing
|
||||
stamp-h1
|
||||
stamp-vti
|
||||
INSTALL
|
||||
NOTES
|
||||
|
||||
# coexist with quilt
|
||||
patches
|
||||
*.patch
|
||||
|
||||
# Eclipse stuff
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
|
||||
# Emacs temp files
|
||||
*~
|
||||
|
||||
# Emacs TAGS file
|
||||
TAGS
|
||||
|
||||
# CScope database files
|
||||
*cscope.out
|
||||
|
||||
# ctags tag files
|
||||
tags
|
||||
|
||||
# GNU Global tag files
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
|
||||
# checkpatch script files
|
||||
.checkpatch-camelcase.*
|
||||
|
||||
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -1,9 +1,3 @@
|
||||
[submodule "tools/git2cl"]
|
||||
path = tools/git2cl
|
||||
url = https://git.savannah.nongnu.org/git/git2cl.git
|
||||
[submodule "jimtcl"]
|
||||
path = jimtcl
|
||||
url = https://github.com/msteveb/jimtcl.git
|
||||
[submodule "src/jtag/drivers/libjaylink"]
|
||||
path = src/jtag/drivers/libjaylink
|
||||
url = https://gitlab.zapb.de/libjaylink/libjaylink.git
|
||||
url = git://repo.or.cz/git2cl.git
|
||||
|
||||
91
.travis.yml
91
.travis.yml
@@ -1,91 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright Marek Vasut <marex@denx.de>
|
||||
|
||||
# OpenOCD on Travis CI - https://travis-ci.org/
|
||||
|
||||
sudo: required
|
||||
dist: bionic
|
||||
|
||||
arch:
|
||||
- amd64
|
||||
- arm64
|
||||
- ppc64le
|
||||
- s390x
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
packages:
|
||||
- libftdi-dev
|
||||
- libhidapi-dev
|
||||
- libjaylink-dev
|
||||
|
||||
env:
|
||||
- CC=gcc-9
|
||||
- CC=clang-9
|
||||
|
||||
language: c
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
autocrlf: input
|
||||
|
||||
script:
|
||||
- $mingw64 ${CC} --version
|
||||
- $mingw64 env
|
||||
- $mingw64 ./bootstrap
|
||||
- $mingw64 ./configure
|
||||
- $mingw64 make
|
||||
|
||||
before_install:
|
||||
- |-
|
||||
case $TRAVIS_OS_NAME in
|
||||
linux)
|
||||
sudo apt install ${CC} libusb-1.0-0-dev
|
||||
;;
|
||||
osx)
|
||||
brew install libtool automake libusb libusb-compat hidapi libftdi
|
||||
;;
|
||||
windows)
|
||||
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
|
||||
choco uninstall -y mingw
|
||||
choco upgrade --no-progress -y msys2
|
||||
export msys2='cmd //C RefreshEnv.cmd '
|
||||
export msys2+='& set MSYS=winsymlinks:nativestrict '
|
||||
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
||||
export mingw64="$msys2 -mingw64 -full-path -here -c \$\* --"
|
||||
export msys2+=" -msys2 -c \$\* --"
|
||||
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain autoconf autoconf-archive automake automake-wrapper binutils gcc gettext git libtool m4 make pkg-config tcl texinfo mingw-w64-x86_64-libusb mingw-w64-x86_64-libusb-compat-git mingw-w64-x86_64-libjaylink-git mingw-w64-x86_64-libftdi mingw-w64-x86_64-hidapi mingw-w64-x86_64-clang
|
||||
## FIXME: Also build for i686?
|
||||
## Install more MSYS2 packages from https://packages.msys2.org/base here
|
||||
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
|
||||
export PATH=/C/tools/msys64/mingw64/bin:$PATH
|
||||
export MAKE=mingw32-make # so that Autotools can find it
|
||||
;;
|
||||
esac
|
||||
|
||||
before_cache:
|
||||
- |-
|
||||
case $TRAVIS_OS_NAME in
|
||||
windows)
|
||||
# https://unix.stackexchange.com/a/137322/107554
|
||||
$msys2 pacman --sync --clean --noconfirm
|
||||
;;
|
||||
esac
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/AppData/Local/Temp/chocolatey
|
||||
- /C/tools/msys64
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
env:
|
||||
- CC=clang
|
||||
- os: windows
|
||||
env:
|
||||
- CC=gcc
|
||||
18
BUGS
18
BUGS
@@ -1,16 +1,10 @@
|
||||
// This file is part of the Doxygen Developer Manual
|
||||
// This file is part of the Doyxgen Developer Manual
|
||||
/** @page bugs Bug Reporting
|
||||
|
||||
Please report bugs by subscribing to the OpenOCD mailing list and
|
||||
posting a message with your report:
|
||||
|
||||
openocd-devel@lists.sourceforge.net
|
||||
|
||||
Also, please check the bug database to see if a ticket for
|
||||
the bug has already been opened. You might be asked to open
|
||||
such a ticket, or to update an existing ticket with more data.
|
||||
|
||||
http://bugs.openocd.org/
|
||||
openocd-development@lists.berlios.de
|
||||
|
||||
To minimize work for OpenOCD developers, you should try to include
|
||||
all of the information listed below. If you feel that some of the
|
||||
@@ -28,12 +22,12 @@ that may be important.
|
||||
- If the report is for a regression:
|
||||
- Include logs for both working and broken versions.
|
||||
- Find the precise version that caused the regression by binary search.
|
||||
You can use "git bisect" to expedite this binary search:
|
||||
You can use "git bisect" to expedite this binary search:
|
||||
http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html
|
||||
|
||||
If possible, please develop and attach a patch that helps to expose or
|
||||
solve the reported problem. See the HACKING file for information
|
||||
about that process.
|
||||
solve the reported problem. See the PATCHES file for more information
|
||||
for that process.
|
||||
|
||||
Attach all files directly to your posting. The mailing list knows to
|
||||
transform attachments to links, but attachments must be less than 300KB
|
||||
@@ -42,7 +36,7 @@ in total.
|
||||
@section bugscrashdump Obtaining Crash Backtraces
|
||||
|
||||
If OpenOCD is crashing, there are two very effective things you can do to
|
||||
improve your chances of getting help on the development mailing list.
|
||||
improve your chances of getting help on the development mailing list.
|
||||
|
||||
Try to reproduce the problem using the dummy JTAG interface to allow other developers to replicate
|
||||
your problem robustly and use GDB to get a trace:@par
|
||||
|
||||
342
COPYING
342
COPYING
@@ -1,16 +1,340 @@
|
||||
OpenOCD is provided under:
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Being under the terms of the GNU General Public License version 2 or
|
||||
later, according with:
|
||||
Preamble
|
||||
|
||||
LICENSES/preferred/GPL-2.0
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
In addition, other licenses may also apply. Please see:
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
LICENSES/license-rules.txt
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
for more details.
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
All contributions to OpenOCD are subject to this COPYING file.
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
||||
42
Doxyfile.in
42
Doxyfile.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER =
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = doxygen
|
||||
OUTPUT_DIRECTORY =
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
@@ -216,7 +216,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
||||
# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
|
||||
# use: inc=Fortran f=C
|
||||
|
||||
EXTENSION_MAPPING = no_extension=C
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should
|
||||
@@ -307,13 +307,13 @@ EXTRACT_PRIVATE = NO
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_STATIC = NO
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||
# defined locally in source files will be included in the documentation.
|
||||
# If set to NO only classes defined in header files are included.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
|
||||
# This flag is only useful for Objective-C code. When set to YES local
|
||||
# methods, which are defined in the implementation section but not in
|
||||
@@ -384,7 +384,7 @@ HIDE_SCOPE_NAMES = NO
|
||||
# will put a list of the files that are included by a file in the documentation
|
||||
# of that file.
|
||||
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
|
||||
# is inserted in the documentation for inline members.
|
||||
@@ -403,7 +403,7 @@ SORT_MEMBER_DOCS = YES
|
||||
# by member name. If set to NO (the default) the members will appear in
|
||||
# declaration order.
|
||||
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
|
||||
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
|
||||
# hierarchy of group names into alphabetical order. If set to NO (the default)
|
||||
@@ -567,9 +567,9 @@ WARN_LOGFILE =
|
||||
INPUT = @srcdir@/doc/manual \
|
||||
@srcdir@/TODO \
|
||||
@srcdir@/BUGS \
|
||||
@srcdir@/HACKING \
|
||||
@srcdir@/PATCHES \
|
||||
@srcdir@/src \
|
||||
@builddir@/config.h
|
||||
@srcdir@/config.h
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
@@ -600,7 +600,7 @@ RECURSIVE = YES
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = @srcdir@/src/jtag/drivers/libjaylink
|
||||
EXCLUDE =
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
# directories that are symbolic links (a Unix filesystem feature) are excluded
|
||||
@@ -648,7 +648,7 @@ EXAMPLE_RECURSIVE = NO
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH = @srcdir@/doc/manual/images
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
@@ -692,13 +692,13 @@ SOURCE_BROWSER = YES
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
INLINE_SOURCES = YES
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||
# doxygen to hide any special comment blocks from generated source code
|
||||
# fragments. Normal C and C++ comments will always remain visible.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES
|
||||
# then for each documented function all documented
|
||||
@@ -764,13 +764,13 @@ IGNORE_PREFIX =
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = @doxygen_as_html@
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
HTML_OUTPUT = doxygen
|
||||
|
||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
|
||||
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
|
||||
@@ -981,7 +981,7 @@ FORMULA_FONTSIZE = 10
|
||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||
# generate Latex output.
|
||||
|
||||
GENERATE_LATEX = @doxygen_as_pdf@
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
@@ -992,7 +992,7 @@ LATEX_OUTPUT = latex
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked. If left blank `latex' will be used as the default command name.
|
||||
|
||||
LATEX_CMD_NAME = pdflatex
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
|
||||
# generate index for LaTeX. If left blank `makeindex' will be used as the
|
||||
@@ -1004,7 +1004,7 @@ MAKEINDEX_CMD_NAME = makeindex
|
||||
# LaTeX documents. This may be useful for small projects and may help to
|
||||
# save some trees in general.
|
||||
|
||||
COMPACT_LATEX = YES
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
@@ -1029,20 +1029,20 @@ LATEX_HEADER =
|
||||
# contain links (just like the HTML output) instead of page references
|
||||
# This makes the output suitable for online browsing using a pdf viewer.
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
PDF_HYPERLINKS = NO
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
|
||||
# plain latex in the generated Makefile. Set this option to YES to get a
|
||||
# higher quality PDF documentation.
|
||||
|
||||
USE_PDFLATEX = YES
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep
|
||||
# running if errors occur, instead of asking the user for help.
|
||||
# This option is also used when generating formulas in HTML.
|
||||
|
||||
LATEX_BATCHMODE = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
# If LATEX_HIDE_INDICES is set to YES then doxygen will not
|
||||
# include the index chapters (such as File Index, Compound Index, etc.)
|
||||
@@ -1234,7 +1234,7 @@ SEARCH_INCLUDES = YES
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH = @builddir@/src
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
|
||||
331
HACKING
331
HACKING
@@ -1,331 +0,0 @@
|
||||
// This file is part of the Doxygen Developer Manual
|
||||
/** @page patchguide Patch Guidelines
|
||||
|
||||
\attention You can't send patches to the mailing list anymore at all. Nowadays
|
||||
you are expected to send patches to the OpenOCD Gerrit GIT server for a
|
||||
review.
|
||||
|
||||
\attention If you already have a Gerrit account and want to try a
|
||||
different sign in method, please first sign in as usually, press your
|
||||
name in the upper-right corner, go to @a Settings, select @a
|
||||
Identities pane, press <em>Link Another Identity</em> button. In case
|
||||
you already have duplicated accounts, ask administrators for manual
|
||||
merging.
|
||||
|
||||
\attention If you're behind a corporate wall with http only access to the
|
||||
world, you can still use these instructions!
|
||||
|
||||
@section gerrit Submitting patches to the OpenOCD Gerrit server
|
||||
|
||||
OpenOCD is to some extent a "self service" open source project, so to
|
||||
contribute, you must follow the standard procedures to have the best
|
||||
possible chance to get your changes accepted.
|
||||
|
||||
The procedure to create a patch is essentially:
|
||||
|
||||
- make the changes
|
||||
- create a commit
|
||||
- send the changes to the Gerrit server for review
|
||||
- correct the patch and re-send it according to review feedback
|
||||
|
||||
Your patch (or commit) should be a "good patch": focus it on a single
|
||||
issue, and make it easily reviewable. Don't make
|
||||
it so large that it's hard to review; split large
|
||||
patches into smaller ones (this will also help
|
||||
to track down bugs later). All patches should
|
||||
be "clean", which includes preserving the existing
|
||||
coding style and updating documentation as needed. When adding a new
|
||||
command, the corresponding documentation should be added to
|
||||
@c doc/openocd.texi in the same commit. OpenOCD runs on both Little
|
||||
Endian and Big Endian hosts so the code can't count on specific byte
|
||||
ordering (in other words, must be endian-clean).
|
||||
|
||||
There are several additional methods of improving the quality of your
|
||||
patch:
|
||||
|
||||
- Runtime testing with Valgrind Memcheck
|
||||
|
||||
This helps to spot memory leaks, undefined behaviour due to
|
||||
uninitialized data or wrong indexing, memory corruption, etc.
|
||||
|
||||
- Clang Static Analyzer
|
||||
|
||||
Using this tool uncovers many different kinds of bugs in C code,
|
||||
with problematic execution paths fully explained. It is a part of
|
||||
standard Clang installation.
|
||||
|
||||
To generate a report, run this in the OpenOCD source directory:
|
||||
@code
|
||||
mkdir build-scanbuild; cd build-scanbuild
|
||||
scan-build ../configure
|
||||
scan-build make CFLAGS="-std=gnu99 -I. -I../../jimtcl"
|
||||
@endcode
|
||||
|
||||
- Runtime testing with sanitizers
|
||||
|
||||
Both GCC and LLVM/Clang include advanced instrumentation options to
|
||||
detect undefined behaviour and many kinds of memory
|
||||
errors. Available with @c -fsanitize=* command arguments.
|
||||
|
||||
Example usage:
|
||||
@code
|
||||
mkdir build-sanitizers; cd build-sanitizers
|
||||
../configure CC=clang CFLAGS="-fno-omit-frame-pointer \
|
||||
-fsanitize=address -fsanitize=undefined -ggdb3"
|
||||
make
|
||||
export ASAN_OPTIONS=detect_stack_use_after_return=1
|
||||
src/openocd -s ../tcl -f /path/to/openocd.cfg
|
||||
@endcode
|
||||
|
||||
Please consider performing these additional checks where appropriate
|
||||
(especially Clang Static Analyzer for big portions of new code) and
|
||||
mention the results (e.g. "Valgrind-clean, no new Clang analyzer
|
||||
warnings") in the commit message.
|
||||
|
||||
Say in the commit message if it's a bugfix (describe the bug) or a new
|
||||
feature. Don't expect patches to merge immediately
|
||||
for the next release. Be ready to rework patches
|
||||
in response to feedback.
|
||||
|
||||
Add yourself to the GPL copyright for non-trivial changes.
|
||||
|
||||
@section stepbystep Step by step procedure
|
||||
|
||||
-# Create a Gerrit account at: https://review.openocd.org
|
||||
- On subsequent sign ins, use the full URL prefaced with 'http://'
|
||||
For example: http://user_identifier.open_id_provider.com
|
||||
-# Add a username to your profile.
|
||||
After creating the Gerrit account and signing in, you will need to
|
||||
add a username to your profile. To do this, go to 'Settings', and
|
||||
add a username of your choice.
|
||||
Your username will be required in step 3 and substituted wherever
|
||||
the string 'USERNAME' is found.
|
||||
-# Create an SSH public key following the directions on github:
|
||||
https://help.github.com/articles/generating-ssh-keys . You can skip step 3
|
||||
(adding key to Github account) and 4 (testing) - these are useful only if
|
||||
you actually use Github or want to test whether the new key works fine.
|
||||
-# Add this new SSH key to your Gerrit account:
|
||||
go to 'Settings' > 'SSH Public Keys', paste the contents of
|
||||
~/.ssh/id_rsa.pub into the text field (if it's not visible click on
|
||||
'Add Key ...' button) and confirm by clicking 'Add' button.
|
||||
-# Clone the git repository, rather than just download the source:
|
||||
@code
|
||||
git clone git://git.code.sf.net/p/openocd/code openocd
|
||||
@endcode
|
||||
or if you have problems with the "git:" protocol, use
|
||||
the slower http protocol:
|
||||
@code
|
||||
git clone http://git.code.sf.net/p/openocd/code openocd
|
||||
@endcode
|
||||
-# Set up Gerrit with your local repository. All this does it
|
||||
to instruct git locally how to send off the changes.
|
||||
-# Add a new remote to git using Gerrit username:
|
||||
@code
|
||||
git remote add review ssh://USERNAME@review.openocd.org:29418/openocd.git
|
||||
git config remote.review.push HEAD:refs/for/master
|
||||
@endcode
|
||||
Or with http only:
|
||||
@code
|
||||
git remote add review https://USERNAME@review.openocd.org/p/openocd.git
|
||||
git config remote.review.push HEAD:refs/for/master
|
||||
@endcode
|
||||
The http password is configured from your gerrit settings - https://review.openocd.org/#/settings/http-password.
|
||||
\note If you want to simplify http access you can also add your http password to the url as follows:
|
||||
@code
|
||||
git remote add review https://USERNAME:PASSWORD@review.openocd.org/p/openocd.git
|
||||
@endcode
|
||||
\note All contributions should be pushed to @c refs/for/master on the
|
||||
Gerrit server, even if you plan to use several local branches for different
|
||||
topics. It is possible because @c for/master is not a traditional Git
|
||||
branch.
|
||||
-# You will need to install this hook, we will look into a better solution:
|
||||
@code
|
||||
scp -p -P 29418 USERNAME@review.openocd.org:hooks/commit-msg .git/hooks/
|
||||
@endcode
|
||||
Or with http only:
|
||||
@code
|
||||
wget https://review.openocd.org/tools/hooks/commit-msg
|
||||
mv commit-msg .git/hooks
|
||||
chmod +x .git/hooks/commit-msg
|
||||
@endcode
|
||||
\note A script exists to simplify the two items above. Execute:
|
||||
@code
|
||||
tools/initial.sh <username>
|
||||
@endcode
|
||||
With @<username@> being your Gerrit username.
|
||||
-# Set up git with your name and email:
|
||||
@code
|
||||
git config --global user.name "John Smith"
|
||||
git config --global user.email "john@smith.org"
|
||||
@endcode
|
||||
-# Work on your patches. Split the work into
|
||||
multiple small patches that can be reviewed and
|
||||
applied separately and safely to the OpenOCD
|
||||
repository.
|
||||
@code
|
||||
while(!done) {
|
||||
work - edit files using your favorite editor.
|
||||
run "git commit -s -a" to commit all changes.
|
||||
run tools/checkpatch.sh to verify your patch style is ok.
|
||||
}
|
||||
@endcode
|
||||
\note use "git add ." before commit to add new files.
|
||||
|
||||
\note check @ref checkpatch for hint about checkpatch script
|
||||
|
||||
Commit message template, notice the short first line.
|
||||
The field '<c>specify touched area</c>'
|
||||
should identify the main part or subsystem the patch touches.
|
||||
@code{.unparsed}
|
||||
specify touched area: short comment
|
||||
<blank line>
|
||||
Longer comments over several lines, explaining (where applicable) the
|
||||
reason for the patch and the general idea the solution is based on,
|
||||
any major design decisions, etc. Limit each comment line's length to 75
|
||||
characters; since 75 it's too short for a URL, you can put the URL in a
|
||||
separate line preceded by 'Link: '.
|
||||
<blank line>
|
||||
Signed-off-by: ...
|
||||
@endcode
|
||||
Examples:
|
||||
@code{.unparsed}
|
||||
flash/nor/atsame5: add SAME59 support
|
||||
|
||||
Add new device ID
|
||||
@endcode
|
||||
@code{.unparsed}
|
||||
flash/nor: flash driver for XYZ123
|
||||
|
||||
Add new flash driver for internal flash of ...
|
||||
@endcode
|
||||
@code{.unparsed}
|
||||
target/cortex_m: fix segmentation fault in cmd 'soft_reset_halt'
|
||||
|
||||
soft_reset_halt command failed reproducibly under following conditions: ...
|
||||
Test for NULL pointer and return error ...
|
||||
|
||||
Reported-by: John Reporter <rep9876@gmail.com>
|
||||
Fixes: 123456789abc ("target: the commit where the problem started")
|
||||
BugLink: https://sourceforge.net/p/openocd/tickets/999/
|
||||
@endcode
|
||||
@code{.unparsed}
|
||||
doc: fix typos
|
||||
@endcode
|
||||
See "git log" for more examples.
|
||||
|
||||
-# Next you need to make sure that your patches
|
||||
are on top of the latest stuff on the server and
|
||||
that there are no conflicts:
|
||||
@code
|
||||
git pull --rebase origin master
|
||||
@endcode
|
||||
-# Send the patches to the Gerrit server for review:
|
||||
@code
|
||||
git push review
|
||||
@endcode
|
||||
-# Forgot something, want to add more? Just make the changes and do:
|
||||
@code
|
||||
git commit --amend
|
||||
git push review
|
||||
@endcode
|
||||
|
||||
Further reading: http://www.coreboot.org/Git
|
||||
|
||||
@section checkpatch About checkpatch script
|
||||
|
||||
OpenOCD source code includes the script checkpatch to let developers to
|
||||
verify their patches before submitting them for review (see @ref gerrit).
|
||||
|
||||
Every patch for OpenOCD project that is submitted for review on Gerrit
|
||||
is tested by Jenkins. Jenkins will run the checkpatch script to analyze
|
||||
each patch.
|
||||
If the script highlights either errors or warnings, Gerrit will add the
|
||||
score "-1" to the patch and maintainers will probably ignore the patch,
|
||||
waiting for the developer to send a fixed version.
|
||||
|
||||
The script checkpatch verifies the SPDX tag for new files against a very
|
||||
short list of license tags.
|
||||
If the license of your contribution is not listed there, but compatible
|
||||
with OpenOCD license, please alert the maintainers or add the missing
|
||||
license in the first patch of your patch series.
|
||||
|
||||
The script checkpatch has been originally developed for the Linux kernel
|
||||
source code, thus includes specific tests and checks related to Linux
|
||||
coding style and to Linux code structure. While the script has been
|
||||
adapted for OpenOCD specificities, it still includes some Linux related
|
||||
test. It is then possible that it triggers sometimes some <em>false
|
||||
positive</em>!
|
||||
|
||||
If you think that the error identified by checkpatch is a false
|
||||
positive, please report it to the openocd-devel mailing list or prepare
|
||||
a patch for fixing checkpatch and send it to Gerrit for review.
|
||||
|
||||
\attention The procedure below is allowed only for <em>exceptional
|
||||
cases</em>. Do not use it to submit normal patches.
|
||||
|
||||
There are <em>exceptional cases</em> in which you need to skip some of
|
||||
the tests from checkpatch in order to pass the approval from Gerrit.
|
||||
|
||||
For example, a patch that modify one line inside a big comment block
|
||||
will not show the beginning or the end of the comment block. This can
|
||||
prevent checkpatch to detect the comment block. Checkpatch can wrongly
|
||||
consider the modified comment line as a code line, triggering a set of
|
||||
false errors.
|
||||
|
||||
Only for <em>exceptional cases</em>, it is allowed to submit patches
|
||||
to Gerrit with the special field 'Checkpatch-ignore:' in the commit
|
||||
message. This field will cause checkpatch to ignore the error types
|
||||
listed in the field, only for the patch itself.
|
||||
The error type is printed by checkpatch on failure.
|
||||
For example the names of Windows APIs mix lower and upper case chars,
|
||||
in violation of OpenOCD coding style, triggering a 'CAMELCASE' error:
|
||||
@code
|
||||
CHECK:CAMELCASE: Avoid CamelCase: <WSAGetLastError>
|
||||
#96105: FILE: src/helper/log.c:505:
|
||||
+ error_code = WSAGetLastError();
|
||||
@endcode
|
||||
Adding in the commit message of the patch the line:
|
||||
@code
|
||||
Checkpatch-ignore: CAMELCASE
|
||||
@endcode
|
||||
will force checkpatch to ignore the CAMELCASE error.
|
||||
|
||||
@section timeline When can I expect my contribution to be committed?
|
||||
|
||||
The code review is intended to take as long as a week or two to allow
|
||||
maintainers and contributors who work on OpenOCD only in their spare
|
||||
time opportunity to perform a review and raise objections.
|
||||
|
||||
With Gerrit much of the urgency of getting things committed has been
|
||||
removed as the work in progress is safely stored in Gerrit and
|
||||
available if someone needs to build on your work before it is
|
||||
submitted to the official repository.
|
||||
|
||||
Another factor that contributes to the desire for longer cool-off
|
||||
times (the time a patch lies around without any further changes or
|
||||
comments), it means that the chances of quality regression on the
|
||||
master branch will be much reduced.
|
||||
|
||||
If a contributor pushes a patch, it is considered good form if another
|
||||
contributor actually approves and submits that patch.
|
||||
|
||||
It should be noted that a negative review in Gerrit ("-1" or "-2") may (but does
|
||||
not have to) be disregarded if all conditions listed below are met:
|
||||
|
||||
- the concerns raised in the review have been addressed (or explained),
|
||||
- reviewer does not re-examine the change in a month,
|
||||
- reviewer does not answer e-mails for another month.
|
||||
|
||||
@section browsing Browsing Patches
|
||||
All OpenOCD patches can be reviewed <a href="https://review.openocd.org/">here</a>.
|
||||
|
||||
@section reviewing Reviewing Patches
|
||||
From the main <a href="https://review.openocd.org/#/q/status:open,n,z">Review
|
||||
page</a> select the patch you want to review and click on that patch. On the
|
||||
appearing page select the download method (top right). Apply the
|
||||
patch. After building and testing you can leave a note with the "Reply"
|
||||
button and mark the patch with -1, 0 and +1.
|
||||
*/
|
||||
/** @file
|
||||
This file contains the @ref patchguide page.
|
||||
*/
|
||||
@@ -1,20 +0,0 @@
|
||||
SPDX-Exception-Identifier: eCos-exception-2.0
|
||||
SPDX-URL: https://spdx.org/licenses/eCos-exception-2.0.html
|
||||
SPDX-Licenses: GPL-2.0-only, GPL-2.0-or-later
|
||||
Usage-Guide:
|
||||
This exception is used together with one of the above SPDX-Licenses.
|
||||
To use this exception add it with the keyword WITH to one of the
|
||||
identifiers in the SPDX-Licenses tag:
|
||||
SPDX-License-Identifier: <SPDX-License> WITH eCos-exception-2.0
|
||||
License-Text:
|
||||
|
||||
As a special exception, if other files instantiate templates or use
|
||||
macros or inline functions from this file, or you compile this
|
||||
file and link it with other works to produce a work based on this
|
||||
file, this file does not by itself cause the resulting work to be
|
||||
covered by the GNU General Public License. However the source code for
|
||||
this file must still be made available in accordance with section (3)
|
||||
of the GNU General Public License.
|
||||
|
||||
This exception does not invalidate any other reasons why a work based on
|
||||
this file might be covered by the GNU General Public License.
|
||||
@@ -1,275 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later OR GFDL-1.2-no-invariants-or-later
|
||||
|
||||
OpenOCD licensing rules
|
||||
=======================
|
||||
|
||||
The OpenOCD source code is provided under the terms of the GNU General
|
||||
Public License version 2 or later (GPL-2.0-or-later), as provided in
|
||||
LICENSES/preferred/GPL-2.0.
|
||||
|
||||
The OpenOCD documentation is provided under the terms of the GNU Free
|
||||
Documentation License version 1.2 or later without Invariant Sections
|
||||
(GFDL-1.2-no-invariants-or-later).
|
||||
|
||||
Few stand-alone applications coexist in the same code tree of OpenOCD
|
||||
and are provided under the terms of the GNU General Public License
|
||||
version 3 (GPL-3.0), as provided in LICENSES/stand-alone/GPL-3.0.
|
||||
|
||||
This documentation file provides a description of how each source file
|
||||
should be annotated to make its license clear and unambiguous.
|
||||
It doesn't replace the OpenOCD's license.
|
||||
|
||||
The license described in the COPYING file applies to the OpenOCD source
|
||||
as a whole, though individual source files can have a different license
|
||||
which is required to be compatible with the GPL-2.0:
|
||||
|
||||
GPL-1.0-or-later : GNU General Public License v1.0 or later
|
||||
GPL-2.0-or-later : GNU General Public License v2.0 or later
|
||||
LGPL-2.0 : GNU Library General Public License v2 only
|
||||
LGPL-2.0-or-later : GNU Library General Public License v2 or later
|
||||
LGPL-2.1 : GNU Lesser General Public License v2.1 only
|
||||
LGPL-2.1-or-later : GNU Lesser General Public License v2.1 or later
|
||||
|
||||
Aside from that, individual files can be provided under a dual license,
|
||||
e.g. one of the compatible GPL variants and alternatively under a
|
||||
permissive license like BSD, MIT etc.
|
||||
|
||||
The common way of expressing the license of a source file is to add the
|
||||
matching boilerplate text into the top comment of the file. Due to
|
||||
formatting, typos etc. these "boilerplates" are hard to validate for
|
||||
tools which are used in the context of license compliance.
|
||||
|
||||
An alternative to boilerplate text is the use of Software Package Data
|
||||
Exchange (SPDX) license identifiers in each source file. SPDX license
|
||||
identifiers are machine parsable and precise shorthands for the license
|
||||
under which the content of the file is contributed. SPDX license
|
||||
identifiers are managed by the SPDX Workgroup at the Linux Foundation and
|
||||
have been agreed on by partners throughout the industry, tool vendors, and
|
||||
legal teams. For further information see https://spdx.org/
|
||||
|
||||
OpenOCD requires the precise SPDX identifier in all source files.
|
||||
The valid identifiers used in OpenOCD are explained in the section
|
||||
`License identifiers` and have been retrieved from the official SPDX
|
||||
license list at https://spdx.org/licenses/ along with the license texts.
|
||||
|
||||
License identifier syntax
|
||||
-------------------------
|
||||
|
||||
1. Placement:
|
||||
|
||||
The SPDX license identifier in OpenOCD files shall be added at the
|
||||
first possible line in a file which can contain a comment. For the
|
||||
majority of files this is the first line, except for scripts which
|
||||
require the '#!PATH_TO_INTERPRETER' in the first line. For those
|
||||
scripts the SPDX identifier goes into the second line.
|
||||
|
||||
2. Style:
|
||||
|
||||
The SPDX license identifier is added in form of a comment. The comment
|
||||
style depends on the file type::
|
||||
|
||||
C source: // SPDX-License-Identifier: <SPDX License Expression>
|
||||
C header: /* SPDX-License-Identifier: <SPDX License Expression> */
|
||||
ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
|
||||
makefiles: # SPDX-License-Identifier: <SPDX License Expression>
|
||||
scripts: # SPDX-License-Identifier: <SPDX License Expression>
|
||||
texinfo: @c SPDX-License-Identifier: <SPDX License Expression>
|
||||
text: # SPDX-License-Identifier: <SPDX License Expression>
|
||||
|
||||
If a specific tool cannot handle the standard comment style, then the
|
||||
appropriate comment mechanism which the tool accepts shall be used. This
|
||||
is the reason for having the "/\* \*/" style comment in C header
|
||||
files. There was build breakage observed with generated .lds files where
|
||||
'ld' failed to parse the C++ comment. This has been fixed by now, but
|
||||
there are still older assembler tools which cannot handle C++ style
|
||||
comments.
|
||||
|
||||
3. Syntax:
|
||||
|
||||
A <SPDX License Expression> is either an SPDX short form license
|
||||
identifier found on the SPDX License List, or the combination of two
|
||||
SPDX short form license identifiers separated by "WITH" when a license
|
||||
exception applies. When multiple licenses apply, an expression consists
|
||||
of keywords "AND", "OR" separating sub-expressions and surrounded by
|
||||
"(", ")" .
|
||||
|
||||
License identifiers for licenses like [L]GPL with the 'or later' option
|
||||
are constructed by using a "-or-later":
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
WITH should be used when there is a modifier to a license needed.
|
||||
Exceptions can only be used with particular License identifiers. The
|
||||
valid License identifiers are listed in the tags of the exception text
|
||||
file.
|
||||
|
||||
OR should be used if the file is dual licensed and only one license is
|
||||
to be selected. For example, some source files are available under dual
|
||||
licenses:
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-1-Clause
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
|
||||
|
||||
AND should be used if the file has multiple licenses whose terms all
|
||||
apply to use the file. For example, if code is inherited from another
|
||||
project and permission has been given to put it in OpenOCD, but the
|
||||
original license terms need to remain in effect::
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later AND MIT
|
||||
|
||||
License identifiers
|
||||
-------------------
|
||||
|
||||
The licenses currently used, as well as the licenses for code added to
|
||||
OpenOCD, can be broken down into:
|
||||
|
||||
1. `Preferred licenses`:
|
||||
|
||||
Whenever possible these licenses should be used as they are known to be
|
||||
fully compatible and widely used. These licenses are available from the
|
||||
directory:
|
||||
|
||||
LICENSES/preferred/
|
||||
|
||||
in the OpenOCD source tree.
|
||||
|
||||
The files in this directory contain the full license text and
|
||||
`Metatags`. The file names are identical to the SPDX license
|
||||
identifier which shall be used for the license in source files.
|
||||
|
||||
Examples:
|
||||
|
||||
LICENSES/preferred/GPL-2.0
|
||||
|
||||
Contains the GPL version 2 license text and the required metatags.
|
||||
|
||||
`Metatags`:
|
||||
|
||||
The following meta tags must be available in a license file:
|
||||
|
||||
- Valid-License-Identifier:
|
||||
|
||||
One or more lines which declare which License Identifiers are valid
|
||||
inside the project to reference this particular license text. Usually
|
||||
this is a single valid identifier, but e.g. for licenses with the 'or
|
||||
later' options two identifiers are valid.
|
||||
|
||||
- SPDX-URL:
|
||||
|
||||
The URL of the SPDX page which contains additional information related
|
||||
to the license.
|
||||
|
||||
- Usage-Guidance:
|
||||
|
||||
Freeform text for usage advice. The text must include correct examples
|
||||
for the SPDX license identifiers as they should be put into source
|
||||
files according to the `License identifier syntax` guidelines.
|
||||
|
||||
- License-Text:
|
||||
|
||||
All text after this tag is treated as the original license text
|
||||
|
||||
File format examples::
|
||||
|
||||
Valid-License-Identifier: GPL-2.0
|
||||
Valid-License-Identifier: GPL-2.0-only
|
||||
Valid-License-Identifier: GPL-2.0-or-later
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU General Public License (GPL) version 2 only' use:
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
or
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
For 'GNU General Public License (GPL) version 2 or any later version' use:
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
License-Text:
|
||||
Full license text
|
||||
|
||||
2. Exceptions:
|
||||
|
||||
Some licenses can be amended with exceptions which grant certain rights
|
||||
which the original license does not. These exceptions are available
|
||||
from the directory::
|
||||
|
||||
LICENSES/exceptions/
|
||||
|
||||
in the OpenOCD source tree. The files in this directory contain the full
|
||||
exception text and the required `Exception Metatags`_.
|
||||
|
||||
Examples::
|
||||
|
||||
LICENSES/exceptions/eCos-exception-2.0
|
||||
|
||||
Exception Metatags:
|
||||
|
||||
The following meta tags must be available in an exception file:
|
||||
|
||||
- SPDX-Exception-Identifier:
|
||||
|
||||
One exception identifier which can be used with SPDX license
|
||||
identifiers.
|
||||
|
||||
- SPDX-URL:
|
||||
|
||||
The URL of the SPDX page which contains additional information related
|
||||
to the exception.
|
||||
|
||||
- SPDX-Licenses:
|
||||
|
||||
A comma separated list of SPDX license identifiers for which the
|
||||
exception can be used.
|
||||
|
||||
- Usage-Guidance:
|
||||
|
||||
Freeform text for usage advice. The text must be followed by correct
|
||||
examples for the SPDX license identifiers as they should be put into
|
||||
source files according to the `License identifier syntax`_ guidelines.
|
||||
|
||||
- Exception-Text:
|
||||
|
||||
All text after this tag is treated as the original exception text
|
||||
|
||||
File format examples::
|
||||
|
||||
SPDX-Exception-Identifier: eCos-exception-2.0
|
||||
SPDX-URL: https://spdx.org/licenses/eCos-exception-2.0.html
|
||||
SPDX-Licenses: GPL-2.0-only, GPL-2.0-or-later
|
||||
Usage-Guide:
|
||||
This exception is used together with one of the above SPDX-Licenses.
|
||||
To use this exception add it with the keyword WITH to one of the
|
||||
identifiers in the SPDX-Licenses tag:
|
||||
SPDX-License-Identifier: <SPDX-License> WITH eCos-exception-2.0
|
||||
License-Text:
|
||||
Full license text
|
||||
|
||||
3. Stand-alone licenses:
|
||||
|
||||
These licenses should only be used for stand-alone applications that are
|
||||
distributed with OpenOCD but are not included in the OpenOCD binary.
|
||||
These licenses are available from the directory:
|
||||
|
||||
LICENSES/stand-alone/
|
||||
|
||||
in the OpenOCD source tree.
|
||||
|
||||
Examples:
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
The format and requirements of the license files in the other sub-directories
|
||||
of directory
|
||||
|
||||
LICENSES
|
||||
|
||||
have to follow the same format and requirements of the `Preferred licenses`.
|
||||
|
||||
All SPDX license identifiers and exceptions must have a corresponding file
|
||||
in the LICENSES subdirectories. This is required to allow tool
|
||||
verification (e.g. checkpatch.pl) and to have the licenses ready to read
|
||||
and extract right from the source, which is recommended by various FOSS
|
||||
organizations, e.g. the `FSFE REUSE initiative <https://reuse.software/>`.
|
||||
@@ -1,28 +0,0 @@
|
||||
Valid-License-Identifier: BSD-1-Clause
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-1-Clause.html
|
||||
Usage-Guide:
|
||||
To use the BSD 1-clause License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,32 +0,0 @@
|
||||
Valid-License-Identifier: BSD-2-Clause
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html
|
||||
Usage-Guide:
|
||||
To use the BSD 2-clause "Simplified" License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,37 +0,0 @@
|
||||
Valid-License-Identifier: BSD-2-Clause-Views
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-2-Clause-Views.html
|
||||
Usage-Guide:
|
||||
To use the BSD 2-clause with views sentence License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-2-Clause-Views
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation
|
||||
are those of the authors and should not be interpreted as representing
|
||||
official policies, either expressed or implied, of the copyright holders
|
||||
or contributors.
|
||||
@@ -1,36 +0,0 @@
|
||||
Valid-License-Identifier: BSD-3-Clause
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html
|
||||
Usage-Guide:
|
||||
To use the BSD 3-clause "New" or "Revised" License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,32 +0,0 @@
|
||||
Valid-License-Identifier: BSD-Source-Code
|
||||
SPDX-URL: https://spdx.org/licenses/BSD-Source-Code.html
|
||||
Usage-Guide:
|
||||
To use the BSD Source Code Attribution License put the following SPDX
|
||||
tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: BSD-Source-Code
|
||||
License-Text:
|
||||
|
||||
Copyright (c) <year> <owner> . All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,412 +0,0 @@
|
||||
Valid-License-Identifier: GPL-2.0-or-later OR GFDL-1.2-no-invariants-or-later
|
||||
Valid-License-Identifier: GFDL-1.2-no-invariants-or-later
|
||||
SPDX-URL: https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.html
|
||||
Usage-Guide:
|
||||
The GNU Free Documentation License should only be used without
|
||||
Invariant Sections, Front-Cover Texts or Back-Cover Texts.
|
||||
It should not be used for new documents.
|
||||
To use the license in source code, put the following SPDX tag/value pair
|
||||
into a comment according to the placement guidelines in the licensing
|
||||
rules documentation:
|
||||
SPDX-License-Identifier: GPL-2.0-or-later OR GFDL-1.2-no-invariants-or-later
|
||||
or
|
||||
SPDX-License-Identifier: GFDL-1.2-no-invariants-or-later
|
||||
License-Text:
|
||||
|
||||
GNU Free Documentation License
|
||||
Version 1.2, November 2002
|
||||
|
||||
|
||||
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
0. PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document "free" in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of "copyleft", which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
|
||||
1. APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The "Document", below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as "you". You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A "Modified Version" of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A "Secondary Section" is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (Thus, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The "Cover Texts" are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A "Transparent" copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not "Transparent" is called "Opaque".
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML, PostScript or PDF designed for human modification. Examples of
|
||||
transparent image formats include PNG, XCF and JPG. Opaque formats
|
||||
include proprietary formats that can be read and edited only by
|
||||
proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML, PostScript or PDF produced by some word
|
||||
processors for output purposes only.
|
||||
|
||||
The "Title Page" means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, "Title Page" means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
A section "Entitled XYZ" means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as "Acknowledgements",
|
||||
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section "Entitled XYZ" according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
|
||||
2. VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
|
||||
3. COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
|
||||
4. MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
D. Preserve all the copyright notices of the Document.
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
H. Include an unaltered copy of this License.
|
||||
I. Preserve the section Entitled "History", Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled "History" in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the "History" section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
K. For any section Entitled "Acknowledgements" or "Dedications",
|
||||
Preserve the Title of the section, and preserve in the section all
|
||||
the substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
M. Delete any section Entitled "Endorsements". Such a section
|
||||
may not be included in the Modified Version.
|
||||
N. Do not retitle any existing section to be Entitled "Endorsements"
|
||||
or to conflict in title with any Invariant Section.
|
||||
O. Preserve any Warranty Disclaimers.
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled "Endorsements", provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
|
||||
5. COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled "History"
|
||||
in the various original documents, forming one section Entitled
|
||||
"History"; likewise combine any sections Entitled "Acknowledgements",
|
||||
and any sections Entitled "Dedications". You must delete all sections
|
||||
Entitled "Endorsements".
|
||||
|
||||
|
||||
6. COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
|
||||
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an "aggregate" if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
|
||||
8. TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled "Acknowledgements",
|
||||
"Dedications", or "History", the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
|
||||
9. TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
|
||||
10. FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
https://www.gnu.org/licenses/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
|
||||
ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
Copyright (c) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the "with...Texts." line with this:
|
||||
|
||||
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
@@ -1,355 +0,0 @@
|
||||
Valid-License-Identifier: GPL-2.0
|
||||
Valid-License-Identifier: GPL-2.0-only
|
||||
Valid-License-Identifier: GPL-2.0-or-later
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU General Public License (GPL) version 2 only' use:
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
or
|
||||
SPDX-License-Identifier: GPL-2.0-only
|
||||
For 'GNU General Public License (GPL) version 2 or any later version' use:
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,30 +0,0 @@
|
||||
Valid-License-Identifier: MIT
|
||||
SPDX-URL: https://spdx.org/licenses/MIT.html
|
||||
Usage-Guide:
|
||||
To use the MIT License put the following SPDX tag/value pair into a
|
||||
comment according to the placement guidelines in the licensing rules
|
||||
documentation:
|
||||
SPDX-License-Identifier: MIT
|
||||
License-Text:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,4 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later OR GFDL-1.2-no-invariants-or-later
|
||||
|
||||
The texinfo version of the license gfdl-1.2 is distributed in the
|
||||
file doc/fdl.texi .
|
||||
@@ -1,690 +0,0 @@
|
||||
Valid-License-Identifier: GPL-3.0
|
||||
Valid-License-Identifier: GPL-3.0-only
|
||||
Valid-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-3.0.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU General Public License (GPL) version 3 only' use:
|
||||
SPDX-License-Identifier: GPL-3.0
|
||||
or
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
For 'GNU General Public License (GPL) version 3 or any later version' use:
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
122
Makefile.am
122
Makefile.am
@@ -1,74 +1,19 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# not a GNU package. You can remove this line, if
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = gnu 1.6
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
# make sure we pass the correct jimtcl flags to distcheck
|
||||
DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
|
||||
|
||||
# do not run Jim Tcl tests (esp. during distcheck)
|
||||
check-recursive: SUBDIRS :=
|
||||
|
||||
nobase_dist_pkgdata_DATA = \
|
||||
contrib/libdcc/dcc_stdio.c \
|
||||
contrib/libdcc/dcc_stdio.h \
|
||||
contrib/libdcc/example.c \
|
||||
contrib/libdcc/README \
|
||||
contrib/60-openocd.rules
|
||||
contrib/openocd.udev
|
||||
|
||||
SUBDIRS =
|
||||
DIST_SUBDIRS =
|
||||
bin_PROGRAMS =
|
||||
noinst_LTLIBRARIES =
|
||||
info_TEXINFOS =
|
||||
dist_man_MANS =
|
||||
EXTRA_DIST =
|
||||
SUBDIRS = src doc
|
||||
|
||||
if INTERNAL_JIMTCL
|
||||
SUBDIRS += jimtcl
|
||||
DIST_SUBDIRS += jimtcl
|
||||
endif
|
||||
|
||||
# common flags used in openocd build
|
||||
AM_CFLAGS = $(GCC_WARNINGS)
|
||||
|
||||
AM_CPPFLAGS = $(HOST_CPPFLAGS)\
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
-DPKGDATADIR=\"$(pkgdatadir)\" \
|
||||
-DBINDIR=\"$(bindir)\"
|
||||
|
||||
if INTERNAL_JIMTCL
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
|
||||
-I$(top_builddir)/jimtcl
|
||||
endif
|
||||
EXTRA_DIST += \
|
||||
BUGS \
|
||||
HACKING \
|
||||
NEWTAPS \
|
||||
README.Windows \
|
||||
README.macOS \
|
||||
$(EXTRA_DIST_NEWS) \
|
||||
EXTRA_DIST = \
|
||||
Doxyfile.in \
|
||||
LICENSES/license-rules.txt \
|
||||
LICENSES/exceptions/eCos-exception-2.0 \
|
||||
LICENSES/preferred/BSD-1-Clause \
|
||||
LICENSES/preferred/BSD-2-Clause \
|
||||
LICENSES/preferred/BSD-2-Clause-Views \
|
||||
LICENSES/preferred/BSD-3-Clause \
|
||||
LICENSES/preferred/BSD-Source-Code \
|
||||
LICENSES/preferred/GFDL-1.2 \
|
||||
LICENSES/preferred/gfdl-1.2.texi.readme \
|
||||
LICENSES/preferred/GPL-2.0 \
|
||||
LICENSES/preferred/MIT \
|
||||
LICENSES/stand-alone/GPL-3.0 \
|
||||
tools/logger.pl \
|
||||
tools/rlink_make_speed_table \
|
||||
tools/st7_dtc_as \
|
||||
contrib
|
||||
tools/logger.pl
|
||||
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
@@ -80,37 +25,19 @@ Doxyfile: $(srcdir)/Doxyfile.in
|
||||
@( \
|
||||
echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
|
||||
echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
|
||||
sed -e 's,@srcdir\@,$(srcdir),' \
|
||||
-e 's,@builddir\@,$(builddir),' \
|
||||
-e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
|
||||
-e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
|
||||
sed -e 's,@srcdir\@,$(srcdir),' $< \
|
||||
) > $@
|
||||
|
||||
THE_MANUAL = doxygen/latex/refman.pdf
|
||||
|
||||
doxygen::
|
||||
$(MAKE) Doxyfile
|
||||
doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
|
||||
@if [ -f doxygen/latex/refman.tex ]; then \
|
||||
echo "Creating $(THE_MANUAL)..."; \
|
||||
$(MAKE) $(THE_MANUAL); \
|
||||
else \
|
||||
echo "Skipping Doxygen PDF..."; \
|
||||
fi
|
||||
|
||||
$(THE_MANUAL): %.pdf: %.tex
|
||||
-cd $$(dirname $*) && pdflatex $$(basename $*)
|
||||
-cd $$(dirname $*) && pdflatex $$(basename $*)
|
||||
|
||||
TCL_PATH = tcl
|
||||
# command to find paths of script files, relative to TCL_PATH
|
||||
TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
|
||||
TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \
|
||||
sed -e 's,^$(srcdir)/$(TCL_PATH),,'
|
||||
|
||||
dist-hook:
|
||||
if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
|
||||
git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
|
||||
fi
|
||||
for i in $$($(TCL_FILES)); do \
|
||||
j="$(distdir)/$(TCL_PATH)/$$i" && \
|
||||
mkdir -p "$$(dirname $$j)" && \
|
||||
@@ -127,32 +54,23 @@ install-data-hook:
|
||||
uninstall-hook:
|
||||
rm -rf $(DESTDIR)$(pkgdatadir)/scripts
|
||||
|
||||
|
||||
distclean-local:
|
||||
rm -rf Doxyfile doxygen
|
||||
rm -f $(srcdir)/jimtcl/configure.gnu
|
||||
|
||||
DISTCLEANFILES = doxygen.log
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
BUILT_SOURCES =
|
||||
CLEANFILES =
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
%D%/INSTALL \
|
||||
%D%/configure \
|
||||
%D%/Makefile.in \
|
||||
%D%/depcomp \
|
||||
%D%/config.guess \
|
||||
%D%/config.sub \
|
||||
%D%/config.h.in \
|
||||
%D%/config.h.in~ \
|
||||
%D%/compile \
|
||||
%D%/ltmain.sh \
|
||||
%D%/missing \
|
||||
%D%/aclocal.m4 \
|
||||
%D%/install-sh \
|
||||
%D%/texinfo.tex
|
||||
|
||||
include src/Makefile.am
|
||||
include doc/Makefile.am
|
||||
$(srcdir)/INSTALL \
|
||||
$(srcdir)/configure \
|
||||
$(srcdir)/Makefile.in \
|
||||
$(srcdir)/depcomp \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/config.h.in \
|
||||
$(srcdir)/config.h.in~ \
|
||||
$(srcdir)/compile \
|
||||
$(srcdir)/ltmain.sh \
|
||||
$(srcdir)/missing \
|
||||
$(srcdir)/aclocal.m4 \
|
||||
$(srcdir)/install-sh
|
||||
|
||||
172
NEWS
172
NEWS
@@ -1,132 +1,82 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
This file should include highlights of the changes made in the
|
||||
OpenOCD openocd-0.3.0 source archive release. See the repository
|
||||
history for details about what changed, including bugfixes and
|
||||
other issues not mentioned here.
|
||||
|
||||
JTAG Layer:
|
||||
* add default to adapter speed when unspecified (100 kHz)
|
||||
* AM335X gpio (BeagleBones) adapter driver
|
||||
* BCM2835 support for SWD
|
||||
* Cadence Virtual Debug (vdebug) adapter driver
|
||||
* CMSIS-DAP support for SWO and SWD multidrop
|
||||
* Espressif USB JTAG Programmer adapter driver
|
||||
* Remote bitbang support for Windows host
|
||||
* ST-LINK add TCP server support to adapter driver
|
||||
* SWD multidrop support
|
||||
FT2232H (high speed USB) support doesn't need separate configuration
|
||||
New FT2232H JTAG adapters: Amontec, Olimex, Signalyzer
|
||||
New reset_config options for SRST gating the JTAG clock (or not)
|
||||
TAP declaration no longer requires ircapture and mask attributes
|
||||
Scan chain setup should be more robust, with better diagnostics
|
||||
New TAP events:
|
||||
"post-reset" for TAP-invariant setup code (TAPs not usable yet)
|
||||
"setup" for use once TAPs are addressable (e.g. with ICEpick)
|
||||
Overridable Tcl "init_reset" and "jtag_init" procedures
|
||||
Simple "autoprobe" mechanism to help simplify server setup
|
||||
|
||||
Boundary Scan:
|
||||
SVF bugfixes ... parsing fixes, better STATE switch conformance
|
||||
XSVF bugfixes ... be more correct, handle Xilinx tool output
|
||||
|
||||
Target Layer:
|
||||
* aarch64: support watchpoints
|
||||
* arm: support independent TPIU and SWO for trace
|
||||
* arm adi v5: support Large Physical Address Extension
|
||||
* arm adi v6: support added, for jtag and swd transport
|
||||
* cortex_a: support watchpoints
|
||||
* elf 64bit load support
|
||||
* Espressif: support ESP32, ESP32-S2 and ESP32-S3 cores
|
||||
* semihosting: support user defined operations
|
||||
* Xtensa: support Xtensa LX architecture via JTAG and ADIv5 DAP
|
||||
Warn on use of obsolete numeric target IDs
|
||||
New commands for use with Cortex-M3 processors:
|
||||
"cortex_m3 disassemble" ... Thumb2 disassembly (UAL format)
|
||||
"cortex_m3 vector_catch" ... traps certain hardware faults
|
||||
without tying up breakpoint resources
|
||||
If you're willing to help debug it
|
||||
VERY EARLY Cortex-A8 and ARMv7A support
|
||||
Updated BeagleBoard.org hardware support
|
||||
you may need to explicitly "reset" after connect-to-Beagle
|
||||
New commands for use with XScale processors: "xscale vector_table"
|
||||
ARM
|
||||
bugfixes to single-stepping Thumb code
|
||||
ETM: unavailable registers are not listed
|
||||
ETB, ETM: report actual hardware status
|
||||
ARM9
|
||||
name change: "arm9 vector_catch" not "arm9tdmi vector_catch"
|
||||
ARM11
|
||||
single stepping support for i.MX31
|
||||
bugfix for missing "arm11" prefix on "arm11 memwrite ..."
|
||||
GDB support
|
||||
gdb_attach command is gone
|
||||
|
||||
Flash Layer:
|
||||
* Atmel/Microchip SAM E51G18A, E51G19A, R35J18B, LAN9255 support
|
||||
* GigaDevice GD32E23x, GD32F1x0/3x0, GD32VF103 support
|
||||
* Nuvoton NPCX series support
|
||||
* onsemi RSL10 support
|
||||
* Raspberry Pi Pico RP2040 support
|
||||
* ST BlueNRG-LPS support
|
||||
* ST STM32 G05x, G06x, G0Bx, G0Cx, U57x, U58x, WB1x, WL5x support
|
||||
* ST STM32 G0, G4, L4, L4+, L5, WB, WL OTP support
|
||||
The lpc2000 driver handles the new NXP LPC1700 (Cortex-M3) chips
|
||||
New drivers:
|
||||
lpc2900, for NXP LPC2900 chips (ARM968 based)
|
||||
mx3_nand, for imx31
|
||||
New "last" flag for NOR "flash erase_sector" and "flash protect"
|
||||
The "nand erase N" command now erases all of bank N
|
||||
Speed up davinci_nand by about 3x
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
* Ampere Computing eMAG8180, Altra ("Quicksilver") and Altra Max ("Mystique") board config
|
||||
* Cadence KC705 FPGA (Xtensa Development Platform) via JTAG and ADIv5 DAP board config
|
||||
* Digilent Nexys Video board config
|
||||
* Espressif ESP32 ETHERNET-KIT and WROVER-KIT board config
|
||||
* Espressif ESP32 via ESP USB Bridge generic board config
|
||||
* Espressif ESP32-S2 Kaluga 1 board config
|
||||
* Espressif ESP32-S2 with ESP USB Bridge board config
|
||||
* Espressif ESP32-S3 example board config
|
||||
* Kontron SMARC-sAL28 board config
|
||||
* LambdaConcept ECPIX-5 board config
|
||||
* Microchip ATSAMA5D27-SOM1-EK1 board config
|
||||
* Microchip EVB-LAN9255 board config
|
||||
* Microchip SAME51 Curiosity Nano board config
|
||||
* NXP FRDM-K64F, LS1046ARDB and LS1088ARDB board config
|
||||
* NXP RT6XX board config
|
||||
* Olimex H405 board config
|
||||
* Radiona ULX3S board config
|
||||
* Raspberry Pi 3 and Raspberry Pi 4 model B board config
|
||||
* Raspberry Pi Pico-Debug board config
|
||||
* Renesas R-Car V3U Falcon board config
|
||||
* ST BlueNRG-LPS steval-idb012v1 board config
|
||||
* ST NUCLEO-8S208RB board config
|
||||
* ST NUCLEO-G031K8, NUCLEO-G070RB, NUCLEO-G071RB board config
|
||||
* ST NUCLEO-G431KB, NUCLEO-G431RB, NUCLEO-G474RE board config
|
||||
* ST STM32MP13x-DK board config
|
||||
* TI AM625 EVM, AM642 EVM and AM654 EVM board config
|
||||
* TI J721E EVM, J721S2 EVM and J7200 EVM board config
|
||||
* Ampere Computing eMAG, Altra ("Quicksilver") and Altra Max ("Mystique") target config
|
||||
* Cadence Xtensa generic and Xtensa VDebug target config
|
||||
* Broadcom BCM2711, BCM2835, BCM2836 and BCM2837 target config
|
||||
* Espressif ESP32, ESP32-S2 and ESP32-S3 target config
|
||||
* Microchip ATSAMA5D2 series target config
|
||||
* NanoXplore NG-Ultra SoC target config
|
||||
* NXP IMX8QM target config
|
||||
* NXP LS1028A, LS1046A and LS1088A target config
|
||||
* NXP RT600 (Xtensa HiFi DSP) target config
|
||||
* onsemi RSL10 target config
|
||||
* Raspberry Pi Pico RP2040 target config
|
||||
* Renesas R8A779A0 V3U target config
|
||||
* Renesas RZ/Five target config
|
||||
* Renesas RZ/G2 MPU family target config
|
||||
* Rockchip RK3399 target config
|
||||
* ST BlueNRG-LPS target config
|
||||
* ST STM32MP13x target config
|
||||
* TI AM625, AM654, J721E and J721S2 target config
|
||||
* Ashling Opella-LD interface config
|
||||
* Aspeed AST2600 linuxgpiod based interface config
|
||||
* Blinkinlabs JTAG_Hat interface config
|
||||
* Cadence Virtual Debug (vdebug) interface config
|
||||
* Espressif ESP32-S2 Kaluga 1 board's interface config
|
||||
* Espressif USB Bridge jtag interface config
|
||||
* Infineon DAP miniWiggler V3 interface config
|
||||
* PLS SPC5 interface config
|
||||
* Tigard interface config
|
||||
* Lattice MachXO3 family FPGA config
|
||||
|
||||
Server Layer:
|
||||
* GDB: add per-target remote protocol extensions
|
||||
* GDB: more 'Z' packets support
|
||||
* IPDBG JtagHost server functionality
|
||||
* semihosting: I/O redirection to TCP server
|
||||
* telnet: support for command's autocomplete
|
||||
|
||||
RTOS:
|
||||
* 'none' rtos support
|
||||
* Zephyr rtos support
|
||||
Amontec JTAGkey2 support
|
||||
Cleanup and additions for the TI/Luminary Stellaris scripts
|
||||
LPC1768 target (and flash) support
|
||||
Keil MCB1700 eval board
|
||||
Samsung s3c2450
|
||||
Mini2440 board
|
||||
Numeric TAP and Target identifiers now trigger warnings
|
||||
PXA255 partially enumerates
|
||||
|
||||
Documentation:
|
||||
Capture more debugging and setup advice
|
||||
Notes on target source code changes that may help debugging
|
||||
|
||||
Build and Release:
|
||||
* Add json extension to jimtcl build
|
||||
* Drop dependency from libusb0
|
||||
* Drop repository repo.or.cz for submodules
|
||||
* Move gerrit to https://review.openocd.org/
|
||||
* Require autoconf 2.69 or newer
|
||||
* Update jep106 to revision JEP106BE
|
||||
* Update jimtcl to version 0.81
|
||||
* Update libjaylink to version 0.3.1
|
||||
* New configure flag '--enable-jimtcl-maintainer' for jimtcl build
|
||||
|
||||
|
||||
This release also contains a number of other important functional and
|
||||
cosmetic bugfixes. For more details about what has changed since the
|
||||
last release, see the git repository history:
|
||||
|
||||
http://sourceforge.net/p/openocd/code/ci/v0.12.0-rc1/log/?path=
|
||||
Repository moved from SVN at Berlios to GIT at SourceForge
|
||||
Clean builds on (32-bit) Cygwin
|
||||
Clean builds on 64-bit MinGW
|
||||
|
||||
For more details about what has changed since the last release,
|
||||
see the git repository history. With gitweb, you can browse that
|
||||
in various levels of detail.
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
the BUGS and PATCHES files in the source archive).
|
||||
|
||||
155
NEWS-0.10.0
155
NEWS-0.10.0
@@ -1,155 +0,0 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
|
||||
JTAG Layer:
|
||||
* New driver for J-Link adapters based on libjaylink
|
||||
(including support for FPGA configuration, SWO and EMUCOM)
|
||||
* FTDI improvements to work at 30MHz clock
|
||||
* BCM2835 native driver SWD and Raspberry Pi2 support
|
||||
* BCM2835 is set to 4ma drive, slow slew rate
|
||||
* ixo-usb-jtag (emulation of an Altera Bus Blaster I on
|
||||
Cypress FX2 IC) support
|
||||
* JTAG pass-through mode for CMSIS-DAP (including support for
|
||||
FPGA configuration)
|
||||
* OpenJTAG support for Cypress CY7C65215
|
||||
* connect_assert_srst support for SWD
|
||||
* Xilinx Virtex-II Series7 bitstream loading support
|
||||
* Use JEP106 data to decode IDs
|
||||
* Deprecated "ft2232" driver removed (use "ftdi" instead)
|
||||
* GPL-incompatible FTDI D2XX library support dropped (Presto,
|
||||
OpenJTAG and USB-Blaster I are using libftdi only now)
|
||||
* ZY1000 support dropped (unmaintained since long)
|
||||
* oocd_trace support dropped
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
* ARMv7-A, Cortex-M, Cortex-A/R important fixes and
|
||||
improvements (allowing e.g. simultaneous debugging of A8 and
|
||||
M3 cores, JTAG WAIT support etc.)
|
||||
* ARM Cortex-A,R allow interrupt disable during single-step
|
||||
(maskisr command)
|
||||
* Semihosting support for ARMv7-A
|
||||
* ARM Cortex-M7 support
|
||||
* Intel Quark mcu D2000 support
|
||||
* Freescale LS102x SAP support
|
||||
* ThreadX RTOS support on ARM926E-JS
|
||||
* Cortex-M RTOS stack alignment fixes
|
||||
* FreeRTOS FPU support
|
||||
* uC/OS-III RTOS support
|
||||
* bridging semihosting to GDB's File-I/O support
|
||||
* -defer-examine option added to target create command
|
||||
* verify_image_checksum command added
|
||||
|
||||
Flash Layer:
|
||||
* Atmel SAM4S, SAM4N, SAM4C support
|
||||
* Atmel SAMV, SAMS, SAME (Cortex-M7) support
|
||||
* Atmel AT91SAMD handle reset run/halt in DSU, other fixes
|
||||
* Atmel AT91SAML21, SAML22, SAMC20/SAMC21, SAMD09 support
|
||||
* ST STM32F4x support
|
||||
* ST STM32F74x/76x/77x, STM32L4 support
|
||||
* ST STM32L0 categories 1, 2 and 5 support
|
||||
* Kinetis K02, K21, K22, K24, K26, K63, K64, K66 support
|
||||
* Kinetis KE, KVx, K8x families support
|
||||
* Kinetis FlexNVM handling
|
||||
* Kinetis flash protection, security, mass_erase improvements
|
||||
* Infineon XMC4xxx family support
|
||||
* Infineon XMC1000 flash driver
|
||||
* Energy Micro EFM32 Happy Gecko support
|
||||
* Energy Micro EFM32 debug interface lock support
|
||||
* Analog Devices ADuCM360 support
|
||||
* Unified Nuvoton NuMicro flash driver
|
||||
* NIIET K1921VK01T (Cortex-M4) support
|
||||
* Nordic Semiconductor nRF51 improvements
|
||||
* Spansion FM4 flash (including MB9BFx64/x65, S6E2DH) driver
|
||||
* Ambiq Micro Apollo flash driver
|
||||
* PIC32MX new device IDs, 17x/27x flash support
|
||||
* read_bank() and verify_bank() NOR flash internal API to
|
||||
allow reading (and verifying) non-memory-mapped devices
|
||||
* JTAGSPI driver to access SPI NOR flashes via a trivial
|
||||
FPGA proxy
|
||||
* Milandr read/verify for Info memory support
|
||||
* Various discrete SPI NOR flashes support
|
||||
* CFI 16-bit flash reversed endianness support
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
* Digilent JTAG-HS2, JTAG-HS3 interfaces configs
|
||||
* FTDI UM232H module as JTAG interface config
|
||||
* 100ask's OpenJTAG interface config
|
||||
* MBFTDI interface config
|
||||
* XDS100v3 interface config
|
||||
* Freescale Vybrid VF6xx target config
|
||||
* EmCraft VF6 SOM and baseboard configs
|
||||
* Freescale SabreSD board config
|
||||
* Freescale VF65GS10 tower board config
|
||||
* Pipistrello Xilinx Spartan6 LX45 FPGA board config
|
||||
* miniSpartan6+ board config
|
||||
* Xilinx Kintex7 Development board config
|
||||
* Parallella-I board config
|
||||
* Digilent Atlys and Analog Discovery board configs
|
||||
* Numato Opsis board config
|
||||
* Xilinx Spartan 6 FPGA "Device DNA" reading support
|
||||
* Altera 10M50 FPGA (MAX10 family) target config
|
||||
* Altera EPM240 CPLD (MAXII family) target config
|
||||
* Marsohod2, Marsohod3 FPGA, Marsohod CPLD boards configs
|
||||
* Novena's integrated FPGA board config
|
||||
* XMOS XS1-XAU8A-10's ARM core config
|
||||
* XMOS xCORE-XA Core Module board config
|
||||
* Exynos5250 target config
|
||||
* Arndale board config
|
||||
* FM4 MB9BFxxx family configs
|
||||
* Spansion SK-FM4-U120-9B560 board config
|
||||
* Diolan LPC4357-DB1 board config
|
||||
* ST STM32F469 discovery board config
|
||||
* ST STM32F7-DISCO, STM327[4|5]6G-EVAL boards configs
|
||||
* ST STM32L4 discovery, NUCLEO L476RG, STM32F429I-DISC1 boards
|
||||
configs
|
||||
* Atheros AR2313, AR2315 targets config
|
||||
* Netgear WP102 board config
|
||||
* La Fonera FON2200 board config
|
||||
* Linksys WAG200G board config
|
||||
* LPC-Link2 board config
|
||||
* NXP LPC4370 target config
|
||||
* Atmel SAMV, SAMS, SAME target configs
|
||||
* Atmel SAM E70 Xplained, SAM V71 Xplained Ultra boards
|
||||
configs
|
||||
* Nordic nRF52 target config
|
||||
* Nordic nRF51-DK, nRF52-DK boards configs
|
||||
* Infineon XMC4700 Relax Kit, XMC4800 Relax EtherCAT Kit,
|
||||
XMC4300 Relax EtherCAT Kit boards configs
|
||||
* Renesas S7G2 target config
|
||||
* Renesas DK-S7G2 board config
|
||||
* Altera EP3C10 FPGA (Cyclone III family) target config
|
||||
* TI MSP432P4xx target config
|
||||
* Cypress PSoC 5LP target config
|
||||
* Analog Devices ADSP-SC58x target config (Cortex-A5 core only)
|
||||
|
||||
Server Layer:
|
||||
* tcl_trace command for async target trace output via Tcl RPC
|
||||
|
||||
Documentation:
|
||||
|
||||
Build and Release:
|
||||
* Various fixes thanks to http://coccinellery.org/
|
||||
* libftdi is now autodetected with pkgconfig
|
||||
* Releases should now support reproducible builds
|
||||
* Conversion to non-recursive make, requires automake >= 1.14
|
||||
* Udev rules modified to add uaccess tag and moved to
|
||||
60-openocd.rules
|
||||
* Support searching for scripts relative to the openocd binary
|
||||
for all major architectures
|
||||
|
||||
|
||||
This release also contains a number of other important functional and
|
||||
cosmetic bugfixes. For more details about what has changed since the
|
||||
last release, see the git repository history:
|
||||
|
||||
http://sourceforge.net/p/openocd/code/ci/v0.10.0/log/?path=
|
||||
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
238
NEWS-0.11.0
238
NEWS-0.11.0
@@ -1,238 +0,0 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
|
||||
JTAG Layer:
|
||||
* add debug level 4 for verbose I/O debug
|
||||
* bitbang, add read buffer to improve performance
|
||||
* Cadence SystemVerilog Direct Programming Interface (DPI) adapter driver
|
||||
* CMSIS-DAP v2 (USB bulk based) adapter driver
|
||||
* Cypress KitProg adapter driver
|
||||
* FTDI FT232R sync bitbang adapter driver
|
||||
* Linux GPIOD bitbang adapter driver through libgpiod
|
||||
* Mellanox rshim USB or PCIe adapter driver
|
||||
* Nuvoton Nu-Link and Nu-Link2 adapter drivers
|
||||
* NXP IMX GPIO mmap based adapter driver
|
||||
* ST-Link consolidate all versions in single config
|
||||
* ST-Link read properly old USB serial numbers
|
||||
* STLink/V3 support (for ST devices only !)
|
||||
* STM8 SWIM transport
|
||||
* TI XDS110 adapter driver
|
||||
* Xilinx XVC/PCIe adapter driver
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
* 64 bit address support
|
||||
* ARCv2 target support
|
||||
* ARM Cortex-A hypervisor mode support
|
||||
* ARM Cortex-M fast PC sampling support for profiling
|
||||
* ARM generic CTI support
|
||||
* ARM generic mem-ap target support
|
||||
* ARMv7-A MMU tools
|
||||
* ARMv7m traces add TCP stream server
|
||||
* ARMv8 AARCH64 target support and semihosting support
|
||||
* ARMv8 AARCH64 disassembler support through capstone library
|
||||
* ARMv8-M target support
|
||||
* EnSilica eSi-RISC target support, including instruction tracing
|
||||
eSi-Trace support
|
||||
* MIPS64 target support
|
||||
* Motorola SREC S6 record image file support
|
||||
* RISC-V target support
|
||||
* SEGGER Real Time Transfer (RTT) initial support (for single target,
|
||||
Cortex-M only)
|
||||
* ST STM8 target support
|
||||
* Various MIPS32 target improvements
|
||||
|
||||
Flash Layer:
|
||||
* Atheros (ath79) SPI interface support
|
||||
* Atmel atmega128rfa1 support
|
||||
* Atmel SAM D21, D51, DA1, E51, E53, E54, G55, R30 support
|
||||
* Atmel SAMC2?N* support
|
||||
* Cypress PSoC5LP, PSoC6 support
|
||||
* EnSilica eSi-RISC support
|
||||
* Foshan Synwit Tech SWM050 support
|
||||
* Maxim Integrated MAX32XXX support
|
||||
* Nordic Semiconductor nRF51822, nRF52810, nRF52832 support
|
||||
* NXP Kinetis K27, K28, KE1x, KEAx, KL28, KL8x, KV5x, KWx support
|
||||
* Renesas RPC HF support
|
||||
* SH QSPI support
|
||||
* SiFive Freedom E support
|
||||
* Silicon Labs EFR-family, EZR32HG support
|
||||
* ST BlueNRG support
|
||||
* ST STM32 QUAD/OCTO-SPI interface support for Flash, FRAM and EEPROM
|
||||
* ST STM32F72x, STM32F4x3, STM32H7xx support
|
||||
* ST STM32G0xx, STM32G4xx, STM32L4x, STM32WB, STM32WL support
|
||||
* ST STM32L5x support (non secure mode)
|
||||
* TI CC13xx, CC26xx, CC32xx support
|
||||
* TI MSP432 support
|
||||
* Winner Micro w600 support
|
||||
* Xilinx XCF platform support
|
||||
* Various discrete SPI NOR flashes support
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
* 8devices LIMA board config
|
||||
* Achilles Instant-Development Kit Arria 10 board config
|
||||
* Amazon Kindle 2 and DX board config
|
||||
* Analog Devices ADSP-SC58x, ADSP-SC584-EZBRD board config
|
||||
* Andes Technology ADP-XC7KFF676 board config
|
||||
* Andes Technology Corvette-F1 board config
|
||||
* ARM Musca A board config
|
||||
* Arty Spartan 7 FPGA board config
|
||||
* Atmel SAMD10 Xplained mini board config
|
||||
* Atmel SAMD11 Xplained Pro board config
|
||||
* Atmel SAM G55 Xplained Pro board config
|
||||
* AVNET UltraZED EG StarterKit board config
|
||||
* Blue Pill STM32F103C8 board config
|
||||
* DP Busblaster v4.1a board config
|
||||
* DPTechnics DPT-Board-v1 board config
|
||||
* Emcraft imx8 SOM BSB board config
|
||||
* Globalscale ESPRESSObin board config
|
||||
* Kasli board config
|
||||
* Kintex Ultrascale XCKU040 board config
|
||||
* Knovative KC-100 board config
|
||||
* LeMaker HiKey board config
|
||||
* Microchip (Atmel) SAME54 Xplained Pro board config
|
||||
* Microchip (Atmel) SAML11 Xplained Pro board config
|
||||
* Nordic module NRF52 board config
|
||||
* Numato Lab Mimas A7 board config
|
||||
* NXP Freedom FRDM-LS1012A board config
|
||||
* NXP IMX7SABRE board config
|
||||
* NXP IMX8MP-EVK board config
|
||||
* NXP MC-IMX8M-EVK board config
|
||||
* QuickLogic QuickFeather board config
|
||||
* Renesas R-Car E2, H2, M2 board config
|
||||
* Renesas R-Car Salvator-X(S) board config
|
||||
* Renesas RZ/A1H GR-Peach board config
|
||||
* Rigado BMD-300 board config
|
||||
* Sayma AMC board config
|
||||
* Sifive e31arty, e51arty, hifive1 board config
|
||||
* ST B-L475E-IOT01A board config
|
||||
* ST BlueNRG idb007v1, idb008v1, idb011v1 board config
|
||||
* ST STM32F412g discovery board config
|
||||
* ST STM32F413h discovery board config
|
||||
* ST STM32F469i discovery board config
|
||||
* ST STM32F7 Nucleo board config
|
||||
* ST STM32F723e discovery board config
|
||||
* ST STM32F746g discovery board config
|
||||
* ST STM32F769i discovery board config
|
||||
* ST STM32H735g discovery board config
|
||||
* ST STM32H743zi Nucleo board config
|
||||
* ST STM32H745i discovery board config
|
||||
* ST STM32H747i discovery board config
|
||||
* ST STM32H750b discovery board config
|
||||
* ST STM32H7b3i discovery board config
|
||||
* ST STM32H7x_dual_qspi board config
|
||||
* ST STM32H7x3i Eval boards config
|
||||
* ST STM32L073 Nucleo board config
|
||||
* ST STM32L476g discovery board config
|
||||
* ST STM32L496g discovery board config
|
||||
* ST STM32L4p5g discovery board config
|
||||
* ST STM32L4r9i discovery board config
|
||||
* ST STM32L5 Nucleo board config
|
||||
* ST STM32MP15x DK2 board config
|
||||
* ST STM32WB Nucleo board config
|
||||
* ST STM8L152R8 Nucleo board config
|
||||
* Synopsys DesignWare ARC EM board config
|
||||
* Synopsys DesignWare ARC HSDK board config
|
||||
* TI BeagleBone family boards config
|
||||
* TI CC13xx, CC26xx, CC32xx LaunchPad board config
|
||||
* TI MSP432 LaunchPad board config
|
||||
* Tocoding Poplar board config
|
||||
* TP-Link WDR4300 board config
|
||||
* Allwinner V3s target config
|
||||
* Andes Technology NDS V5 target config
|
||||
* Atmel atmega128rfa1 target config
|
||||
* ARM corelink SSE-200 target config
|
||||
* Atheros_ar9344 target config
|
||||
* Cypress PSoC5LP, PSoC6 target config
|
||||
* EnSilica eSi-RISC target config
|
||||
* Foshan Synwit Tech SWM050 target config
|
||||
* GigaDevice GD32VF103 target config
|
||||
* Hisilicon Hi3798 target config
|
||||
* Hisilicon Hi6220 target config
|
||||
* Infineon TLE987x target config
|
||||
* Marvell Armada 3700 target config
|
||||
* Maxim Integrated MAX32XXX target config
|
||||
* Mellanox BlueField target config
|
||||
* Microchip (Atmel) SAME5x, SAML1x target config
|
||||
* NXP IMX6SX, IMX6UL, IMX7, IMX7ULP, IMX8 target config
|
||||
* NXP Kinetis KE1xZ, KE1xF target config
|
||||
* NXP LPC84x, LPC8Nxx, LS1012A, NHS31xx target config
|
||||
* Qualcomm QCA4531 target config
|
||||
* QuickLogic EOS S3 target config
|
||||
* Renesas R-Car E2, H2, M2 target config
|
||||
* Renesas R-Car Gen3 target config
|
||||
* Renesas RZ/A1H target config
|
||||
* Rockchip RK3308 target config
|
||||
* ST BlueNRG target config
|
||||
* ST STM32G0, STM32G4, STM32H7, STM32L0, STM32L5 target config
|
||||
* ST STM32MP15x target config
|
||||
* ST STM32WBx, STM32WLEx target config
|
||||
* ST STM8L152, S003, S103, S105 target config
|
||||
* Synopsys DesignWare ARC EM target config
|
||||
* Synopsys DesignWare ARC HS Development Kit SoC target config
|
||||
* TI CC13xx, CC26xx, CC32xx target config
|
||||
* TI TNETC4401 target config
|
||||
* Xilinx UltraScale+ target config
|
||||
* Altera 5M570Z (MAXV family) CPLD config
|
||||
* Xilinx Ultrascale, XCF CPLD config
|
||||
* Intel (Altera) Arria10 FPGA config
|
||||
* Cadence SystemVerilog Direct Programming Interface (DPI) interface config
|
||||
* Cypress KitProg interface config
|
||||
* Digilent SMT2 NC interface config
|
||||
* DLN-2 example of Linux GPIOD interface config
|
||||
* FTDI C232HM interface config
|
||||
* HIE JTAG Debugger interface config
|
||||
* In-Circuit's ICprog interface config
|
||||
* isodebug isolated JTAG/SWD+UART interface config
|
||||
* Mellanox rshim USB or PCIe interface config
|
||||
* Nuvoton Nu-Link interface config
|
||||
* NXP IMX GPIO mmap based interface config
|
||||
* Steppenprobe open hardware interface config
|
||||
* TI XDS110 interface config
|
||||
|
||||
Server Layer:
|
||||
* 64 bit address support
|
||||
* default bind to IPv4 localhost
|
||||
* gdb: allow multiple connections
|
||||
* gdb: architecture element support
|
||||
* gdb: vCont, vRun support
|
||||
* telnet: handle Ctrl+A, Ctrl+E and Ctrl+K
|
||||
|
||||
RTOS:
|
||||
* Chromium-EC rtos support
|
||||
* hwthread pseudo rtos support
|
||||
* NuttX rtos support
|
||||
* RIOT rtos support
|
||||
|
||||
Documentation:
|
||||
* Improve STM32 flash driver
|
||||
* Various typo fix and improvements
|
||||
|
||||
Build and Release:
|
||||
* Add libutil to support jimtcl version 0.80
|
||||
* Clang warning fixes
|
||||
* GitHub workflow for Win32 snapshot binaries
|
||||
* Handle Tcl return values consistently
|
||||
* Mitigation for CVE-2018-5704: Prevent some forms of Cross
|
||||
Protocol Scripting attacks
|
||||
* Support for libftdi 1.5
|
||||
* Travis-CI basic support
|
||||
* Update libjaylink to version 0.2.0
|
||||
* Update jimtcl to version 0.79
|
||||
* Use external (optional) library capstone for ARM and AARCH64 disassembly
|
||||
|
||||
|
||||
This release also contains a number of other important functional and
|
||||
cosmetic bugfixes. For more details about what has changed since the
|
||||
last release, see the git repository history:
|
||||
|
||||
http://sourceforge.net/p/openocd/code/ci/v0.11.0/log/?path=
|
||||
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
@@ -9,7 +9,7 @@ must past stricter value checks, and many more error conditions have
|
||||
been handled correctly. These efforts helped to make the 0.2.0 release
|
||||
more stable and robust, though some changes may expose latent bugs in
|
||||
your existing configuration scripts.
|
||||
|
||||
|
||||
This release does not maintain backward compatibility in all respects,
|
||||
so some target or configuration scripts may need to be updated. In some
|
||||
cases, you may also see warnings; resolve those, because they indicate
|
||||
@@ -20,7 +20,7 @@ The following areas of OpenOCD functionality changed in this release:
|
||||
JTAG Layer:
|
||||
- Improves modularity: core, TCL, driver commands, and interface have
|
||||
been separated, encapsulated, and documented for developers. Mostly.
|
||||
- Improves JTAG TAP transition tables:
|
||||
- Improves JTAG TAP transition tables:
|
||||
* Makes TAP paths variable length, rather than being fixed at 7 steps.
|
||||
* Fixes problems with some targets that did not like longer paths.
|
||||
- Improves JTAG driver/minidriver modularity and encapsulation.
|
||||
|
||||
82
NEWS-0.3.0
82
NEWS-0.3.0
@@ -1,82 +0,0 @@
|
||||
This file should include highlights of the changes made in the
|
||||
OpenOCD openocd-0.3.0 source archive release. See the repository
|
||||
history for details about what changed, including bugfixes and
|
||||
other issues not mentioned here.
|
||||
|
||||
JTAG Layer:
|
||||
FT2232H (high speed USB) support doesn't need separate configuration
|
||||
New FT2232H JTAG adapters: Amontec, Olimex, Signalyzer
|
||||
New reset_config options for SRST gating the JTAG clock (or not)
|
||||
TAP declaration no longer requires ircapture and mask attributes
|
||||
Scan chain setup should be more robust, with better diagnostics
|
||||
New TAP events:
|
||||
"post-reset" for TAP-invariant setup code (TAPs not usable yet)
|
||||
"setup" for use once TAPs are addressable (e.g. with ICEpick)
|
||||
Overridable Tcl "init_reset" and "jtag_init" procedures
|
||||
Simple "autoprobe" mechanism to help simplify server setup
|
||||
|
||||
Boundary Scan:
|
||||
SVF bugfixes ... parsing fixes, better STATE switch conformance
|
||||
XSVF bugfixes ... be more correct, handle Xilinx tool output
|
||||
|
||||
Target Layer:
|
||||
Warn on use of obsolete numeric target IDs
|
||||
New commands for use with Cortex-M3 processors:
|
||||
"cortex_m3 disassemble" ... Thumb2 disassembly (UAL format)
|
||||
"cortex_m3 vector_catch" ... traps certain hardware faults
|
||||
without tying up breakpoint resources
|
||||
If you're willing to help debug it
|
||||
VERY EARLY Cortex-A8 and ARMv7A support
|
||||
Updated BeagleBoard.org hardware support
|
||||
you may need to explicitly "reset" after connect-to-Beagle
|
||||
New commands for use with XScale processors: "xscale vector_table"
|
||||
ARM
|
||||
bugfixes to single-stepping Thumb code
|
||||
ETM: unavailable registers are not listed
|
||||
ETB, ETM: report actual hardware status
|
||||
ARM9
|
||||
name change: "arm9 vector_catch" not "arm9tdmi vector_catch"
|
||||
ARM11
|
||||
single stepping support for i.MX31
|
||||
bugfix for missing "arm11" prefix on "arm11 memwrite ..."
|
||||
GDB support
|
||||
gdb_attach command is gone
|
||||
|
||||
Flash Layer:
|
||||
The lpc2000 driver handles the new NXP LPC1700 (Cortex-M3) chips
|
||||
New drivers:
|
||||
lpc2900, for NXP LPC2900 chips (ARM968 based)
|
||||
mx3_nand, for imx31
|
||||
New "last" flag for NOR "flash erase_sector" and "flash protect"
|
||||
The "nand erase N" command now erases all of bank N
|
||||
Speed up davinci_nand by about 3x
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
Amontec JTAGkey2 support
|
||||
Cleanup and additions for the TI/Luminary Stellaris scripts
|
||||
LPC1768 target (and flash) support
|
||||
Keil MCB1700 eval board
|
||||
Samsung s3c2450
|
||||
Mini2440 board
|
||||
Numeric TAP and Target identifiers now trigger warnings
|
||||
PXA255 partially enumerates
|
||||
|
||||
Documentation:
|
||||
Capture more debugging and setup advice
|
||||
Notes on target source code changes that may help debugging
|
||||
|
||||
Build and Release:
|
||||
Repository moved from SVN at Berlios to GIT at SourceForge
|
||||
Clean builds on (32-bit) Cygwin
|
||||
Clean builds on 64-bit MinGW
|
||||
|
||||
For more details about what has changed since the last release,
|
||||
see the git repository history. With gitweb, you can browse that
|
||||
in various levels of detail.
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES files in the source archive).
|
||||
98
NEWS-0.4.0
98
NEWS-0.4.0
@@ -1,98 +0,0 @@
|
||||
This file includes highlights of the changes made in the
|
||||
OpenOCD 0.4.0 source archive release. See the repository
|
||||
history for details about what changed, including bugfixes
|
||||
and other issues not mentioned here.
|
||||
|
||||
JTAG Layer:
|
||||
Support KT-Link JTAG adapter.
|
||||
Support USB-JTAG, Altera USB-Blaster and compatibles.
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
General
|
||||
- Removed commands which have been obsolete for at least
|
||||
a year (from both documentation and, sometimes, code).
|
||||
- new "reset-assert" event, for systems without SRST
|
||||
ARM
|
||||
- supports "reset-assert" event (except on Cortex-M3)
|
||||
- renamed "armv4_5" command prefix as "arm"
|
||||
- recognize TrustZone "Secure Monitor" mode
|
||||
- "arm regs" command output changed
|
||||
- register names use "sp" not "r13"
|
||||
- add top-level "mcr" and "mrc" commands, replacing
|
||||
various core-specific operations
|
||||
- basic semihosting support (ARM7/ARM9 only, for now)
|
||||
ARM11
|
||||
- Should act much more like other ARM cores:
|
||||
* Preliminary ETM and ETB hookup
|
||||
* accelerated "flash erase_check"
|
||||
* accelerated GDB memory checksum
|
||||
* support "arm regs" command
|
||||
* can access all core modes and registers
|
||||
* watchpoint support
|
||||
- Shares some core debug code with Cortex-A8
|
||||
Cortex-A8
|
||||
- Should act much more like other ARM cores:
|
||||
* support "arm regs" command
|
||||
* can access all core modes and registers
|
||||
* watchpoint support
|
||||
- Shares some core debug code with ARM11
|
||||
Cortex-M3
|
||||
- Exposed DWT registers like cycle counter
|
||||
- vector_catch settings not clobbered by resets
|
||||
- no longer interferes with firmware's fault handling
|
||||
ETM, ETB
|
||||
- "trigger_percent" command moved ETM --> ETB
|
||||
- "etm trigger_debug" command added
|
||||
MIPS
|
||||
- use fastdata writes
|
||||
Freescale DSP563xx cores (partial support)
|
||||
|
||||
Flash Layer:
|
||||
'flash bank' and 'nand device' take <bank_name> as first argument.
|
||||
With this, flash/NAND commands allow referencing banks by name:
|
||||
- <bank_name>: reference the bank with its defined name
|
||||
- <driver_name>[.N]: reference the driver's Nth bank
|
||||
New 'nand verify' command to check bank against an image file.
|
||||
The "flash erase_address" command now rejects partial sectors;
|
||||
previously it would silently erase extra data. If you
|
||||
want to erase the rest of the first and/or last sectors
|
||||
instead of failing, you must pass an explicit "pad" flag.
|
||||
New at91sam9 NAND controller driver.
|
||||
New s3c64xx NAND controller driver.
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
ARM9
|
||||
- ETM and ETB hookup for iMX2* targets
|
||||
Add $HOME/.openocd to the search path.
|
||||
Handle Rev C of LM3S811 eval boards.
|
||||
- use "luminary-lm3s811.cfg" for older boards
|
||||
- use "luminary.cfg" for RevC and newer
|
||||
|
||||
Core Jim/TCL Scripting:
|
||||
New 'usage' command to provide terse command help.
|
||||
Improved command 'help' command output (sorted and indented).
|
||||
Improved command handling:
|
||||
- Most boolean settings now accept any of the following:
|
||||
on/off, enable/disable, true/false, yes/no, 1/0
|
||||
- More error checking and reporting.
|
||||
|
||||
Documentation:
|
||||
New built-in command development documentation and primer.
|
||||
|
||||
Build and Release:
|
||||
Use --enable-doxygen-pdf to build PDF developer documentation.
|
||||
Consider upgrading to libftdi 0.17 if you use that library; it
|
||||
includes bugfixes which improve FT2232H support.
|
||||
|
||||
For more details about what has changed since the last release,
|
||||
see the git repository history. With gitweb, you can browse that
|
||||
in various levels of detail.
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
73
NEWS-0.5.0
73
NEWS-0.5.0
@@ -1,73 +0,0 @@
|
||||
This file includes highlights of the changes made in the
|
||||
OpenOCD 0.5.0 source archive release. See the repository
|
||||
history for details about what changed, including bugfixes
|
||||
and other issues not mentioned here.
|
||||
|
||||
JTAG Layer:
|
||||
New driver for "Bus Pirate"
|
||||
Rename various commands so they're not JTAG-specific
|
||||
There are migration procedures for most of these, but you should
|
||||
convert your scripts to the new names, since those procedures
|
||||
will not be around forever.
|
||||
jtag jinterface ... is now adapter_name
|
||||
jtag_khz ... is now adapter_khz
|
||||
jtag_nsrst_delay ... is now adapter_nsrst_delay
|
||||
jtag_nsrst_assert_width ... is now adapter_nsrst_assert_width
|
||||
Support Voipac VPACLink JTAG Adapter.
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Transport framework core ... supporting future work for SWD, SPI, and other
|
||||
non-JTAG ways to debug targets or program flash.
|
||||
|
||||
Target Layer:
|
||||
ARM:
|
||||
- basic semihosting support for ARMv7M.
|
||||
- renamed "armv7m" command prefix as "arm"
|
||||
MIPS:
|
||||
- "ejtag_srst" variant removed. The same functionality is
|
||||
obtained by using "reset_config none".
|
||||
- added PIC32MX software reset support, this means srst is not
|
||||
required to be connected anymore.
|
||||
OTHER:
|
||||
- preliminary AVR32 AP7000 support.
|
||||
|
||||
Flash Layer:
|
||||
New "stellaris recover" command, implements the procedure
|
||||
to recover locked devices (restoring non-volatile
|
||||
state to the factory defaults, including erasing
|
||||
the flash and its protection bits, and possibly
|
||||
re-enabling hardware debugging).
|
||||
PIC32MX now uses algorithm for flash programming, this
|
||||
has increased the performance by approx 96%.
|
||||
New 'pic32mx unlock' cmd to remove readout protection.
|
||||
New STM32 Value Line Support.
|
||||
New 'virtual' flash driver, used to associate other addresses
|
||||
with a flash bank. See pic32mx.cfg for usage.
|
||||
New iMX27 NAND flash controller driver.
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
Support IAR LPC1768 kickstart board (by Olimex)
|
||||
Support Voipac PXA270/PXA270M module.
|
||||
New $PARPORTADDR tcl variable used to change default
|
||||
parallel port address used.
|
||||
Remove lm3s811.cfg; use "stellaris.cfg" instead
|
||||
|
||||
Core Jim/TCL Scripting:
|
||||
New "add_script_search_dir" command, behaviour is the same
|
||||
as the "-s" cmd line option.
|
||||
|
||||
Documentation:
|
||||
|
||||
Build and Release:
|
||||
|
||||
For more details about what has changed since the last release,
|
||||
see the git repository history. With gitweb, you can browse that
|
||||
in various levels of detail.
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
54
NEWS-0.6.0
54
NEWS-0.6.0
@@ -1,54 +0,0 @@
|
||||
This file includes highlights of the changes made in the
|
||||
OpenOCD source archive release. See the
|
||||
repository history for details about what changed, including
|
||||
bugfixes and other issues not mentioned here.
|
||||
|
||||
JTAG Layer:
|
||||
New STLINK V1/V2 JTAG/SWD adapter support.
|
||||
New OSJTAG adapter support.
|
||||
New Tincantools Flyswatter2 support.
|
||||
Improved ULINK driver.
|
||||
Improved RLINK driver.
|
||||
Support for adapters based on FT232H chips.
|
||||
New experimental driver for FTDI based adapters, using libusb-1.0 in asynchronous mode.
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
New Cortex-M0 support.
|
||||
New Cortex-M4 support.
|
||||
Improved Working area algorithm.
|
||||
New RTOS support. Currently linux, FreeRTOS, ThreadX and eCos.
|
||||
Connecting under reset to Cortex-Mx and MIPS chips.
|
||||
|
||||
Flash Layer:
|
||||
New SST39WF1601 support.
|
||||
New EN29LV800BB support.
|
||||
New async algorithm support for selected targets, stm32, stellaris and pic32.
|
||||
New Atmel SAM3S, SAM3N support.
|
||||
New ST STM32L support.
|
||||
New Microchip PIC32MX1xx/2xx support.
|
||||
New Freescale Kinetis K40 support.
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
Support Dangerous Prototypes Bus Blaster.
|
||||
Support ST SPEAr Family.
|
||||
Support Gumstix Verdex boards.
|
||||
Support TI Beaglebone.
|
||||
|
||||
Documentation:
|
||||
Improved HACKING info for submitting patches.
|
||||
Fixed numerous broken links.
|
||||
|
||||
Build and Release:
|
||||
|
||||
For more details about what has changed since the last release,
|
||||
see the git repository history. With gitweb, you can browse that
|
||||
in various levels of detail.
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
43
NEWS-0.7.0
43
NEWS-0.7.0
@@ -1,43 +0,0 @@
|
||||
This file includes highlights of the changes made in the
|
||||
OpenOCD source archive release. See the
|
||||
repository history for details about what changed, including
|
||||
bugfixes and other issues not mentioned here.
|
||||
|
||||
JTAG Layer:
|
||||
New TI ICDI adapter support.
|
||||
Support Latest OSBDM firmware.
|
||||
Improved MIPS EJTAG Support.
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
New ARMv7R and Cortex-R4 support.
|
||||
Added ChibiOS/RT support.
|
||||
|
||||
Flash Layer:
|
||||
New NXP LPC1850 support.
|
||||
New NXP LPC4300 support.
|
||||
New NXP SPIFI support.
|
||||
New Energy Micro EFM32 support.
|
||||
New ST STM32W support.
|
||||
New ST STM32f2 write protection and lock/unlock support.
|
||||
Ability to override STM32 flash bank size.
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
Support Freescale i.MX6 series targets.
|
||||
|
||||
Documentation:
|
||||
New MIPS debugging info.
|
||||
|
||||
Build and Release:
|
||||
|
||||
For more details about what has changed since the last release,
|
||||
see the git repository history. With gitweb, you can browse that
|
||||
in various levels of detail.
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
111
NEWS-0.8.0
111
NEWS-0.8.0
@@ -1,111 +0,0 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
|
||||
JTAG Layer:
|
||||
* New CMSIS-DAP driver
|
||||
* Andes AICE debug adapter support
|
||||
* New OpenJTAG driver
|
||||
* New BCM2835 (RaspberryPi) driver
|
||||
* JTAG VPI client driver (for OpenRISC Reference Platform SoC)
|
||||
* Xilinx BSCAN_* for OpenRISC support
|
||||
* ST-LINKv2-1 support
|
||||
* ST-LINKv2 SWO tracing support (UART emulation)
|
||||
* JLink-OB (onboard) support
|
||||
* Altera USB Blaster driver rewrite, initial Blaster II
|
||||
support
|
||||
* ULINK driver ported to libusb-1.0, OpenULINK build fixes
|
||||
* Support up to 64 bit IR lengths
|
||||
* SVF playback (FPGA programming) fixes
|
||||
* "ftdi" interface driver got extensive testing and is now
|
||||
recommended over the old ft2232 implementation
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
* New target: Andes nds32
|
||||
* New target: OpenRISC OR1K
|
||||
* New target: Intel Quark X10xx
|
||||
* MIPS EJTAG 1.5/2.0 support
|
||||
* MIPS speed improvements
|
||||
* Cortex-M, Cortex-A (MEM-AP, APB-AP) targets working with BE
|
||||
hosts now
|
||||
* XScale vector_catch support, reset fixes
|
||||
* dsp563xx ad-hoc breakpoint/watchpoint support
|
||||
* RTOS support for embKernel
|
||||
* Target profiling improvements
|
||||
* Memory access functions testbench
|
||||
|
||||
Flash Layer:
|
||||
* STM32 family sync with reference manuals, other bugfixes
|
||||
* STM32F401, STM32F07x support
|
||||
* Atmel SAM4L, SAMG5x support
|
||||
* at91sam3sd8{a,b}, at91sam3s8{a,b,c}, at91sam4s,
|
||||
at91sam3n0{a,b,0a,0b} support, bugfixes
|
||||
* Atmel SAMD support
|
||||
* Milandr 1986ВЕ* support
|
||||
* Kinetis KL, K21 support
|
||||
* Nuvoton NuMicro MINI5{1,2,4} support
|
||||
* Nuvoton NUC910 series support
|
||||
* NXP LPC43xx, LPC2000 fixes
|
||||
* NXP LPC800, LPC810 support
|
||||
* More ATmega parts supported
|
||||
* Fujitsu MB9Ax family support
|
||||
* EFM32 Wonder Gecko family support
|
||||
* Nordic nRF51 support
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
* STM32W108xx generic target config
|
||||
* STM32F429 discovery board config
|
||||
* STM32 Nucleo boards configs
|
||||
* DENX M53EVK board config
|
||||
* Altera Cyclone V SoC, SoCkit config
|
||||
* New TI Launchpads board configs
|
||||
* TI am43xx devices, AM437x GP EVM, AM438x ePOS EVM board
|
||||
configs
|
||||
* Marvell Armada 370 family initial support
|
||||
* TI TMDX570LS31USB (TMS570, Cortex-R4) support scripts
|
||||
* Freescale FRDM-KL25Z, KL46Z board configs
|
||||
* Digilent Zedboard config
|
||||
* Asus RT-N16, Linksys WRT54GL, BT HomeHub board configs
|
||||
* Atmel Xplained initial support
|
||||
* Broadcom bcm28155_ap board config
|
||||
* TUMPA, TUMPA Lite interface configs
|
||||
* Digilent JTAG-SMT2 interface config
|
||||
* New RAM testing functions
|
||||
* Easy-to-use firmware recovery helpers targetting ordinary
|
||||
users with common equipment
|
||||
|
||||
Server Layer:
|
||||
* Auto-generation of GDB target description for ARMv7-M,
|
||||
ARM4, nds32, OR1K, Quark
|
||||
* GDB File-I/O Remote Protocol extension support
|
||||
* Default GDB flashing events handlers to initialise and reset
|
||||
the target automatically when "load" is used
|
||||
|
||||
Documentation:
|
||||
* Extensive README* changes
|
||||
* The official User's Guide was proofread
|
||||
* Example cross-build script
|
||||
* RTOS documentation improvements
|
||||
* Tcl RPC documentation and examples added
|
||||
|
||||
Build and Release:
|
||||
* *BSD, OS X, clang, ARM, windows build fixes
|
||||
* New pkg-config support changes the way libusb (and other
|
||||
dependencies) are handled. Many adapter drivers are now
|
||||
selected automatically during the configure stage.
|
||||
|
||||
|
||||
This release also contains a number of other important functional and
|
||||
cosmetic bugfixes. For more details about what has changed since the
|
||||
last release, see the git repository history:
|
||||
|
||||
http://sourceforge.net/p/openocd/code/ci/v0.8.0/log/?path=
|
||||
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
110
NEWS-0.9.0
110
NEWS-0.9.0
@@ -1,110 +0,0 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
|
||||
JTAG Layer:
|
||||
* SWD support with FTDI, Versaloon, J-Link, sysfsgpio
|
||||
* CMSIS-DAP massive speed and stability improvements
|
||||
* Versaloon driver ported to libusb-1.0
|
||||
* STLink can reestablish communication with a target that was
|
||||
disconnected or rebooted
|
||||
* STLink FAULT and WAIT SWD handling improved
|
||||
* New hla_serial command to distinguish between several HLA
|
||||
adapters attached to a single machine
|
||||
* Serial number support for CMSIS-DAP and J-Link adapters
|
||||
* Support for more J-Link adapters
|
||||
* TAP autoprobing improvements
|
||||
* Big speedup for SVF playback with USB Blaster
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
Target Layer:
|
||||
* Stability improvements for targets that get disconnected or
|
||||
rebooted during a debug session
|
||||
* MIPS speed and reliability improvements
|
||||
* MIPS 1.5/2.0 fixes
|
||||
* ARMv7-R improvements
|
||||
* Cortex-A improvements, A7, A15 MPCores support
|
||||
* FPU support for ARMv7-M (Cortex-M4F)
|
||||
* TPIU/ITM support (including SWO/SWV tracing), can be
|
||||
captured with external tools or STLink
|
||||
* JTAG Serial Port (Advanced Debug System softcore) support
|
||||
* Profiling support for OpenRISC
|
||||
* ChibiOS/RT 3.0 support (with and without FPU)
|
||||
* FreeRTOS current versions support
|
||||
* Freescale MQX RTOS support
|
||||
* GDB target description support for MIPS
|
||||
* The last created target is auto-selected as the current
|
||||
|
||||
Flash Layer:
|
||||
* nRF51 async loader to improve flashing performance and stability
|
||||
* Cypress PSoC 41xx/42xx and CCG1 families flash driver
|
||||
* Silabs SiM3 family flash driver
|
||||
* Marvell Wireless Microcontroller SPI flash driver
|
||||
* Kinetis mass erase (part unsecuring) implemented
|
||||
* lpcspifi stability fixes
|
||||
* STM32 family sync with reference manuals, L0 support, bugfixes
|
||||
* LPC2000 driver automatically determines part and flash size
|
||||
* NXP LPC11(x)xx, LPC13xx, LPC15xx, LPC8xx, LPC5410x, LPC407x support
|
||||
* Atmel SAMD, SAMR, SAML21 devices support
|
||||
* Atmel SAM4E16 support
|
||||
* ZeroGecko family support
|
||||
* TI Tiva C Blizzard and Snowflake families support
|
||||
* Nuvoton NuMicro M051 support
|
||||
* EZR32 support in EFM32 driver
|
||||
|
||||
Board, Target, and Interface Configuration Scripts:
|
||||
* Normal target configs can work with HLA (STLink, ICDI) adapters
|
||||
* STM32 discovery and Nucleo boards configs
|
||||
* Gumstix AeroCore board config
|
||||
* General Plus GP326XXXA target config
|
||||
* Micrel KS869x target config
|
||||
* ASUS RT-N66U board config
|
||||
* Atmel SAM4E-EK board config
|
||||
* Atmel AT91SAM4L proper reset handling implemented
|
||||
* TI OMAP/AM 3505, 3517 target configs
|
||||
* nRF51822-mKIT board config
|
||||
* RC Module К1879ХБ1Я target config
|
||||
* TI TMDX570LS20SUSB board config
|
||||
* TI TMS570 USB Kit board config
|
||||
* TI CC2538, CC26xx target configs
|
||||
* TI AM437x major config improvements, DDR support
|
||||
* TI AM437X IDK board config
|
||||
* TI SimpleLink Wi-Fi CC3200 LaunchPad configs
|
||||
* Silicon Labs EM357, EM358 target configs
|
||||
* Infineon XMC1000, XMC4000 family targets and boards configs
|
||||
* Atheros AR9331 target config
|
||||
* TP-LINK TL-MR3020 board config
|
||||
* Alphascale asm9260t target and eval kit configs
|
||||
* Olimex SAM7-LA2 (AT91SAM7A2) board config
|
||||
* EFM32 Gecko boards configs
|
||||
* Spansion FM4 target and SK-FM4-176L-S6E2CC board configs
|
||||
* LPC1xxx target configs were restructured
|
||||
* IoT-LAB debug adapter config
|
||||
* DP BusBlaster KT-Link compatible config
|
||||
|
||||
Server Layer:
|
||||
* Polling period can be configured
|
||||
* "shutdown" command has an immediate effect
|
||||
* The "program" command doesn't lead to a shutdown by
|
||||
default, use optional "exit" parameter for the old behaviour
|
||||
* Proper OS signal handling was implemented
|
||||
* Async target notifications for the Tcl RPC
|
||||
|
||||
Documentation:
|
||||
|
||||
Build and Release:
|
||||
|
||||
|
||||
This release also contains a number of other important functional and
|
||||
cosmetic bugfixes. For more details about what has changed since the
|
||||
last release, see the git repository history:
|
||||
|
||||
http://sourceforge.net/p/openocd/code/ci/v0.9.0/log/?path=
|
||||
|
||||
|
||||
For older NEWS, see the NEWS files associated with each release
|
||||
(i.e. NEWS-<version>).
|
||||
|
||||
For more information about contributing test reports, bug fixes, or new
|
||||
features and device support, please read the new Developer Manual (or
|
||||
the BUGS and PATCHES.txt files in the source archive).
|
||||
24
NEWTAPS
24
NEWTAPS
@@ -4,7 +4,7 @@ Reporting Unknown JTAG TAP IDS
|
||||
If OpenOCD reports an UNKNOWN or Unexpected Tap ID please report it to
|
||||
the development mailing list - However - keep reading.
|
||||
|
||||
openocd-devel@lists.sourceforge.net.
|
||||
openocd-development@lists.berlios.de.
|
||||
|
||||
========================================
|
||||
|
||||
@@ -30,7 +30,7 @@ Version Number Changes:
|
||||
not a big deal. Please do report this information. We'd like to
|
||||
know about it.
|
||||
|
||||
For example
|
||||
For example
|
||||
|
||||
Error: ERROR: Tap: s3c4510.cpu - Expected id: 0x3f0f0f0f, Got: 0x1f0f0f0f
|
||||
Error: ERROR: expected: mfg: 0x787, part: 0xf0f0, ver: 0x3
|
||||
@@ -39,7 +39,7 @@ Error: ERROR: got: mfg: 0x787, part: 0xf0f0, ver: 0x1
|
||||
========================================
|
||||
|
||||
Updating the Tap ID number your self
|
||||
|
||||
|
||||
Why do this? You just want the warning to go away. And don't want
|
||||
to update your version/instance of OpenOCD.
|
||||
|
||||
@@ -77,13 +77,13 @@ This is always a 32bit hex number.
|
||||
Examples:
|
||||
0x1f0f0f0f - is an old ARM7TDMI
|
||||
0x3f0f0f0f - is a newer ARM7TDMI
|
||||
0x3ba00477 - is an ARM Cortex-M3
|
||||
0x3ba00477 - is an ARM cortex M3
|
||||
|
||||
Some chips have multiple JTAG taps - be sure to list
|
||||
Some chips have multiple JTAG taps - be sure to list
|
||||
each one individually - ORDER is important!
|
||||
|
||||
========================================
|
||||
B) The maker of the part
|
||||
B) The maker of the part
|
||||
|
||||
Examples:
|
||||
Xilinx, Atmel, ST Micro Systems, Freescale
|
||||
@@ -94,7 +94,7 @@ C) The family of parts it belongs to
|
||||
Examples:
|
||||
"NXP LPC Series"
|
||||
"Atmel SAM7 Series"
|
||||
|
||||
|
||||
========================================
|
||||
|
||||
D) The actual part number on the package
|
||||
@@ -121,7 +121,7 @@ For example: A consumer GPS unit or a cellphone
|
||||
ie: Olimex, LogicPD, Freescale(eval board)
|
||||
|
||||
========================================
|
||||
|
||||
|
||||
(G) Identifying information on the board.
|
||||
|
||||
Not good: "iar red ST eval board"
|
||||
@@ -135,11 +135,3 @@ For example: A consumer GPS unit or a cellphone
|
||||
ie: An FPGA or CPLD ...
|
||||
|
||||
========================================
|
||||
|
||||
(I) What target config files need updating?
|
||||
|
||||
In fact it's best if you submit a patch with those
|
||||
updates. Most of the other information listed here
|
||||
is just to help create a good patch.
|
||||
|
||||
========================================
|
||||
|
||||
47
PATCHES
Normal file
47
PATCHES
Normal file
@@ -0,0 +1,47 @@
|
||||
// This file is part of the Doyxgen Developer Manual
|
||||
/** @page patchguide Patch Guidelines
|
||||
|
||||
Please mail patches to: @par
|
||||
openocd-development@lists.berlios.de
|
||||
|
||||
Note that you can't send patches to that list unless
|
||||
you're a member, despite what the list info page says.
|
||||
|
||||
@section Patch Guidelines in a Nutshell
|
||||
|
||||
Your patches should be against git mainline. Submit output
|
||||
of "git diff"; equivalently, quilt patches are OK.
|
||||
|
||||
It should be a "good patch": focus it on a single
|
||||
issue, and make it be easily reviewable. Don't make
|
||||
it so large that it's hard to review; split large
|
||||
patches into smaller ones. (That can also help
|
||||
track down bugs later on.) All patches should
|
||||
be "clean", which includes preserving the existing
|
||||
coding style and updating documentation as needed.j
|
||||
|
||||
Attach the patch to the email as a .txt file and
|
||||
also write a short change log entry that maintainers
|
||||
can copy and paste into the commit message
|
||||
|
||||
Say if it's a bugfix (describe the bug) or a new
|
||||
feature. Don't expect patches to merge immediately
|
||||
for the next release. Be ready to rework patches
|
||||
in response to feedback.
|
||||
|
||||
Add yourself to the GPL copyright for non-trivial changes.
|
||||
|
||||
To create a patch from the command line:
|
||||
@code
|
||||
git diff >mypatch.txt
|
||||
@endcode
|
||||
|
||||
@section More Information on Patching
|
||||
|
||||
The @ref primerpatches provides a more complete guide to creating,
|
||||
managing, and contributing patches to the OpenOCD project.
|
||||
|
||||
*/
|
||||
/** @file
|
||||
This file contains the @ref patchguide page.
|
||||
*/
|
||||
478
README
478
README
@@ -2,84 +2,45 @@ Welcome to OpenOCD!
|
||||
===================
|
||||
|
||||
OpenOCD provides on-chip programming and debugging support with a
|
||||
layered architecture of JTAG interface and TAP support including:
|
||||
|
||||
- (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
|
||||
programming;
|
||||
- debug target support (e.g. ARM, MIPS): single-stepping,
|
||||
breakpoints/watchpoints, gprof profiling, etc;
|
||||
- flash chip drivers (e.g. CFI, NAND, internal flash);
|
||||
- embedded TCL interpreter for easy scripting.
|
||||
|
||||
Several network interfaces are available for interacting with OpenOCD:
|
||||
telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
|
||||
"remote target" for source-level debugging of embedded systems using
|
||||
the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
|
||||
Pro).
|
||||
layered architecture of JTAG interface and TAP support, debug target
|
||||
support (e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.).
|
||||
Several network interfaces are available for interactiving with OpenOCD:
|
||||
HTTP, telnet, TCL, and GDB. The GDB server enables OpenOCD to function
|
||||
as a "remote target" for source-level debugging of embedded systems
|
||||
using the GNU GDB program.
|
||||
|
||||
This README file contains an overview of the following topics:
|
||||
|
||||
- quickstart instructions,
|
||||
- how to find and build more OpenOCD documentation,
|
||||
- list of the supported hardware,
|
||||
- the installation and build process,
|
||||
- the build process
|
||||
- packaging tips.
|
||||
|
||||
|
||||
============================
|
||||
Quickstart for the impatient
|
||||
============================
|
||||
|
||||
If you have a popular board then just start OpenOCD with its config,
|
||||
e.g.:
|
||||
|
||||
openocd -f board/stm32f4discovery.cfg
|
||||
|
||||
If you are connecting a particular adapter with some specific target,
|
||||
you need to source both the jtag interface and the target configs,
|
||||
e.g.:
|
||||
|
||||
openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
|
||||
-f target/ti_calypso.cfg
|
||||
|
||||
openocd -f interface/stlink.cfg -c "transport select hla_swd" \
|
||||
-f target/stm32l0.cfg
|
||||
|
||||
After OpenOCD startup, connect GDB with
|
||||
|
||||
(gdb) target extended-remote localhost:3333
|
||||
|
||||
- configuration options
|
||||
|
||||
=====================
|
||||
OpenOCD Documentation
|
||||
=====================
|
||||
|
||||
In addition to the in-tree documentation, the latest manuals may be
|
||||
viewed online at the following URLs:
|
||||
In addition to in-tree documentation, the latest documentation may be
|
||||
viewed on-line at the following URLs:
|
||||
|
||||
OpenOCD User's Guide:
|
||||
http://openocd.org/doc/html/index.html
|
||||
OpenOCD User's Guide:
|
||||
http://openocd.berlios.de/doc/html/index.html
|
||||
|
||||
OpenOCD Developer's Manual:
|
||||
http://openocd.org/doc/doxygen/html/index.html
|
||||
OpenOCD Developer's Manual:
|
||||
http://openocd.berlios.de/doc/doxygen/index.html
|
||||
|
||||
These reflect the latest development versions, so the following section
|
||||
introduces how to build the complete documentation from the package.
|
||||
|
||||
|
||||
For more information, refer to these documents or contact the developers
|
||||
by subscribing to the OpenOCD developer mailing list:
|
||||
|
||||
openocd-devel@lists.sourceforge.net
|
||||
openocd-development@lists.berlios.de
|
||||
|
||||
Building the OpenOCD Documentation
|
||||
----------------------------------
|
||||
|
||||
By default the OpenOCD build process prepares documentation in the
|
||||
"Info format" and installs it the standard way, so that "info openocd"
|
||||
can access it.
|
||||
|
||||
Additionally, the OpenOCD User's Guide can be produced in the
|
||||
following different formats:
|
||||
The OpenOCD User's Guide can be produced in two different format:
|
||||
|
||||
# If PDFVIEWER is set, this creates and views the PDF User Guide.
|
||||
make pdf && ${PDFVIEWER} doc/openocd.pdf
|
||||
@@ -91,59 +52,24 @@ The OpenOCD Developer Manual contains information about the internal
|
||||
architecture and other details about the code:
|
||||
|
||||
# NB! make sure doxygen is installed, type doxygen --version
|
||||
make doxygen && ${HTMLVIEWER} doxygen/index.html
|
||||
make doxygen
|
||||
|
||||
# If HTMLVIEWER is set, this views the HTML Doxygen output.
|
||||
${HTMLVIEWER} doxygen/index.html
|
||||
|
||||
==================
|
||||
Supported hardware
|
||||
==================
|
||||
|
||||
JTAG adapters
|
||||
-------------
|
||||
|
||||
AICE, AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
|
||||
Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
|
||||
Cortino, Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
|
||||
embedded projects, Espressif USB JTAG Programmer,
|
||||
eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
|
||||
FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
|
||||
JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
|
||||
Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
|
||||
OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
|
||||
Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
|
||||
ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
|
||||
sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
|
||||
USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
|
||||
Xverve.
|
||||
|
||||
Debug targets
|
||||
-------------
|
||||
|
||||
ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
|
||||
FA526, Feroceon/Dragonite, XScale.
|
||||
ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
|
||||
ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8,
|
||||
Xtensa.
|
||||
|
||||
Flash drivers
|
||||
-------------
|
||||
|
||||
ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
|
||||
DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
|
||||
GD32, i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
|
||||
LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
|
||||
NUC910, Nuvoton NPCX, onsemi RSL10, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6,
|
||||
Raspberry RP2040, Renesas RPC HF and SH QSPI,
|
||||
S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
|
||||
STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
|
||||
TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
|
||||
XMC1xxx, XMC4xxx.
|
||||
|
||||
The remaining sections describe how to configure the system such that
|
||||
you can build the in-tree documentation.
|
||||
|
||||
==================
|
||||
Installing OpenOCD
|
||||
==================
|
||||
|
||||
On Linux, you may have permissions problems to address. The best
|
||||
way to do this is to use the contrib/udev.rules file. It probably
|
||||
belongs somewhere in /etc/udev/rules.d, but consult your operating
|
||||
system documentation to be sure. In particular, make sure that it
|
||||
matches the syntax used by your operating system's version of udev.
|
||||
|
||||
A Note to OpenOCD Users
|
||||
-----------------------
|
||||
|
||||
@@ -151,14 +77,13 @@ If you would rather be working "with" OpenOCD rather than "on" it, your
|
||||
operating system or JTAG interface supplier may provide binaries for
|
||||
you in a convenient-enough package.
|
||||
|
||||
Such packages may be more stable than git mainline, where
|
||||
bleeding-edge development takes place. These "Packagers" produce
|
||||
binary releases of OpenOCD after the developers produces new "release"
|
||||
versions of the source code. Previous versions of OpenOCD cannot be
|
||||
used to diagnose problems with the current release, so users are
|
||||
encouraged to keep in contact with their distribution package
|
||||
maintainers or interface vendors to ensure suitable upgrades appear
|
||||
regularly.
|
||||
Such packages may be more stable than git mainline, where bleeding-edge
|
||||
development takes place. These "Packagers" produce binary releases of
|
||||
OpenOCD after the developers produces new "release" versions of the
|
||||
source code. Previous versions of OpenOCD cannot be used to diagnose
|
||||
problems with the current release, so users are encouraged to keep in
|
||||
contact with their distribution package maintainers or interface vendors
|
||||
to ensure suitable upgrades appear regularly.
|
||||
|
||||
Users of these binary versions of OpenOCD must contact their Packager to
|
||||
ask for support or newer versions of the binaries; the OpenOCD
|
||||
@@ -169,9 +94,10 @@ A Note to OpenOCD Packagers
|
||||
|
||||
You are a PACKAGER of OpenOCD if you:
|
||||
|
||||
- Sell dongles and include pre-built binaries;
|
||||
- Supply tools or IDEs (a development solution integrating OpenOCD);
|
||||
- Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
|
||||
- Sell dongles: and include pre-built binaries
|
||||
- Supply tools: A complete development solution
|
||||
- Supply IDEs: like Eclipse, or RHIDE, etc.
|
||||
- Build packages: RPM files, or DEB files for a Linux Distro
|
||||
|
||||
As a PACKAGER, you will experience first reports of most issues.
|
||||
When you fix those problems for your users, your solution may help
|
||||
@@ -185,21 +111,21 @@ resolved in our future releases.
|
||||
That said, the OpenOCD developers would also like you to follow a few
|
||||
suggestions:
|
||||
|
||||
- Send patches, including config files, upstream, participate in the
|
||||
discussions;
|
||||
- Enable all the options OpenOCD supports, even those unrelated to your
|
||||
particular hardware;
|
||||
- Use "ftdi" interface adapter driver for the FTDI-based devices.
|
||||
- Send patches, including config files, upstream.
|
||||
- Always build with printer ports enabled.
|
||||
- Use libftdi + libusb for FT2232 support.
|
||||
|
||||
Remember, the FTD2XX library cannot be used in binary distributions, due
|
||||
to restrictions of the GPL v2.
|
||||
|
||||
================
|
||||
Building OpenOCD
|
||||
================
|
||||
|
||||
The INSTALL file contains generic instructions for running 'configure'
|
||||
and compiling the OpenOCD source code. That file is provided by
|
||||
default for all GNU autotools packages. If you are not familiar with
|
||||
the GNU autotools, then you should read those instructions first.
|
||||
and compiling the OpenOCD source code. That file is provided by default
|
||||
for all GNU automake packages. If you are not familiar with the GNU
|
||||
autotools, then you should read those instructions first.
|
||||
|
||||
The remainder of this document tries to provide some instructions for
|
||||
those looking for a quick-install.
|
||||
@@ -207,107 +133,248 @@ those looking for a quick-install.
|
||||
OpenOCD Dependencies
|
||||
--------------------
|
||||
|
||||
GCC or Clang is currently required to build OpenOCD. The developers
|
||||
have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
|
||||
and more) and use C99-specific features: inline functions, named
|
||||
initializers, mixing declarations with code, and other tricks. While
|
||||
it may be possible to use other compilers, they must be somewhat
|
||||
modern and could require extending support to conditionally remove
|
||||
GCC-specific extensions.
|
||||
Presently, GCC is required to build OpenOCD. The developers have begun
|
||||
to enforce strict code warnings (-Wall, -Werror, -Wextra, and more) and
|
||||
use C99-specific features: inline functions, named initializers, mixing
|
||||
declarations with code, and other tricks. While it may be possible to
|
||||
use other compilers, they must be somewhat modern and could require
|
||||
extending support to conditionally remove GCC-specific extensions.
|
||||
|
||||
You'll also need:
|
||||
Also, you need to install the appropriate driver files, if you want to
|
||||
build support for a USB or FTDI-based interface:
|
||||
|
||||
- make
|
||||
- libtool
|
||||
- pkg-config >= 0.23 (or compatible)
|
||||
- ft2232, jlink, rlink, vsllink, usbprog, arm-jtag-ew:
|
||||
- libusb: required for portable communication with USB dongles
|
||||
- ft2232 also requires:
|
||||
- libftdi: http://www.intra2net.com/opensource/ftdi/ *OR*
|
||||
- ftd2xx: http://www.ftdichip.com/Drivers/D2XX.htm,
|
||||
or the Amontec version (from http://www.amontec.com), for
|
||||
easier support of JTAGkey's vendor and product IDs.
|
||||
|
||||
Additionally, for building from git:
|
||||
|
||||
- autoconf >= 2.69
|
||||
- automake >= 1.14
|
||||
- texinfo >= 5.0
|
||||
|
||||
USB-based adapters depend on libusb-1.0. A compatible implementation, such as
|
||||
FreeBSD's, additionally needs the corresponding .pc files.
|
||||
|
||||
USB-Blaster, ASIX Presto and OpenJTAG interface adapter
|
||||
drivers need:
|
||||
- libftdi: http://www.intra2net.com/en/developer/libftdi/index.php
|
||||
|
||||
CMSIS-DAP support needs HIDAPI library.
|
||||
|
||||
Permissions delegation
|
||||
----------------------
|
||||
|
||||
Running OpenOCD with root/administrative permissions is strongly
|
||||
discouraged for security reasons.
|
||||
|
||||
For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
|
||||
file. It probably belongs somewhere in /etc/udev/rules.d, but
|
||||
consult your operating system documentation to be sure. Do not forget
|
||||
to add yourself to the "plugdev" group.
|
||||
|
||||
For parallel port adapters on GNU/Linux and FreeBSD please change your
|
||||
"ppdev" (parport* or ppi*) device node permissions accordingly.
|
||||
|
||||
For parport adapters on Windows you need to run install_giveio.bat
|
||||
(it's also possible to use "ioperm" with Cygwin instead) to give
|
||||
ordinary users permissions for accessing the "LPT" registers directly.
|
||||
Many Linux distributions provide these packages through their automated
|
||||
installation and update mechanisms; however, some Linux versions include
|
||||
older versions of libftdi. In particular, using Ubuntu 8.04 has been
|
||||
problematic, but newer versions of Ubuntu do not have this problem.
|
||||
|
||||
Compiling OpenOCD
|
||||
-----------------
|
||||
|
||||
To build OpenOCD, use the following sequence of commands:
|
||||
To build OpenOCD (on both Linux and Cygwin), use the following sequence
|
||||
of commands:
|
||||
|
||||
./bootstrap (when building from the git repository)
|
||||
./configure [options]
|
||||
make
|
||||
sudo make install
|
||||
./configure [with some options listed in the next section]
|
||||
make
|
||||
make install
|
||||
|
||||
The 'configure' step generates the Makefiles required to build
|
||||
OpenOCD, usually with one or more options provided to it. The first
|
||||
'make' step will build OpenOCD and place the final executable in
|
||||
'./src/'. The final (optional) step, ``make install'', places all of
|
||||
the files in the required location.
|
||||
The 'configure' step generates the Makefiles required to build OpenOCD,
|
||||
usually with one or more options provided to it. The first 'make' step
|
||||
will build OpenOCD and place the final executable in ./src/. The
|
||||
final (optional) step, ``make install'', places all of the files in the
|
||||
required location.
|
||||
|
||||
To see the list of all the supported options, run
|
||||
./configure --help
|
||||
|
||||
Cross-compiling Options
|
||||
Cross-Compiling Options
|
||||
-----------------------
|
||||
|
||||
Cross-compiling is supported the standard autotools way, you just need
|
||||
to specify the cross-compiling target triplet in the --host option,
|
||||
e.g. for cross-building for Windows 32-bit with MinGW on Debian:
|
||||
To cross-compile, you must specify both --build and --host options to
|
||||
the 'configure' script. For example, you can configure OpenOCD to
|
||||
cross-compile on a x86 Linux host to run on Windows (MinGW32), you could
|
||||
use the following configuration options:
|
||||
|
||||
./configure --host=i686-w64-mingw32 [options]
|
||||
./configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc ...
|
||||
|
||||
To make pkg-config work nicely for cross-compiling, you might need an
|
||||
additional wrapper script as described at
|
||||
Likewise, the following options allow OpenOCD to be cross-compiled for
|
||||
an ARM target on the same x86 host:
|
||||
|
||||
https://autotools.io/pkgconfig/cross-compiling.html
|
||||
./configure --build=i686-pc-linux-gnu --host=arm-elf ...
|
||||
|
||||
This is needed to tell pkg-config where to look for the target
|
||||
libraries that OpenOCD depends on. Alternatively, you can specify
|
||||
*_CFLAGS and *_LIBS environment variables directly, see "./configure
|
||||
--help" for the details.
|
||||
Both must be specified to work around bugs in autoconf.
|
||||
|
||||
For a more or less complete script that does all this for you, see
|
||||
Scripts for producing ARM cross-compilers can be found on the web with a
|
||||
little searching. A script to produce an x86 Linux-hosted MinGW32
|
||||
cross-compiler can be downloaded from the following URL:
|
||||
|
||||
contrib/cross-build.sh
|
||||
http://www.mingw.org/wiki/LinuxCrossMinGW
|
||||
|
||||
Configuration Options
|
||||
---------------------
|
||||
|
||||
The configure script takes numerous options, specifying which JTAG
|
||||
interfaces should be included (among other things). The following list
|
||||
of options was extracted from the output of './configure --help'. Other
|
||||
options may be available there:
|
||||
|
||||
--enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer
|
||||
NOTE: This option is *required* for GIT builds!
|
||||
It should *not* be used to build a release.
|
||||
|
||||
--enable-dummy Enable building the dummy JTAG port driver
|
||||
|
||||
--enable-ft2232_libftdi Enable building support for FT2232 based devices
|
||||
using the libftdi driver, opensource alternate of
|
||||
FTD2XX
|
||||
--enable-ft2232_ftd2xx Enable building support for FT2232 based devices
|
||||
using the FTD2XX driver from ftdichip.com
|
||||
|
||||
--enable-gw16012 Enable building support for the Gateworks GW16012
|
||||
JTAG Programmer
|
||||
|
||||
--enable-parport Enable building the pc parallel port driver
|
||||
--disable-parport-ppdev Disable use of ppdev (/dev/parportN) for parport
|
||||
(for x86 only)
|
||||
--enable-parport-giveio Enable use of giveio for parport (for CygWin only)
|
||||
|
||||
--enable-presto_libftdi Enable building support for ASIX Presto Programmer
|
||||
using the libftdi driver
|
||||
--enable-presto_ftd2xx Enable building support for ASIX Presto Programmer
|
||||
using the FTD2XX driver
|
||||
|
||||
--enable-amtjtagaccel Enable building the Amontec JTAG-Accelerator driver
|
||||
--enable-arm-jtag-ew Enable building support for the Olimex ARM-JTAG-EW
|
||||
Programmer
|
||||
--enable-jlink Enable building support for the Segger J-Link JTAG
|
||||
Programmer
|
||||
--enable-rlink Enable building support for the Raisonance RLink
|
||||
JTAG Programmer
|
||||
--enable-usbprog Enable building support for the usbprog JTAG
|
||||
Programmer
|
||||
--enable-vsllink Enable building support for the Versaloon-Link JTAG
|
||||
Programmer
|
||||
|
||||
--enable-oocd_trace Enable building support for the OpenOCD+trace ETM
|
||||
capture device
|
||||
|
||||
--enable-ep93xx Enable building support for EP93xx based SBCs
|
||||
--enable-at91rm9200 Enable building support for AT91RM9200 based SBCs
|
||||
|
||||
--enable-ecosboard Enable building support for eCos based JTAG debugger
|
||||
--enable-zy1000 Enable ZY1000 interface
|
||||
|
||||
--enable-minidriver-dummy
|
||||
Enable the dummy minidriver.
|
||||
|
||||
--enable-ioutil Enable ioutil functions - useful for standalone
|
||||
OpenOCD implementations
|
||||
--enable-httpd Enable builtin httpd server - useful for standalone
|
||||
OpenOCD implementations
|
||||
|
||||
Miscellaneous Configure Options
|
||||
-------------------------------
|
||||
|
||||
The following additional options may also be useful:
|
||||
|
||||
--disable-assert turn off assertions
|
||||
|
||||
--enable-verbose Enable verbose JTAG I/O messages (for debugging).
|
||||
--enable-verbose-jtag-io
|
||||
Enable verbose JTAG I/O messages (for debugging).
|
||||
--enable-verbose-usb-io Enable verbose USB I/O messages (for debugging)
|
||||
--enable-verbose-usb-comms
|
||||
Enable verbose USB communication messages (for
|
||||
debugging)
|
||||
--enable-malloc-logging Include free space in logging messages (requires
|
||||
malloc.h).
|
||||
|
||||
--disable-gccwarnings Disable extra gcc warnings during build.
|
||||
--disable-wextra Disable extra compiler warnings
|
||||
--disable-werror Do not treat warnings as errors
|
||||
|
||||
--disable-option-checking
|
||||
Ignore unrecognized --enable and --with options.
|
||||
--disable-dependency-tracking speeds up one-time build
|
||||
--enable-shared[=PKGS] build shared libraries [default=no]
|
||||
--enable-static[=PKGS] build static libraries [default=yes]
|
||||
|
||||
Parallel Port Dongles
|
||||
---------------------
|
||||
|
||||
If you want to access the parallel port using the PPDEV interface you
|
||||
have to specify both --enable-parport AND --enable-parport-ppdev, since
|
||||
the later option is an option to the parport driver.
|
||||
have to specify both --enable-parport AND --enable-parport-ppdev, since the
|
||||
the later option is an option to the parport driver (see
|
||||
http://forum.sparkfun.com/viewtopic.php?t=3795 for more info).
|
||||
|
||||
The same is true for the --enable-parport-giveio option, you have to
|
||||
use both the --enable-parport AND the --enable-parport-giveio option
|
||||
if you want to use giveio instead of ioperm parallel port access
|
||||
The same is true for the --enable-parport-giveio option, you
|
||||
have to use both the --enable-parport AND the --enable-parport-giveio
|
||||
option if you want to use giveio instead of ioperm parallel port access
|
||||
method.
|
||||
|
||||
FT2232C Based USB Dongles
|
||||
-------------------------
|
||||
|
||||
There are 2 methods of using the FTD2232, either (1) using the
|
||||
FTDICHIP.COM closed source driver, or (2) the open (and free) driver
|
||||
libftdi.
|
||||
|
||||
Using LIBFTDI
|
||||
-------------
|
||||
|
||||
The libftdi source code can be download from the following website:
|
||||
|
||||
http://www.intra2net.com/en/developer/libftdi/download.php
|
||||
|
||||
For both Linux and Windows, both libusb and libftdi must be built and
|
||||
installed. To use the newer FT2232H chips, supporting RTCK and USB high
|
||||
speed (480 Mbps), you need libftdi version 0.16 or newer. Many Linux
|
||||
distributions provide suitable packages for these libraries.
|
||||
|
||||
For Windows, libftdi is supported with versions 0.14 and later.
|
||||
|
||||
With these prerequisites met, configure the libftdi solution like this:
|
||||
|
||||
./configure --prefix=/path/for/your/install --enable-ft2232_libftdi
|
||||
|
||||
Then type ``make'', and perhaps ``make install''.
|
||||
|
||||
Using FTDI's FTD2XX
|
||||
-------------------
|
||||
|
||||
The (closed source) FTDICHIP.COM solution is faster on MS-Windows. That
|
||||
is the motivation for supporting it even though its licensing restricts
|
||||
it to non-redistributable OpenOCD binaries, and it is not available for
|
||||
all operating systems used with OpenOCD. You may, however, build such
|
||||
copies for personal use.
|
||||
|
||||
The FTDICHIP drivers come as either a (win32) ZIP file, or a (Linux)
|
||||
TAR.GZ file. You must unpack them ``some where'' convient. As of this
|
||||
writing FTDICHIP does not supply means to install these files "in an
|
||||
appropriate place."
|
||||
|
||||
If your distribution does not package these, there are several
|
||||
'./configure' options to solve this problem:
|
||||
|
||||
--with-ftd2xx-win32-zipdir
|
||||
Where (CYGWIN/MINGW) the zip file from ftdichip.com
|
||||
was unpacked <default=search>
|
||||
--with-ftd2xx-linux-tardir
|
||||
Where (Linux/Unix) the tar file from ftdichip.com
|
||||
was unpacked <default=search>
|
||||
--with-ftd2xx-lib Use static or shared ftd2xx libs on default static
|
||||
|
||||
If you are using the FTDICHIP.COM driver, download and unpack the
|
||||
Windows or Linux FTD2xx drivers from the following location:
|
||||
|
||||
http://www.ftdichip.com/Drivers/D2XX.htm
|
||||
|
||||
Remember, this library is binary-only, while OpenOCD is licenced
|
||||
according to GNU GPLv2 without any exceptions. That means that
|
||||
_distributing_ copies of OpenOCD built with the FTDI code would violate
|
||||
the OpenOCD licensing terms.
|
||||
|
||||
Linux Notes
|
||||
***********
|
||||
|
||||
The Linux tar.gz archive contains a directory named libftd2xx0.4.16
|
||||
(or similar). Assuming that you have extracted this archive in the same
|
||||
directory as the OpenOCD package, you could configure with options like
|
||||
the following:
|
||||
|
||||
./configure \
|
||||
--enable-ft2232_ftd2xx \
|
||||
--with-ft2xx-linux-tardir=../libftd2xx0.4.16 \
|
||||
... other options ...
|
||||
|
||||
Note that on Linux there is no good reason to use these FTDI binaries;
|
||||
they are no faster (on Linux) than libftdi, and cause licensing issues.
|
||||
|
||||
==========================
|
||||
Obtaining OpenOCD From GIT
|
||||
@@ -316,7 +383,7 @@ Obtaining OpenOCD From GIT
|
||||
You can download the current GIT version with a GIT client of your
|
||||
choice from the main repository:
|
||||
|
||||
git://git.code.sf.net/p/openocd/code
|
||||
git://openocd.git.sourceforge.net/gitroot/openocd/openocd
|
||||
|
||||
You may prefer to use a mirror:
|
||||
|
||||
@@ -327,16 +394,29 @@ Using the GIT command line client, you might use the following command
|
||||
to set up a local copy of the current repository (make sure there is no
|
||||
directory called "openocd" in the current directory):
|
||||
|
||||
git clone git://git.code.sf.net/p/openocd/code openocd
|
||||
git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
|
||||
|
||||
Then you can update that at your convenience using
|
||||
|
||||
git pull
|
||||
|
||||
There is also a gitweb interface, which you can use either to browse
|
||||
the repository or to download arbitrary snapshots using HTTP:
|
||||
the repository or to downlad arbitrary snapshots using HTTP:
|
||||
|
||||
http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd
|
||||
http://repo.or.cz/w/openocd.git
|
||||
|
||||
Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
|
||||
each at this writing.
|
||||
|
||||
|
||||
Tips For Building From a GIT Repository
|
||||
---------------------------------------
|
||||
|
||||
Building OpenOCD from a repository requires a recent version of the GNU
|
||||
autotools (autoconf >= 2.59 and automake >= 1.9).
|
||||
|
||||
1) Run './bootstrap' to create the 'configure' script and prepare
|
||||
the build process for your host system.
|
||||
|
||||
2) Run './configure --enable-maintainer-mode' with other options.
|
||||
|
||||
98
README.Win32
Normal file
98
README.Win32
Normal file
@@ -0,0 +1,98 @@
|
||||
Building OpenOCD for Windows
|
||||
----------------------------
|
||||
|
||||
For building on Windows, you have to use CygWin. Make sure that your
|
||||
PATH environment variable contains no other locations with Unix utilities
|
||||
(like UnxUtils). Those tools can't handle the CygWin paths, resulting
|
||||
in obscure dependency errors. This was an observation gathered from the
|
||||
logs of one user; please correct us if this is wrong.
|
||||
|
||||
The following URL is a good reference if you want to build OpenOCD
|
||||
under CygWin:
|
||||
|
||||
http://forum.sparkfun.com/viewtopic.php?t=11221
|
||||
|
||||
Alternatively you can build the Windows binary under Linux using
|
||||
MinGW cross compiler. The following documents some tips of
|
||||
using this cross build option.
|
||||
|
||||
libusb-win32
|
||||
------------
|
||||
|
||||
You can choose to use the libusb-win32 binary distribution from
|
||||
its SourceForge page. As of this writing, the latest version
|
||||
is 0.1.12.2. This is the recommend version to use since it fixed
|
||||
an issue with USB composite device and this is important for FTDI
|
||||
based JTAG debuggers.
|
||||
|
||||
http://sourceforge.net/projects/libusb-win32/
|
||||
|
||||
You need to download the libusb-win32-device-bin-0.1.12.2.tar.gz
|
||||
package. Extract this file into a temp directory.
|
||||
|
||||
Copy the file libusb-win32-device-bin-0.1.12.2\include\usb.h
|
||||
to your MinGW include directory.
|
||||
|
||||
Copy the library libusb-win32-device-bin-0.1.12.2\lib\gcc\libusb.a
|
||||
to your MinGW library directory.
|
||||
|
||||
Take note that different Linux distributions often have different MinGW
|
||||
installation directory. Some of them also put the library and include
|
||||
into a separate sys-root directory.
|
||||
|
||||
When the libusb-win32 repository is more current than its release code,
|
||||
you could build that instead.
|
||||
|
||||
These are the instruction from the libusb-win32 Makefile:
|
||||
|
||||
# If you're cross-compiling and your mingw32 tools are called
|
||||
# i586-mingw32msvc-gcc and so on, then you can compile libusb-win32
|
||||
# by running
|
||||
# make host_prefix=i586-mingw32msvc all
|
||||
|
||||
libftdi
|
||||
-------
|
||||
|
||||
The author does not provide Windows binary. You can build it from a
|
||||
released source tarball or the git tree.
|
||||
|
||||
If you are using the git tree, the following are the instructions from
|
||||
README.mingw. You will need to have the cmake utility installed.
|
||||
|
||||
- Edit Toolchain-mingw32.cmake to point to the correct MinGW
|
||||
installation.
|
||||
- Create a build directory like "mkdir build-win32", e.g in ../libftdi/
|
||||
- cd into that directory and run
|
||||
"cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake .."
|
||||
- Copy src/ftdi.h to your MinGW include directory.
|
||||
- Copy build-win32/src/*.a to your MinGW lib directory.
|
||||
|
||||
libftd2xx
|
||||
---------
|
||||
|
||||
The Cygwin/Win32 ZIP file contains a directory named ftd2xx.win32.
|
||||
After being extracted, the directory does not need further preparation.
|
||||
Instead, its path must be provided to the --with-ftd2xx-win32-zipdir
|
||||
configure option, as shown in the next section.
|
||||
|
||||
OpenOCD
|
||||
-------
|
||||
|
||||
Now you can build OpenOCD under Linux using MinGW. You need to use
|
||||
--build and --host configure options.
|
||||
|
||||
To use libftdi:
|
||||
|
||||
./configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc \
|
||||
--enable-ft2232_libftdi \
|
||||
... other options ...
|
||||
|
||||
To use ftd2xx:
|
||||
|
||||
./configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc \
|
||||
--enable-ft2232_ftd2xx \
|
||||
--with-ftd2xx-win32-zipdir=/path/to/libftd2xx-win32 \
|
||||
... other options ...
|
||||
|
||||
If you are using the GIT repository, see the README file for additional
|
||||
instructions about configuring and building OpenOCD.
|
||||
@@ -1,56 +0,0 @@
|
||||
Building OpenOCD for Windows
|
||||
----------------------------
|
||||
|
||||
You can build OpenOCD for Windows natively with either MinGW-w64/MSYS
|
||||
or Cygwin (plain MinGW might work with --disable-werror but is not
|
||||
recommended as it doesn't provide enough C99 compatibility).
|
||||
Alternatively, one can cross-compile it using MinGW-w64 on a *nix
|
||||
host. See README for the generic instructions.
|
||||
|
||||
Also, the MSYS2 project provides both ready-made binaries and an easy
|
||||
way to self-compile from their software repository out of the box.
|
||||
|
||||
Native MinGW-w64/MSYS compilation
|
||||
-----------------------------
|
||||
|
||||
As MSYS doesn't come with pkg-config pre-installed, you need to add it
|
||||
manually. The easiest way to do that is to download pkg-config-lite
|
||||
from:
|
||||
|
||||
http://sourceforge.net/projects/pkgconfiglite/
|
||||
|
||||
Then simply unzip the archive to the root directory of your MinGW-w64
|
||||
installation.
|
||||
|
||||
USB adapters
|
||||
------------
|
||||
|
||||
For the adapters that use a HID-based protocol, e.g. CMSIS-DAP, you do
|
||||
not need to perform any additional configuration.
|
||||
|
||||
For all the others you usually need to have WinUSB.sys (or
|
||||
libusbK.sys) driver installed. Some vendor software (e.g. for
|
||||
ST-LINKv2) does it on its own. For the other cases the easiest way to
|
||||
assign WinUSB to a device is to use the latest Zadig installer:
|
||||
|
||||
http://zadig.akeo.ie
|
||||
|
||||
When using a composite USB device, it's often necessary to assign
|
||||
WinUSB.sys to the composite parent instead of the specific
|
||||
interface. To do that one needs to activate an advanced option in the
|
||||
Zadig installer.
|
||||
|
||||
If you need to use the same adapter with other applications that may
|
||||
require another driver, a solution for Windows Vista and above is to
|
||||
activate the IgnoreHWSerNum registry setting for the USB device.
|
||||
|
||||
That setting forces Windows to associate the driver per port instead of
|
||||
per serial number, the same behaviour as when the device does not contain
|
||||
a serial number. So different drivers can be installed for the adapter on
|
||||
different ports and you just need to plug the adapter into the correct
|
||||
port depending on which application to use.
|
||||
|
||||
For more information, see:
|
||||
|
||||
http://msdn.microsoft.com/en-us/library/windows/hardware/jj649944(v=vs.85).aspx
|
||||
http://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm
|
||||
54
README.macOS
54
README.macOS
@@ -1,54 +0,0 @@
|
||||
Building OpenOCD for macOS
|
||||
--------------------------
|
||||
|
||||
There are a few prerequisites you will need first:
|
||||
|
||||
- Xcode (install from the AppStore)
|
||||
- Command Line Tools (install from Xcode -> Preferences -> Downloads)
|
||||
- Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
|
||||
or
|
||||
- Homebrew (http://mxcl.github.io/homebrew/)
|
||||
or
|
||||
- MacPorts (http://www.macports.org/install.php)
|
||||
|
||||
|
||||
If you're building manually you need Texinfo version 5.0 or later. The
|
||||
simplest way to get it is to use Homebrew (brew install texinfo) and
|
||||
then ``export PATH=/usr/local/opt/texinfo/bin:$PATH``.
|
||||
|
||||
|
||||
With Gentoo Prefix you can build the release version or the latest
|
||||
devel version (-9999) the usual way described in the Gentoo
|
||||
documentation. Alternatively, install the prerequisites and build
|
||||
manually from the sources.
|
||||
|
||||
|
||||
With Homebrew you can either run:
|
||||
brew install [--HEAD] openocd (where optional --HEAD asks brew to
|
||||
install the current git version)
|
||||
or
|
||||
brew install libtool automake libusb [hidapi] [libftdi]
|
||||
(to install the needed dependencies and then proceed with the
|
||||
manual building procedure)
|
||||
|
||||
|
||||
For building with MacPorts you need to run:
|
||||
sudo port install libtool automake autoconf pkgconfig \
|
||||
libusb [libftdi1]
|
||||
|
||||
You should also specify LDFLAGS and CPPFLAGS to allow configure to use
|
||||
MacPorts' libraries, so run configure like this:
|
||||
LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
|
||||
|
||||
|
||||
See README for the generic building instructions.
|
||||
|
||||
If you're using a USB adapter and have a driver kext matched to it,
|
||||
you will need to unload it prior to running OpenOCD. E.g. with Apple
|
||||
driver (OS X 10.9 or later) for FTDI run:
|
||||
sudo kextunload -b com.apple.driver.AppleUSBFTDI
|
||||
for FTDI vendor driver use:
|
||||
sudo kextunload FTDIUSBSerialDriver.kext
|
||||
|
||||
To learn more on the topic please refer to the official libusb FAQ:
|
||||
https://github.com/libusb/libusb/wiki/FAQ
|
||||
118
TODO
118
TODO
@@ -1,4 +1,4 @@
|
||||
// This file is part of the Doxygen Developer Manual
|
||||
// This file is part of the Doyxgen Developer Manual
|
||||
/** @page tasks Pending and Open Tasks
|
||||
|
||||
This page lists pending and open tasks being considered or worked upon
|
||||
@@ -27,8 +27,8 @@ This section provides possible things to improve with OpenOCD's TCL support.
|
||||
parameters. Currently variables assigned through one such parameter
|
||||
command/script are unset before the next one is invoked.
|
||||
|
||||
- Isolate all TCL command support:
|
||||
- Pure C CLI implementations using --disable-builtin-tcl.
|
||||
- Isolate all TCL command support:
|
||||
- Pure C CLI implementations using --disable-builtin-tcl.
|
||||
- Allow developers to build new dongles using OpenOCD's JTAG core.
|
||||
- At first, provide only low-level JTAG support; target layer and
|
||||
above rely heavily on scripting event mechanisms.
|
||||
@@ -37,38 +37,16 @@ This section provides possible things to improve with OpenOCD's TCL support.
|
||||
- See src/jtag/core.c and src/jtag/tcl.c for an example.
|
||||
- allow some of these TCL command modules to be dynamically loadable?
|
||||
|
||||
@section thelistadapter Adapter
|
||||
@section thelistjtag JTAG
|
||||
|
||||
This section list issues that need to be resolved in the Adapter layer.
|
||||
This section list issues that need to be resolved in the JTAG layer.
|
||||
|
||||
@subsection thelistadapterrework Code restructuring
|
||||
|
||||
This section lists pending reworks to complete the restructure from the
|
||||
old JTAG centric implementation to a generic Adapter layer.
|
||||
This restructuring is very invasive and will prevent the merge of several
|
||||
changes pending in gerrit.
|
||||
|
||||
- rename folder src/jtag/ to src/adapter/
|
||||
- rename var "jtag" to "adapter" in src/jtag/core.c
|
||||
- split content of src/adapter/ in the different protocols jtag.[ch],
|
||||
swd.[ch], ...
|
||||
- wrap the calls to adapter->transport_ops->api() with transport_api()
|
||||
and reduce the visibility of global var "adapter"
|
||||
- complete the migration of JTAG-only drivers to adapter->reset()
|
||||
- try to remove JTAG_SLEEP also from JTAG mode?
|
||||
- tap_set_state(TAP_RESET) is already done in src/jtag/core.c. No need
|
||||
to replicate it in the drivers, apart in case the driver sets TRST
|
||||
independently
|
||||
- add .hla_ops to "adapter"
|
||||
- HLA is a API level (.hla_ops). Transport should simply be {jtag,swd},
|
||||
not {hla_jtag,hla_swd}.
|
||||
|
||||
@subsection thelistadapterjtagcore JTAG Core
|
||||
@subsection thelistjtagcore JTAG Core
|
||||
|
||||
The following tasks have been suggested for cleaning up the JTAG layer:
|
||||
|
||||
- use tap_set_state everywhere to allow logging TAP state transitions
|
||||
- Encapsulate cmd_queue_cur_state and related variable handling.
|
||||
- Encapsulate cmd_queue_cur_state and related varaible handling.
|
||||
- add slick 32 bit versions of jtag_add_xxx_scan() that avoids
|
||||
buf_set_u32() calls and other evidence of poor impedance match between
|
||||
API and calling code. New API should cut down # of lines in calling
|
||||
@@ -85,9 +63,9 @@ The following tasks have been suggested for adding new core JTAG support:
|
||||
- (ab)use bit-banging JTAG interfaces to emulate SPI/UART
|
||||
- allow SPI to program flash, MCUs, etc.
|
||||
|
||||
@subsection thelistadapterinterfaces Interface drivers
|
||||
@subsection thelistjtaginterfaces JTAG Interfaces
|
||||
|
||||
There are some known bugs to fix in Interface drivers:
|
||||
There are some known bugs to fix in JTAG adapter drivers:
|
||||
|
||||
- For JTAG_STATEMOVE to TAP_RESET, all drivers must ignore the current
|
||||
recorded state. The tap_get_state() call won't necessarily return
|
||||
@@ -107,7 +85,7 @@ There are some known bugs to fix in Interface drivers:
|
||||
Workaround: use "tms_sequence long" @par
|
||||
https://lists.berlios.de/pipermail/openocd-development/2009-July/009426.html
|
||||
|
||||
The following tasks have been suggested for improving OpenOCD's JTAG
|
||||
The following tasks have been suggeted for improving OpenOCD's JTAG
|
||||
interface support:
|
||||
|
||||
- rework USB communication to be more robust. Two possible options are:
|
||||
@@ -115,6 +93,9 @@ interface support:
|
||||
-# rewrite implementation to use non-blocking I/O
|
||||
- J-Link driver:
|
||||
- fix to work with long scan chains, such as R.Doss's svf test.
|
||||
- FT2232 (libftdi):
|
||||
- make performance comparable to alternatives (on Win32, D2XX is faster)
|
||||
- make usability comparable to alternatives
|
||||
- Autodetect USB based adapters; this should be easy on Linux. If there's
|
||||
more than one, list the options; otherwise, just select that one.
|
||||
|
||||
@@ -129,6 +110,10 @@ of a minidriver is required to capture all the jtag_add_xxx()
|
||||
fn's at a high enough level and repackage these cmd's as
|
||||
TCP/IP packets handled by the server.
|
||||
|
||||
@section thelistswd Serial Wire Debug
|
||||
|
||||
- implement Serial Wire Debug interface
|
||||
|
||||
@section thelistbs Boundary Scan Support
|
||||
|
||||
- add STAPL support?
|
||||
@@ -157,14 +142,6 @@ Once the above are completed:
|
||||
https://lists.berlios.de/pipermail/openocd-development/2009-May/006590.html
|
||||
- regression: "reset halt" between 729(works) and 788(fails): @par
|
||||
https://lists.berlios.de/pipermail/openocd-development/2009-July/009206.html
|
||||
- registers
|
||||
- add flush-value operation, call them all on resume/reset
|
||||
- mcr/mrc target->type support
|
||||
- missing from ARM920t, ARM966e, XScale.
|
||||
It's possible that the current syntax is unable to support read-modify-write
|
||||
operations(see arm966e).
|
||||
- mcr/mrc - retire cp15 commands when there the mrc/mrc commands have been
|
||||
tested from: arm926ejs, arm720t, cortex_a8
|
||||
- ARM7/9:
|
||||
- clean up "arm9tdmi vector_catch". Available for some arm7 cores? @par
|
||||
https://lists.berlios.de/pipermail/openocd-development/2009-October/011488.html
|
||||
@@ -180,25 +157,18 @@ https://lists.berlios.de/pipermail/openocd-development/2009-October/011506.html
|
||||
use hardware stepping if available.
|
||||
- mdb can return garbage data if read byte operation fails for
|
||||
a memory region(16 & 32 byte access modes may be supported). Is this
|
||||
a bug in the .MX31 PDK init script? Try on i.MX31 PDK:
|
||||
a bug in the .MX31 PDK init script? Try on i.MX31 PDK:
|
||||
mdw 0xb80005f0 0x8, mdh 0xb80005f0 0x10, mdb 0xb80005f0 0x20. mdb returns
|
||||
garabage.
|
||||
- implement missing functionality (grep FNC_INFO_NOTIMPLEMENTED ...)
|
||||
- Thumb2 single stepping: ARM1156T2 needs simulator support
|
||||
- Cortex-A8 support (ML)
|
||||
- thumb support is missing: ISTR ARMv6 requires Thumb.
|
||||
ARM1156 has Thumb2; ARM1136 doesn't.
|
||||
- Cortex A8 support (ML)
|
||||
- add target implementation (ML)
|
||||
- Cortex-M3 support
|
||||
- when stepping, only write dirtied registers (be faster)
|
||||
- when connecting to halted core, fetch registers (startup is quirky)
|
||||
- Generic ARM run_algorithm() interface
|
||||
- tagged struct wrapping ARM instructions and metadata
|
||||
- not revision-specific (current: ARMv4+ARMv5 -or- ARMv6 -or- ARMv7)
|
||||
- usable with at least arm_nandwrite() and generic CFI drivers
|
||||
- ETM
|
||||
- don't show FIFOFULL registers if they're not supported
|
||||
- use comparators to get more breakpoints and watchpoints
|
||||
- add "etm drivers" command
|
||||
- trace driver init() via examine() paths only, not setup()/reset
|
||||
- MC1322x support (JW/DE?)
|
||||
- integrate and test support from JW (and DE?)
|
||||
- get working with a known good interface (i.e. not today's jlink)
|
||||
@@ -222,27 +192,18 @@ https://lists.berlios.de/pipermail/openocd-development/2009-October/011506.html
|
||||
|
||||
@section thelistsvf SVF/XSVF
|
||||
|
||||
- develop SVF unit tests
|
||||
- develop XSVF unit tests
|
||||
- develop SVF unit tests
|
||||
- develop XSVF unit tests
|
||||
|
||||
@section thelistflash Flash Support
|
||||
|
||||
- finish documentation for the following flash drivers:
|
||||
- avr
|
||||
- ecosflash
|
||||
- pic32mx
|
||||
- ocl
|
||||
- str9xpec
|
||||
|
||||
- Don't expect writing all-ones to be a safe way to write without
|
||||
changing bit values. Minimally it loses on flash modules with
|
||||
internal ECC, where it may change the ECC.
|
||||
- NOR flash_write_unlock() does that between sectors
|
||||
- there may be other cases too
|
||||
|
||||
- Make sure all commands accept either a bank name or a bank number,
|
||||
and be sure both identifiers show up in "flash banks" and "nand list".
|
||||
Right now the user-friendly names are pretty much hidden...
|
||||
|
||||
@subsection thelistflashcfi CFI
|
||||
|
||||
- finish implementing bus width/chip width handling (suggested by NC)
|
||||
@@ -324,11 +285,11 @@ These ideas were first introduced here: @par
|
||||
- automatically detect the features that are available, unless
|
||||
options were specifically provided to configure
|
||||
- provide a report of the drivers that will be build at the end of
|
||||
running configure, so the users can verify which drivers will be
|
||||
running configure, so the users can verify which driverswill be
|
||||
built during 'make' (and their options) .
|
||||
- eliminate sources of confusion in @c bootstrap script:
|
||||
-# Make @c bootstrap call 'configure --enable-maintainer-mode \<opts\>'?
|
||||
-# Add @c buildstrap script to assist with bootstrap and configure steps.
|
||||
-# Add @c buildstrap script to assist with boostrap and configure steps.
|
||||
- automatically build tool-chains required for cross-compiling
|
||||
- produce mingw32, arm-elf, others using in-tree scripts
|
||||
- build all required target code from sources
|
||||
@@ -339,30 +300,13 @@ These ideas were first introduced here: @par
|
||||
The following architectural tasks need to be accomplished and should be
|
||||
fairly easy to complete:
|
||||
|
||||
|
||||
- use dynamic allocations for working memory. Scan & fix code
|
||||
for excessive stack allocations. take linux/scripts/checkstack.pl and
|
||||
see what the worst offenders are. Dynamic stack allocations are found
|
||||
at the bottom of the list below. Example, on amd64:
|
||||
|
||||
$ objdump -d | checkstack.pl | head -10
|
||||
0x004311e3 image_open [openocd]: 13464
|
||||
0x00431301 image_open [openocd]: 13464
|
||||
0x004237a4 target_array2mem [openocd]: 4376
|
||||
0x0042382b target_array2mem [openocd]: 4376
|
||||
0x00423e74 target_mem2array [openocd]: 4360
|
||||
0x00423ef9 target_mem2array [openocd]: 4360
|
||||
0x00404aed handle_svf_command [openocd]: 2248
|
||||
0x00404b7e handle_svf_command [openocd]: 2248
|
||||
0x00413581 handle_flash_fill_command [openocd]: 2200
|
||||
0x004135fa handle_flash_fill_command [openocd]: 2200
|
||||
- clean-up code to match style guides
|
||||
- factor code to eliminate duplicated functionality
|
||||
- rewrite code that uses casts to access 16-bit and larger types
|
||||
from unaligned memory addresses
|
||||
- libopenocd support: @par
|
||||
https://lists.berlios.de/pipermail/openocd-development/2009-May/006405.html
|
||||
- review and clean up interface/target/flash APIs
|
||||
- review and clean up interface/target/flash APIs
|
||||
|
||||
The following strategic tasks will require ambition, knowledge, and time
|
||||
to complete:
|
||||
@@ -380,10 +324,9 @@ to complete:
|
||||
- Develop milestone and release guidelines, processes, and scripts.
|
||||
- Develop "style" guidelines (and scripts) for maintainers:
|
||||
- reviewing patches
|
||||
- committing to git
|
||||
- Review Users' Guide for documentation errors or omissions
|
||||
- "capture" and "ocd_find" commands
|
||||
- Update Developer's Manual (doxygen output)
|
||||
- committing to Subversion
|
||||
- Review The Guide for OpenOCD Users for documentation errors or omissions
|
||||
- Update The Manual for OpenOCD Developerrs:
|
||||
- Add documentation describing the architecture of each module
|
||||
- Provide more Technical Primers to bootstrap contributor knowledge
|
||||
|
||||
@@ -391,3 +334,4 @@ to complete:
|
||||
/** @file
|
||||
This file contains the @ref thelist page.
|
||||
*/
|
||||
|
||||
|
||||
57
bootstrap
57
bootstrap
@@ -1,53 +1,26 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#!/bin/sh -e
|
||||
# Run the autotools bootstrap sequence to create the configure script
|
||||
|
||||
# Abort execution on error
|
||||
set -e
|
||||
|
||||
if which libtoolize > /dev/null; then
|
||||
libtoolize="libtoolize"
|
||||
elif which glibtoolize >/dev/null; then
|
||||
libtoolize="glibtoolize"
|
||||
if libtoolize --version >/dev/null 2>&1; then
|
||||
libtoolize="libtoolize"
|
||||
elif glibtoolize --version >/dev/null 2>&1; then
|
||||
libtoolize="glibtoolize"
|
||||
else
|
||||
echo "$0: Error: libtool is required" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "nosubmodule" ]; then
|
||||
SKIP_SUBMODULE=1
|
||||
elif [ -n "$1" ]; then
|
||||
echo "$0: Illegal argument $1"
|
||||
echo "USAGE: $0 [nosubmodule]"
|
||||
exit 1
|
||||
echo "libtool is required" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# bootstrap the autotools
|
||||
(
|
||||
set -x
|
||||
aclocal --warnings=all
|
||||
# Apparently, not all versions of libtoolize support option --warnings=all .
|
||||
aclocal
|
||||
${libtoolize} --automake --copy
|
||||
autoconf --warnings=all
|
||||
autoheader --warnings=all
|
||||
automake --warnings=all --gnu --add-missing --copy
|
||||
autoconf
|
||||
autoheader
|
||||
automake --gnu --add-missing --copy
|
||||
)
|
||||
|
||||
if [ -n "$SKIP_SUBMODULE" ]; then
|
||||
echo "Skipping submodule setup"
|
||||
else
|
||||
echo "Setting up submodules"
|
||||
git submodule init
|
||||
git submodule update
|
||||
fi
|
||||
|
||||
if [ -x src/jtag/drivers/libjaylink/autogen.sh ]; then
|
||||
(
|
||||
cd src/jtag/drivers/libjaylink
|
||||
./autogen.sh
|
||||
)
|
||||
fi
|
||||
|
||||
echo "Bootstrap complete. Quick build instructions:"
|
||||
echo "./configure ...."
|
||||
# AM_MAINTAINER_MODE requires --enable-maintainer-mode from everyone using
|
||||
# current source snapshots (working from GIT, or some source snapshot, etc)
|
||||
# otherwise the documentation will fail to build due to missing version.texi
|
||||
echo "Bootstrap complete; you can './configure --enable-maintainer-mode ....'"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
dnl AC_CONFIG_SUBDIRS does not allow configure options to be passed
|
||||
dnl to subdirs, this function allows that by creating a configure.gnu
|
||||
dnl script that prepends configure options and then calls the real
|
||||
dnl configure script
|
||||
AC_DEFUN([AX_CONFIG_SUBDIR_OPTION],
|
||||
[
|
||||
AC_CONFIG_SUBDIRS([$1])
|
||||
|
||||
m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu],
|
||||
[echo -e '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"' > "$srcdir/$1/configure.gnu"
|
||||
])
|
||||
])
|
||||
846
configure.ac
846
configure.ac
@@ -1,846 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([openocd], [0.12.0-rc1],
|
||||
[OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
|
||||
AC_CONFIG_SRCDIR([src/openocd.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
m4_include([config_subdir.m4])dnl
|
||||
|
||||
# check for makeinfo before calling AM_INIT_AUTOMAKE
|
||||
AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
|
||||
AS_IF([test "x$MAKEINFO" = "x"], [
|
||||
MAKEINFO='echo makeinfo missing; true'
|
||||
AC_MSG_WARN([Info documentation will not be built.])
|
||||
])
|
||||
AC_SUBST([MAKEINFO])
|
||||
|
||||
AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip subdir-objects])
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_LANG([C])
|
||||
AC_PROG_CC
|
||||
# autoconf 2.70 obsoletes AC_PROG_CC_C99 and includes it in AC_PROG_CC
|
||||
m4_version_prereq([2.70],[],[AC_PROG_CC_C99])
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# If macro PKG_PROG_PKG_CONFIG is not available, Autoconf generates a misleading error message,
|
||||
# so check for existence first, and otherwise provide helpful advice.
|
||||
m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal(m4_normalize([
|
||||
Macro PKG_PROG_PKG_CONFIG is not available.
|
||||
It is usually defined in file pkg.m4 provided by package pkg-config.]))])
|
||||
PKG_PROG_PKG_CONFIG([0.23])
|
||||
|
||||
dnl disable checks for C++, Fortran and GNU Java Compiler
|
||||
m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
|
||||
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
|
||||
m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])
|
||||
AC_DISABLE_SHARED
|
||||
LT_INIT
|
||||
AC_SUBST([LIBTOOL_DEPS])
|
||||
|
||||
dnl configure checks required for Jim files (these are obsolete w/ C99)
|
||||
AC_C_CONST
|
||||
AC_TYPE_LONG_LONG_INT
|
||||
|
||||
AC_SEARCH_LIBS([ioperm], [ioperm])
|
||||
AC_SEARCH_LIBS([dlopen], [dl])
|
||||
AC_SEARCH_LIBS([openpty], [util])
|
||||
|
||||
AC_CHECK_HEADERS([sys/socket.h])
|
||||
AC_CHECK_HEADERS([elf.h])
|
||||
AC_EGREP_HEADER(Elf64_Ehdr, [elf.h], [
|
||||
AC_DEFINE([HAVE_ELF64], [1], [Define to 1 if the system has the type `Elf64_Ehdr'.])
|
||||
])
|
||||
AC_CHECK_HEADERS([fcntl.h])
|
||||
AC_CHECK_HEADERS([malloc.h])
|
||||
AC_CHECK_HEADERS([netdb.h])
|
||||
AC_CHECK_HEADERS([poll.h])
|
||||
AC_CHECK_HEADERS([strings.h])
|
||||
AC_CHECK_HEADERS([sys/ioctl.h])
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
AC_CHECK_HEADERS([sys/select.h])
|
||||
AC_CHECK_HEADERS([sys/stat.h])
|
||||
AC_CHECK_HEADERS([sys/sysctl.h])
|
||||
AC_CHECK_HEADERS([sys/time.h])
|
||||
AC_CHECK_HEADERS([sys/types.h])
|
||||
AC_CHECK_HEADERS([unistd.h])
|
||||
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h netinet/tcp.h], [], [], [dnl
|
||||
#include <stdio.h>
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_HEADER_ASSERT
|
||||
AC_HEADER_STDBOOL
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_CHECK_FUNCS([strndup])
|
||||
AC_CHECK_FUNCS([strnlen])
|
||||
AC_CHECK_FUNCS([gettimeofday])
|
||||
AC_CHECK_FUNCS([usleep])
|
||||
AC_CHECK_FUNCS([realpath])
|
||||
|
||||
# guess-rev.sh only exists in the repository, not in the released archives
|
||||
AC_MSG_CHECKING([whether to build a release])
|
||||
AS_IF([test -x "$srcdir/guess-rev.sh"], [
|
||||
build_release=no
|
||||
], [
|
||||
build_release=yes
|
||||
])
|
||||
AC_MSG_RESULT([$build_release])
|
||||
|
||||
# Adapter drivers
|
||||
# 1st column -- configure option
|
||||
# 2nd column -- description
|
||||
# 3rd column -- symbol used for both config.h and automake
|
||||
m4_define([ADAPTER_ARG], [m4_argn([1], $1)])
|
||||
m4_define([ADAPTER_DESC], [m4_argn([2], $1)])
|
||||
m4_define([ADAPTER_SYM], [m4_argn([3], $1)])
|
||||
m4_define([ADAPTER_VAR], [enable_[]ADAPTER_ARG($1)])
|
||||
m4_define([ADAPTER_OPT], [m4_translit(ADAPTER_ARG($1), [_], [-])])
|
||||
|
||||
m4_define([USB1_ADAPTERS],
|
||||
[[[ftdi], [MPSSE mode of FTDI based devices], [FTDI]],
|
||||
[[stlink], [ST-Link Programmer], [HLADAPTER_STLINK]],
|
||||
[[ti_icdi], [TI ICDI JTAG Programmer], [HLADAPTER_ICDI]],
|
||||
[[ulink], [Keil ULINK JTAG Programmer], [ULINK]],
|
||||
[[usb_blaster_2], [Altera USB-Blaster II Compatible], [USB_BLASTER_2]],
|
||||
[[ft232r], [Bitbang mode of FT232R based devices], [FT232R]],
|
||||
[[vsllink], [Versaloon-Link JTAG Programmer], [VSLLINK]],
|
||||
[[xds110], [TI XDS110 Debug Probe], [XDS110]],
|
||||
[[cmsis_dap_v2], [CMSIS-DAP v2 Compliant Debugger], [CMSIS_DAP_USB]],
|
||||
[[osbdm], [OSBDM (JTAG only) Programmer], [OSBDM]],
|
||||
[[opendous], [eStick/opendous JTAG Programmer], [OPENDOUS]],
|
||||
[[armjtagew], [Olimex ARM-JTAG-EW Programmer], [ARMJTAGEW]],
|
||||
[[rlink], [Raisonance RLink JTAG Programmer], [RLINK]],
|
||||
[[usbprog], [USBProg JTAG Programmer], [USBPROG]],
|
||||
[[esp_usb_jtag], [Espressif JTAG Programmer], [ESP_USB_JTAG]]])
|
||||
|
||||
m4_define([DEPRECATED_USB1_ADAPTERS],
|
||||
[[[aice], [Andes JTAG Programmer (deprecated)], [AICE]]])
|
||||
|
||||
m4_define([HIDAPI_ADAPTERS],
|
||||
[[[cmsis_dap], [CMSIS-DAP Compliant Debugger], [CMSIS_DAP_HID]],
|
||||
[[nulink], [Nu-Link Programmer], [HLADAPTER_NULINK]]])
|
||||
|
||||
m4_define([HIDAPI_USB1_ADAPTERS],
|
||||
[[[kitprog], [Cypress KitProg Programmer], [KITPROG]]])
|
||||
|
||||
m4_define([LIBFTDI_ADAPTERS],
|
||||
[[[usb_blaster], [Altera USB-Blaster Compatible], [USB_BLASTER]],
|
||||
[[presto], [ASIX Presto Adapter], [PRESTO]]])
|
||||
|
||||
m4_define([LIBFTDI_USB1_ADAPTERS],
|
||||
[[[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
|
||||
|
||||
m4_define([LIBGPIOD_ADAPTERS],
|
||||
[[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]])
|
||||
|
||||
m4_define([LIBJAYLINK_ADAPTERS],
|
||||
[[[jlink], [SEGGER J-Link Programmer], [JLINK]]])
|
||||
|
||||
m4_define([PCIE_ADAPTERS],
|
||||
[[[xlnx_pcie_xvc], [Xilinx XVC/PCIe], [XLNX_PCIE_XVC]]])
|
||||
|
||||
m4_define([SERIAL_PORT_ADAPTERS],
|
||||
[[[buspirate], [Bus Pirate], [BUS_PIRATE]]])
|
||||
|
||||
m4_define([OPTIONAL_LIBRARIES],
|
||||
[[[capstone], [Use Capstone disassembly framework], []]])
|
||||
|
||||
AC_ARG_ENABLE([doxygen-html],
|
||||
AS_HELP_STRING([--disable-doxygen-html],
|
||||
[Disable building Doxygen manual as HTML.]),
|
||||
[doxygen_as_html=$enableval], [doxygen_as_html=yes])
|
||||
AC_SUBST([doxygen_as_html])
|
||||
AC_MSG_CHECKING([whether to build Doxygen as HTML])
|
||||
AC_MSG_RESULT([$doxygen_as_html])
|
||||
|
||||
AC_ARG_ENABLE([doxygen-pdf],
|
||||
AS_HELP_STRING([--enable-doxygen-pdf],
|
||||
[Enable building Doxygen manual as PDF.]),
|
||||
[doxygen_as_pdf=$enableval], [doxygen_as_pdf=no])
|
||||
AC_SUBST([doxygen_as_pdf])
|
||||
AC_MSG_CHECKING([whether to build Doxygen as PDF])
|
||||
AC_MSG_RESULT([$doxygen_as_pdf])
|
||||
|
||||
AC_ARG_ENABLE([gccwarnings],
|
||||
AS_HELP_STRING([--disable-gccwarnings], [Disable compiler warnings]),
|
||||
[gcc_warnings=$enableval], [gcc_warnings=yes])
|
||||
|
||||
AC_ARG_ENABLE([wextra],
|
||||
AS_HELP_STRING([--disable-wextra], [Disable extra compiler warnings]),
|
||||
[gcc_wextra=$enableval], [gcc_wextra=$gcc_warnings])
|
||||
|
||||
AC_ARG_ENABLE([werror],
|
||||
AS_HELP_STRING([--disable-werror], [Do not treat warnings as errors]),
|
||||
[gcc_werror=$enableval], [gcc_werror=$gcc_warnings])
|
||||
|
||||
# set default verbose options, overridden by following options
|
||||
debug_usb_io=no
|
||||
debug_usb_comms=no
|
||||
|
||||
AC_ARG_ENABLE([verbose],
|
||||
AS_HELP_STRING([--enable-verbose],
|
||||
[Enable verbose JTAG I/O messages (for debugging).]),
|
||||
[
|
||||
debug_usb_io=$enableval
|
||||
debug_usb_comms=$enableval
|
||||
], [])
|
||||
|
||||
AC_ARG_ENABLE([verbose_usb_io],
|
||||
AS_HELP_STRING([--enable-verbose-usb-io],
|
||||
[Enable verbose USB I/O messages (for debugging)]),
|
||||
[debug_usb_io=$enableval], [])
|
||||
|
||||
AC_ARG_ENABLE([verbose_usb_comms],
|
||||
AS_HELP_STRING([--enable-verbose-usb-comms],
|
||||
[Enable verbose USB communication messages (for debugging)]),
|
||||
[debug_usb_comms=$enableval], [])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable verbose USB I/O messages]);
|
||||
AC_MSG_RESULT([$debug_usb_io])
|
||||
AS_IF([test "x$debug_usb_io" = "xyes"], [
|
||||
AC_DEFINE([_DEBUG_USB_IO_],[1], [Print verbose USB I/O messages])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable verbose USB communication messages]);
|
||||
AC_MSG_RESULT([$debug_usb_comms])
|
||||
AS_IF([test "x$debug_usb_comms" = "xyes"], [
|
||||
AC_DEFINE([_DEBUG_USB_COMMS_],[1], [Print verbose USB communication messages])
|
||||
])
|
||||
|
||||
debug_malloc=no
|
||||
AC_ARG_ENABLE([malloc_logging],
|
||||
AS_HELP_STRING([--enable-malloc-logging],
|
||||
[Include free space in logging messages (requires malloc.h).]),
|
||||
[debug_malloc=$enableval], [])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable malloc free space logging]);
|
||||
AC_MSG_RESULT([$debug_malloc])
|
||||
AS_IF([test "x$debug_malloc" = "xyes"], [
|
||||
AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging])
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([dummy],
|
||||
AS_HELP_STRING([--enable-dummy], [Enable building the dummy port driver]),
|
||||
[build_dummy=$enableval], [build_dummy=no])
|
||||
|
||||
AC_ARG_ENABLE([rshim],
|
||||
AS_HELP_STRING([--enable-rshim], [Enable building the rshim driver]),
|
||||
[build_rshim=$enableval], [build_rshim=no])
|
||||
|
||||
m4_define([AC_ARG_ADAPTERS], [
|
||||
m4_foreach([adapter], [$1],
|
||||
[AC_ARG_ENABLE(ADAPTER_OPT([adapter]),
|
||||
AS_HELP_STRING([--enable-ADAPTER_OPT([adapter])],
|
||||
[Enable building support for the ]ADAPTER_DESC([adapter])[ (default is $2)]),
|
||||
[], [ADAPTER_VAR([adapter])=$2])
|
||||
])
|
||||
])
|
||||
|
||||
AC_ARG_ADAPTERS([
|
||||
USB1_ADAPTERS,
|
||||
HIDAPI_ADAPTERS,
|
||||
HIDAPI_USB1_ADAPTERS,
|
||||
LIBFTDI_ADAPTERS,
|
||||
LIBFTDI_USB1_ADAPTERS
|
||||
LIBGPIOD_ADAPTERS,
|
||||
SERIAL_PORT_ADAPTERS,
|
||||
LIBJAYLINK_ADAPTERS
|
||||
],[auto])
|
||||
|
||||
AC_ARG_ADAPTERS([DEPRECATED_USB1_ADAPTERS],[no])
|
||||
|
||||
AC_ARG_ENABLE([parport],
|
||||
AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
|
||||
[build_parport=$enableval], [build_parport=no])
|
||||
|
||||
AC_ARG_ENABLE([parport_ppdev],
|
||||
AS_HELP_STRING([--disable-parport-ppdev],
|
||||
[Disable use of ppdev (/dev/parportN) for parport (for x86 only)]),
|
||||
[parport_use_ppdev=$enableval], [parport_use_ppdev=yes])
|
||||
|
||||
AC_ARG_ENABLE([parport_giveio],
|
||||
AS_HELP_STRING([--enable-parport-giveio],
|
||||
[Enable use of giveio for parport (for CygWin only)]),
|
||||
[parport_use_giveio=$enableval], [parport_use_giveio=])
|
||||
|
||||
AC_ARG_ENABLE([jtag_vpi],
|
||||
AS_HELP_STRING([--enable-jtag_vpi], [Enable building support for JTAG VPI]),
|
||||
[build_jtag_vpi=$enableval], [build_jtag_vpi=no])
|
||||
|
||||
AC_ARG_ENABLE([vdebug],
|
||||
AS_HELP_STRING([--enable-vdebug], [Enable building support for Cadence Virtual Debug Interface]),
|
||||
[build_vdebug=$enableval], [build_vdebug=no])
|
||||
|
||||
AC_ARG_ENABLE([jtag_dpi],
|
||||
AS_HELP_STRING([--enable-jtag_dpi], [Enable building support for JTAG DPI]),
|
||||
[build_jtag_dpi=$enableval], [build_jtag_dpi=no])
|
||||
|
||||
AC_ARG_ENABLE([amtjtagaccel],
|
||||
AS_HELP_STRING([--enable-amtjtagaccel], [Enable building the Amontec JTAG-Accelerator driver]),
|
||||
[build_amtjtagaccel=$enableval], [build_amtjtagaccel=no])
|
||||
|
||||
AS_CASE(["${host_cpu}"],
|
||||
[arm*|aarch64], [
|
||||
AC_ARG_ENABLE([bcm2835gpio],
|
||||
AS_HELP_STRING([--enable-bcm2835gpio], [Enable building support for bitbanging on BCM2835 (as found in Raspberry Pi)]),
|
||||
[build_bcm2835gpio=$enableval], [build_bcm2835gpio=no])
|
||||
AC_ARG_ENABLE([imx_gpio],
|
||||
AS_HELP_STRING([--enable-imx_gpio], [Enable building support for bitbanging on NXP IMX processors]),
|
||||
[build_imx_gpio=$enableval], [build_imx_gpio=no])
|
||||
AC_ARG_ENABLE([am335xgpio],
|
||||
AS_HELP_STRING([--enable-am335xgpio], [Enable building support for bitbanging on AM335x (as found in Beaglebones)]),
|
||||
[build_am335xgpio=$enableval], [build_am335xgpio=no])
|
||||
],
|
||||
[
|
||||
build_bcm2835gpio=no
|
||||
build_imx_gpio=no
|
||||
build_am335xgpio=no
|
||||
])
|
||||
|
||||
AS_CASE(["${host_cpu}"],
|
||||
[arm*], [
|
||||
AC_ARG_ENABLE([ep93xx],
|
||||
AS_HELP_STRING([--enable-ep93xx], [Enable building support for EP93xx based SBCs]),
|
||||
[build_ep93xx=$enableval], [build_ep93xx=no])
|
||||
|
||||
AC_ARG_ENABLE([at91rm9200],
|
||||
AS_HELP_STRING([--enable-at91rm9200], [Enable building support for AT91RM9200 based SBCs]),
|
||||
[build_at91rm9200=$enableval], [build_at91rm9200=no])
|
||||
],
|
||||
[
|
||||
build_ep93xx=no
|
||||
build_at91rm9200=no
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([gw16012],
|
||||
AS_HELP_STRING([--enable-gw16012], [Enable building support for the Gateworks GW16012 JTAG Programmer]),
|
||||
[build_gw16012=$enableval], [build_gw16012=no])
|
||||
|
||||
AC_ARG_ENABLE([sysfsgpio],
|
||||
AS_HELP_STRING([--enable-sysfsgpio], [Enable building support for programming driven via sysfs gpios.]),
|
||||
[build_sysfsgpio=$enableval], [build_sysfsgpio=no])
|
||||
|
||||
AC_ARG_ENABLE([xlnx_pcie_xvc],
|
||||
AS_HELP_STRING([--enable-xlnx-pcie-xvc], [Enable building support for Xilinx XVC/PCIe.]),
|
||||
[build_xlnx_pcie_xvc=$enableval], [build_xlnx_pcie_xvc=no])
|
||||
|
||||
AS_CASE([$host_os],
|
||||
[linux*], [],
|
||||
[
|
||||
AS_IF([test "x$build_sysfsgpio" = "xyes"], [
|
||||
AC_MSG_ERROR([sysfsgpio is only available on linux])
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_linuxgpiod" = "xyes"], [
|
||||
AC_MSG_ERROR([linuxgpiod is only available on linux])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_xlnx_pcie_xvc" = "xyes"], [
|
||||
AC_MSG_ERROR([xlnx_pcie_xvc is only available on linux])
|
||||
])
|
||||
|
||||
AS_CASE([$host_os], [freebsd*], [],
|
||||
[
|
||||
AS_IF([test "x$build_rshim" = "xyes"], [
|
||||
AC_MSG_ERROR([build_rshim is only available on linux or freebsd])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE([internal-jimtcl],
|
||||
AS_HELP_STRING([--disable-internal-jimtcl], [Disable building internal jimtcl]),
|
||||
[use_internal_jimtcl=$enableval], [use_internal_jimtcl=yes])
|
||||
|
||||
AC_ARG_ENABLE([jimtcl-maintainer],
|
||||
AS_HELP_STRING([--enable-jimtcl-maintainer], [Enable maintainer mode when building internal jimtcl]),
|
||||
[use_internal_jimtcl_maintainer=$enableval], [use_internal_jimtcl_maintainer=no])
|
||||
|
||||
AC_ARG_ENABLE([internal-libjaylink],
|
||||
AS_HELP_STRING([--disable-internal-libjaylink],
|
||||
[Disable building internal libjaylink]),
|
||||
[use_internal_libjaylink=$enableval], [use_internal_libjaylink=yes])
|
||||
|
||||
AC_ARG_ENABLE([remote-bitbang],
|
||||
AS_HELP_STRING([--enable-remote-bitbang], [Enable building support for the Remote Bitbang jtag driver]),
|
||||
[build_remote_bitbang=$enableval], [build_remote_bitbang=no])
|
||||
|
||||
AS_CASE(["${host_cpu}"],
|
||||
[i?86|x86*], [],
|
||||
[
|
||||
AS_IF([test "x$parport_use_ppdev" = "xno"], [
|
||||
AC_MSG_WARN([--disable-parport-ppdev is not supported by the host CPU])
|
||||
])
|
||||
parport_use_ppdev=yes
|
||||
])
|
||||
|
||||
AS_CASE([$host],
|
||||
[*-cygwin*], [
|
||||
is_win32=yes
|
||||
parport_use_ppdev=no
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[return __MINGW32__;]])],
|
||||
[is_mingw=yes],[is_mingw=no])
|
||||
AS_IF([test "x$is_mingw" = "xyes"], [
|
||||
AS_IF([test "x$parport_use_giveio" = "xno"], [
|
||||
AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
|
||||
])
|
||||
parport_use_giveio=yes
|
||||
is_cygwin=no
|
||||
], [
|
||||
is_cygwin=yes
|
||||
# sys/io.h needed under cygwin for parport access
|
||||
AS_IF([test "x$build_parport" = "xyes"], [
|
||||
AC_CHECK_HEADERS([sys/io.h],[],AC_MSG_ERROR([Please install the cygwin ioperm package]))
|
||||
])
|
||||
])
|
||||
],
|
||||
[*-mingw* | *-msys*], [
|
||||
is_mingw=yes
|
||||
is_win32=yes
|
||||
parport_use_ppdev=no
|
||||
|
||||
AS_IF([test "x$parport_use_giveio" = "xno"], [
|
||||
AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
|
||||
])
|
||||
parport_use_giveio=yes
|
||||
|
||||
AS_IF([test "x$enable_buspirate" = "xyes"], [
|
||||
AC_MSG_ERROR([buspirate currently not supported by MinGW32 hosts])
|
||||
])
|
||||
|
||||
# In case enable_buspirate=auto, make sure it will not be built.
|
||||
enable_buspirate=no
|
||||
|
||||
AC_SUBST([HOST_CPPFLAGS], [-D__USE_MINGW_ANSI_STDIO])
|
||||
],
|
||||
[*darwin*], [
|
||||
is_darwin=yes
|
||||
|
||||
AS_IF([test "x$parport_use_giveio" = "xyes"], [
|
||||
AC_MSG_WARN([--enable-parport-giveio cannot be used by Darwin hosts])
|
||||
])
|
||||
parport_use_giveio=no
|
||||
],
|
||||
[
|
||||
AS_IF([test "x$parport_use_giveio" = "xyes"], [
|
||||
AC_MSG_WARN([--enable-parport-giveio cannot be used by ]$host[ hosts])
|
||||
])
|
||||
parport_use_giveio=no
|
||||
])
|
||||
|
||||
AS_IF([test "x$is_cygwin" = "xyes"], [
|
||||
AC_DEFINE([IS_CYGWIN], [1], [1 if building for Cygwin.])
|
||||
], [
|
||||
AC_DEFINE([IS_CYGWIN], [0], [0 if not building for Cygwin.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$is_mingw" = "xyes"], [
|
||||
AC_DEFINE([IS_MINGW], [1], [1 if building for Mingw.])
|
||||
], [
|
||||
AC_DEFINE([IS_MINGW], [0], [0 if not building for Mingw.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$is_win32" = "xyes"], [
|
||||
AC_DEFINE([IS_WIN32], [1], [1 if building for Win32.])
|
||||
], [
|
||||
AC_DEFINE([IS_WIN32], [0], [0 if not building for Win32.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$is_darwin" = "xyes"], [
|
||||
AC_DEFINE([IS_DARWIN], [1], [1 if building for Darwin.])
|
||||
], [
|
||||
AC_DEFINE([IS_DARWIN], [0], [0 if not building for Darwin.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_parport" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_PARPORT], [1], [1 if you want parport.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_PARPORT], [0], [0 if you don't want parport.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_rshim" = "xyes"], [
|
||||
AC_DEFINE([BUILD_RSHIM], [1], [1 if you want to debug BlueField SoC via rshim.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_RSHIM], [0], [0 if you don't want to debug BlueField SoC via rshim.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_dummy" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_DUMMY], [1], [1 if you want dummy driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_DUMMY], [0], [0 if you don't want dummy driver.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_ep93xx" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_EP93XX], [1], [1 if you want ep93xx.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_EP93XX], [0], [0 if you don't want ep93xx.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_at91rm9200" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_AT91RM9200], [1], [1 if you want at91rm9200.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_AT91RM9200], [0], [0 if you don't want at91rm9200.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_bcm2835gpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_BCM2835GPIO], [1], [1 if you want bcm2835gpio.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_BCM2835GPIO], [0], [0 if you don't want bcm2835gpio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_imx_gpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_IMX_GPIO], [1], [1 if you want imx_gpio.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_IMX_GPIO], [0], [0 if you don't want imx_gpio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_am335xgpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_AM335XGPIO], [1], [1 if you want am335xgpio.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_AM335XGPIO], [0], [0 if you don't want am335xgpio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$parport_use_ppdev" = "xyes"], [
|
||||
AC_DEFINE([PARPORT_USE_PPDEV], [1], [1 if you want parport to use ppdev.])
|
||||
], [
|
||||
AC_DEFINE([PARPORT_USE_PPDEV], [0], [0 if you don't want parport to use ppdev.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$parport_use_giveio" = "xyes"], [
|
||||
AC_DEFINE([PARPORT_USE_GIVEIO], [1], [1 if you want parport to use giveio.])
|
||||
], [
|
||||
AC_DEFINE([PARPORT_USE_GIVEIO], [0], [0 if you don't want parport to use giveio.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_jtag_vpi" = "xyes"], [
|
||||
AC_DEFINE([BUILD_JTAG_VPI], [1], [1 if you want JTAG VPI.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_JTAG_VPI], [0], [0 if you don't want JTAG VPI.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_vdebug" = "xyes"], [
|
||||
AC_DEFINE([BUILD_VDEBUG], [1], [1 if you want Cadence vdebug interface.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_VDEBUG], [0], [0 if you don't want Cadence vdebug interface.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_jtag_dpi" = "xyes"], [
|
||||
AC_DEFINE([BUILD_JTAG_DPI], [1], [1 if you want JTAG DPI.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_JTAG_DPI], [0], [0 if you don't want JTAG DPI.])
|
||||
])
|
||||
|
||||
|
||||
AS_IF([test "x$build_amtjtagaccel" = "xyes"], [
|
||||
AC_DEFINE([BUILD_AMTJTAGACCEL], [1], [1 if you want the Amontec JTAG-Accelerator driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_AMTJTAGACCEL], [0], [0 if you don't want the Amontec JTAG-Accelerator driver.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_gw16012" = "xyes"], [
|
||||
AC_DEFINE([BUILD_GW16012], [1], [1 if you want the Gateworks GW16012 driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_GW16012], [0], [0 if you don't want the Gateworks GW16012 driver.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_buspirate" != "xno"], [
|
||||
AC_DEFINE([BUILD_BUSPIRATE], [1], [1 if you want the Buspirate JTAG driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_BUSPIRATE], [0], [0 if you don't want the Buspirate JTAG driver.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
|
||||
AS_IF([test -f "$srcdir/jimtcl/configure.ac"], [
|
||||
AS_IF([test "x$use_internal_jimtcl_maintainer" = "xyes"], [
|
||||
jimtcl_config_options="--disable-install-jim --with-ext=json --maintainer"
|
||||
], [
|
||||
jimtcl_config_options="--disable-install-jim --with-ext=json"
|
||||
])
|
||||
AX_CONFIG_SUBDIR_OPTION([jimtcl], [$jimtcl_config_options])
|
||||
], [
|
||||
AC_MSG_ERROR([jimtcl not found, run git submodule init and git submodule update.])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_remote_bitbang" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_REMOTE_BITBANG], [1], [1 if you want the Remote Bitbang JTAG driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_REMOTE_BITBANG], [0], [0 if you don't want the Remote Bitbang JTAG driver.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_sysfsgpio" = "xyes"], [
|
||||
build_bitbang=yes
|
||||
AC_DEFINE([BUILD_SYSFSGPIO], [1], [1 if you want the SysfsGPIO driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_SYSFSGPIO], [0], [0 if you don't want SysfsGPIO driver.])
|
||||
])
|
||||
|
||||
AS_IF([test "x$build_xlnx_pcie_xvc" = "xyes"], [
|
||||
build_xlnx_pcie_xvc=yes
|
||||
AC_DEFINE([BUILD_XLNX_PCIE_XVC], [1], [1 if you want the Xilinx XVC/PCIe driver.])
|
||||
], [
|
||||
AC_DEFINE([BUILD_XLNX_PCIE_XVC], [0], [0 if you don't want Xilinx XVC/PCIe driver.])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0], [
|
||||
use_libusb1=yes
|
||||
AC_DEFINE([HAVE_LIBUSB1], [1], [Define if you have libusb-1.x])
|
||||
LIBUSB1_CFLAGS=`echo $LIBUSB1_CFLAGS | sed 's/-I/-isystem /'`
|
||||
AC_MSG_NOTICE([libusb-1.0 header bug workaround: LIBUSB1_CFLAGS changed to "$LIBUSB1_CFLAGS"])
|
||||
PKG_CHECK_EXISTS([libusb-1.0 >= 1.0.16],
|
||||
[AC_DEFINE([HAVE_LIBUSB_GET_PORT_NUMBERS], [1], [Define if your libusb has libusb_get_port_numbers()])])
|
||||
], [
|
||||
use_libusb1=no
|
||||
AC_MSG_WARN([libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead])
|
||||
])
|
||||
|
||||
AC_ARG_WITH([capstone],
|
||||
AS_HELP_STRING([--with-capstone], [Use Capstone disassembly library (default=auto)])
|
||||
, [
|
||||
enable_capstone=$withval
|
||||
], [
|
||||
enable_capstone=auto
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_capstone" != xno], [
|
||||
PKG_CHECK_MODULES([CAPSTONE], [capstone], [
|
||||
AC_DEFINE([HAVE_CAPSTONE], [1], [1 if you have Capstone disassembly framework.])
|
||||
], [
|
||||
AC_DEFINE([HAVE_CAPSTONE], [0], [0 if you don't have Capstone disassembly framework.])
|
||||
if test "x$enable_capstone" != xauto; then
|
||||
AC_MSG_ERROR([--with-capstone was given, but test for Capstone failed])
|
||||
fi
|
||||
enable_capstone=no
|
||||
])
|
||||
])
|
||||
|
||||
for hidapi_lib in hidapi hidapi-hidraw hidapi-libusb; do
|
||||
PKG_CHECK_MODULES([HIDAPI],[$hidapi_lib],[
|
||||
use_hidapi=yes
|
||||
break
|
||||
],[
|
||||
use_hidapi=no
|
||||
])
|
||||
done
|
||||
|
||||
PKG_CHECK_MODULES([LIBFTDI], [libftdi1], [
|
||||
use_libftdi=yes
|
||||
PKG_CHECK_EXISTS([libftdi1 >= 1.5],
|
||||
[AC_DEFINE([HAVE_LIBFTDI_TCIOFLUSH], [1], [Define if your libftdi has ftdi_tcioflush()])])
|
||||
], [
|
||||
PKG_CHECK_MODULES([LIBFTDI], [libftdi], [use_libftdi=yes], [use_libftdi=no])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([LIBGPIOD], [libgpiod], [use_libgpiod=yes], [use_libgpiod=no])
|
||||
|
||||
PKG_CHECK_MODULES([LIBJAYLINK], [libjaylink >= 0.2],
|
||||
[use_libjaylink=yes], [use_libjaylink=no])
|
||||
|
||||
m4_define([PROCESS_ADAPTERS], [
|
||||
m4_foreach([adapter], [$1], [
|
||||
AS_IF([test $2], [
|
||||
AS_IF([test "x$ADAPTER_VAR([adapter])" != "xno"], [
|
||||
AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [1], [1 if you want the ]ADAPTER_DESC([adapter]).)
|
||||
], [
|
||||
AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).)
|
||||
])
|
||||
], [
|
||||
AS_IF([test "x$ADAPTER_VAR([adapter])" = "xyes"], [
|
||||
AC_MSG_ERROR([$3 is required for the ADAPTER_DESC([adapter])])
|
||||
])
|
||||
ADAPTER_VAR([adapter])=no
|
||||
AC_DEFINE([BUILD_]ADAPTER_SYM([adapter]), [0], [0 if you do not want the ]ADAPTER_DESC([adapter]).)
|
||||
])
|
||||
AM_CONDITIONAL(ADAPTER_SYM([adapter]), [test "x$ADAPTER_VAR([adapter])" != "xno"])
|
||||
])
|
||||
])
|
||||
|
||||
PROCESS_ADAPTERS([USB1_ADAPTERS], ["x$use_libusb1" = "xyes"], [libusb-1.x])
|
||||
PROCESS_ADAPTERS([DEPRECATED_USB1_ADAPTERS], ["x$use_libusb1" = "xyes"], [libusb-1.x])
|
||||
PROCESS_ADAPTERS([HIDAPI_ADAPTERS], ["x$use_hidapi" = "xyes"], [hidapi])
|
||||
PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libusb1" = "xyes"], [hidapi and libusb-1.x])
|
||||
PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
|
||||
PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"], [libftdi and libusb-1.x])
|
||||
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
|
||||
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
|
||||
|
||||
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
|
||||
build_bitbang=yes
|
||||
])
|
||||
|
||||
AS_IF([test "x$enable_stlink" != "xno" -o "x$enable_ti_icdi" != "xno" -o "x$enable_nulink" != "xno"], [
|
||||
AC_DEFINE([BUILD_HLADAPTER], [1], [1 if you want the High Level JTAG driver.])
|
||||
AM_CONDITIONAL([HLADAPTER], [true])
|
||||
], [
|
||||
AC_DEFINE([BUILD_HLADAPTER], [0], [0 if you want the High Level JTAG driver.])
|
||||
AM_CONDITIONAL([HLADAPTER], [false])
|
||||
])
|
||||
AM_CONDITIONAL([HLADAPTER_STLINK], [test "x$enable_stlink" != "xno"])
|
||||
AM_CONDITIONAL([HLADAPTER_ICDI], [test "x$enable_ti_icdi" != "xno"])
|
||||
AM_CONDITIONAL([HLADAPTER_NULINK], [test "x$enable_nulink" != "xno"])
|
||||
|
||||
AS_IF([test "x$enable_jlink" != "xno"], [
|
||||
AS_IF([test "x$use_internal_libjaylink" = "xyes"], [
|
||||
AS_IF([test -f "$srcdir/src/jtag/drivers/libjaylink/configure.ac"], [
|
||||
AX_CONFIG_SUBDIR_OPTION([src/jtag/drivers/libjaylink],
|
||||
[--enable-subproject-build])
|
||||
], [
|
||||
AC_MSG_ERROR([Internal libjaylink not found, run either 'git submodule init' and 'git submodule update' or disable internal libjaylink with --disable-internal-libjaylink.])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
# Presto needs the bitq module
|
||||
AS_IF([test "x$enable_presto" != "xno"], [
|
||||
build_bitq=yes
|
||||
])
|
||||
|
||||
# esp-usb-jtag also needs the bitq module
|
||||
AS_IF([test "x$enable_esp_usb_jtag" != "xno"], [
|
||||
build_bitq=yes
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([RELEASE], [test "x$build_release" = "xyes"])
|
||||
AM_CONDITIONAL([PARPORT], [test "x$build_parport" = "xyes"])
|
||||
AM_CONDITIONAL([DUMMY], [test "x$build_dummy" = "xyes"])
|
||||
AM_CONDITIONAL([GIVEIO], [test "x$parport_use_giveio" = "xyes"])
|
||||
AM_CONDITIONAL([EP93XX], [test "x$build_ep93xx" = "xyes"])
|
||||
AM_CONDITIONAL([AT91RM9200], [test "x$build_at91rm9200" = "xyes"])
|
||||
AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"])
|
||||
AM_CONDITIONAL([IMX_GPIO], [test "x$build_imx_gpio" = "xyes"])
|
||||
AM_CONDITIONAL([AM335XGPIO], [test "x$build_am335xgpio" = "xyes"])
|
||||
AM_CONDITIONAL([BITBANG], [test "x$build_bitbang" = "xyes"])
|
||||
AM_CONDITIONAL([JTAG_VPI], [test "x$build_jtag_vpi" = "xyes"])
|
||||
AM_CONDITIONAL([VDEBUG], [test "x$build_vdebug" = "xyes"])
|
||||
AM_CONDITIONAL([JTAG_DPI], [test "x$build_jtag_dpi" = "xyes"])
|
||||
AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"])
|
||||
AM_CONDITIONAL([AMTJTAGACCEL], [test "x$build_amtjtagaccel" = "xyes"])
|
||||
AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"])
|
||||
AM_CONDITIONAL([REMOTE_BITBANG], [test "x$build_remote_bitbang" = "xyes"])
|
||||
AM_CONDITIONAL([BUSPIRATE], [test "x$enable_buspirate" != "xno"])
|
||||
AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"])
|
||||
AM_CONDITIONAL([XLNX_PCIE_XVC], [test "x$build_xlnx_pcie_xvc" = "xyes"])
|
||||
AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"])
|
||||
AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"])
|
||||
AM_CONDITIONAL([IS_MINGW], [test "x$is_mingw" = "xyes"])
|
||||
AM_CONDITIONAL([IS_WIN32], [test "x$is_win32" = "xyes"])
|
||||
AM_CONDITIONAL([IS_DARWIN], [test "x$is_darwin" = "xyes"])
|
||||
AM_CONDITIONAL([BITQ], [test "x$build_bitq" = "xyes"])
|
||||
AM_CONDITIONAL([USE_LIBFTDI], [test "x$use_libftdi" = "xyes"])
|
||||
AM_CONDITIONAL([USE_LIBGPIOD], [test "x$use_libgpiod" = "xyes"])
|
||||
AM_CONDITIONAL([USE_HIDAPI], [test "x$use_hidapi" = "xyes"])
|
||||
AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"])
|
||||
AM_CONDITIONAL([RSHIM], [test "x$build_rshim" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_CAPSTONE], [test "x$enable_capstone" != "xno"])
|
||||
|
||||
AM_CONDITIONAL([INTERNAL_JIMTCL], [test "x$use_internal_jimtcl" = "xyes"])
|
||||
AM_CONDITIONAL([INTERNAL_LIBJAYLINK], [test "x$use_internal_libjaylink" = "xyes"])
|
||||
|
||||
# Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
|
||||
AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
]], [[char **ep = environ;]]
|
||||
)], [
|
||||
AC_MSG_RESULT([yes])
|
||||
has_environ=yes
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
# Possibility #2: can environ be found in an available library?
|
||||
AC_MSG_CHECKING([for extern environ])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
extern char **environ;
|
||||
]], [[char **ep = environ;]]
|
||||
)], [
|
||||
AC_DEFINE(NEED_ENVIRON_EXTERN, [1], [Must declare 'environ' to use it.])
|
||||
has_environ=yes
|
||||
], [
|
||||
has_environ=no
|
||||
])
|
||||
AC_MSG_RESULT([${has_environ}])
|
||||
])
|
||||
|
||||
AS_IF([test "x${has_environ}" != "xyes" ], [
|
||||
AC_MSG_FAILURE([Could not find 'environ' in unistd.h or available libraries.])
|
||||
])
|
||||
|
||||
AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).])
|
||||
|
||||
# set default gcc warnings
|
||||
GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security -Wshadow"
|
||||
AS_IF([test "x${gcc_wextra}" = "xyes"], [
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wextra -Wno-unused-parameter"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wcast-align"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wredundant-decls"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wpointer-arith"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wundef"
|
||||
])
|
||||
AS_IF([test "x${gcc_werror}" = "xyes"], [
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Werror"
|
||||
])
|
||||
|
||||
# override default gcc cflags
|
||||
AS_IF([test "x$gcc_warnings" = "xyes"], [
|
||||
AC_SUBST([GCC_WARNINGS], [$GCC_WARNINGS])
|
||||
])
|
||||
|
||||
AC_SUBST(EXTRA_DIST_NEWS, ["$(echo $srcdir/NEWS-*)"])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
echo
|
||||
echo
|
||||
echo OpenOCD configuration summary
|
||||
echo --------------------------------------------------
|
||||
m4_foreach([adapter], [USB1_ADAPTERS,
|
||||
DEPRECATED_USB1_ADAPTERS,
|
||||
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
|
||||
LIBFTDI_USB1_ADAPTERS,
|
||||
LIBGPIOD_ADAPTERS,
|
||||
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS,
|
||||
OPTIONAL_LIBRARIES],
|
||||
[s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
|
||||
AS_CASE([$ADAPTER_VAR([adapter])],
|
||||
[auto], [
|
||||
echo "$s"yes '(auto)'
|
||||
],
|
||||
[yes], [
|
||||
echo "$s"yes
|
||||
],
|
||||
[no], [
|
||||
echo "$s"no
|
||||
])
|
||||
])
|
||||
echo
|
||||
1118
configure.in
Normal file
1118
configure.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,235 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copy this file to /etc/udev/rules.d/
|
||||
# If rules fail to reload automatically, you can refresh udev rules
|
||||
# with the command "udevadm control --reload"
|
||||
|
||||
ACTION!="add|change", GOTO="openocd_rules_end"
|
||||
|
||||
SUBSYSTEM=="gpio", MODE="0660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"
|
||||
|
||||
# Please keep this list sorted by VID:PID
|
||||
|
||||
# opendous and estick
|
||||
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT232/FT245 VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT2232 VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT4232 VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT232H VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
# Original FT231XQ VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# DISTORTEC JTAG-lock-pick Tiny 2
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8220", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TUMPA, TUMPA Lite
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a98", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a99", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Marvell OpenRD JTAGKey FT2232D B
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="9e90", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# XDS100v2
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d0", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
# XDS100v3
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d1", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# OOCDLink
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="baf8", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Kristech KT-Link
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bbe2", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Xverve Signalyzer Tool (DT-USB-ST), Signalyzer LITE (DT-USB-SLITE)
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bca0", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bca1", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TI/Luminary Stellaris Evaluation Board FTDI (several)
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bcd9", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TI/Luminary Stellaris In-Circuit Debug Interface FTDI (ICDI) Board
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bcda", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# egnite Turtelizer 2
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bdc8", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Section5 ICEbear
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c140", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c141", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Amontec JTAGkey and JTAGkey-tiny
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# ASIX Presto programmer
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="f1a0", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Nuvoton NuLink
|
||||
ATTRS{idVendor}=="0416", ATTRS{idProduct}=="511b", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0416", ATTRS{idProduct}=="511c", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0416", ATTRS{idProduct}=="511d", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5200", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5201", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TI ICDI
|
||||
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="c32a", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# STMicroelectronics ST-LINK V1
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# STMicroelectronics ST-LINK/V2
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# STMicroelectronics ST-LINK/V2.1
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# STMicroelectronics STLINK-V3
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374d", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374e", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3754", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Cypress SuperSpeed Explorer Kit
|
||||
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="0007", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Cypress KitProg in KitProg mode
|
||||
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f139", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Cypress KitProg in CMSIS-DAP mode
|
||||
ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f138", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Infineon DAP miniWiggler v3
|
||||
ATTRS{idVendor}=="058b", ATTRS{idProduct}=="0043", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Hitex LPC1768-Stick
|
||||
ATTRS{idVendor}=="0640", ATTRS{idProduct}=="0026", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Hilscher NXHX Boards
|
||||
ATTRS{idVendor}=="0640", ATTRS{idProduct}=="0028", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Hitex STR9-comStick
|
||||
ATTRS{idVendor}=="0640", ATTRS{idProduct}=="002c", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Hitex STM32-PerformanceStick
|
||||
ATTRS{idVendor}=="0640", ATTRS{idProduct}=="002d", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Hitex Cortino
|
||||
ATTRS{idVendor}=="0640", ATTRS{idProduct}=="0032", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Altera USB Blaster
|
||||
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
# Altera USB Blaster2
|
||||
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Ashling Opella-LD
|
||||
ATTRS{idVendor}=="0B6B", ATTRS{idProduct}=="0040", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Amontec JTAGkey-HiSpeed
|
||||
ATTRS{idVendor}=="0fbb", ATTRS{idProduct}=="1000", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# SEGGER J-Link
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0101", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0102", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0103", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0104", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0107", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0108", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1010", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1011", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1012", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1013", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1014", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1015", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1016", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1017", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1018", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1020", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1051", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1055", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1061", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Raisonance RLink
|
||||
ATTRS{idVendor}=="138e", ATTRS{idProduct}=="9000", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Debug Board for Neo1973
|
||||
ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# OSBDM
|
||||
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0042", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0058", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="005e", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-OCD
|
||||
ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0003", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-OCD-TINY
|
||||
ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0004", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-JTAG-EW
|
||||
ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="001e", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-OCD-TINY-H
|
||||
ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002a", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-OCD-H
|
||||
ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002b", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# ixo-usb-jtag - Emulation of a Altera Bus Blaster I on a Cypress FX2 IC
|
||||
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="06ad", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# USBprog with OpenOCD firmware
|
||||
ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c63", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board
|
||||
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TI XDS110 Debug Probe (Launchpads and Standalone)
|
||||
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="bef3", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="bef4", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="02a5", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# TI Tiva-based ICDI and XDS110 probes in DFU mode
|
||||
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00ff", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# isodebug v1
|
||||
ATTRS{idVendor}=="22b7", ATTRS{idProduct}=="150d", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# PLS USB/JTAG Adapter for SPC5xxx
|
||||
ATTRS{idVendor}=="263d", ATTRS{idProduct}=="4001", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Numato Mimas A7 - Artix 7 FPGA Board
|
||||
ATTRS{idVendor}=="2a19", ATTRS{idProduct}=="1009", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Ambiq Micro EVK and Debug boards.
|
||||
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="2aec", ATTRS{idProduct}=="1106", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Espressif USB JTAG/serial debug units
|
||||
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Marvell Sheevaplug
|
||||
ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Keil Software, Inc. ULink
|
||||
ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2710", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2750", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# CMSIS-DAP compatible adapters
|
||||
ATTRS{product}=="*CMSIS-DAP*", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
LABEL="openocd_rules_end"
|
||||
@@ -1,29 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
BR2_armeb=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_PACKAGE_OPENOCD=y
|
||||
BR2_PACKAGE_OPENOCD_FTDI=y
|
||||
BR2_PACKAGE_OPENOCD_STLINK=y
|
||||
BR2_PACKAGE_OPENOCD_TI_ICDI=y
|
||||
BR2_PACKAGE_OPENOCD_ULINK=y
|
||||
BR2_PACKAGE_OPENOCD_UBLASTER2=y
|
||||
BR2_PACKAGE_OPENOCD_JLINK=y
|
||||
BR2_PACKAGE_OPENOCD_OSDBM=y
|
||||
BR2_PACKAGE_OPENOCD_OPENDOUS=y
|
||||
BR2_PACKAGE_OPENOCD_AICE=y
|
||||
BR2_PACKAGE_OPENOCD_VSLLINK=y
|
||||
BR2_PACKAGE_OPENOCD_USBPROG=y
|
||||
BR2_PACKAGE_OPENOCD_RLINK=y
|
||||
BR2_PACKAGE_OPENOCD_ARMEW=y
|
||||
BR2_PACKAGE_OPENOCD_XDS110=y
|
||||
BR2_PACKAGE_OPENOCD_PARPORT=y
|
||||
BR2_PACKAGE_OPENOCD_VPI=y
|
||||
BR2_PACKAGE_OPENOCD_UBLASTER=y
|
||||
BR2_PACKAGE_OPENOCD_AMTJT=y
|
||||
BR2_PACKAGE_OPENOCD_GW16012=y
|
||||
BR2_PACKAGE_OPENOCD_PRESTO=y
|
||||
BR2_PACKAGE_OPENOCD_OPENJTAG=y
|
||||
BR2_PACKAGE_OPENOCD_BUSPIRATE=y
|
||||
BR2_PACKAGE_OPENOCD_SYSFS=y
|
||||
@@ -1,68 +0,0 @@
|
||||
+OpenOCD and CoreSight Tracing
|
||||
+
|
||||
Many recent ARM chips (Using e..g. Cortex-M3 and
|
||||
Cortex-M4 cores) support CoreSight debug/trace.
|
||||
This note sketches an approach currently planned for those cores
|
||||
with OpenOCD.
|
||||
|
||||
This tracing data can help debug and tune ARM software, but not
|
||||
all cores support tracing. Some support more extensive tracing
|
||||
other cores with trace support +should be able to use the same
|
||||
approach and maybe some of the same analysis code.
|
||||
|
||||
+the Cortex-M3 is assumed here to be the
|
||||
+core in use, for simplicity and to reflect current OpenOCD users.
|
||||
|
||||
|
||||
This note summarizes a software model to generate, collect, and
|
||||
analyze such trace data . That is not fully implemented as of early
|
||||
January 2011, +and thus is not *yet* usable.
|
||||
+
|
||||
+
|
||||
+Some microcontroller cores support a low pin-count Single-wire trace,
|
||||
with a mode where +trace data is emitted (usually to a UART. To use
|
||||
this mode, +SWD must be in use.
|
||||
+At this writing, OpenOCD SWD support is not yet complete either.
|
||||
|
||||
(There are also multi-wire trace ports requiring more complex debug
|
||||
adapters than OpenOCD currently supports, and offering richer data.
|
||||
+
|
||||
+
|
||||
+* ENABLING involves activating SWD and (single wire) trace.
|
||||
+
|
||||
+current expectations are that OpenOCD itself will handle enabling;
|
||||
activating single wire trace involves a debug adapter interaction, and
|
||||
collecting that trace data requires particular (re)wiring.
|
||||
+
|
||||
+* CONFIGURATION involves setting up ITM and/or ETM modules to emit the
|
||||
+desired data from the Cortex core. (This might include dumping
|
||||
+event counters printf-style messages; code profiling; and more. Not all
|
||||
+cores offer the same trace capabilities.
|
||||
+
|
||||
+current expectations are that Tcl scripts will be used to configure these
|
||||
+modules for the desired tracing, by direct writes to registers. In some
|
||||
+cases (as with RTOS event tracking and similar messaging, this might
|
||||
+be augmented or replaced by user code running on the ARM core.
|
||||
+
|
||||
+COLLECTION involves reading that trace data, probably through UART, and
|
||||
+saving it in a useful format to analyse For now, deferred analysis modes
|
||||
are assumed, not than real-time or interactive ones.
|
||||
+
|
||||
+
|
||||
+current expectations are to to dump data in text using contrib/itmdump.c
|
||||
+or derived tools, and to post-process it into reports. Such reports might
|
||||
+include program messaging (such as application data streams via ITM, maybe
|
||||
+using printf type messaging; code coverage analysis or so forth. Recent
|
||||
+versions of CMSIS software reserve some ITM codespace for RTOS event
|
||||
tracing and include ITM messaging support.
|
||||
Clearly some of that data would be valuable for interactive debugging.
|
||||
+
|
||||
+Should someone get ambitious, GUI reports should be possible. GNU tools
|
||||
+for simpler reports like gprof may be simpler to support at first.
|
||||
+In any case, OpenOCD is not currently GUI-oriented. Accordingly, we now
|
||||
+expect any such graphics to come from postprocessing.
|
||||
|
||||
measurements for RTOS event timings should also be easy to collect.
|
||||
+Examples include context and message switch times, as well as times
|
||||
for application interactions.
|
||||
+
|
||||
@@ -1,174 +0,0 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This is an example of how to do a cross-build of OpenOCD using pkg-config.
|
||||
# Cross-building with pkg-config is deceptively hard and most guides and
|
||||
# tutorials are incomplete or give bad advice. Some of the traps that are easy
|
||||
# to fall in but handled by this script are:
|
||||
#
|
||||
# * Polluting search paths and flags with values from the build system.
|
||||
# * Faulty pkg-config wrappers shipped with distribution packaged cross-
|
||||
# toolchains.
|
||||
# * Build failing because pkg-config discards some paths even though they are
|
||||
# correctly listed in the .pc file.
|
||||
# * Getting successfully built binaries that cannot find runtime data because
|
||||
# paths refer to the build file system.
|
||||
#
|
||||
# This script is probably more useful as a reference than as a complete build
|
||||
# tool but for some configurations it may be usable as-is. It only cross-builds
|
||||
# libusb-1.0, hidapi, libftdi and capstone from source, but the script can be
|
||||
# extended to build other prerequisites in a similar manner.
|
||||
#
|
||||
# Usage:
|
||||
# export LIBUSB1_SRC=/path/to/libusb-1.0
|
||||
# export HIDAPI_SRC=/path/to/hidapi
|
||||
# export OPENOCD_CONFIG="--enable-..."
|
||||
# cd /work/dir
|
||||
# /path/to/openocd/contrib/cross-build.sh <host-triplet>
|
||||
#
|
||||
# For static linking, a workaround is to
|
||||
# export LIBUSB1_CONFIG="--enable-static --disable-shared"
|
||||
#
|
||||
# All the paths must not contain any spaces.
|
||||
|
||||
set -e -x
|
||||
|
||||
WORK_DIR=$PWD
|
||||
|
||||
## Source code paths, customize as necessary
|
||||
: ${OPENOCD_SRC:="`dirname "$0"`/.."}
|
||||
: ${LIBUSB1_SRC:=/path/to/libusb1}
|
||||
: ${HIDAPI_SRC:=/path/to/hidapi}
|
||||
: ${LIBFTDI_SRC:=/path/to/libftdi}
|
||||
: ${CAPSTONE_SRC:=/path/to/capstone}
|
||||
|
||||
OPENOCD_SRC=`readlink -m $OPENOCD_SRC`
|
||||
LIBUSB1_SRC=`readlink -m $LIBUSB1_SRC`
|
||||
HIDAPI_SRC=`readlink -m $HIDAPI_SRC`
|
||||
LIBFTDI_SRC=`readlink -m $LIBFTDI_SRC`
|
||||
CAPSTONE_SRC=`readlink -m $CAPSTONE_SRC`
|
||||
|
||||
HOST_TRIPLET=$1
|
||||
BUILD_DIR=$WORK_DIR/$HOST_TRIPLET-build
|
||||
LIBUSB1_BUILD_DIR=$BUILD_DIR/libusb1
|
||||
HIDAPI_BUILD_DIR=$BUILD_DIR/hidapi
|
||||
LIBFTDI_BUILD_DIR=$BUILD_DIR/libftdi
|
||||
CAPSTONE_BUILD_DIR=$BUILD_DIR/capstone
|
||||
OPENOCD_BUILD_DIR=$BUILD_DIR/openocd
|
||||
|
||||
## Root of host file tree
|
||||
SYSROOT=$WORK_DIR/$HOST_TRIPLET-root
|
||||
|
||||
## Install location within host file tree
|
||||
: ${PREFIX=/usr}
|
||||
|
||||
## Make parallel jobs
|
||||
: ${MAKE_JOBS:=1}
|
||||
|
||||
## OpenOCD-only install dir for packaging
|
||||
: ${OPENOCD_TAG:=`git --git-dir=$OPENOCD_SRC/.git describe --tags`}
|
||||
PACKAGE_DIR=$WORK_DIR/openocd_${OPENOCD_TAG}_${HOST_TRIPLET}
|
||||
|
||||
#######
|
||||
|
||||
# Create pkg-config wrapper and make sure it's used
|
||||
export PKG_CONFIG=$WORK_DIR/$HOST_TRIPLET-pkg-config
|
||||
|
||||
cat > $PKG_CONFIG <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
SYSROOT=$SYSROOT
|
||||
|
||||
export PKG_CONFIG_DIR=
|
||||
export PKG_CONFIG_LIBDIR=\${SYSROOT}$PREFIX/lib/pkgconfig:\${SYSROOT}$PREFIX/share/pkgconfig
|
||||
export PKG_CONFIG_SYSROOT_DIR=\${SYSROOT}
|
||||
|
||||
# The following have to be set to avoid pkg-config to strip /usr/include and /usr/lib from paths
|
||||
# before they are prepended with the sysroot path. Feels like a pkg-config bug.
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=
|
||||
|
||||
exec pkg-config "\$@"
|
||||
EOF
|
||||
chmod +x $PKG_CONFIG
|
||||
|
||||
# Clear out work dir
|
||||
rm -rf $SYSROOT $BUILD_DIR
|
||||
mkdir -p $SYSROOT
|
||||
|
||||
# libusb-1.0 build & install into sysroot
|
||||
if [ -d $LIBUSB1_SRC ] ; then
|
||||
mkdir -p $LIBUSB1_BUILD_DIR
|
||||
cd $LIBUSB1_BUILD_DIR
|
||||
$LIBUSB1_SRC/configure --build=`$LIBUSB1_SRC/config.guess` --host=$HOST_TRIPLET \
|
||||
--with-sysroot=$SYSROOT --prefix=$PREFIX \
|
||||
$LIBUSB1_CONFIG
|
||||
make -j $MAKE_JOBS
|
||||
make install DESTDIR=$SYSROOT
|
||||
fi
|
||||
|
||||
# hidapi build & install into sysroot
|
||||
if [ -d $HIDAPI_SRC ] ; then
|
||||
mkdir -p $HIDAPI_BUILD_DIR
|
||||
cd $HIDAPI_BUILD_DIR
|
||||
$HIDAPI_SRC/configure --build=`$HIDAPI_SRC/config.guess` --host=$HOST_TRIPLET \
|
||||
--with-sysroot=$SYSROOT --prefix=$PREFIX \
|
||||
$HIDAPI_CONFIG
|
||||
make -j $MAKE_JOBS
|
||||
make install DESTDIR=$SYSROOT
|
||||
fi
|
||||
|
||||
# libftdi build & install into sysroot
|
||||
if [ -d $LIBFTDI_SRC ] ; then
|
||||
mkdir -p $LIBFTDI_BUILD_DIR
|
||||
cd $LIBFTDI_BUILD_DIR
|
||||
# note : libftdi versions < 1.5 requires libusb1 static
|
||||
# hint use : # export LIBUSB1_CONFIG="--enable-static ..."
|
||||
# not needed since libftdi-1.5 when LIBFTDI_CONFIG="-DSTATICLIBS=OFF ..."
|
||||
|
||||
# fix <toolchain>.cmake file
|
||||
ESCAPED_SYSROOT=$(printf '%s\n' "$SYSROOT" | sed -e 's/[\/&]/\\&/g')
|
||||
sed -i -E "s/(SET\(CMAKE_FIND_ROOT_PATH\s+).+\)/\1${ESCAPED_SYSROOT})/" \
|
||||
${LIBFTDI_SRC}/cmake/Toolchain-${HOST_TRIPLET}.cmake
|
||||
|
||||
cmake $LIBFTDI_CONFIG \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${LIBFTDI_SRC}/cmake/Toolchain-${HOST_TRIPLET}.cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
|
||||
-DPKG_CONFIG_EXECUTABLE=`which pkg-config` \
|
||||
$LIBFTDI_SRC
|
||||
make install DESTDIR=$SYSROOT
|
||||
fi
|
||||
|
||||
# capstone build & install into sysroot
|
||||
if [ -d $CAPSTONE_SRC ] ; then
|
||||
mkdir -p $CAPSTONE_BUILD_DIR
|
||||
cd $CAPSTONE_BUILD_DIR
|
||||
cp -r $CAPSTONE_SRC/* .
|
||||
make install DESTDIR=$SYSROOT PREFIX=$PREFIX \
|
||||
CROSS="${HOST_TRIPLET}-" \
|
||||
$CAPSTONE_CONFIG
|
||||
# fix the generated capstone.pc
|
||||
CAPSTONE_PC_FILE=${SYSROOT}${PREFIX}/lib/pkgconfig/capstone.pc
|
||||
sed -i '/^libdir=/d' $CAPSTONE_PC_FILE
|
||||
sed -i '/^includedir=/d' $CAPSTONE_PC_FILE
|
||||
sed -i '/^archive=/d' $CAPSTONE_PC_FILE
|
||||
sed -i '1s;^;prefix=/usr \
|
||||
exec_prefix=${prefix} \
|
||||
libdir=${exec_prefix}/lib \
|
||||
includedir=${prefix}/include/capstone\n\n;' $CAPSTONE_PC_FILE
|
||||
fi
|
||||
|
||||
|
||||
# OpenOCD build & install into sysroot
|
||||
mkdir -p $OPENOCD_BUILD_DIR
|
||||
cd $OPENOCD_BUILD_DIR
|
||||
$OPENOCD_SRC/configure --build=`$OPENOCD_SRC/config.guess` --host=$HOST_TRIPLET \
|
||||
--with-sysroot=$SYSROOT --prefix=$PREFIX \
|
||||
$OPENOCD_CONFIG
|
||||
make -j $MAKE_JOBS
|
||||
make install-strip DESTDIR=$SYSROOT
|
||||
|
||||
# Separate OpenOCD install w/o dependencies. OpenOCD will have to be linked
|
||||
# statically or have dependencies packaged/installed separately.
|
||||
make install-strip DESTDIR=$PACKAGE_DIR
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Automatically generates the StellarisParts struct in src/flash/nor/stellaris.c
|
||||
# Uses the header files from TI/Luminary's StellarisWare complete Firmware Development Package
|
||||
# available from: http://www.luminarymicro.com/products/software_updates.html
|
||||
|
||||
$comment = "// Autogenerated by contrib/gen-stellaris-part-header.pl
|
||||
// From Stellaris Firmware Development Package revision";
|
||||
|
||||
$struct_header = "static const struct {
|
||||
uint8_t class;
|
||||
uint8_t partno;
|
||||
const char *partname;
|
||||
} StellarisParts[] = {
|
||||
";
|
||||
|
||||
$struct_footer = "\t{0xFF, 0x00, \"Unknown Part\"}\n};\n";
|
||||
|
||||
$#ARGV == 1 || die "Usage: $0 <inc directory> <output file>\n";
|
||||
-d $ARGV[0] || die $ARGV[0]." is not a directory\n";
|
||||
$dir = $ARGV[0];
|
||||
-f $ARGV[1] || die $ARGV[1]." is not a file\n";
|
||||
$file = $ARGV[1];
|
||||
print STDERR "Scanning $dir, Updating $file\n";
|
||||
|
||||
opendir(DIR, $dir) || die "can't open $dir: $!";
|
||||
@files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
|
||||
@header_files = sort(grep(/lm.+\.h/, @files));
|
||||
|
||||
$ver = 0;
|
||||
$new_struct = $struct_header;
|
||||
process_file(@header_files);
|
||||
$new_struct .= $struct_footer;
|
||||
|
||||
$dump = "$comment $ver\n$new_struct";
|
||||
{
|
||||
local($/, *INPUT);
|
||||
open(INPUT, $file) || die "can't open $file: $!";
|
||||
$contents = <INPUT>;
|
||||
close(INPUT);
|
||||
}
|
||||
|
||||
$old_struct = qr/((^\/\/.*?\n)*)\Q$struct_header\E.*?$struct_footer/sm;
|
||||
$contents =~ s/$old_struct/$dump/;
|
||||
open(OUTPUT, ">$file") || die "can't open file $file for writing: $!";
|
||||
print OUTPUT $contents;
|
||||
close(OUTPUT);
|
||||
|
||||
sub process_file {
|
||||
foreach $h_file (@_) {
|
||||
($base) = ($h_file =~ m/lm..(.{3,7})\.h/ig);
|
||||
$base = uc($base);
|
||||
local($/, *FILE);
|
||||
open(FILE, "$dir/$h_file");
|
||||
$content = <FILE>;
|
||||
close(FILE);
|
||||
$invalid = 0;
|
||||
if ($content =~ /This is part of revision (\d+) of/) {
|
||||
if ($ver != 0 and $ver != $1) {
|
||||
print STDERR "File version mismatch: $ver != $1\n";
|
||||
$ver = max($ver, $1);
|
||||
} else {
|
||||
$ver = $1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($content =~ /SYSCTL_DID0_CLASS_[^M].+?0x(\S+)/s) {
|
||||
$class = hex($1) >> 16;
|
||||
} else {
|
||||
# attempt another way to get class
|
||||
if ($content =~ /\s(\S+)-class/) {
|
||||
$class = getclass($1);
|
||||
if ($class eq 0xFF) {
|
||||
print STDERR "$h_file unknown class\n";
|
||||
$invalid = 1;
|
||||
}
|
||||
} else {
|
||||
print STDERR "$h_file is missing SYSCTL_DID0_CLASS_\n";
|
||||
$class = 0;
|
||||
$invalid = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($content =~ /SYSCTL_DID1_PRTNO_$base.+0x(\S+)/) {
|
||||
$prtno = hex($1);
|
||||
$base = "LM3S" . $base;
|
||||
} else {
|
||||
# LM4F have a changed header
|
||||
if ($content =~ /SYSCTL_DID1_PRTNO_LM4F$base.+?0x(\S+)/s) {
|
||||
$prtno = hex($1);
|
||||
$base = "LM4F" . $base;
|
||||
} else {
|
||||
print STDERR "$h_file is missing SYSCTL_DID1_PRTNO\n";
|
||||
$prtno = 0;
|
||||
$invalid = 1;
|
||||
}
|
||||
}
|
||||
$new_member = sprintf "{0x%02X, 0x%02X, \"%s\"},", $class, $prtno >> 16, $base;
|
||||
if ($invalid == 1) {
|
||||
#$new_struct .= "\t//$new_member\t// Invalid\n";
|
||||
} else {
|
||||
$new_struct .= "\t$new_member\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub getclass {
|
||||
$class = $_[0];
|
||||
if ($class =~ /Sandstorm/i) {
|
||||
return 0;
|
||||
} elsif ($class =~ /Fury/i) {
|
||||
return 1;
|
||||
} elsif ($class =~ /DustDevil/i) {
|
||||
return 3;
|
||||
} elsif ($class =~ /Tempest/i) {
|
||||
return 4;
|
||||
} elsif ($class =~ /Blizzard/i) {
|
||||
return 5;
|
||||
} elsif ($class =~ /Firestorm/i) {
|
||||
return 6;
|
||||
}
|
||||
return 0xFF;
|
||||
}
|
||||
@@ -1,447 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
/* Copyright (C) 2010 by David Brownell */
|
||||
|
||||
/*
|
||||
* Simple utility to parse and dump ARM Cortex-M3 SWO trace output. Once the
|
||||
* mechanisms work right, this information can be used for various purposes
|
||||
* including profiling (particularly easy for flat PC-sample profiles) and
|
||||
* for debugging.
|
||||
*
|
||||
* SWO is the Single Wire Output found on some ARM cores, most notably on the
|
||||
* Cortex-M3. It combines data from several sources:
|
||||
*
|
||||
* - Software trace (ITM): so-called "printf-style" application messaging
|
||||
* using "ITM stimulus ports"; and differential timestamps.
|
||||
* - Hardware trace (DWT): for profiling counters and comparator matches.
|
||||
* - TPIU may issue sync packets.
|
||||
*
|
||||
* The trace data format is defined in Appendix E, "Debug ITM and DWT packet
|
||||
* protocol", of the ARMv7-M Architecture Reference Manual (DDI 0403C). It
|
||||
* is a superset of the ITM data format from the Coresight TRM.
|
||||
*
|
||||
* The trace data has two encodings. The working assumption is that data
|
||||
* gets into this program using the UART encoding.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
unsigned int dump_swit;
|
||||
|
||||
/* Example ITM trace word (0xWWXXYYZZ) parsing for task events, sent
|
||||
* on port 31 (Reserved for "the" RTOS in CMSIS v1.30)
|
||||
* WWXX: event code (0..3 pre-assigned, 4..15 reserved)
|
||||
* YY: task priority
|
||||
* ZZ: task number
|
||||
*
|
||||
* NOTE that this specific encoding could be space-optimized; and that
|
||||
* trace data streams could also be history-sensitive.
|
||||
*/
|
||||
static void show_task(int port, unsigned data)
|
||||
{
|
||||
unsigned code = data >> 16;
|
||||
char buf[16];
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
switch (code) {
|
||||
case 0:
|
||||
strcpy(buf, "run");
|
||||
break;
|
||||
case 1:
|
||||
strcpy(buf, "block");
|
||||
break;
|
||||
case 2:
|
||||
strcpy(buf, "create");
|
||||
break;
|
||||
case 3:
|
||||
strcpy(buf, "destroy");
|
||||
break;
|
||||
/* 4..15 reserved for other infrastructure ops */
|
||||
default:
|
||||
sprintf(buf, "code %d", code);
|
||||
break;
|
||||
}
|
||||
printf("TASK %d, pri %d: %s",
|
||||
(data >> 0) & 0xff,
|
||||
(data >> 8) & 0xff,
|
||||
buf);
|
||||
}
|
||||
|
||||
static void show_reserved(FILE *f, char *label, int c)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
printf("%s - %#02x", label, c);
|
||||
|
||||
for (i = 0; (c & 0x80) && i < 4; i++) {
|
||||
c = fgetc(f);
|
||||
if (c == EOF) {
|
||||
printf("(ERROR %d - %s) ", errno, strerror(errno));
|
||||
break;
|
||||
}
|
||||
printf(" %#02x", c);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static bool read_varlen(FILE *f, int c, unsigned *value)
|
||||
{
|
||||
unsigned size;
|
||||
unsigned char buf[4];
|
||||
|
||||
*value = 0;
|
||||
|
||||
switch (c & 3) {
|
||||
case 3:
|
||||
size = 4;
|
||||
break;
|
||||
case 2:
|
||||
size = 2;
|
||||
break;
|
||||
case 1:
|
||||
size = 1;
|
||||
break;
|
||||
default:
|
||||
printf("INVALID SIZE\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
memset(buf, 0, sizeof buf);
|
||||
if (fread(buf, 1, size, f) != size)
|
||||
goto err;
|
||||
|
||||
*value = (buf[3] << 24)
|
||||
+ (buf[2] << 16)
|
||||
+ (buf[1] << 8)
|
||||
+ (buf[0] << 0);
|
||||
return true;
|
||||
|
||||
err:
|
||||
printf("(ERROR %d - %s)\n", errno, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
static void show_hard(FILE *f, int c)
|
||||
{
|
||||
unsigned type = c >> 3;
|
||||
unsigned value;
|
||||
char *label;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
printf("DWT - ");
|
||||
|
||||
if (!read_varlen(f, c, &value))
|
||||
return;
|
||||
printf("%#x", value);
|
||||
|
||||
switch (type) {
|
||||
case 0: /* event counter wrapping */
|
||||
printf("overflow %s%s%s%s%s%s",
|
||||
(value & (1 << 5)) ? "cyc " : "",
|
||||
(value & (1 << 4)) ? "fold " : "",
|
||||
(value & (1 << 3)) ? "lsu " : "",
|
||||
(value & (1 << 2)) ? "slp " : "",
|
||||
(value & (1 << 1)) ? "exc " : "",
|
||||
(value & (1 << 0)) ? "cpi " : "");
|
||||
break;
|
||||
case 1: /* exception tracing */
|
||||
switch (value >> 12) {
|
||||
case 1:
|
||||
label = "entry to";
|
||||
break;
|
||||
case 2:
|
||||
label = "exit from";
|
||||
break;
|
||||
case 3:
|
||||
label = "return to";
|
||||
break;
|
||||
default:
|
||||
label = "?";
|
||||
break;
|
||||
}
|
||||
printf("%s exception %d", label, value & 0x1ff);
|
||||
break;
|
||||
case 2: /* PC sampling */
|
||||
if (c == 0x15)
|
||||
printf("PC - sleep");
|
||||
else
|
||||
printf("PC - %#08x", value);
|
||||
break;
|
||||
case 8: /* data tracing, pc value */
|
||||
case 10:
|
||||
case 12:
|
||||
case 14:
|
||||
printf("Data trace %d, PC %#08x", (c >> 4) & 3, value);
|
||||
/* optionally followed by data value */
|
||||
break;
|
||||
case 9: /* data tracing, address offset */
|
||||
case 11:
|
||||
case 13:
|
||||
case 15:
|
||||
printf("Data trace %d, address offset %#04x",
|
||||
(c >> 4) & 3, value);
|
||||
/* always followed by data value */
|
||||
break;
|
||||
case 16 ... 23: /* data tracing, data value */
|
||||
printf("Data trace %d, ", (c >> 4) & 3);
|
||||
label = (c & 0x8) ? "write" : "read";
|
||||
switch (c & 3) {
|
||||
case 3:
|
||||
printf("word %s, value %#08x", label, value);
|
||||
break;
|
||||
case 2:
|
||||
printf("halfword %s, value %#04x", label, value);
|
||||
break;
|
||||
case 1:
|
||||
printf("byte %s, value %#02x", label, value);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf("UNDEFINED, rawtype: %x", type);
|
||||
break;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Table of SWIT (SoftWare InstrumentTation) message dump formats, for
|
||||
* ITM port 0..31 application data.
|
||||
*
|
||||
* Eventually this should be customizable; all usage is application defined.
|
||||
*
|
||||
* REVISIT there can be up to 256 trace ports, via "ITM Extension" packets
|
||||
*/
|
||||
struct {
|
||||
int port;
|
||||
void (*show)(int port, unsigned data);
|
||||
} format[] = {
|
||||
{ .port = 31, .show = show_task, },
|
||||
};
|
||||
|
||||
static void show_swit(FILE *f, int c)
|
||||
{
|
||||
unsigned port = c >> 3;
|
||||
unsigned value = 0;
|
||||
unsigned i;
|
||||
|
||||
if (port + 1 == dump_swit) {
|
||||
if (!read_varlen(f, c, &value))
|
||||
return;
|
||||
printf("%c", value);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!read_varlen(f, c, &value))
|
||||
return;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
printf("SWIT %u - ", port);
|
||||
|
||||
printf("%#08x", value);
|
||||
|
||||
for (i = 0; i < sizeof(format) / sizeof(format[0]); i++) {
|
||||
if (format[i].port == port) {
|
||||
printf(", ");
|
||||
format[i].show(port, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
return;
|
||||
}
|
||||
|
||||
static void show_timestamp(FILE *f, int c)
|
||||
{
|
||||
unsigned counter = 0;
|
||||
char *label = "";
|
||||
bool delayed = false;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
printf("TIMESTAMP - ");
|
||||
|
||||
/* Format 2: header only */
|
||||
if (!(c & 0x80)) {
|
||||
switch (c) {
|
||||
case 0: /* sync packet -- coding error! */
|
||||
case 0x70: /* overflow -- ditto! */
|
||||
printf("ERROR - %#02x\n", c);
|
||||
break;
|
||||
default:
|
||||
/* synchronous to ITM */
|
||||
counter = c >> 4;
|
||||
goto done;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Format 1: one to four bytes of data too */
|
||||
switch (c >> 4) {
|
||||
default:
|
||||
label = ", reserved control\n";
|
||||
break;
|
||||
case 0xc:
|
||||
/* synchronous to ITM */
|
||||
break;
|
||||
case 0xd:
|
||||
label = ", timestamp delayed";
|
||||
delayed = true;
|
||||
break;
|
||||
case 0xe:
|
||||
label = ", packet delayed";
|
||||
delayed = true;
|
||||
break;
|
||||
case 0xf:
|
||||
label = ", packet and timestamp delayed";
|
||||
delayed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
c = fgetc(f);
|
||||
if (c == EOF)
|
||||
goto err;
|
||||
counter = c & 0x7f;
|
||||
if (!(c & 0x80))
|
||||
goto done;
|
||||
|
||||
c = fgetc(f);
|
||||
if (c == EOF)
|
||||
goto err;
|
||||
counter |= (c & 0x7f) << 7;
|
||||
if (!(c & 0x80))
|
||||
goto done;
|
||||
|
||||
c = fgetc(f);
|
||||
if (c == EOF)
|
||||
goto err;
|
||||
counter |= (c & 0x7f) << 14;
|
||||
if (!(c & 0x80))
|
||||
goto done;
|
||||
|
||||
c = fgetc(f);
|
||||
if (c == EOF)
|
||||
goto err;
|
||||
counter |= (c & 0x7f) << 21;
|
||||
|
||||
done:
|
||||
/* REVISIT should we try to convert from delta values? */
|
||||
printf("+%u%s\n", counter, label);
|
||||
return;
|
||||
|
||||
err:
|
||||
printf("(ERROR %d - %s) ", errno, strerror(errno));
|
||||
goto done;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
FILE *f = stdin;
|
||||
int c;
|
||||
|
||||
/* parse arguments */
|
||||
while ((c = getopt(argc, argv, "f:d:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
/* e.g. from UART connected to /dev/ttyUSB0 */
|
||||
f = fopen(optarg, "r");
|
||||
if (!f) {
|
||||
perror(optarg);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
dump_swit = atoi(optarg);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "usage: %s [-f input]",
|
||||
basename(argv[0]));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse data ... records have a header then data bytes.
|
||||
* NOTE: we assume getc() deals in 8-bit bytes.
|
||||
*/
|
||||
bool overflow = false;
|
||||
|
||||
while ((c = getc(f)) != EOF) {
|
||||
|
||||
/* Sync packet ... 7 zeroes, 0x80 */
|
||||
if (c == 0) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
c = fgetc(f);
|
||||
if (c == EOF)
|
||||
break;
|
||||
if (c != 0)
|
||||
goto bad_sync;
|
||||
}
|
||||
c = fgetc(f);
|
||||
if (c == 0x80) {
|
||||
printf("SYNC\n");
|
||||
continue;
|
||||
}
|
||||
bad_sync:
|
||||
printf("BAD SYNC\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Overflow packet */
|
||||
if (c == 0x70) {
|
||||
/* REVISIT later, report just what overflowed!
|
||||
* Timestamp and SWIT can happen. Non-ITM too?
|
||||
*/
|
||||
overflow = true;
|
||||
printf("OVERFLOW ...\n");
|
||||
continue;
|
||||
}
|
||||
overflow = false;
|
||||
|
||||
switch (c & 0x0f) {
|
||||
case 0x00: /* Timestamp */
|
||||
show_timestamp(f, c);
|
||||
break;
|
||||
case 0x04: /* "Reserved" */
|
||||
show_reserved(f, "RESERVED", c);
|
||||
break;
|
||||
case 0x08: /* ITM Extension */
|
||||
/* FIXME someday, handle these ... */
|
||||
show_reserved(f, "ITM EXT", c);
|
||||
break;
|
||||
case 0x0c: /* DWT Extension */
|
||||
show_reserved(f, "DWT EXT", c);
|
||||
break;
|
||||
default:
|
||||
if (c & 4)
|
||||
show_hard(f, c);
|
||||
else
|
||||
show_swit(f, c);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -16,3 +16,4 @@ To see how many times the trace point was hit:
|
||||
|
||||
Spen
|
||||
spen@spen-soft.co.uk
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
@@ -7,6 +5,21 @@
|
||||
* spen@spen-soft.co.uk *
|
||||
* Copyright (C) 2008 by Frederik Kriewtz *
|
||||
* frederik@kriewitz.eu *
|
||||
* *
|
||||
* 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., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "dcc_stdio.h"
|
||||
@@ -16,9 +29,9 @@
|
||||
#define TARGET_REQ_DEBUGMSG_HEXMSG(size) (0x01 | ((size & 0xff) << 8))
|
||||
#define TARGET_REQ_DEBUGCHAR 0x02
|
||||
|
||||
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_6SM__)
|
||||
#if defined(__ARM_ARCH_7M__)
|
||||
|
||||
/* we use the System Control Block DCRDR reg to simulate a arm7_9 dcc channel
|
||||
/* we use the cortex_m3 DCRDR reg to simulate a arm7_9 dcc channel
|
||||
* DCRDR[7:0] is used by target for status
|
||||
* DCRDR[15:8] is used by target for write buffer
|
||||
* DCRDR[23:16] is used for by host for status
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2008 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
* *
|
||||
* 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., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef DCC_STDIO_H
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
* Copyright (C) 2008 by Frederik Kriewtz *
|
||||
* frederik@kriewitz.eu *
|
||||
* *
|
||||
* 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., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "dcc_stdio.h"
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/* Copyright (C) 2021 by Andreas Fritiofson <andreas.fritiofson@gmail.com> */
|
||||
|
||||
/*
|
||||
* Simple example of using a circular doubly linked list through list.h
|
||||
*
|
||||
* gcc -I ../src/ list_example.c -o list_example
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <helper/list.h>
|
||||
|
||||
static LIST_HEAD(threads);
|
||||
|
||||
struct thread {
|
||||
int id;
|
||||
uint64_t tcb_address;
|
||||
struct list_head lh;
|
||||
};
|
||||
|
||||
void insert(struct thread *t)
|
||||
{
|
||||
list_add_tail(&t->lh, &threads);
|
||||
}
|
||||
|
||||
void remove(struct thread *t)
|
||||
{
|
||||
list_del(&t->lh);
|
||||
}
|
||||
|
||||
struct thread *lookup_id(int id)
|
||||
{
|
||||
struct thread *t;
|
||||
list_for_each_entry(t, &threads, lh) {
|
||||
if (t->id == id)
|
||||
return t;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct thread *lookup_tcb(uint64_t addr)
|
||||
{
|
||||
struct thread *t;
|
||||
list_for_each_entry(t, &threads, lh) {
|
||||
if (t->tcb_address == addr)
|
||||
return t;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct thread t1 = { .id = 1, .tcb_address = 111111111 };
|
||||
struct thread t2 = { .id = 2, .tcb_address = 222222222 };
|
||||
struct thread t3 = { .id = 3, .tcb_address = 333333333 };
|
||||
|
||||
insert(&t1);
|
||||
insert(&t2);
|
||||
assert(lookup_id(1) == &t1);
|
||||
assert(lookup_tcb(111111111) == &t1);
|
||||
assert(lookup_id(2) == &t2);
|
||||
assert(lookup_id(42) == NULL);
|
||||
remove(&t1);
|
||||
assert(lookup_id(1) == NULL);
|
||||
insert(&t3);
|
||||
remove(&t2);
|
||||
assert(lookup_id(3) == &t3);
|
||||
assert(lookup_tcb(333333333) == &t3);
|
||||
assert(lookup_id(2) == NULL);
|
||||
remove(&t3);
|
||||
assert(list_empty(&threads));
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
.PHONY: arm clean-arm
|
||||
|
||||
all: arm stm8
|
||||
|
||||
common_dirs = \
|
||||
checksum \
|
||||
erase_check \
|
||||
watchdog
|
||||
|
||||
ARM_CROSS_COMPILE ?= arm-none-eabi-
|
||||
|
||||
arm_dirs = \
|
||||
flash/fm4 \
|
||||
flash/kinetis_ke \
|
||||
flash/max32xxx \
|
||||
flash/xmc1xxx \
|
||||
debug/xscale
|
||||
|
||||
arm:
|
||||
for d in $(common_dirs); do \
|
||||
$(MAKE) -C $$d arm; \
|
||||
done
|
||||
for d in $(arm_dirs); do \
|
||||
$(MAKE) -C $$d all CROSS_COMPILE=$(ARM_CROSS_COMPILE); \
|
||||
done
|
||||
|
||||
clean-arm:
|
||||
for d in $(arm_dirs); do \
|
||||
$(MAKE) -C $$d clean; \
|
||||
done
|
||||
|
||||
clean: clean-arm
|
||||
for d in $(common_dirs); do \
|
||||
$(MAKE) -C $$d clean; \
|
||||
done
|
||||
|
||||
stm8:
|
||||
$(MAKE) -C erase_check stm8
|
||||
@@ -1,33 +0,0 @@
|
||||
Included in these directories are the src to the various ram loaders used
|
||||
within openocd.
|
||||
|
||||
** target checksum loaders **
|
||||
|
||||
checksum/armv4_5_crc.s :
|
||||
- ARMv4 and ARMv5 checksum loader : see target/arm_crc_code.c:arm_crc_code
|
||||
|
||||
checksum/armv7m_crc.s :
|
||||
- ARMv7m checksum loader : see target/armv7m.c:cortex_m_crc_code
|
||||
|
||||
checksum/mips32.s :
|
||||
- MIPS32 checksum loader : see target/mips32.c:mips_crc_code
|
||||
|
||||
** target flash loaders **
|
||||
|
||||
flash/pic32mx.s :
|
||||
- Microchip PIC32 flash loader : see flash/nor/pic32mx.c:pic32mx_flash_write_code
|
||||
|
||||
flash/stellaris.s :
|
||||
- TI Stellaris flash loader : see flash/nor/stellaris.c:stellaris_write_code
|
||||
|
||||
flash/stm32x.s :
|
||||
- ST STM32 flash loader : see flash/nor/stm32x.c:stm32x_flash_write_code
|
||||
|
||||
flash/str7x.s :
|
||||
- ST STR7 flash loader : see flash/nor/str7x.c:str7x_flash_write_code
|
||||
|
||||
flash/str9x.s :
|
||||
- ST STR9 flash loader : see flash/nor/str9x.c:str9x_flash_write_code
|
||||
|
||||
Spencer Oliver
|
||||
spen@spen-soft.co.uk
|
||||
@@ -1,48 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
BIN2C = ../../../src/helper/bin2char.sh
|
||||
|
||||
ARM_CROSS_COMPILE ?= arm-none-eabi-
|
||||
ARM_AS ?= $(ARM_CROSS_COMPILE)as
|
||||
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
|
||||
|
||||
ARM_AFLAGS = -EL
|
||||
|
||||
RISCV_CROSS_COMPILE ?= riscv64-unknown-elf-
|
||||
RISCV_CC ?= $(RISCV_CROSS_COMPILE)gcc
|
||||
RISCV_OBJCOPY ?= $(RISCV_CROSS_COMPILE)objcopy
|
||||
RISCV32_CFLAGS = -march=rv32e -mabi=ilp32e -nostdlib -nostartfiles -Os -fPIC
|
||||
RISCV64_CFLAGS = -march=rv64i -mabi=lp64 -nostdlib -nostartfiles -Os -fPIC
|
||||
|
||||
all: arm riscv
|
||||
|
||||
arm: armv4_5_crc.inc armv7m_crc.inc
|
||||
|
||||
riscv: riscv32_crc.inc riscv64_crc.inc
|
||||
|
||||
armv4_5_%.elf: armv4_5_%.s
|
||||
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
||||
|
||||
armv4_5_%.bin: armv4_5_%.elf
|
||||
$(ARM_OBJCOPY) -Obinary $< $@
|
||||
|
||||
armv7m_%.elf: armv7m_%.s
|
||||
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
||||
|
||||
armv7m_%.bin: armv7m_%.elf
|
||||
$(ARM_OBJCOPY) -Obinary $< $@
|
||||
|
||||
%.inc: %.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
riscv32_%.elf: riscv_%.c
|
||||
$(RISCV_CC) $(RISCV32_CFLAGS) $< -o $@
|
||||
|
||||
riscv64_%.elf: riscv_%.c
|
||||
$(RISCV_CC) $(RISCV64_CFLAGS) $< -o $@
|
||||
|
||||
riscv%.bin: riscv%.elf
|
||||
$(RISCV_OBJCOPY) -Obinary $< $@
|
||||
|
||||
clean:
|
||||
-rm -f *.elf *.bin *.inc
|
||||
@@ -1,7 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0x00,0x20,0xa0,0xe1,0x00,0x00,0xe0,0xe3,0x01,0x30,0xa0,0xe1,0x00,0x40,0xa0,0xe3,
|
||||
0x0b,0x00,0x00,0xea,0x04,0x10,0xd2,0xe7,0x30,0x70,0x9f,0xe5,0x01,0x0c,0x20,0xe0,
|
||||
0x00,0x50,0xa0,0xe3,0x00,0x00,0x50,0xe3,0x80,0x60,0xa0,0xe1,0x01,0x50,0x85,0xe2,
|
||||
0x06,0x00,0xa0,0xe1,0x07,0x00,0x26,0xb0,0x08,0x00,0x55,0xe3,0xf8,0xff,0xff,0x1a,
|
||||
0x01,0x40,0x84,0xe2,0x03,0x00,0x54,0xe1,0xf1,0xff,0xff,0x1a,0x70,0x00,0x20,0xe1,
|
||||
0xb7,0x1d,0xc1,0x04,
|
||||
@@ -1,45 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
r0 - address in - crc out
|
||||
r1 - char count
|
||||
*/
|
||||
|
||||
.text
|
||||
.arm
|
||||
|
||||
_start:
|
||||
main:
|
||||
mov r2, r0
|
||||
mov r0, #0xffffffff /* crc */
|
||||
mov r3, r1
|
||||
mov r4, #0
|
||||
b ncomp
|
||||
nbyte:
|
||||
ldrb r1, [r2, r4]
|
||||
ldr r7, CRC32XOR
|
||||
eor r0, r0, r1, asl #24
|
||||
mov r5, #0
|
||||
loop:
|
||||
cmp r0, #0
|
||||
mov r6, r0, asl #1
|
||||
add r5, r5, #1
|
||||
mov r0, r6
|
||||
eorlt r0, r6, r7
|
||||
cmp r5, #8
|
||||
bne loop
|
||||
add r4, r4, #1
|
||||
ncomp:
|
||||
cmp r4, r3
|
||||
bne nbyte
|
||||
end:
|
||||
bkpt #0
|
||||
|
||||
CRC32XOR: .word 0x04c11db7
|
||||
|
||||
.end
|
||||
@@ -1,5 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0x02,0x46,0x00,0x20,0xc0,0x43,0x0a,0x4e,0x0b,0x46,0x00,0x24,0x0d,0xe0,0x11,0x5d,
|
||||
0x09,0x06,0x48,0x40,0x00,0x25,0x00,0x28,0x02,0xda,0x40,0x00,0x70,0x40,0x00,0xe0,
|
||||
0x40,0x00,0x01,0x35,0x08,0x2d,0xf6,0xd1,0x01,0x34,0x9c,0x42,0xef,0xd1,0x00,0xbe,
|
||||
0xb7,0x1d,0xc1,0x04,
|
||||
@@ -1,58 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
parameters:
|
||||
r0 - address in - crc out
|
||||
r1 - char count
|
||||
*/
|
||||
|
||||
.text
|
||||
.syntax unified
|
||||
.cpu cortex-m0
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.align 2
|
||||
|
||||
_start:
|
||||
main:
|
||||
mov r2, r0
|
||||
movs r0, #0
|
||||
mvns r0, r0
|
||||
ldr r6, CRC32XOR
|
||||
mov r3, r1
|
||||
movs r4, #0
|
||||
b ncomp
|
||||
nbyte:
|
||||
ldrb r1, [r2, r4]
|
||||
lsls r1, r1, #24
|
||||
eors r0, r0, r1
|
||||
movs r5, #0
|
||||
loop:
|
||||
cmp r0, #0
|
||||
bge notset
|
||||
lsls r0, r0, #1
|
||||
eors r0, r0, r6
|
||||
b cont
|
||||
notset:
|
||||
lsls r0, r0, #1
|
||||
cont:
|
||||
adds r5, r5, #1
|
||||
cmp r5, #8
|
||||
bne loop
|
||||
adds r4, r4, #1
|
||||
ncomp:
|
||||
cmp r4, r3
|
||||
bne nbyte
|
||||
bkpt #0
|
||||
|
||||
.align 2
|
||||
|
||||
CRC32XOR: .word 0x04c11db7
|
||||
|
||||
.end
|
||||
@@ -1,59 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.global main
|
||||
.text
|
||||
.set noreorder
|
||||
|
||||
/* params:
|
||||
* $a0 address in
|
||||
* $a1 byte count
|
||||
* vars
|
||||
* $a0 crc
|
||||
* $a1 crc data byte
|
||||
* temps:
|
||||
* t3 v0 a3 a2 t0 v1
|
||||
*/
|
||||
|
||||
.ent main
|
||||
main:
|
||||
addiu $t4, $a0, 0 /* address in */
|
||||
addiu $t2, $a1, 0 /* count */
|
||||
|
||||
addiu $a0, $zero, 0xffffffff /* a0 crc - result */
|
||||
|
||||
beq $zero, $zero, ncomp
|
||||
addiu $t3, $zero, 0 /* clear bytes read */
|
||||
|
||||
nbyte:
|
||||
lb $a1, ($t4) /* load byte from source address */
|
||||
addi $t4, $t4, 1 /* inc byte count */
|
||||
|
||||
crc:
|
||||
sll $a1, $a1, 24
|
||||
lui $v0, 0x04c1
|
||||
xor $a0, $a0, $a1
|
||||
ori $a3, $v0, 0x1db7
|
||||
addu $a2, $zero, $zero /* clear bit count */
|
||||
loop:
|
||||
sll $t0, $a0, 1
|
||||
addiu $a2, $a2, 1 /* inc bit count */
|
||||
slti $a0, $a0, 0
|
||||
xor $t1, $t0, $a3
|
||||
movn $t0, $t1, $a0
|
||||
slti $v1, $a2, 8 /* 8bits processed */
|
||||
bne $v1, $zero, loop
|
||||
addu $a0, $t0, $zero
|
||||
|
||||
ncomp:
|
||||
bne $t2, $t3, nbyte /* all bytes processed */
|
||||
addiu $t3, $t3, 1
|
||||
|
||||
wait:
|
||||
sdbbp
|
||||
|
||||
.end main
|
||||
@@ -1,70 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0xb3,0x05,0xb5,0x00,0x93,0x07,0xf0,0xff,0x17,0x07,0x00,0x00,0x13,0x07,0x47,0x04,
|
||||
0x63,0x1a,0xb5,0x00,0x13,0x85,0x07,0x00,0x73,0x00,0x10,0x00,0x13,0x85,0x07,0x00,
|
||||
0x67,0x80,0x00,0x00,0x03,0x46,0x05,0x00,0x93,0x96,0x87,0x00,0x93,0xd7,0x87,0x01,
|
||||
0xb3,0xc7,0xc7,0x00,0x93,0x97,0x27,0x00,0xb3,0x07,0xf7,0x00,0x83,0xa7,0x07,0x00,
|
||||
0x13,0x05,0x15,0x00,0xb3,0xc7,0xf6,0x00,0x6f,0xf0,0x9f,0xfc,0x00,0x00,0x00,0x00,
|
||||
0xb7,0x1d,0xc1,0x04,0x6e,0x3b,0x82,0x09,0xd9,0x26,0x43,0x0d,0xdc,0x76,0x04,0x13,
|
||||
0x6b,0x6b,0xc5,0x17,0xb2,0x4d,0x86,0x1a,0x05,0x50,0x47,0x1e,0xb8,0xed,0x08,0x26,
|
||||
0x0f,0xf0,0xc9,0x22,0xd6,0xd6,0x8a,0x2f,0x61,0xcb,0x4b,0x2b,0x64,0x9b,0x0c,0x35,
|
||||
0xd3,0x86,0xcd,0x31,0x0a,0xa0,0x8e,0x3c,0xbd,0xbd,0x4f,0x38,0x70,0xdb,0x11,0x4c,
|
||||
0xc7,0xc6,0xd0,0x48,0x1e,0xe0,0x93,0x45,0xa9,0xfd,0x52,0x41,0xac,0xad,0x15,0x5f,
|
||||
0x1b,0xb0,0xd4,0x5b,0xc2,0x96,0x97,0x56,0x75,0x8b,0x56,0x52,0xc8,0x36,0x19,0x6a,
|
||||
0x7f,0x2b,0xd8,0x6e,0xa6,0x0d,0x9b,0x63,0x11,0x10,0x5a,0x67,0x14,0x40,0x1d,0x79,
|
||||
0xa3,0x5d,0xdc,0x7d,0x7a,0x7b,0x9f,0x70,0xcd,0x66,0x5e,0x74,0xe0,0xb6,0x23,0x98,
|
||||
0x57,0xab,0xe2,0x9c,0x8e,0x8d,0xa1,0x91,0x39,0x90,0x60,0x95,0x3c,0xc0,0x27,0x8b,
|
||||
0x8b,0xdd,0xe6,0x8f,0x52,0xfb,0xa5,0x82,0xe5,0xe6,0x64,0x86,0x58,0x5b,0x2b,0xbe,
|
||||
0xef,0x46,0xea,0xba,0x36,0x60,0xa9,0xb7,0x81,0x7d,0x68,0xb3,0x84,0x2d,0x2f,0xad,
|
||||
0x33,0x30,0xee,0xa9,0xea,0x16,0xad,0xa4,0x5d,0x0b,0x6c,0xa0,0x90,0x6d,0x32,0xd4,
|
||||
0x27,0x70,0xf3,0xd0,0xfe,0x56,0xb0,0xdd,0x49,0x4b,0x71,0xd9,0x4c,0x1b,0x36,0xc7,
|
||||
0xfb,0x06,0xf7,0xc3,0x22,0x20,0xb4,0xce,0x95,0x3d,0x75,0xca,0x28,0x80,0x3a,0xf2,
|
||||
0x9f,0x9d,0xfb,0xf6,0x46,0xbb,0xb8,0xfb,0xf1,0xa6,0x79,0xff,0xf4,0xf6,0x3e,0xe1,
|
||||
0x43,0xeb,0xff,0xe5,0x9a,0xcd,0xbc,0xe8,0x2d,0xd0,0x7d,0xec,0x77,0x70,0x86,0x34,
|
||||
0xc0,0x6d,0x47,0x30,0x19,0x4b,0x04,0x3d,0xae,0x56,0xc5,0x39,0xab,0x06,0x82,0x27,
|
||||
0x1c,0x1b,0x43,0x23,0xc5,0x3d,0x00,0x2e,0x72,0x20,0xc1,0x2a,0xcf,0x9d,0x8e,0x12,
|
||||
0x78,0x80,0x4f,0x16,0xa1,0xa6,0x0c,0x1b,0x16,0xbb,0xcd,0x1f,0x13,0xeb,0x8a,0x01,
|
||||
0xa4,0xf6,0x4b,0x05,0x7d,0xd0,0x08,0x08,0xca,0xcd,0xc9,0x0c,0x07,0xab,0x97,0x78,
|
||||
0xb0,0xb6,0x56,0x7c,0x69,0x90,0x15,0x71,0xde,0x8d,0xd4,0x75,0xdb,0xdd,0x93,0x6b,
|
||||
0x6c,0xc0,0x52,0x6f,0xb5,0xe6,0x11,0x62,0x02,0xfb,0xd0,0x66,0xbf,0x46,0x9f,0x5e,
|
||||
0x08,0x5b,0x5e,0x5a,0xd1,0x7d,0x1d,0x57,0x66,0x60,0xdc,0x53,0x63,0x30,0x9b,0x4d,
|
||||
0xd4,0x2d,0x5a,0x49,0x0d,0x0b,0x19,0x44,0xba,0x16,0xd8,0x40,0x97,0xc6,0xa5,0xac,
|
||||
0x20,0xdb,0x64,0xa8,0xf9,0xfd,0x27,0xa5,0x4e,0xe0,0xe6,0xa1,0x4b,0xb0,0xa1,0xbf,
|
||||
0xfc,0xad,0x60,0xbb,0x25,0x8b,0x23,0xb6,0x92,0x96,0xe2,0xb2,0x2f,0x2b,0xad,0x8a,
|
||||
0x98,0x36,0x6c,0x8e,0x41,0x10,0x2f,0x83,0xf6,0x0d,0xee,0x87,0xf3,0x5d,0xa9,0x99,
|
||||
0x44,0x40,0x68,0x9d,0x9d,0x66,0x2b,0x90,0x2a,0x7b,0xea,0x94,0xe7,0x1d,0xb4,0xe0,
|
||||
0x50,0x00,0x75,0xe4,0x89,0x26,0x36,0xe9,0x3e,0x3b,0xf7,0xed,0x3b,0x6b,0xb0,0xf3,
|
||||
0x8c,0x76,0x71,0xf7,0x55,0x50,0x32,0xfa,0xe2,0x4d,0xf3,0xfe,0x5f,0xf0,0xbc,0xc6,
|
||||
0xe8,0xed,0x7d,0xc2,0x31,0xcb,0x3e,0xcf,0x86,0xd6,0xff,0xcb,0x83,0x86,0xb8,0xd5,
|
||||
0x34,0x9b,0x79,0xd1,0xed,0xbd,0x3a,0xdc,0x5a,0xa0,0xfb,0xd8,0xee,0xe0,0x0c,0x69,
|
||||
0x59,0xfd,0xcd,0x6d,0x80,0xdb,0x8e,0x60,0x37,0xc6,0x4f,0x64,0x32,0x96,0x08,0x7a,
|
||||
0x85,0x8b,0xc9,0x7e,0x5c,0xad,0x8a,0x73,0xeb,0xb0,0x4b,0x77,0x56,0x0d,0x04,0x4f,
|
||||
0xe1,0x10,0xc5,0x4b,0x38,0x36,0x86,0x46,0x8f,0x2b,0x47,0x42,0x8a,0x7b,0x00,0x5c,
|
||||
0x3d,0x66,0xc1,0x58,0xe4,0x40,0x82,0x55,0x53,0x5d,0x43,0x51,0x9e,0x3b,0x1d,0x25,
|
||||
0x29,0x26,0xdc,0x21,0xf0,0x00,0x9f,0x2c,0x47,0x1d,0x5e,0x28,0x42,0x4d,0x19,0x36,
|
||||
0xf5,0x50,0xd8,0x32,0x2c,0x76,0x9b,0x3f,0x9b,0x6b,0x5a,0x3b,0x26,0xd6,0x15,0x03,
|
||||
0x91,0xcb,0xd4,0x07,0x48,0xed,0x97,0x0a,0xff,0xf0,0x56,0x0e,0xfa,0xa0,0x11,0x10,
|
||||
0x4d,0xbd,0xd0,0x14,0x94,0x9b,0x93,0x19,0x23,0x86,0x52,0x1d,0x0e,0x56,0x2f,0xf1,
|
||||
0xb9,0x4b,0xee,0xf5,0x60,0x6d,0xad,0xf8,0xd7,0x70,0x6c,0xfc,0xd2,0x20,0x2b,0xe2,
|
||||
0x65,0x3d,0xea,0xe6,0xbc,0x1b,0xa9,0xeb,0x0b,0x06,0x68,0xef,0xb6,0xbb,0x27,0xd7,
|
||||
0x01,0xa6,0xe6,0xd3,0xd8,0x80,0xa5,0xde,0x6f,0x9d,0x64,0xda,0x6a,0xcd,0x23,0xc4,
|
||||
0xdd,0xd0,0xe2,0xc0,0x04,0xf6,0xa1,0xcd,0xb3,0xeb,0x60,0xc9,0x7e,0x8d,0x3e,0xbd,
|
||||
0xc9,0x90,0xff,0xb9,0x10,0xb6,0xbc,0xb4,0xa7,0xab,0x7d,0xb0,0xa2,0xfb,0x3a,0xae,
|
||||
0x15,0xe6,0xfb,0xaa,0xcc,0xc0,0xb8,0xa7,0x7b,0xdd,0x79,0xa3,0xc6,0x60,0x36,0x9b,
|
||||
0x71,0x7d,0xf7,0x9f,0xa8,0x5b,0xb4,0x92,0x1f,0x46,0x75,0x96,0x1a,0x16,0x32,0x88,
|
||||
0xad,0x0b,0xf3,0x8c,0x74,0x2d,0xb0,0x81,0xc3,0x30,0x71,0x85,0x99,0x90,0x8a,0x5d,
|
||||
0x2e,0x8d,0x4b,0x59,0xf7,0xab,0x08,0x54,0x40,0xb6,0xc9,0x50,0x45,0xe6,0x8e,0x4e,
|
||||
0xf2,0xfb,0x4f,0x4a,0x2b,0xdd,0x0c,0x47,0x9c,0xc0,0xcd,0x43,0x21,0x7d,0x82,0x7b,
|
||||
0x96,0x60,0x43,0x7f,0x4f,0x46,0x00,0x72,0xf8,0x5b,0xc1,0x76,0xfd,0x0b,0x86,0x68,
|
||||
0x4a,0x16,0x47,0x6c,0x93,0x30,0x04,0x61,0x24,0x2d,0xc5,0x65,0xe9,0x4b,0x9b,0x11,
|
||||
0x5e,0x56,0x5a,0x15,0x87,0x70,0x19,0x18,0x30,0x6d,0xd8,0x1c,0x35,0x3d,0x9f,0x02,
|
||||
0x82,0x20,0x5e,0x06,0x5b,0x06,0x1d,0x0b,0xec,0x1b,0xdc,0x0f,0x51,0xa6,0x93,0x37,
|
||||
0xe6,0xbb,0x52,0x33,0x3f,0x9d,0x11,0x3e,0x88,0x80,0xd0,0x3a,0x8d,0xd0,0x97,0x24,
|
||||
0x3a,0xcd,0x56,0x20,0xe3,0xeb,0x15,0x2d,0x54,0xf6,0xd4,0x29,0x79,0x26,0xa9,0xc5,
|
||||
0xce,0x3b,0x68,0xc1,0x17,0x1d,0x2b,0xcc,0xa0,0x00,0xea,0xc8,0xa5,0x50,0xad,0xd6,
|
||||
0x12,0x4d,0x6c,0xd2,0xcb,0x6b,0x2f,0xdf,0x7c,0x76,0xee,0xdb,0xc1,0xcb,0xa1,0xe3,
|
||||
0x76,0xd6,0x60,0xe7,0xaf,0xf0,0x23,0xea,0x18,0xed,0xe2,0xee,0x1d,0xbd,0xa5,0xf0,
|
||||
0xaa,0xa0,0x64,0xf4,0x73,0x86,0x27,0xf9,0xc4,0x9b,0xe6,0xfd,0x09,0xfd,0xb8,0x89,
|
||||
0xbe,0xe0,0x79,0x8d,0x67,0xc6,0x3a,0x80,0xd0,0xdb,0xfb,0x84,0xd5,0x8b,0xbc,0x9a,
|
||||
0x62,0x96,0x7d,0x9e,0xbb,0xb0,0x3e,0x93,0x0c,0xad,0xff,0x97,0xb1,0x10,0xb0,0xaf,
|
||||
0x06,0x0d,0x71,0xab,0xdf,0x2b,0x32,0xa6,0x68,0x36,0xf3,0xa2,0x6d,0x66,0xb4,0xbc,
|
||||
0xda,0x7b,0x75,0xb8,0x03,0x5d,0x36,0xb5,0xb4,0x40,0xf7,0xb1,
|
||||
@@ -1,71 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0x93,0x07,0xf0,0xff,0x93,0x06,0xf0,0xff,0x17,0x06,0x00,0x00,0x13,0x06,0x06,0x05,
|
||||
0x9b,0x85,0xf5,0xff,0x63,0x9a,0xd5,0x00,0x13,0x85,0x07,0x00,0x73,0x00,0x10,0x00,
|
||||
0x13,0x85,0x07,0x00,0x67,0x80,0x00,0x00,0x83,0x48,0x05,0x00,0x1b,0xd7,0x87,0x01,
|
||||
0x1b,0x98,0x87,0x00,0x33,0x47,0x17,0x01,0x13,0x17,0x27,0x00,0x33,0x07,0xe6,0x00,
|
||||
0x83,0x27,0x07,0x00,0x13,0x05,0x15,0x00,0xb3,0xc7,0x07,0x01,0x9b,0x87,0x07,0x00,
|
||||
0x6f,0xf0,0x1f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb7,0x1d,0xc1,0x04,
|
||||
0x6e,0x3b,0x82,0x09,0xd9,0x26,0x43,0x0d,0xdc,0x76,0x04,0x13,0x6b,0x6b,0xc5,0x17,
|
||||
0xb2,0x4d,0x86,0x1a,0x05,0x50,0x47,0x1e,0xb8,0xed,0x08,0x26,0x0f,0xf0,0xc9,0x22,
|
||||
0xd6,0xd6,0x8a,0x2f,0x61,0xcb,0x4b,0x2b,0x64,0x9b,0x0c,0x35,0xd3,0x86,0xcd,0x31,
|
||||
0x0a,0xa0,0x8e,0x3c,0xbd,0xbd,0x4f,0x38,0x70,0xdb,0x11,0x4c,0xc7,0xc6,0xd0,0x48,
|
||||
0x1e,0xe0,0x93,0x45,0xa9,0xfd,0x52,0x41,0xac,0xad,0x15,0x5f,0x1b,0xb0,0xd4,0x5b,
|
||||
0xc2,0x96,0x97,0x56,0x75,0x8b,0x56,0x52,0xc8,0x36,0x19,0x6a,0x7f,0x2b,0xd8,0x6e,
|
||||
0xa6,0x0d,0x9b,0x63,0x11,0x10,0x5a,0x67,0x14,0x40,0x1d,0x79,0xa3,0x5d,0xdc,0x7d,
|
||||
0x7a,0x7b,0x9f,0x70,0xcd,0x66,0x5e,0x74,0xe0,0xb6,0x23,0x98,0x57,0xab,0xe2,0x9c,
|
||||
0x8e,0x8d,0xa1,0x91,0x39,0x90,0x60,0x95,0x3c,0xc0,0x27,0x8b,0x8b,0xdd,0xe6,0x8f,
|
||||
0x52,0xfb,0xa5,0x82,0xe5,0xe6,0x64,0x86,0x58,0x5b,0x2b,0xbe,0xef,0x46,0xea,0xba,
|
||||
0x36,0x60,0xa9,0xb7,0x81,0x7d,0x68,0xb3,0x84,0x2d,0x2f,0xad,0x33,0x30,0xee,0xa9,
|
||||
0xea,0x16,0xad,0xa4,0x5d,0x0b,0x6c,0xa0,0x90,0x6d,0x32,0xd4,0x27,0x70,0xf3,0xd0,
|
||||
0xfe,0x56,0xb0,0xdd,0x49,0x4b,0x71,0xd9,0x4c,0x1b,0x36,0xc7,0xfb,0x06,0xf7,0xc3,
|
||||
0x22,0x20,0xb4,0xce,0x95,0x3d,0x75,0xca,0x28,0x80,0x3a,0xf2,0x9f,0x9d,0xfb,0xf6,
|
||||
0x46,0xbb,0xb8,0xfb,0xf1,0xa6,0x79,0xff,0xf4,0xf6,0x3e,0xe1,0x43,0xeb,0xff,0xe5,
|
||||
0x9a,0xcd,0xbc,0xe8,0x2d,0xd0,0x7d,0xec,0x77,0x70,0x86,0x34,0xc0,0x6d,0x47,0x30,
|
||||
0x19,0x4b,0x04,0x3d,0xae,0x56,0xc5,0x39,0xab,0x06,0x82,0x27,0x1c,0x1b,0x43,0x23,
|
||||
0xc5,0x3d,0x00,0x2e,0x72,0x20,0xc1,0x2a,0xcf,0x9d,0x8e,0x12,0x78,0x80,0x4f,0x16,
|
||||
0xa1,0xa6,0x0c,0x1b,0x16,0xbb,0xcd,0x1f,0x13,0xeb,0x8a,0x01,0xa4,0xf6,0x4b,0x05,
|
||||
0x7d,0xd0,0x08,0x08,0xca,0xcd,0xc9,0x0c,0x07,0xab,0x97,0x78,0xb0,0xb6,0x56,0x7c,
|
||||
0x69,0x90,0x15,0x71,0xde,0x8d,0xd4,0x75,0xdb,0xdd,0x93,0x6b,0x6c,0xc0,0x52,0x6f,
|
||||
0xb5,0xe6,0x11,0x62,0x02,0xfb,0xd0,0x66,0xbf,0x46,0x9f,0x5e,0x08,0x5b,0x5e,0x5a,
|
||||
0xd1,0x7d,0x1d,0x57,0x66,0x60,0xdc,0x53,0x63,0x30,0x9b,0x4d,0xd4,0x2d,0x5a,0x49,
|
||||
0x0d,0x0b,0x19,0x44,0xba,0x16,0xd8,0x40,0x97,0xc6,0xa5,0xac,0x20,0xdb,0x64,0xa8,
|
||||
0xf9,0xfd,0x27,0xa5,0x4e,0xe0,0xe6,0xa1,0x4b,0xb0,0xa1,0xbf,0xfc,0xad,0x60,0xbb,
|
||||
0x25,0x8b,0x23,0xb6,0x92,0x96,0xe2,0xb2,0x2f,0x2b,0xad,0x8a,0x98,0x36,0x6c,0x8e,
|
||||
0x41,0x10,0x2f,0x83,0xf6,0x0d,0xee,0x87,0xf3,0x5d,0xa9,0x99,0x44,0x40,0x68,0x9d,
|
||||
0x9d,0x66,0x2b,0x90,0x2a,0x7b,0xea,0x94,0xe7,0x1d,0xb4,0xe0,0x50,0x00,0x75,0xe4,
|
||||
0x89,0x26,0x36,0xe9,0x3e,0x3b,0xf7,0xed,0x3b,0x6b,0xb0,0xf3,0x8c,0x76,0x71,0xf7,
|
||||
0x55,0x50,0x32,0xfa,0xe2,0x4d,0xf3,0xfe,0x5f,0xf0,0xbc,0xc6,0xe8,0xed,0x7d,0xc2,
|
||||
0x31,0xcb,0x3e,0xcf,0x86,0xd6,0xff,0xcb,0x83,0x86,0xb8,0xd5,0x34,0x9b,0x79,0xd1,
|
||||
0xed,0xbd,0x3a,0xdc,0x5a,0xa0,0xfb,0xd8,0xee,0xe0,0x0c,0x69,0x59,0xfd,0xcd,0x6d,
|
||||
0x80,0xdb,0x8e,0x60,0x37,0xc6,0x4f,0x64,0x32,0x96,0x08,0x7a,0x85,0x8b,0xc9,0x7e,
|
||||
0x5c,0xad,0x8a,0x73,0xeb,0xb0,0x4b,0x77,0x56,0x0d,0x04,0x4f,0xe1,0x10,0xc5,0x4b,
|
||||
0x38,0x36,0x86,0x46,0x8f,0x2b,0x47,0x42,0x8a,0x7b,0x00,0x5c,0x3d,0x66,0xc1,0x58,
|
||||
0xe4,0x40,0x82,0x55,0x53,0x5d,0x43,0x51,0x9e,0x3b,0x1d,0x25,0x29,0x26,0xdc,0x21,
|
||||
0xf0,0x00,0x9f,0x2c,0x47,0x1d,0x5e,0x28,0x42,0x4d,0x19,0x36,0xf5,0x50,0xd8,0x32,
|
||||
0x2c,0x76,0x9b,0x3f,0x9b,0x6b,0x5a,0x3b,0x26,0xd6,0x15,0x03,0x91,0xcb,0xd4,0x07,
|
||||
0x48,0xed,0x97,0x0a,0xff,0xf0,0x56,0x0e,0xfa,0xa0,0x11,0x10,0x4d,0xbd,0xd0,0x14,
|
||||
0x94,0x9b,0x93,0x19,0x23,0x86,0x52,0x1d,0x0e,0x56,0x2f,0xf1,0xb9,0x4b,0xee,0xf5,
|
||||
0x60,0x6d,0xad,0xf8,0xd7,0x70,0x6c,0xfc,0xd2,0x20,0x2b,0xe2,0x65,0x3d,0xea,0xe6,
|
||||
0xbc,0x1b,0xa9,0xeb,0x0b,0x06,0x68,0xef,0xb6,0xbb,0x27,0xd7,0x01,0xa6,0xe6,0xd3,
|
||||
0xd8,0x80,0xa5,0xde,0x6f,0x9d,0x64,0xda,0x6a,0xcd,0x23,0xc4,0xdd,0xd0,0xe2,0xc0,
|
||||
0x04,0xf6,0xa1,0xcd,0xb3,0xeb,0x60,0xc9,0x7e,0x8d,0x3e,0xbd,0xc9,0x90,0xff,0xb9,
|
||||
0x10,0xb6,0xbc,0xb4,0xa7,0xab,0x7d,0xb0,0xa2,0xfb,0x3a,0xae,0x15,0xe6,0xfb,0xaa,
|
||||
0xcc,0xc0,0xb8,0xa7,0x7b,0xdd,0x79,0xa3,0xc6,0x60,0x36,0x9b,0x71,0x7d,0xf7,0x9f,
|
||||
0xa8,0x5b,0xb4,0x92,0x1f,0x46,0x75,0x96,0x1a,0x16,0x32,0x88,0xad,0x0b,0xf3,0x8c,
|
||||
0x74,0x2d,0xb0,0x81,0xc3,0x30,0x71,0x85,0x99,0x90,0x8a,0x5d,0x2e,0x8d,0x4b,0x59,
|
||||
0xf7,0xab,0x08,0x54,0x40,0xb6,0xc9,0x50,0x45,0xe6,0x8e,0x4e,0xf2,0xfb,0x4f,0x4a,
|
||||
0x2b,0xdd,0x0c,0x47,0x9c,0xc0,0xcd,0x43,0x21,0x7d,0x82,0x7b,0x96,0x60,0x43,0x7f,
|
||||
0x4f,0x46,0x00,0x72,0xf8,0x5b,0xc1,0x76,0xfd,0x0b,0x86,0x68,0x4a,0x16,0x47,0x6c,
|
||||
0x93,0x30,0x04,0x61,0x24,0x2d,0xc5,0x65,0xe9,0x4b,0x9b,0x11,0x5e,0x56,0x5a,0x15,
|
||||
0x87,0x70,0x19,0x18,0x30,0x6d,0xd8,0x1c,0x35,0x3d,0x9f,0x02,0x82,0x20,0x5e,0x06,
|
||||
0x5b,0x06,0x1d,0x0b,0xec,0x1b,0xdc,0x0f,0x51,0xa6,0x93,0x37,0xe6,0xbb,0x52,0x33,
|
||||
0x3f,0x9d,0x11,0x3e,0x88,0x80,0xd0,0x3a,0x8d,0xd0,0x97,0x24,0x3a,0xcd,0x56,0x20,
|
||||
0xe3,0xeb,0x15,0x2d,0x54,0xf6,0xd4,0x29,0x79,0x26,0xa9,0xc5,0xce,0x3b,0x68,0xc1,
|
||||
0x17,0x1d,0x2b,0xcc,0xa0,0x00,0xea,0xc8,0xa5,0x50,0xad,0xd6,0x12,0x4d,0x6c,0xd2,
|
||||
0xcb,0x6b,0x2f,0xdf,0x7c,0x76,0xee,0xdb,0xc1,0xcb,0xa1,0xe3,0x76,0xd6,0x60,0xe7,
|
||||
0xaf,0xf0,0x23,0xea,0x18,0xed,0xe2,0xee,0x1d,0xbd,0xa5,0xf0,0xaa,0xa0,0x64,0xf4,
|
||||
0x73,0x86,0x27,0xf9,0xc4,0x9b,0xe6,0xfd,0x09,0xfd,0xb8,0x89,0xbe,0xe0,0x79,0x8d,
|
||||
0x67,0xc6,0x3a,0x80,0xd0,0xdb,0xfb,0x84,0xd5,0x8b,0xbc,0x9a,0x62,0x96,0x7d,0x9e,
|
||||
0xbb,0xb0,0x3e,0x93,0x0c,0xad,0xff,0x97,0xb1,0x10,0xb0,0xaf,0x06,0x0d,0x71,0xab,
|
||||
0xdf,0x2b,0x32,0xa6,0x68,0x36,0xf3,0xa2,0x6d,0x66,0xb4,0xbc,0xda,0x7b,0x75,0xb8,
|
||||
0x03,0x5d,0x36,0xb5,0xb4,0x40,0xf7,0xb1,
|
||||
@@ -1,139 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/* Copyright (C) 2009-2021 Free Software Foundation, Inc. */
|
||||
|
||||
/* Copied from https://github.com/gcc-mirror/gcc/blob/master/libiberty/crc32.c
|
||||
* and then tweaked a little. */
|
||||
|
||||
/* This table was generated by the following program.
|
||||
#include <stdio.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
unsigned int i, j;
|
||||
unsigned int c;
|
||||
int table[256];
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
for (c = i << 24, j = 8; j > 0; --j)
|
||||
c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
|
||||
table[i] = c;
|
||||
}
|
||||
printf ("static const unsigned int crc32_table[] =\n{\n");
|
||||
for (i = 0; i < 256; i += 4)
|
||||
{
|
||||
printf (" 0x%08x, 0x%08x, 0x%08x, 0x%08x",
|
||||
table[i + 0], table[i + 1], table[i + 2], table[i + 3]);
|
||||
if (i + 4 < 256)
|
||||
putchar (',');
|
||||
putchar ('\n');
|
||||
}
|
||||
printf ("};\n");
|
||||
return 0;
|
||||
}
|
||||
For more information on CRC, see, e.g.,
|
||||
http://www.ross.net/crc/download/crc_v3.txt. */
|
||||
|
||||
static const unsigned int crc32_table[] = {
|
||||
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
|
||||
0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
|
||||
0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
|
||||
0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
|
||||
0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
|
||||
0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
|
||||
0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
|
||||
0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
|
||||
0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
|
||||
0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
|
||||
0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
|
||||
0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
|
||||
0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
|
||||
0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
|
||||
0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
|
||||
0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
|
||||
0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
|
||||
0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
|
||||
0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
|
||||
0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
|
||||
0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
|
||||
0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
|
||||
0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
|
||||
0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
|
||||
0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
|
||||
0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
|
||||
0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
|
||||
0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
|
||||
0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
|
||||
0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
|
||||
0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
|
||||
0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
|
||||
0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
|
||||
0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
|
||||
0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
|
||||
0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
|
||||
0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
|
||||
0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
|
||||
0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
|
||||
0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
|
||||
0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
|
||||
0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
|
||||
0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
|
||||
0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
|
||||
0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
|
||||
0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
|
||||
0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
|
||||
0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
|
||||
0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
|
||||
0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
|
||||
0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
|
||||
0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
|
||||
0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
|
||||
0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
|
||||
0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
|
||||
0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
|
||||
0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
|
||||
0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
|
||||
0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
|
||||
0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
|
||||
0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
|
||||
0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
|
||||
0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
|
||||
0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
|
||||
};
|
||||
|
||||
/*
|
||||
@deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @
|
||||
int @var{len}, unsigned int @var{init})
|
||||
Compute the 32-bit CRC of @var{buf} which has length @var{len}. The
|
||||
starting value is 0xffffffff.
|
||||
This is used by the @command{gdb} remote protocol for the @samp{qCRC}
|
||||
command.
|
||||
This CRC can be specified as:
|
||||
Width : 32
|
||||
Poly : 0x04c11db7
|
||||
Init : 0xffffffff
|
||||
RefIn : false
|
||||
RefOut : false
|
||||
XorOut : 0
|
||||
This differs from the "standard" CRC-32 algorithm in that the values
|
||||
are not reflected, and there is no final XOR value. These differences
|
||||
make it easy to compose the values of multiple blocks.
|
||||
@end deftypefn
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
unsigned int
|
||||
xcrc32(const unsigned char *buf, int len)
|
||||
{
|
||||
uint32_t crc = 0xffffffff;
|
||||
while (len--) {
|
||||
crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
|
||||
buf++;
|
||||
}
|
||||
asm("mv a0, %0;"
|
||||
"ebreak;"
|
||||
:
|
||||
: "r"(crc));
|
||||
return crc;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
BIN2C = ../../../../src/helper/bin2char.sh
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
|
||||
CC=$(CROSS_COMPILE)gcc
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
|
||||
CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
|
||||
LDFLAGS = -Tdebug_handler.ld
|
||||
|
||||
all: debug_handler.inc
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
.INTERMEDIATE: debug_handler.elf
|
||||
|
||||
debug_handler.elf: protocol.h
|
||||
|
||||
%.elf: %.S
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
||||
|
||||
%.lst: %.elf
|
||||
$(OBJDUMP) -S $< > $@
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -Obinary $< $@
|
||||
|
||||
%.inc: %.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
clean:
|
||||
-rm -f *.elf *.lst *.bin *.inc
|
||||
@@ -1,101 +0,0 @@
|
||||
/* Autogenerated with ../../../../src/helper/bin2char.sh */
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x10,0xde,0x1a,0xee,0x02,0xd1,0x1d,0xe2,0x01,0x00,0x00,0x1a,0x03,0xd1,0xa0,0xe3,
|
||||
0x10,0xde,0x0a,0xee,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,0x10,0x0e,0x08,0xee,
|
||||
0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,0x10,0xee,0x08,0xee,0x01,0x00,0xa0,0xe1,
|
||||
0x70,0x01,0x00,0xeb,0x02,0x00,0xa0,0xe1,0x6e,0x01,0x00,0xeb,0x03,0x00,0xa0,0xe1,
|
||||
0x6c,0x01,0x00,0xeb,0x04,0x00,0xa0,0xe1,0x6a,0x01,0x00,0xeb,0x05,0x00,0xa0,0xe1,
|
||||
0x68,0x01,0x00,0xeb,0x06,0x00,0xa0,0xe1,0x66,0x01,0x00,0xeb,0x07,0x00,0xa0,0xe1,
|
||||
0x64,0x01,0x00,0xeb,0x00,0x00,0x4f,0xe1,0x62,0x01,0x00,0xeb,0x00,0x00,0x4f,0xe1,
|
||||
0x20,0x00,0xc0,0xe3,0xc0,0x00,0x80,0xe3,0x1f,0x10,0x00,0xe2,0x10,0x00,0x51,0xe3,
|
||||
0x01,0x00,0x00,0x1a,0x1f,0x00,0xc0,0xe3,0x1f,0x00,0x80,0xe3,0x3d,0x00,0x00,0xea,
|
||||
0x5c,0x01,0x00,0xeb,0x00,0x00,0x50,0xe3,0x39,0x00,0x00,0x0a,0x01,0x00,0x50,0xe3,
|
||||
0x5a,0x00,0x00,0x0a,0x11,0x00,0x50,0xe3,0x7b,0x00,0x00,0x0a,0x12,0x00,0x50,0xe3,
|
||||
0x83,0x00,0x00,0x0a,0x14,0x00,0x50,0xe3,0x8b,0x00,0x00,0x0a,0x21,0x00,0x50,0xe3,
|
||||
0x93,0x00,0x00,0x0a,0x22,0x00,0x50,0xe3,0x9b,0x00,0x00,0x0a,0x24,0x00,0x50,0xe3,
|
||||
0xa3,0x00,0x00,0x0a,0x30,0x00,0x50,0xe3,0x14,0x00,0x00,0x0a,0x31,0x00,0x50,0xe3,
|
||||
0x2b,0x01,0x00,0x0a,0x40,0x00,0x50,0xe3,0xc4,0x00,0x00,0x0a,0x41,0x00,0x50,0xe3,
|
||||
0xed,0x00,0x00,0x0a,0x50,0x00,0x50,0xe3,0xa7,0x00,0x00,0x0a,0x51,0x00,0x50,0xe3,
|
||||
0xac,0x00,0x00,0x0a,0x52,0x00,0x50,0xe3,0xac,0x00,0x00,0x0a,0x53,0x00,0x50,0xe3,
|
||||
0xac,0x00,0x00,0x0a,0x60,0x00,0x50,0xe3,0x9b,0x00,0x00,0x0a,0x61,0x00,0x50,0xe3,
|
||||
0x0c,0x01,0x00,0x0a,0x62,0x00,0x50,0xe3,0x14,0x01,0x00,0x0a,0xd7,0xff,0xff,0xea,
|
||||
0x34,0x01,0x00,0xeb,0x00,0xf0,0x69,0xe1,0x32,0x01,0x00,0xeb,0x00,0x70,0xa0,0xe1,
|
||||
0x30,0x01,0x00,0xeb,0x00,0x60,0xa0,0xe1,0x2e,0x01,0x00,0xeb,0x00,0x50,0xa0,0xe1,
|
||||
0x2c,0x01,0x00,0xeb,0x00,0x40,0xa0,0xe1,0x2a,0x01,0x00,0xeb,0x00,0x30,0xa0,0xe1,
|
||||
0x28,0x01,0x00,0xeb,0x00,0x20,0xa0,0xe1,0x26,0x01,0x00,0xeb,0x00,0x10,0xa0,0xe1,
|
||||
0x24,0x01,0x00,0xeb,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,0x10,0xee,0x19,0xee,
|
||||
0x00,0xf0,0x5e,0xe2,0x1f,0x01,0x00,0xeb,0x00,0x70,0x0f,0xe1,0x00,0xf0,0x21,0xe1,
|
||||
0x00,0x00,0xa0,0xe1,0x1f,0x10,0x00,0xe2,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,
|
||||
0x10,0x8e,0x08,0xee,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,0x10,0x9e,0x08,0xee,
|
||||
0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,0x10,0xae,0x08,0xee,0x10,0xfe,0x1e,0xee,
|
||||
0xfd,0xff,0xff,0x6a,0x10,0xbe,0x08,0xee,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,
|
||||
0x10,0xce,0x08,0xee,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,0x10,0xde,0x08,0xee,
|
||||
0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,0x10,0xee,0x08,0xee,0x1f,0x00,0x51,0xe3,
|
||||
0x03,0x00,0x00,0x0a,0x00,0x00,0x4f,0xe1,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,
|
||||
0x10,0x0e,0x08,0xee,0x07,0xf0,0x21,0xe1,0x00,0x00,0xa0,0xe1,0x9f,0xff,0xff,0xea,
|
||||
0xfc,0x00,0x00,0xeb,0x00,0x70,0x0f,0xe1,0x00,0xf0,0x21,0xe1,0x00,0x00,0xa0,0xe1,
|
||||
0x1f,0x10,0x00,0xe2,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,0x10,0x8e,0x19,0xee,
|
||||
0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,0x10,0x9e,0x19,0xee,0x10,0xfe,0x1e,0xee,
|
||||
0xfd,0xff,0xff,0x5a,0x10,0xae,0x19,0xee,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,
|
||||
0x10,0xbe,0x19,0xee,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,0x10,0xce,0x19,0xee,
|
||||
0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,0x10,0xde,0x19,0xee,0x10,0xfe,0x1e,0xee,
|
||||
0xfd,0xff,0xff,0x5a,0x10,0xee,0x19,0xee,0x1f,0x00,0x51,0xe3,0x03,0x00,0x00,0x0a,
|
||||
0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,0x10,0x0e,0x19,0xee,0x00,0xf0,0x69,0xe1,
|
||||
0x07,0xf0,0x21,0xe1,0x00,0x00,0xa0,0xe1,0x7c,0xff,0xff,0xea,0xd9,0x00,0x00,0xeb,
|
||||
0x00,0x20,0xa0,0xe1,0xd7,0x00,0x00,0xeb,0x00,0x10,0xa0,0xe1,0x01,0x00,0xd2,0xe4,
|
||||
0x9a,0x8f,0x07,0xee,0xcf,0x00,0x00,0xeb,0x01,0x10,0x51,0xe2,0xfa,0xff,0xff,0x1a,
|
||||
0x72,0xff,0xff,0xea,0xcf,0x00,0x00,0xeb,0x00,0x20,0xa0,0xe1,0xcd,0x00,0x00,0xeb,
|
||||
0x00,0x10,0xa0,0xe1,0xb2,0x00,0xd2,0xe0,0x9a,0x8f,0x07,0xee,0xc5,0x00,0x00,0xeb,
|
||||
0x01,0x10,0x51,0xe2,0xfa,0xff,0xff,0x1a,0x68,0xff,0xff,0xea,0xc5,0x00,0x00,0xeb,
|
||||
0x00,0x20,0xa0,0xe1,0xc3,0x00,0x00,0xeb,0x00,0x10,0xa0,0xe1,0x04,0x00,0x92,0xe4,
|
||||
0x9a,0x8f,0x07,0xee,0xbb,0x00,0x00,0xeb,0x01,0x10,0x51,0xe2,0xfa,0xff,0xff,0x1a,
|
||||
0x5e,0xff,0xff,0xea,0xbb,0x00,0x00,0xeb,0x00,0x20,0xa0,0xe1,0xb9,0x00,0x00,0xeb,
|
||||
0x00,0x10,0xa0,0xe1,0xb7,0x00,0x00,0xeb,0x01,0x00,0xc2,0xe4,0x9a,0x8f,0x07,0xee,
|
||||
0x01,0x10,0x51,0xe2,0xfa,0xff,0xff,0x1a,0x54,0xff,0xff,0xea,0xb1,0x00,0x00,0xeb,
|
||||
0x00,0x20,0xa0,0xe1,0xaf,0x00,0x00,0xeb,0x00,0x10,0xa0,0xe1,0xad,0x00,0x00,0xeb,
|
||||
0xb2,0x00,0xc2,0xe0,0x9a,0x8f,0x07,0xee,0x01,0x10,0x51,0xe2,0xfa,0xff,0xff,0x1a,
|
||||
0x4a,0xff,0xff,0xea,0xa7,0x00,0x00,0xeb,0x00,0x20,0xa0,0xe1,0xa5,0x00,0x00,0xeb,
|
||||
0x00,0x10,0xa0,0xe1,0xa3,0x00,0x00,0xeb,0x04,0x00,0x82,0xe4,0x9a,0x8f,0x07,0xee,
|
||||
0x01,0x10,0x51,0xe2,0xfa,0xff,0xff,0x1a,0x40,0xff,0xff,0xea,0x10,0x0e,0x1a,0xee,
|
||||
0x20,0x00,0xc0,0xe3,0x10,0x0e,0x0a,0xee,0x3c,0xff,0xff,0xea,0x99,0x00,0x00,0xeb,
|
||||
0x01,0x1b,0xa0,0xe3,0xb2,0x0f,0x07,0xee,0x20,0x00,0x80,0xe2,0x01,0x10,0x51,0xe2,
|
||||
0xfb,0xff,0xff,0x1a,0x35,0xff,0xff,0xea,0x16,0x0f,0x07,0xee,0x33,0xff,0xff,0xea,
|
||||
0x15,0x0f,0x07,0xee,0x31,0xff,0xff,0xea,0x10,0x0f,0x12,0xee,0x00,0x00,0xa0,0xe1,
|
||||
0x04,0xf0,0x4f,0xe2,0x2d,0xff,0xff,0xea,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x80,0x00,0x00,0xeb,0x00,0x10,0x8f,0xe2,0x80,0xf1,0x81,0xe0,0x10,0x0f,0x10,0xee,
|
||||
0x23,0x00,0x00,0xea,0x30,0x0f,0x10,0xee,0x21,0x00,0x00,0xea,0x10,0x0f,0x11,0xee,
|
||||
0x1f,0x00,0x00,0xea,0x30,0x0f,0x11,0xee,0x1d,0x00,0x00,0xea,0x10,0x0f,0x12,0xee,
|
||||
0x1b,0x00,0x00,0xea,0x10,0x0f,0x13,0xee,0x19,0x00,0x00,0xea,0x10,0x0f,0x15,0xee,
|
||||
0x17,0x00,0x00,0xea,0x10,0x0f,0x16,0xee,0x15,0x00,0x00,0xea,0x10,0x0f,0x1d,0xee,
|
||||
0x13,0x00,0x00,0xea,0x10,0x0f,0x1f,0xee,0x11,0x00,0x00,0xea,0x18,0x0f,0x1e,0xee,
|
||||
0x0f,0x00,0x00,0xea,0x19,0x0f,0x1e,0xee,0x0d,0x00,0x00,0xea,0x10,0x0f,0x1e,0xee,
|
||||
0x0b,0x00,0x00,0xea,0x13,0x0f,0x1e,0xee,0x09,0x00,0x00,0xea,0x14,0x0f,0x1e,0xee,
|
||||
0x07,0x00,0x00,0xea,0x10,0x0e,0x1b,0xee,0x05,0x00,0x00,0xea,0x10,0x0e,0x1c,0xee,
|
||||
0x03,0x00,0x00,0xea,0x10,0x0e,0x1d,0xee,0x01,0x00,0x00,0xea,0x10,0x0e,0x1a,0xee,
|
||||
0xff,0xff,0xff,0xea,0x53,0x00,0x00,0xeb,0xf8,0xfe,0xff,0xea,0x55,0x00,0x00,0xeb,
|
||||
0x00,0x10,0xa0,0xe1,0x53,0x00,0x00,0xeb,0x00,0x20,0x8f,0xe2,0x81,0xf1,0x82,0xe0,
|
||||
0x10,0x0f,0x00,0xee,0xf1,0xfe,0xff,0xea,0x30,0x0f,0x00,0xee,0xef,0xfe,0xff,0xea,
|
||||
0x10,0x0f,0x01,0xee,0xed,0xfe,0xff,0xea,0x30,0x0f,0x01,0xee,0xeb,0xfe,0xff,0xea,
|
||||
0x10,0x0f,0x02,0xee,0xe9,0xfe,0xff,0xea,0x10,0x0f,0x03,0xee,0xe7,0xfe,0xff,0xea,
|
||||
0x10,0x0f,0x05,0xee,0xe5,0xfe,0xff,0xea,0x10,0x0f,0x06,0xee,0xe3,0xfe,0xff,0xea,
|
||||
0x10,0x0f,0x0d,0xee,0xe1,0xfe,0xff,0xea,0x10,0x0f,0x0f,0xee,0xdf,0xfe,0xff,0xea,
|
||||
0x18,0x0f,0x0e,0xee,0xdd,0xfe,0xff,0xea,0x19,0x0f,0x0e,0xee,0xdb,0xfe,0xff,0xea,
|
||||
0x10,0x0f,0x0e,0xee,0xd9,0xfe,0xff,0xea,0x13,0x0f,0x0e,0xee,0xd7,0xfe,0xff,0xea,
|
||||
0x14,0x0f,0x0e,0xee,0xd5,0xfe,0xff,0xea,0x10,0x0e,0x0b,0xee,0xd3,0xfe,0xff,0xea,
|
||||
0x10,0x0e,0x0c,0xee,0xd1,0xfe,0xff,0xea,0x10,0x0e,0x0d,0xee,0xcf,0xfe,0xff,0xea,
|
||||
0x10,0x0e,0x0a,0xee,0xcd,0xfe,0xff,0xea,0x01,0x1c,0xa0,0xe3,0x10,0x0e,0x1b,0xee,
|
||||
0x24,0x00,0x00,0xeb,0x01,0x10,0x51,0xe2,0xfb,0xff,0xff,0x1a,0x10,0x0e,0x1c,0xee,
|
||||
0x20,0x00,0x00,0xeb,0x10,0x0e,0x1d,0xee,0x1e,0x00,0x00,0xeb,0xc3,0xfe,0xff,0xea,
|
||||
0x01,0x1c,0xa0,0xe3,0x10,0x0e,0x1b,0xee,0x01,0x10,0x51,0xe2,0xfc,0xff,0xff,0x1a,
|
||||
0xbe,0xfe,0xff,0xea,0x1b,0x00,0x00,0xeb,0x00,0xf0,0x69,0xe1,0x19,0x00,0x00,0xeb,
|
||||
0x00,0x70,0xa0,0xe1,0x17,0x00,0x00,0xeb,0x00,0x60,0xa0,0xe1,0x15,0x00,0x00,0xeb,
|
||||
0x00,0x50,0xa0,0xe1,0x13,0x00,0x00,0xeb,0x00,0x40,0xa0,0xe1,0x11,0x00,0x00,0xeb,
|
||||
0x00,0x30,0xa0,0xe1,0x0f,0x00,0x00,0xeb,0x00,0x20,0xa0,0xe1,0x0d,0x00,0x00,0xeb,
|
||||
0x00,0x10,0xa0,0xe1,0x0b,0x00,0x00,0xeb,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,
|
||||
0x10,0xee,0x19,0xee,0x10,0xde,0x1a,0xee,0x01,0xd0,0x8d,0xe3,0x10,0xde,0x0a,0xee,
|
||||
0x00,0xf0,0x5e,0xe2,0xfe,0xff,0xff,0xea,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x6a,
|
||||
0x10,0x0e,0x08,0xee,0x0e,0xf0,0xa0,0xe1,0x10,0xfe,0x1e,0xee,0xfd,0xff,0xff,0x5a,
|
||||
0x10,0x0e,0x19,0xee,0x0e,0xf0,0xa0,0xe1,
|
||||
@@ -1,49 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
BIN2C = ../../../src/helper/bin2char.sh
|
||||
|
||||
ARM_CROSS_COMPILE ?= arm-none-eabi-
|
||||
ARM_AS ?= $(ARM_CROSS_COMPILE)as
|
||||
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
|
||||
|
||||
ARM_AFLAGS = -EL
|
||||
|
||||
STM8_CROSS_COMPILE ?= stm8-
|
||||
STM8_AS ?= $(STM8_CROSS_COMPILE)as
|
||||
STM8_OBJCOPY ?= $(STM8_CROSS_COMPILE)objcopy
|
||||
|
||||
STM8_AFLAGS =
|
||||
|
||||
arm: armv4_5_erase_check.inc armv7m_erase_check.inc
|
||||
|
||||
armv4_5_%.elf: armv4_5_%.s
|
||||
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
||||
|
||||
armv4_5_%.bin: armv4_5_%.elf
|
||||
$(ARM_OBJCOPY) -Obinary $< $@
|
||||
|
||||
armv4_5_%.inc: armv4_5_%.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
armv7m_%.elf: armv7m_%.s
|
||||
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
||||
|
||||
armv7m_%.bin: armv7m_%.elf
|
||||
$(ARM_OBJCOPY) -Obinary $< $@
|
||||
|
||||
armv7m_%.inc: armv7m_%.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
stm8: stm8_erase_check.inc
|
||||
|
||||
stm8_%.elf: stm8_%.s
|
||||
$(STM8_AS) $(STM8_AFLAGS) $< -o $@
|
||||
|
||||
stm8_%.bin: stm8_%.elf
|
||||
$(STM8_OBJCOPY) -Obinary $< $@
|
||||
|
||||
stm8_%.inc: stm8_%.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
clean:
|
||||
-rm -f *.elf *.bin *.inc
|
||||
@@ -1,3 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0x01,0x30,0xd0,0xe4,0x03,0x20,0x02,0xe0,0x01,0x10,0x51,0xe2,0xfb,0xff,0xff,0x1a,
|
||||
0x70,0x00,0x20,0xe1,
|
||||
@@ -1,26 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
parameters:
|
||||
r0 - address in
|
||||
r1 - byte count
|
||||
r2 - mask - result out
|
||||
*/
|
||||
|
||||
.text
|
||||
.arm
|
||||
|
||||
loop:
|
||||
ldrb r3, [r0], #1
|
||||
and r2, r2, r3
|
||||
subs r1, r1, #1
|
||||
bne loop
|
||||
end:
|
||||
bkpt #0
|
||||
|
||||
.end
|
||||
@@ -1,4 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0x02,0x68,0x12,0x42,0x0d,0xd0,0x43,0x68,0x1c,0x68,0x04,0x33,0x8c,0x42,0x05,0xd1,
|
||||
0x01,0x3a,0xf9,0xd1,0x01,0x24,0x04,0x60,0x08,0x30,0xf1,0xe7,0x00,0x24,0xfa,0xe7,
|
||||
0x00,0x00,0x00,0xbe,
|
||||
@@ -1,60 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
parameters:
|
||||
r0 - pointer to struct { uint32_t size_in_result_out, uint32_t addr }
|
||||
r1 - value to check
|
||||
*/
|
||||
|
||||
.text
|
||||
.syntax unified
|
||||
.cpu cortex-m0
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.align 2
|
||||
|
||||
BLOCK_SIZE_RESULT = 0
|
||||
BLOCK_ADDRESS = 4
|
||||
SIZEOF_STRUCT_BLOCK = 8
|
||||
|
||||
start:
|
||||
block_loop:
|
||||
ldr r2, [r0, #BLOCK_SIZE_RESULT] /* get size */
|
||||
tst r2, r2
|
||||
beq done
|
||||
|
||||
ldr r3, [r0, #BLOCK_ADDRESS] /* get address */
|
||||
|
||||
word_loop:
|
||||
ldr r4, [r3] /* read word */
|
||||
adds r3, #4
|
||||
|
||||
cmp r4, r1
|
||||
bne not_erased
|
||||
|
||||
subs r2, #1
|
||||
bne word_loop
|
||||
|
||||
movs r4, #1 /* block is erased */
|
||||
save_result:
|
||||
str r4, [r0, #BLOCK_SIZE_RESULT]
|
||||
adds r0, #SIZEOF_STRUCT_BLOCK
|
||||
b block_loop
|
||||
|
||||
not_erased:
|
||||
movs r4, #0
|
||||
b save_result
|
||||
|
||||
/* Avoid padding at .text segment end. Otherwise exit point check fails. */
|
||||
.skip ( . - start + 2) & 2, 0
|
||||
|
||||
done:
|
||||
bkpt #0
|
||||
|
||||
.end
|
||||
@@ -1,5 +0,0 @@
|
||||
/* Autogenerated with ../../../src/helper/bin2char.sh */
|
||||
0x00,0x80,0x00,0x00,0x80,0x00,0x96,0xcf,0x00,0x22,0x1e,0x01,0x16,0x04,0xa6,0xff,
|
||||
0x90,0x5d,0x26,0x04,0x0d,0x03,0x27,0x17,0x90,0x5d,0x26,0x02,0x0a,0x03,0x90,0x5a,
|
||||
0x92,0xbc,0x00,0x00,0xa1,0xff,0x26,0x07,0x5c,0x26,0xe5,0x0c,0x00,0x20,0xe1,0x1f,
|
||||
0x01,0x17,0x04,0x8b,
|
||||
@@ -1,58 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Ake Rehnman
|
||||
* ake.rehnman(at)gmail.com
|
||||
*/
|
||||
;;
|
||||
;; erase check memory code
|
||||
;;
|
||||
.org 0x0
|
||||
;; start address
|
||||
start_addr: .byte 0x00
|
||||
.word 0x8000
|
||||
;; byte count
|
||||
byte_cnt: .byte 0x00
|
||||
.word 0x8000
|
||||
;
|
||||
; SP must point to start_addr on entry
|
||||
; first relocate start_addr to the location
|
||||
; we are running at
|
||||
start:
|
||||
ldw X,SP
|
||||
ldw .cont+2,X
|
||||
ldw X,(start_addr+1,SP) ;start addr
|
||||
ldw Y,(byte_cnt+1,SP) ;count
|
||||
ld A,#0xff
|
||||
;
|
||||
; if count == 0 return
|
||||
.L1:
|
||||
tnzw Y
|
||||
jrne .decrcnt ;continue if low word != 0
|
||||
tnz (byte_cnt,SP) ;high byte
|
||||
jreq .exit ;goto exit
|
||||
;
|
||||
; decrement count (byte_cnt)
|
||||
.decrcnt:
|
||||
tnzw Y ;low word count
|
||||
jrne .decr1
|
||||
dec (byte_cnt,SP) ;high byte
|
||||
.decr1:
|
||||
decw Y; decr low word
|
||||
;
|
||||
; first check if [start_addr] is 0xff
|
||||
.cont:
|
||||
ldf A, [start_addr.e]
|
||||
cp A,#0xff
|
||||
jrne .exit ;exit if not 0xff
|
||||
;
|
||||
; increment start_addr (addr)
|
||||
incw X
|
||||
jrne .L1
|
||||
inc (start_addr,SP) ;increment high byte
|
||||
jra .L1
|
||||
;
|
||||
.exit:
|
||||
ldw (start_addr+1,SP),X ;start addr
|
||||
ldw (byte_cnt+1,SP),Y ;count
|
||||
break
|
||||
@@ -1,44 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* algorithm register usage:
|
||||
* r0: source address (in RAM)
|
||||
* r1: target address (in Flash)
|
||||
* r2: count
|
||||
* r3: flash write command
|
||||
* r4: status byte (returned to host)
|
||||
* r5: busy test pattern
|
||||
* r6: error test pattern
|
||||
*/
|
||||
|
||||
loop:
|
||||
ldrh r4, [r0], #2
|
||||
strh r3, [r1]
|
||||
strh r4, [r1]
|
||||
busy:
|
||||
ldrh r4, [r1]
|
||||
and r7, r4, r5
|
||||
cmp r7, r5
|
||||
bne busy
|
||||
tst r4, r6
|
||||
bne done
|
||||
subs r2, r2, #1
|
||||
beq done
|
||||
add r1, r1, #2
|
||||
b loop
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,44 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* algorithm register usage:
|
||||
* r0: source address (in RAM)
|
||||
* r1: target address (in Flash)
|
||||
* r2: count
|
||||
* r3: flash write command
|
||||
* r4: status byte (returned to host)
|
||||
* r5: busy test pattern
|
||||
* r6: error test pattern
|
||||
*/
|
||||
|
||||
loop:
|
||||
ldr r4, [r0], #4
|
||||
str r3, [r1]
|
||||
str r4, [r1]
|
||||
busy:
|
||||
ldr r4, [r1]
|
||||
and r7, r4, r5
|
||||
cmp r7, r5
|
||||
bne busy
|
||||
tst r4, r6
|
||||
bne done
|
||||
subs r2, r2, #1
|
||||
beq done
|
||||
add r1, r1, #4
|
||||
b loop
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,44 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* algorithm register usage:
|
||||
* r0: source address (in RAM)
|
||||
* r1: target address (in Flash)
|
||||
* r2: count
|
||||
* r3: flash write command
|
||||
* r4: status byte (returned to host)
|
||||
* r5: busy test pattern
|
||||
* r6: error test pattern
|
||||
*/
|
||||
|
||||
loop:
|
||||
ldrb r4, [r0], #1
|
||||
strb r3, [r1]
|
||||
strb r4, [r1]
|
||||
busy:
|
||||
ldrb r4, [r1]
|
||||
and r7, r4, r5
|
||||
cmp r7, r5
|
||||
bne busy
|
||||
tst r4, r6
|
||||
bne done
|
||||
subs r2, r2, #1
|
||||
beq done
|
||||
add r1, r1, #1
|
||||
b loop
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,62 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* input parameters - */
|
||||
/* R0 = source address */
|
||||
/* R1 = destination address */
|
||||
/* R2 = number of writes */
|
||||
/* R3 = flash write command */
|
||||
/* R4 = constant to mask DQ7 bits (also used for Dq5 with shift) */
|
||||
/* output parameters - */
|
||||
/* R5 = 0x80 ok 0x00 bad */
|
||||
/* temp registers - */
|
||||
/* R6 = value read from flash to test status */
|
||||
/* R7 = holding register */
|
||||
/* unlock registers - */
|
||||
/* R8 = unlock1_addr */
|
||||
/* R9 = unlock1_cmd */
|
||||
/* R10 = unlock2_addr */
|
||||
/* R11 = unlock2_cmd */
|
||||
|
||||
code:
|
||||
ldrh r5, [r0], #2
|
||||
strh r9, [r8]
|
||||
strh r11, [r10]
|
||||
strh r3, [r8]
|
||||
strh r5, [r1]
|
||||
nop
|
||||
busy:
|
||||
ldrh r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
ands r6, r6, r4, lsr #2
|
||||
beq busy /* b if DQ5 low */
|
||||
ldrh r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
mov r5, #0 /* 0x0 - return 0x00, error */
|
||||
bne done
|
||||
cont:
|
||||
subs r2, r2, #1 /* 0x1 */
|
||||
moveq r5, #128 /* 0x80 */
|
||||
beq done
|
||||
add r1, r1, #2 /* 0x2 */
|
||||
b code
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,53 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* input parameters - */
|
||||
/* R0 = source address */
|
||||
/* R1 = destination address */
|
||||
/* R2 = number of writes */
|
||||
/* R3 = flash write command */
|
||||
/* R4 = constant to mask DQ7 bits (also used for Dq5 with shift) */
|
||||
/* output parameters - */
|
||||
/* R5 = 0x80 ok 0x00 bad */
|
||||
/* temp registers - */
|
||||
/* R6 = value read from flash to test status */
|
||||
/* R7 = holding register */
|
||||
/* unlock registers - */
|
||||
/* R8 = unlock1_addr */
|
||||
/* R9 = unlock1_cmd */
|
||||
/* R10 = unlock2_addr */
|
||||
/* R11 = unlock2_cmd */
|
||||
|
||||
code:
|
||||
ldrh r5, [r0], #2
|
||||
strh r9, [r8]
|
||||
strh r11, [r10]
|
||||
strh r3, [r8]
|
||||
strh r5, [r1]
|
||||
nop
|
||||
busy:
|
||||
ldrh r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, #0x80
|
||||
bne busy
|
||||
subs r2, r2, #1 /* 0x1 */
|
||||
moveq r5, #128 /* 0x80 */
|
||||
beq done
|
||||
add r1, r1, #2 /* 0x2 */
|
||||
b code
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,62 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* input parameters - */
|
||||
/* R0 = source address */
|
||||
/* R1 = destination address */
|
||||
/* R2 = number of writes */
|
||||
/* R3 = flash write command */
|
||||
/* R4 = constant to mask DQ7 bits (also used for Dq5 with shift) */
|
||||
/* output parameters - */
|
||||
/* R5 = 0x80 ok 0x00 bad */
|
||||
/* temp registers - */
|
||||
/* R6 = value read from flash to test status */
|
||||
/* R7 = holding register */
|
||||
/* unlock registers - */
|
||||
/* R8 = unlock1_addr */
|
||||
/* R9 = unlock1_cmd */
|
||||
/* R10 = unlock2_addr */
|
||||
/* R11 = unlock2_cmd */
|
||||
|
||||
code:
|
||||
ldr r5, [r0], #4
|
||||
str r9, [r8]
|
||||
str r11, [r10]
|
||||
str r3, [r8]
|
||||
str r5, [r1]
|
||||
nop
|
||||
busy:
|
||||
ldr r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
ands r6, r6, r4, lsr #2
|
||||
beq busy /* b if DQ5 low */
|
||||
ldr r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
mov r5, #0 /* 0x0 - return 0x00, error */
|
||||
bne done
|
||||
cont:
|
||||
subs r2, r2, #1 /* 0x1 */
|
||||
moveq r5, #128 /* 0x80 */
|
||||
beq done
|
||||
add r1, r1, #4 /* 0x4 */
|
||||
b code
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,62 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.arm
|
||||
.arch armv4
|
||||
|
||||
.section .init
|
||||
|
||||
/* input parameters - */
|
||||
/* R0 = source address */
|
||||
/* R1 = destination address */
|
||||
/* R2 = number of writes */
|
||||
/* R3 = flash write command */
|
||||
/* R4 = constant to mask DQ7 bits (also used for Dq5 with shift) */
|
||||
/* output parameters - */
|
||||
/* R5 = 0x80 ok 0x00 bad */
|
||||
/* temp registers - */
|
||||
/* R6 = value read from flash to test status */
|
||||
/* R7 = holding register */
|
||||
/* unlock registers - */
|
||||
/* R8 = unlock1_addr */
|
||||
/* R9 = unlock1_cmd */
|
||||
/* R10 = unlock2_addr */
|
||||
/* R11 = unlock2_cmd */
|
||||
|
||||
code:
|
||||
ldrb r5, [r0], #1
|
||||
strb r9, [r8]
|
||||
strb r11, [r10]
|
||||
strb r3, [r8]
|
||||
strb r5, [r1]
|
||||
nop
|
||||
busy:
|
||||
ldrb r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
ands r6, r6, r4, lsr #2
|
||||
beq busy /* b if DQ5 low */
|
||||
ldrb r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
mov r5, #0 /* 0x0 - return 0x00, error */
|
||||
bne done
|
||||
cont:
|
||||
subs r2, r2, #1 /* 0x1 */
|
||||
moveq r5, #128 /* 0x80 */
|
||||
beq done
|
||||
add r1, r1, #1 /* 0x1 */
|
||||
b code
|
||||
done:
|
||||
b done
|
||||
|
||||
.end
|
||||
@@ -1,68 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.syntax unified
|
||||
.arch armv7-m
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.align 2
|
||||
|
||||
/* input parameters - */
|
||||
/* R0 = source address */
|
||||
/* R1 = destination address */
|
||||
/* R2 = number of writes */
|
||||
/* R3 = flash write command */
|
||||
/* R4 = constant to mask DQ7 bits (also used for Dq5 with shift) */
|
||||
/* output parameters - */
|
||||
/* R5 = 0x80 ok 0x00 bad */
|
||||
/* temp registers - */
|
||||
/* R6 = value read from flash to test status */
|
||||
/* R7 = holding register */
|
||||
/* unlock registers - */
|
||||
/* R8 = unlock1_addr */
|
||||
/* R9 = unlock1_cmd */
|
||||
/* R10 = unlock2_addr */
|
||||
/* R11 = unlock2_cmd */
|
||||
|
||||
code:
|
||||
ldrh r5, [r0], #2
|
||||
strh r9, [r8]
|
||||
strh r11, [r10]
|
||||
strh r3, [r8]
|
||||
strh r5, [r1]
|
||||
nop
|
||||
busy:
|
||||
ldrh r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
ands r6, r6, r4, lsr #2
|
||||
beq busy /* b if DQ5 low */
|
||||
ldrh r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
beq cont /* b if DQ7 == Data7 */
|
||||
mov r5, #0 /* 0x0 - return 0x00, error */
|
||||
bne done
|
||||
cont:
|
||||
subs r2, r2, #1 /* 0x1 */
|
||||
beq success
|
||||
add r1, r1, #2 /* 0x2 */
|
||||
b code
|
||||
|
||||
success:
|
||||
mov r5, #128 /* 0x80 */
|
||||
b done
|
||||
|
||||
done:
|
||||
bkpt #0
|
||||
|
||||
.end
|
||||
@@ -1,59 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005, 2007 by Dominic Rath *
|
||||
* Dominic.Rath@gmx.de *
|
||||
* Copyright (C) 2010 Spencer Oliver *
|
||||
* spen@spen-soft.co.uk *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.syntax unified
|
||||
.arch armv7-m
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.align 2
|
||||
|
||||
/* input parameters - */
|
||||
/* R0 = source address */
|
||||
/* R1 = destination address */
|
||||
/* R2 = number of writes */
|
||||
/* R3 = flash write command */
|
||||
/* R4 = constant to mask DQ7 bits */
|
||||
/* output parameters - */
|
||||
/* R5 = 0x80 ok 0x00 bad */
|
||||
/* temp registers - */
|
||||
/* R6 = value read from flash to test status */
|
||||
/* R7 = holding register */
|
||||
/* unlock registers - */
|
||||
/* R8 = unlock1_addr */
|
||||
/* R9 = unlock1_cmd */
|
||||
/* R10 = unlock2_addr */
|
||||
/* R11 = unlock2_cmd */
|
||||
|
||||
code:
|
||||
ldrh r5, [r0], #2
|
||||
strh r9, [r8]
|
||||
strh r11, [r10]
|
||||
strh r3, [r8]
|
||||
strh r5, [r1]
|
||||
nop
|
||||
busy:
|
||||
ldrh r6, [r1]
|
||||
eor r7, r5, r6
|
||||
ands r7, r4, r7
|
||||
bne busy
|
||||
subs r2, r2, #1 /* 0x1 */
|
||||
beq success
|
||||
add r1, r1, #2 /* 0x2 */
|
||||
b code
|
||||
|
||||
success:
|
||||
mov r5, #128 /* 0x80 */
|
||||
b done
|
||||
|
||||
done:
|
||||
bkpt #0
|
||||
|
||||
.end
|
||||
@@ -1,46 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Henrik Nilsson *
|
||||
* henrik.nilsson@bytequest.se *
|
||||
***************************************************************************/
|
||||
|
||||
.text
|
||||
.syntax unified
|
||||
.arch armv7-m
|
||||
.thumb
|
||||
.thumb_func
|
||||
|
||||
.align 4
|
||||
|
||||
/* Inputs:
|
||||
* r0 buffer address
|
||||
* r1 NAND data address (byte wide)
|
||||
* r2 buffer length
|
||||
*/
|
||||
read:
|
||||
ldrb r3, [r1]
|
||||
strb r3, [r0], #1
|
||||
subs r2, r2, #1
|
||||
bne read
|
||||
|
||||
done_read:
|
||||
bkpt #0
|
||||
|
||||
.align 4
|
||||
|
||||
/* Inputs:
|
||||
* r0 NAND data address (byte wide)
|
||||
* r1 buffer address
|
||||
* r2 buffer length
|
||||
*/
|
||||
write:
|
||||
ldrb r3, [r1], #1
|
||||
strb r3, [r0]
|
||||
subs r2, r2, #1
|
||||
bne write
|
||||
|
||||
done_write:
|
||||
bkpt #0
|
||||
|
||||
.end
|
||||
@@ -1,38 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Pavel Chromy *
|
||||
* chromy@asix.cz *
|
||||
***************************************************************************/
|
||||
#include "dcc.h"
|
||||
|
||||
|
||||
/* debug channel read (debugger->MCU) */
|
||||
uint32 dcc_rd(void)
|
||||
{
|
||||
volatile uint32 dcc_reg;
|
||||
|
||||
do {
|
||||
asm volatile ("mrc p14, 0, %0, C0, C0" : "=r" (dcc_reg) :);
|
||||
} while ((dcc_reg&1) == 0);
|
||||
|
||||
asm volatile ("mrc p14, 0, %0, C1, C0" : "=r" (dcc_reg) :);
|
||||
return dcc_reg;
|
||||
}
|
||||
|
||||
|
||||
/* debug channel write (MCU->debugger) */
|
||||
int dcc_wr(uint32 data)
|
||||
{
|
||||
volatile uint32 dcc_reg;
|
||||
|
||||
do {
|
||||
asm volatile ("mrc p14, 0, %0, C0, C0" : "=r" (dcc_reg) :);
|
||||
/* operation controlled by master, cancel operation
|
||||
upon reception of data for immediate response */
|
||||
if (dcc_reg&1) return -1;
|
||||
} while (dcc_reg&2);
|
||||
|
||||
asm volatile ("mcr p14, 0, %0, C1, C0" : : "r" (data));
|
||||
return 0;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Pavel Chromy *
|
||||
* chromy@asix.cz *
|
||||
***************************************************************************/
|
||||
#ifndef dccH
|
||||
#define dccH
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
/* debug channel read (debugger->MCU) */
|
||||
uint32 dcc_rd(void);
|
||||
|
||||
/* debug channel write (MCU->debugger) */
|
||||
int dcc_wr(uint32 data);
|
||||
|
||||
#endif
|
||||
@@ -1,27 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Pavel Chromy *
|
||||
* chromy@asix.cz *
|
||||
***************************************************************************/
|
||||
#ifndef OCL_H
|
||||
#define OCL_H
|
||||
|
||||
/* command/response mask */
|
||||
#define OCL_CMD_MASK 0xFFFF0000L
|
||||
|
||||
/* commands */
|
||||
#define OCL_FLASH_BLOCK 0x0CFB0000L
|
||||
#define OCL_ERASE_BLOCK 0x0CEB0000L
|
||||
#define OCL_ERASE_ALL 0x0CEA0000L
|
||||
#define OCL_PROBE 0x0CBE0000L
|
||||
|
||||
/* responses */
|
||||
#define OCL_CMD_DONE 0x0ACD0000L
|
||||
#define OCL_CMD_ERR 0x0ACE0000L
|
||||
#define OCL_CHKS_FAIL 0x0ACF0000L
|
||||
#define OCL_BUFF_OVER 0x0AB00000L
|
||||
|
||||
#define OCL_CHKS_INIT 0xC100CD0CL
|
||||
|
||||
#endif /* OCL_H */
|
||||
@@ -1,33 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Pavel Chromy *
|
||||
* chromy@asix.cz *
|
||||
***************************************************************************/
|
||||
#ifndef platformH
|
||||
#define platformH
|
||||
|
||||
#include "samregs.h"
|
||||
|
||||
|
||||
#define outb(_reg, _val) (*((volatile unsigned char *)(_reg)) = (_val))
|
||||
#define outw(_reg, _val) (*((volatile unsigned short *)(_reg)) = (_val))
|
||||
#define outr(_reg, _val) (*((volatile unsigned int *)(_reg)) = (_val))
|
||||
|
||||
#define inb(_reg) (*((volatile unsigned char *)(_reg)))
|
||||
#define inw(_reg) (*((volatile unsigned short *)(_reg)))
|
||||
#define inr(_reg) (*((volatile unsigned int *)(_reg)))
|
||||
|
||||
#define _BV(bit) (1 << (bit))
|
||||
|
||||
|
||||
typedef signed char int8;
|
||||
typedef unsigned char uint8;
|
||||
|
||||
typedef signed short int16;
|
||||
typedef unsigned short uint16;
|
||||
|
||||
typedef signed int int32;
|
||||
typedef unsigned int uint32;
|
||||
|
||||
#endif
|
||||
@@ -1,35 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Pavel Chromy *
|
||||
* chromy@asix.cz *
|
||||
***************************************************************************/
|
||||
#ifndef samflashH
|
||||
#define samflashH
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#define FLASH_AREA_ADDR 0x100000
|
||||
|
||||
#define FLASH_STAT_OK 0
|
||||
#define FLASH_STAT_PROGE 1
|
||||
#define FLASH_STAT_LOCKE 2
|
||||
#define FLASH_STAT_VERIFE 3
|
||||
#define FLASH_STAT_INITE 4
|
||||
|
||||
extern unsigned int flash_page_count;
|
||||
extern unsigned int flash_page_size; /* words */
|
||||
|
||||
/* detect chip and set loader parameters */
|
||||
int flash_init(void);
|
||||
|
||||
/* program single flash page */
|
||||
int flash_page_program(uint32 *data, int page_num);
|
||||
|
||||
/* erase whole chip */
|
||||
int flash_erase_all(void);
|
||||
|
||||
/* verify written data */
|
||||
int flash_verify(uint32 adr, unsigned int len, uint8 *src);
|
||||
|
||||
#endif
|
||||
@@ -1,29 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
BIN2C = ../../../../src/helper/bin2char.sh
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
|
||||
CC=$(CROSS_COMPILE)gcc
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
|
||||
CFLAGS = -c -mthumb -mcpu=cortex-m0 -O3 -g
|
||||
|
||||
all: bluenrg-x_write.inc
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
.INTERMEDIATE: bluenrg-x_write.o
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -Wall -Wextra -Wa,-adhln=$*.lst $< -o $@
|
||||
|
||||
%.bin: %.o
|
||||
$(OBJCOPY) -Obinary $< $@
|
||||
|
||||
%.inc: %.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
clean:
|
||||
-rm -f *.o *.lst *.bin *.inc
|
||||
@@ -1,115 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/* To be built with arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -O3 bluenrgx.c */
|
||||
/* Then postprocess output of command "arm-none-eabi-objdump -d bluenrgx.o" to make a C array of bytes */
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../../../../src/flash/nor/bluenrg-x.h"
|
||||
|
||||
/* Status Values ----------------------------------------------------------*/
|
||||
#define SUCCESS 0
|
||||
#define ERR_UNALIGNED 1
|
||||
#define ERR_INVALID_ADDRESS 2
|
||||
#define ERR_INVALID_TYPE 3
|
||||
#define ERR_WRITE_PROTECTED 4
|
||||
#define ERR_WRITE_FAILED 5
|
||||
#define ERR_ERASE_REQUIRED 6
|
||||
#define ERR_VERIFY_FAILED 7
|
||||
|
||||
#define MFB_MASS_ERASE 0x01
|
||||
#define MFB_PAGE_ERASE 0x02
|
||||
|
||||
#define DO_ERASE 0x0100
|
||||
#define DO_VERIFY 0x0200
|
||||
|
||||
#define MFB_BOTTOM (0x10040000)
|
||||
#define MFB_SIZE_B(regs_base) ((16 * (((*(volatile uint32_t *)(regs_base + FLASH_SIZE_REG)) + 1) >> 12)) * 1024)
|
||||
#define MFB_SIZE_W (MFB_SIZE_B/4)
|
||||
#define MFB_TOP (MFB_BOTTOM+MFB_SIZE_B-1)
|
||||
#define MFB_PAGE_SIZE_B (2048)
|
||||
#define MFB_PAGE_SIZE_W (MFB_PAGE_SIZE_B/4)
|
||||
|
||||
#define AREA_ERROR 0x01
|
||||
#define AREA_MFB 0x04
|
||||
|
||||
typedef struct {
|
||||
volatile uint8_t *wp;
|
||||
uint8_t *rp;
|
||||
} work_area_t;
|
||||
|
||||
/* Flash Commands --------------------------------------------------------*/
|
||||
static inline __attribute__((always_inline)) uint32_t flashWrite(uint32_t address, uint8_t **data,
|
||||
uint32_t writeLength, uint32_t flash_regs_base)
|
||||
{
|
||||
uint32_t index, flash_word[4];
|
||||
uint8_t i;
|
||||
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_IRQMASK)) = 0;
|
||||
for (index = 0; index < writeLength; index += (FLASH_WORD_LEN*4)) {
|
||||
for (i = 0; i < 4; i++)
|
||||
flash_word[i] = (*(uint32_t *) (*data + i*4));
|
||||
|
||||
/* Clear the IRQ flags */
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_IRQRAW)) = 0x0000003F;
|
||||
/* Load the flash address to write */
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_ADDRESS)) = (uint16_t)((address + index - MFB_BOTTOM) >> 2);
|
||||
/* Prepare and load the data to flash */
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_DATA0)) = flash_word[0];
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_DATA1)) = flash_word[1];
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_DATA2)) = flash_word[2];
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_DATA3)) = flash_word[3];
|
||||
/* Flash write command */
|
||||
*((volatile uint32_t *)(flash_regs_base + FLASH_REG_COMMAND)) = FLASH_CMD_BURSTWRITE;
|
||||
/* Wait the end of the flash write command */
|
||||
while ((*((volatile uint32_t *)(flash_regs_base + FLASH_REG_IRQRAW)) & FLASH_INT_CMDDONE) == 0)
|
||||
;
|
||||
*data += (FLASH_WORD_LEN * 4);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
__attribute__((naked)) __attribute__((noreturn)) void write(uint8_t *work_area_p,
|
||||
uint8_t *fifo_end,
|
||||
uint8_t *target_address,
|
||||
uint32_t count,
|
||||
uint32_t flash_regs_base)
|
||||
{
|
||||
uint32_t retval;
|
||||
volatile work_area_t *work_area = (work_area_t *) work_area_p;
|
||||
uint8_t *fifo_start = (uint8_t *) work_area->rp;
|
||||
|
||||
while (count) {
|
||||
volatile int32_t fifo_linear_size;
|
||||
|
||||
/* Wait for some data in the FIFO */
|
||||
while (work_area->rp == work_area->wp)
|
||||
;
|
||||
if (work_area->wp == 0) {
|
||||
/* Aborted by other party */
|
||||
break;
|
||||
}
|
||||
if (work_area->rp > work_area->wp) {
|
||||
fifo_linear_size = fifo_end-work_area->rp;
|
||||
} else {
|
||||
fifo_linear_size = (work_area->wp - work_area->rp);
|
||||
if (fifo_linear_size < 0)
|
||||
fifo_linear_size = 0;
|
||||
}
|
||||
if (fifo_linear_size < 16) {
|
||||
/* We should never get here */
|
||||
continue;
|
||||
}
|
||||
|
||||
retval = flashWrite((uint32_t) target_address, (uint8_t **) &work_area->rp, fifo_linear_size, flash_regs_base);
|
||||
if (retval != SUCCESS) {
|
||||
work_area->rp = (uint8_t *)retval;
|
||||
break;
|
||||
}
|
||||
target_address += fifo_linear_size;
|
||||
if (work_area->rp >= fifo_end)
|
||||
work_area->rp = fifo_start;
|
||||
count -= fifo_linear_size;
|
||||
}
|
||||
__asm("bkpt 0");
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/* Autogenerated with ../../../../src/helper/bin2char.sh */
|
||||
0x05,0x93,0x43,0x68,0x14,0x9e,0x09,0x93,0x05,0x9b,0x05,0x00,0x07,0x91,0x06,0x92,
|
||||
0x01,0x24,0xb1,0x46,0x00,0x2b,0x68,0xd0,0x6a,0x68,0x2b,0x68,0x9a,0x42,0xfb,0xd0,
|
||||
0x2b,0x68,0x00,0x2b,0x61,0xd0,0x6a,0x68,0x2b,0x68,0x9a,0x42,0x5e,0xd9,0x6b,0x68,
|
||||
0x07,0x9a,0xd3,0x1a,0x0f,0x2b,0xef,0xdd,0x4a,0x46,0x00,0x21,0x03,0x93,0xd1,0x60,
|
||||
0x00,0x2b,0x42,0xd0,0x40,0x22,0x4a,0x44,0x90,0x46,0x44,0x22,0x4a,0x44,0x00,0x92,
|
||||
0x48,0x22,0x4a,0x44,0x93,0x46,0x4c,0x22,0x27,0x4f,0x4a,0x44,0xbc,0x46,0x4e,0x46,
|
||||
0x92,0x46,0x06,0x99,0x4b,0x46,0x61,0x44,0x08,0x00,0x00,0x99,0x18,0x36,0x6a,0x68,
|
||||
0x08,0x95,0x8c,0x46,0x55,0x46,0xda,0x46,0xb3,0x46,0x10,0x33,0x04,0x92,0x11,0x68,
|
||||
0x5e,0x46,0x00,0x91,0x51,0x68,0x97,0x68,0x01,0x91,0xd1,0x68,0x02,0x91,0x3f,0x21,
|
||||
0x19,0x60,0x81,0x03,0x09,0x0c,0x31,0x60,0x46,0x46,0x00,0x99,0x31,0x60,0x66,0x46,
|
||||
0x01,0x99,0x31,0x60,0x56,0x46,0x02,0x99,0x37,0x60,0x29,0x60,0xcc,0x26,0x49,0x46,
|
||||
0x0e,0x60,0x19,0x68,0x0c,0x42,0xfc,0xd0,0x04,0x99,0x03,0x9e,0x10,0x32,0x10,0x30,
|
||||
0x51,0x1a,0x8e,0x42,0xdb,0xd8,0x08,0x9d,0x6a,0x60,0x03,0x9a,0x06,0x9b,0x94,0x46,
|
||||
0x63,0x44,0x06,0x93,0x07,0x9a,0x6b,0x68,0x9a,0x42,0x01,0xd8,0x09,0x9b,0x6b,0x60,
|
||||
0x05,0x9b,0x03,0x9a,0x9b,0x1a,0x05,0x93,0x96,0xd1,0x00,0xbe,0x2b,0x68,0x6a,0x68,
|
||||
0x9b,0x1a,0x9f,0xd5,0x90,0xe7,0xc0,0x46,0x00,0x00,0xfc,0xef,
|
||||
@@ -1,87 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
# Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
BIN2C = ../../../../src/helper/bin2char.sh
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
GCC = $(CROSS_COMPILE)gcc
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
|
||||
FLAGS = -mthumb -Os -ffunction-sections -fdata-sections -g -gdwarf-3
|
||||
FLAGS += -gstrict-dwarf -Wall -fno-strict-aliasing --asm
|
||||
|
||||
CFLAGS = -c -I.
|
||||
|
||||
CC26X0_CFLAGS = -mcpu=cortex-m3 -DDEVICE_CC26X0
|
||||
|
||||
CC26X2_CFLAGS = -mcpu=cortex-m4 -DDEVICE_CC26X2
|
||||
|
||||
CC26X0_OBJS := \
|
||||
cc26x0/flashloader.o \
|
||||
cc26x0/main.o \
|
||||
cc26x0/startup.o \
|
||||
cc26x0/flash.o
|
||||
|
||||
CC26X2_OBJS := \
|
||||
cc26x2/flashloader.o \
|
||||
cc26x2/main.o \
|
||||
cc26x2/startup.o \
|
||||
cc26x2/flash.o
|
||||
|
||||
all: cc26x0_algo.inc cc26x2_algo.inc
|
||||
|
||||
cc26x0/%.o: %.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GNU Compiler'
|
||||
$(GCC) $(FLAGS) $(CFLAGS) $(CC26X0_CFLAGS) -o"$@" "$(shell echo $<)"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
cc26x2/%.o: %.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GNU Compiler'
|
||||
$(GCC) $(FLAGS) $(CFLAGS) $(CC26X2_CFLAGS) -o"$@" "$(shell echo $<)"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
cc26x0_algo.out: $(CC26X0_OBJS)
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking: GNU Linker'
|
||||
$(GCC) $(FLAGS) -o$@ $(CC26X0_OBJS) -Wl,-T"cc26x0/cc26x0r2f.lds"
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
cc26x2_algo.out: $(CC26X2_OBJS)
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking: GNU Linker'
|
||||
$(GCC) $(FLAGS) -o$@ $(CC26X2_OBJS) -Wl,-T"cc26x2/cc26x2r1f.lds"
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
%.bin: %.out
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking: GNU Objcopy Utility'
|
||||
$(OBJCOPY) -Obinary $< $@
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
%.inc: %.bin
|
||||
@echo 'Building target: $@'
|
||||
@echo 'Invoking Bin2Char Script'
|
||||
$(BIN2C) < $< > $@
|
||||
rm $< $*.out
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
clean:
|
||||
@echo 'Cleaning Targets and Build Artifacts'
|
||||
rm -rf *.inc *.bin *.out *.map
|
||||
rm -rf cc26x0/*.o cc26x0/*.d
|
||||
rm -rf cc26x2/*.o cc26x2/*.d
|
||||
@echo 'Finished clean'
|
||||
@echo ' '
|
||||
|
||||
.PRECIOUS: %.bin
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,64 +0,0 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY( entry )
|
||||
|
||||
/* System memory map */
|
||||
MEMORY
|
||||
{
|
||||
/* Application is stored in and executes from SRAM */
|
||||
PROGRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 0x1BD8
|
||||
BUFFERS (RWX) : ORIGIN = 0x20001BD8, LENGTH = 0x3028
|
||||
}
|
||||
|
||||
/* Section allocation in memory */
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(.entry*)
|
||||
*(.text*)
|
||||
_etext = .;
|
||||
} > PROGRAM
|
||||
|
||||
.data :
|
||||
{ _data = .;
|
||||
*(.rodata*)
|
||||
*(.data*)
|
||||
_edata = .;
|
||||
}
|
||||
|
||||
.bss :
|
||||
{
|
||||
__bss_start__ = .;
|
||||
_bss = .;
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
_ebss = .;
|
||||
__bss_end__ = .;
|
||||
} > PROGRAM
|
||||
|
||||
.stack :
|
||||
{
|
||||
_stack = .;
|
||||
*(.stack*)
|
||||
_estack = .;
|
||||
} > PROGRAM
|
||||
|
||||
.buffers :
|
||||
{
|
||||
_buffers = .;
|
||||
*(.buffers.g_cfg)
|
||||
*(.buffers.g_buf1)
|
||||
*(.buffers.g_buf2)
|
||||
*(.buffers*)
|
||||
_ebuffers = .;
|
||||
} > BUFFERS
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,64 +0,0 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY( entry )
|
||||
|
||||
/* System memory map */
|
||||
MEMORY
|
||||
{
|
||||
/* Application is stored in and executes from SRAM */
|
||||
PROGRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 0x1FD8
|
||||
BUFFERS (RWX) : ORIGIN = 0x20001FD8, LENGTH = 0x6028
|
||||
}
|
||||
|
||||
/* Section allocation in memory */
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
_text = .;
|
||||
*(.entry*)
|
||||
*(.text*)
|
||||
_etext = .;
|
||||
} > PROGRAM
|
||||
|
||||
.data :
|
||||
{ _data = .;
|
||||
*(.rodata*)
|
||||
*(.data*)
|
||||
_edata = .;
|
||||
}
|
||||
|
||||
.bss :
|
||||
{
|
||||
__bss_start__ = .;
|
||||
_bss = .;
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
_ebss = .;
|
||||
__bss_end__ = .;
|
||||
} > PROGRAM
|
||||
|
||||
.stack :
|
||||
{
|
||||
_stack = .;
|
||||
*(.stack*)
|
||||
_estack = .;
|
||||
} > PROGRAM
|
||||
|
||||
.buffers :
|
||||
{
|
||||
_buffers = .;
|
||||
*(.buffers.g_cfg)
|
||||
*(.buffers.g_buf1)
|
||||
*(.buffers.g_buf2)
|
||||
*(.buffers*)
|
||||
_ebuffers = .;
|
||||
} > BUFFERS
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,951 +0,0 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "flash.h"
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Defines for accesses to the security control in the customer configuration
|
||||
* area in flash top sector.
|
||||
*
|
||||
******************************************************************************/
|
||||
#define CCFG_OFFSET_SECURITY CCFG_O_BL_CONFIG
|
||||
#define CCFG_SIZE_SECURITY 0x00000014
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Default values for security control in customer configuration area in flash
|
||||
* top sector.
|
||||
*
|
||||
******************************************************************************/
|
||||
const uint8_t g_ccfg_default_sec[] = {
|
||||
0xFF, 0xFF, 0xFF, 0xC5,
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xC5, 0xFF, 0xFF, 0xFF,
|
||||
0xC5, 0xC5, 0xC5, 0xFF,
|
||||
0xC5, 0xC5, 0xC5, 0xFF
|
||||
};
|
||||
|
||||
typedef uint32_t (*flash_prg_pntr_t) (uint8_t *, uint32_t, uint32_t);
|
||||
typedef uint32_t (*flash_sector_erase_pntr_t) (uint32_t);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Function prototypes for static functions
|
||||
*
|
||||
******************************************************************************/
|
||||
static void issue_fsm_command(flash_state_command_t command);
|
||||
static void enable_sectors_for_write(void);
|
||||
static uint32_t scale_cycle_values(uint32_t specified_timing,
|
||||
uint32_t scale_value);
|
||||
static void set_write_mode(void);
|
||||
static void trim_for_write(void);
|
||||
static void set_read_mode(void);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Erase a flash sector
|
||||
*
|
||||
******************************************************************************/
|
||||
uint32_t flash_sector_erase(uint32_t sector_address)
|
||||
{
|
||||
uint32_t error_return;
|
||||
flash_sector_erase_pntr_t func_pntr;
|
||||
|
||||
/* Call ROM function */
|
||||
func_pntr = (uint32_t (*)(uint32_t))(ROM_API_FLASH_TABLE[5]);
|
||||
error_return = func_pntr(sector_address);
|
||||
|
||||
/* Enable standby because ROM function might have disabled it */
|
||||
HWREGBITW(FLASH_BASE + FLASH_O_CFG, FLASH_CFG_DIS_STANDBY_BITN) = 0;
|
||||
|
||||
/* Return status of operation. */
|
||||
return error_return;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Erase all unprotected sectors in the flash main bank
|
||||
*
|
||||
******************************************************************************/
|
||||
uint32_t flash_bank_erase(bool force_precondition)
|
||||
{
|
||||
uint32_t error_return;
|
||||
uint32_t sector_address;
|
||||
uint32_t reg_val;
|
||||
|
||||
/* Enable all sectors for erase. */
|
||||
enable_sectors_for_write();
|
||||
|
||||
/* Clear the Status register. */
|
||||
issue_fsm_command(FAPI_CLEAR_STATUS);
|
||||
|
||||
/* Enable erase of all sectors and enable precondition if required. */
|
||||
reg_val = HWREG(FLASH_BASE + FLASH_O_FSM_ST_MACHINE);
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_ENABLE;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_SECTOR1) = 0x00000000;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_SECTOR2) = 0x00000000;
|
||||
if (force_precondition)
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ST_MACHINE) |=
|
||||
FLASH_FSM_ST_MACHINE_DO_PRECOND;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_DISABLE;
|
||||
|
||||
/* Issue the bank erase command to the FSM. */
|
||||
issue_fsm_command(FAPI_ERASE_BANK);
|
||||
|
||||
/* Wait for erase to finish. */
|
||||
while (flash_check_fsm_for_ready() == FAPI_STATUS_FSM_BUSY)
|
||||
;
|
||||
|
||||
/* Update status. */
|
||||
error_return = flash_check_fsm_for_error();
|
||||
|
||||
/* Disable sectors for erase. */
|
||||
flash_disable_sectors_for_write();
|
||||
|
||||
/* Set configured precondition mode since it may have been forced on. */
|
||||
if (!(reg_val & FLASH_FSM_ST_MACHINE_DO_PRECOND)) {
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_ENABLE;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ST_MACHINE) &=
|
||||
~FLASH_FSM_ST_MACHINE_DO_PRECOND;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_DISABLE;
|
||||
}
|
||||
|
||||
/* Program security data to default values in the customer configuration */
|
||||
/* area within the flash top sector if erase was successful. */
|
||||
if (error_return == FAPI_STATUS_SUCCESS) {
|
||||
sector_address = FLASHMEM_BASE + flash_size_get() -
|
||||
flash_sector_size_get();
|
||||
error_return = flash_program((uint8_t *)g_ccfg_default_sec,
|
||||
(sector_address + CCFG_OFFSET_SECURITY),
|
||||
CCFG_SIZE_SECURITY);
|
||||
}
|
||||
|
||||
/* Return status of operation. */
|
||||
return error_return;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Programs unprotected main bank flash sectors
|
||||
*
|
||||
******************************************************************************/
|
||||
uint32_t flash_program(uint8_t *data_buffer, uint32_t address, uint32_t count)
|
||||
{
|
||||
uint32_t error_return;
|
||||
flash_prg_pntr_t func_pntr;
|
||||
|
||||
/* Call ROM function */
|
||||
func_pntr = (uint32_t (*)(uint8_t *, uint32_t, uint32_t))
|
||||
(ROM_API_FLASH_TABLE[6]);
|
||||
error_return = func_pntr(data_buffer, address, count);
|
||||
|
||||
/* Enable standby because ROM function might have disabled it */
|
||||
HWREGBITW(FLASH_BASE + FLASH_O_CFG, FLASH_CFG_DIS_STANDBY_BITN) = 0;
|
||||
|
||||
/* Return status of operation. */
|
||||
return error_return;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Disables all sectors for erase and programming on the active bank
|
||||
*
|
||||
******************************************************************************/
|
||||
void flash_disable_sectors_for_write(void)
|
||||
{
|
||||
/* Configure flash back to read mode */
|
||||
set_read_mode();
|
||||
|
||||
/* Disable Level 1 Protection. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FBPROT) = FLASH_FBPROT_PROTL1DIS;
|
||||
|
||||
/* Disable all sectors for erase and programming. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FBSE) = 0x0000;
|
||||
|
||||
/* Enable Level 1 Protection. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FBPROT) = 0;
|
||||
|
||||
/* Protect sectors from sector erase. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_ENABLE;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_SECTOR1) = 0xFFFFFFFF;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_SECTOR2) = 0xFFFFFFFF;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_DISABLE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Issues a command to the Flash State Machine.
|
||||
*
|
||||
******************************************************************************/
|
||||
static void issue_fsm_command(flash_state_command_t command)
|
||||
{
|
||||
/* Enable write to FSM register. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_ENABLE;
|
||||
|
||||
/* Issue FSM command. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_CMD) = command;
|
||||
|
||||
/* Start command execute. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_EXECUTE) = FLASH_CMD_EXEC;
|
||||
|
||||
/* Disable write to FSM register. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_DISABLE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Enables all sectors for erase and programming on the active bank.
|
||||
*
|
||||
* This function disables the idle reading power reduction mode, selects the
|
||||
* flash bank and enables all sectors for erase and programming on the active
|
||||
* bank.
|
||||
* Sectors may be protected from programming depending on the value of the
|
||||
* FLASH_O_FSM_BSLPx registers.
|
||||
* Sectors may be protected from erase depending on the value of the
|
||||
* FLASH_O_FSM_BSLEx registers. Additional sector erase protection is set by
|
||||
* the FLASH_O_FSM_SECTOR1 register.
|
||||
*
|
||||
******************************************************************************/
|
||||
static void enable_sectors_for_write(void)
|
||||
{
|
||||
/* Trim flash module for program/erase operation. */
|
||||
trim_for_write();
|
||||
|
||||
/* Configure flash to write mode */
|
||||
set_write_mode();
|
||||
|
||||
/* Select flash bank. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FMAC) = 0x00;
|
||||
|
||||
/* Disable Level 1 Protection. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FBPROT) = FLASH_FBPROT_PROTL1DIS;
|
||||
|
||||
/* Enable all sectors for erase and programming. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FBSE) = 0xFFFF;
|
||||
|
||||
/* Enable Level 1 Protection */
|
||||
HWREG(FLASH_BASE + FLASH_O_FBPROT) = 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Trims the Flash Bank and Flash Pump for program/erase functionality
|
||||
*
|
||||
* This trimming will make it possible to perform erase and program operations
|
||||
* of the flash. Trim values are loaded from factory configuration area
|
||||
* (referred to as FCGF1). The trimming done by this function is valid until
|
||||
* reset of the flash module.
|
||||
*
|
||||
* Some registers shall be written with a value that is a number of FCLK
|
||||
* cycles. The trim values controlling these registers have a value of
|
||||
* number of half us. FCLK = SysClk / ((RWAIT+1) x 2).
|
||||
*
|
||||
******************************************************************************/
|
||||
static void trim_for_write(void)
|
||||
{
|
||||
uint32_t value;
|
||||
uint32_t temp_val;
|
||||
uint32_t fclk_scale;
|
||||
uint32_t rwait;
|
||||
|
||||
/* Return if flash is already trimmed for program/erase operations. */
|
||||
if (HWREG(FLASH_BASE + FLASH_O_FWFLAG) & FW_WRT_TRIMMED)
|
||||
return;
|
||||
|
||||
/* Configure the FSM registers */
|
||||
|
||||
/* Enable access to the FSM registers. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_ENABLE;
|
||||
|
||||
/* Determine the scaling value to be used on timing related trim values. */
|
||||
/* The value is based on the flash module clock frequency and RWAIT */
|
||||
rwait = (HWREG(FLASH_BASE + FLASH_O_FRDCTL) &
|
||||
FLASH_FRDCTL_RWAIT_M) >> FLASH_FRDCTL_RWAIT_S;
|
||||
fclk_scale = (16 * FLASH_MODULE_CLK_FREQ) / (rwait + 1);
|
||||
|
||||
/* Configure Program pulse width bits 15:0. */
|
||||
/* (FCFG1 offset 0x188 bits 15:0). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_PROG_EP) &
|
||||
FCFG1_FLASH_PROG_EP_PROGRAM_PW_M) >>
|
||||
FCFG1_FLASH_PROG_EP_PROGRAM_PW_S;
|
||||
|
||||
value = scale_cycle_values(value, fclk_scale);
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PRG_PW) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PRG_PW) &
|
||||
~FLASH_FSM_PRG_PW_PROG_PUL_WIDTH_M) |
|
||||
((value << FLASH_FSM_PRG_PW_PROG_PUL_WIDTH_S) &
|
||||
FLASH_FSM_PRG_PW_PROG_PUL_WIDTH_M);
|
||||
|
||||
/* Configure Erase pulse width bits 31:0. */
|
||||
/* (FCFG1 offset 0x18C bits 31:0). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_ERA_PW) &
|
||||
FCFG1_FLASH_ERA_PW_ERASE_PW_M) >>
|
||||
FCFG1_FLASH_ERA_PW_ERASE_PW_S;
|
||||
|
||||
value = scale_cycle_values(value, fclk_scale);
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ERA_PW) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_ERA_PW) &
|
||||
~FLASH_FSM_ERA_PW_FSM_ERA_PW_M) |
|
||||
((value << FLASH_FSM_ERA_PW_FSM_ERA_PW_S) &
|
||||
FLASH_FSM_ERA_PW_FSM_ERA_PW_M);
|
||||
|
||||
/* Configure no of flash clock cycles from EXECUTEZ going low to the the
|
||||
verify data can be read in the program verify mode bits 7:0. */
|
||||
/* (FCFG1 offset 0x174 bits 23:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_C_E_P_R) &
|
||||
FCFG1_FLASH_C_E_P_R_PV_ACCESS_M) >>
|
||||
FCFG1_FLASH_C_E_P_R_PV_ACCESS_S;
|
||||
|
||||
value = scale_cycle_values(value, fclk_scale);
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_EX_VAL) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_EX_VAL) &
|
||||
~FLASH_FSM_EX_VAL_EXE_VALD_M) |
|
||||
((value << FLASH_FSM_EX_VAL_EXE_VALD_S) &
|
||||
FLASH_FSM_EX_VAL_EXE_VALD_M);
|
||||
|
||||
/* Configure the number of flash clocks from the start of the Read mode at
|
||||
the end of the operations until the FSM clears the BUSY bit in FMSTAT. */
|
||||
/* (FCFG1 offset 0x178 bits 23:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_P_R_PV) &
|
||||
FCFG1_FLASH_P_R_PV_RH_M) >>
|
||||
FCFG1_FLASH_P_R_PV_RH_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_RD_H) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_RD_H) &
|
||||
~FLASH_FSM_RD_H_RD_H_M) |
|
||||
((value << FLASH_FSM_RD_H_RD_H_S) &
|
||||
FLASH_FSM_RD_H_RD_H_M);
|
||||
|
||||
/* Configure Program hold time */
|
||||
/* (FCFG1 offset 0x178 bits 31:24). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_P_R_PV) &
|
||||
FCFG1_FLASH_P_R_PV_PH_M) >>
|
||||
FCFG1_FLASH_P_R_PV_PH_S;
|
||||
|
||||
value = scale_cycle_values(value, fclk_scale);
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_P_OH) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_P_OH) &
|
||||
~FLASH_FSM_P_OH_PGM_OH_M) |
|
||||
((value << FLASH_FSM_P_OH_PGM_OH_S) &
|
||||
FLASH_FSM_P_OH_PGM_OH_M);
|
||||
|
||||
/* Configure Erase hold time */
|
||||
/* (FCFG1 offset 0x17C bits 31:24). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_EH_SEQ) &
|
||||
FCFG1_FLASH_EH_SEQ_EH_M) >>
|
||||
FCFG1_FLASH_EH_SEQ_EH_S;
|
||||
|
||||
value = scale_cycle_values(value, fclk_scale);
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ERA_OH) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_ERA_OH) &
|
||||
~FLASH_FSM_ERA_OH_ERA_OH_M) |
|
||||
((value << FLASH_FSM_ERA_OH_ERA_OH_S) &
|
||||
FLASH_FSM_ERA_OH_ERA_OH_M);
|
||||
|
||||
/* Configure Program verify row switch time */
|
||||
/* (FCFG1 offset0x178 bits 15:8). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_P_R_PV) &
|
||||
FCFG1_FLASH_P_R_PV_PVH_M) >>
|
||||
FCFG1_FLASH_P_R_PV_PVH_S;
|
||||
|
||||
value = scale_cycle_values(value, fclk_scale);
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PE_VH) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PE_VH) &
|
||||
~FLASH_FSM_PE_VH_PGM_VH_M) |
|
||||
((value << FLASH_FSM_PE_VH_PGM_VH_S) &
|
||||
FLASH_FSM_PE_VH_PGM_VH_M);
|
||||
|
||||
/* Configure Program Operation Setup time */
|
||||
/* (FCFG1 offset 0x170 bits 31:24). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_E_P) &
|
||||
FCFG1_FLASH_E_P_PSU_M) >>
|
||||
FCFG1_FLASH_E_P_PSU_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PE_OSU) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PE_OSU) &
|
||||
~FLASH_FSM_PE_OSU_PGM_OSU_M) |
|
||||
((value << FLASH_FSM_PE_OSU_PGM_OSU_S) &
|
||||
FLASH_FSM_PE_OSU_PGM_OSU_M);
|
||||
|
||||
/* Configure Erase Operation Setup time */
|
||||
/* (FCGF1 offset 0x170 bits 23:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_E_P) &
|
||||
FCFG1_FLASH_E_P_ESU_M) >>
|
||||
FCFG1_FLASH_E_P_ESU_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PE_OSU) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PE_OSU) &
|
||||
~FLASH_FSM_PE_OSU_ERA_OSU_M) |
|
||||
((value << FLASH_FSM_PE_OSU_ERA_OSU_S) &
|
||||
FLASH_FSM_PE_OSU_ERA_OSU_M);
|
||||
|
||||
/* Confgure Program Verify Setup time */
|
||||
/* (FCFG1 offset 0x170 bits 15:8). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_E_P) &
|
||||
FCFG1_FLASH_E_P_PVSU_M) >>
|
||||
FCFG1_FLASH_E_P_PVSU_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PE_VSU) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PE_VSU) &
|
||||
~FLASH_FSM_PE_VSU_PGM_VSU_M) |
|
||||
((value << FLASH_FSM_PE_VSU_PGM_VSU_S) &
|
||||
FLASH_FSM_PE_VSU_PGM_VSU_M);
|
||||
|
||||
/* Configure Erase Verify Setup time */
|
||||
/* (FCFG1 offset 0x170 bits 7:0). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_E_P) &
|
||||
FCFG1_FLASH_E_P_EVSU_M) >>
|
||||
FCFG1_FLASH_E_P_EVSU_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PE_VSU) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PE_VSU) &
|
||||
~FLASH_FSM_PE_VSU_ERA_VSU_M) |
|
||||
((value << FLASH_FSM_PE_VSU_ERA_VSU_S) &
|
||||
FLASH_FSM_PE_VSU_ERA_VSU_M);
|
||||
|
||||
/* Configure Addr to EXECUTEZ low setup time */
|
||||
/* (FCFG1 offset 0x174 bits 15:12). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_C_E_P_R) &
|
||||
FCFG1_FLASH_C_E_P_R_A_EXEZ_SETUP_M) >>
|
||||
FCFG1_FLASH_C_E_P_R_A_EXEZ_SETUP_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_CMP_VSU) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_CMP_VSU) &
|
||||
~FLASH_FSM_CMP_VSU_ADD_EXZ_M) |
|
||||
((value << FLASH_FSM_CMP_VSU_ADD_EXZ_S) &
|
||||
FLASH_FSM_CMP_VSU_ADD_EXZ_M);
|
||||
|
||||
/* Configure Voltage Status Count */
|
||||
/* (FCFG1 offset 0x17C bits 15:12). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_EH_SEQ) &
|
||||
FCFG1_FLASH_EH_SEQ_VSTAT_M) >>
|
||||
FCFG1_FLASH_EH_SEQ_VSTAT_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_VSTAT) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_VSTAT) &
|
||||
~FLASH_FSM_VSTAT_VSTAT_CNT_M) |
|
||||
((value << FLASH_FSM_VSTAT_VSTAT_CNT_S) &
|
||||
FLASH_FSM_VSTAT_VSTAT_CNT_M);
|
||||
|
||||
/* Configure Repeat Verify action setup */
|
||||
/* (FCFG1 offset 0x174 bits 31:24). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_C_E_P_R) &
|
||||
FCFG1_FLASH_C_E_P_R_RVSU_M) >>
|
||||
FCFG1_FLASH_C_E_P_R_RVSU_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_EX_VAL) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_EX_VAL) &
|
||||
~FLASH_FSM_EX_VAL_REP_VSU_M) |
|
||||
((value << FLASH_FSM_EX_VAL_REP_VSU_S) &
|
||||
FLASH_FSM_EX_VAL_REP_VSU_M);
|
||||
|
||||
/* Configure Maximum Programming Pulses */
|
||||
/* (FCFG1 offset 0x184 bits 15:0). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_PP) &
|
||||
FCFG1_FLASH_PP_MAX_PP_M) >>
|
||||
FCFG1_FLASH_PP_MAX_PP_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PRG_PUL) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PRG_PUL) &
|
||||
~FLASH_FSM_PRG_PUL_MAX_PRG_PUL_M) |
|
||||
((value << FLASH_FSM_PRG_PUL_MAX_PRG_PUL_S) &
|
||||
FLASH_FSM_PRG_PUL_MAX_PRG_PUL_M);
|
||||
|
||||
/* Configure Beginning level for VHVCT used during erase modes */
|
||||
/* (FCFG1 offset 0x180 bits 31:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_VHV_E) &
|
||||
FCFG1_FLASH_VHV_E_VHV_E_START_M) >>
|
||||
FCFG1_FLASH_VHV_E_VHV_E_START_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_PRG_PUL) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_PRG_PUL) &
|
||||
~FLASH_FSM_PRG_PUL_BEG_EC_LEVEL_M) |
|
||||
((value << FLASH_FSM_PRG_PUL_BEG_EC_LEVEL_S) &
|
||||
FLASH_FSM_PRG_PUL_BEG_EC_LEVEL_M);
|
||||
|
||||
/* Configure Maximum EC Level */
|
||||
/* (FCFG1 offset 0x2B0 bits 21:18). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA3) &
|
||||
FCFG1_FLASH_OTP_DATA3_MAX_EC_LEVEL_M) >>
|
||||
FCFG1_FLASH_OTP_DATA3_MAX_EC_LEVEL_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ERA_PUL) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_ERA_PUL) &
|
||||
~FLASH_FSM_ERA_PUL_MAX_EC_LEVEL_M) |
|
||||
((value << FLASH_FSM_ERA_PUL_MAX_EC_LEVEL_S) &
|
||||
FLASH_FSM_ERA_PUL_MAX_EC_LEVEL_M);
|
||||
|
||||
/* Configure Maximum Erase Pulses */
|
||||
/* (FCFG1 offset 0x188 bits 31:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_PROG_EP) &
|
||||
FCFG1_FLASH_PROG_EP_MAX_EP_M) >>
|
||||
FCFG1_FLASH_PROG_EP_MAX_EP_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ERA_PUL) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_ERA_PUL) &
|
||||
~FLASH_FSM_ERA_PUL_MAX_ERA_PUL_M) |
|
||||
((value << FLASH_FSM_ERA_PUL_MAX_ERA_PUL_S) &
|
||||
FLASH_FSM_ERA_PUL_MAX_ERA_PUL_M);
|
||||
|
||||
/* Configure the VHVCT Step Size. This is the number of erase pulses that
|
||||
must be completed for each level before the FSM increments the
|
||||
CUR_EC_LEVEL to the next higher level. Actual erase pulses per level
|
||||
equals (EC_STEP_SIZE +1). The stepping is only needed for the VHVCT
|
||||
voltage. */
|
||||
/* (FCFG1 offset 0x2B0 bits 31:23). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA3) &
|
||||
FCFG1_FLASH_OTP_DATA3_EC_STEP_SIZE_M) >>
|
||||
FCFG1_FLASH_OTP_DATA3_EC_STEP_SIZE_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_STEP_SIZE) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_STEP_SIZE) &
|
||||
~FLASH_FSM_STEP_SIZE_EC_STEP_SIZE_M) |
|
||||
((value << FLASH_FSM_STEP_SIZE_EC_STEP_SIZE_S) &
|
||||
FLASH_FSM_STEP_SIZE_EC_STEP_SIZE_M);
|
||||
|
||||
/* Configure the hight of each EC step. This is the number of counts that
|
||||
the CUR_EC_LEVEL will increment when going to a new level. Actual count
|
||||
size equals (EC_STEP_HEIGHT + 1). The stepping applies only to the VHVCT
|
||||
voltage.
|
||||
The read trim value is decremented by 1 before written to the register
|
||||
since actual counts equals (register value + 1). */
|
||||
/* (FCFG1 offset 0x180 bits 15:0). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_VHV_E) &
|
||||
FCFG1_FLASH_VHV_E_VHV_E_STEP_HIGHT_M) >>
|
||||
FCFG1_FLASH_VHV_E_VHV_E_STEP_HIGHT_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_EC_STEP_HEIGHT) = ((value - 1) &
|
||||
FLASH_FSM_EC_STEP_HEIGHT_EC_STEP_HEIGHT_M);
|
||||
|
||||
/* Configure Precondition used in erase operations */
|
||||
/* (FCFG1 offset 0x2B0 bit 22). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA3) &
|
||||
FCFG1_FLASH_OTP_DATA3_DO_PRECOND_M) >>
|
||||
FCFG1_FLASH_OTP_DATA3_DO_PRECOND_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ST_MACHINE) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSM_ST_MACHINE) &
|
||||
~FLASH_FSM_ST_MACHINE_DO_PRECOND_M) |
|
||||
((value << FLASH_FSM_ST_MACHINE_DO_PRECOND_S) &
|
||||
FLASH_FSM_ST_MACHINE_DO_PRECOND_M);
|
||||
|
||||
/* Enable the recommended Good Time function. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_ST_MACHINE) |=
|
||||
FLASH_FSM_ST_MACHINE_ONE_TIME_GOOD;
|
||||
|
||||
/* Disable write access to FSM registers. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FSM_WR_ENA) = FSM_REG_WRT_DISABLE;
|
||||
|
||||
/* Configure the voltage registers */
|
||||
|
||||
/* Unlock voltage registers (0x2080 - 0x2098). */
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0xAAAA;
|
||||
|
||||
/* Configure voltage level for the specified pump voltage of high
|
||||
voltage supply input during erase operation VHVCT_E and TRIM13_E */
|
||||
/* (FCFG1 offset 0x190 bits[3:0] and bits[11:8]). */
|
||||
temp_val = HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_VHV);
|
||||
|
||||
value = ((temp_val & FCFG1_FLASH_VHV_TRIM13_E_M)>>
|
||||
FCFG1_FLASH_VHV_TRIM13_E_S) << FLASH_FVHVCT1_TRIM13_E_S;
|
||||
value |= ((temp_val & FCFG1_FLASH_VHV_VHV_E_M)>>
|
||||
FCFG1_FLASH_VHV_VHV_E_S) << FLASH_FVHVCT1_VHVCT_E_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVHVCT1) = (HWREG(FLASH_BASE + FLASH_O_FVHVCT1) &
|
||||
~(FLASH_FVHVCT1_TRIM13_E_M | FLASH_FVHVCT1_VHVCT_E_M)) | value;
|
||||
|
||||
/* Configure voltage level for the specified pump voltage of high voltage
|
||||
supply input during program verify operation VHVCT_PV and TRIM13_PV */
|
||||
/* (OTP offset 0x194 bits[19:16] and bits[27:24]). */
|
||||
temp_val = HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_VHV_PV);
|
||||
|
||||
value = ((temp_val & FCFG1_FLASH_VHV_PV_TRIM13_PV_M) >>
|
||||
FCFG1_FLASH_VHV_PV_TRIM13_PV_S) << FLASH_FVHVCT1_TRIM13_PV_S;
|
||||
value |= ((temp_val & FCFG1_FLASH_VHV_PV_VHV_PV_M) >>
|
||||
FCFG1_FLASH_VHV_PV_VHV_PV_S) << FLASH_FVHVCT1_VHVCT_PV_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVHVCT1) = (HWREG(FLASH_BASE + FLASH_O_FVHVCT1) &
|
||||
~(FLASH_FVHVCT1_TRIM13_PV_M | FLASH_FVHVCT1_VHVCT_PV_M)) | value;
|
||||
|
||||
/* Configure voltage level for the specified pump voltage of high voltage
|
||||
supply input during program operation VHVCT_P and TRIM13_P */
|
||||
/* (FCFG1 offset 0x190 bits[19:16] and bits[27:24]). */
|
||||
temp_val = HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_VHV);
|
||||
|
||||
value = ((temp_val & FCFG1_FLASH_VHV_TRIM13_P_M) >>
|
||||
FCFG1_FLASH_VHV_TRIM13_P_S) << FLASH_FVHVCT2_TRIM13_P_S;
|
||||
value |= ((temp_val & FCFG1_FLASH_VHV_VHV_P_M) >>
|
||||
FCFG1_FLASH_VHV_VHV_P_S) << FLASH_FVHVCT2_VHVCT_P_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVHVCT2) = (HWREG(FLASH_BASE + FLASH_O_FVHVCT2) &
|
||||
~(FLASH_FVHVCT2_TRIM13_P_M | FLASH_FVHVCT2_VHVCT_P_M)) | value;
|
||||
|
||||
/* Configure voltage level for the specified pump voltage of wordline power
|
||||
supply for read mode */
|
||||
/* (FCFG1 offset 0x198 Bits 15:8). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_V) &
|
||||
FCFG1_FLASH_V_V_READ_M) >> FCFG1_FLASH_V_V_READ_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVREADCT) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FVREADCT) &
|
||||
~FLASH_FVREADCT_VREADCT_M) |
|
||||
((value << FLASH_FVREADCT_VREADCT_S) &
|
||||
FLASH_FVREADCT_VREADCT_M);
|
||||
|
||||
/* Configure the voltage level for the VCG 2.5 CT pump voltage */
|
||||
/* (FCFG1 offset 0x194 bits 15:8). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_VHV_PV) &
|
||||
FCFG1_FLASH_VHV_PV_VCG2P5_M) >>
|
||||
FCFG1_FLASH_VHV_PV_VCG2P5_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVNVCT) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FVNVCT) &
|
||||
~FLASH_FVNVCT_VCG2P5CT_M) |
|
||||
((value << FLASH_FVNVCT_VCG2P5CT_S) &
|
||||
FLASH_FVNVCT_VCG2P5CT_M);
|
||||
|
||||
/* Configure the voltage level for the specified pump voltage of high
|
||||
current power input during program operation */
|
||||
/* (FCFG1 offset 0x198 bits 31:24). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_V) &
|
||||
FCFG1_FLASH_V_VSL_P_M) >>
|
||||
FCFG1_FLASH_V_VSL_P_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVSLP) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FVSLP) &
|
||||
~FLASH_FVSLP_VSL_P_M) |
|
||||
((value << FLASH_FVSLP_VSL_P_S) &
|
||||
FLASH_FVSLP_VSL_P_M);
|
||||
|
||||
/* Configure the voltage level for the specified pump voltage of wordline
|
||||
power supply during programming operations */
|
||||
/* (OTP offset 0x198 bits 23:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_V) &
|
||||
FCFG1_FLASH_V_VWL_P_M) >>
|
||||
FCFG1_FLASH_V_VWL_P_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FVWLCT) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FVWLCT) &
|
||||
~FLASH_FVWLCT_VWLCT_P_M) |
|
||||
((value << FLASH_FVWLCT_VWLCT_P_S) &
|
||||
FLASH_FVWLCT_VWLCT_P_M);
|
||||
|
||||
/* Configure the pump's TRIM_1P7 port pins. */
|
||||
/* (FCFG1 offset 0x2B0 bits 17:16). */
|
||||
value = (HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA3) &
|
||||
FCFG1_FLASH_OTP_DATA3_TRIM_1P7_M) >>
|
||||
FCFG1_FLASH_OTP_DATA3_TRIM_1P7_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FSEQPMP) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSEQPMP) &
|
||||
~FLASH_FSEQPMP_TRIM_1P7_M) |
|
||||
((value << FLASH_FSEQPMP_TRIM_1P7_S) &
|
||||
FLASH_FSEQPMP_TRIM_1P7_M);
|
||||
|
||||
/* Lock the voltage registers. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0x55AA;
|
||||
|
||||
/* Set trimmed flag. */
|
||||
HWREG(FLASH_BASE + FLASH_O_FWLOCK) = 5;
|
||||
HWREG(FLASH_BASE + FLASH_O_FWFLAG) |= FW_WRT_TRIMMED;
|
||||
HWREG(FLASH_BASE + FLASH_O_FWLOCK) = 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Used to scale the TI OTP values based on the FClk scaling value.
|
||||
*
|
||||
******************************************************************************/
|
||||
static uint32_t scale_cycle_values(uint32_t specified_timing,
|
||||
uint32_t scale_value)
|
||||
{
|
||||
uint32_t scaled_value = (specified_timing * scale_value) >> 6;
|
||||
return scaled_value;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Used to set flash in read mode.
|
||||
*
|
||||
* Flash is configured with values loaded from OTP dependent on the current
|
||||
* regulator mode.
|
||||
*
|
||||
******************************************************************************/
|
||||
static void set_read_mode(void)
|
||||
{
|
||||
uint32_t trim_value;
|
||||
uint32_t value;
|
||||
|
||||
/* Configure the STANDBY_MODE_SEL, STANDBY_PW_SEL, DIS_STANDBY, DIS_IDLE,
|
||||
VIN_AT_X and VIN_BY_PASS for read mode */
|
||||
if (HWREG(AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL) &
|
||||
AON_PMCTL_PWRCTL_EXT_REG_MODE) {
|
||||
|
||||
/* Select trim values for external regulator mode:
|
||||
Configure STANDBY_MODE_SEL (OTP offset 0x308 bit 7)
|
||||
Configure STANDBY_PW_SEL (OTP offset 0x308 bit 6:5)
|
||||
Must be done while the register bit field CONFIG.DIS_STANDBY = 1 */
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) |= FLASH_CFG_DIS_STANDBY;
|
||||
|
||||
trim_value =
|
||||
HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA4);
|
||||
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_EXT_RD_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_EXT_RD_S) <<
|
||||
FLASH_CFG_STANDBY_MODE_SEL_S;
|
||||
|
||||
value |= ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_EXT_RD_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_EXT_RD_S) <<
|
||||
FLASH_CFG_STANDBY_PW_SEL_S;
|
||||
|
||||
/* Configure DIS_STANDBY (OTP offset 0x308 bit 4).
|
||||
Configure DIS_IDLE (OTP offset 0x308 bit 3). */
|
||||
value |= ((trim_value &
|
||||
(FCFG1_FLASH_OTP_DATA4_DIS_STANDBY_EXT_RD_M |
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_EXT_RD_M)) >>
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_EXT_RD_S) <<
|
||||
FLASH_CFG_DIS_IDLE_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) = (HWREG(FLASH_BASE + FLASH_O_CFG) &
|
||||
~(FLASH_CFG_STANDBY_MODE_SEL_M | FLASH_CFG_STANDBY_PW_SEL_M |
|
||||
FLASH_CFG_DIS_STANDBY_M | FLASH_CFG_DIS_IDLE_M)) | value;
|
||||
|
||||
/* Check if sample and hold functionality is disabled. */
|
||||
if (HWREG(FLASH_BASE + FLASH_O_CFG) & FLASH_CFG_DIS_IDLE) {
|
||||
/* Wait for disabled sample and hold functionality to be stable. */
|
||||
while (!(HWREG(FLASH_BASE+FLASH_O_STAT) & FLASH_STAT_SAMHOLD_DIS))
|
||||
;
|
||||
}
|
||||
|
||||
/* Configure VIN_AT_X (OTP offset 0x308 bits 2:0) */
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_EXT_RD_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_EXT_RD_S) <<
|
||||
FLASH_FSEQPMP_VIN_AT_X_S;
|
||||
|
||||
/* Configure VIN_BY_PASS which is dependent on the VIN_AT_X value.
|
||||
If VIN_AT_X = 7 then VIN_BY_PASS should be 0 otherwise
|
||||
VIN_BY_PASS should be 1 */
|
||||
if (((value & FLASH_FSEQPMP_VIN_AT_X_M) >>
|
||||
FLASH_FSEQPMP_VIN_AT_X_S) != 0x7)
|
||||
value |= FLASH_FSEQPMP_VIN_BY_PASS;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0xAAAA;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSEQPMP) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSEQPMP) &
|
||||
~(FLASH_FSEQPMP_VIN_BY_PASS_M |
|
||||
FLASH_FSEQPMP_VIN_AT_X_M)) | value;
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0x55AA;
|
||||
} else {
|
||||
|
||||
/* Select trim values for internal regulator mode:
|
||||
Configure STANDBY_MODE_SEL (OTP offset 0x308 bit 15)
|
||||
COnfigure STANDBY_PW_SEL (OTP offset 0x308 bit 14:13)
|
||||
Must be done while the register bit field CONFIG.DIS_STANDBY = 1 */
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) |= FLASH_CFG_DIS_STANDBY;
|
||||
|
||||
trim_value =
|
||||
HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA4);
|
||||
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_INT_RD_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_INT_RD_S) <<
|
||||
FLASH_CFG_STANDBY_MODE_SEL_S;
|
||||
|
||||
value |= ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_INT_RD_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_INT_RD_S) <<
|
||||
FLASH_CFG_STANDBY_PW_SEL_S;
|
||||
|
||||
/* Configure DIS_STANDBY (OTP offset 0x308 bit 12).
|
||||
Configure DIS_IDLE (OTP offset 0x308 bit 11). */
|
||||
value |= ((trim_value &
|
||||
(FCFG1_FLASH_OTP_DATA4_DIS_STANDBY_INT_RD_M |
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_INT_RD_M)) >>
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_INT_RD_S) <<
|
||||
FLASH_CFG_DIS_IDLE_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) = (HWREG(FLASH_BASE + FLASH_O_CFG) &
|
||||
~(FLASH_CFG_STANDBY_MODE_SEL_M | FLASH_CFG_STANDBY_PW_SEL_M |
|
||||
FLASH_CFG_DIS_STANDBY_M | FLASH_CFG_DIS_IDLE_M)) | value;
|
||||
|
||||
/* Check if sample and hold functionality is disabled. */
|
||||
if (HWREG(FLASH_BASE + FLASH_O_CFG) & FLASH_CFG_DIS_IDLE) {
|
||||
/* Wait for disabled sample and hold functionality to be stable. */
|
||||
while (!(HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_SAMHOLD_DIS))
|
||||
;
|
||||
}
|
||||
|
||||
/* Configure VIN_AT_X (OTP offset 0x308 bits 10:8) */
|
||||
value = (((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_INT_RD_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_INT_RD_S) <<
|
||||
FLASH_FSEQPMP_VIN_AT_X_S);
|
||||
|
||||
/* Configure VIN_BY_PASS which is dependent on the VIN_AT_X value.
|
||||
If VIN_AT_X = 7 then VIN_BY_PASS should be 0 otherwise
|
||||
VIN_BY_PASS should be 1 */
|
||||
if (((value & FLASH_FSEQPMP_VIN_AT_X_M) >>
|
||||
FLASH_FSEQPMP_VIN_AT_X_S) != 0x7)
|
||||
value |= FLASH_FSEQPMP_VIN_BY_PASS;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0xAAAA;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSEQPMP) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSEQPMP) &
|
||||
~(FLASH_FSEQPMP_VIN_BY_PASS_M |
|
||||
FLASH_FSEQPMP_VIN_AT_X_M)) | value;
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0x55AA;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Used to set flash in write mode.
|
||||
*
|
||||
* Flash is configured with values loaded from OTP dependent on the current
|
||||
* regulator mode.
|
||||
*
|
||||
******************************************************************************/
|
||||
static void set_write_mode(void)
|
||||
{
|
||||
uint32_t trim_value;
|
||||
uint32_t value;
|
||||
|
||||
/* Configure the STANDBY_MODE_SEL, STANDBY_PW_SEL, DIS_STANDBY, DIS_IDLE,
|
||||
VIN_AT_X and VIN_BY_PASS for program/erase mode */
|
||||
if (HWREG(AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL) &
|
||||
AON_PMCTL_PWRCTL_EXT_REG_MODE) {
|
||||
|
||||
/* Select trim values for external regulator mode:
|
||||
Configure STANDBY_MODE_SEL (OTP offset 0x308 bit 23)
|
||||
Configure STANDBY_PW_SEL (OTP offset 0x308 bit 22:21)
|
||||
Must be done while the register bit field CONFIG.DIS_STANDBY = 1 */
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) |= FLASH_CFG_DIS_STANDBY;
|
||||
|
||||
trim_value =
|
||||
HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA4);
|
||||
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_EXT_WRT_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_EXT_WRT_S) <<
|
||||
FLASH_CFG_STANDBY_MODE_SEL_S;
|
||||
|
||||
value |= ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_EXT_WRT_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_EXT_WRT_S) <<
|
||||
FLASH_CFG_STANDBY_PW_SEL_S;
|
||||
|
||||
/* Configure DIS_STANDBY (OTP offset 0x308 bit 20).
|
||||
Configure DIS_IDLE (OTP offset 0x308 bit 19). */
|
||||
value |= ((trim_value &
|
||||
(FCFG1_FLASH_OTP_DATA4_DIS_STANDBY_EXT_WRT_M |
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_EXT_WRT_M)) >>
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_EXT_WRT_S) <<
|
||||
FLASH_CFG_DIS_IDLE_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) = (HWREG(FLASH_BASE + FLASH_O_CFG) &
|
||||
~(FLASH_CFG_STANDBY_MODE_SEL_M | FLASH_CFG_STANDBY_PW_SEL_M |
|
||||
FLASH_CFG_DIS_STANDBY_M | FLASH_CFG_DIS_IDLE_M)) | value;
|
||||
|
||||
/* Check if sample and hold functionality is disabled. */
|
||||
if (HWREG(FLASH_BASE + FLASH_O_CFG) & FLASH_CFG_DIS_IDLE) {
|
||||
/* Wait for disabled sample and hold functionality to be stable. */
|
||||
while (!(HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_SAMHOLD_DIS))
|
||||
;
|
||||
}
|
||||
|
||||
/* Configure VIN_AT_X (OTP offset 0x308 bits 18:16) */
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_EXT_WRT_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_EXT_WRT_S) <<
|
||||
FLASH_FSEQPMP_VIN_AT_X_S;
|
||||
|
||||
/* Configure VIN_BY_PASS which is dependent on the VIN_AT_X value.
|
||||
If VIN_AT_X = 7 then VIN_BY_PASS should be 0 otherwise
|
||||
VIN_BY_PASS should be 1 */
|
||||
if (((value & FLASH_FSEQPMP_VIN_AT_X_M) >>
|
||||
FLASH_FSEQPMP_VIN_AT_X_S) != 0x7)
|
||||
value |= FLASH_FSEQPMP_VIN_BY_PASS;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0xAAAA;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSEQPMP) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSEQPMP) &
|
||||
~(FLASH_FSEQPMP_VIN_BY_PASS_M |
|
||||
FLASH_FSEQPMP_VIN_AT_X_M)) | value;
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0x55AA;
|
||||
} else {
|
||||
/* Select trim values for internal regulator mode:
|
||||
Configure STANDBY_MODE_SEL (OTP offset 0x308 bit 31)
|
||||
COnfigure STANDBY_PW_SEL (OTP offset 0x308 bit 30:29)
|
||||
Must be done while the register bit field CONFIG.DIS_STANDBY = 1 */
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) |= FLASH_CFG_DIS_STANDBY;
|
||||
|
||||
trim_value =
|
||||
HWREG(FLASH_CFG_BASE + FCFG1_OFFSET + FCFG1_O_FLASH_OTP_DATA4);
|
||||
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_INT_WRT_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_MODE_SEL_INT_WRT_S) <<
|
||||
FLASH_CFG_STANDBY_MODE_SEL_S;
|
||||
|
||||
value |= ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_INT_WRT_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_STANDBY_PW_SEL_INT_WRT_S) <<
|
||||
FLASH_CFG_STANDBY_PW_SEL_S;
|
||||
|
||||
/* Configure DIS_STANDBY (OTP offset 0x308 bit 28).
|
||||
Configure DIS_IDLE (OTP offset 0x308 bit 27). */
|
||||
value |= ((trim_value &
|
||||
(FCFG1_FLASH_OTP_DATA4_DIS_STANDBY_INT_WRT_M |
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_INT_WRT_M)) >>
|
||||
FCFG1_FLASH_OTP_DATA4_DIS_IDLE_INT_WRT_S) <<
|
||||
FLASH_CFG_DIS_IDLE_S;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_CFG) = (HWREG(FLASH_BASE + FLASH_O_CFG) &
|
||||
~(FLASH_CFG_STANDBY_MODE_SEL_M | FLASH_CFG_STANDBY_PW_SEL_M |
|
||||
FLASH_CFG_DIS_STANDBY_M | FLASH_CFG_DIS_IDLE_M)) | value;
|
||||
|
||||
/* Check if sample and hold functionality is disabled. */
|
||||
if (HWREG(FLASH_BASE + FLASH_O_CFG) & FLASH_CFG_DIS_IDLE) {
|
||||
/* Wait for disabled sample and hold functionality to be stable. */
|
||||
while (!(HWREG(FLASH_BASE + FLASH_O_STAT) & FLASH_STAT_SAMHOLD_DIS))
|
||||
;
|
||||
}
|
||||
|
||||
/* Configure VIN_AT_X (OTP offset 0x308 bits 26:24) */
|
||||
value = ((trim_value &
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_INT_WRT_M) >>
|
||||
FCFG1_FLASH_OTP_DATA4_VIN_AT_X_INT_WRT_S) <<
|
||||
FLASH_FSEQPMP_VIN_AT_X_S;
|
||||
|
||||
/* Configure VIN_BY_PASS which is dependent on the VIN_AT_X value.
|
||||
If VIN_AT_X = 7 then VIN_BY_PASS should be 0 otherwise
|
||||
VIN_BY_PASS should be 1 */
|
||||
if (((value & FLASH_FSEQPMP_VIN_AT_X_M) >>
|
||||
FLASH_FSEQPMP_VIN_AT_X_S) != 0x7)
|
||||
value |= FLASH_FSEQPMP_VIN_BY_PASS;
|
||||
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0xAAAA;
|
||||
HWREG(FLASH_BASE + FLASH_O_FSEQPMP) =
|
||||
(HWREG(FLASH_BASE + FLASH_O_FSEQPMP) &
|
||||
~(FLASH_FSEQPMP_VIN_BY_PASS_M |
|
||||
FLASH_FSEQPMP_VIN_AT_X_M)) | value;
|
||||
HWREG(FLASH_BASE + FLASH_O_FLOCK) = 0x55AA;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user