Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9c4700b4d | ||
|
|
e69b94295e | ||
|
|
6d1ea5a7a9 | ||
|
|
8f944fc226 | ||
|
|
6544018321 | ||
|
|
80a9e44ac7 | ||
|
|
f5793f9a4a | ||
|
|
6145b016c2 | ||
|
|
2d0750d708 | ||
|
|
00581ae591 | ||
|
|
f8a537aa92 | ||
|
|
feb926a770 | ||
|
|
0c0c1b81e2 | ||
|
|
a384596034 | ||
|
|
027f8c9fb3 | ||
|
|
612cad7f7c | ||
|
|
07a73c01d1 | ||
|
|
6cb0c3ff14 | ||
|
|
f254667a13 |
@@ -1,26 +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 LOGICAL_CONTINUATIONS
|
||||
--ignore MACRO_WITH_FLOW_CONTROL
|
||||
--ignore PARENTHESIS_ALIGNMENT
|
||||
--ignore PREFER_DEFINED_ATTRIBUTE_MACRO
|
||||
--ignore PREFER_FALLTHROUGH
|
||||
--ignore PREFER_KERNEL_TYPES
|
||||
--ignore SPLIT_STRING
|
||||
--ignore SSCANF_TO_KSTRTO
|
||||
--ignore TRACING_LOGGING
|
||||
--ignore VOLATILE
|
||||
@@ -1,17 +0,0 @@
|
||||
# EditorConfig: https://editorconfig.org/
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# All (Defaults)
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
|
||||
[*.patch,*.diff]
|
||||
trim_trailing_whitespace = false
|
||||
131
.github/workflows/snapshot.yml
vendored
131
.github/workflows/snapshot.yml
vendored
@@ -1,131 +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-latest]
|
||||
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@v4
|
||||
- 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.13.1
|
||||
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: Prepare libjaylink
|
||||
env:
|
||||
LIBJAYLINK_VER: 0.3.1
|
||||
run: |
|
||||
mkdir -p $DL_DIR && cd $DL_DIR
|
||||
wget https://gitlab.zapb.de/libjaylink/libjaylink/-/archive/${LIBJAYLINK_VER}/libjaylink-${LIBJAYLINK_VER}.tar.gz
|
||||
tar -xzf libjaylink-${LIBJAYLINK_VER}.tar.gz
|
||||
cd libjaylink-${LIBJAYLINK_VER}
|
||||
./autogen.sh
|
||||
echo "LIBJAYLINK_SRC=$PWD" >> $GITHUB_ENV
|
||||
- name: Prepare jimtcl
|
||||
env:
|
||||
JIMTCL_VER: 0.83
|
||||
run: |
|
||||
mkdir -p $DL_DIR && cd $DL_DIR
|
||||
wget https://github.com/msteveb/jimtcl/archive/refs/tags/${JIMTCL_VER}.tar.gz
|
||||
tar -xzf ${JIMTCL_VER}.tar.gz
|
||||
echo "JIMTCL_SRC=$PWD/jimtcl-${JIMTCL_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"
|
||||
LIBJAYLINK_CONFIG: --enable-shared --disable-static
|
||||
JIMTCL_CONFIG: --with-ext=json --minimal --disable-ssl
|
||||
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/
|
||||
# required by libftdi1.dll
|
||||
cp `$HOST-gcc --print-file-name=libgcc_s_dw2-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@v4
|
||||
with:
|
||||
path: ${{ env.ARTIFACT_PATH }}
|
||||
- name: Delete 'latest' Release
|
||||
uses: dev-drprasad/delete-tag-and-release@v1.1
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: ${{ env.RELEASE_NAME }}
|
||||
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 }}
|
||||
48
.gitignore
vendored
48
.gitignore
vendored
@@ -3,7 +3,6 @@
|
||||
# build output
|
||||
.libs
|
||||
.deps
|
||||
.dirstamp
|
||||
*.o
|
||||
*.o.??????
|
||||
*.a
|
||||
@@ -11,9 +10,9 @@
|
||||
*.la
|
||||
*.in
|
||||
|
||||
# coverage files (gcov)
|
||||
*.gcda
|
||||
*.gcno
|
||||
# generated source files
|
||||
src/jtag/minidriver_imp.h
|
||||
src/jtag/jtag_minidriver.h
|
||||
|
||||
# OpenULINK driver files generated by SDCC
|
||||
src/jtag/drivers/OpenULINK/*.rel
|
||||
@@ -22,7 +21,7 @@ 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/*.lnk
|
||||
src/jtag/drivers/OpenULINK/*.ihx
|
||||
src/jtag/drivers/OpenULINK/*.rst
|
||||
|
||||
@@ -30,8 +29,8 @@ src/jtag/drivers/OpenULINK/*.rst
|
||||
*.swp
|
||||
|
||||
src/startup.tcl
|
||||
startup_tcl.inc
|
||||
xscale_debug.inc
|
||||
startup_tcl.c
|
||||
xscale_debug.h
|
||||
|
||||
bin2char
|
||||
bin2char.exe
|
||||
@@ -52,24 +51,27 @@ 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
|
||||
@@ -84,9 +86,6 @@ patches
|
||||
.cproject
|
||||
.settings
|
||||
|
||||
# VSCode stuff
|
||||
.vscode
|
||||
|
||||
# Emacs temp files
|
||||
*~
|
||||
|
||||
@@ -95,22 +94,3 @@ TAGS
|
||||
|
||||
# CScope database files
|
||||
*cscope.out
|
||||
|
||||
# ctags tag files
|
||||
tags
|
||||
|
||||
# GNU Global tag files
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
|
||||
# checkpatch script files
|
||||
.checkpatch-camelcase.*
|
||||
|
||||
# clangd (e.g. for advanced code completion and linting) generates cache files
|
||||
# into .cache
|
||||
.cache
|
||||
|
||||
# A compile_commands.json can be generated using bear and will help tools such
|
||||
# as clangd to locate header files and use correct $CFLAGS
|
||||
compile_commands.json
|
||||
|
||||
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "tools/git2cl"]
|
||||
path = tools/git2cl
|
||||
url = http://repo.or.cz/r/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 = http://repo.or.cz/r/jimtcl.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
|
||||
14
AUTHORS
14
AUTHORS
@@ -1,2 +1,12 @@
|
||||
Please check the source code files and/or Git history for a list of all authors
|
||||
and contributors.
|
||||
Dominic Rath <Dominic.Rath@gmx.de>
|
||||
Magnus Lundin <lundin@mlu.mine.nu>
|
||||
Michael Fischer <fischermi@t-online.de>
|
||||
Spencer Oliver <spen@spen-soft.co.uk>
|
||||
Carsten Schlote <schlote@vahanus.net>
|
||||
Øyvind Harboe <oyvind.harboe@zylin.com>
|
||||
Duane Ellis <openocd@duaneellis.com>
|
||||
Michael Schwingen <michael@schwingen.org>
|
||||
Rick Altherr <kc8apf@users.berlios.de>
|
||||
David Brownell <dbrownell@users.sourceforge.net>
|
||||
Vincint Palatin <vpalatin@users.berlios.de>
|
||||
Zachary T Welch <zw@superlucidity.net>
|
||||
|
||||
4
BUGS
4
BUGS
@@ -6,11 +6,11 @@ posting a message with your report:
|
||||
|
||||
openocd-devel@lists.sourceforge.net
|
||||
|
||||
Also, please check the bug database to see if a ticket for
|
||||
Also, please check the Trac 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/
|
||||
https://sourceforge.net/apps/trac/openocd/
|
||||
|
||||
To minimize work for OpenOCD developers, you should try to include
|
||||
all of the information listed below. If you feel that some of the
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
10
Doxyfile.in
10
Doxyfile.in
@@ -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
|
||||
@@ -313,7 +313,7 @@ EXTRACT_STATIC = YES
|
||||
# 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
280
HACKING
280
HACKING
@@ -1,20 +1,13 @@
|
||||
// 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
|
||||
@b NB! If you're behind a corporate wall with http only access to the
|
||||
world, you can still use these instructions!
|
||||
|
||||
@b NB2! 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
|
||||
@@ -29,89 +22,12 @@ The procedure to create a patch is essentially:
|
||||
- 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
|
||||
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 (this will also help
|
||||
to track down bugs later). All patches should
|
||||
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. 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
|
||||
|
||||
- Sparse Static Analyzer
|
||||
|
||||
Using this tool allows identifying some bug in C code.
|
||||
In the future, OpenOCD would use the sparse attribute 'bitwise' to
|
||||
detect incorrect endianness assignments.
|
||||
|
||||
Example usage:
|
||||
@code
|
||||
mkdir build-sparse; cd build-sparse
|
||||
../configure CC=cgcc CFLAGS="-Wsparse-all -Wno-declaration-after-statement \
|
||||
-Wno-unknown-attribute -Wno-transparent-union -Wno-tautological-compare \
|
||||
-Wno-vla -Wno-flexible-array-array -D__FLT_EVAL_METHOD__=0"
|
||||
make
|
||||
@endcode
|
||||
|
||||
- Code coverage analysis
|
||||
|
||||
By inspecting the code coverage, you can identify potential gaps in your testing
|
||||
and use that information to improve your test scenarios.
|
||||
|
||||
Example usage:
|
||||
@code
|
||||
mkdir build-gcov; cd build-gcov
|
||||
../configure --enable-gcov [...]
|
||||
make
|
||||
# ... Now execute your test scenarios to collect OpenOCD code coverage ...
|
||||
lcov --capture --directory ./src --output-file openocd-coverage.info
|
||||
genhtml openocd-coverage.info --output-directory coverage_report
|
||||
# ... Open coverage_report/index.html in a web browser ...
|
||||
@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.
|
||||
coding style and updating documentation as needed.
|
||||
|
||||
Say in the commit message if it's a bugfix (describe the bug) or a new
|
||||
feature. Don't expect patches to merge immediately
|
||||
@@ -122,7 +38,7 @@ 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
|
||||
-# Create a Gerrit account at: http://openocd.zylin.com
|
||||
- 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.
|
||||
@@ -131,53 +47,40 @@ Add yourself to the GPL copyright for non-trivial changes.
|
||||
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.
|
||||
-# Add an SSH public key following the directions on github:
|
||||
https://help.github.com/articles/generating-ssh-keys
|
||||
-# Clone the git repository, rather than just download the source:
|
||||
@code
|
||||
git clone git://git.code.sf.net/p/openocd/code openocd
|
||||
git clone git://openocd.git.sourceforge.net/gitroot/openocd/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
|
||||
git clone http://repo.or.cz/r/openocd.git
|
||||
@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
|
||||
git remote add review ssh://USERNAME@openocd.zylin.com:29418/openocd.git
|
||||
git config remote.review.push HEAD:refs/publish/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
|
||||
git remote add review http://openocd.zylin.com/p/openocd.git
|
||||
git config remote.review.push HEAD:refs/publish/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:
|
||||
-# You will need to install this hook, we will look into a better solution:
|
||||
@code
|
||||
git remote add review https://USERNAME:PASSWORD@review.openocd.org/p/openocd.git
|
||||
scp -p -P 29418 USERNAME@openocd.zylin.com:hooks/commit-msg .git/hooks/
|
||||
@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 to automatically add the
|
||||
field "Change-Id:" in the commit message, as required by Gerrit.
|
||||
We will look into a better solution:
|
||||
Or with http only:
|
||||
@code
|
||||
wget https://review.openocd.org/tools/hooks/commit-msg
|
||||
wget http://openocd.zylin.com/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:
|
||||
@b NOTE A script exists to simplify the two items above. execute:
|
||||
@code
|
||||
tools/initial.sh <username>
|
||||
@endcode
|
||||
@@ -189,7 +92,7 @@ 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
|
||||
applied seperately and safely to the OpenOCD
|
||||
repository.
|
||||
@code
|
||||
while(!done) {
|
||||
@@ -198,62 +101,23 @@ while(!done) {
|
||||
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
|
||||
@b TIP! use "git add ." before commit to add new files.
|
||||
@code
|
||||
--- example comment, notice the short first line w/topic ---
|
||||
topic: 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: '.
|
||||
longer comments over several
|
||||
lines...
|
||||
<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
|
||||
|
||||
-# When you create a new version of an old patch, check that the new patch
|
||||
keeps the same 'Change-Id:' field of the old patch.
|
||||
This allows the Gerrit server to recognize the patch as a new version of
|
||||
the older one and keeps track of the history and the review process.
|
||||
|
||||
-# Send the patches to the Gerrit server for review:
|
||||
@code
|
||||
git push review
|
||||
@@ -266,77 +130,11 @@ git push review
|
||||
|
||||
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.
|
||||
For errors in the commit message, the special field has to be put in
|
||||
the commit message before the line that produces the error.
|
||||
The special field must be added <em>before</em> the 'Signed-off-by:'
|
||||
line, otherwise it is ignored.
|
||||
To ignore multiple errors, either add multiple lines with the special
|
||||
field or add multiple error types, separated by space or commas, in a
|
||||
single line.
|
||||
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.
|
||||
time oportunity 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
|
||||
@@ -351,22 +149,8 @@ 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.
|
||||
All OpenOCD patches can be reviewed <a href="http://openocd.zylin.com/">here</a>.
|
||||
*/
|
||||
/** @file
|
||||
This file contains the @ref patchguide page.
|
||||
|
||||
@@ -1,409 +0,0 @@
|
||||
Valid-License-Identifier: CC-BY-4.0
|
||||
SPDX-URL: https://spdx.org/licenses/CC-BY-4.0
|
||||
Usage-Guide:
|
||||
Do NOT use on OpenOCD code. This license is not GPL2 compatible. It may only
|
||||
be used for dual-licensed files where the other license is GPL2 compatible.
|
||||
If you end up using this it MUST be used together with a GPL2 compatible
|
||||
license using "OR".
|
||||
To use the Creative Commons Attribution 4.0 International license put
|
||||
the following SPDX tag/value pair into a comment according to the
|
||||
placement guidelines in the licensing rules documentation:
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
License-Text:
|
||||
|
||||
Creative Commons Attribution 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution 4.0 International Public License ("Public License"). To the
|
||||
extent this Public License may be interpreted as a contract, You are
|
||||
granted the Licensed Rights in consideration of Your acceptance of
|
||||
these terms and conditions, and the Licensor grants You such rights in
|
||||
consideration of benefits the Licensor receives from making the
|
||||
Licensed Material available under these terms and conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's
|
||||
License You apply must not prevent recipients of the Adapted
|
||||
Material from complying with this Public License.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the "Licensor." The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
||||
@@ -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,286 +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-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-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. Dual Licensing Only:
|
||||
|
||||
These licenses should only be used to dual license code with another
|
||||
license in addition to a preferred license. These licenses are available
|
||||
from the directory::
|
||||
|
||||
LICENSES/dual/
|
||||
|
||||
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.
|
||||
|
||||
3. 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
|
||||
|
||||
4. 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,130 +0,0 @@
|
||||
Valid-License-Identifier: CC0-1.0
|
||||
SPDX-URL: https://spdx.org/licenses/CC0-1.0.html
|
||||
Usage-Guide:
|
||||
To use the Creative Commons Zero v1.0 Universal License put the following
|
||||
SPDX tag/value pair into a comment according to the placement guidelines in
|
||||
the licensing rules documentation:
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
License-Text:
|
||||
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -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.
|
||||
<https://fsf.org/>
|
||||
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,351 +0,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-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.,
|
||||
<https://fsf.org/>
|
||||
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, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
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,503 +0,0 @@
|
||||
Valid-License-Identifier: LGPL-2.1-only
|
||||
Valid-License-Identifier: LGPL-2.1-or-later
|
||||
SPDX-URL: https://spdx.org/licenses/LGPL-2.1.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 Lesser General Public License (LGPL) version 2.1 only' use:
|
||||
SPDX-License-Identifier: LGPL-2.1-only
|
||||
For 'GNU Lesser General Public License (LGPL) version 2.1 or any later
|
||||
version' use:
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
License-Text:
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 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.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts as
|
||||
the successor of the GNU Library Public License, version 2, hence the
|
||||
version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to
|
||||
share and change it. By contrast, the GNU General Public Licenses are
|
||||
intended to guarantee your freedom to share and change free software--to
|
||||
make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially
|
||||
designated software packages--typically libraries--of the Free Software
|
||||
Foundation and other authors who decide to use it. You can use it too, but
|
||||
we suggest you first think carefully about whether this license or the
|
||||
ordinary General Public License is the better strategy to use in any
|
||||
particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free
|
||||
programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis or for
|
||||
a fee, you must give the recipients all the rights that we gave you. You
|
||||
must make sure that they, too, receive or can get the source code. If you
|
||||
link other code with the library, you must provide complete object files to
|
||||
the recipients, so that they can relink them with the library after making
|
||||
changes to the library and recompiling it. And you must show them these
|
||||
terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there is no
|
||||
warranty for the free library. Also, if the library is modified by someone
|
||||
else and passed on, the recipients should know that what they have is not
|
||||
the original version, so that the original author's reputation will not be
|
||||
affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of any
|
||||
free program. We wish to make sure that a company cannot effectively
|
||||
restrict the users of a free program by obtaining a restrictive license
|
||||
from a patent holder. Therefore, we insist that any patent license obtained
|
||||
for a version of the library must be consistent with the full freedom of
|
||||
use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary GNU
|
||||
General Public License. This license, the GNU Lesser General Public
|
||||
License, applies to certain designated libraries, and is quite different
|
||||
from the ordinary General Public License. We use this license for certain
|
||||
libraries in order to permit linking those libraries into non-free
|
||||
programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a
|
||||
shared library, the combination of the two is legally speaking a combined
|
||||
work, a derivative of the original library. The ordinary General Public
|
||||
License therefore permits such linking only if the entire combination fits
|
||||
its criteria of freedom. The Lesser General Public License permits more lax
|
||||
criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it does
|
||||
Less to protect the user's freedom than the ordinary General Public
|
||||
License. It also provides other free software developers Less of an
|
||||
advantage over competing non-free programs. These disadvantages are the
|
||||
reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage
|
||||
the widest possible use of a certain library, so that it becomes a de-facto
|
||||
standard. To achieve this, non-free programs must be allowed to use the
|
||||
library. A more frequent case is that a free library does the same job as
|
||||
widely used non-free libraries. In this case, there is little to gain by
|
||||
limiting the free library to free software only, so we use the Lesser
|
||||
General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free programs
|
||||
enables a greater number of people to use a large body of free
|
||||
software. For example, permission to use the GNU C Library in non-free
|
||||
programs enables many more people to use the whole GNU operating system, as
|
||||
well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the users'
|
||||
freedom, it does ensure that the user of a program that is linked with the
|
||||
Library has the freedom and the wherewithal to run that program using a
|
||||
modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow. Pay close attention to the difference between a "work based on the
|
||||
library" and a "work that uses the library". The former contains code
|
||||
derived from the library, whereas the latter must be combined with the
|
||||
library in order to run.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other program
|
||||
which contains a notice placed by the copyright holder or other
|
||||
authorized party saying it may be distributed under the terms of this
|
||||
Lesser General Public License (also called "this License"). Each
|
||||
licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work which
|
||||
has been distributed under these terms. A "work based on the Library"
|
||||
means either the Library or any derivative work under copyright law:
|
||||
that is to say, a work containing the Library or a portion of it, either
|
||||
verbatim or with modifications and/or translated straightforwardly into
|
||||
another language. (Hereinafter, translation is included without
|
||||
limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for making
|
||||
modifications to it. For a library, 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 library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of running
|
||||
a program using the Library is not restricted, and output from such a
|
||||
program is covered only if its contents constitute a work based on the
|
||||
Library (independent of the use of the Library in a tool for writing
|
||||
it). Whether that is true depends on what the Library does and what the
|
||||
program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's complete
|
||||
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
|
||||
distribute a copy of this License along with the Library.
|
||||
|
||||
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 Library or any portion of it,
|
||||
thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices stating
|
||||
that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no charge to
|
||||
all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a table
|
||||
of data to be supplied by an application program that uses the
|
||||
facility, other than as an argument passed when the facility is
|
||||
invoked, then you must make a good faith effort to ensure that, in
|
||||
the event an application does not supply such function or table, the
|
||||
facility still operates, and performs whatever part of its purpose
|
||||
remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has a
|
||||
purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must be
|
||||
optional: if the application does not supply it, the square root
|
||||
function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library, 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 Library, 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 Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of a
|
||||
storage or distribution medium does not bring the other work under the
|
||||
scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so that
|
||||
they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in these
|
||||
notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for that
|
||||
copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the
|
||||
Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative of
|
||||
it, under Section 2) in object code or executable form under the terms
|
||||
of Sections 1 and 2 above provided that you 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.
|
||||
|
||||
If distribution of 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 satisfies the requirement to distribute the
|
||||
source code, even though third parties are not compelled to copy the
|
||||
source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library, but
|
||||
is designed to work with the Library by being compiled or linked with
|
||||
it, is called a "work that uses the Library". Such a work, in isolation,
|
||||
is not a derivative work of the Library, and therefore falls outside the
|
||||
scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library creates
|
||||
an executable that is a derivative of the Library (because it contains
|
||||
portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License. Section 6
|
||||
states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is
|
||||
not. Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure
|
||||
layouts and accessors, and small macros and small inline functions (ten
|
||||
lines or less in length), then the use of the object file is
|
||||
unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section
|
||||
6. Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link a
|
||||
"work that uses the Library" with the Library to produce a work
|
||||
containing portions of the Library, and distribute that work under terms
|
||||
of your choice, provided that the terms permit modification of the work
|
||||
for the customer's own use and reverse engineering for debugging such
|
||||
modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work during
|
||||
execution displays copyright notices, you must include the copyright
|
||||
notice for the Library among them, as well as a reference directing the
|
||||
user to the copy of this License. Also, you must do one of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding machine-readable
|
||||
source code for the Library including whatever changes were used in
|
||||
the work (which must be distributed under Sections 1 and 2 above);
|
||||
and, if the work is an executable linked with the Library, with the
|
||||
complete machine-readable "work that uses the Library", as object
|
||||
code and/or source code, so that the user can modify the Library and
|
||||
then relink to produce a modified executable containing the modified
|
||||
Library. (It is understood that the user who changes the contents of
|
||||
definitions files in the Library will not necessarily be able to
|
||||
recompile the application to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a copy
|
||||
of the library already present on the user's computer system, rather
|
||||
than copying library functions into the executable, and (2) will
|
||||
operate properly with a modified version of the library, if the user
|
||||
installs one, as long as the modified version is interface-compatible
|
||||
with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least three
|
||||
years, to give the same user the materials specified in Subsection
|
||||
6a, above, for a charge no more than the cost of performing this
|
||||
distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy from a
|
||||
designated place, offer equivalent access to copy the above specified
|
||||
materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these materials
|
||||
or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the Library"
|
||||
must include any data and utility programs needed for reproducing the
|
||||
executable from it. However, as a special exception, the materials to be
|
||||
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.
|
||||
|
||||
It may happen that this requirement contradicts the license restrictions
|
||||
of other proprietary libraries that do not normally accompany the
|
||||
operating system. Such a contradiction means you cannot use both them
|
||||
and the Library together in an executable that you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the Library
|
||||
side-by-side in a single library together with other library facilities
|
||||
not covered by this License, and distribute such a combined library,
|
||||
provided that the separate distribution of the work based on the Library
|
||||
and of the other library facilities is otherwise permitted, and provided
|
||||
that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on
|
||||
the Library, uncombined with any other library facilities. This must
|
||||
be distributed under the terms of the Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact that part
|
||||
of it is a work based on the Library, and explaining where to find
|
||||
the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the
|
||||
Library except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, link with, or distribute the
|
||||
Library 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.
|
||||
|
||||
9. 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 Library or its derivative works. These actions are prohibited by law
|
||||
if you do not accept this License. Therefore, by modifying or
|
||||
distributing the Library (or any work based on the Library), you
|
||||
indicate your acceptance of this License to do so, and all its terms and
|
||||
conditions for copying, distributing or modifying the Library or works
|
||||
based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
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 with this License.
|
||||
|
||||
11. 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 Library at all. For example, if a patent license
|
||||
would not permit royalty-free redistribution of the Library 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 Library.
|
||||
|
||||
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.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original
|
||||
copyright holder who places the Library 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.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new versions of
|
||||
the Lesser 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 Library
|
||||
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 Library does not specify a license
|
||||
version number, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
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
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE LIBRARY "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 LIBRARY IS WITH
|
||||
YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
||||
NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. 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 LIBRARY 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 LIBRARY
|
||||
(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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. 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 library's name and an idea of what it does.
|
||||
Copyright (C) year name of author
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This library 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 Lesser General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in
|
||||
the library `Frob' (a library for tweaking knobs) written
|
||||
by James Random Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
That's all there is to it!
|
||||
@@ -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,189 +0,0 @@
|
||||
Valid-License-Identifier: Apache-2.0
|
||||
SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
|
||||
Usage-Guide:
|
||||
Do NOT use on OpenOCD code. The Apache-2.0 is not GPL2 compatible. It may only
|
||||
be used for dual-licensed files where the other license is GPL2 compatible.
|
||||
If you end up using this it MUST be used together with a GPL2 compatible
|
||||
license using "OR".
|
||||
It may also be used for stand-alone code NOT linked within the OpenOCD binary
|
||||
but distributed with OpenOCD.
|
||||
To use the Apache License version 2.0 put the following SPDX tag/value
|
||||
pair into a comment according to the placement guidelines in the
|
||||
licensing rules documentation:
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
License-Text:
|
||||
|
||||
Apache License
|
||||
|
||||
Version 2.0, January 2004
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the
|
||||
copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other
|
||||
entities that control, are controlled by, or are under common control with
|
||||
that entity. For the purposes of this definition, "control" means (i) the
|
||||
power, direct or indirect, to cause the direction or management of such
|
||||
entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation source,
|
||||
and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation
|
||||
or translation of a Source form, including but not limited to compiled
|
||||
object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form,
|
||||
made available under the License, as indicated by a copyright notice that
|
||||
is included in or attached to the work (an example is provided in the
|
||||
Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form,
|
||||
that is based on (or derived from) the Work and for which the editorial
|
||||
revisions, annotations, elaborations, or other modifications represent, as
|
||||
a whole, an original work of authorship. For the purposes of this License,
|
||||
Derivative Works shall not include works that remain separable from, or
|
||||
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
||||
Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original
|
||||
version of the Work and any modifications or additions to that Work or
|
||||
Derivative Works thereof, that is intentionally submitted to Licensor for
|
||||
inclusion in the Work by the copyright owner or by an individual or Legal
|
||||
Entity authorized to submit on behalf of the copyright owner. For the
|
||||
purposes of this definition, "submitted" means any form of electronic,
|
||||
verbal, or written communication sent to the Licensor or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Licensor for the purpose of discussing
|
||||
and improving the Work, but excluding communication that is conspicuously
|
||||
marked or otherwise designated in writing by the copyright owner as "Not a
|
||||
Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on
|
||||
behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
License, each Contributor hereby grants to You a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
||||
reproduce, prepare Derivative Works of, publicly display, publicly
|
||||
perform, sublicense, and distribute the Work and such Derivative Works
|
||||
in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
License, each Contributor hereby grants to You a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
|
||||
this section) patent license to make, have made, use, offer to sell,
|
||||
sell, import, and otherwise transfer the Work, where such license
|
||||
applies only to those patent claims licensable by such Contributor that
|
||||
are necessarily infringed by their Contribution(s) alone or by
|
||||
combination of their Contribution(s) with the Work to which such
|
||||
Contribution(s) was submitted. If You institute patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that the Work or a Contribution incorporated within
|
||||
the Work constitutes direct or contributory patent infringement, then
|
||||
any patent licenses granted to You under this License for that Work
|
||||
shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or
|
||||
Derivative Works thereof in any medium, with or without modifications,
|
||||
and in Source or Object form, provided that You meet the following
|
||||
conditions:
|
||||
|
||||
a. You must give any other recipients of the Work or Derivative Works a
|
||||
copy of this License; and
|
||||
|
||||
b. You must cause any modified files to carry prominent notices stating
|
||||
that You changed the files; and
|
||||
|
||||
c. You must retain, in the Source form of any Derivative Works that You
|
||||
distribute, all copyright, patent, trademark, and attribution notices
|
||||
from the Source form of the Work, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works; and
|
||||
|
||||
d. If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained within
|
||||
such NOTICE file, excluding those notices that do not pertain to any
|
||||
part of the Derivative Works, in at least one of the following
|
||||
places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if
|
||||
provided along with the Derivative Works; or, within a display
|
||||
generated by the Derivative Works, if and wherever such third-party
|
||||
notices normally appear. The contents of the NOTICE file are for
|
||||
informational purposes only and do not modify the License. You may
|
||||
add Your own attribution notices within Derivative Works that You
|
||||
distribute, alongside or as an addendum to the NOTICE text from the
|
||||
Work, provided that such additional attribution notices cannot be
|
||||
construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may
|
||||
provide additional or different license terms and conditions for use,
|
||||
reproduction, or distribution of Your modifications, or for any such
|
||||
Derivative Works as a whole, provided Your use, reproduction, and
|
||||
distribution of the Work otherwise complies with the conditions stated
|
||||
in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
||||
Contribution intentionally submitted for inclusion in the Work by You to
|
||||
the Licensor shall be under the terms and conditions of this License,
|
||||
without any additional terms or conditions. Notwithstanding the above,
|
||||
nothing herein shall supersede or modify the terms of any separate
|
||||
license agreement you may have executed with Licensor regarding such
|
||||
Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
|
||||
in writing, Licensor provides the Work (and each Contributor provides
|
||||
its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
OF ANY KIND, either express or implied, including, without limitation,
|
||||
any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
|
||||
responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your
|
||||
exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether
|
||||
in tort (including negligence), contract, or otherwise, unless required
|
||||
by applicable law (such as deliberate and grossly negligent acts) or
|
||||
agreed to in writing, shall any Contributor be liable to You for
|
||||
damages, including any direct, indirect, special, incidental, or
|
||||
consequential damages of any character arising as a result of this
|
||||
License or out of the use or inability to use the Work (including but
|
||||
not limited to damages for loss of goodwill, work stoppage, computer
|
||||
failure or malfunction, or any and all other commercial damages or
|
||||
losses), even if such Contributor has been advised of the possibility of
|
||||
such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the
|
||||
Work or Derivative Works thereof, You may choose to offer, and charge a
|
||||
fee for, acceptance of support, warranty, indemnity, or other liability
|
||||
obligations and/or rights consistent with this License. However, in
|
||||
accepting such obligations, You may act only on Your own behalf and on
|
||||
Your sole responsibility, not on behalf of any other Contributor, and
|
||||
only if You agree to indemnify, defend, and hold each Contributor
|
||||
harmless for any liability incurred by, or claims asserted against, such
|
||||
Contributor by reason of your accepting any such warranty or additional
|
||||
liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -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>.
|
||||
128
Makefile.am
128
Makefile.am
@@ -1,92 +1,33 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.14
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
# not a GNU package. You can remove this line, if
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = gnu 1.6
|
||||
|
||||
# make sure we pass the correct jimtcl flags to distcheck
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
|
||||
|
||||
# do not run Jim Tcl tests (esp. during distcheck)
|
||||
check-recursive: SUBDIRS := $(SUBDIRS:jimtcl=)
|
||||
DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
|
||||
|
||||
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
|
||||
|
||||
SUBDIRS =
|
||||
DIST_SUBDIRS =
|
||||
bin_PROGRAMS =
|
||||
noinst_LTLIBRARIES =
|
||||
info_TEXINFOS =
|
||||
dist_man_MANS =
|
||||
EXTRA_DIST =
|
||||
DISTCLEANFILES =
|
||||
contrib/openocd.udev
|
||||
|
||||
if INTERNAL_JIMTCL
|
||||
SUBDIRS += jimtcl
|
||||
DIST_SUBDIRS += jimtcl
|
||||
EXTRA_DIST += jimtcl/configure.gnu
|
||||
# jimtcl from 0.79 to 0.82 miss cleaning jsmn.o
|
||||
DISTCLEANFILES += jimtcl/jsmn/jsmn.o
|
||||
endif
|
||||
|
||||
SUBDIRS += testing
|
||||
DIST_SUBDIRS += testing
|
||||
|
||||
# common flags used in openocd build
|
||||
AM_CFLAGS = $(GCC_WARNINGS)
|
||||
AM_LDFLAGS =
|
||||
|
||||
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
|
||||
SUBDIRS = jimtcl
|
||||
else
|
||||
AM_CPPFLAGS += $(JIMTCL_CFLAGS)
|
||||
SUBDIRS =
|
||||
endif
|
||||
|
||||
if USE_GCOV
|
||||
AM_CFLAGS += --coverage
|
||||
AM_LDFLAGS += --coverage
|
||||
endif
|
||||
SUBDIRS += src doc
|
||||
|
||||
EXTRA_DIST += \
|
||||
EXTRA_DIST = \
|
||||
BUGS \
|
||||
HACKING \
|
||||
NEWTAPS \
|
||||
README.Windows.md \
|
||||
README.macOS.md \
|
||||
$(EXTRA_DIST_NEWS) \
|
||||
README.Win32 \
|
||||
Doxyfile.in \
|
||||
LICENSES/license-rules.txt \
|
||||
LICENSES/dual/CC-BY-4.0 \
|
||||
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/CC0-1.0 \
|
||||
LICENSES/preferred/GFDL-1.2 \
|
||||
LICENSES/preferred/gfdl-1.2.texi.readme \
|
||||
LICENSES/preferred/GPL-2.0 \
|
||||
LICENSES/preferred/LGPL-2.1 \
|
||||
LICENSES/preferred/MIT \
|
||||
LICENSES/stand-alone/Apache-2.0 \
|
||||
LICENSES/stand-alone/GPL-3.0 \
|
||||
tools/logger.pl \
|
||||
tools/rlink_make_speed_table \
|
||||
tools/st7_dtc_as \
|
||||
contrib
|
||||
contrib/loaders
|
||||
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
$(SHELL) ./config.status --recheck
|
||||
@@ -125,13 +66,9 @@ TCL_PATH = tcl
|
||||
TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
|
||||
sed -e 's,^$(srcdir)/$(TCL_PATH),,'
|
||||
|
||||
# The git log command below generates many empty text lines with only some space characters
|
||||
# for indentation purposes, so use sed to trim all trailing whitespace.
|
||||
dist-hook:
|
||||
if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
|
||||
git --git-dir $(srcdir)/.git log --date=short --pretty="format:%ad %aN <%aE>%n%n%w(0,4,6)* %B" \
|
||||
| sed 's/[[:space:]]*$$//' > $(distdir)/ChangeLog.tmp && \
|
||||
mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
|
||||
git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
|
||||
fi
|
||||
for i in $$($(TCL_FILES)); do \
|
||||
j="$(distdir)/$(TCL_PATH)/$$i" && \
|
||||
@@ -151,30 +88,21 @@ uninstall-hook:
|
||||
|
||||
distclean-local:
|
||||
rm -rf Doxyfile doxygen
|
||||
-rm -f $(srcdir)/jimtcl/configure.gnu
|
||||
|
||||
DISTCLEANFILES += doxygen.log
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
BUILT_SOURCES =
|
||||
CLEANFILES =
|
||||
rm -f $(srcdir)/jimtcl/configure.gnu
|
||||
|
||||
DISTCLEANFILES = doxygen.log
|
||||
|
||||
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
|
||||
|
||||
45
NEWS
45
NEWS
@@ -1,31 +1,50 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
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:
|
||||
|
||||
Server Layer:
|
||||
|
||||
RTOS:
|
||||
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:
|
||||
|
||||
|
||||
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.x.0/log/?path=
|
||||
|
||||
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>).
|
||||
|
||||
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).
|
||||
132
NEWS-0.12.0
132
NEWS-0.12.0
@@ -1,132 +0,0 @@
|
||||
This file includes highlights of the changes made in the OpenOCD
|
||||
source archive release.
|
||||
|
||||
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
|
||||
|
||||
Boundary Scan:
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Documentation:
|
||||
|
||||
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 JEP106BF.01
|
||||
* 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/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).
|
||||
@@ -71,3 +71,4 @@ For older NEWS, see the NEWS files associated with each release
|
||||
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).
|
||||
2
NEWTAPS
2
NEWTAPS
@@ -77,7 +77,7 @@ 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
|
||||
each one individually - ORDER is important!
|
||||
|
||||
456
README
Normal file
456
README
Normal file
@@ -0,0 +1,456 @@
|
||||
Welcome to OpenOCD!
|
||||
===================
|
||||
|
||||
OpenOCD provides on-chip programming and debugging support with a
|
||||
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:
|
||||
- how to find and build more OpenOCD documentation,
|
||||
- the build process
|
||||
- packaging tips.
|
||||
- configuration options
|
||||
|
||||
=====================
|
||||
OpenOCD Documentation
|
||||
=====================
|
||||
|
||||
In addition to in-tree documentation, the latest documentation may be
|
||||
viewed on-line at the following URLs:
|
||||
|
||||
OpenOCD User's Guide:
|
||||
http://openocd.sourceforge.net/doc/html/index.html
|
||||
|
||||
OpenOCD Developer's Manual:
|
||||
http://openocd.sourceforge.net/doc/doxygen/html/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
|
||||
|
||||
Building the OpenOCD Documentation
|
||||
----------------------------------
|
||||
|
||||
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
|
||||
|
||||
# If HTMLVIEWER is set, this creates and views the HTML User Guide.
|
||||
make html && ${HTMLVIEWER} doc/openocd.html/index.html
|
||||
|
||||
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
|
||||
|
||||
# If HTMLVIEWER is set, this views the HTML Doxygen output.
|
||||
${HTMLVIEWER} doxygen/index.html
|
||||
|
||||
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/openocd.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
|
||||
-----------------------
|
||||
|
||||
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.
|
||||
|
||||
Users of these binary versions of OpenOCD must contact their Packager to
|
||||
ask for support or newer versions of the binaries; the OpenOCD
|
||||
developers do not support packages directly.
|
||||
|
||||
A Note to OpenOCD Packagers
|
||||
---------------------------
|
||||
|
||||
You are a PACKAGER of OpenOCD if you:
|
||||
|
||||
- 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
|
||||
prevent hundreds (if not thousands) of other questions from other users.
|
||||
|
||||
If something does not work for you, please work to inform the OpenOCD
|
||||
developers know how to improve the system or documentation to avoid
|
||||
future problems, and follow-up to help us ensure the issue will be fully
|
||||
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.
|
||||
- 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 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.
|
||||
|
||||
OpenOCD Dependencies
|
||||
--------------------
|
||||
|
||||
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.
|
||||
|
||||
Also, you need to install the appropriate driver files, if you want to
|
||||
build support for a USB or FTDI-based interface:
|
||||
|
||||
- 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.
|
||||
|
||||
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 (on both Linux and Cygwin), use the following sequence
|
||||
of commands:
|
||||
|
||||
./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.
|
||||
|
||||
Cross-Compiling Options
|
||||
-----------------------
|
||||
|
||||
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 --build=i686-pc-linux-gnu --host=i586-mingw32msvc ...
|
||||
|
||||
Likewise, the following options allow OpenOCD to be cross-compiled for
|
||||
an ARM target on the same x86 host:
|
||||
|
||||
./configure --build=i686-pc-linux-gnu --host=arm-elf ...
|
||||
|
||||
Both must be specified to work around bugs in autoconf.
|
||||
|
||||
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:
|
||||
|
||||
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-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-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-usb_blaster_libftdi
|
||||
Enable building support for the Altera USB-Blaster
|
||||
using the libftdi driver, opensource alternate of
|
||||
FTD2XX
|
||||
--enable-usb_blaster_ftd2xx
|
||||
Enable building support for the Altera USB-Blaster
|
||||
using the FTD2XX driver from ftdichip.com
|
||||
|
||||
--enable-amtjtagaccel Enable building the Amontec JTAG-Accelerator driver
|
||||
|
||||
--enable-zy1000-master Use ZY1000 JTAG master registers
|
||||
--enable-zy1000 Enable ZY1000 interface
|
||||
|
||||
--enable-ioutil Enable ioutil functions - useful for standalone
|
||||
OpenOCD implementations
|
||||
|
||||
--enable-ep93xx Enable building support for EP93xx based SBCs
|
||||
|
||||
--enable-at91rm9200 Enable building support for AT91RM9200 based SBCs
|
||||
|
||||
--enable-gw16012 Enable building support for the Gateworks GW16012
|
||||
JTAG Programmer
|
||||
|
||||
--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-usbprog Enable building support for the usbprog JTAG
|
||||
Programmer
|
||||
|
||||
--enable-oocd_trace Enable building support for some prototype
|
||||
OpenOCD+trace ETM capture hardware
|
||||
|
||||
--enable-jlink Enable building support for the Segger J-Link JTAG
|
||||
Programmer
|
||||
|
||||
--enable-vsllink Enable building support for the Versaloon-Link JTAG
|
||||
Programmer
|
||||
|
||||
--enable-rlink Enable building support for the Raisonance RLink
|
||||
JTAG Programmer
|
||||
--enable-ulink Enable building support for the Keil ULINK JTAG
|
||||
Programmer
|
||||
--enable-arm-jtag-ew Enable building support for the Olimex ARM-JTAG-EW
|
||||
Programmer
|
||||
|
||||
--enable-buspirate Enable building support for the Buspirate
|
||||
|
||||
--enable-stlink Enable building support for the ST-Link JTAG
|
||||
Programmer
|
||||
|
||||
--enable-osbdm Enable building support for the OSBDM (JTAG only)
|
||||
Programmer
|
||||
|
||||
--enable-opendous Enable building support for the estick/opendous JTAG
|
||||
Programmer
|
||||
|
||||
--enable-minidriver-dummy
|
||||
Enable the dummy minidriver.
|
||||
|
||||
--disable-internal-jimtcl
|
||||
Disable building internal jimtcl
|
||||
--enable-libusb0 Use libusb-0.1 library for USB JTAG devices
|
||||
--enable-remote-bitbang Enable building support for the Remote Bitbang jtag
|
||||
driver
|
||||
|
||||
--disable-doxygen-html Disable building Doxygen manual as HTML.
|
||||
--enable-doxygen-pdf Enable building Doxygen manual as PDF.
|
||||
|
||||
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
|
||||
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
|
||||
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), use libftdi version 0.17 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'' convenient. 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
|
||||
==========================
|
||||
|
||||
You can download the current GIT version with a GIT client of your
|
||||
choice from the main repository:
|
||||
|
||||
git://openocd.git.sourceforge.net/gitroot/openocd/openocd
|
||||
|
||||
You may prefer to use a mirror:
|
||||
|
||||
http://repo.or.cz/r/openocd.git
|
||||
git://repo.or.cz/openocd.git
|
||||
|
||||
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://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:
|
||||
|
||||
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,44 +0,0 @@
|
||||
# OpenOCD for Windows
|
||||
|
||||
This README contains instructions that are specific to Windows.
|
||||
|
||||
## Building
|
||||
|
||||
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](README.md) 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.
|
||||
|
||||
## 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: <https://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:
|
||||
|
||||
- <https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings>
|
||||
- <https://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm>
|
||||
@@ -1,72 +0,0 @@
|
||||
# OpenOCD for macOS
|
||||
|
||||
This README contains instructions that are specific to macOS.
|
||||
|
||||
## Building
|
||||
|
||||
There are a few prerequisites you will need first:
|
||||
|
||||
- Xcode (install from the AppStore)
|
||||
- Command Line Tools (install from Xcode -> Preferences -> Downloads)
|
||||
- One of the following tools:
|
||||
- Gentoo Prefix (<https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap>)
|
||||
- Homebrew (<https://brew.sh/>)
|
||||
- MacPorts (<https://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:
|
||||
|
||||
```sh
|
||||
brew install [--HEAD] open-ocd
|
||||
```
|
||||
|
||||
Where ``--HEAD`` asks ``brew`` to install the current Git version instead of the
|
||||
lastest release.
|
||||
|
||||
You can also run:
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
```sh
|
||||
LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
|
||||
```
|
||||
|
||||
See [README](README.md) 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:
|
||||
|
||||
```sh
|
||||
sudo kextunload -b com.apple.driver.AppleUSBFTDI
|
||||
```
|
||||
|
||||
for FTDI vendor driver use:
|
||||
|
||||
```sh
|
||||
sudo kextunload FTDIUSBSerialDriver.kext
|
||||
```
|
||||
|
||||
To learn more on the topic please refer to the official libusb FAQ: <https://github.com/libusb/libusb/wiki/FAQ>
|
||||
359
README.md
359
README.md
@@ -1,359 +0,0 @@
|
||||
# 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).
|
||||
|
||||
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,
|
||||
- packaging tips.
|
||||
|
||||
## Quickstart for the impatient
|
||||
|
||||
If you have a popular board then just start OpenOCD with its config,
|
||||
e.g.:
|
||||
|
||||
```sh
|
||||
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.:
|
||||
|
||||
```sh
|
||||
openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
|
||||
-f target/ti/calypso.cfg
|
||||
```
|
||||
|
||||
```sh
|
||||
openocd -f interface/stlink.cfg -c "transport select swd" \
|
||||
-f target/stm32l0.cfg
|
||||
```
|
||||
|
||||
After OpenOCD startup, connect GDB with
|
||||
|
||||
```gdb
|
||||
(gdb) target extended-remote localhost:3333
|
||||
```
|
||||
|
||||
## Installing OpenOCD
|
||||
|
||||
The easiest way to install OpenOCD is through your operating system's package
|
||||
manager.
|
||||
|
||||
- Debian / Ubuntu
|
||||
|
||||
```sh
|
||||
sudo apt install openocd
|
||||
```
|
||||
|
||||
- Fedora
|
||||
|
||||
```sh
|
||||
sudo dnf install openocd
|
||||
```
|
||||
|
||||
- macOS (via Homebrew)
|
||||
|
||||
```sh
|
||||
brew install open-ocd
|
||||
```
|
||||
|
||||
- Windows (via MSYS2)
|
||||
|
||||
```sh
|
||||
pacman -S mingw-w64-x86_64-openocd
|
||||
```
|
||||
|
||||
These packages are often more stable than the bleeding-edge Git mainline, where
|
||||
active development happens.
|
||||
"Packagers" create binary releases of OpenOCD after the developers publish new
|
||||
source code releases.
|
||||
Older OpenOCD versions are not suitable for diagnosing issues in the current
|
||||
release.
|
||||
Users should stay in touch with their distribution maintainers or interface
|
||||
vendors to ensure that appropriate updates are provided regularly.
|
||||
|
||||
If you use one of these binary packages, you must contact the Packager for
|
||||
support or for newer binary versions.
|
||||
The OpenOCD developers do not provide direct support for packaged binaries.
|
||||
|
||||
## 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).
|
||||
|
||||
As a PACKAGER, you will experience first reports of most issues.
|
||||
When you fix those problems for your users, your solution may help
|
||||
prevent hundreds (if not thousands) of other questions from other users.
|
||||
|
||||
If something does not work for you, please work to inform the OpenOCD
|
||||
developers know how to improve the system or documentation to avoid
|
||||
future problems, and follow-up to help us ensure the issue will be fully
|
||||
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.
|
||||
|
||||
## OpenOCD Documentation
|
||||
|
||||
In addition to the in-tree documentation, the latest manuals may be
|
||||
viewed online at the following URLs:
|
||||
|
||||
- OpenOCD User's Guide: <http://openocd.org/doc/html/index.html>
|
||||
|
||||
- OpenOCD Developer's Manual: <http://openocd.org/doc/doxygen/html/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
|
||||
|
||||
### 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:
|
||||
|
||||
If `PDFVIEWER` is set, this creates and views the PDF User Guide.
|
||||
|
||||
```sh
|
||||
make pdf && ${PDFVIEWER} doc/openocd.pdf
|
||||
```
|
||||
|
||||
If `HTMLVIEWER` is set, this creates and views the HTML User Guide.
|
||||
|
||||
```sh
|
||||
make html && ${HTMLVIEWER} doc/openocd.html/index.html
|
||||
```
|
||||
|
||||
The OpenOCD Developer Manual contains information about the internal
|
||||
architecture and other details about the code:
|
||||
|
||||
Note: make sure doxygen is installed, type doxygen --version
|
||||
|
||||
```sh
|
||||
make doxygen && ${HTMLVIEWER} doxygen/index.html
|
||||
```
|
||||
|
||||
## Supported hardware
|
||||
|
||||
### JTAG adapters
|
||||
|
||||
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, 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.
|
||||
|
||||
## 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.
|
||||
|
||||
Note: if the INSTALL file is not present, it means you are using the
|
||||
source code from a development branch, not from an OpenOCD release.
|
||||
In this case, follow the instructions 'Compiling OpenOCD' below and
|
||||
the file will be created by the first command `./bootstrap`.
|
||||
|
||||
The remainder of this document tries to provide some instructions for
|
||||
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.
|
||||
|
||||
You'll also need:
|
||||
|
||||
- make
|
||||
- libtool
|
||||
- pkg-config >= 0.23 or pkgconf
|
||||
- libjim >= 0.79
|
||||
|
||||
Additionally, for building from Git:
|
||||
|
||||
- autoconf >= 2.69
|
||||
- automake >= 1.14
|
||||
- texinfo >= 5.0
|
||||
|
||||
Optional USB-based adapter drivers need libusb-1.0.
|
||||
|
||||
Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter drivers need
|
||||
[libftdi](http://www.intra2net.com/en/developer/libftdi/index.php) library.
|
||||
|
||||
Optional CMSIS-DAP adapter driver needs HIDAPI library.
|
||||
|
||||
Optional linuxgpiod adapter driver needs libgpiod library.
|
||||
|
||||
Optional J-Link adapter driver needs libjaylink library.
|
||||
|
||||
Optional ARM disassembly needs capstone library.
|
||||
|
||||
Optional development script checkpatch needs:
|
||||
|
||||
- perl
|
||||
- python
|
||||
- python-ply
|
||||
- pymarkdownlnt
|
||||
|
||||
### Compiling OpenOCD
|
||||
|
||||
To build OpenOCD, use the following sequence of commands:
|
||||
|
||||
```sh
|
||||
./bootstrap
|
||||
./configure [options]
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
The `bootstrap` command is only necessary when building from the Git repository.
|
||||
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 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:
|
||||
|
||||
```sh
|
||||
./configure --host=i686-w64-mingw32 [options]
|
||||
```
|
||||
|
||||
To make pkg-config work nicely for cross-compiling, you might need an additional
|
||||
wrapper script as described at <https://autotools.io/pkgconfig/cross-compiling.html>.
|
||||
|
||||
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.
|
||||
|
||||
For a more or less complete script that does all this for you, see `contrib/cross-build.sh`.
|
||||
|
||||
### 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.
|
||||
|
||||
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.
|
||||
|
||||
### 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`
|
||||
|
||||
You may prefer to use a mirror:
|
||||
|
||||
- <http://repo.or.cz/r/openocd.git>
|
||||
- git://repo.or.cz/openocd.git
|
||||
|
||||
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):
|
||||
|
||||
```sh
|
||||
git clone git://git.code.sf.net/p/openocd/code 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: <http://repo.or.cz/w/openocd.git>.
|
||||
|
||||
Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
|
||||
each at this writing.
|
||||
|
||||
## 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.
|
||||
63
TODO
63
TODO
@@ -12,14 +12,14 @@ may have evolved an idea since it was added here.
|
||||
|
||||
Feel free to send patches to add or clarify items on this list, too.
|
||||
|
||||
@section thelisttcl Tcl
|
||||
@section thelisttcl TCL
|
||||
|
||||
This section provides possible things to improve with OpenOCD's Tcl support.
|
||||
This section provides possible things to improve with OpenOCD's TCL support.
|
||||
|
||||
- Fix problem with incorrect line numbers reported for a syntax
|
||||
error in a reset init event.
|
||||
|
||||
- organize the Tcl configurations:
|
||||
- organize the TCL configurations:
|
||||
- provide more directory structure for boards/targets?
|
||||
- factor configurations into layers (encapsulation and re-use)
|
||||
|
||||
@@ -27,41 +27,21 @@ 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:
|
||||
- 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.
|
||||
- Allow full Tcl support? add --with-tcl=/path/to/installed/tcl
|
||||
- Move Tcl support out of foo.[ch] and into foo_tcl.[ch] (other ideas?)
|
||||
- Allow full TCL support? add --with-tcl=/path/to/installed/tcl
|
||||
- Move TCL support out of foo.[ch] and into foo_tcl.[ch] (other ideas?)
|
||||
- See src/jtag/core.c and src/jtag/tcl.c for an example.
|
||||
- allow some of these Tcl command modules to be dynamically loadable?
|
||||
- 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"
|
||||
|
||||
@subsection thelistadapterjtagcore JTAG Core
|
||||
@subsection thelistjtagcore JTAG Core
|
||||
|
||||
The following tasks have been suggested for cleaning up the JTAG layer:
|
||||
|
||||
@@ -75,7 +55,7 @@ directly in minidriver API for better embedded host performance.
|
||||
|
||||
The following tasks have been suggested for adding new core JTAG support:
|
||||
|
||||
- Improve autodetection of TAPs by supporting Tcl escape procedures that
|
||||
- Improve autodetection of TAPs by supporting tcl escape procedures that
|
||||
can configure discovered TAPs based on IDCODE value ... they could:
|
||||
- Remove guessing for irlen
|
||||
- Allow non-default irmask/ircapture values
|
||||
@@ -83,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
|
||||
@@ -113,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.
|
||||
|
||||
@@ -127,13 +110,17 @@ 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?
|
||||
- add BSDL support?
|
||||
|
||||
A few possible options for the above:
|
||||
-# Fake a Tcl equivalent?
|
||||
-# Fake a TCL equivalent?
|
||||
-# Integrate an existing library?
|
||||
-# Write a new C implementation a la Jim?
|
||||
|
||||
@@ -183,9 +170,9 @@ https://lists.berlios.de/pipermail/openocd-development/2009-October/011506.html
|
||||
garabage.
|
||||
- implement missing functionality (grep FNC_INFO_NOTIMPLEMENTED ...)
|
||||
- Thumb2 single stepping: ARM1156T2 needs simulator support
|
||||
- Cortex-A8 support (ML)
|
||||
- Cortex A8 support (ML)
|
||||
- add target implementation (ML)
|
||||
- Cortex-M3 support
|
||||
- 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
|
||||
@@ -200,6 +187,8 @@ https://lists.berlios.de/pipermail/openocd-development/2009-October/011506.html
|
||||
- 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)
|
||||
- AT91SAM92xx:
|
||||
- improvements for unknown-board-atmel-at91sam9260.cfg (RD)
|
||||
- STR9x: (ZW)
|
||||
- improvements to str912.cfg to be more general purpose
|
||||
- AVR: (SQ)
|
||||
@@ -379,6 +368,7 @@ to complete:
|
||||
- committing to git
|
||||
- Review Users' Guide for documentation errors or omissions
|
||||
- "capture" and "ocd_find" commands
|
||||
- "ocd_" prefix on various stuff
|
||||
- Update Developer's Manual (doxygen output)
|
||||
- Add documentation describing the architecture of each module
|
||||
- Provide more Technical Primers to bootstrap contributor knowledge
|
||||
@@ -387,3 +377,4 @@ to complete:
|
||||
/** @file
|
||||
This file contains the @ref thelist page.
|
||||
*/
|
||||
|
||||
|
||||
62
bootstrap
62
bootstrap
@@ -1,10 +1,8 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Run the autotools bootstrap sequence to create the configure script
|
||||
|
||||
set -e # Abort execution on error.
|
||||
set -u # Abort if you reference an undefined variable.
|
||||
# Abort execution on error
|
||||
set -e
|
||||
|
||||
if which libtoolize > /dev/null; then
|
||||
libtoolize="libtoolize"
|
||||
@@ -15,49 +13,35 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WITH_SUBMODULES=0
|
||||
|
||||
case "$#" in
|
||||
0) ;;
|
||||
1) if [ "$1" = "with-submodules" ]; then
|
||||
WITH_SUBMODULES=1
|
||||
elif [ "$1" = "nosubmodule" ]; then
|
||||
WITH_SUBMODULES=0
|
||||
elif [ -n "$1" ]; then
|
||||
echo "$0: Illegal argument $1" >&2
|
||||
echo "USAGE: $0 [with-submodules]" >&2
|
||||
exit 1
|
||||
fi;;
|
||||
*) echo "$0: Wrong number of command-line arguments." >&2
|
||||
echo "USAGE: $0 [with-submodules]" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
if [ "$1" = "nosubmodule" ]; then
|
||||
SKIP_SUBMODULE=1
|
||||
elif [ -n "$1" ]; then
|
||||
echo "$0: Illegal argument $1"
|
||||
echo "USAGE: $0 [nosubmodule]"
|
||||
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 [ "$WITH_SUBMODULES" -ne 0 ]; then
|
||||
echo "Setting up submodules"
|
||||
git submodule sync
|
||||
git submodule update --init
|
||||
else
|
||||
echo "Skipping submodule setup"
|
||||
fi
|
||||
# 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
|
||||
|
||||
if [ -x src/jtag/drivers/libjaylink/autogen.sh ]; then
|
||||
(
|
||||
cd src/jtag/drivers/libjaylink
|
||||
./autogen.sh
|
||||
)
|
||||
if [ -n "$SKIP_SUBMODULE" ]; then
|
||||
echo "Skipping submodule setup"
|
||||
else
|
||||
echo "Setting up submodules"
|
||||
git submodule init
|
||||
git submodule update
|
||||
fi
|
||||
|
||||
echo "Bootstrap complete. Quick build instructions:"
|
||||
echo "./configure ...."
|
||||
echo "./configure --enable-maintainer-mode ...."
|
||||
|
||||
12
common.mk
Normal file
12
common.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# common flags used in openocd build
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
-I$(top_srcdir)/src/helper \
|
||||
-DPKGDATADIR=\"$(pkgdatadir)\" \
|
||||
-DPKGLIBDIR=\"$(pkglibdir)\"
|
||||
|
||||
if INTERNAL_JIMTCL
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
|
||||
-I$(top_builddir)/jimtcl
|
||||
endif
|
||||
@@ -1,3 +1,17 @@
|
||||
dnl
|
||||
dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64
|
||||
dnl This allows us to run with earlier Autoconfs as well.
|
||||
ifdef([m4_ifblank],[],[
|
||||
m4_define([m4_ifblank],
|
||||
[m4_if(m4_translit([[$1]], [ ][ ][
|
||||
]), [], [$2], [$3])])])
|
||||
dnl
|
||||
ifdef([m4_ifnblank],[],[
|
||||
m4_define([m4_ifnblank],
|
||||
[m4_if(m4_translit([[$1]], [ ][ ][
|
||||
]), [], [$3], [$2])])])
|
||||
dnl
|
||||
|
||||
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
|
||||
@@ -7,6 +21,7 @@ AC_DEFUN([AX_CONFIG_SUBDIR_OPTION],
|
||||
AC_CONFIG_SUBDIRS([$1])
|
||||
|
||||
m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu],
|
||||
[printf '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"\n' > "$srcdir/$1/configure.gnu"
|
||||
[printf "#!/bin/sh
|
||||
"\$"SHELL "../$srcdir/$1/configure" $2 \""\$"@"\" > "$srcdir/$1/configure.gnu"
|
||||
])
|
||||
])
|
||||
|
||||
1669
configure.ac
1669
configure.ac
File diff suppressed because it is too large
Load Diff
@@ -1,272 +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"
|
||||
|
||||
# Original FT2233HP VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6040", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT4233HP VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6041", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT2232HP VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6042", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT4232HP VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6043", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT233HP VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6044", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT232HP VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6045", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
|
||||
# Original FT4232HA VID:PID
|
||||
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6048", 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"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3755", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3757", 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"
|
||||
|
||||
# Microchip RISC-V Debug
|
||||
ATTRS{idVendor}=="1514", ATTRS{idProduct}=="2008", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="1514", ATTRS{idProduct}=="200a", 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"
|
||||
|
||||
# WCH CH347T chip in mode 3
|
||||
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55dd", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
# WCH CH347F chip
|
||||
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55de", 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"
|
||||
|
||||
# ANGIE USB-JTAG Adapter
|
||||
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="414f", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="424e", MODE="660", GROUP="plugdev", TAG+="uaccess"
|
||||
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="4a55", 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,28 +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_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
|
||||
68
contrib/coresight-trace.txt
Normal file
68
contrib/coresight-trace.txt
Normal file
@@ -0,0 +1,68 @@
|
||||
+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.
|
||||
|
||||
measurments 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,202 +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}
|
||||
: ${LIBJAYLINK_SRC:=/path/to/libjaylink}
|
||||
: ${JIMTCL_SRC:=/path/to/jimtcl}
|
||||
|
||||
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`
|
||||
LIBJAYLINK_SRC=`readlink -m $LIBJAYLINK_SRC`
|
||||
JIMTCL_SRC=`readlink -m $JIMTCL_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
|
||||
LIBJAYLINK_BUILD_DIR=$BUILD_DIR/libjaylink
|
||||
JIMTCL_BUILD_DIR=$BUILD_DIR/jimtcl
|
||||
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
|
||||
|
||||
# libjaylink build & install into sysroot
|
||||
if [ -d $LIBJAYLINK_SRC ] ; then
|
||||
mkdir -p $LIBJAYLINK_BUILD_DIR
|
||||
cd $LIBJAYLINK_BUILD_DIR
|
||||
$LIBJAYLINK_SRC/configure --build=`$LIBJAYLINK_SRC/config.guess` --host=$HOST_TRIPLET \
|
||||
--with-sysroot=$SYSROOT --prefix=$PREFIX \
|
||||
$LIBJAYLINK_CONFIG
|
||||
make -j $MAKE_JOBS
|
||||
make install DESTDIR=$SYSROOT
|
||||
fi
|
||||
|
||||
# jimtcl build & install into sysroot
|
||||
if [ -d $JIMTCL_SRC ] ; then
|
||||
mkdir -p $JIMTCL_BUILD_DIR
|
||||
cd $JIMTCL_BUILD_DIR
|
||||
$JIMTCL_SRC/configure --host=$HOST_TRIPLET --prefix=$PREFIX \
|
||||
$JIMTCL_CONFIG
|
||||
make -j $MAKE_JOBS
|
||||
# Running "make" does not create this file for static builds on Windows but "make install" still expects it
|
||||
touch $JIMTCL_BUILD_DIR/build-jim-ext
|
||||
make install DESTDIR=$SYSROOT
|
||||
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,77 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#****************************************************************************
|
||||
# File : Makefile *
|
||||
# Contents : Code for NanoXplore USB-JTAG ANGIE adapter hardware. *
|
||||
# Based on openULINK project by: Martin Schmoelzer. *
|
||||
# Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
# <aboudjelida@nanoxplore.com> *
|
||||
# <ahmederrachedbjld@gmail.com> *
|
||||
# ***************************************************************************/
|
||||
|
||||
# Define the name of tools.
|
||||
PREFIX =
|
||||
|
||||
# Small Device C Compiler: http://sdcc.sourceforge.net/
|
||||
CC = $(PREFIX)sdcc
|
||||
|
||||
# 8051 assembler, part of the SDCC software package.
|
||||
AS = $(PREFIX)sdas8051
|
||||
|
||||
# SDCC produces quite messy Intel HEX files. This tool is be used to re-format
|
||||
# those files. It is not required for the firmware download functionality in
|
||||
# the OpenOCD driver, but the resulting file is smaller.
|
||||
PACKIHX = $(PREFIX)packihx
|
||||
|
||||
# GNU binutils size. Used to print the size of the IHX file generated by SDCC.
|
||||
SIZE = size
|
||||
|
||||
# Source and header directories.
|
||||
SRC_DIR = src
|
||||
INCLUDE_DIR = include
|
||||
|
||||
CODE_SIZE = 0x3C00
|
||||
XRAM_LOC = 0x3C00
|
||||
XRAM_SIZE = 0x0400
|
||||
|
||||
CFLAGS = --std-sdcc99 --opt-code-size --model-small
|
||||
LDFLAGS = --code-loc 0x0000 --code-size $(CODE_SIZE) --xram-loc $(XRAM_LOC) \
|
||||
--xram-size $(XRAM_SIZE) --iram-size 256 --model-small
|
||||
|
||||
# list of base object files
|
||||
OBJECTS = main.rel usb.rel delay.rel USBJmpTb.rel gpif.rel i2c.rel serial.rel
|
||||
HEADERS = $(INCLUDE_DIR)/usb.h \
|
||||
$(INCLUDE_DIR)/delay.h \
|
||||
$(INCLUDE_DIR)/reg_ezusb.h \
|
||||
$(INCLUDE_DIR)/io.h \
|
||||
$(INCLUDE_DIR)/serial.h \
|
||||
$(INCLUDE_DIR)/fx2macros.h \
|
||||
$(INCLUDE_DIR)/msgtypes.h \
|
||||
$(INCLUDE_DIR)/i2c.h
|
||||
|
||||
# Disable all built-in rules.
|
||||
.SUFFIXES:
|
||||
|
||||
# Targets which are executed even when identically named file is present.
|
||||
.PHONY: all, clean
|
||||
|
||||
all: angie_firmware.ihx
|
||||
$(SIZE) angie_firmware.ihx
|
||||
|
||||
angie_firmware.ihx: $(OBJECTS)
|
||||
$(CC) -mmcs51 $(LDFLAGS) -o $@ $^
|
||||
|
||||
# Rebuild every C module (there are only 8 of them) if any header changes.
|
||||
%.rel: $(SRC_DIR)/%.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -mmcs51 -I$(INCLUDE_DIR) -o $@ $<
|
||||
|
||||
%.rel: $(SRC_DIR)/%.a51
|
||||
$(AS) -lsgo $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.asm *.lst *.rel *.rst *.sym *.ihx *.lk *.map *.mem
|
||||
|
||||
bin: angie_firmware.ihx
|
||||
makebin -p angie_firmware.ihx angie_firmware.bin
|
||||
|
||||
hex: angie_firmware.ihx
|
||||
$(PACKIHX) angie_firmware.ihx > fx2.hex
|
||||
@@ -1,37 +0,0 @@
|
||||
#SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
This is the ANGIE firmware for ANGIE USB-JTAG adapter.
|
||||
|
||||
The main components of ANGIE adapter are:
|
||||
- Cypress EZ-USB FX2 microcontroller
|
||||
- Spartan-6 FPGA
|
||||
- SRAM memory chip
|
||||
- Pin headers for various JTAG pin assignments
|
||||
|
||||
To compile the firmware, the SDCC compiler package is required. Most Linux
|
||||
distributions include SDCC in their official package repositories. The SDCC
|
||||
source code can be found at http://sdcc.sourceforge.net/
|
||||
|
||||
Simply type "make bin" in the ANGIE directory to compile the firmware.
|
||||
"make clean" will remove all generated files except the BIN file
|
||||
required for downloading the firmware to ANGIE.
|
||||
|
||||
Note that the EZ-USB FX2 microcontroller does not have on-chip flash,
|
||||
ANGIE include on-board EEPROM memory to store the firmware program of
|
||||
the FX2, but we are not going to use this method.
|
||||
|
||||
Instead, upon initial connection of the ANGIE adapter to the host PC
|
||||
via USB, the EZ-USB FX2 core has enough intelligence to act as a
|
||||
stand-alone USB device, responding to USB control requests and allowing
|
||||
firmware download via a special VENDOR-type control request. Then, the
|
||||
EZ-USB microcontroller simulates a disconnect and re-connect to the USB bus.
|
||||
It may take up to two seconds for the host to recognize the newly connected
|
||||
device before OpenOCD can proceed to execute JTAG commands. This delay is
|
||||
only visible when OpenOCD first uses a blank (unconfigured) ANGIE device.
|
||||
|
||||
Once the firmware downloaded, the FX2 microcontroller activate its GPIF mode,
|
||||
download the Spartan-6 FPGA's bitstream, program the FPGA rapidly, and switch
|
||||
back to default io mode.
|
||||
|
||||
Once the user disconnects the ANGIE adapter, all its memory contents are lost
|
||||
and the firmware & bitstream download process has to be executed again.
|
||||
@@ -1,50 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/****************************************************************
|
||||
File : delay.h *
|
||||
Contents : Delays handling header file for NanoXplore *
|
||||
USB-JTAG ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************/
|
||||
|
||||
#ifndef __DELAY_H
|
||||
#define __DELAY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void syncdelay(uint8_t count);
|
||||
void delay_5us(void);
|
||||
void delay_1ms(void);
|
||||
void delay_us(uint16_t delay);
|
||||
void delay_ms(uint16_t delay);
|
||||
|
||||
#ifndef _IFREQ
|
||||
#define _IFREQ 48000 /* IFCLK frequency in kHz */
|
||||
#endif
|
||||
|
||||
/* CFREQ can be any one of: 48000, 24000, or 12000 */
|
||||
#ifndef _CFREQ
|
||||
#define _CFREQ 48000 /* CLKOUT frequency in kHz */
|
||||
#endif
|
||||
|
||||
#if (_IFREQ < 5000)
|
||||
#error "_IFREQ too small! Valid Range: 5000 to 48000..."
|
||||
#endif
|
||||
|
||||
#if (_IFREQ > 48000)
|
||||
#error "_IFREQ too large! Valid Range: 5000 to 48000..."
|
||||
#endif
|
||||
|
||||
#if (_CFREQ != 48000)
|
||||
#if (_CFREQ != 24000)
|
||||
#if (_CFREQ != 12000)
|
||||
#error "_CFREQ invalid! Valid values: 48000, 24000, 12000..."
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Synchronization Delay formula: see TRM section 15-14 */
|
||||
#define _SCYCL (3 * (_CFREQ) + 5 * (_IFREQ) - 1) / (2 * (_IFREQ))
|
||||
#endif
|
||||
@@ -1,31 +0,0 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
/*
|
||||
* This code was taken from the fx2lib project from this link:
|
||||
* https://github.com/djmuhlestein/fx2lib
|
||||
*
|
||||
* Copyright (C) 2009 Ubixum, Inc.
|
||||
*/
|
||||
|
||||
/*! \file
|
||||
* Macros for simple common tasks in fx2 firmware.
|
||||
* */
|
||||
|
||||
#ifndef FX2MACROS_H
|
||||
#define FX2MACROS_H
|
||||
|
||||
#include "reg_ezusb.h"
|
||||
|
||||
typedef enum {FALSE = 0, TRUE} BOOL_VALS;
|
||||
|
||||
/**
|
||||
* \brief Used for getting and setting the CPU clock speed.
|
||||
**/
|
||||
typedef enum {CLK_12M = 0, CLK_24M, CLK_48M} CLK_SPD;
|
||||
|
||||
/**
|
||||
* \brief Evaluates to a CLK_SPD enum.
|
||||
**/
|
||||
#define CPUFREQ (CLK_SPD)((CPUCS & bmclkspd) >> 3)
|
||||
|
||||
#endif
|
||||
@@ -1,30 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/****************************************************************************
|
||||
File : i2c.h *
|
||||
Contents : i2c bit-bang library *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __I2C_H
|
||||
#define __I2C_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
bool get_status(void);
|
||||
void start_cd(void);
|
||||
void repeated_start(void);
|
||||
void stop_cd(void);
|
||||
void clock_cd(void);
|
||||
void send_ack(void);
|
||||
void send_nack(void);
|
||||
bool get_ack(void);
|
||||
|
||||
uint8_t get_address(uint8_t adr, uint8_t rdwr);
|
||||
|
||||
void send_byte(uint8_t input);
|
||||
uint8_t receive_byte(void);
|
||||
#endif
|
||||
@@ -1,57 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/****************************************************************************
|
||||
File : io.h *
|
||||
Contents : input/output declaration header file for NanoXplore *
|
||||
USB-JTAG ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __IO_H
|
||||
#define __IO_H
|
||||
|
||||
#include "reg_ezusb.h"
|
||||
|
||||
/* PORT A */
|
||||
#define PIN_SDA_DIR IOA0
|
||||
/* PA1 Not Connected */
|
||||
#define PIN_RDWR_B IOA2
|
||||
#define PIN_SDA IOA3
|
||||
#define PIN_SCL IOA4
|
||||
#define PIN_PROGRAM_B IOA5
|
||||
/* PA6 Not Connected */
|
||||
/* PA7 Not Connected */
|
||||
|
||||
/* PORT B */
|
||||
/* PB0 Not Connected */
|
||||
/* PB1 Not Connected */
|
||||
/* PB2 Not Connected */
|
||||
/* PB3 Not Connected */
|
||||
/* PB4 Not Connected */
|
||||
/* PB5 Not Connected */
|
||||
/* PB6 Not Connected */
|
||||
/* PB7 Not Connected */
|
||||
|
||||
/* PORT C */
|
||||
#define PIN_T0 IOC0
|
||||
#define PIN_T1 IOC1
|
||||
#define PIN_T2 IOC2
|
||||
#define PIN_T3 IOC3
|
||||
#define PIN_T4 IOC4
|
||||
/* PC5 Not Connected */
|
||||
/* PC6 Not Connected */
|
||||
/* PC7 Not Connected */
|
||||
|
||||
/* PORT D */
|
||||
/* PD0 Not Connected */
|
||||
/* PD1 Not Connected */
|
||||
/* PD2 Not Connected */
|
||||
/* PD3 Not Connected */
|
||||
/* PD4 Not Connected */
|
||||
/* PD5 Not Connected */
|
||||
/* PD6 Not Connected */
|
||||
/* PD7 Not Connected */
|
||||
|
||||
#endif
|
||||
@@ -1,171 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/****************************************************************************
|
||||
File : msgtypes.h *
|
||||
Contents : Definition of the commands supported by NanoXplore *
|
||||
USB-JTAG ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Definition of the commands supported by the ANGIE firmware.
|
||||
*
|
||||
* Basically, two types of commands can be distinguished:
|
||||
* - Commands with fixed payload size
|
||||
* - Commands with variable payload size
|
||||
*
|
||||
* SCAN commands (in all variations) carry payloads of variable size, all
|
||||
* other commands carry payloads of fixed size.
|
||||
*
|
||||
* In the case of SCAN commands, the payload size (n) is calculated by
|
||||
* dividing the scan_size_bits variable by 8, rounding up the result.
|
||||
*
|
||||
* Offset zero always contains the command ID.
|
||||
*
|
||||
****************************************************************************
|
||||
* CMD_SCAN_IN, CMD_SLOW_SCAN_IN: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: scan_size_bytes *
|
||||
* offset 2: bits_last_byte *
|
||||
* offset 3: tms_count_start + tms_count_end *
|
||||
* offset 4: tms_sequence_start *
|
||||
* offset 5: tms_sequence_end *
|
||||
* *
|
||||
* IN: *
|
||||
* offset 0..n: TDO data *
|
||||
****************************************************************************
|
||||
* CMD_SCAN_OUT, CMD_SLOW_SCAN_OUT: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: scan_size_bytes *
|
||||
* offset 2: bits_last_byte *
|
||||
* offset 3: tms_count_start + tms_count_end *
|
||||
* offset 4: tms_sequence_start *
|
||||
* offset 5: tms_sequence_end *
|
||||
* offset 6..x: TDI data *
|
||||
****************************************************************************
|
||||
* CMD_SCAN_IO, CMD_SLOW_SCAN_IO: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: scan_size_bytes *
|
||||
* offset 2: bits_last_byte *
|
||||
* offset 3: tms_count_start + tms_count_end *
|
||||
* offset 4: tms_sequence_start *
|
||||
* offset 5: tms_sequence_end *
|
||||
* offset 6..x: TDI data *
|
||||
* *
|
||||
* IN: *
|
||||
* offset 0..n: TDO data *
|
||||
****************************************************************************
|
||||
* CMD_CLOCK_TMS, CMD_SLOW_CLOCK_TMS: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: tms_count *
|
||||
* offset 2: tms_sequence *
|
||||
****************************************************************************
|
||||
* CMD_CLOCK_TCK, CMD_SLOW_CLOCK_TCK: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: low byte of tck_count *
|
||||
* offset 2: high byte of tck_count *
|
||||
****************************************************************************
|
||||
* CMD_CLOCK_SLEEP_US: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: low byte of sleep_us *
|
||||
* offset 2: high byte of sleep_us *
|
||||
****************************************************************************
|
||||
* CMD_CLOCK_SLEEP_MS: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: low byte of sleep_ms *
|
||||
* offset 2: high byte of sleep_ms *
|
||||
****************************************************************************
|
||||
* CMD_GET_SIGNALS: *
|
||||
* *
|
||||
* IN: *
|
||||
* offset 0: current state of input signals *
|
||||
* offset 1: current state of output signals *
|
||||
****************************************************************************
|
||||
* CMD_SET_SIGNALS: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: signals that should be de-asserted *
|
||||
* offset 2: signals that should be asserted *
|
||||
****************************************************************************
|
||||
* CMD_CONFIGURE_TCK_FREQ: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: delay value for scan_in function *
|
||||
* offset 2: delay value for scan_out function *
|
||||
* offset 3: delay value for scan_io function *
|
||||
* offset 4: delay value for clock_tck function *
|
||||
* offset 5: delay value for clock_tms function *
|
||||
****************************************************************************
|
||||
* CMD_SET_LEDS: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: LED states: *
|
||||
* Bit 0: turn COM LED on *
|
||||
* Bit 1: turn RUN LED on *
|
||||
* Bit 2: turn COM LED off *
|
||||
* Bit 3: turn RUN LED off *
|
||||
* Bits 7..4: Reserved *
|
||||
****************************************************************************
|
||||
* CMD_TEST: *
|
||||
* *
|
||||
* OUT: *
|
||||
* offset 1: unused dummy value *
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __MSGTYPES_H
|
||||
#define __MSGTYPES_H
|
||||
|
||||
/*
|
||||
* Command IDs:
|
||||
*
|
||||
* Bits 7..6: Reserved, should always be zero
|
||||
* Bits 5..0: Command ID. There are 62 usable IDs. Of this 63 available IDs,
|
||||
* the IDs 0x00..0x1F are commands with variable payload size,
|
||||
* the IDs 0x20..0x3F are commands with fixed payload size.
|
||||
*/
|
||||
|
||||
#define CMD_ID_MASK 0x3F
|
||||
|
||||
/* Commands with variable payload size */
|
||||
#define CMD_SCAN_IN 0x00
|
||||
#define CMD_SLOW_SCAN_IN 0x01
|
||||
#define CMD_SCAN_OUT 0x02
|
||||
#define CMD_SLOW_SCAN_OUT 0x03
|
||||
#define CMD_SCAN_IO 0x04
|
||||
#define CMD_SLOW_SCAN_IO 0x05
|
||||
|
||||
/* Commands with fixed payload size */
|
||||
#define CMD_CLOCK_TMS 0x20
|
||||
#define CMD_SLOW_CLOCK_TMS 0x21
|
||||
#define CMD_CLOCK_TCK 0x22
|
||||
#define CMD_SLOW_CLOCK_TCK 0x23
|
||||
#define CMD_SLEEP_US 0x24
|
||||
#define CMD_SLEEP_MS 0x25
|
||||
#define CMD_GET_SIGNALS 0x26
|
||||
#define CMD_SET_SIGNALS 0x27
|
||||
#define CMD_CONFIGURE_TCK_FREQ 0x28
|
||||
#define CMD_SET_LEDS 0x29
|
||||
#define CMD_TEST 0x2A
|
||||
|
||||
/* JTAG signal definition for jtag_get_signals() -- Input signals! */
|
||||
#define SIGNAL_TDO 1
|
||||
|
||||
/* JTAG signal definition for jtag_get_signals() -- Output signals! */
|
||||
#define SIGNAL_TDI 8
|
||||
#define SIGNAL_TMS 2
|
||||
#define SIGNAL_TCK 4
|
||||
#define SIGNAL_TRST 1
|
||||
#define SIGNAL_SRST 32
|
||||
|
||||
#endif
|
||||
@@ -1,656 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/****************************************************************************
|
||||
File : reg_ezusb.h *
|
||||
Contents : FX2 microcontroller registers file for NanoXplore *
|
||||
USB-JTAG ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef REG_EZUSB_H
|
||||
#define REG_EZUSB_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* All information in this file was taken from the EZ-USB FX2 Technical
|
||||
* Reference Manual, Cypress Semiconductor, 3901 North First Street
|
||||
* San Jose, CA 95134 (www.cypress.com).
|
||||
*
|
||||
* The EZ-USB Technical Reference Manual is called "EZ-USB FX2 TRM" hereafter.
|
||||
*/
|
||||
|
||||
/* Compiler-specific definitions of SBIT, SFR, SFRX, ... macros */
|
||||
#include <mcs51/compiler.h>
|
||||
|
||||
/* Bit vectors */
|
||||
#define bmbit0 0x01
|
||||
#define bmbit1 0x02
|
||||
#define bmbit2 0x04
|
||||
#define bmbit3 0x08
|
||||
#define bmbit4 0x10
|
||||
#define bmbit5 0x20
|
||||
#define bmbit6 0x40
|
||||
#define bmbit7 0x80
|
||||
|
||||
/**************************************************************************
|
||||
************************ Special Function Registers **********************
|
||||
***************************************************************************/
|
||||
SFR(IOA, 0x80);
|
||||
SBIT(IOA0, 0x80, 0);
|
||||
SBIT(IOA1, 0x80, 1);
|
||||
SBIT(IOA2, 0x80, 2);
|
||||
SBIT(IOA3, 0x80, 3);
|
||||
SBIT(IOA4, 0x80, 4);
|
||||
SBIT(IOA5, 0x80, 5);
|
||||
SBIT(IOA6, 0x80, 6);
|
||||
SBIT(IOA7, 0x80, 7);
|
||||
|
||||
SFR(SP, 0x81);
|
||||
SFR(DPL0, 0x82);
|
||||
SFR(DPH0, 0x83);
|
||||
SFR(DPL1, 0x84);
|
||||
SFR(DPL2, 0x85);
|
||||
|
||||
SFR(DPS, 0x86);
|
||||
#define SEL bmbit0
|
||||
/* Bit 1 read-only, always reads '0' */
|
||||
/* Bit 2 read-only, always reads '0' */
|
||||
/* Bit 3 read-only, always reads '0' */
|
||||
/* Bit 4 read-only, always reads '0' */
|
||||
/* Bit 5 read-only, always reads '0' */
|
||||
/* Bit 6 read-only, always reads '0' */
|
||||
/* Bit 7 read-only, always reads '0' */
|
||||
|
||||
SFR(PCON, 0x87);
|
||||
#define IDLE bmbit0
|
||||
#define STOP bmbit1
|
||||
#define GF0 bmbit2
|
||||
#define GF1 bmbit3
|
||||
/* Bit 4 read-only, always reads '1' */
|
||||
/* Bit 5 read-only, always reads '1' */
|
||||
/* Bit 6 unused */
|
||||
#define SMOD0 bmbit7
|
||||
|
||||
SFR(TCON, 0x88);
|
||||
SBIT(IT0, 0x88, 0);
|
||||
SBIT(IE0, 0x88, 1);
|
||||
SBIT(IT1, 0x88, 2);
|
||||
SBIT(IE1, 0x88, 3);
|
||||
SBIT(TR0, 0x88, 4);
|
||||
SBIT(TF0, 0x88, 5);
|
||||
SBIT(TR1, 0x88, 6);
|
||||
SBIT(TF1, 0x88, 7);
|
||||
|
||||
SFR(TMOD, 0x89);
|
||||
SFR(TL0, 0x8A);
|
||||
SFR(TL1, 0x8B);
|
||||
SFR(TH0, 0x8C);
|
||||
SFR(TH1, 0x8D);
|
||||
|
||||
SFR(CKCON, 0x8E);
|
||||
#define MD0 bmbit0
|
||||
#define MD1 bmbit1
|
||||
#define MD2 bmbit2
|
||||
#define T0M bmbit3
|
||||
#define T1M bmbit4
|
||||
#define T2M bmbit5
|
||||
/* Bit 6 unused */
|
||||
/* Bit 7 unused */
|
||||
|
||||
SFR(SPC_FNC, 0x8F);
|
||||
#define BMWRS bmbit0
|
||||
/* Bit 1 read-only, always reads '0' */
|
||||
/* Bit 2 read-only, always reads '0' */
|
||||
/* Bit 3 read-only, always reads '0' */
|
||||
/* Bit 4 read-only, always reads '0' */
|
||||
/* Bit 5 read-only, always reads '0' */
|
||||
/* Bit 6 read-only, always reads '0' */
|
||||
/* Bit 7 read-only, always reads '0' */
|
||||
|
||||
SFR(IOB, 0x90);
|
||||
SBIT(IOB0, 0x90, 0);
|
||||
SBIT(IOB1, 0x90, 1);
|
||||
SBIT(IOB2, 0x90, 2);
|
||||
SBIT(IOB3, 0x90, 3);
|
||||
SBIT(IOB4, 0x90, 4);
|
||||
SBIT(IOB5, 0x90, 5);
|
||||
SBIT(IOB6, 0x90, 6);
|
||||
SBIT(IOB7, 0x90, 7);
|
||||
|
||||
SFR(EXIF, 0x91);
|
||||
SBIT(USBINT, 0x91, 4);
|
||||
SBIT(I2CINT, 0x91, 5);
|
||||
SBIT(IE4, 0x91, 6);
|
||||
SBIT(IE5, 0x91, 7);
|
||||
|
||||
SFR(MPAGE, 0x92);
|
||||
SFR(SCON0, 0x98);
|
||||
SBIT(RI, 0x98, 0);
|
||||
SBIT(TI, 0x98, 1);
|
||||
SBIT(RB8, 0x98, 2);
|
||||
SBIT(TB8, 0x98, 3);
|
||||
SBIT(REN, 0x98, 4);
|
||||
SBIT(SM2, 0x98, 5);
|
||||
SBIT(SM1, 0x98, 6);
|
||||
SBIT(SM0, 0x98, 7);
|
||||
|
||||
SFR(SBUF0, 0x99);
|
||||
SFR(AUTOPTRH1, 0x9A);
|
||||
SFR(AUTOPTRL1, 0x9B);
|
||||
SFR(AUTOPTRH2, 0x9D);
|
||||
SFR(AUTOPTRL2, 0x9E);
|
||||
|
||||
#define AUTOPTR1H AUTOPTRH1 /* for backwards compatibility with examples */
|
||||
#define AUTOPTR1L AUTOPTRL1 /* for backwards compatibility with examples */
|
||||
#define APTR1H AUTOPTRH1 /* for backwards compatibility with examples */
|
||||
#define APTR1L AUTOPTRL1 /* for backwards compatibility with examples */
|
||||
|
||||
SFR(IOC, 0xA0);
|
||||
SBIT(IOC0, 0xA0, 0);
|
||||
SBIT(IOC1, 0xA0, 1);
|
||||
SBIT(IOC2, 0xA0, 2);
|
||||
SBIT(IOC3, 0xA0, 3);
|
||||
SBIT(IOC4, 0xA0, 4);
|
||||
SBIT(IOC5, 0xA0, 5);
|
||||
SBIT(IOC6, 0xA0, 6);
|
||||
SBIT(IOC7, 0xA0, 7);
|
||||
|
||||
SFR(INT2CLR, 0xA1);
|
||||
SFR(INT4CLR, 0xA2);
|
||||
SFR(IE, 0xA8);
|
||||
SBIT(EX0, 0xA8, 0);
|
||||
SBIT(ET0, 0xA8, 1);
|
||||
SBIT(EX1, 0xA8, 2);
|
||||
SBIT(ET1, 0xA8, 3);
|
||||
SBIT(ES0, 0xA8, 4);
|
||||
SBIT(ET2, 0xA8, 5);
|
||||
SBIT(ES1, 0xA8, 6);
|
||||
SBIT(EA, 0xA8, 7);
|
||||
|
||||
SFR(EP2468STAT, 0xAA);
|
||||
#define EP8F bmbit7
|
||||
#define EP8E bmbit6
|
||||
#define EP6F bmbit5
|
||||
#define EP6E bmbit4
|
||||
#define EP4F bmbit3
|
||||
#define EP4E bmbit2
|
||||
#define EP2F bmbit1
|
||||
#define EP2E bmbit0
|
||||
|
||||
SFR(EP24FIFOFLGS, 0xAB);
|
||||
SFR(EP68FIFOFLGS, 0xAC);
|
||||
SFR(AUTOPTRSETUP, 0xAF);
|
||||
SFR(IOD, 0xB0);
|
||||
SBIT(IOD0, 0xB0, 0);
|
||||
SBIT(IOD1, 0xB0, 1);
|
||||
SBIT(IOD2, 0xB0, 2);
|
||||
SBIT(IOD3, 0xB0, 3);
|
||||
SBIT(IOD4, 0xB0, 4);
|
||||
SBIT(IOD5, 0xB0, 5);
|
||||
SBIT(IOD6, 0xB0, 6);
|
||||
SBIT(IOD7, 0xB0, 7);
|
||||
|
||||
SFR(IOE, 0xB1);
|
||||
SFR(OEA, 0xB2);
|
||||
SFR(OEB, 0xB3);
|
||||
SFR(OEC, 0xB4);
|
||||
SFR(OED, 0xB5);
|
||||
SFR(OEE, 0xB6);
|
||||
|
||||
SFR(IP, 0xB8);
|
||||
SBIT(PX0, 0xB8, 0);
|
||||
SBIT(PT0, 0xB8, 1);
|
||||
SBIT(PX1, 0xB8, 2);
|
||||
SBIT(PT1, 0xB8, 3);
|
||||
SBIT(PS0, 0xB8, 4);
|
||||
SBIT(PT2, 0xB8, 5);
|
||||
SBIT(PS1, 0xB8, 6);
|
||||
/* Bit 7 read-only, always reads '1' */
|
||||
|
||||
SFR(EP01STAT, 0xBA);
|
||||
SFR(GPIFTRIG, 0xBB);
|
||||
#define BMGPIFDONE bmbit7
|
||||
#define BMGPIFREAD bmbit2
|
||||
#define GPIF_EP2 0
|
||||
#define GPIF_EP4 1
|
||||
#define GPIF_EP6 2
|
||||
#define GPIF_EP8 3
|
||||
|
||||
SFR(GPIFSGLDATH, 0xBD);
|
||||
SFR(GPIFSGLDATLX, 0xBE);
|
||||
SFR(GPIFSGLDATLNOX, 0xBF);
|
||||
|
||||
SFR(SCON1, 0xC0);
|
||||
SBIT(RI_1, 0xC0, 0);
|
||||
SBIT(TI_1, 0xC0, 1);
|
||||
SBIT(RB8_1, 0xC0, 2);
|
||||
SBIT(TB8_1, 0xC0, 3);
|
||||
SBIT(REN_1, 0xC0, 4);
|
||||
SBIT(SM2_1, 0xC0, 5);
|
||||
SBIT(SM1_1, 0xC0, 6);
|
||||
SBIT(SM0_1, 0xC0, 7);
|
||||
|
||||
SFR(SBUF1, 0xC1);
|
||||
SFR(T2CON, 0xC8);
|
||||
SBIT(CPRL2, 0xC8, 0);
|
||||
SBIT(C_T2, 0xC8, 1);
|
||||
SBIT(TR2, 0xC8, 2);
|
||||
SBIT(EXEN2, 0xC8, 3);
|
||||
SBIT(TCLK, 0xC8, 4);
|
||||
SBIT(RCLK, 0xC8, 5);
|
||||
SBIT(EXF2, 0xC8, 6);
|
||||
SBIT(TF2, 0xC8, 7);
|
||||
|
||||
SFR(RCAP2L, 0xCA);
|
||||
SFR(RCAP2H, 0xCB);
|
||||
SFR(TL2, 0xCC);
|
||||
SFR(TH2, 0xCD);
|
||||
SFR(PSW, 0xD0);
|
||||
SBIT(P, 0xD0, 0);
|
||||
SBIT(F1, 0xD0, 1);
|
||||
SBIT(OV, 0xD0, 2);
|
||||
SBIT(RS0, 0xD0, 3);
|
||||
SBIT(RS1, 0xD0, 4);
|
||||
SBIT(F0, 0xD0, 5);
|
||||
SBIT(AC, 0xD0, 6);
|
||||
SBIT(CY, 0xD0, 7);
|
||||
|
||||
SFR(EICON, 0xD8);
|
||||
/* Bit 0 read-only, always reads '0' */
|
||||
/* Bit 1 read-only, always reads '0' */
|
||||
/* Bit 2 read-only, always reads '0' */
|
||||
SBIT(INT6, 0xD8, 3);
|
||||
SBIT(RESI, 0xD8, 4);
|
||||
SBIT(ERESI, 0xD8, 5);
|
||||
/* Bit 6 read-only, always reads '1' */
|
||||
SBIT(SMOD1, 0xD8, 7);
|
||||
|
||||
SFR(ACC, 0xE0);
|
||||
SFR(EIE, 0xE8);
|
||||
SBIT(EUSB, 0xE8, 0);
|
||||
SBIT(EI2C, 0xE8, 1);
|
||||
SBIT(EX4, 0xE8, 2);
|
||||
SBIT(EX5, 0xE8, 3);
|
||||
SBIT(EWDI, 0xE8, 4);
|
||||
/* Bit 5 read-only, always reads '1' */
|
||||
/* Bit 6 read-only, always reads '1' */
|
||||
/* Bit 7 read-only, always reads '1' */
|
||||
|
||||
SFR(B, 0xF0);
|
||||
SFR(EIP, 0xF8);
|
||||
SBIT(PUSB, 0xF8, 0);
|
||||
SBIT(PI2C, 0xF8, 1);
|
||||
SBIT(PX4, 0xF8, 2);
|
||||
SBIT(PX5, 0xF8, 3);
|
||||
SBIT(PX6, 0xF8, 4);
|
||||
/* Bit 5 read-only, always reads '1' */
|
||||
/* Bit 6 read-only, always reads '1' */
|
||||
/* Bit 7 read-only, always reads '1' */
|
||||
|
||||
/**************************************************************************
|
||||
***************************** XDATA Registers ****************************
|
||||
***************************************************************************/
|
||||
|
||||
SFRX(GPIF_WAVE_DATA, 0xE400);
|
||||
SFRX(RES_WAVEDATA_END, 0xE480);
|
||||
|
||||
/* General Configuration */
|
||||
SFRX(CPUCS, 0xE600);
|
||||
#define RES8051 bmbit0
|
||||
#define CLKOE bmbit1
|
||||
#define BMCLKINV bmbit2
|
||||
#define bmclkspd0 bmbit3
|
||||
#define bmclkspd1 bmbit4
|
||||
#define bmclkspd (bmbit4 | bmbit3)
|
||||
#define BMPRTCSTB bmbit5
|
||||
|
||||
/* PCON register */
|
||||
#define BMSMOD0 bmbit7
|
||||
|
||||
SFRX(IFCONFIG, 0xE601);
|
||||
#define BMIFCLKSRC bmbit7
|
||||
#define BM3048MHZ bmbit6
|
||||
#define BMIFCLKOE bmbit5
|
||||
#define BMIFCLKPOL bmbit4
|
||||
#define BMASYNC bmbit3
|
||||
#define BMGSTATE bmbit2
|
||||
#define BMIFCFG1 bmbit1
|
||||
#define BMIFCFG0 bmbit0
|
||||
#define BMIFCFGMASK (BMIFCFG0 | BMIFCFG1)
|
||||
#define BMIFGPIF BMIFCFG1
|
||||
|
||||
SFRX(PINFLAGSAB, 0xE602);
|
||||
SFRX(PINFLAGSCD, 0xE603);
|
||||
SFRX(FIFORESET, 0xE604);
|
||||
#define BMNAKALL bmbit7
|
||||
|
||||
SFRX(BREAKPT, 0xE605);
|
||||
#define BMBREAK bmbit3
|
||||
#define BMBPPULSE bmbit2
|
||||
#define BMBPEN bmbit1
|
||||
|
||||
SFRX(BPADDRH, 0xE606);
|
||||
SFRX(BPADDRL, 0xE607);
|
||||
SFRX(UART230, 0xE608);
|
||||
SFRX(FIFOPINPOLAR, 0xE609);
|
||||
SFRX(REVID, 0xE60A);
|
||||
SFRX(REVCTL, 0xE60B);
|
||||
#define BMNOAUTOARM bmbit1
|
||||
#define BMSKIPCOMMIT bmbit0
|
||||
|
||||
/* Endpoint Configuration */
|
||||
SFRX(EP1OUTCFG, 0xE610);
|
||||
SFRX(EP1INCFG, 0xE611);
|
||||
SFRX(EP2CFG, 0xE612);
|
||||
SFRX(EP4CFG, 0xE613);
|
||||
SFRX(EP6CFG, 0xE614);
|
||||
SFRX(EP8CFG, 0xE615);
|
||||
SFRX(EP2FIFOCFG, 0xE618);
|
||||
SFRX(EP4FIFOCFG, 0xE619);
|
||||
SFRX(EP6FIFOCFG, 0xE61A);
|
||||
SFRX(EP8FIFOCFG, 0xE61B);
|
||||
#define BMINFM bmbit6
|
||||
#define BMOEP bmbit5
|
||||
#define BMAUTOOUT bmbit4
|
||||
#define BMAUTOIN bmbit3
|
||||
#define BMZEROLENIN bmbit2
|
||||
#define BMWORDWIDE bmbit0
|
||||
|
||||
SFRX(EP2AUTOINLENH, 0xE620);
|
||||
SFRX(EP2AUTOINLENL, 0xE621);
|
||||
SFRX(EP4AUTOINLENH, 0xE622);
|
||||
SFRX(EP4AUTOINLENL, 0xE623);
|
||||
SFRX(EP6AUTOINLENH, 0xE612);
|
||||
SFRX(EP6AUTOINLENL, 0xE613);
|
||||
SFRX(EP8AUTOINLENH, 0xE614);
|
||||
SFRX(EP8AUTOINLENL, 0xE615);
|
||||
SFRX(EP2FIFOPFH, 0xE630);
|
||||
SFRX(EP2FIFOPFL, 0xE631);
|
||||
SFRX(EP4FIFOPFH, 0xE632);
|
||||
SFRX(EP4FIFOPFL, 0xE633);
|
||||
SFRX(EP6FIFOPFH, 0xE634);
|
||||
SFRX(EP6FIFOPFL, 0xE635);
|
||||
SFRX(EP8FIFOPFH, 0xE636);
|
||||
SFRX(EP8FIFOPFL, 0xE637);
|
||||
SFRX(EP2ISOINPKTS, 0xE640);
|
||||
SFRX(EP4ISOINPKTS, 0xE641);
|
||||
SFRX(EP6ISOINPKTS, 0xE642);
|
||||
SFRX(EP8ISOINPKTS, 0xE643);
|
||||
SFRX(INPKTEND, 0xE648);
|
||||
SFRX(OUTPKTEND, 0xE649);
|
||||
|
||||
/* Interrupts */
|
||||
SFRX(EP2FIFOIE, 0xE650);
|
||||
SFRX(EP2FIFOIRQ, 0xE651);
|
||||
SFRX(EP4FIFOIE, 0xE652);
|
||||
SFRX(EP4FIFOIRQ, 0xE653);
|
||||
SFRX(EP6FIFOIE, 0xE654);
|
||||
SFRX(EP6FIFOIRQ, 0xE655);
|
||||
SFRX(EP8FIFOIE, 0xE656);
|
||||
SFRX(EP8FIFOIRQ, 0xE657);
|
||||
SFRX(IBNIE, 0xE658);
|
||||
SFRX(IBNIRQ, 0xE659);
|
||||
#define EP0IBN bmbit0
|
||||
#define EP1IBN bmbit1
|
||||
#define EP2IBN bmbit2
|
||||
#define EP4IBN bmbit3
|
||||
#define EP6IBN bmbit4
|
||||
#define EP8IBN bmbit5
|
||||
|
||||
SFRX(NAKIE, 0xE65A);
|
||||
SFRX(NAKIRQ, 0xE65B);
|
||||
#define EP8PING bmbit7
|
||||
#define EP6PING bmbit6
|
||||
#define EP4PING bmbit5
|
||||
#define EP2PING bmbit4
|
||||
#define EP1PING bmbit3
|
||||
#define EP0PING bmbit2
|
||||
#define IBN bmbit0
|
||||
|
||||
SFRX(USBIEN, 0xE65C);
|
||||
SFRX(USBIRQ, 0xE65D);
|
||||
#define SUDAVI bmbit0
|
||||
#define SOFI bmbit1
|
||||
#define SUTOKI bmbit2
|
||||
#define SUSPI bmbit3
|
||||
#define URESI bmbit4
|
||||
#define HSGRANT bmbit5
|
||||
#define EP0ACK bmbit6
|
||||
|
||||
SFRX(EPIE, 0xE65E);
|
||||
SFRX(EPIRQ, 0xE65F);
|
||||
SFRX(GPIFIE, 0xE660);
|
||||
SFRX(GPIFIRQ, 0xE661);
|
||||
SFRX(USBERRIE, 0xE662);
|
||||
SFRX(USBERRIRQ, 0xE663);
|
||||
SFRX(ERRCNTLIM, 0xE664);
|
||||
SFRX(CLRERRCNT, 0xE665);
|
||||
SFRX(INT2IVEC, 0xE666);
|
||||
#define I2V0 bmbit2
|
||||
#define I2V1 bmbit3
|
||||
#define I2V2 bmbit4
|
||||
#define I2V3 bmbit5
|
||||
#define I2V4 bmbit6
|
||||
|
||||
SFRX(INT4IVEC, 0xE667);
|
||||
SFRX(INTSETUP, 0xE668);
|
||||
#define AV4EN bmbit0
|
||||
#define INT4IN bmbit1
|
||||
#define AV2EN bmbit3
|
||||
|
||||
/* Input/Output */
|
||||
SFRX(PORTACFG, 0xE670);
|
||||
#define BMINT0 bmbit0
|
||||
#define BMINT1 bmbit1
|
||||
#define BMFLAGD bmbit7
|
||||
|
||||
SFRX(PORTCCFG, 0xE671);
|
||||
#define BMGPIFA0 bmbit0
|
||||
#define BMGPIFA1 bmbit1
|
||||
#define BMGPIFA2 bmbit2
|
||||
#define BMGPIFA3 bmbit3
|
||||
#define BMGPIFA4 bmbit4
|
||||
#define BMGPIFA5 bmbit5
|
||||
#define BMGPIFA6 bmbit6
|
||||
#define BMGPIFA7 bmbit7
|
||||
|
||||
SFRX(PORTECFG, 0xE672);
|
||||
#define BMT0OUT bmbit0
|
||||
#define BMT1OUT bmbit1
|
||||
#define BMT2OUT bmbit2
|
||||
#define BMRXD0OUT bmbit3
|
||||
#define BMRXD1OUT bmbit4
|
||||
#define BMINT6 bmbit5
|
||||
#define BMT2EX bmbit6
|
||||
#define BMGPIFA8 bmbit7
|
||||
|
||||
SFRX(I2CS, 0xE678);
|
||||
#define BMDONE bmbit0
|
||||
#define BMACK bmbit1
|
||||
#define BMBERR bmbit2
|
||||
#define BMID (bmbit4 | bmbit3)
|
||||
#define BMLASTRD bmbit5
|
||||
#define BMSTOP bmbit6
|
||||
#define BMSTART bmbit7
|
||||
|
||||
SFRX(I2DAT, 0xE679);
|
||||
SFRX(I2CTL, 0xE67A);
|
||||
#define BMSTOPIE bmbit1
|
||||
#define BM400KHZ bmbit0
|
||||
|
||||
SFRX(XAUTODAT1, 0xE67B);
|
||||
SFRX(XAUTODAT2, 0xE67C);
|
||||
#define EXTAUTODAT1 XAUTODAT1
|
||||
#define EXTAUTODAT2 XAUTODAT2
|
||||
|
||||
/* USB Control */
|
||||
SFRX(USBCS, 0xE680);
|
||||
#define SIGRSUME bmbit0
|
||||
#define RENUM bmbit1
|
||||
#define NOSYNSOF bmbit2
|
||||
#define DISCON bmbit3
|
||||
#define HSM bmbit7
|
||||
|
||||
SFRX(SUSPEND, 0xE681);
|
||||
SFRX(WAKEUPCS, 0xE682);
|
||||
#define BMWU2 bmbit7
|
||||
#define BMWU bmbit6
|
||||
#define BMWU2POL bmbit5
|
||||
#define BMWUPOL bmbit4
|
||||
#define BMDPEN bmbit2
|
||||
#define BMWU2EN bmbit1
|
||||
#define BMWUEN bmbit0
|
||||
|
||||
SFRX(TOGCTL, 0xE683);
|
||||
#define BMTOGCTLEPMASK bmbit3 | bmbit2 | bmbit1 | bmbit0
|
||||
#define BMRESETTOGGLE bmbit5
|
||||
#define BMSETTOGGLE bmbit6
|
||||
#define BMQUERYTOGGLE bmbit7
|
||||
|
||||
SFRX(USBFRAMEH, 0xE684);
|
||||
SFRX(USBFRAMEL, 0xE685);
|
||||
SFRX(MICROFRAME, 0xE686);
|
||||
SFRX(FNADDR, 0xE687);
|
||||
|
||||
/* Endpoints */
|
||||
SFRX(EP0BCH, 0xE68A);
|
||||
SFRX(EP0BCL, 0xE68B);
|
||||
SFRX(EP1OUTBC, 0xE68D);
|
||||
SFRX(EP1INBC, 0xE68F);
|
||||
SFRX(EP2BCH, 0xE690);
|
||||
SFRX(EP2BCL, 0xE691);
|
||||
SFRX(EP4BCH, 0xE694);
|
||||
SFRX(EP4BCL, 0xE695);
|
||||
SFRX(EP6BCH, 0xE698);
|
||||
SFRX(EP6BCL, 0xE699);
|
||||
SFRX(EP8BCH, 0xE69C);
|
||||
SFRX(EP8BCL, 0xE69D);
|
||||
SFRX(EP0CS, 0xE6A0);
|
||||
#define HSNAK bmbit7
|
||||
|
||||
SFRX(EP1INCS, 0xE6A2);
|
||||
SFRX(EP1OUTCS, 0xE6A1);
|
||||
#define EPSTALL bmbit0
|
||||
#define EPBSY bmbit1
|
||||
|
||||
SFRX(EP2CS, 0xE6A3);
|
||||
SFRX(EP4CS, 0xE6A4);
|
||||
SFRX(EP6CS, 0xE6A5);
|
||||
SFRX(EP8CS, 0xE6A6);
|
||||
#define BMEPEMPTY bmbit2
|
||||
#define BMEPFULL bmbit3
|
||||
#define BMNPAK (bmbit6 | bmbit5 | bmbit4)
|
||||
|
||||
SFRX(EP2FIFOFLGS, 0xE6A7);
|
||||
SFRX(EP4FIFOFLGS, 0xE6A8);
|
||||
SFRX(EP6FIFOFLGS, 0xE6A9);
|
||||
SFRX(EP8FIFOFLGS, 0xE6AA);
|
||||
SFRX(EP2FIFOBCH, 0xE6AB);
|
||||
SFRX(EP2FIFOBCL, 0xE6AC);
|
||||
SFRX(EP4FIFOBCH, 0xE6AD);
|
||||
SFRX(EP4FIFOBCL, 0xE6AE);
|
||||
SFRX(EP6FIFOBCH, 0xE6AF);
|
||||
SFRX(EP6FIFOBCL, 0xE6B0);
|
||||
SFRX(EP8FIFOBCH, 0xE6B1);
|
||||
SFRX(EP8FIFOBCL, 0xE6B2);
|
||||
SFRX(SUDPTRH, 0xE6B3);
|
||||
SFRX(SUDPTRL, 0xE6B4);
|
||||
|
||||
SFRX(SUDPTRCTL, 0xE6B5);
|
||||
#define BMSDPAUTO bmbit0
|
||||
|
||||
SFRX(SETUPDAT[8], 0xE6B8);
|
||||
|
||||
/* GPIF */
|
||||
SFRX(GPIFWFSELECT, 0xE6C0);
|
||||
SFRX(GPIFIDLECS, 0xE6C1);
|
||||
SFRX(GPIFIDLECTL, 0xE6C2);
|
||||
SFRX(GPIFCTLCFG, 0xE6C3);
|
||||
SFRX(GPIFADRH, 0xE6C4);
|
||||
SFRX(GPIFADRL, 0xE6C5);
|
||||
SFRX(GPIFTCB3, 0xE6CE);
|
||||
SFRX(GPIFTCB2, 0xE6CF);
|
||||
SFRX(GPIFTCB1, 0xE6D0);
|
||||
SFRX(GPIFTCB0, 0xE6D1);
|
||||
|
||||
#define EP2GPIFTCH GPIFTCB1 /* these are here for backwards compatibility */
|
||||
#define EP2GPIFTCL GPIFTCB0
|
||||
#define EP4GPIFTCH GPIFTCB1 /* these are here for backwards compatibility */
|
||||
#define EP4GPIFTCL GPIFTCB0
|
||||
#define EP6GPIFTCH GPIFTCB1 /* these are here for backwards compatibility */
|
||||
#define EP6GPIFTCL GPIFTCB0
|
||||
#define EP8GPIFTCH GPIFTCB1 /* these are here for backwards compatibility */
|
||||
#define EP8GPIFTCL GPIFTCB0
|
||||
|
||||
SFRX(EP2GPIFFLGSEL, 0xE6D2);
|
||||
SFRX(EP2GPIFPFSTOP, 0xE6D3);
|
||||
SFRX(EP2GPIFTRIG, 0xE6D4);
|
||||
SFRX(EP4GPIFFLGSEL, 0xE6DA);
|
||||
SFRX(EP4GPIFPFSTOP, 0xE6DB);
|
||||
SFRX(EP4GPIFTRIG, 0xE6DC);
|
||||
SFRX(EP6GPIFFLGSEL, 0xE6E2);
|
||||
SFRX(EP6GPIFPFSTOP, 0xE6E3);
|
||||
SFRX(EP6GPIFTRIG, 0xE6E4);
|
||||
SFRX(EP8GPIFFLGSEL, 0xE6EA);
|
||||
SFRX(EP8GPIFPFSTOP, 0xE6EB);
|
||||
SFRX(EP8GPIFTRIG, 0xE6EC);
|
||||
SFRX(XGPIFSGLDATH, 0xE6F0);
|
||||
SFRX(XGPIFSGLDATLX, 0xE6F1);
|
||||
SFRX(XGPIFSGLDATLNOX, 0xE6F2);
|
||||
SFRX(GPIFREADYCFG, 0xE6F3);
|
||||
SFRX(GPIFREADYSTAT, 0xE6F4);
|
||||
SFRX(GPIFABORT, 0xE6F5);
|
||||
|
||||
// UDMA
|
||||
SFRX(FLOWSTATE, 0xE6C6);
|
||||
SFRX(FLOWLOGIC, 0xE6C7);
|
||||
SFRX(FLOWEQ0CTL, 0xE6C8);
|
||||
SFRX(FLOWEQ1CTL, 0xE6C9);
|
||||
SFRX(FLOWHOLDOFF, 0xE6CA);
|
||||
SFRX(FLOWSTB, 0xE6CB);
|
||||
SFRX(FLOWSTBEDGE, 0xE6CC);
|
||||
SFRX(FLOWSTBHPERIOD, 0xE6CD);
|
||||
SFRX(GPIFHOLDAMOUNT, 0xE60C);
|
||||
SFRX(UDMACRCH, 0xE67D);
|
||||
SFRX(UDMACRCL, 0xE67E);
|
||||
SFRX(UDMACRCQUAL, 0xE67F);
|
||||
|
||||
/* Debug/Test
|
||||
* The following registers are for Cypress's internal testing purposes only.
|
||||
* These registers are not documented in the datasheet or the Technical Reference
|
||||
* Manual as they were not designed for end user application usage
|
||||
*/
|
||||
SFRX(DBUG, 0xE6F8);
|
||||
SFRX(TESTCFG, 0xE6F9);
|
||||
SFRX(USBTEST, 0xE6FA);
|
||||
SFRX(CT1, 0xE6FB);
|
||||
SFRX(CT2, 0xE6FC);
|
||||
SFRX(CT3, 0xE6FD);
|
||||
SFRX(CT4, 0xE6FE);
|
||||
|
||||
/* Endpoint Buffers */
|
||||
SFRX(EP0BUF[64], 0xE740);
|
||||
SFRX(EP1INBUF[64], 0xE7C0);
|
||||
SFRX(EP1OUTBUF[64], 0xE780);
|
||||
SFRX(EP2FIFOBUF[1024], 0xF000);
|
||||
SFRX(EP4FIFOBUF[1024], 0xF400);
|
||||
SFRX(EP6FIFOBUF[1024], 0xF800);
|
||||
SFRX(EP8FIFOBUF[1024], 0xFC00);
|
||||
|
||||
/* Error Correction Code (ECC) Registers (FX2LP/FX1 only) */
|
||||
SFRX(ECCCFG, 0xE628);
|
||||
SFRX(ECCRESET, 0xE629);
|
||||
SFRX(ECC1B0, 0xE62A);
|
||||
SFRX(ECC1B1, 0xE62B);
|
||||
SFRX(ECC1B2, 0xE62C);
|
||||
SFRX(ECC2B0, 0xE62D);
|
||||
SFRX(ECC2B1, 0xE62E);
|
||||
SFRX(ECC2B2, 0xE62F);
|
||||
|
||||
/* Feature Registers (FX2LP/FX1 only) */
|
||||
SFRX(GPCR2, 0xE50D);
|
||||
#define BMFULLSPEEDONLY bmbit4
|
||||
|
||||
#endif
|
||||
@@ -1,47 +0,0 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
/**
|
||||
* This code was taken from the fx2lib project from this link:
|
||||
* https://github.com/djmuhlestein/fx2lib
|
||||
*
|
||||
* Copyright (C) 2009 Ubixum, Inc.
|
||||
**/
|
||||
|
||||
/** \file serial.h
|
||||
* defines functions to print to a serial console with SIO0
|
||||
**/
|
||||
|
||||
#include "fx2macros.h"
|
||||
#include <stdint.h>
|
||||
/**
|
||||
* This function inits sio0 to use T2CON (timer 2)
|
||||
* See TRM 14.3.4.1 (Table 14-16)
|
||||
* Certain baud rates have too high an error rate to work. All baud rates are .16%
|
||||
* except:
|
||||
*
|
||||
* 12MHZ 24MHZ
|
||||
* \li 57600 -6.99%
|
||||
* \li 38400 -2.34% -2.34%
|
||||
* \li 19200 -2.34%
|
||||
*
|
||||
* Possible Baud rates:
|
||||
* \li 2400
|
||||
* \li 4800
|
||||
* \li 9600
|
||||
* \li 19200
|
||||
* \li 28800
|
||||
* \li 38400
|
||||
* \li 57600
|
||||
*
|
||||
* Any of these rates should work except 57600 at 12mhz. -2.34% is pushing
|
||||
* most hardware specs for working. All rates at 48mhz work at .16%
|
||||
**/
|
||||
|
||||
void sio0_init(uint32_t baud_rate) __critical; /* baud_rate max should be 57600 since int=2 bytes */
|
||||
|
||||
/**
|
||||
* putchar('\\n') or putchar('\\r') both transmit \\r\\n
|
||||
* Just use one or the other. (This makes terminal echo easy)
|
||||
**/
|
||||
int putchar(char c);
|
||||
int getchar(void);
|
||||
@@ -1,283 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/****************************************************************************
|
||||
File : usb.h *
|
||||
Contents : usb communication handling header file for NanoXplore *
|
||||
USB-JTAG ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __USB_H
|
||||
#define __USB_H
|
||||
|
||||
#include "reg_ezusb.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/* High and Low byte of a word (uint16_t) */
|
||||
#define HI8(word) (uint8_t)(((uint16_t)(word) >> 8) & 0xff)
|
||||
#define LO8(word) (uint8_t)((uint16_t)(word) & 0xff)
|
||||
|
||||
/* Convenience functions */
|
||||
#define STALL_EP0() (EP0CS |= EPSTALL)
|
||||
#define CLEAR_IRQ() (USBINT = 0)
|
||||
|
||||
/*********** USB descriptors. See USB 2.0 Spec **********/
|
||||
|
||||
/* USB Descriptor Types. See USB 2.0 Spec */
|
||||
#define DESCRIPTOR_TYPE_DEVICE 0x01
|
||||
#define DESCRIPTOR_TYPE_CONFIGURATION 0x02
|
||||
#define DESCRIPTOR_TYPE_STRING 0x03
|
||||
#define DESCRIPTOR_TYPE_INTERFACE 0x04
|
||||
#define DESCRIPTOR_TYPE_ENDPOINT 0x05
|
||||
|
||||
#define STR_DESCR(len, ...) { (len) * 2 + 2, DESCRIPTOR_TYPE_STRING, { __VA_ARGS__ } }
|
||||
|
||||
/** USB Device Descriptor. See USB 2.0 Spec */
|
||||
struct usb_device_descriptor {
|
||||
uint8_t blength; /**< Size of this descriptor in bytes. */
|
||||
uint8_t bdescriptortype; /**< DEVICE Descriptor Type. */
|
||||
uint16_t bcdusb; /**< USB specification release number (BCD). */
|
||||
uint8_t bdeviceclass; /**< Class code. */
|
||||
uint8_t bdevicesubclass; /**< Subclass code. */
|
||||
uint8_t bdeviceprotocol; /**< Protocol code. */
|
||||
uint8_t bmaxpacketsize0; /**< Maximum packet size for EP0 (8, 16, 32, 64). */
|
||||
uint16_t idvendor; /**< USB Vendor ID. */
|
||||
uint16_t idproduct; /**< USB Product ID. */
|
||||
uint16_t bcddevice; /**< Device Release Number (BCD). */
|
||||
uint8_t imanufacturer; /**< Index of manufacturer string descriptor. */
|
||||
uint8_t iproduct; /**< Index of product string descriptor. */
|
||||
uint8_t iserialnumber; /**< Index of string descriptor containing serial #. */
|
||||
uint8_t bnumconfigurations; /**< Number of possible configurations. */
|
||||
};
|
||||
|
||||
/** USB Configuration Descriptor. See USB 2.0 Spec */
|
||||
struct usb_config_descriptor {
|
||||
uint8_t blength; /**< Size of this descriptor in bytes. */
|
||||
uint8_t bdescriptortype; /**< CONFIGURATION descriptor type. */
|
||||
uint16_t wtotallength; /**< Combined total length of all descriptors. */
|
||||
uint8_t bnuminterfaces; /**< Number of interfaces in this configuration. */
|
||||
uint8_t bconfigurationvalue; /**< Value used to select this configuration. */
|
||||
uint8_t iconfiguration; /**< Index of configuration string descriptor. */
|
||||
uint8_t bmattributes; /**< Configuration characteristics. */
|
||||
uint8_t maxpower; /**< Maximum power consumption in 2 mA units. */
|
||||
};
|
||||
|
||||
/** USB Interface association Descriptor. See USB 2.0 Spec */
|
||||
struct usb_interface_association_descriptor {
|
||||
uint8_t blength;
|
||||
uint8_t bdescriptortype;
|
||||
uint8_t bfirstinterface;
|
||||
uint8_t binterfacecount;
|
||||
uint8_t bfunctionclass;
|
||||
uint8_t bfunctionsubclass;
|
||||
uint8_t bfunctionprotocol;
|
||||
uint8_t ifunction;
|
||||
};
|
||||
|
||||
/** USB Interface Descriptor. See USB 2.0 Spec */
|
||||
struct usb_interface_descriptor {
|
||||
uint8_t blength; /**< Size of this descriptor in bytes. */
|
||||
uint8_t bdescriptortype; /**< INTERFACE descriptor type. */
|
||||
uint8_t binterfacenumber; /**< Interface number. */
|
||||
uint8_t balternatesetting; /**< Value used to select alternate setting. */
|
||||
uint8_t bnumendpoints; /**< Number of endpoints used by this interface. */
|
||||
uint8_t binterfaceclass; /**< Class code. */
|
||||
uint8_t binterfacesubclass; /**< Subclass code. */
|
||||
uint8_t binterfaceprotocol; /**< Protocol code. */
|
||||
uint8_t iinterface; /**< Index of interface string descriptor. */
|
||||
};
|
||||
|
||||
/** USB Endpoint Descriptor. See USB 2.0 Spec */
|
||||
struct usb_endpoint_descriptor {
|
||||
uint8_t blength; /**< Size of this descriptor in bytes. */
|
||||
uint8_t bdescriptortype; /**< ENDPOINT descriptor type. */
|
||||
uint8_t bendpointaddress; /**< Endpoint Address: IN/OUT + EP number. */
|
||||
uint8_t bmattributes; /**< Endpoint Attributes: BULK/INTR/ISO/CTRL. */
|
||||
uint16_t wmaxpacketsize; /**< Maximum packet size for this endpoint. */
|
||||
uint8_t binterval; /**< Polling interval (in ms) for this endpoint. */
|
||||
};
|
||||
|
||||
/** USB Language Descriptor. See USB 2.0 Spec */
|
||||
struct usb_language_descriptor {
|
||||
uint8_t blength; /**< Size of this descriptor in bytes. */
|
||||
uint8_t bdescriptortype; /**< STRING descriptor type. */
|
||||
uint16_t wlangid; /**< LANGID codes. */
|
||||
};
|
||||
|
||||
/** USB String Descriptor. See USB 2.0 Spec */
|
||||
struct usb_string_descriptor {
|
||||
uint8_t blength; /**< Size of this descriptor in bytes. */
|
||||
uint8_t bdescriptortype; /**< STRING descriptor type. */
|
||||
uint16_t bstring[]; /**< UNICODE encoded string. */
|
||||
};
|
||||
|
||||
/********************** USB Control Endpoint 0 related *********************/
|
||||
|
||||
/** USB Control Setup Data. See USB 2.0 Spec */
|
||||
struct setup_data {
|
||||
uint8_t bmrequesttype; /**< Characteristics of a request. */
|
||||
uint8_t brequest; /**< Specific request. */
|
||||
uint16_t wvalue; /**< Field that varies according to request. */
|
||||
uint16_t windex; /**< Field that varies according to request. */
|
||||
uint16_t wlength; /**< Number of bytes to transfer in data stage. */
|
||||
};
|
||||
|
||||
extern volatile __xdata __at 0xE6B8 struct setup_data setup_data;
|
||||
|
||||
/*
|
||||
* USB Request Types (bmRequestType): See USB 2.0 Spec
|
||||
*
|
||||
* Bit 7: Data transfer direction
|
||||
* 0 = Host-to-device
|
||||
* 1 = Device-to-host
|
||||
* Bit 6...5: Type
|
||||
* 0 = Standard
|
||||
* 1 = Class
|
||||
* 2 = Vendor
|
||||
* 3 = Reserved
|
||||
* Bit 4...0: Recipient
|
||||
* 0 = Device
|
||||
* 1 = Interface
|
||||
* 2 = Endpoint
|
||||
* 3 = Other
|
||||
* 4...31 = Reserved
|
||||
*/
|
||||
|
||||
#define USB_DIR_OUT 0x00
|
||||
#define USB_DIR_IN 0x80
|
||||
|
||||
#define USB_REQ_TYPE_STANDARD (0x00 << 5)
|
||||
#define USB_REQ_TYPE_CLASS (0x01 << 5)
|
||||
#define USB_REQ_TYPE_VENDOR (0x02 << 5)
|
||||
#define USB_REQ_TYPE_RESERVED (0x03 << 5)
|
||||
|
||||
#define USB_RECIP_DEVICE 0x00
|
||||
#define USB_RECIP_INTERFACE 0x01
|
||||
#define USB_RECIP_ENDPOINT 0x02
|
||||
#define USB_RECIP_OTHER 0x03
|
||||
|
||||
/* Clear Interface Request */
|
||||
#define CF_DEVICE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
#define CF_INTERFACE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_INTERFACE)
|
||||
#define CF_ENDPOINT (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_ENDPOINT)
|
||||
|
||||
/* Get Configuration Request */
|
||||
#define GC_DEVICE (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
|
||||
/* Get Descriptor Request */
|
||||
#define GD_DEVICE (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
|
||||
/* Get Interface Request */
|
||||
#define GI_INTERFACE (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_INTERFACE)
|
||||
|
||||
/* Get Status Request: See USB 1.1 spec, page 190 */
|
||||
#define GS_DEVICE (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
#define GS_INTERFACE (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_INTERFACE)
|
||||
#define GS_ENDPOINT (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_ENDPOINT)
|
||||
|
||||
/* Set Address Request is handled by EZ-USB core */
|
||||
|
||||
/* Set Configuration Request */
|
||||
#define SC_DEVICE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
|
||||
/* Set Descriptor Request */
|
||||
#define SD_DEVICE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
|
||||
/* Set Feature Request */
|
||||
#define SF_DEVICE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_DEVICE)
|
||||
#define SF_INTERFACE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_INTERFACE)
|
||||
#define SF_ENDPOINT (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_ENDPOINT)
|
||||
|
||||
/* Set Interface Request */
|
||||
#define SI_INTERFACE (USB_DIR_OUT | USB_REQ_TYPE_STANDARD | USB_RECIP_INTERFACE)
|
||||
|
||||
/* Synch Frame Request */
|
||||
#define SY_ENDPOINT (USB_DIR_IN | USB_REQ_TYPE_STANDARD | USB_RECIP_ENDPOINT)
|
||||
|
||||
/* USB Requests (bRequest): See USB 2.0 Spec */
|
||||
#define GET_STATUS 0
|
||||
#define CLEAR_FEATURE 1
|
||||
/* Value '2' is reserved for future use */
|
||||
#define SET_FEATURE 3
|
||||
/* Value '4' is reserved for future use */
|
||||
#define SET_ADDRESS 5
|
||||
#define GET_DESCRIPTOR 6
|
||||
#define SET_DESCRIPTOR 7
|
||||
#define GET_CONFIGURATION 8
|
||||
#define SET_CONFIGURATION 9
|
||||
#define GET_INTERFACE 10
|
||||
#define SET_INTERFACE 11
|
||||
#define SYNCH_FRAME 12
|
||||
|
||||
/* Standard Feature Selectors: See USB 2.0 Spec */
|
||||
#define DEVICE_REMOTE_WAKEUP 1
|
||||
#define ENDPOINT_HALT 0
|
||||
|
||||
/************************** EZ-USB specific stuff **************************/
|
||||
/** USB Interrupts. See EZ-USB FX2-TRM, for details */
|
||||
enum usb_isr {
|
||||
SUDAV_ISR = 13,
|
||||
SOF_ISR,
|
||||
SUTOK_ISR,
|
||||
SUSPEND_ISR,
|
||||
USBRESET_ISR,
|
||||
HIGHSPEED_ISR,
|
||||
EP0ACK_ISR,
|
||||
STUB_ISR,
|
||||
EP0IN_ISR,
|
||||
EP0OUT_ISR,
|
||||
EP1IN_ISR,
|
||||
EP1OUT_ISR,
|
||||
EP2_ISR,
|
||||
EP4_ISR,
|
||||
EP6_ISR,
|
||||
EP8_ISR,
|
||||
IBN_ISR,
|
||||
EP0PINGNAK_ISR,
|
||||
EP1PINGNAK_ISR,
|
||||
EP2PINGNAK_ISR,
|
||||
EP4PINGNAK_ISR,
|
||||
EP6PINGNAK_ISR,
|
||||
EP8PINGNAK_ISR,
|
||||
ERRORLIMIT_ISR,
|
||||
EP2PIDERROR_ISR,
|
||||
EP4PIDERROR_ISR,
|
||||
EP6PIDERROR_ISR,
|
||||
EP8PIDERROR_ISR,
|
||||
EP2PFLAG_ISR,
|
||||
EP4PFLAG_ISR,
|
||||
EP6PFLAG_ISR,
|
||||
EP8PFLAG_ISR,
|
||||
EP2EFLAG_ISR,
|
||||
EP4EFLAG_ISR,
|
||||
EP6EFLAG_ISR,
|
||||
EP8EFLAG_ISR,
|
||||
EP2FFLAG_ISR,
|
||||
EP4FFLAG_ISR,
|
||||
EP6FFLAG_ISR,
|
||||
EP8FFLAG_ISR,
|
||||
GPIFCOMPLETE_ISR,
|
||||
GPIFWAVEFORM_ISR
|
||||
};
|
||||
|
||||
/*************************** Function Prototypes ***************************/
|
||||
__xdata uint8_t *usb_get_endpoint_cs_reg(uint8_t ep);
|
||||
void usb_reset_data_toggle(uint8_t ep);
|
||||
bool usb_handle_get_status(void);
|
||||
bool usb_handle_clear_feature(void);
|
||||
bool usb_handle_set_feature(void);
|
||||
bool usb_handle_get_descriptor(void);
|
||||
void usb_handle_set_interface(void);
|
||||
void usb_handle_setup_data(void);
|
||||
bool usb_handle_vcommands(void);
|
||||
void set_gpif_cnt(uint32_t count);
|
||||
|
||||
void i2c_recieve(void);
|
||||
void ep_init(void);
|
||||
void interrupt_init(void);
|
||||
void io_init(void);
|
||||
|
||||
#endif
|
||||
@@ -1,125 +0,0 @@
|
||||
; SPDX-License-Identifier: GPL-2.0-or-later
|
||||
;****************************************************************************
|
||||
; File : USBJmpTb.a51 *
|
||||
; Contents : Interruptions vector configuration. *
|
||||
; Based on openULINK project code by: Martin Schmoelzer. *
|
||||
; Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
; <aboudjelida@nanoxplore.com> *
|
||||
; <ahmederrachedbjld@gmail.com> *
|
||||
;****************************************************************************
|
||||
.module JUMPTABLE
|
||||
|
||||
.globl USB_AutoVector
|
||||
.globl USB_Jump_Table
|
||||
|
||||
.globl _sudav_isr, _sof_isr, _sutok_isr, _suspend_isr, _usbreset_isr, _highspeed_isr, _ep0ack_isr, _stub_isr, _ep0in_isr, _ep0out_isr, _ep1in_isr, _ep1out_isr, _ep2_isr, _ep4_isr, _ep6_isr, _ep8_isr, _ibn_isr
|
||||
.globl _ep0pingnak_isr, _ep1pingnak_isr, _ep2pingnak_isr, _ep4pingnak_isr, _ep6pingnak_isr, _ep8pingnak_isr, _errorlimit_isr, _stub_isr, _stub_isr, _stub_isr, _ep2piderror_isr, _ep4piderror_isr, _ep6piderror_isr, _ep8piderror_isr
|
||||
.globl _ep2pflag_isr, _ep4pflag_isr, _ep6pflag_isr, _ep8pflag_isr, _ep2eflag_isr, _ep4eflag_isr, _ep6eflag_isr, _ep8eflag_isr, _ep2fflag_isr, _ep4fflag_isr, _ep6fflag_isr, _ep8fflag_isr, _gpifcomplete_isr, _gpifwaveform_isr
|
||||
|
||||
;--------------------------------------------------------------------------;
|
||||
; Interrupt Vectors ;
|
||||
;--------------------------------------------------------------------------;
|
||||
.area USB_JV (ABS,OVR) ; Absolute, Overlay
|
||||
.org 0x43 ; USB interrupt (INT2) jumps here
|
||||
USB_AutoVector = #. + 2
|
||||
ljmp USB_Jump_Table ; Autovector will replace byte 45
|
||||
|
||||
;--------------------------------------------------------------------------;
|
||||
; USB Jump Table ;
|
||||
;--------------------------------------------------------------------------;
|
||||
.area USB_JT (ABS) ; Absolute placement
|
||||
.org 0x0200 ; Place jump table at 0x0200
|
||||
|
||||
USB_Jump_Table: ; autovector jump table
|
||||
ljmp _sudav_isr ; (00) Setup Data Available
|
||||
.db 0
|
||||
ljmp _sof_isr ; (04) Start of Frame
|
||||
.db 0
|
||||
ljmp _sutok_isr ; (08) Setup Data Loading
|
||||
.db 0
|
||||
ljmp _suspend_isr ; (0C) Global Suspend
|
||||
.db 0
|
||||
ljmp _usbreset_isr ; (10) USB Reset
|
||||
.db 0
|
||||
ljmp _highspeed_isr ; (14) Entered High Speed
|
||||
.db 0
|
||||
ljmp _ep0ack_isr ; (18) EP0ACK
|
||||
.db 0
|
||||
ljmp _stub_isr ; (1C) Reserved
|
||||
.db 0
|
||||
ljmp _ep0in_isr ; (20) EP0 In
|
||||
.db 0
|
||||
ljmp _ep0out_isr ; (24) EP0 Out
|
||||
.db 0
|
||||
ljmp _ep1in_isr ; (28) EP1 In
|
||||
.db 0
|
||||
ljmp _ep1out_isr ; (2C) EP1 Out
|
||||
.db 0
|
||||
ljmp _ep2_isr ; (30) EP2 In/Out
|
||||
.db 0
|
||||
ljmp _ep4_isr ; (34) EP4 In/Out
|
||||
.db 0
|
||||
ljmp _ep6_isr ; (38) EP6 In/Out
|
||||
.db 0
|
||||
ljmp _ep8_isr ; (3C) EP8 In/Out
|
||||
.db 0
|
||||
ljmp _ibn_isr ; (40) IBN
|
||||
.db 0
|
||||
ljmp _stub_isr ; (44) Reserved
|
||||
.db 0
|
||||
ljmp _ep0pingnak_isr ; (48) EP0 PING NAK
|
||||
.db 0
|
||||
ljmp _ep1pingnak_isr ; (4C) EP1 PING NAK
|
||||
.db 0
|
||||
ljmp _ep2pingnak_isr ; (50) EP2 PING NAK
|
||||
.db 0
|
||||
ljmp _ep4pingnak_isr ; (54) EP4 PING NAK
|
||||
.db 0
|
||||
ljmp _ep6pingnak_isr ; (58) EP6 PING NAK
|
||||
.db 0
|
||||
ljmp _ep8pingnak_isr ; (5C) EP8 PING NAK
|
||||
.db 0
|
||||
ljmp _errorlimit_isr ; (60) Error Limit
|
||||
.db 0
|
||||
ljmp _stub_isr ; (64) Reserved
|
||||
.db 0
|
||||
ljmp _stub_isr ; (68) Reserved
|
||||
.db 0
|
||||
ljmp _stub_isr ; (6C) Reserved
|
||||
.db 0
|
||||
ljmp _ep2piderror_isr ; (70) EP2 ISO Pid Sequence Error
|
||||
.db 0
|
||||
ljmp _ep4piderror_isr ; (74) EP4 ISO Pid Sequence Error
|
||||
.db 0
|
||||
ljmp _ep6piderror_isr ; (78) EP6 ISO Pid Sequence Error
|
||||
.db 0
|
||||
ljmp _ep8piderror_isr ; (7C) EP8 ISO Pid Sequence Error
|
||||
.db 0
|
||||
ljmp _ep2pflag_isr ; (80) EP2 Programmable Flag
|
||||
.db 0
|
||||
ljmp _ep4pflag_isr ; (84) EP4 Programmable Flag
|
||||
.db 0
|
||||
ljmp _ep6pflag_isr ; (88) EP6 Programmable Flag
|
||||
.db 0
|
||||
ljmp _ep8pflag_isr ; (8C) EP8 Programmable Flag
|
||||
.db 0
|
||||
ljmp _ep2eflag_isr ; (90) EP2 Empty Flag
|
||||
.db 0
|
||||
ljmp _ep4eflag_isr ; (94) EP4 Empty Flag
|
||||
.db 0
|
||||
ljmp _ep6eflag_isr ; (98) EP6 Empty Flag
|
||||
.db 0
|
||||
ljmp _ep8eflag_isr ; (9C) EP8 Empty Flag
|
||||
.db 0
|
||||
ljmp _ep2fflag_isr ; (A0) EP2 Full Flag
|
||||
.db 0
|
||||
ljmp _ep4fflag_isr ; (A4) EP4 Full Flag
|
||||
.db 0
|
||||
ljmp _ep6fflag_isr ; (A8) EP6 Full Flag
|
||||
.db 0
|
||||
ljmp _ep8fflag_isr ; (AC) EP8 Full Flag
|
||||
.db 0
|
||||
ljmp _gpifcomplete_isr ; (B0) GPIF Operation Complete
|
||||
.db 0
|
||||
ljmp _gpifwaveform_isr ; (B4) GPIF Waveform
|
||||
.db 0
|
||||
@@ -1,49 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/****************************************************************************
|
||||
File : delay.c *
|
||||
Contents : Delays handling fucntions code for NanoXplore *
|
||||
USB-JTAG ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#include "delay.h"
|
||||
#include <mcs51/compiler.h>
|
||||
|
||||
void syncdelay(uint8_t count)
|
||||
{
|
||||
for (uint8_t i = 0; i < count; i++)
|
||||
NOP();
|
||||
}
|
||||
|
||||
void delay_5us(void)
|
||||
{
|
||||
NOP();
|
||||
}
|
||||
|
||||
void delay_1ms(void)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
for (i = 0; i < 598; i++)
|
||||
;
|
||||
}
|
||||
|
||||
void delay_us(uint16_t delay)
|
||||
{
|
||||
uint16_t i;
|
||||
uint16_t maxcount = (delay / 5);
|
||||
|
||||
for (i = 0; i < maxcount; i++)
|
||||
delay_5us();
|
||||
}
|
||||
|
||||
void delay_ms(uint16_t delay)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
for (i = 0; i < delay; i++)
|
||||
delay_1ms();
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/*
|
||||
This program configures the General Programmable Interface (GPIF) for FX2.
|
||||
Please do not modify sections of text which are marked as "DO NOT EDIT ...".
|
||||
*/
|
||||
|
||||
/* GPIF Program Code */
|
||||
|
||||
#include "reg_ezusb.h"
|
||||
#include "delay.h"
|
||||
|
||||
/****************************** GPIF PROGRAM CODE ********************************/
|
||||
/* DO NOT EDIT ... */
|
||||
const char wavedata[128] = {
|
||||
// Wave 0
|
||||
/* LenBr */ 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
|
||||
/* Opcode*/ 0x02, 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
|
||||
/* Output*/ 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
/* LFun */ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
// Wave 1
|
||||
/* LenBr */ 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
|
||||
/* Opcode*/ 0x02, 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
|
||||
/* Output*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
/* LFun */ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
// Wave 2
|
||||
/* LenBr */ 0x01, 0xBF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
|
||||
/* Opcode*/ 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* Output*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
/* LFun */ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
// Wave 3
|
||||
/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
|
||||
/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* Output*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
};
|
||||
/* END DO NOT EDIT */
|
||||
|
||||
/* DO NOT EDIT ... */
|
||||
const char flowstates[36] = {
|
||||
/* Wave 0 flowstates */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* Wave 1 flowstates */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* Wave 2 flowstates */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* Wave 3 flowstates */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
/* END DO NOT EDIT */
|
||||
|
||||
/* DO NOT EDIT ... */
|
||||
const char initdata[7] = {
|
||||
/* Regs */ 0xE0, 0x00, 0x00, 0x03, 0xEE, 0xF1, 0x00
|
||||
};
|
||||
/* END DO NOT EDIT */
|
||||
|
||||
void gpif_init(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
IFCONFIG = 0xEE;
|
||||
|
||||
GPIFABORT = 0xFF; /* abort any waveforms pending */
|
||||
GPIFREADYCFG = initdata[0];
|
||||
GPIFCTLCFG = initdata[1];
|
||||
GPIFIDLECS = initdata[2];
|
||||
GPIFIDLECTL = initdata[3];
|
||||
GPIFWFSELECT = initdata[5];
|
||||
GPIFREADYSTAT = initdata[6];
|
||||
|
||||
/* use dual autopointer feature... */
|
||||
AUTOPTRSETUP = 0x07;
|
||||
|
||||
/* source */
|
||||
AUTOPTRH1 = (uint8_t)(((uint16_t)(&wavedata) >> 8) & 0xff);
|
||||
AUTOPTRL1 = (uint8_t)((uint16_t)(&wavedata) & 0xff);
|
||||
|
||||
/* destination */
|
||||
AUTOPTRH2 = 0xE4;
|
||||
AUTOPTRL2 = 0x00;
|
||||
|
||||
/* transfer */
|
||||
for (i = 0x00; i < 128; i++)
|
||||
EXTAUTODAT2 = EXTAUTODAT1;
|
||||
|
||||
/* GPIF address pins update when GPIFADRH/L written */
|
||||
syncdelay(3);
|
||||
GPIFADRH = 0x00; /* bits[7:1] always 0 */
|
||||
syncdelay(3);
|
||||
GPIFADRL = 0x00; /* point to PERIPHERAL address 0x0000 */
|
||||
|
||||
/* Configure GPIF flowstates registers for Wave 0 of wavedata */
|
||||
FLOWSTATE = flowstates[0];
|
||||
FLOWLOGIC = flowstates[1];
|
||||
FLOWEQ0CTL = flowstates[2];
|
||||
FLOWEQ1CTL = flowstates[3];
|
||||
FLOWHOLDOFF = flowstates[4];
|
||||
FLOWSTB = flowstates[5];
|
||||
FLOWSTBEDGE = flowstates[6];
|
||||
FLOWSTBHPERIOD = flowstates[7];
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/****************************************************************************
|
||||
File : i2c.cpp *
|
||||
Contents : i2c bit-bang library *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#include "i2c.h"
|
||||
#include "io.h"
|
||||
#include "delay.h"
|
||||
#include "reg_ezusb.h"
|
||||
|
||||
bool get_status(void)
|
||||
{
|
||||
PIN_SDA_DIR = 1;
|
||||
OEA = 0xF7;
|
||||
delay_us(1);
|
||||
bool sda_state = PIN_SDA;
|
||||
PIN_T0 = sda_state;
|
||||
delay_us(1);
|
||||
OEA = 0xFF;
|
||||
delay_us(1);
|
||||
return sda_state;
|
||||
}
|
||||
|
||||
void start_cd(void)
|
||||
{
|
||||
PIN_SDA_DIR = 0; // SP6 SDA: OUT
|
||||
delay_us(10);
|
||||
PIN_SDA = 0;
|
||||
delay_us(1);
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
void repeated_start(void)
|
||||
{
|
||||
PIN_SDA = 1;
|
||||
delay_us(1);
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
PIN_SDA = 0;
|
||||
delay_us(1);
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
void stop_cd(void)
|
||||
{
|
||||
PIN_SDA = 0;
|
||||
delay_us(1);
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
PIN_SDA = 1;
|
||||
delay_us(1);
|
||||
PIN_SDA_DIR = 1; // SP6 SDA: IN
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
void clock_cd(void)
|
||||
{
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
void send_ack(void)
|
||||
{
|
||||
PIN_SDA = 0;
|
||||
delay_us(1);
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
void send_nack(void)
|
||||
{
|
||||
PIN_SDA = 1;
|
||||
delay_us(1);
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
}
|
||||
|
||||
bool get_ack(void)
|
||||
{
|
||||
PIN_SDA_DIR = 1; // SP6 SDA: IN
|
||||
delay_us(1);
|
||||
OEA = 0xF7; // FX2 SDA: IN
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
bool ack = PIN_SDA;
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
OEA = 0xFF; // FX2 SDA: OUT
|
||||
PIN_SDA_DIR = 0; // SP6 SDA: OUT
|
||||
delay_us(1);
|
||||
return ack;
|
||||
}
|
||||
|
||||
/* here address(8 bits) = adr (7 bits) + type (1 bit) */
|
||||
uint8_t get_address(uint8_t adr, uint8_t rdwr)
|
||||
{
|
||||
adr &= 0x7F;
|
||||
adr = adr << 1;
|
||||
adr |= (rdwr & 0x01);
|
||||
return adr;
|
||||
}
|
||||
|
||||
/* here send bit after bit and clocking scl with each bit */
|
||||
void send_byte(uint8_t input)
|
||||
{
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
if ((input & 0x80)) {
|
||||
PIN_SDA = 1;
|
||||
delay_us(1);
|
||||
clock_cd();
|
||||
} else {
|
||||
PIN_SDA = 0;
|
||||
delay_us(1);
|
||||
clock_cd();
|
||||
}
|
||||
input = input << 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* here receive bit after bit and clocking scl with each bit */
|
||||
|
||||
uint8_t receive_byte(void)
|
||||
{
|
||||
PIN_SDA_DIR = 1; // SP6 SDA: IN
|
||||
OEA = 0xF7; // FX2 SDA: IN
|
||||
uint8_t input = 0x00;
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
PIN_SCL = 1;
|
||||
delay_us(1);
|
||||
input = input << 1;
|
||||
if (PIN_SDA == 1)
|
||||
input |= 0x01;
|
||||
else
|
||||
input |= 0X00;
|
||||
|
||||
PIN_SCL = 0;
|
||||
delay_us(1);
|
||||
}
|
||||
OEA = 0xFF; // FX2 SDA: OUT
|
||||
PIN_SDA_DIR = 0; // SP6 SDA: OUT
|
||||
return input;
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/****************************************************************************
|
||||
File : main.c *
|
||||
Contents : main code for NanoXplore USB-JTAG ANGIE adapter *
|
||||
hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#include "usb.h"
|
||||
#include "serial.h"
|
||||
#include "delay.h"
|
||||
#include "reg_ezusb.h"
|
||||
#include <stdio.h>
|
||||
|
||||
extern void sudav_isr(void)__interrupt SUDAV_ISR;
|
||||
extern void sof_isr(void)__interrupt;
|
||||
extern void sutok_isr(void)__interrupt;
|
||||
extern void suspend_isr(void)__interrupt;
|
||||
extern void usbreset_isr(void)__interrupt;
|
||||
extern void highspeed_isr(void)__interrupt;
|
||||
extern void ep0ack_isr(void)__interrupt;
|
||||
extern void stub_isr(void)__interrupt;
|
||||
extern void ep0in_isr(void)__interrupt;
|
||||
extern void ep0out_isr(void)__interrupt;
|
||||
extern void ep1in_isr(void)__interrupt;
|
||||
extern void ep1out_isr(void)__interrupt;
|
||||
extern void ep2_isr(void)__interrupt;
|
||||
extern void ep4_isr(void)__interrupt;
|
||||
extern void ep6_isr(void)__interrupt;
|
||||
extern void ep8_isr(void)__interrupt;
|
||||
extern void ibn_isr(void)__interrupt;
|
||||
extern void ep0pingnak_isr(void)__interrupt;
|
||||
extern void ep1pingnak_isr(void)__interrupt;
|
||||
extern void ep2pingnak_isr(void)__interrupt;
|
||||
extern void ep4pingnak_isr(void)__interrupt;
|
||||
extern void ep6pingnak_isr(void)__interrupt;
|
||||
extern void ep8pingnak_isr(void)__interrupt;
|
||||
extern void errorlimit_isr(void)__interrupt;
|
||||
extern void ep2piderror_isr(void)__interrupt;
|
||||
extern void ep4piderror_isr(void)__interrupt;
|
||||
extern void ep6piderror_isr(void)__interrupt;
|
||||
extern void ep8piderror_isr(void)__interrupt;
|
||||
extern void ep2pflag_isr(void)__interrupt;
|
||||
extern void ep4pflag_isr(void)__interrupt;
|
||||
extern void ep6pflag_isr(void)__interrupt;
|
||||
extern void ep8pflag_isr(void)__interrupt;
|
||||
extern void ep2eflag_isr(void)__interrupt;
|
||||
extern void ep4eflag_isr(void)__interrupt;
|
||||
extern void ep6eflag_isr(void)__interrupt;
|
||||
extern void ep8eflag_isr(void)__interrupt;
|
||||
extern void ep2fflag_isr(void)__interrupt;
|
||||
extern void ep4fflag_isr(void)__interrupt;
|
||||
extern void ep6fflag_isr(void)__interrupt;
|
||||
extern void ep8fflag_isr(void)__interrupt;
|
||||
extern void gpifcomplete_isr(void)__interrupt;
|
||||
extern void gpifwaveform_isr(void)__interrupt;
|
||||
|
||||
void gpif_init(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CPUCS = ((CPUCS & ~bmclkspd) | (CLK_48M << 3) | CLKOE); /* required for sio0_init */
|
||||
sio0_init(115200); /* needed for printf */
|
||||
|
||||
ep_init();
|
||||
gpif_init();
|
||||
interrupt_init();
|
||||
io_init();
|
||||
|
||||
/* Perform ReNumeration */
|
||||
USBCS |= (DISCON | RENUM);
|
||||
delay_ms(50);
|
||||
USBCS &= ~DISCON;
|
||||
|
||||
/* stay here */
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/*
|
||||
* This code was taken from the fx2lib project from this link:
|
||||
* https://github.com/djmuhlestein/fx2lib
|
||||
*
|
||||
* Copyright (C) 2009 Ubixum, Inc.
|
||||
*/
|
||||
|
||||
#include <reg_ezusb.h>
|
||||
#include <fx2macros.h>
|
||||
#include <serial.h>
|
||||
#include <stdint.h>
|
||||
/**
|
||||
* using the comp port implies that timer 2 will be used as
|
||||
* a baud rate generator. (Don't use timer 2)
|
||||
**/
|
||||
void sio0_init(uint32_t baud_rate) __critical
|
||||
{
|
||||
uint16_t hl; /* hl value for reload */
|
||||
uint8_t mult; /* multiplier for clock speed */
|
||||
uint32_t tmp; /* scratch for mult/divide */
|
||||
|
||||
mult = (CPUFREQ == CLK_12M) ? 1 : ((CPUFREQ == CLK_24M) ? 2 : 4);
|
||||
|
||||
/* set the clock rate */
|
||||
/* use clock 2 */
|
||||
RCLK = 1; TCLK = 1;
|
||||
tmp = mult * 375000L * 2;
|
||||
tmp /= baud_rate;
|
||||
tmp += 1;
|
||||
tmp /= 2;
|
||||
hl = 0xFFFF - (uint16_t)tmp;
|
||||
RCAP2H = (uint8_t)(((uint16_t)(hl) >> 8) & 0xff);
|
||||
|
||||
/* seems that the 24/48mhz calculations are always one less than suggested values */
|
||||
/* trm table 14-16 */
|
||||
RCAP2L = ((uint8_t)((uint16_t)(hl) & 0xff)) + (mult > 0 ? 1 : 0);
|
||||
|
||||
/* start the timer */
|
||||
TR2 = 1;
|
||||
|
||||
/* set up the serial port */
|
||||
SM0 = 0; SM1 = 1; /* serial mode 1 (asyncronous) */
|
||||
SM2 = 0 ; /* has to do with receiving */
|
||||
REN = 1 ; /* to enable receiving */
|
||||
PCON |= 0x80; /* SET SMOD0, baud rate doubler */
|
||||
TI = 1; /* we send initial byte */
|
||||
}
|
||||
|
||||
int getchar(void)
|
||||
{
|
||||
char c;
|
||||
while (!RI)
|
||||
;
|
||||
c = SBUF0;
|
||||
RI = 0;
|
||||
return c;
|
||||
}
|
||||
|
||||
void _transchar(char c)
|
||||
{
|
||||
while (!TI)
|
||||
; /* wait for TI=1 */
|
||||
TI = 0;
|
||||
SBUF0 = c;
|
||||
}
|
||||
|
||||
int putchar (char c)
|
||||
{
|
||||
if (c == '\n')
|
||||
_transchar('\r'); /* transmit \r\n */
|
||||
_transchar(c);
|
||||
if (c == '\r')
|
||||
_transchar('\n'); /* transmit \r\n */
|
||||
return c;
|
||||
}
|
||||
@@ -1,857 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/****************************************************************************
|
||||
File : usb.c *
|
||||
Contents : usb communication handling code for NanoXplore USB-JTAG *
|
||||
ANGIE adapter hardware. *
|
||||
Based on openULINK project code by: Martin Schmoelzer. *
|
||||
Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
|
||||
<aboudjelida@nanoxplore.com> *
|
||||
<ahmederrachedbjld@gmail.com> *
|
||||
*****************************************************************************/
|
||||
|
||||
#include "usb.h"
|
||||
#include "delay.h"
|
||||
#include "io.h"
|
||||
#include "reg_ezusb.h"
|
||||
#include "fx2macros.h"
|
||||
#include "serial.h"
|
||||
#include "i2c.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// #define PRINTF_DEBUG
|
||||
|
||||
volatile __xdata __at 0xE6B8 struct setup_data setup_data;
|
||||
|
||||
/* Define number of endpoints (except Control Endpoint 0) in a central place.
|
||||
* Be sure to include the necessary endpoint descriptors!
|
||||
*/
|
||||
#define NUM_ENDPOINTS 2
|
||||
|
||||
__code struct usb_device_descriptor device_descriptor = {
|
||||
.blength = sizeof(struct usb_device_descriptor),
|
||||
.bdescriptortype = DESCRIPTOR_TYPE_DEVICE,
|
||||
.bcdusb = 0x0200, /* BCD: 02.00 (Version 2.0 USB spec) */
|
||||
.bdeviceclass = 0xEF,
|
||||
.bdevicesubclass = 0x02,
|
||||
.bdeviceprotocol = 0x01,
|
||||
.bmaxpacketsize0 = 64,
|
||||
.idvendor = 0x584e,
|
||||
.idproduct = 0x414f,
|
||||
.bcddevice = 0x0000,
|
||||
.imanufacturer = 1,
|
||||
.iproduct = 2,
|
||||
.iserialnumber = 3,
|
||||
.bnumconfigurations = 1
|
||||
};
|
||||
|
||||
/* WARNING: ALL config, interface and endpoint descriptors MUST be adjacent! */
|
||||
__code struct usb_config_descriptor config_descriptor = {
|
||||
.blength = sizeof(struct usb_config_descriptor),
|
||||
.bdescriptortype = DESCRIPTOR_TYPE_CONFIGURATION,
|
||||
.wtotallength = sizeof(struct usb_config_descriptor) +
|
||||
2 * sizeof(struct usb_interface_descriptor) +
|
||||
((NUM_ENDPOINTS * 2) * sizeof(struct usb_endpoint_descriptor)),
|
||||
.bnuminterfaces = 2,
|
||||
.bconfigurationvalue = 1,
|
||||
.iconfiguration = 2, /* String describing this configuration */
|
||||
.bmattributes = 0x80, /* Only MSB set according to USB spec */
|
||||
.maxpower = 50 /* 100 mA */
|
||||
};
|
||||
|
||||
__code struct usb_interface_descriptor interface_descriptor00 = {
|
||||
.blength = sizeof(struct usb_interface_descriptor),
|
||||
.bdescriptortype = DESCRIPTOR_TYPE_INTERFACE,
|
||||
.binterfacenumber = 0,
|
||||
.balternatesetting = 0,
|
||||
.bnumendpoints = NUM_ENDPOINTS,
|
||||
.binterfaceclass = 0XFF,
|
||||
.binterfacesubclass = 0x00,
|
||||
.binterfaceprotocol = 0x00,
|
||||
.iinterface = 0
|
||||
};
|
||||
|
||||
__code struct usb_endpoint_descriptor bulk_ep2_endpoint_descriptor = {
|
||||
.blength = sizeof(struct usb_endpoint_descriptor),
|
||||
.bdescriptortype = 0x05,
|
||||
.bendpointaddress = (2 | USB_DIR_OUT),
|
||||
.bmattributes = 0x02,
|
||||
.wmaxpacketsize = 512,
|
||||
.binterval = 0
|
||||
};
|
||||
|
||||
__code struct usb_endpoint_descriptor bulk_ep4_endpoint_descriptor = {
|
||||
.blength = sizeof(struct usb_endpoint_descriptor),
|
||||
.bdescriptortype = 0x05,
|
||||
.bendpointaddress = (4 | USB_DIR_IN),
|
||||
.bmattributes = 0x02,
|
||||
.wmaxpacketsize = 512,
|
||||
.binterval = 0
|
||||
};
|
||||
|
||||
__code struct usb_interface_descriptor interface_descriptor01 = {
|
||||
.blength = sizeof(struct usb_interface_descriptor),
|
||||
.bdescriptortype = DESCRIPTOR_TYPE_INTERFACE,
|
||||
.binterfacenumber = 1,
|
||||
.balternatesetting = 0,
|
||||
.bnumendpoints = NUM_ENDPOINTS,
|
||||
.binterfaceclass = 0x0A,
|
||||
.binterfacesubclass = 0x00,
|
||||
.binterfaceprotocol = 0x00,
|
||||
.iinterface = 0
|
||||
};
|
||||
|
||||
__code struct usb_endpoint_descriptor bulk_ep6_out_endpoint_descriptor = {
|
||||
.blength = sizeof(struct usb_endpoint_descriptor),
|
||||
.bdescriptortype = 0x05,
|
||||
.bendpointaddress = (6 | USB_DIR_OUT),
|
||||
.bmattributes = 0x02,
|
||||
.wmaxpacketsize = 512,
|
||||
.binterval = 0
|
||||
};
|
||||
|
||||
__code struct usb_endpoint_descriptor bulk_ep8_in_endpoint_descriptor = {
|
||||
.blength = sizeof(struct usb_endpoint_descriptor),
|
||||
.bdescriptortype = 0x05,
|
||||
.bendpointaddress = (8 | USB_DIR_IN),
|
||||
.bmattributes = 0x02,
|
||||
.wmaxpacketsize = 512,
|
||||
.binterval = 0
|
||||
};
|
||||
__code struct usb_language_descriptor language_descriptor = {
|
||||
.blength = 4,
|
||||
.bdescriptortype = DESCRIPTOR_TYPE_STRING,
|
||||
.wlangid = 0x0409 /* US English */
|
||||
};
|
||||
|
||||
__code struct usb_string_descriptor strmanufacturer =
|
||||
STR_DESCR(16, 'N', 'a', 'n', 'o', 'X', 'p', 'l', 'o', 'r', 'e', ',', ' ', 'S', 'A', 'S', '.');
|
||||
|
||||
__code struct usb_string_descriptor strproduct =
|
||||
STR_DESCR(13, 'A', 'N', 'G', 'I', 'E', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r');
|
||||
|
||||
__code struct usb_string_descriptor strserialnumber =
|
||||
STR_DESCR(6, '0', '0', '0', '0', '0', '1');
|
||||
|
||||
/* Table containing pointers to string descriptors */
|
||||
__code struct usb_string_descriptor *__code en_string_descriptors[3] = {
|
||||
&strmanufacturer,
|
||||
&strproduct,
|
||||
&strserialnumber
|
||||
};
|
||||
void sudav_isr(void)__interrupt SUDAV_ISR
|
||||
{
|
||||
EXIF &= ~0x10; /* Clear USBINT: Main global interrupt */
|
||||
USBIRQ = SUDAVI;
|
||||
EP0CS |= HSNAK;
|
||||
usb_handle_setup_data();
|
||||
}
|
||||
void sof_isr(void)__interrupt SOF_ISR
|
||||
{
|
||||
}
|
||||
void sutok_isr(void)__interrupt SUTOK_ISR
|
||||
{
|
||||
}
|
||||
void suspend_isr(void)__interrupt SUSPEND_ISR
|
||||
{
|
||||
}
|
||||
void usbreset_isr(void)__interrupt USBRESET_ISR
|
||||
{
|
||||
}
|
||||
void highspeed_isr(void)__interrupt HIGHSPEED_ISR
|
||||
{
|
||||
}
|
||||
void ep0ack_isr(void)__interrupt EP0ACK_ISR
|
||||
{
|
||||
}
|
||||
void stub_isr(void)__interrupt STUB_ISR
|
||||
{
|
||||
}
|
||||
void ep0in_isr(void)__interrupt EP0IN_ISR
|
||||
{
|
||||
}
|
||||
void ep0out_isr(void)__interrupt EP0OUT_ISR
|
||||
{
|
||||
}
|
||||
void ep1in_isr(void)__interrupt EP1IN_ISR
|
||||
{
|
||||
}
|
||||
void ep1out_isr(void)__interrupt EP1OUT_ISR
|
||||
{
|
||||
}
|
||||
void ep2_isr(void)__interrupt EP2_ISR
|
||||
{
|
||||
}
|
||||
void ep4_isr(void)__interrupt EP4_ISR
|
||||
{
|
||||
}
|
||||
void ep6_isr(void)__interrupt EP6_ISR
|
||||
{
|
||||
REVCTL = 0; /* REVCTL.0 and REVCTL.1 set to 0 */
|
||||
i2c_recieve(); /* Execute I2C communication */
|
||||
EXIF &= ~0x10; /* Clear USBINT: Main global interrupt */
|
||||
EPIRQ = 0x40; /* Clear individual EP6OUT IRQ */
|
||||
}
|
||||
void ep8_isr(void)__interrupt EP8_ISR
|
||||
{
|
||||
EXIF &= ~0x10; /* Clear USBINT: Main global interrupt */
|
||||
EPIRQ = 0x80; /* Clear individual EP8IN IRQ */
|
||||
}
|
||||
void ibn_isr(void)__interrupt IBN_ISR
|
||||
{
|
||||
}
|
||||
void ep0pingnak_isr(void)__interrupt EP0PINGNAK_ISR
|
||||
{
|
||||
}
|
||||
void ep1pingnak_isr(void)__interrupt EP1PINGNAK_ISR
|
||||
{
|
||||
}
|
||||
void ep2pingnak_isr(void)__interrupt EP2PINGNAK_ISR
|
||||
{
|
||||
}
|
||||
void ep4pingnak_isr(void)__interrupt EP4PINGNAK_ISR
|
||||
{
|
||||
}
|
||||
void ep6pingnak_isr(void)__interrupt EP6PINGNAK_ISR
|
||||
{
|
||||
}
|
||||
void ep8pingnak_isr(void)__interrupt EP8PINGNAK_ISR
|
||||
{
|
||||
}
|
||||
void errorlimit_isr(void)__interrupt ERRORLIMIT_ISR
|
||||
{
|
||||
}
|
||||
void ep2piderror_isr(void)__interrupt EP2PIDERROR_ISR
|
||||
{
|
||||
}
|
||||
void ep4piderror_isr(void)__interrupt EP4PIDERROR_ISR
|
||||
{
|
||||
}
|
||||
void ep6piderror_isr(void)__interrupt EP6PIDERROR_ISR
|
||||
{
|
||||
}
|
||||
void ep8piderror_isr(void)__interrupt EP8PIDERROR_ISR
|
||||
{
|
||||
}
|
||||
void ep2pflag_isr(void)__interrupt EP2PFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep4pflag_isr(void)__interrupt EP4PFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep6pflag_isr(void)__interrupt EP6PFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep8pflag_isr(void)__interrupt EP8PFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep2eflag_isr(void)__interrupt EP2EFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep4eflag_isr(void)__interrupt EP4EFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep6eflag_isr(void)__interrupt EP6EFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep8eflag_isr(void)__interrupt EP8EFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep2fflag_isr(void)__interrupt EP2FFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep4fflag_isr(void)__interrupt EP4FFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep6fflag_isr(void)__interrupt EP6FFLAG_ISR
|
||||
{
|
||||
}
|
||||
void ep8fflag_isr(void)__interrupt EP8FFLAG_ISR
|
||||
{
|
||||
}
|
||||
void gpifcomplete_isr(void)__interrupt GPIFCOMPLETE_ISR
|
||||
{
|
||||
}
|
||||
void gpifwaveform_isr(void)__interrupt GPIFWAVEFORM_ISR
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the control/status register for an endpoint
|
||||
*
|
||||
* @param ep endpoint address
|
||||
* @return on success: pointer to Control & Status register for endpoint
|
||||
* specified in \a ep
|
||||
* @return on failure: NULL
|
||||
*/
|
||||
__xdata uint8_t *usb_get_endpoint_cs_reg(uint8_t ep)
|
||||
{
|
||||
/* Mask direction bit */
|
||||
uint8_t ep_num = ep & ~0x80;
|
||||
|
||||
switch (ep_num) {
|
||||
case 0:
|
||||
return &EP0CS;
|
||||
case 1:
|
||||
return ep & 0x80 ? &EP1INCS : &EP1OUTCS;
|
||||
case 2:
|
||||
return &EP2CS;
|
||||
case 4:
|
||||
return &EP4CS;
|
||||
case 6:
|
||||
return &EP6CS;
|
||||
case 8:
|
||||
return &EP8CS;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void usb_reset_data_toggle(uint8_t ep)
|
||||
{
|
||||
/* TOGCTL register:
|
||||
+----+-----+-----+------+-----+-------+-------+-------+
|
||||
| Q | S | R | IO | EP3 | EP2 | EP1 | EP0 |
|
||||
+----+-----+-----+------+-----+-------+-------+-------+
|
||||
|
||||
To reset data toggle bits, we have to write the endpoint direction (IN/OUT)
|
||||
to the IO bit and the endpoint number to the EP2..EP0 bits. Then, in a
|
||||
separate write cycle, the R bit needs to be set.
|
||||
*/
|
||||
TOGCTL = (((ep & 0x80) >> 3) + (ep & 0x0F));
|
||||
TOGCTL |= BMRESETTOGGLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle CLEAR_FEATURE request.
|
||||
*
|
||||
* @return on success: true
|
||||
* @return on failure: false
|
||||
*/
|
||||
bool usb_handle_clear_feature(void)
|
||||
{
|
||||
__xdata uint8_t *ep_cs;
|
||||
|
||||
switch (setup_data.bmrequesttype) {
|
||||
case CF_DEVICE:
|
||||
/* Clear remote wakeup not supported: stall EP0 */
|
||||
STALL_EP0();
|
||||
break;
|
||||
case CF_ENDPOINT:
|
||||
if (setup_data.wvalue == 0) {
|
||||
/* Unstall the endpoint specified in wIndex */
|
||||
ep_cs = usb_get_endpoint_cs_reg(setup_data.windex);
|
||||
if (!ep_cs)
|
||||
return false;
|
||||
*ep_cs &= ~EPSTALL;
|
||||
} else {
|
||||
/* Unsupported feature, stall EP0 */
|
||||
STALL_EP0();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Vendor commands... */
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle SET_FEATURE request.
|
||||
*
|
||||
* @return on success: true
|
||||
* @return on failure: false
|
||||
*/
|
||||
bool usb_handle_set_feature(void)
|
||||
{
|
||||
__xdata uint8_t *ep_cs;
|
||||
|
||||
switch (setup_data.bmrequesttype) {
|
||||
case SF_DEVICE:
|
||||
if (setup_data.wvalue == 2)
|
||||
return true;
|
||||
break;
|
||||
case SF_ENDPOINT:
|
||||
if (setup_data.wvalue == 0) {
|
||||
/* Stall the endpoint specified in wIndex */
|
||||
ep_cs = usb_get_endpoint_cs_reg(setup_data.windex);
|
||||
if (!ep_cs)
|
||||
return false;
|
||||
*ep_cs |= EPSTALL;
|
||||
} else {
|
||||
/* Unsupported endpoint feature */
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Vendor commands... */
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle GET_DESCRIPTOR request.
|
||||
*
|
||||
* @return on success: true
|
||||
* @return on failure: false
|
||||
*/
|
||||
bool usb_handle_get_descriptor(void)
|
||||
{
|
||||
__xdata uint8_t descriptor_type;
|
||||
__xdata uint8_t descriptor_index;
|
||||
|
||||
descriptor_type = (setup_data.wvalue & 0xff00) >> 8;
|
||||
descriptor_index = setup_data.wvalue & 0x00ff;
|
||||
|
||||
switch (descriptor_type) {
|
||||
case DESCRIPTOR_TYPE_DEVICE:
|
||||
SUDPTRH = HI8(&device_descriptor);
|
||||
SUDPTRL = LO8(&device_descriptor);
|
||||
break;
|
||||
case DESCRIPTOR_TYPE_CONFIGURATION:
|
||||
SUDPTRH = HI8(&config_descriptor);
|
||||
SUDPTRL = LO8(&config_descriptor);
|
||||
break;
|
||||
case DESCRIPTOR_TYPE_STRING:
|
||||
if (setup_data.windex == 0) {
|
||||
/* Supply language descriptor */
|
||||
__xdata struct usb_language_descriptor temp_descriptor;
|
||||
memcpy(&temp_descriptor, &language_descriptor, sizeof(language_descriptor));
|
||||
SUDPTRH = HI8(&temp_descriptor);
|
||||
SUDPTRL = LO8(&temp_descriptor);
|
||||
} else if (setup_data.windex == 0x0409 /* US English */) {
|
||||
/* Supply string descriptor */
|
||||
__xdata uint8_t temp_descriptors[3];
|
||||
memcpy(temp_descriptors, en_string_descriptors[descriptor_index - 1],
|
||||
((struct usb_string_descriptor *)en_string_descriptors[descriptor_index - 1])->blength);
|
||||
SUDPTRH = HI8(temp_descriptors);
|
||||
SUDPTRL = LO8(temp_descriptors);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Unsupported descriptor type */
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle SET_INTERFACE request.
|
||||
*/
|
||||
void usb_handle_set_interface(void)
|
||||
{
|
||||
/* Reset Data Toggle */
|
||||
usb_reset_data_toggle(USB_DIR_OUT | 2);
|
||||
usb_reset_data_toggle(USB_DIR_IN | 4);
|
||||
usb_reset_data_toggle(USB_DIR_OUT | 6);
|
||||
usb_reset_data_toggle(USB_DIR_IN | 8);
|
||||
|
||||
/* Unstall all valid OUT endpoints, reset bytecounts */
|
||||
EP2CS = 0;
|
||||
EP4CS = 0;
|
||||
EP6CS = 0;
|
||||
EP8CS = 0;
|
||||
syncdelay(3);
|
||||
EP2BCH = 0;
|
||||
EP2BCL = 0x80;
|
||||
syncdelay(3);
|
||||
EP4BCH = 0;
|
||||
EP4BCL = 0x80;
|
||||
syncdelay(3);
|
||||
EP6BCH = 0;
|
||||
EP6BCL = 0x80;
|
||||
syncdelay(3);
|
||||
EP8BCH = 0;
|
||||
EP8BCL = 0x80;
|
||||
syncdelay(3);
|
||||
}
|
||||
|
||||
/* Initialize GPIF interface transfer count */
|
||||
void set_gpif_cnt(uint32_t count)
|
||||
{
|
||||
GPIFTCB3 = (uint8_t)(((uint32_t)(count) >> 24) & 0x000000ff);
|
||||
syncdelay(3);
|
||||
GPIFTCB2 = (uint8_t)(((uint32_t)(count) >> 16) & 0x000000ff);
|
||||
syncdelay(3);
|
||||
GPIFTCB1 = (uint8_t)(((uint32_t)(count) >> 8) & 0x000000ff);
|
||||
syncdelay(3);
|
||||
GPIFTCB0 = (uint8_t)((uint32_t)(count) & 0x000000ff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Vendor commands handling:
|
||||
*/
|
||||
#define VR_CFGOPEN 0xB0
|
||||
#define VR_DATAOUTOPEN 0xB2
|
||||
|
||||
uint8_t ix;
|
||||
uint8_t bcnt;
|
||||
uint8_t __xdata *eptr;
|
||||
uint16_t wcnt;
|
||||
uint32_t __xdata gcnt;
|
||||
bool usb_handle_vcommands(void)
|
||||
{
|
||||
eptr = EP0BUF; /* points to EP0BUF 64-byte register */
|
||||
wcnt = setup_data.wlength; /* total transfer count */
|
||||
|
||||
/* Clear EP0BUF for OUT requests */
|
||||
if (setup_data.bmrequesttype & 0x80) {
|
||||
bcnt = ((wcnt > 64) ? 64 : wcnt);
|
||||
for (ix = 0; ix < bcnt; ix++)
|
||||
eptr[ix] = 0;
|
||||
}
|
||||
|
||||
switch (setup_data.brequest) {
|
||||
case VR_CFGOPEN:
|
||||
/* Clear bytecount / to allow new data in / to stops NAKing */
|
||||
EP0BCH = 0;
|
||||
EP0BCL = 0;
|
||||
while (EP0CS & EPBSY)
|
||||
; /* wait to finish transferring in EP0BUF, until not busy */
|
||||
gcnt = ((uint32_t)(eptr[0]) << 24) | ((uint32_t)(eptr[1]) << 16)
|
||||
| ((uint32_t)(eptr[2]) << 8) | (uint32_t)(eptr[3]);
|
||||
/* Angie board FPGA bitstream download */
|
||||
switch ((setup_data.wvalue) & 0x00C0) {
|
||||
case 0x00:
|
||||
/* Apply RPGM- pulse */
|
||||
PIN_PROGRAM_B = 0;
|
||||
syncdelay(1);
|
||||
/* Negate RPGM- pulse */
|
||||
PIN_PROGRAM_B = 1;
|
||||
/* FPGA init time < 10mS */
|
||||
delay_ms(10);
|
||||
/* Initialize GPIF interface transfer count */
|
||||
set_gpif_cnt(gcnt);
|
||||
PIN_RDWR_B = 0;
|
||||
PIN_SDA = 0;
|
||||
/* Trigger GPIF OUT transfer on EP2 */
|
||||
GPIFTRIG = GPIF_EP2;
|
||||
while (!(GPIFTRIG & BMGPIFDONE)) // poll GPIFTRIG.7 GPIF Done bit
|
||||
;
|
||||
PIN_SDA = 1;
|
||||
PIN_RDWR_B = 1;
|
||||
#ifdef PRINTF_DEBUG
|
||||
printf("Program SP6 Done.\n");
|
||||
#endif
|
||||
/* Choose wich Waveform to use */
|
||||
GPIFWFSELECT = 0xF6;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case VR_DATAOUTOPEN:
|
||||
/* Clear bytecount / to allow new data in / to stops NAKing */
|
||||
EP0BCH = 0;
|
||||
EP0BCL = 0;
|
||||
while (EP0CS & EPBSY)
|
||||
; /* wait to finish transferring in EP0BUF, until not busy */
|
||||
gcnt = ((uint32_t)(eptr[0]) << 24) | ((uint32_t)(eptr[1]) << 16)
|
||||
| ((uint32_t)(eptr[2]) << 8) | (uint32_t)(eptr[3]);
|
||||
/* REVCTL.0 and REVCTL.1 set to 1 */
|
||||
REVCTL = 0x3;
|
||||
/* Angie board FPGA bitstream download */
|
||||
PIN_RDWR_B = 0;
|
||||
/* Initialize GPIF interface transfer count */
|
||||
GPIFTCB3 = (uint8_t)(((uint32_t)(gcnt) >> 24) & 0x000000ff);
|
||||
GPIFTCB2 = (uint8_t)(((uint32_t)(gcnt) >> 16) & 0x000000ff);
|
||||
GPIFTCB1 = (uint8_t)(((uint32_t)(gcnt) >> 8) & 0x000000ff);
|
||||
GPIFTCB0 = (uint8_t)((uint32_t)(gcnt) & 0x000000ff);
|
||||
/* Trigger GPIF OUT transfer on EP2 */
|
||||
GPIFTRIG = GPIF_EP2;
|
||||
while (!(GPIFTRIG & BMGPIFDONE)) // poll GPIFTRIG.7 GPIF Done bit
|
||||
;
|
||||
PIN_RDWR_B = 1;
|
||||
/* Initialize GPIF interface transfer count */
|
||||
GPIFTCB3 = (uint8_t)(((uint32_t)(gcnt) >> 24) & 0x000000ff);
|
||||
GPIFTCB2 = (uint8_t)(((uint32_t)(gcnt) >> 16) & 0x000000ff);
|
||||
GPIFTCB1 = (uint8_t)(((uint32_t)(gcnt) >> 8) & 0x000000ff);
|
||||
GPIFTCB0 = (uint8_t)((uint32_t)(gcnt) & 0x000000ff);
|
||||
/* Initialize AUTOIN transfer count */
|
||||
EP4AUTOINLENH = (uint8_t)(((uint32_t)(gcnt) >> 8) & 0x000000ff);
|
||||
EP4AUTOINLENL = (uint8_t)((uint32_t)(gcnt) & 0x000000ff);
|
||||
/* Trigger GPIF IN transfer on EP4 */
|
||||
GPIFTRIG = BMGPIFREAD | GPIF_EP4;
|
||||
while (!(GPIFTRIG & BMGPIFDONE)) // poll GPIFTRIG.7 GPIF Done bit
|
||||
;
|
||||
/* REVCTL.0 and REVCTL.1 set to 0 */
|
||||
REVCTL = 0;
|
||||
break;
|
||||
default:
|
||||
return true; /* Error: unknown VR command */
|
||||
}
|
||||
return false; /* no error; command handled OK */
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the arrival of a USB Control Setup Packet.
|
||||
*/
|
||||
void usb_handle_setup_data(void)
|
||||
{
|
||||
switch (setup_data.brequest) {
|
||||
case GET_STATUS:
|
||||
EP0BUF[0] = 0;
|
||||
EP0BUF[1] = 0;
|
||||
/* Send response */
|
||||
EP0BCH = 0;
|
||||
EP0BCL = 2;
|
||||
syncdelay(3);
|
||||
break;
|
||||
case CLEAR_FEATURE:
|
||||
if (!usb_handle_clear_feature())
|
||||
STALL_EP0();
|
||||
break;
|
||||
case 2: case 4:
|
||||
/* Reserved values */
|
||||
STALL_EP0();
|
||||
break;
|
||||
case SET_FEATURE:
|
||||
if (!usb_handle_set_feature())
|
||||
STALL_EP0();
|
||||
break;
|
||||
case SET_ADDRESS:
|
||||
/* Handled by USB core */
|
||||
break;
|
||||
case SET_DESCRIPTOR:
|
||||
/* Set Descriptor not supported. */
|
||||
STALL_EP0();
|
||||
break;
|
||||
case GET_DESCRIPTOR:
|
||||
if (!usb_handle_get_descriptor())
|
||||
STALL_EP0();
|
||||
break;
|
||||
case GET_CONFIGURATION:
|
||||
/* ANGIE has only one configuration, return its index */
|
||||
EP0BUF[0] = config_descriptor.bconfigurationvalue;
|
||||
EP0BCH = 0;
|
||||
EP0BCL = 1;
|
||||
syncdelay(3);
|
||||
break;
|
||||
case SET_CONFIGURATION:
|
||||
/* ANGIE has only one configuration -> nothing to do */
|
||||
break;
|
||||
case GET_INTERFACE:
|
||||
/* ANGIE only has one interface, return its number */
|
||||
EP0BUF[0] = interface_descriptor00.binterfacenumber;
|
||||
EP0BUF[1] = interface_descriptor01.binterfacenumber;
|
||||
EP0BCH = 0;
|
||||
EP0BCL = 2;
|
||||
syncdelay(3);
|
||||
break;
|
||||
case SET_INTERFACE:
|
||||
usb_handle_set_interface();
|
||||
break;
|
||||
case SYNCH_FRAME:
|
||||
/* Isochronous endpoints not used -> nothing to do */
|
||||
break;
|
||||
default:
|
||||
/* if not Vendor command, Stall EndPoint 0 */
|
||||
if (usb_handle_vcommands())
|
||||
STALL_EP0();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the initialization of endpoints.
|
||||
*/
|
||||
void ep_init(void)
|
||||
{
|
||||
EP1INCFG = 0x00; /* non VALID */
|
||||
syncdelay(3);
|
||||
EP1OUTCFG = 0x00; /* non VALID */
|
||||
syncdelay(3);
|
||||
|
||||
/* JTAG */
|
||||
EP2CFG = 0xA2; /* VALID | OUT | BULK | 512 Bytes | Double buffer */
|
||||
syncdelay(3);
|
||||
EP4CFG = 0xE2; /* VALID | IN | BULK | 512 Bytes | Double buffer */
|
||||
syncdelay(3);
|
||||
|
||||
/* I2C */
|
||||
EP6CFG = 0xA2; /* VALID | OUT | BULK | 512 Bytes | Double buffer */
|
||||
syncdelay(3);
|
||||
EP8CFG = 0xE2; /* VALID | IN | BULK | 512 Bytes | Double buffer */
|
||||
syncdelay(3);
|
||||
|
||||
/* arm EP6-OUT */
|
||||
EP6BCL = 0x80;
|
||||
syncdelay(3);
|
||||
EP6BCL = 0x80;
|
||||
syncdelay(3);
|
||||
|
||||
/* REVCTL.0 and REVCTL.1 set to 1 */
|
||||
REVCTL = 0x3;
|
||||
/* Arm both EP2 buffers to “prime the pump” */
|
||||
OUTPKTEND = 0x82;
|
||||
syncdelay(3);
|
||||
OUTPKTEND = 0x82;
|
||||
syncdelay(3);
|
||||
|
||||
/* Standard procedure to reset FIFOs */
|
||||
FIFORESET = BMNAKALL; /* NAK all transfers during the reset */
|
||||
syncdelay(3);
|
||||
FIFORESET = BMNAKALL | 0x02; /* reset EP2 FIFO */
|
||||
syncdelay(3);
|
||||
FIFORESET = BMNAKALL | 0x04; /* reset EP4 FIFO */
|
||||
syncdelay(3);
|
||||
FIFORESET = 0x00; /* deactivate the NAK all */
|
||||
syncdelay(3);
|
||||
|
||||
/* configure EP2 in AUTO mode with 8-bit interface */
|
||||
EP2FIFOCFG = 0x00;
|
||||
syncdelay(3);
|
||||
EP2FIFOCFG = BMAUTOOUT; /* 8-bit Auto OUT mode */
|
||||
syncdelay(3);
|
||||
EP4FIFOCFG = BMAUTOIN | BMZEROLENIN; /* 8-bit Auto IN mode */
|
||||
syncdelay(3);
|
||||
}
|
||||
|
||||
void i2c_recieve(void)
|
||||
{
|
||||
if (EP6FIFOBUF[0] == 1) {
|
||||
uint8_t rdwr = EP6FIFOBUF[0]; //read: 1
|
||||
uint8_t reg_byte_check = EP6FIFOBUF[1]; //register given: 1 else: 0
|
||||
uint8_t count = EP6FIFOBUF[2]; //requested data count
|
||||
uint8_t adr = EP6FIFOBUF[3]; //address
|
||||
uint8_t address = get_address(adr, rdwr); //address byte (read command)
|
||||
uint8_t address_2 = get_address(adr, 0); //address byte 2 (write command)
|
||||
|
||||
/* i2c bus state byte */
|
||||
EP8FIFOBUF[0] = get_status();
|
||||
|
||||
/* start: */
|
||||
start_cd();
|
||||
/* address: */
|
||||
send_byte(address_2); //write
|
||||
/* ack: */
|
||||
uint8_t ack = get_ack();
|
||||
|
||||
/* send data */
|
||||
for (int i = 0; i < reg_byte_check; i++) {
|
||||
send_byte(EP6FIFOBUF[i + 4]);
|
||||
/* ack(): */
|
||||
ack = get_ack();
|
||||
}
|
||||
|
||||
/* repeated start: */
|
||||
repeated_start();
|
||||
/* address: */
|
||||
send_byte(address);
|
||||
/* get ack: */
|
||||
ack = get_ack();
|
||||
|
||||
/* receive data */
|
||||
for (int i = 1; i < count; i++) {
|
||||
EP8FIFOBUF[i] = receive_byte();
|
||||
|
||||
/* send ack: */
|
||||
send_ack();
|
||||
}
|
||||
|
||||
EP8FIFOBUF[count] = receive_byte();
|
||||
|
||||
/* send Nack: */
|
||||
send_nack();
|
||||
|
||||
/* stop */
|
||||
stop_cd();
|
||||
|
||||
EP8BCH = (count + 1) >> 8; //EP8
|
||||
syncdelay(3);
|
||||
EP8BCL = count + 1; //EP8
|
||||
|
||||
EP6BCL = 0x80; //EP6
|
||||
syncdelay(3);
|
||||
EP6BCL = 0x80; //EP6
|
||||
} else {
|
||||
uint8_t rdwr = EP6FIFOBUF[0]; //write: 0
|
||||
uint8_t count = EP6FIFOBUF[1]; //data count
|
||||
uint8_t adr = EP6FIFOBUF[2]; //address
|
||||
uint8_t address = get_address(adr, rdwr); //address byte (read command)
|
||||
uint8_t ack_cnt = 0;
|
||||
|
||||
// i2c bus state byte
|
||||
EP8FIFOBUF[0] = get_status();
|
||||
|
||||
/* start(): */
|
||||
start_cd();
|
||||
/* address: */
|
||||
send_byte(address); //write
|
||||
/* ack(): */
|
||||
if (!get_ack())
|
||||
ack_cnt++;
|
||||
/* send data */
|
||||
for (int i = 0; i < count; i++) {
|
||||
send_byte(EP6FIFOBUF[i + 3]);
|
||||
/* get ack: */
|
||||
if (!get_ack())
|
||||
ack_cnt++;
|
||||
}
|
||||
|
||||
/* stop */
|
||||
stop_cd();
|
||||
|
||||
EP8FIFOBUF[1] = ack_cnt;
|
||||
|
||||
EP8BCH = 0; //EP8
|
||||
syncdelay(3);
|
||||
EP8BCL = 2; //EP8
|
||||
|
||||
EP6BCL = 0x80; //EP6
|
||||
syncdelay(3);
|
||||
EP6BCL = 0x80; //EP6
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interrupt initialization. Configures USB interrupts.
|
||||
**/
|
||||
void interrupt_init(void)
|
||||
{
|
||||
/* Enable USB interrupt (EIE register) */
|
||||
EUSB = 1;
|
||||
EICON |= 0x20;
|
||||
|
||||
/* Enable INT 2 & 4 Autovectoring */
|
||||
INTSETUP |= (AV2EN | AV4EN);
|
||||
|
||||
/* Enable individual EP6&8 interrupts */
|
||||
EPIE |= 0xC0;
|
||||
|
||||
/* Clear individual USB interrupt IRQ */
|
||||
EPIRQ = 0xC0;
|
||||
|
||||
/* Enable SUDAV interrupt */
|
||||
USBIEN |= SUDAVI;
|
||||
|
||||
/* Clear SUDAV interrupt */
|
||||
USBIRQ = SUDAVI;
|
||||
|
||||
/* Enable Interrupts (Do not confuse this with
|
||||
* EA External Access pin, see ANGIE Schematic)
|
||||
*/
|
||||
EA = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the initialization of io ports.
|
||||
*/
|
||||
void io_init(void)
|
||||
{
|
||||
/* PORT A */
|
||||
PORTACFG = 0x0; /* 0: normal ou 1: alternate function (each bit) */
|
||||
OEA = 0xEF;
|
||||
IOA = 0xFF;
|
||||
|
||||
/* PORT C */
|
||||
PORTCCFG = 0x0; /* 0: normal ou 1: alternate function (each bit) */
|
||||
OEC = 0xFF;
|
||||
IOC = 0xFF;
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright (C) 2023 by NanoXplore, France - all rights reserved
|
||||
|
||||
# Needed by timing test
|
||||
export PROJECT := angie_bitstream
|
||||
TARGET_PART := xc6slx9-2tqg144
|
||||
export TOPLEVEL := S609
|
||||
|
||||
# Detects the ROOT dir from the .git marker
|
||||
sp :=
|
||||
sp +=
|
||||
_walk = $(if $1,$(wildcard /$(subst $(sp),/,$1)/$2) $(call _walk,$(wordlist 2,$(words $1),x $1),$2))
|
||||
_find = $(firstword $(call _walk,$(strip $(subst /, ,$1)),$2))
|
||||
_ROOT := $(patsubst %/.git,%,$(call _find,$(CURDIR),.git))
|
||||
|
||||
SHELL := /bin/bash
|
||||
TOP_DIR := $(realpath $(_ROOT))
|
||||
HDL_DIR := $(CURDIR)
|
||||
SRC_DIR := $(HDL_DIR)/src
|
||||
TOOLS_DIR := $(TOP_DIR)/tools/build
|
||||
COMMON_DIR := $(TOP_DIR)/common/hdl
|
||||
COMMON_HDL_DIR := $(COMMON_DIR)/src
|
||||
COMMON_LIBS := $(COMMON_DIR)/libs
|
||||
HDL_BUILD_DIR := $(HDL_DIR)/build
|
||||
OUTPUT_DIR ?= $(HDL_BUILD_DIR)/output
|
||||
FINAL_OUTPUT_DIR := $(OUTPUT_DIR)/$(PROJECT)
|
||||
|
||||
# Tools
|
||||
MKDIR := mkdir -p
|
||||
CP := cp -f
|
||||
|
||||
HDL_SRC_PATH := $(addprefix $(COMMON_DIR)/ips/, $(HDL_IPS)) $(HDL_DIR)
|
||||
VHDSOURCE += $(foreach ip,$(HDL_SRC_PATH),$(wildcard $(ip)/src/*.vhd))
|
||||
VSOURCE += $(foreach ip,$(HDL_SRC_PATH),$(wildcard $(ip)/src/*.v))
|
||||
VSOURCE += $(foreach ip,$(HDL_SRC_PATH),$(wildcard $(ip)/src/*.vh))
|
||||
|
||||
CONSTRAINTS ?= $(SRC_DIR)/$(PROJECT).ucf
|
||||
|
||||
COMMON_OPTS := -intstyle xflow
|
||||
XST_OPTS :=
|
||||
NGDBUILD_OPTS :=
|
||||
MAP_OPTS := -mt 2
|
||||
PAR_OPTS := -mt 4
|
||||
BITGEN_OPTS := -g Binary:Yes
|
||||
|
||||
XILINX_PLATFORM := lin64
|
||||
PATH := $(PATH):$(XILINX_HOME)/bin/$(XILINX_PLATFORM)
|
||||
|
||||
RUN = @echo -ne "\n\n\e[1;33m======== $(1) ========\e[m\n\n"; \
|
||||
cd $(HDL_BUILD_DIR) && $(XILINX_HOME)/bin/$(XILINX_PLATFORM)/$(1)
|
||||
|
||||
compile: $(HDL_BUILD_DIR)/$(PROJECT).bin
|
||||
|
||||
install: $(HDL_BUILD_DIR)/$(PROJECT).bin
|
||||
$(MKDIR) $(FINAL_OUTPUT_DIR)
|
||||
$(CP) $(HDL_BUILD_DIR)/$(PROJECT).bin $(FINAL_OUTPUT_DIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(HDL_BUILD_DIR)
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).bin: $(HDL_BUILD_DIR)/$(PROJECT).ncd
|
||||
$(call RUN,bitgen) $(COMMON_OPTS) $(BITGEN_OPTS) \
|
||||
-w $(PROJECT).ncd $(PROJECT).bit
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).ncd: $(HDL_BUILD_DIR)/$(PROJECT).map.ncd
|
||||
$(call RUN,par) $(COMMON_OPTS) $(PAR_OPTS) \
|
||||
-w $(PROJECT).map.ncd $(PROJECT).ncd $(PROJECT).pcf
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).map.ncd: $(HDL_BUILD_DIR)/$(PROJECT).ngd
|
||||
$(call RUN,map) $(COMMON_OPTS) $(MAP_OPTS) \
|
||||
-p $(TARGET_PART) \
|
||||
-w $(PROJECT).ngd -o $(PROJECT).map.ncd $(PROJECT).pcf
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).ngd: $(HDL_BUILD_DIR)/$(PROJECT).ngc
|
||||
$(call RUN,ngdbuild) $(COMMON_OPTS) $(NGDBUILD_OPTS) \
|
||||
-p $(TARGET_PART) -uc $(CONSTRAINTS) \
|
||||
$(PROJECT).ngc $(PROJECT).ngd
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).ngc: $(HDL_BUILD_DIR)/$(PROJECT).prj $(HDL_BUILD_DIR)/$(PROJECT).scr
|
||||
$(call RUN,xst) $(COMMON_OPTS) -ifn $(PROJECT).scr
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).scr: | $(HDL_BUILD_DIR)
|
||||
@echo "Updating $@"
|
||||
@mkdir -p $(HDL_BUILD_DIR)
|
||||
@rm -f $@
|
||||
@echo "run" \
|
||||
"-ifn $(PROJECT).prj" \
|
||||
"-ofn $(PROJECT).ngc" \
|
||||
"-ifmt mixed" \
|
||||
"$(XST_OPTS)" \
|
||||
"-top $(TOPLEVEL)" \
|
||||
"-ofmt NGC" \
|
||||
"-p $(TARGET_PART)" \
|
||||
> $(HDL_BUILD_DIR)/$(PROJECT).scr
|
||||
|
||||
$(HDL_BUILD_DIR)/$(PROJECT).prj: | $(HDL_BUILD_DIR)
|
||||
@echo "Updating $@"
|
||||
@rm -f $@
|
||||
@$(foreach file,$(VSOURCE),echo "verilog work \"$(file)\"" >> $@;)
|
||||
@$(foreach file,$(VHDSOURCE),echo "vhdl work \"$(file)\"" >> $@;)
|
||||
@$(foreach lib,$(HDL_LIBS),$(foreach file,$(wildcard $(COMMON_LIBS)/$(lib)/src/*.vhd),echo "vhdl $(lib) \"$(file)\"" >> $@;))
|
||||
@$(foreach lib,$(HDL_LIBS),$(foreach file,$(wildcard $(COMMON_LIBS)/$(lib)/src/*.v),echo "verilog $(lib) \"$(file)\"" >> $@;))
|
||||
@$(foreach lib,$(HDL_LIBS),$(foreach file,$(wildcard $(COMMON_LIBS)/$(lib)/src/*.vh),echo "verilog $(lib) \"$(file)\"" >> $@;))
|
||||
|
||||
$(HDL_BUILD_DIR):
|
||||
$(MKDIR) $(HDL_BUILD_DIR)
|
||||
|
||||
.PHONY: clean compile install
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright (C) 2023 by NanoXplore, France - all rights reserved
|
||||
|
||||
This is the source code of Nanoxplore USB-JTAG Adapter Angie's bitstream.
|
||||
This bitstream is for the "xc6slx9-2tqg144" Spartan-6 Xilinx FPGA.
|
||||
|
||||
To generate this bitstream, you need to install Xilinx ISE Webpack 14.7
|
||||
You will need to give the ISE software path : export XILINX_HOME=path/to/ise/sw
|
||||
Please set the enviromnent first by executing the ". ./set_env.sh"
|
||||
|
||||
All you have to do now is to write your vhd and constrains codes.
|
||||
|
||||
One all is setup, you can use the make commands:
|
||||
make compile : to compile your (.vhd & .ucf) files in the "src" directory
|
||||
A directory named "build" will be created, which contains all the generated
|
||||
files including the bitstream file.
|
||||
|
||||
make clean : to delete the build directory.
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright (C) 2023 by NanoXplore, France - all rights reserved
|
||||
|
||||
[ -z "${XILINX_HOME}" ] && export XILINX_HOME=/home/software/Xilinx/ISE/14.7/ISE_DS/ISE
|
||||
export PATH="$XILINX_HOME:$PATH"
|
||||
echo "SET XILINX_HOME to ${XILINX_HOME}"
|
||||
# This is needed for isim
|
||||
XILINX_HOME_BASE=${XILINX_HOME}/..
|
||||
for part in common EDK PlanAhead ISE
|
||||
do
|
||||
el=${XILINX_HOME_BASE}/${part}
|
||||
. ${el}/.settings64.sh ${el}
|
||||
done
|
||||
@@ -1,74 +0,0 @@
|
||||
## SPDX-License-Identifier: BSD-3-Clause
|
||||
##--------------------------------------------------------------------------
|
||||
## Project Context: nanoXplore USB to JTAG/I2C Adapter Board, Spartan6
|
||||
## Design Name: ANGIE USB to JTAG/I2C Adapter FPGA source code
|
||||
## Module Name: angie_bitstream.ucf
|
||||
## Target Device: XC6SLX9-2 TQ144
|
||||
## Tool versions: ISE Webpack 13.2 -> 14.2
|
||||
## Author: Ahmed BOUDJELIDA nanoXplore SAS
|
||||
##--------------------------------------------------------------------------
|
||||
# WARNING: PullUps on JTAG inputs should be enabled after configuration
|
||||
# (bitgen option) since the pins are not connected.
|
||||
|
||||
CONFIG VCCAUX = "3.3";
|
||||
|
||||
# Timing
|
||||
# net IH24 period = 40; # Constrain at 25MHz
|
||||
# net IH40 period = 25; # Constrain at 40MHz
|
||||
# DCMs placement on Spartan6
|
||||
# INST S6MOD_CKMUL.H48_DCM LOC = DCM0;
|
||||
|
||||
# Clock 48MHz
|
||||
net IFCLK_I LOC = 'P123' ;
|
||||
|
||||
net GD_IO<0> LOC = 'P48' ;
|
||||
net GD_IO<1> LOC = 'P43' ;
|
||||
net GD_IO<2> LOC = 'P44' ;
|
||||
net GD_IO<3> LOC = 'P45' ;
|
||||
net GD_IO<4> LOC = 'P46' ;
|
||||
net GD_IO<5> LOC = 'P61' ;
|
||||
net GD_IO<6> LOC = 'P62' ;
|
||||
net GD_IO<7> LOC = 'P65' ;
|
||||
|
||||
net PA2_I LOC = 'P47' ;
|
||||
#net PA3_I LOC = 'P64' ;
|
||||
net JPW_I LOC = 'P14' ;
|
||||
|
||||
net GCTL0_I LOC = 'P70' ;
|
||||
#net GCTL1_I LOC = 'P55' ;
|
||||
#net GCTL2_I LOC = 'P67' ;
|
||||
net GRDY1_I LOC = 'P118' ;
|
||||
|
||||
#net SDA_IO LOC = 'P50' ;
|
||||
net SDA_IO LOC = 'P64' ; #PA3
|
||||
#net SCL_I LOC = 'P51' ;
|
||||
net SCL_I LOC = 'P39' ; #PA4 switch
|
||||
net SDA_DIR_I LOC = 'P66' ; #PA0 switch
|
||||
#net SCL_DIR_I LOC = 'P57' ;
|
||||
|
||||
net SO_SDA_OUT_O LOC = 'P140' ;
|
||||
net SO_SDA_IN_I LOC = 'P1' ;
|
||||
net SO_SCL_O LOC = 'P137' ;
|
||||
|
||||
net SO_TRST_O LOC = 'P32' ;
|
||||
net SO_TMS_O LOC = 'P27' ;
|
||||
net SO_TCK_O LOC = 'P30' ;
|
||||
net SO_TDI_O LOC = 'P26' ;
|
||||
net SO_SRST_O LOC = 'P12' ;
|
||||
net SI_TDO_I LOC = 'P16' ;
|
||||
|
||||
net ST_0_O LOC = 'P29' ;
|
||||
net ST_1_O LOC = 'P21' ;
|
||||
net ST_2_O LOC = 'P11' ;
|
||||
net ST_3_O LOC = 'P7' ;
|
||||
net ST_4_O LOC = 'P134' ;
|
||||
net ST_5_O LOC = 'P139' ;
|
||||
|
||||
net FTP_O<0> LOC = 'P121' ;
|
||||
net FTP_O<1> LOC = 'P120' ;
|
||||
net FTP_O<2> LOC = 'P119' ;
|
||||
net FTP_O<3> LOC = 'P116' ;
|
||||
net FTP_O<4> LOC = 'P111' ;
|
||||
net FTP_O<5> LOC = 'P112' ;
|
||||
net FTP_O<6> LOC = 'P115' ;
|
||||
net FTP_O<7> LOC = 'P114' ;
|
||||
@@ -1,415 +0,0 @@
|
||||
-- SPDX-License-Identifier: BSD-3-Clause
|
||||
----------------------------------------------------------------------------
|
||||
-- Project Context: nanoXplore USB to JTAG/I2C Adapter Board, Spartan6
|
||||
-- Design Name: ANGIE USB to JTAG/I2C Adapter FPGA source code
|
||||
-- Module Name: angie_bitstream.vhd
|
||||
-- Target Device: XC6SLX9-2 TQ144
|
||||
-- Tool versions: ISE Webpack 13.2 -> 14.2
|
||||
-- Author: Ahmed BOUDJELIDA nanoXplore SAS
|
||||
----------------------------------------------------------------------------
|
||||
library work;
|
||||
use work.all;
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.std_logic_arith.all;
|
||||
use ieee.std_logic_unsigned.all;
|
||||
|
||||
entity angie_bitstream is port(
|
||||
SDA_IO : inout std_logic;
|
||||
SDA_DIR_I : in std_logic;
|
||||
SCL_I : in std_logic;
|
||||
|
||||
JPW_I : in std_logic; --Devkit power
|
||||
|
||||
SO_SDA_OUT_O : out std_logic;
|
||||
SO_SDA_IN_I : in std_logic;
|
||||
SO_SCL_O : out std_logic;
|
||||
|
||||
ST_0_O : out std_logic;
|
||||
ST_1_O : out std_logic;
|
||||
ST_2_O : out std_logic;
|
||||
ST_3_O : out std_logic;
|
||||
ST_4_O : out std_logic;
|
||||
ST_5_O : out std_logic;
|
||||
|
||||
SO_TRST_O : out std_logic;
|
||||
SO_TMS_O : out std_logic;
|
||||
SO_TCK_O : out std_logic;
|
||||
SO_TDI_O : out std_logic;
|
||||
SO_SRST_O : out std_logic;
|
||||
SI_TDO_I : in std_logic;
|
||||
|
||||
PA2_I : in std_logic; -- GPIF IN
|
||||
|
||||
-- Clock 48MHz
|
||||
IFCLK_I : in std_logic;
|
||||
|
||||
GCTL0_I : in std_logic;
|
||||
GRDY1_I : out std_logic;
|
||||
GD_IO : inout std_logic_vector(7 downto 0);
|
||||
FTP_O : out std_logic_vector(15 downto 0)
|
||||
);
|
||||
end angie_bitstream;
|
||||
|
||||
architecture A_angie_bitstream of angie_bitstream is
|
||||
----------------------------------------Fifo out (PC to devkit)
|
||||
signal rst_o, clk_wr_o, clk_rd_o : std_logic;
|
||||
signal write_en_o, read_en_o : std_logic;
|
||||
signal data_in_o, data_out_o : std_logic_vector(7 downto 0);
|
||||
signal empty_o, full_o : std_logic;
|
||||
|
||||
----------------------------------------Fifo in (devkit to PC)
|
||||
signal rst_i, clk_wr_i, clk_rd_i : std_logic;
|
||||
signal write_en_i, read_en_i : std_logic;
|
||||
signal data_in_i, data_out_i : std_logic_vector(7 downto 0);
|
||||
signal empty_i, full_i : std_logic;
|
||||
|
||||
signal wr_o, rd_i : std_logic;
|
||||
|
||||
----------------------------------------MAE
|
||||
signal transit1, transit2 : std_logic;
|
||||
|
||||
----------------------------------------DFF
|
||||
signal pa2_dff_clk, pa2_dff_rst, pa2_dff_d, pa2_dff_q : std_logic;
|
||||
signal trst_clk, trst_rst, trst_d, trst_q : std_logic;
|
||||
signal tms_clk, tms_rst, tms_d, tms_q : std_logic;
|
||||
signal tdi_clk, tdi_rst, tdi_d, tdi_q : std_logic;
|
||||
signal tdo_clk, tdo_rst, tdo_d, tdo_q : std_logic;
|
||||
|
||||
----------------------------------------clk_div
|
||||
signal clk_div_in, clk_div_out, reset_clk_div : std_logic;
|
||||
signal clk_div2_in, clk_div2_out, reset_clk_div2 : std_logic;
|
||||
|
||||
----------------------------------------MAE
|
||||
type State_Type is (IDLE, WRITE_OUT, WRITE_IN, DELAY, READ_IN);
|
||||
signal state, state2 : State_Type;
|
||||
signal reset_mae, reset_mae2 : std_logic;
|
||||
|
||||
-- Add Component DFF
|
||||
component DFF
|
||||
Port (
|
||||
clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
d : in std_logic;
|
||||
q : out std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
-- Add Component Clk_div
|
||||
component clk_div
|
||||
Port (
|
||||
clk_in : in std_logic;
|
||||
reset : in std_logic;
|
||||
clk_out : out std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
-- Add component FIFO 64B
|
||||
component fifo_generator_v9_3
|
||||
PORT (
|
||||
rst : IN STD_LOGIC;
|
||||
wr_clk : IN STD_LOGIC;
|
||||
rd_clk : IN STD_LOGIC;
|
||||
din : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
wr_en : IN STD_LOGIC;
|
||||
rd_en : IN STD_LOGIC;
|
||||
dout : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
|
||||
full : OUT STD_LOGIC;
|
||||
empty : OUT STD_LOGIC
|
||||
);
|
||||
end component;
|
||||
|
||||
signal state1_debug, state2_debug : std_logic;
|
||||
|
||||
begin
|
||||
-------------------------------------------------------------I2C :
|
||||
SDA_IO <= not(SO_SDA_IN_I) when (SDA_DIR_I = '1') else 'Z';
|
||||
SO_SDA_OUT_O <= SDA_IO;
|
||||
ST_5_O <= SDA_DIR_I;
|
||||
|
||||
SO_SCL_O <= SCL_I when (JPW_I = '1') else '0';
|
||||
ST_4_O <= '0';
|
||||
|
||||
------------------------------------------------------------JTAG :
|
||||
-- Instantiate the Clk div by 10
|
||||
clk_div_inst : clk_div
|
||||
port map (
|
||||
clk_in => clk_div_in,
|
||||
reset => reset_clk_div,
|
||||
clk_out => clk_div_out
|
||||
);
|
||||
-- Instantiate the Clk div by 10
|
||||
clk_div2_inst : clk_div
|
||||
port map (
|
||||
clk_in => clk_div2_in,
|
||||
reset => reset_clk_div2,
|
||||
clk_out => clk_div2_out
|
||||
);
|
||||
|
||||
-- Instantiate DFFs
|
||||
DFF_inst_PA2 : DFF
|
||||
port map (
|
||||
clk => pa2_dff_clk,
|
||||
reset => pa2_dff_rst,
|
||||
d => pa2_dff_d,
|
||||
q => pa2_dff_q
|
||||
);
|
||||
|
||||
DFF_inst_TRST : DFF
|
||||
port map (
|
||||
clk => trst_clk,
|
||||
reset => trst_rst,
|
||||
d => trst_d,
|
||||
q => trst_q
|
||||
);
|
||||
|
||||
DFF_inst_TMS : DFF
|
||||
port map (
|
||||
clk => tms_clk,
|
||||
reset => tms_rst,
|
||||
d => tms_d,
|
||||
q => tms_q
|
||||
);
|
||||
|
||||
DFF_inst_TDI : DFF
|
||||
port map (
|
||||
clk => tdi_clk,
|
||||
reset => tdi_rst,
|
||||
d => tdi_d,
|
||||
q => tdi_q
|
||||
);
|
||||
|
||||
DFF_inst_TDO : DFF
|
||||
port map (
|
||||
clk => tdo_clk,
|
||||
reset => tdo_rst,
|
||||
d => tdo_d,
|
||||
q => tdo_q
|
||||
);
|
||||
|
||||
-- Instantiate the FIFO OUT
|
||||
U0 : fifo_generator_v9_3
|
||||
port map (
|
||||
rst => rst_o,
|
||||
wr_clk => clk_wr_o,
|
||||
rd_clk => clk_rd_o,
|
||||
din => data_in_o,
|
||||
wr_en => write_en_o,
|
||||
rd_en => read_en_o,
|
||||
dout => data_out_o,
|
||||
full => full_o,
|
||||
empty => empty_o
|
||||
);
|
||||
-- Instantiate the FIFO IN
|
||||
U1 : fifo_generator_v9_3
|
||||
port map (
|
||||
rst => rst_i,
|
||||
wr_clk => clk_wr_i,
|
||||
rd_clk => clk_rd_i,
|
||||
din => data_in_i,
|
||||
wr_en => write_en_i,
|
||||
rd_en => read_en_i,
|
||||
dout => data_out_i,
|
||||
full => full_i,
|
||||
empty => empty_i
|
||||
);
|
||||
|
||||
--------------- clock dividers
|
||||
clk_div_in <= IFCLK_I; -- 48Mhz
|
||||
clk_div2_in <= clk_div_out; -- 24Mhz
|
||||
|
||||
--------------- DFFs
|
||||
pa2_dff_clk <= IFCLK_I;
|
||||
trst_clk <= IFCLK_I;
|
||||
tms_clk <= IFCLK_I;
|
||||
tdi_clk <= IFCLK_I;
|
||||
tdo_clk <= IFCLK_I;
|
||||
|
||||
--------------- FIFOs
|
||||
clk_wr_o <= IFCLK_I;
|
||||
clk_rd_o <= clk_div2_out;
|
||||
clk_wr_i <= clk_div2_out;
|
||||
clk_rd_i <= IFCLK_I;
|
||||
|
||||
--------------------------- GPIF ready :
|
||||
GRDY1_I <= '1';
|
||||
|
||||
-------------------------------PA2 DFF :
|
||||
pa2_dff_rst <= '0';
|
||||
pa2_dff_d <= PA2_I;
|
||||
|
||||
-------------------- FX2<->Fifo Enable pins :
|
||||
write_en_o <= not(wr_o) and not(GCTL0_I);
|
||||
read_en_i <= not(rd_i) and not(GCTL0_I);
|
||||
|
||||
---------------- FX2->Fifo Data :
|
||||
data_in_o <= GD_IO;
|
||||
|
||||
------------ FIFO_OUT->Devkit :
|
||||
SO_TRST_O <= trst_q;
|
||||
trst_d <= data_out_o(4);
|
||||
SO_TMS_O <= tms_q;
|
||||
tms_d <= data_out_o(3);
|
||||
SO_TDI_O <= tdi_q;
|
||||
tdi_d <= data_out_o(1);
|
||||
------------
|
||||
SO_TCK_O <= data_out_o(0);
|
||||
|
||||
-------------------- FIFO_OUT->FIFO_IN :
|
||||
--data_in_i <= data_out_o;
|
||||
|
||||
-------------------- FIFO_IN<-Devkit :
|
||||
data_in_i(0) <= '0';
|
||||
data_in_i(1) <= '0';
|
||||
data_in_i(2) <= tdo_q;
|
||||
tdo_d <= not SI_TDO_I;
|
||||
data_in_i(3) <= '0';
|
||||
data_in_i(4) <= '0';
|
||||
data_in_i(5) <= '0';
|
||||
data_in_i(6) <= '0';
|
||||
data_in_i(7) <= '0';
|
||||
|
||||
-------------------- FX2<-FIFO_IN :
|
||||
GD_IO <= data_out_i when (state = READ_IN) else "ZZZZZZZZ";
|
||||
|
||||
state1_debug <= '1' when state = READ_IN else '0';
|
||||
state2_debug <= '1' when state2 = WRITE_IN else '0';
|
||||
|
||||
--Points de test:
|
||||
FTP_O(0) <= IFCLK_I;
|
||||
FTP_O(1) <= GCTL0_I;
|
||||
FTP_O(2) <= GD_IO(0);
|
||||
FTP_O(3) <= GD_IO(1);
|
||||
FTP_O(4) <= JPW_I;
|
||||
FTP_O(5) <= PA2_I;
|
||||
FTP_O(6) <= empty_o;
|
||||
FTP_O(7) <= not SI_TDO_I;
|
||||
|
||||
process(pa2_dff_d, pa2_dff_q)
|
||||
begin
|
||||
if pa2_dff_d = '0' and pa2_dff_q = '1' then
|
||||
reset_mae <= '1'; -- Reset State Machine
|
||||
reset_mae2 <= '1'; -- Reset State Machine
|
||||
rst_o <= '1'; -- Reset OUT
|
||||
rst_i <= '1'; -- Reset IN
|
||||
reset_clk_div <= '1';
|
||||
reset_clk_div2 <= '1';
|
||||
trst_rst <= '1';
|
||||
tms_rst <= '1';
|
||||
tdi_rst <= '1';
|
||||
tdo_rst <= '1';
|
||||
else
|
||||
reset_mae <= '0'; -- No Reset State Machine
|
||||
reset_mae2 <= '0'; -- Reset State Machine
|
||||
rst_o <= '0'; -- No Reset OUT
|
||||
rst_i <= '0'; -- No Reset IN
|
||||
reset_clk_div <= '0';
|
||||
reset_clk_div2 <= '0';
|
||||
trst_rst <= '0';
|
||||
tms_rst <= '0';
|
||||
tdi_rst <= '0';
|
||||
tdo_rst <= '0';
|
||||
end if;
|
||||
end process;
|
||||
|
||||
process(clk_div2_out, reset_mae2)
|
||||
begin
|
||||
if reset_mae2 = '1' then
|
||||
state2 <= IDLE;
|
||||
elsif rising_edge(clk_div2_out) then
|
||||
case state2 is
|
||||
when IDLE =>
|
||||
read_en_o <= '0'; -- Disable read OUT
|
||||
write_en_i <= '0'; -- Disable write IN
|
||||
transit2 <= '1';
|
||||
if transit1 = '0' and PA2_I = '0' then
|
||||
state2 <= WRITE_IN;
|
||||
else
|
||||
state2 <= IDLE;
|
||||
end if;
|
||||
|
||||
when WRITE_IN =>
|
||||
read_en_o <= '1'; -- Enable read OUT
|
||||
write_en_i <= '1'; -- Enable write IN
|
||||
if PA2_I = '1' then
|
||||
state2 <= DELAY; -- Change state to DELAY
|
||||
else
|
||||
state2 <= WRITE_IN; -- Stay in WRITE_IN state
|
||||
end if;
|
||||
|
||||
when DELAY =>
|
||||
transit2 <= '0'; -- Enable READ IN
|
||||
if empty_o = '1' then
|
||||
read_en_o <= '0'; -- Disable read OUT
|
||||
write_en_i <= '0'; -- Disable write IN
|
||||
state2 <= IDLE; -- Change state to IDLE
|
||||
else
|
||||
state2 <= DELAY; -- Stay in READ_IN state
|
||||
end if;
|
||||
|
||||
when others =>
|
||||
state2 <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
process(IFCLK_I, reset_mae)
|
||||
begin
|
||||
if reset_mae = '1' then
|
||||
state <= IDLE;
|
||||
elsif rising_edge(IFCLK_I) then
|
||||
case state is
|
||||
when IDLE =>
|
||||
wr_o <= '1'; -- Disable write OUT
|
||||
rd_i <= '1'; -- Disable read IN
|
||||
transit1 <= '1';
|
||||
if PA2_I = '0' then
|
||||
state <= WRITE_OUT; -- Change state to RESET
|
||||
else
|
||||
state <= IDLE; -- Stay in IDLE state
|
||||
end if;
|
||||
|
||||
when WRITE_OUT =>
|
||||
wr_o <= '0'; -- Enable write OUT
|
||||
if empty_o = '0' then
|
||||
transit1 <= '0'; -- Enable Rd OUT & Wr IN
|
||||
state <= DELAY; -- Change state to DELAY
|
||||
else
|
||||
state <= WRITE_OUT; -- Stay in WRITE_OUT state
|
||||
end if;
|
||||
|
||||
when DELAY =>
|
||||
if transit2 = '0' then
|
||||
wr_o <= '1'; -- Disable write OUT
|
||||
state <= READ_IN;
|
||||
else
|
||||
state <= DELAY;
|
||||
end if;
|
||||
|
||||
when READ_IN =>
|
||||
rd_i <= '0'; -- Enable read IN
|
||||
if empty_i = '1' then
|
||||
rd_i <= '1'; -- Enable read IN
|
||||
state <= IDLE; -- Change state to IDLE
|
||||
else
|
||||
state <= READ_IN; -- Stay in READ_IN state
|
||||
end if;
|
||||
|
||||
when others =>
|
||||
state <= IDLE;
|
||||
end case;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- OUT signals direction
|
||||
-- TRST, TMS, TCK and TDI : out
|
||||
ST_0_O <= '0';
|
||||
-- TDO : in
|
||||
ST_1_O <= '1';
|
||||
-- SRST : out
|
||||
ST_2_O <= '1';
|
||||
SO_SRST_O <= '0';
|
||||
-- MOD : in
|
||||
ST_3_O <= '1';
|
||||
|
||||
end A_angie_bitstream;
|
||||
@@ -1,33 +0,0 @@
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.ALL;
|
||||
use ieee.numeric_std.ALL;
|
||||
|
||||
entity clk_div is
|
||||
Port (
|
||||
clk_in : in std_logic;
|
||||
reset : in std_logic;
|
||||
clk_out : out std_logic
|
||||
);
|
||||
end clk_div;
|
||||
|
||||
architecture behavioral of clk_div is
|
||||
-- Division factor N = 4, so we need a 2-bit counter (2^2 = 4)
|
||||
-- signal counter : unsigned(1 downto 0) := (others => '0');
|
||||
signal tmp : std_logic;
|
||||
begin
|
||||
process(clk_in, reset)
|
||||
begin
|
||||
if reset = '1' then
|
||||
-- counter <= (others => '0');
|
||||
tmp <= '0';
|
||||
elsif rising_edge(clk_in) then
|
||||
-- if counter = (2**2 - 1) then
|
||||
-- counter <= (others => '0');
|
||||
tmp <= NOT tmp; -- Toggle the output clock
|
||||
-- else
|
||||
-- counter <= counter + 1;
|
||||
-- end if;
|
||||
end if;
|
||||
end process;
|
||||
clk_out <= tmp;
|
||||
end behavioral;
|
||||
@@ -1,23 +0,0 @@
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.ALL;
|
||||
use ieee.std_logic_arith.ALL;
|
||||
use ieee.std_logic_unsigned.ALL;
|
||||
|
||||
entity DFF is
|
||||
port ( clk : in std_logic;
|
||||
reset : in std_logic;
|
||||
d : in std_logic;
|
||||
q : out std_logic);
|
||||
end DFF;
|
||||
|
||||
architecture Behavioral of DFF is
|
||||
begin
|
||||
process(clk, reset)
|
||||
begin
|
||||
if reset = '1' then
|
||||
q <= '1'; -- Reset output to 0
|
||||
elsif rising_edge(clk) then
|
||||
q <= d; -- Capture D at the rising edge of the clock
|
||||
end if;
|
||||
end process;
|
||||
end Behavioral;
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/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
|
||||
@@ -8,7 +6,7 @@
|
||||
$comment = "// Autogenerated by contrib/gen-stellaris-part-header.pl
|
||||
// From Stellaris Firmware Development Package revision";
|
||||
|
||||
$struct_header = "static const struct {
|
||||
$struct_header = "static struct {
|
||||
uint8_t class;
|
||||
uint8_t partno;
|
||||
const char *partname;
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
/* Copyright (C) 2010 by David Brownell */
|
||||
/*
|
||||
* Copyright (C) 2010 by David Brownell
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Simple utility to parse and dump ARM Cortex-M3 SWO trace output. Once the
|
||||
@@ -26,13 +39,11 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.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)
|
||||
@@ -43,14 +54,11 @@ unsigned int dump_swit;
|
||||
* 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 int data)
|
||||
static void show_task(int port, unsigned data)
|
||||
{
|
||||
unsigned int code = data >> 16;
|
||||
unsigned code = data >> 16;
|
||||
char buf[16];
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
switch (code) {
|
||||
case 0:
|
||||
strcpy(buf, "run");
|
||||
@@ -77,10 +85,7 @@ static void show_task(int port, unsigned int data)
|
||||
|
||||
static void show_reserved(FILE *f, char *label, int c)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
unsigned i;
|
||||
|
||||
printf("%s - %#02x", label, c);
|
||||
|
||||
@@ -96,10 +101,11 @@ static void show_reserved(FILE *f, char *label, int c)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static bool read_varlen(FILE *f, int c, unsigned int *value)
|
||||
static bool read_varlen(FILE *f, int c, unsigned *value)
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned size;
|
||||
unsigned char buf[4];
|
||||
unsigned i;
|
||||
|
||||
*value = 0;
|
||||
|
||||
@@ -124,25 +130,23 @@ static bool read_varlen(FILE *f, int c, unsigned int *value)
|
||||
|
||||
*value = (buf[3] << 24)
|
||||
+ (buf[2] << 16)
|
||||
+ (buf[1] << 8)
|
||||
+ (buf[2] << 8)
|
||||
+ (buf[0] << 0);
|
||||
return true;
|
||||
|
||||
err:
|
||||
printf("(ERROR %d - %s)\n", errno, strerror(errno));
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
static void show_hard(FILE *f, int c)
|
||||
{
|
||||
unsigned int type = c >> 3;
|
||||
unsigned int value;
|
||||
unsigned type = c >> 3;
|
||||
unsigned value;
|
||||
unsigned size;
|
||||
char *label;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
printf("DWT - ");
|
||||
printf("DWT - ", type);
|
||||
|
||||
if (!read_varlen(f, c, &value))
|
||||
return;
|
||||
@@ -212,7 +216,7 @@ static void show_hard(FILE *f, int c)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf("UNDEFINED, rawtype: %x", type);
|
||||
printf("UNDEFINED");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -230,35 +234,26 @@ static void show_hard(FILE *f, int c)
|
||||
*/
|
||||
struct {
|
||||
int port;
|
||||
void (*show)(int port, unsigned int data);
|
||||
void (*show)(int port, unsigned data);
|
||||
} format[] = {
|
||||
{ .port = 31, .show = show_task, },
|
||||
};
|
||||
|
||||
static void show_swit(FILE *f, int c)
|
||||
{
|
||||
unsigned int port = c >> 3;
|
||||
unsigned int value = 0;
|
||||
unsigned int 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;
|
||||
unsigned size;
|
||||
unsigned port = c >> 3;
|
||||
unsigned char buf[4];
|
||||
unsigned value = 0;
|
||||
unsigned i;
|
||||
|
||||
printf("SWIT %u - ", port);
|
||||
|
||||
if (!read_varlen(f, c, &value))
|
||||
return;
|
||||
printf("%#08x", value);
|
||||
|
||||
for (i = 0; i < sizeof(format) / sizeof(format[0]); i++) {
|
||||
for (i = 0; i <= sizeof(format) / sizeof(format[0]); i++) {
|
||||
if (format[i].port == port) {
|
||||
printf(", ");
|
||||
format[i].show(port, value);
|
||||
@@ -268,17 +263,18 @@ static void show_swit(FILE *f, int c)
|
||||
|
||||
printf("\n");
|
||||
return;
|
||||
|
||||
err:
|
||||
printf("(ERROR %d - %s)\n", errno, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
static void show_timestamp(FILE *f, int c)
|
||||
{
|
||||
unsigned int counter = 0;
|
||||
unsigned counter = 0;
|
||||
char *label = "";
|
||||
bool delayed = false;
|
||||
|
||||
if (dump_swit)
|
||||
return;
|
||||
|
||||
printf("TIMESTAMP - ");
|
||||
|
||||
/* Format 2: header only */
|
||||
@@ -297,7 +293,7 @@ static void show_timestamp(FILE *f, int c)
|
||||
}
|
||||
|
||||
/* Format 1: one to four bytes of data too */
|
||||
switch (c >> 4) {
|
||||
switch (c) {
|
||||
default:
|
||||
label = ", reserved control\n";
|
||||
break;
|
||||
@@ -313,7 +309,7 @@ static void show_timestamp(FILE *f, int c)
|
||||
delayed = true;
|
||||
break;
|
||||
case 0xf:
|
||||
label = ", packet and timestamp delayed";
|
||||
label = ", packet and timetamp delayed";
|
||||
delayed = true;
|
||||
break;
|
||||
}
|
||||
@@ -360,7 +356,7 @@ int main(int argc, char **argv)
|
||||
int c;
|
||||
|
||||
/* parse arguments */
|
||||
while ((c = getopt(argc, argv, "f:d:")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "f:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
/* e.g. from UART connected to /dev/ttyUSB0 */
|
||||
@@ -370,10 +366,8 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
dump_swit = atoi(optarg);
|
||||
break;
|
||||
default:
|
||||
usage:
|
||||
fprintf(stderr, "usage: %s [-f input]",
|
||||
basename(argv[0]));
|
||||
return 1;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 OOCD_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
|
||||
@@ -7,7 +7,7 @@ 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
|
||||
- ARMv7m checksum loader : see target/armv7m.c:cortex_m3_crc_code
|
||||
|
||||
checksum/mips32.s :
|
||||
- MIPS32 checksum loader : see target/mips32.c:mips_crc_code
|
||||
|
||||
@@ -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,8 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 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. *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
@@ -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,8 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 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. *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 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. *
|
||||
***************************************************************************/
|
||||
|
||||
.global main
|
||||
@@ -18,7 +31,7 @@
|
||||
* temps:
|
||||
* t3 v0 a3 a2 t0 v1
|
||||
*/
|
||||
|
||||
|
||||
.ent main
|
||||
main:
|
||||
addiu $t4, $a0, 0 /* address in */
|
||||
@@ -52,7 +65,7 @@ loop:
|
||||
ncomp:
|
||||
bne $t2, $t3, nbyte /* all bytes processed */
|
||||
addiu $t3, $t3, 1
|
||||
|
||||
|
||||
wait:
|
||||
sdbbp
|
||||
|
||||
|
||||
@@ -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,8 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 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. *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
@@ -23,4 +36,6 @@ loop:
|
||||
end:
|
||||
bkpt #0
|
||||
|
||||
CRC32XOR: .word 0x04c11db7
|
||||
|
||||
.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,
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user