Skip to content

Update to openocd 0.10.0 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
be7d3b9
Add support for a lot of programmers
facchinm Jun 8, 2018
f162046
FIx mingw build
facchinm Jun 8, 2018
928cd2d
Fix unix build
facchinm Jun 8, 2018
cfbb189
TEST: update to latest openocd 0.10.0
facchinm Jun 8, 2018
0978fd0
Remove sysfs gpio from osx build
facchinm Jun 8, 2018
b8610fe
Update scripts
facchinm Jun 8, 2018
66bbcdd
Update libusb-compat to 0.1.6-rc2
facchinm Jun 8, 2018
81ecf65
Remove autoreconf
facchinm Jun 8, 2018
335e09c
Fix libusb-compat
facchinm Jun 8, 2018
640390d
add make_prerequisites script
facchinm Jun 8, 2018
9620df2
Call make_prereq before every action
facchinm Jun 8, 2018
ced4ad0
Fix previous commit
facchinm Jun 8, 2018
99836db
modify PATH
facchinm Jun 8, 2018
7033c79
Readd autoreconf on libusb-compat
facchinm Jun 8, 2018
2c5ccb0
Fix pkg-config url
facchinm Jun 8, 2018
f6f3b49
fix libusb-compat
facchinm Jun 8, 2018
bbc70c9
fix pkg-config
facchinm Jun 8, 2018
a93add6
fix
facchinm Jun 8, 2018
53693c5
try
facchinm Jun 8, 2018
5825d15
Add m4 stuff to libusb-compat
facchinm Jun 8, 2018
858ac8e
Add libftdi
facchinm Jun 11, 2018
5490d5f
Initial cross-compile effort
facchinm Jun 11, 2018
c61f060
Make compile_cross generic
facchinm Jun 11, 2018
fdf1278
Make compile_cross generic
facchinm Jun 11, 2018
04b2980
Fix libusb-compat
facchinm Jun 11, 2018
0b1f5ce
fix cmake
facchinm Jun 11, 2018
bf65fb8
Move libftdi folder
facchinm Jun 11, 2018
b2a85e4
TEST: fix mingw build
facchinm Jun 11, 2018
656fe2c
TEST: fix mingw build
facchinm Jun 11, 2018
af88504
TEST: fix mingw build
facchinm Jun 11, 2018
6517cc2
only add actual binary to tarball
facchinm Jun 11, 2018
57374fa
fix osxcross build
facchinm Jun 11, 2018
5e1deb9
Fix osxcross build
facchinm Jun 11, 2018
4f239f9
Update Openocd submodule
facchinm Jan 24, 2019
6c33340
update version to 0.10.0-arduino8
facchinm Jan 24, 2019
0a6accd
Update version to 0.10.0-arduino9
facchinm Feb 6, 2019
c56b095
Update to 0.10.0-arduino10
facchinm Mar 13, 2019
db48d57
Update openocd
facchinm Mar 28, 2019
efb17e1
Update openocd
facchinm Apr 12, 2019
f0a0dca
Update to 0.10.0-arduino11
facchinm Apr 12, 2019
7e0bedb
Update openocd
facchinm Apr 15, 2019
1434150
Update openocd submodule
facchinm Feb 14, 2020
16124d0
Update to 0.10.0-arduino12-static
facchinm Feb 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "OpenOCD"]
path = OpenOCD
url = https://github.com/arduino/OpenOCD.git
url = https://github.com/facchinm/OpenOCD.git
2 changes: 1 addition & 1 deletion OpenOCD
Submodule OpenOCD updated 1258 files
145 changes: 145 additions & 0 deletions compile_cross.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
#!/bin/bash -ex
# Copyright (c) 2016 Arduino LLC
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

if [ x$CROSS_COMPILER == x ]; then
CROSS_COMPILER=${CROSS_COMPILE}-gcc
else
export CC=$CROSS_COMPILER
fi

ARCH=`$CROSS_COMPILER -v 2>&1 | awk '/Target/ { print $2 }'`

mkdir -p distrib/$ARCH
cd distrib/$ARCH
PREFIX=`pwd`
cd -

#disable pkg-config
export PKG_CONFIG_PATH=`pwd`

if [[ ${ARCH} == *mingw* ]]; then
export CFLAGS="-mno-ms-bitfields"
fi

if [[ ${ARCH} == *linux* ]]; then

cd eudev-3.1.5
export UDEV_DIR=`pwd`
./autogen.sh
./configure --enable-static --disable-shared --disable-blkid --disable-kmod --disable-manpages --host=${CROSS_COMPILE}
make clean
make -j4
cd ..

export CFLAGS="-I$UDEV_DIR/src/libudev/"
export LDFLAGS="-L$UDEV_DIR/src/libudev/.libs/"
export LIBS="-ludev"

fi

cd libusb-1.0.20
export LIBUSB_DIR=`pwd`
./configure --enable-static --disable-shared --host=${CROSS_COMPILE}
make clean
make
cd ..

export LIBUSB1_CFLAGS="-I$LIBUSB_DIR/libusb/"
export LIBUSB1_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"

export LIBUSB_1_0_CFLAGS="-I$LIBUSB_DIR/libusb/"
export LIBUSB_1_0_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"

cd libusb-compat-0.1.5
export LIBUSB0_DIR=`pwd`
./bootstrap.sh
./configure --enable-static --disable-shared --host=${CROSS_COMPILE}
make clean
make
cd ..

export libusb_CFLAGS="-I$LIBUSB_DIR/libusb/"
export libusb_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"
export libudev_CFLAGS="-I$UDEV_DIR/src/libudev/"
export libudev_LIBS="-L$UDEV_DIR/src/libudev/.libs/ -ludev"

cd hidapi
./bootstrap
export HIDAPI_DIR=`pwd`
./configure --enable-static --disable-shared --host=${CROSS_COMPILE}
make clean
make -j4
cd ..

cd libftdi1-1.4
export LIBFTDI1_DIR=`pwd`
if [ -d build ]; then
rm -rf build
fi
mkdir build && cd build

if [[ ${ARCH} == *mingw* ]]; then
LIBFTDI1_EXTRAFLAGS="-DBUILD_SHARED_LIBS=OFF -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CROSSCOMPILING=1 -DCMAKE_C_FLAGS=-fpermissive"
fi

cmake -DCMAKE_C_COMPILER=${CROSS_COMPILER} -DBUILD_TESTS=no -DDOCUMENTATION=no -DEXAMPLES=no -DFTDIPP=no -DFTDI_EEPROM=no -DLINK_PYTHON_LIBRARY=no -DPYTHON_BINDINGS=no -DCMAKE_INSTALL_PREFIX=$LIBFTDI1_DIR $LIBFTDI1_EXTRAFLAGS ..
make clean
make ftdi1-static
cd ..
cd ..

if [[ ${ARCH} == *darwin* ]]; then
x86_64-apple-darwin13-ranlib $LIBFTDI1_DIR/build/src/libftdi1.a
fi

cd OpenOCD
./bootstrap
export LIBUSB0_CFLAGS="-I$LIBUSB0_DIR/libusb/"
export LIBUSB0_LIBS="-L$LIBUSB0_DIR/libusb/.libs/ -lusb -lpthread"
export LIBUSB1_CFLAGS="-I$LIBUSB_DIR/libusb/"
export LIBUSB1_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"
export LIBFTDI_CFLAGS="-I$LIBFTDI1_DIR/src/"
export LIBFTDI_LIBS="-L$LIBFTDI1_DIR/build/src/ -lftdi1 -lpthread"
export HIDAPI_CFLAGS="-I$HIDAPI_DIR/hidapi/"

if [[ ${ARCH} == *linux* ]]; then
export HIDAPI_LIBS="-L$HIDAPI_DIR/linux/.libs/ -L$HIDAPI_DIR/libusb/.libs/ -lhidapi-hidraw -lhidapi-libusb"
fi

if [[ ${ARCH} == *darwin* ]]; then
export HIDAPI_LIBS="-L$HIDAPI_DIR/mac/.libs/ -L$HIDAPI_DIR/libusb/.libs/ -lhidapi"
fi

if [[ ${ARCH} == *mingw* ]]; then
export HIDAPI_LIBS="-L$HIDAPI_DIR/windows/.libs/ -L$HIDAPI_DIR/libusb/.libs/ -lhidapi"
fi

if [[ ${ARCH} == *mingw* ]]; then
OPENOCD_COMPILE_SWITCHES="--enable-remote-bitbang --enable-stlink --enable-usb-blaster-2 --enable-ti-icdi --enable-jlink --enable-usbprog --enable-cmsis-dap"
else
OPENOCD_COMPILE_SWITCHES="--enable-remote-bitbang --enable-stlink --enable-usb-blaster-2 --enable-ti-icdi --enable-jlink --enable-usbprog --enable-cmsis-dap --enable-jtag_vpi --enable-ioutil"
fi

if [[ ${ARCH} == *linux* ]]; then
OPENOCD_COMPILE_SWITCHES="$OPENOCD_COMPILE_SWITCHES --enable-sysfsgpio"
fi

export CFLAGS="-DHAVE_LIBUSB_ERROR_NAME"
PKG_CONFIG_PATH=`pwd` ./configure $OPENOCD_COMPILE_SWITCHES --disable-werror --prefix=$PREFIX --host=${CROSS_COMPILE}
make clean
CFLAGS=-static make
make install
9 changes: 8 additions & 1 deletion compile_unix_openocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export LIBUSB_1_0_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"

cd libusb-compat-0.1.5
export LIBUSB0_DIR=`pwd`
automake --add-missing
autoreconf
./configure --enable-static --disable-shared
make clean
Expand Down Expand Up @@ -91,8 +92,14 @@ else
export HIDAPI_LIBS="-L$HIDAPI_DIR/mac/.libs/ -L$HIDAPI_DIR/libusb/.libs/ -lhidapi"
fi

OPENOCD_COMPILE_SWITCHES="--enable-remote-bitbang --enable-stlink --enable-usb-blaster-2 --enable-ti-icdi --enable-jlink --enable-usbprog --enable-cmsis-dap --enable-jtag_vpi --enable-ioutil"

if [[ ${ARCH} != *darwin* ]]; then
OPENOCD_COMPILE_SWITCHES="$OPENOCD_COMPILE_SWITCHES --enable-sysfsgpio"
fi

export CFLAGS="-DHAVE_LIBUSB_ERROR_NAME"
PKG_CONFIG_PATH=`pwd` ./configure --disable-werror --prefix=$PREFIX
PKG_CONFIG_PATH=`pwd` ./configure $OPENOCD_COMPILE_SWITCHES --disable-werror --prefix=$PREFIX
make clean
CFLAGS=-static make
make install
5 changes: 4 additions & 1 deletion compile_win_openocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export LIBUSB_1_0_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"

cd libusb-compat-0.1.5
export LIBUSB0_DIR=`pwd`
automake --add-missing
autoreconf
./configure --enable-static --disable-shared --host=i686-w64-mingw32
make clean
Expand Down Expand Up @@ -78,6 +79,8 @@ make clean
make -j4
cd ..

OPENOCD_COMPILE_SWITCHES="--enable-remote-bitbang --enable-stlink --enable-usb-blaster-2 --enable-ti-icdi --enable-jlink --enable-usbprog --enable-cmsis-dap"

cd OpenOCD
./bootstrap
export LIBUSB0_CFLAGS="-I$LIBUSB0_DIR/libusb/"
Expand All @@ -87,7 +90,7 @@ export LIBUSB1_LIBS="-L$LIBUSB_DIR/libusb/.libs/ -lusb-1.0 -lpthread"
export HIDAPI_CFLAGS="-I$HIDAPI_DIR/hidapi/"
export HIDAPI_LIBS="-L$HIDAPI_DIR/windows/.libs/ -L$HIDAPI_DIR/libusb/.libs/ -lhidapi"
export CFLAGS="-DHAVE_LIBUSB_ERROR_NAME"
PKG_CONFIG_PATH=`pwd` ./configure --host=i686-w64-mingw32 --disable-jtag_vpi --prefix=$PREFIX
PKG_CONFIG_PATH=`pwd` ./configure --host=i686-w64-mingw32 $OPENOCD_COMPILE_SWITCHES --disable-jtag_vpi --prefix=$PREFIX
make clean
CFLAGS=-static make
make install
Expand Down
9 changes: 5 additions & 4 deletions eudev-3.1.5/compile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.

scriptversion=2012-10-14.11; # UTC
scriptversion=2016-01-11.22; # UTC

# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Written by Tom Tromey <[email protected]>.
#
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
Expand Down Expand Up @@ -342,6 +343,6 @@ exit $ret
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
1 change: 0 additions & 1 deletion eudev-3.1.5/src/udev/udev-builtin-keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include "udev.h"

static const struct key *keyboard_lookup_key(const char *str, unsigned len);
#include "keyboard-keys-from-name.h"
#include "keyboard-keys-to-name.h"

Expand Down
2 changes: 1 addition & 1 deletion hidapi/ar-lib
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
me=ar-lib
scriptversion=2012-03-01.08; # UTC

# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# Copyright (C) 2010-2017 Free Software Foundation, Inc.
# Written by Peter Rosin <[email protected]>.
#
# This program is free software; you can redistribute it and/or modify
Expand Down
9 changes: 5 additions & 4 deletions hidapi/compile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.

scriptversion=2012-10-14.11; # UTC
scriptversion=2016-01-11.22; # UTC

# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Written by Tom Tromey <[email protected]>.
#
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
Expand Down Expand Up @@ -342,6 +343,6 @@ exit $ret
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
53 changes: 53 additions & 0 deletions libftdi1-1.4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Normal stuff
*.o
*.a
*.so
*.lo
*.la
*.pc
.deps/
.libs/
.kdev4/
build/

# kdevelop
*.kdevelop.pcs
*.kdevses

# Doxygen documentation
Doxyfile
Doxyfile.xml
doc/Doxyfile
doc/html
doc/man
doc/xml

# examples
examples/baud_test
examples/bitbang
examples/bitbang2
examples/bitbang_cbus
examples/bitbang_ft2232
examples/find_all
examples/find_all_pp
examples/serial_test
examples/simple

# Backup files and stuff from patches
*.orig
*.rej
*~
.*.swp

# libftdi specific
libftdi1-config
libftdi1.spec

# CMake
CMakeCache.txt
cmake_install.cmake
CMakeFiles

# Misc. binaries
*.dylib
opt
Loading