You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
| 2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
| 2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
| 2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
| 2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
| 2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
| 2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
| 2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
| 2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
| 2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
| 2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
| 2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
| 2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
| 2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(54) |
Sep
(47) |
Oct
(15) |
Nov
(42) |
Dec
|
|
From: <du...@ma...> - 2008-12-27 02:30:12
|
Author: duane Date: 2008-12-27 02:30:06 +0100 (Sat, 27 Dec 2008) New Revision: 1276 Added: trunk/testing/build.test1/ Removed: trunk/testing/build.tests/ Log: Renamed build.tests to build.test1 Copied: trunk/testing/build.test1 (from rev 1275, trunk/testing/build.tests) Property changes on: trunk/testing/build.test1 ___________________________________________________________________ Name: svn:mergeinfo + |
Author: duane Date: 2008-12-27 02:15:50 +0100 (Sat, 27 Dec 2008) New Revision: 1275 Added: trunk/testing/build.tests/ trunk/testing/build.tests/Makefile trunk/testing/build.tests/Makefile.confuse trunk/testing/build.tests/Makefile.ftd2xx trunk/testing/build.tests/Makefile.libftdi trunk/testing/build.tests/Makefile.libusb trunk/testing/build.tests/Makefile.openocd trunk/testing/build.tests/local.uses trunk/testing/build.tests/mingw32_help/ trunk/testing/build.tests/mingw32_help/include/ trunk/testing/build.tests/mingw32_help/include/elf.h trunk/testing/build.tests/mingw32_help/include/sys/ trunk/testing/build.tests/mingw32_help/include/sys/cdefs.h trunk/testing/build.tests/mingw32_help/include/sys/elf32.h trunk/testing/build.tests/mingw32_help/include/sys/elf64.h trunk/testing/build.tests/mingw32_help/include/sys/elf_common.h trunk/testing/build.tests/mingw32_help/include/sys/elf_generic.h Modified: trunk/configure.in trunk/doc/openocd.texi trunk/src/Makefile.am trunk/src/helper/options.c trunk/src/jtag/Makefile.am Log: Build Permutations with ftd2xx and libftdi addressed. Also added a new se of regression makefiles to build openocd in multiple ways Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/configure.in 2008-12-27 01:15:50 UTC (rev 1275) @@ -28,6 +28,133 @@ is_mingw=no is_win32=no +# We are not *ALWAYS* being installed in the standard place. +# We may be installed in a "tool-build" specific location. +# Normally with other packages - as part of a tool distro. +# Thus - we should search that 'libdir' also. +# +# And - if we are being installed there - the odds are +# The libraries unique to what we are are there too. +# +# what matters is the "exec-prefix" +if test $exec_prefix != $ac_default_prefix +then + # use build specific install library dir + LDFLAGS="$LDFLAGS -L$libdir" + # RPATH becomes an issue on Linux only + if test $host_os = linux-gnu + then + LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir" + fi + # The "INCDIR" is also usable + CFLAGS="$CFLAGS -I$includedir" +fi + +AC_ARG_WITH(ftd2xx, + AS_HELP_STRING([--with-ftd2xx=<PATH>],[This option has been removed.]), +[ +# Option Given. +cat << __EOF__ + +The option: --with-ftd2xx=<PATH> has been removed replaced. +On Linux, the new option is: + + --with-ftd2xx-linux-tardir=/path/to/files + +Where <path> is the path the the directory where the "tar.gz" file +from FTDICHIP.COM was unpacked, for example: + + --with-ftd2xx-linux-tardir=/home/duane/libftd2xx-linux-tardir=/home/duane/libftd2xx0.4.16 + +On Cygwin/MingW32, the new option is: + + --with-ftd2xx-win32-zipdir=/path/to/files + +Where <path> is the path to the directory where the "zip" file from +FTDICHIP.COM was unpacked, for example: + + --with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.cdm.files + +__EOF__ + + AC_MSG_ERROR([Sorry Cannot continue]) +], +[ +# Option not given +true +] +) + +#======================================== +# FTD2XXX support comes in 3 forms. +# (1) win32 - via a zip file +# (2) linux - via a tar file +# (3) linux/cygwin/mingw - via libftdi +# +# In case (1) and (2) we need to know where the package was unpacked. + +AC_ARG_WITH(ftd2xx-win32-zipdir, + AS_HELP_STRING([--with-ftd2xx-win32-zipdir],[Where (CYGWIN/MINGW) the zip file from ftdichip.com was unpacked <default=search>]), + [ + # option present + if test -d $with_ftd2xx_win32_zipdir + then + with_ftd2xx_win32_zipdir=`cd $with_ftd2xx_win32_zipdir && pwd` + AC_MSG_NOTICE([Using: ftdichip.com library: $with_ftd2xx_win32_zipdir]) + else + AC_MSG_ERROR([Parameter to --with-ftd2xx-win32-zipdir is not a dir: $with_ftd2xx_win32_zipdir]) + fi + ], + [ + # not given + true + ] +) + + +AC_ARG_WITH(ftd2xx-linux-tardir, + AS_HELP_STRING([--with-ftd2xx-linux-tardir], [Where (Linux/Unix) the tar file from ftdichip.com was unpacked <default=search>]), + [ + # Option present + if test $is_win32 = yes ; then + AC_MSG_ERROR([The option: --with-ftd2xx-linux-tardir is only usable on linux]) + fi + if test -d $with_ftd2xx_linux_tardir + then + with_ftd2xx_linux_tardir=`cd $with_ftd2xx_linux_tardir && pwd` + AC_MSG_NOTICE([Using: ftdichip.com library: $with_ftd2xx_linux_tardir]) + else + AC_MSG_ERROR([Parameter to --with-ftd2xx-linux-tardir is not a dir: $with_ftd2xx_linux_tardir]) + fi + ], + [ + # Not given + true + ] +) + + +AC_ARG_WITH(ftd2xx-lib, + AS_HELP_STRING([--with-ftd2xx-lib], [Use static or shared ftd2xx libs on default static]), +[ +case "$withval" in +static) + with_ftd2xx_lib=$withval + ;; +shared) + with_ftd2xx_lib=$withval + ;; +*) + AC_MSG_ERROR([Option: --with-ftd2xx-lib=static or --with-ftd2xx-lib=shared not, $withval]) + ;; +esac +], +[ + # Default is static - it is simpler :-( + with_ftd2xx_lib=static +] +) + AC_ARG_ENABLE(gccwarnings, AS_HELP_STRING([--enable-gccwarnings], [Enable compiler warnings, default no]), [gcc_warnings=$enableval], [gcc_warnings=no]) @@ -52,11 +179,11 @@ esac AC_ARG_ENABLE(ft2232_libftdi, - AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver]), + AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver, opensource alternate of FTD2XX]), [build_ft2232_libftdi=$enableval], [build_ft2232_libftdi=no]) AC_ARG_ENABLE(ft2232_ftd2xx, - AS_HELP_STRING([--enable-ft2232_ftd2xx], [Enable building support for FT2232 based devices using the FTD2XX driver]), + AS_HELP_STRING([--enable-ft2232_ftd2xx], [Enable building support for FT2232 based devices using the FTD2XX driver from ftdichip.com]), [build_ft2232_ftd2xx=$enableval], [build_ft2232_ftd2xx=no]) AC_ARG_ENABLE(amtjtagaccel, @@ -120,11 +247,6 @@ AS_HELP_STRING([--enable-rlink], [Enable building support for the Raisonance RLink JTAG Programmer]), [build_rlink=$enableval], [build_rlink=no]) -AC_ARG_WITH(ftd2xx, - [AS_HELP_STRING(--with-ftd2xx, - [Where libftd2xx can be found <default=search>])], - [], - with_ftd2xx=search) case $host in *-cygwin*) @@ -296,6 +418,198 @@ AC_DEFINE(BUILD_RLINK, 0, [0 if you don't want the RLink JTAG driver.]) fi +#-- Deal with MingW/Cygwin FTD2XX issues + +if test $is_win32 = yes; then +if test "${with_ftd2xx_linux_tardir+set}" = set +then + AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.]) +fi + +if test $build_ft2232_ftd2xx = yes ; then +AC_MSG_CHECKING([for ftd2xx.lib exists (win32)]) + + # if we are given a zipdir... + if test "${with_ftd2xx_win32_zipdir+set}" = set + then + # Set the CFLAGS for "ftd2xx.h" + f=$with_ftd2xx_win32_zipdir/ftd2xx.h + if test ! -f $f ; then + AC_MSG_ERROR([File: $f cannot be found]) + fi + CFLAGS="$CFLAGS -I$with_ftd2xx_win32_zipdir" + + # And calculate the LDFLAGS for the machine + case "$host_cpu" in + i?86|x86_*) + LDFLAGS="$LFLAGS -L$with_ftd2xx_win32_zipdir/i386" + LIBS="$LIBS -lftd2xx" + f=$with_ftd2xx_win32_zipdir/i386/ftd2xx.lib + ;; + amd64) + LDFLAGS="$LFLAGS -L$with_ftd2xx_win32_zipdir/amd64" + LIBS="$LIBS -lftd2xx" + f=$with_ftd2xx_win32_zipdir/amd64/ftd2xx.lib + ;; + *) + AC_MSG_ERROR([Unknown Win32 host cpu: $host_cpu]) + ;; + esac + if test ! -f $f ; then + AC_MSG_ERROR([Library: $f not found]) + fi + else + LIBS="$LIBS -lftd2xx" + AC_MSG_WARN([ASSUMPTION: The (win32) FTDICHIP.COM files: ftd2xx.h and ftd2xx.lib are in a proper place]) + fi +fi +fi + + +if test $is_win32 = no; then + +if test "${with_ftd2xx_win32_zipdir+set}" = set +then + AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only]) +fi + +if test $build_ft2232_ftd2xx = yes ; then + AC_MSG_CHECKING([for libftd2xx.a (linux)]) + # Must be linux - + # Cause FTDICHIP does not supply a MAC-OS version + if test $host_os != linux-gnu; then + AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi instead]) + fi + # Are we given a TAR directory? + if test "${with_ftd2xx_linux_tardir+set}" = set + then + # The .H file is simple.. + f=$with_ftd2xx_linux_tardir/ftd2xx.h + if test ! -f $f ; then + AC_MSG_ERROR([Option: --with-ftd2xx-linux-tardir appears wrong, cannot find: $f]) + fi + CFLAGS="$CFLAGS -I$with_ftd2xx_linux_tardir" + if test $with_ftd2xx_lib = shared + then + LDFLAGS="$LDFLAGS -L$with_ftd2xx_linux_tardir" + LIBS="$LIBS -lftd2xx" + AC_MSG_RESULT([ Assuming: -L$with_ftd2xx_linux_tardir -lftd2xx]) + else + # Test #1 - Future proof - if/when ftdichip fixes their distro. + # Try it with the simple ".a" suffix. + f=$with_ftd2xx_linux_tardir/static_lib/libftd2xx.a + if test -f $f ; then + # Yea we are done + LDFLAGS="$LDFLAGS -L$with_ftd2xx_linux_tardir/static_lib" + LIBS="$LIBS -lftd2xx" + else + # Test Number2. + # Grr.. perhaps it exists as a version number? + f="$with_ftd2xx_linux_tardir/static_lib/libftd2xx.a.*.*.*" + count=`ls $f | wc -l` + if test $count -gt 1 ; then + AC_MSG_ERROR([Multiple libftd2xx.a files found in: $with_ftd2xx_linux_tardir/static_lib sorry cannot handle this yet]) + fi + if test $count -ne 1 ; then + AC_MSG_ERROR([Not found: $f, option: --with-ftd2xx-linux-tardir appears to be wrong]) + fi + # Because the "-l" rules do not understand version numbers... + # we will just stuff the absolute path onto the LIBS variable + f=`ls $f` + # + LIBS="$LIBS $f -lpthread" + # No need to bother with LDFLAGS... + fi + AC_MSG_RESULT([Found: $f]) + fi + else + LIBS="$LIBS -lftd2xx" + AC_MSG_RESULT([Assumed: installed]) + AC_MSG_WARN([The (linux) FTDICHIP.COM files ftd2xx.h and libftd2xx.so are assumed to be in a proper place]) + fi +fi +fi + +if test $build_ft2232_ftd2xx = yes; then + +# Before we go any further - make sure we can *BUILD* and *RUN* +# a simple app with the "ftd2xx.lib" file - in what ever form we where given +# We should be able to compile, link and run this test program now + AC_MSG_CHECKING([Test: Build & Link with ftd2xx]) + +# +# Save the LDFLAGS for later.. +LDFLAGS_SAVE=$LDFLAGS +CFLAGS_SAVE=$CFLAGS +_LDFLAGS=`eval echo $LDFLAGS` +_CFLAGS=`eval echo $CFLAGS` +LDFLAGS=$_LDFLAGS +CFLAGS=$_CFLAGS + AC_RUN_IFELSE( +[ +#include "confdefs.h" +#if IS_WIN32 +#include "windows.h" +#endif +#include <stdio.h> +#include <ftd2xx.h> + +int +main( int argc, char **argv ) +{ + DWORD x; + FT_GetLibraryVersion( &x ); + return 0; +} +], [ AC_MSG_RESULT([Success!])] , [ AC_MSG_ERROR([Cannot build & run test program using ftd2xx.lib]) ] ) +LDFLAGS=$LDFLAGS_SAVE +CFLAGS=$CFLAGS_SAVE +fi + +if test $build_ft2232_libftdi = yes ; then + # We assume: the package is preinstalled in the proper place + # these present as 2 libraries.. + LIBS="$LIBS -lftdi -lusb" + # + # Try to build a small program. + AC_MSG_CHECKING([Build & Link with libftdi...]) + +LDFLAGS_SAVE=$LDFLAGS +CFLAGS_SAVE=$CFLAGS +_LDFLAGS=`eval echo $LDFLAGS` +_CFLAGS=`eval echo $CFLAGS` +LDFLAGS=$_LDFLAGS +CFLAGS=$_CFLAGS + + AC_RUN_IFELSE( +[ +#include <stdio.h> +#include <ftdi.h> + +int +main( int argc, char **argv ) +{ + struct ftdi_context *p; + p = ftdi_new(); + if( p != NULL ){ + return 0; + } else { + fprintf( stderr, "calling ftdi_new() failed\n"); + return 1; + } +} +] +, +[ AC_MSG_RESULT([Success]) ] +, +[ AC_MSG_ERROR([Cannot build & run test program using libftdi]) ] ) +# Restore the 'unexpanded ldflags' +LDFLAGS=$LDFLAGS_SAVE +CFLAGS=$CFLAGS_SAVE +fi + + + AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(openocd, 1.0) @@ -321,7 +635,6 @@ AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes) AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes) AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes) -AM_CONDITIONAL(FTD2XXDIR, test $with_ftd2xx != search) AM_CONDITIONAL(BITQ, test $build_bitq = yes) AC_LANG_C @@ -377,6 +690,6 @@ AC_MSG_RESULT([$EXEEXT_FOR_BUILD]) AC_SUBST(EXEEXT_FOR_BUILD) -AC_SUBST(WITH_FTD2XX, $with_ftd2xx) +#AC_SUBST(WITH_FTD2XX, $with_ftd2xx) AC_OUTPUT(Makefile src/Makefile src/helper/Makefile src/jtag/Makefile src/xsvf/Makefile src/target/Makefile src/server/Makefile src/flash/Makefile src/pld/Makefile doc/Makefile) Modified: trunk/doc/openocd.texi =================================================================== --- trunk/doc/openocd.texi 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/doc/openocd.texi 2008-12-27 01:15:50 UTC (rev 1275) @@ -127,11 +127,13 @@ @chapter Building @cindex building OpenOCD +@section Pre-Built Tools If you are interested in getting actual work done rather than building OpenOCD, then check if your interface supplier provides binaries for you. Chances are that that binary is from some SVN version that is more stable than SVN trunk where bleeding edge development takes place. +@section Building From Source You can download the current SVN version with SVN client of your choice from the following repositories: @@ -166,8 +168,7 @@ homepage (@uref{www.amontec.com}), as the JTAGkey uses a non-standard VID/PID. @end itemize -libftdi is supported under windows. Versions earlier than 0.13 will require patching. -see contrib/libftdi for more details. +libftdi is supported under windows. Do not use versions earlier then 0.14. In general, the D2XX driver provides superior performance (several times as fast), but has the draw-back of being binary-only - though that isn't that bad, as it isn't @@ -179,36 +180,38 @@ @end example Bootstrap generates the configure script, and prepares building on your system. @example - ./configure + ./configure [options, see below] @end example Configure generates the Makefiles used to build OpenOCD. @example make + make install @end example -Make builds OpenOCD, and places the final executable in ./src/. +Make builds OpenOCD, and places the final executable in ./src/, the last step, ``make install'' is optional. The configure script takes several options, specifying which JTAG interfaces should be included: @itemize @bullet @item -@option{--enable-parport} +@option{--enable-parport} - Bit bang pc printer ports. @item -@option{--enable-parport_ppdev} +@option{--enable-parport_ppdev} - Parallel Port [see below] @item -@option{--enable-parport_giveio} +@option{--enable-parport_giveio} - Parallel Port [see below] @item -@option{--enable-amtjtagaccel} +@option{--enable-amtjtagaccel} - Parallel Port [Amontec, see below] @item -@option{--enable-ft2232_ftd2xx} -@footnote{Using the latest D2XX drivers from FTDI and following their installation -instructions, I had to use @option{--enable-ft2232_libftd2xx} for OpenOCD to -build properly.} +@option{--enable-ft2232_ftd2xx} - Numerous USB Type ARM JTAG dongles use the FT2232C chip from this FTDICHIP.COM chip (closed source). @item -@option{--enable-ft2232_libftdi} +@option{--enable-ft2232_libftdi} - An open source (free) alternate to FTDICHIP.COM ftd2xx solution (Linux, MacOS, Cygwin) @item -@option{--with-ftd2xx=/path/to/d2xx/} +@option{--with-ftd2xx-win32-zipdir=PATH} - If using FTDICHIP.COM ft2232c, point at the directory where the Win32 FTDICHIP.COM 'CDM' driver zip file was unpacked. @item +@option{--with-ftd2xx-linux-tardir=PATH} - Linux only equal of @option{--with-ftd2xx-win32-zipdir}, where you unpacked the TAR.GZ file. +@item +@option{--with-ftd2xx-lib=shared|static} - Linux only. Default: static, specifies how the FTDICHIP.COM libftd2xx driver should be linked. Note 'static' only works in conjunction with @option{--with-ftd2xx-linux-tardir}. Shared is supported (12/26/2008), however you must manually install the required header files and shared libraries in an appropriate place. This uses ``libusb'' internally. +@item @option{--enable-gw16012} @item @option{--enable-usbprog} @@ -217,24 +220,73 @@ @item @option{--enable-presto_ftd2xx} @item -@option{--enable-jlink} +@option{--enable-jlink} - From SEGGER @item -@option{--enable-rlink} +@option{--enable-rlink} - Raisonance.com dongle. @end itemize +@section Parallel Port Dongles + If you want to access the parallel port using the PPDEV interface you have to specify both the @option{--enable-parport} AND the @option{--enable-parport_ppdev} option since the @option{--enable-parport_ppdev} option actually is an option to the parport driver (see @uref{http://forum.sparkfun.com/viewtopic.php?t=3795} for more info). -Cygwin users have to specify the location of the FTDI D2XX package. This should be an -absolute path containing no spaces. +@section FT2232C Based USB Dongles -Linux users should copy the various parts of the D2XX package to the appropriate -locations, i.e. /usr/include, /usr/lib. +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. Some claim the (closed) FTDICHIP.COM solution is faster. -Miscellaneous configure options +The FTDICHIP drivers come as either a (win32) ZIP file, or a (linux) +TAR.GZ file. You must unpack them ``some where'' convient. As of this +writing (12/26/2008) FTDICHIP does not supply means to install these +files ``in an appropriate place'' As a result, there are two +``./configure'' options that help. +Below is an example build process: + +1) Check out the latest version of ``openocd'' from SVN. + +2) Download & Unpack either the Windows or Linux FTD2xx Drivers + (@uref{http://www.ftdichip.com/Drivers/D2XX.htm}) + +@example + /home/duane/ftd2xx.win32 => the Cygwin/Win32 ZIP file contents. + /home/duane/libftd2xx0.4.16 => the Linux TAR file contents. +@end example + +3) Configure with these options: + +@example +Cygwin FTCICHIP solution + ./configure --prefix=/home/duane/mytools \ + --enable-ft2232_ftd2xx \ + --with-ftd2xx-win32-zipdir=/home/duane/ftd2xx.win32 + +Linux FTDICHIP solution + ./configure --prefix=/home/duane/mytools \ + --enable-ft2232_ftd2xx \ + --with-ft2xx-linux-tardir=/home/duane/libftd2xx0.4.16 + +Cygwin/Linux LIBFTDI solution + Assumes: + 1a) For Windows: The windows port of LIBUSB is in place. + 1b) For Linux: libusb has been built and is inplace. + + 2) And libftdi has been built and installed + Note: libftdi - relies upon libusb. + + ./configure --prefix=/home/duane/mytools \ + --enable-ft2232_libftdi + +@end example + +4) Then just type ``make'', and perhaps ``make install''. + + +@section Miscellaneous configure options + @itemize @bullet @item @option{--enable-gccwarnings} - enable extra gcc warnings during build Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/src/Makefile.am 2008-12-27 01:15:50 UTC (rev 1275) @@ -55,33 +55,15 @@ endif endif -if IS_WIN32 -if FTD2XXDIR -FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib -else -FTD2XXLDADD = -lftd2xx -endif -else -FTD2XXLDADD = -lftd2xx -endif - -if FT2232_FTD2XX -FTD2XXLIB = $(FTD2XXLDADD) -else -if PRESTO_FTD2XX -FTD2XXLIB = $(FTD2XXLDADD) -else -FTD2XXLIB = -endif -endif + openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \ $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \ $(top_builddir)/src/helper/libhelper.a \ $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \ $(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \ $(top_builddir)/src/pld/libpld.a \ - $(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB) + $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) if HTTPD Modified: trunk/src/helper/options.c =================================================================== --- trunk/src/helper/options.c 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/src/helper/options.c 2008-12-27 01:15:50 UTC (rev 1275) @@ -178,7 +178,8 @@ if (version_flag) { /* Nothing to do, version gets printed automatically. */ - exit(-1); + // It is not an error to request the VERSION number. + exit(0); } return ERROR_OK; Modified: trunk/src/jtag/Makefile.am =================================================================== --- trunk/src/jtag/Makefile.am 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/src/jtag/Makefile.am 2008-12-27 01:15:50 UTC (rev 1275) @@ -1,15 +1,6 @@ -if FTD2XXDIR -if IS_MINGW -FTD2XXINC = -I@WITH_FTD2XX@ -else -FTD2XXINC = -I@WITH_FTD2XX@/ -endif -else -FTD2XXINC = -endif -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper $(FTD2XXINC) $(all_includes) -I$(top_srcdir)/src/target +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper $(all_includes) -I$(top_srcdir)/src/target METASOURCES = AUTO noinst_LIBRARIES = libjtag.a Added: trunk/testing/build.tests/Makefile =================================================================== --- trunk/testing/build.tests/Makefile 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/Makefile 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,90 @@ +# -*- mode: makefile -*- +# +default: _complain_ +include ./local.uses + +%: _complain_ + + +_complain_: + @echo "" + @echo " Try the target: cygwin.buildtest or linux.buildtest " + @echo "" + +remove.install: + rm -rf ${INSTALL_DIR} + +.PHONY: remove.install + +cygwin.buildtest: + ${MAKE} -f Makefile.ftd2xx clean all + ${MAKE} -f Makefile.openocd cygwin.easy.permutations + ${MAKE} -f Makefile.openocd mingw32.easy.permutations + ${MAKE} -f Makefile.libftdi all + ${MAKE} -f Makefile.openocd cygwin.libftdi + +linux.buildtest: + ${MAKE} linux.easy.buildtest + ${MAKE} linux.ftd2xx_installed + ${MAKE} linux.ft2232_libftdi + @echo "" + @echo "" + @echo "========================================" + @echo " Linux Build Tests Complete " + @echo "========================================" + @echo "" + @echo "" + + +linux.easy.buildtest: + @test -d openocd || (echo "Where the source to openocd?" && exit 1) + ${MAKE} -f Makefile.openocd bootstrap + ${MAKE} -f Makefile.ftd2xx all + ${MAKE} -f Makefile.openocd linux.easy.permutations + +linux.ftd2xx_installed: + ${MAKE} remove.install + ${MAKE} linux.ftd2xx_installed.setup + ${MAKE} -f Makefile.openocd $@ + + linux.ft2232_libftdi: + ${MAKE} remove.install + ${MAKE} -f Makefile.libusb all + ${MAKE} -f Makefile.confuse all + ${MAKE} -f Makefile.libftdi all + ${MAKE} -f Makefile.openocd $@ + +# This target is used to "install" files from +# the FTDICHIP.COM tar.gz unpack directory +# into "a proper place" - where they should be found. +linux.ftd2xx_installed.setup: + mkdir -p ${INSTALL_DIR}/include + mkdir -p ${EXEC_PREFIX}/lib + @# + @# Sanity check - make sure the .H file is findable + @# + @f=$(FTD2XX_LINUX_DIR)/ftd2xx.h && \ + test -f $$f || (echo "Error: $$f not found" ; exit 1) + @# + @# Header files are simple... just copy them. + @# + cp $(FTD2XX_LINUX_DIR)/ftd2xx.h $(PREFIX)/include/. + cp $(FTD2XX_LINUX_DIR)/WinTypes.h $(PREFIX)/include/. + @# + @# .SO files are harder. + @# (1) copy them, (2) make links + @# + cp $(FTD2XX_LINUX_DIR)/libftd2xx.so.$(FTD2XX_LINUX_VERSION) $(EXEC_PREFIX)/lib/. + cd $(EXEC_PREFIX)/lib && rm -f libftd2xx.so.0 + cd $(EXEC_PREFIX)/lib && ln -s libftd2xx.so.$(FTD2XX_LINUX_VERSION) libftd2xx.so.0 + cd $(EXEC_PREFIX)/lib && rm -f libftd2xx.so + cd $(EXEC_PREFIX)/lib && ln -s libftd2xx.so.$(FTD2XX_LINUX_VERSION) libftd2xx.so + + +.PHONY: linux.buildtest \ + linux.easy.buildtest \ + linux.ftd2xx_installed \ + linux.ft22232_libftdi \ + linux.ftd2xx_installed.setup + + Property changes on: trunk/testing/build.tests/Makefile ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/Makefile.confuse =================================================================== --- trunk/testing/build.tests/Makefile.confuse 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/Makefile.confuse 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,46 @@ +# -*- mode: makefile -*- +default: _complain_ +include ./local.uses + +TARFILE_LOCAL=${VIRGINS}/confuse-${LIBCONFUSE_VERSION}.tar.gz +TARFILE_URL =http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/confuse-${LIBCONFUSE_VERSION}.tar.gz + +CONFUSE_SRC_DIR =${HERE}/confuse-${LIBCONFUSE_VERSION} +CONFUSE_BUILD_DIR =${HERE}/confuse-build + +download: + wget -O ${TARFILE_LOCAL} ${TARFILE_URL} + +unpack: + rm -rf ${CONFUSE_SRC_DIR} + tar xfz ${TARFILE_LOCAL} + +clean:: + rm -rf ${CONFUSE_SRC_DIR} + +configure: + rm -rf ${CONFUSE_BUILD_DIR} + mkdir ${CONFUSE_BUILD_DIR} + cd ${CONFUSE_BUILD_DIR} && ${CONFUSE_SRC_DIR}/configure \ + --prefix=${PREFIX} \ + --exec-prefix=${EXEC_PREFIX} + +clean:: + rm -rf ${CONFUSE_BUILD_DIR} + +build: + cd ${CONFUSE_BUILD_DIR} && ${MAKE} + +install: + cd ${CONFUSE_BUILD_DIR} && ${MAKE} install + +all: unpack configure build install + +_complain_: + @echo "" + @echo "Please try one of these targets: bootstrap, clean, configure, build, install" + @echo " Or read the makefile and learn about the permutation test targets" + @echo "" + @echo "You also might find the download and unpack targets helpful." + @echo "" + @exit 1 Added: trunk/testing/build.tests/Makefile.ftd2xx =================================================================== --- trunk/testing/build.tests/Makefile.ftd2xx 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/Makefile.ftd2xx 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,88 @@ +# -*- mode: makefile -*- +# +default: _complain_ + +include ./local.uses + +# WARNING... the file on the ftdi chip site has a SPACE in the filename GRRR!!! +# We fix that with the "-O" option to wget. +ZIPFILE_LOCAL=${VIRGINS}/cdm.${FTD2XX_WIN32_VERSION}.zip +ZIPFILE_URL ="http://www.ftdichip.com/Drivers/CDM/CDM ${FTD2XX_WIN32_VERSION}.zip" + +TARFILE_LOCAL=${VIRGINS}/libftd2xx${FTD2XX_LINUX_VERSION}.tar.gz +TARFILE_URL =http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx${FTD2XX_LINUX_VERSION}.tar.gz + +TARFILE_64_LOCAL=${VIRGINS}/libftd2xx${FTD2XX_LINUX_VERSION}_x86_64.tar.gz +TARFILE_64_URL =http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx${FTD2XX_LINUX_VERSION}_x86_64.tar.gz + + +download.win32: + mkdir -p ${VIRGINS} + wget -O ${ZIPFILE_LOCAL} ${ZIPFILE_URL} + +unpack.win32: + rm -rf ${FTD2XX_WIN32_DIR} + mkdir -p ${FTD2XX_WIN32_DIR} + cd ${FTD2XX_WIN32_DIR} && unzip ${ZIPFILE_LOCAL} + +clean:: + rm -rf ${FTD2XX_WIN32_DIR} + +download.linux: + mkdir -p ${VIRGINS} + wget -O ${TARFILE_LOCAL} ${TARFILE_URL} + +clean:: + rm -rf ${FTD2XX_LINUX_DIR} + +unpack.linux: + rm -rf ${FTD2XX_LINUX_DIR} + mkdir -p ${FTD2XX_LINUX_DIR} + tar xfz ${TARFILE_LOCAL} + +download.linux.x86_64: + mkdir -p ${VIRGINS} + wget -O ${TARFILE_LOCAL} ${TARFILE_URL} + +unpack.linux.x86_64: + rm -rf ${FTD2XX_LINUX_64_DIR} + mkdir -p ${FTD2XX_LINUX_64_DIR} + tar xfz ${TARFILE_64_LOCAL} + +clean:: + rm -rf ${FTD2XX_LINUX_64_DIR} + +download: download.win32 download.linux + +unpack.cygwin unpack.mingw32: unpack.win32 + +unpack: unpack.${BUILD_SYSNAME} + +# Nothing to do here +build: + @echo "Done" + +#Nothing to do here +configure: + @echo "Done" + +# Nothing to do here +install: + @echo "Done" + +all: unpack configure build install + +.PHONY: install + +# Nothing to do here +clean:: + @echo "Done" + +_complain_: + @echo "" + @echo "Please try one of these targets: bootstrap, clean, configure, build, install" + @echo " Or read the makefile and learn about the permutation test targets" + @echo "" + @echo "You also might find the download and unpack targets helpful." + @echo "" + @exit 1 Property changes on: trunk/testing/build.tests/Makefile.ftd2xx ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/Makefile.libftdi =================================================================== --- trunk/testing/build.tests/Makefile.libftdi 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/Makefile.libftdi 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,51 @@ +# -*- mode: makefile -*- +default: _complain_ +include ./local.uses + +TARFILE_LOCAL = ${VIRGINS}/libftdi-${LIBFTDI_VERSION}.tar.gz +TARFILE_URL = http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-${LIBFTDI_VERSION}.tar.gz + +LIBFTDI_SRC_DIR = ${HERE}/libftdi-${LIBFTDI_VERSION} +LIBFTDI_BUILD_DIR= ${HERE}/libftdi-build + +download: + mkdir -p virgins + wget -O ${TARFILE_LOCAL} ${TARFILE_URL} + +clean:: + rm -rf ${LIBFTDI_SRC_DIR} + +unpack: + tar xf ${TARFILE_LOCAL} + +PATH := ${EXEC_PREFIX}/bin:${PATH} +export PATH + +clean:: + rm -rf ${LIBFTDI_BUILD_DIR} + +configure: + rm -rf ${LIBFTDI_BUILD_DIR} + mkdir -p ${LIBFTDI_BUILD_DIR} + cd ${LIBFTDI_BUILD_DIR} && ${LIBFTDI_SRC_DIR}/configure \ + --prefix=${PREFIX} \ + --exec-prefix=${EXEC_PREFIX} + +build: + cd ${LIBFTDI_BUILD_DIR} && ${MAKE} + +install: + cd ${LIBFTDI_BUILD_DIR} && ${MAKE} install + +all: unpack configure build install + +.PHONY: install + +_complain_: + @echo "" + @echo "Please try one of these targets: bootstrap, clean, configure, build, install" + @echo " Or read the makefile and learn about the permutation test targets" + @echo "" + @echo "You also might find the download and unpack targets helpful." + @echo "" + @exit 1 Property changes on: trunk/testing/build.tests/Makefile.libftdi ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/Makefile.libusb =================================================================== --- trunk/testing/build.tests/Makefile.libusb 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/Makefile.libusb 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,55 @@ +# -*- mode: makefile -*- +default: _complain_ + +include ./local.uses + +ifeq (x"$BUILD_SYSNAME",x"cygwin") +$(error Please use the Win32 specific port of LibUSB not the Unix version) +endif +ifeq (x"$BUILD_SYSNAME",x"mingw32") +$(error Please use the win32 specific port of LibUSB not the Unix version) +endif + +TARFILE_LOCAL = ${VIRGINS}/libusb-${LIBUSB_VERSION}.tar.bz2 +TARFILE_URL = http://downloads.sourceforge.net/libusb/libusb-${LIBUSB_VERSION}.tar.gz + +LIBUSB_SRC_DIR = ${HERE}/libusb-${LIBUSB_VERSION} +LIBUSB_BUILD_DIR = ${HERE}/libusb-build + +download: + wget -O ${TARFILE_LOCAL} ${TARFILE_URL} + +unpack: + rm -rf ${LIBUSB_SRC_DIR} + tar xfz ${TARFILE_LOCAL} + +clean:: + rm -rf ${LIBUSB_SRC_DIR} + +configure: + rm -rf ${LIBUSB_BUILD_DIR} + mkdir -p ${LIBUSB_BUILD_DIR} + cd ${LIBUSB_BUILD_DIR} && ${LIBUSB_SRC_DIR}/configure \ + --prefix=${PREFIX} --exec-prefix=${EXEC_PREFIX} + +clean:: + rm -rf ${LIBUSB_BUILD_DIR} + +build: + cd ${LIBUSB_BUILD_DIR} && ${MAKE} + +install: + cd ${LIBUSB_BUILD_DIR} && ${MAKE} install + +all: unpack configure build install + +.PHONY: install + +_complain_: + @echo "" + @echo "Please try one of these targets: bootstrap, clean, configure, build, install" + @echo " Or read the makefile and learn about the permutation test targets" + @echo "" + @echo "You also might find the download and unpack targets helpful." + @echo "" + @exit 1 Property changes on: trunk/testing/build.tests/Makefile.libusb ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/Makefile.openocd =================================================================== --- trunk/testing/build.tests/Makefile.openocd 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/Makefile.openocd 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,193 @@ +# -*- mode: makefile -*- +# +default: _complain_ + +include ./local.uses + + +SRC_DIR ?= $(HERE)/openocd +BUILD_SUFFIX ?= $(BUILD_MACHINE) +BUILD_DIR =$(HERE)/openocd.$(BUILD_SUFFIX) + +checkout: + svn co https://svn.berlios.de/svnroot/repos/openocd/trunk openocd + +remove.install: + rm -rf ${INSTALL_DIR} + +#======================================== +# Win32 Build Permutations +# none +# parport +# ftd2xx - (ftdichip) +# libftd +CONFIG_OPTIONS_win32_none = +CONFIG_OPTIONS_win32_parport = --enable-parport +CONFIG_OPTIONS_win32_ftd2xx = --enable-parport --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=$(FTD2XX_WIN32_DIR) + +CYGWIN_EASY_PERMUTATIONS += none +CYGWIN_EASY_PERMUTATIONS += parport +CYGWIN_EASY_PERMUTATIONS += ftd2xx + +MINGW32_EASY_PERMUTATIONS += none +MINGW32_EASY_PERMUTATIONS += parport +MINGW32_EASY_PERMUTATIONS += ftd2xx + + +# This is not a possible permutation, it is manual :-( +# Why? Because "libftdi" installs things into install/include +# which would efect the 'ftd2xx' win32 build +CONFIG_OPTIONS_win32_libftdi = --enable-parport --enable-ft2232_libftdi + +# Default build for win32... is the ftd2xx type build. +PERMUTE_win32 ?= $(BUILD_SYSNAME)_ftd2xx +CONFIG_OPTIONS_win32 ?= $(CONFIG_OPTIONS_win32_$(PERMUTE_win32)) +CONFIG_OPTIONS_cygwin = $(CONFIG_OPTIONS_win32) +CONFIG_OPTIONS_mingw32 = $(CONFIG_OPTIONS_win32) + +#======================================== +# Linux Build Permuatations +# none +# parport +# ft2232_ftd2xx +# ft2232_libftdi +CONFIG_OPTIONS_linux_none = +LINUX_EASY_PERMUTATIONS += none + +CONFIG_OPTIONS_linux_parport = --enable-parport +LINUX_EASY_PERMUTATIONS += parport + +CONFIG_OPTIONS_linux_ft2232_libftdi = --enable-parport --enable-ft2232-libftdi +#this cannot be done as part of the permutations. +#LINUX_EASY_PERMUTATIONS += ft2232_libftdi + +CONFIG_OPTIONS_linux_ft2232_ftd2xx_static = \ + --enable-parport \ + --enable-ft2232-ftd2xx --with-ftd2xx-lib=static --with-ftd2xx-linux-tardir=$(FTD2XX_LINUX_DIR) +LINUX_EASY_PERMUTATIONS += ft2232_ftd2xx_static + +# this is not a possible permutation it is manual :-( +# why? because it interfers with the other permutations +# by "installing files" in the $(INSTALL_DIR) +CONFIG_OPTIONS_linux_ftd2xx_installed = \ + --enable-parport \ + --enable-ft2232-ftd2xx \ + --with-ftd2xx-lib=shared + +# The default build permutation is +PERMUTE_linux ?= ft2232_ftd2xx_static +CONFIG_OPTIONS_linux = $(CONFIG_OPTIONS_linux_$(PERMUTE_linux)) + +CONFIG_OPTIONS_darwin=\ + --enable-ftd2232-libftdi + +# Which build are we doing? +CONFIG_OPTIONS := $(CONFIG_OPTIONS_$(BUILD_SYSNAME)) + +bootstrap: + cd $(SRC_DIR) && bash ./bootstrap + +clean:: + rm -rf $(BUILD_DIR) + +ifndef CFLAGS +_CFLAGS=true +else +_CFLAGS=export CFLAGS="${CFLAGS}" +endif + + +# if this was given... then pass it on +configure: + @echo " Build Sysname: $(BUILD_SYSNAME)" + @echo " Config Options: $(CONFIG_OPTIONS)" + rm -rf $(BUILD_DIR) + mkdir $(BUILD_DIR) + ${_CFLAGS} && \ + cd $(BUILD_DIR) && \ + $(SRC_DIR)/configure \ + --prefix=$(PREFIX) \ + --exec-prefix=$(EXEC_PREFIX) \ + $(CONFIG_OPTIONS) + +build: + cd $(BUILD_DIR) && $(MAKE) + +install: + cd $(BUILD_DIR) && $(MAKE) install + +all: configure build install + +.PHONY: install + +# The "cygwin.libftdi" requires that libftdi be built +# and installed *PRIOR* to running this target. +# it is not part of the permutations because ... +# it interfers with the ftd2xx based builds +cygwin.libftdi: + $(MAKE) -f Makefile.openocd bootstrap + $(MAKE) BUILD_SUFFIX=$@ PERMUTE_win32=libftdi -f Makefile.openocd all + +cygwin.easy.permutations: remove.install ${CYGWIN_EASY_PERMUTATIONS:%=_cygwin.%} + +_cygwin.%: + @echo "" + @echo "" + @echo "========================================" + @echo "Permutation Build... $@" + @echo "========================================" + @echo "" + @echo "" + $(MAKE) PERMUTE_win32=$* BUILD_SUFFIX=cygwin.$* -f Makefile.openocd all + $(EXEC_PREFIX)/bin/openocd -v + +mingw32.easy.permutations: remove.install ${MINGW32_EASY_PERMUTATIONS:%=_mingw32.%} + +# I (duane) build openocd-mingw32 via Cygwin. +# Sadly, the "mingw32" buid for cygwin does not include +# the required "elf.h" header files... so ... +# we have them in our own private helper place. +_mingw32.%: + @echo "" + @echo "" + @echo "========================================" + @echo "Permutation Build... $@" + @echo "========================================" + @echo "" + @echo "" + CFLAGS="-mno-cygwin -I$(HERE)/mingw32_help/include" \ + $(MAKE) -f Makefile.openocd all ;\ + $(EXEC_PREFIX)/bin/openocd -v + +win32.permutations: mingw32.permutations cygwin.permutations + + +# SMOKE TEST - Build every linux permuation... +# If "openocd -v" does exit(0) we are good enough. + +linux.easy.permutations: remove.install ${LINUX_EASY_PERMUTATIONS:%=_linux.%} + + +_linux.%: + @echo "" + @echo "" + @echo "========================================" + @echo "Permutation Build... $@" + @echo "========================================" + @echo "" + @echo "" + $(MAKE) PERMUTE_linux=$* BUILD_SUFFIX=linux.$* -f Makefile.openocd all + $(EXEC_PREFIX)/bin/openocd -v + +linux.ftd2xx_installed: + ${MAKE} -f Makefile.openocd _$@ + +linux.ft2232_libftdi: + ${MAKE} -f Makefile.openocd _$@ + +_complain_: + @echo "" + @echo "Please try one of these targets: bootstrap, clean, configure, build, install" + @echo " Or read the makefile and learn about the permutation test targets" + @echo "" + @exit 1 Property changes on: trunk/testing/build.tests/Makefile.openocd ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/local.uses =================================================================== --- trunk/testing/build.tests/local.uses 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/local.uses 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,39 @@ +# -*- mode: makefile -*- +HERE := $(shell pwd) + +# Solve problems on systems with DASH.. Grrr... +SHELL=/bin/bash +export SHELL + +VIRGINS=${HERE}/virgins + +# Determine the build platform. +BUILD_SYSNAME_Linux =linux +BUILD_SYSNAME_linux =linux +BUILD_SYSNAME_CYGWIN_NT =cygwin +BUILD_SYSNAME_MINGW32_NT =mingw32 +BUILD_SYSNAME_Darwin =darwin +BUILD_SYSNAME_darwin =darwin +BUILD_SYSNAME :=$(BUILD_SYSNAME_$(shell uname --sysname | cut -d'-' -f1)) + +# And machine (ie: i686, x86_64, or what) +BUILD_MACHINE :=$(BUILD_SYSNAME).$(shell uname -m) + + +INSTALL_DIR := $(HERE)/install +PREFIX := ${INSTALL_DIR} +EXEC_PREFIX := ${INSTALL_DIR}/${BUILD_MACHINE} + +LIBFTDI_VERSION=0.14 +LIBCONFUSE_VERSION=2.5 + +LIBUSB_VERSION_linux=0.1.12 + +LIBUSB_VERSION=${LIBUSB_VERSION_${BUILD_SYSNAME}} + +FTD2XX_WIN32_VERSION=2.04.14 +FTD2XX_WIN32_DIR = ${HERE}/ftd2xx.win32 + +FTD2XX_LINUX_VERSION=0.4.16 +FTD2XX_LINUX_DIR = ${HERE}/libftd2xx${FTD2XX_LINUX_VERSION} +FTD2XX_LINUX_64_DIR = ${HERE}/libftd2xx${FTD2XX_LINUX_VERSION}_x86_64 Property changes on: trunk/testing/build.tests/local.uses ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/mingw32_help/include/elf.h =================================================================== --- trunk/testing/build.tests/mingw32_help/include/elf.h 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/mingw32_help/include/elf.h 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,38 @@ +/* elf.h + + Copyright 2005 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifndef _ELF_H_ +#define _ELF_H_ + +#include <stdint.h> + +typedef signed char int8_t; +typedef unsigned char u_int8_t; +typedef short int16_t; +typedef unsigned short u_int16_t; +typedef int int32_t; +typedef unsigned int u_int32_t; +typedef long long int64_t; +typedef unsigned long long u_int64_t; +typedef int32_t register_t; + + +#ifdef __cplusplus +extern "C" { +#endif +#include <sys/types.h> +#include <sys/elf32.h> +#include <sys/elf64.h> +#include <sys/elf_generic.h> +#ifdef __cplusplus +} +#endif + +#endif /*_ELF_H_*/ Property changes on: trunk/testing/build.tests/mingw32_help/include/elf.h ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/mingw32_help/include/sys/cdefs.h =================================================================== --- trunk/testing/build.tests/mingw32_help/include/sys/cdefs.h 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/mingw32_help/include/sys/cdefs.h 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,23 @@ +/* sys/cdefs.h + + Copyright 1998, 2000, 2001 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifndef _SYS_CDEFS_H +#define _SYS_CDEFS_H +#ifdef __cplusplus +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif +#define __P(protos) protos /* full-blown ANSI C */ +#define __CONCAT(__x,__y) __x##__y +#endif + Property changes on: trunk/testing/build.tests/mingw32_help/include/sys/cdefs.h ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/mingw32_help/include/sys/elf32.h =================================================================== --- trunk/testing/build.tests/mingw32_help/include/sys/elf32.h 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/mingw32_help/include/sys/elf32.h 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,156 @@ +/*- + * Copyright (c) 1996-1998 John D. Polstra. + * 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 AUTHOR 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 AUTHOR 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. + * + * $FreeBSD: src/sys/sys/elf32.h,v 1.8 2002/05/30 08:32:18 dfr Exp $ + */ + +#ifndef _SYS_ELF32_H_ +#define _SYS_ELF32_H_ 1 + +#include <sys/elf_common.h> + +/* + * ELF definitions common to all 32-bit architectures. + */ + +typedef u_int32_t Elf32_Addr; +typedef u_int16_t Elf32_Half; +typedef u_int32_t Elf32_Off; +typedef int32_t Elf32_Sword; +typedef u_int32_t Elf32_Word; +typedef u_int32_t Elf32_Size; +typedef Elf32_Off Elf32_Hashelt; + +/* + * ELF header. + */ + +typedef struct { + unsigned char e_ident[EI_NIDENT]; /* File identification. */ + Elf32_Half e_type; /* File type. */ + Elf32_Half e_machine; /* Machine architecture. */ + Elf32_Word e_version; /* ELF format version. */ + Elf32_Addr e_entry; /* Entry point. */ + Elf32_Off e_phoff; /* Program header file offset. */ + Elf32_Off e_shoff; /* Section header file offset. */ + Elf32_Word e_flags; /* Architecture-specific flags. */ + Elf32_Half e_ehsize; /* Size of ELF header in bytes. */ + Elf32_Half e_phentsize; /* Size of program header entry. */ + Elf32_Half e_phnum; /* Number of program header entries. */ + Elf32_Half e_shentsize; /* Size of section header entry. */ + Elf32_Half e_shnum; /* Number of section header entries. */ + Elf32_Half e_shstrndx; /* Section name strings section. */ +} Elf32_Ehdr; + +/* + * Section header. + */ + +typedef struct { + Elf32_Word sh_name; /* Section name (index into the + section header string table). */ + Elf32_Word sh_type; /* Section type. */ + Elf32_Word sh_flags; /* Section flags. */ + Elf32_Addr sh_addr; /* Address in memory image. */ + Elf32_Off sh_offset; /* Offset in file. */ + Elf32_Size sh_size; /* Size in bytes. */ + Elf32_Word sh_link; /* Index of a related section. */ + Elf32_Word sh_info; /* Depends on section type. */ + Elf32_Size sh_addralign; /* Alignment in bytes. */ + Elf32_Size sh_entsize; /* Size of each entry in section. */ +} Elf32_Shdr; + +/* + * Program header. + */ + +typedef struct { + Elf32_Word p_type; /* Entry type. */ + Elf32_Off p_offset; /* File offset of contents. */ + Elf32_Addr p_vaddr; /* Virtual address in memory image. */ + Elf32_Addr p_paddr; /* Physical address (not used). */ + Elf32_Size p_filesz; /* Size of contents in file. */ + Elf32_Size p_memsz; /* Size of contents in memory. */ + Elf32_Word p_flags; /* Access permission flags. */ + Elf32_Size p_align; /* Alignment in memory and file. */ +} Elf32_Phdr; + +/* + * Dynamic structure. The ".dynamic" section contains an array of them. + */ + +typedef struct { + Elf32_Sword d_tag; /* Entry type. */ + union { + Elf32_Size d_val; /* Integer value. */ + Elf32_Addr d_ptr; /* Address value. */ + } d_un; +} Elf32_Dyn; + +/* + * Relocation entries. + */ + +/* Relocations that don't need an addend field. */ +typedef struct { + Elf32_Addr r_offset; /* Location to be relocated. */ + Elf32_Word r_info; /* Relocation type and symbol index. */ +} Elf32_Rel; + +/* Relocations that need an addend field. */ +typedef struct { + Elf32_Addr r_offset; /* Location to be relocated. */ + Elf32_Word r_info; /* Relocation type and symbol index. */ + Elf32_Sword r_addend; /* Addend. */ +} Elf32_Rela; + +/* Macros for accessing the fields of r_info. */ +#define ELF32_R_SYM(info) ((info) >> 8) +#define ELF32_R_TYPE(info) ((unsigned char)(info)) + +/* Macro for constructing r_info from field values. */ +#define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type)) + +/* + * Symbol table entries. + */ + +typedef struct { + Elf32_Word st_name; /* String table index of name. */ + Elf32_Addr st_value; /* Symbol value. */ + Elf32_Size st_size; /* Size of associated object. */ + unsigned char st_info; /* Type and binding information. */ + unsigned char st_other; /* Reserved (not used). */ + Elf32_Half st_shndx; /* Section index of symbol. */ +} Elf32_Sym; + +/* Macros for accessing the fields of st_info. */ +#define ELF32_ST_BIND(info) ((info) >> 4) +#define ELF32_ST_TYPE(info) ((info) & 0xf) + +/* Macro for constructing st_info from field values. */ +#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) + +#endif /* !_SYS_ELF32_H_ */ Property changes on: trunk/testing/build.tests/mingw32_help/include/sys/elf32.h ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/mingw32_help/include/sys/elf64.h =================================================================== --- trunk/testing/build.tests/mingw32_help/include/sys/elf64.h 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/mingw32_help/include/sys/elf64.h 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,172 @@ +/*- + * Copyright (c) 1996-1998 John D. Polstra. + * 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 AUTHOR 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 AUTHOR 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. + * + * $FreeBSD: src/sys/sys/elf64.h,v 1.10 2002/05/30 08:32:18 dfr Exp $ + */ + +#ifndef _SYS_ELF64_H_ +#define _SYS_ELF64_H_ 1 + +#include <sys/elf_common.h> + +/* + * ELF definitions common to all 64-bit architectures. + */ + +typedef uint64_t Elf64_Addr; +typedef uint16_t Elf64_Half; +typedef uint32_t Elf64_Word; +typedef int32_t Elf64_Sword; +typedef uint64_t Elf64_Xword; +typedef int64_t Elf64_Sxword; +typedef uint64_t Elf64_Off; +typedef uint16_t Elf64_Section; +typedef Elf64_Half Elf64_Versym; +typedef uint16_t Elf64_Quarter; + +/* + * Types of dynamic symbol hash table bucket and chain elements. + * + * This is inconsistent among 64 bit architectures, so a machine dependent + * typedef is required. + */ + +#ifdef __alpha__ +typedef Elf64_Off Elf64_Hashelt; +#else +typedef Elf64_Half Elf64_Hashelt; +#endif + +/* + * ELF header. + */ + +typedef struct { + unsigned char e_ident[EI_NIDENT]; /* File identification. */ + Elf64_Half e_type; /* File type. */ + Elf64_Half e_machine; /* Machine architecture. */ + Elf64_Word e_version; /* ELF format version. */ + Elf64_Addr e_entry; /* Entry point. */ + Elf64_Off e_phoff; /* Program header file offset. */ + Elf64_Off e_shoff; /* Section header file offset. */ + Elf64_Word e_flags; /* Architecture-specific flags. */ + Elf64_Half e_ehsize; /* Size of ELF header in bytes. */ + Elf64_Half e_phentsize; /* Size of program header entry. */ + Elf64_Half e_phnum; /* Number of program header entries. */ + Elf64_Half e_shentsize; /* Size of section header entry. */ + Elf64_Half e_shnum; /* Number of section header entries. */ + Elf64_Half e_shstrndx; /* Section name strings section. */ +} Elf64_Ehdr; + +/* + * Section header. + */ + +typedef struct { + Elf64_Word sh_name; /* Section name (index into the + section header string table). */ + Elf64_Word sh_type; /* Section type. */ + Elf64_Xword sh_flags; /* Section flags. */ + Elf64_Addr sh_addr; /* Address in memory image. */ + Elf64_Off sh_offset; /* Offset in file. */ + Elf64_Xword sh_size; /* Size in bytes. */ + Elf64_Word sh_link; /* Index of a related section. */ + Elf64_Word sh_info; /* Depends on section type. */ + Elf64_Xword sh_addralign; /* Alignment in bytes. */ + Elf64_Xword sh_entsize; /* Size of each entry in section. */ +} Elf64_Shdr; + +/* + * Program header. + */ + +typedef struct { + Elf64_Word p_type; /* Entry type. */ + Elf64_Word p_flags; /* Access permission flags. */ + Elf64_Off p_offset; /* File offset of contents. */ + Elf64_Addr p_vaddr; /* Virtual address in memory image. */ + Elf64_Addr p_paddr; /* Physical address (not used). */ + Elf64_Xword p_filesz; /* Size of contents in file. */ + Elf64_Xword p_memsz; /* Size of contents in memory. */ + Elf64_Xword p_align; /* Alignment in memory and file. */ +} Elf64_Phdr; + +/* + * Dynamic structure. The ".dynamic" section contains an array of them. + */ + +typedef struct { + Elf64_Sxword d_tag; /* Entry type. */ + union { + Elf64_Xword d_val; /* Integer value. */ + Elf64_Addr d_ptr; /* Address value. */ + } d_un; +} Elf64_Dyn; + +/* + * Relocation entries. + */ + +/* Relocations that don't need an addend field. */ +typedef struct { + Elf64_Addr r_offset; /* Location to be relocated. */ + Elf64_Xword r_info; /* Relocation type and symbol index. */ +} Elf64_Rel; + +/* Relocations that need an addend field. */ +typedef struct { + Elf64_Addr r_offset; /* Location to be relocated. */ + Elf64_Xword r_info; /* Relocation type and symbol index. */ + Elf64_Sxword r_addend; /* Addend. */ +} Elf64_Rela; + +/* Macros for accessing the fields of r_info. */ +#define ELF64_R_SYM(info) ((info) >> 32) +#define ELF64_R_TYPE(info) ((unsigned char)(info)) + +/* Macro for constructing r_info from field values. */ +#define ELF64_R_INFO(sym, type) (((sym) << 32) + (unsigned char)(type)) + +/* + * Symbol table entries. + */ + +typedef struct { + Elf64_Word st_name; /* String table index of name. */ + unsigned char st_info; /* Type and binding information. */ + unsigned char st_other; /* Reserved (not used). */ + Elf64_Section st_shndx; /* Section index of symbol. */ + Elf64_Addr st_value; /* Symbol value. */ + Elf64_Xword st_size; /* Size of associated object. */ +} Elf64_Sym; + +/* Macros for accessing the fields of st_info. */ +#define ELF64_ST_BIND(info) ((info) >> 4) +#define ELF64_ST_TYPE(info) ((info) & 0xf) + +/* Macro for constructing st_info from field values. */ +#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) + +#endif /* !_SYS_ELF64_H_ */ Property changes on: trunk/testing/build.tests/mingw32_help/include/sys/elf64.h ___________________________________________________________________ Name: svn:executable + * Added: trunk/testing/build.tests/mingw32_help/include/sys/elf_common.h =================================================================== --- trunk/testing/build.tests/mingw32_help/include/sys/elf_common.h 2008-12-24 23:22:22 UTC (rev 1274) +++ trunk/testing/build.tests/mingw32_help/include/sys/elf_common.h 2008-12-27 01:15:50 UTC (rev 1275) @@ -0,0 +1,299 @@ +/*- + * Copyright (c) 1998 John D. Polstra. + * 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 AUTHOR 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 AUTHOR 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. + * + * $FreeBSD: src/sys/sys/elf_common.h,v 1.15 2004/05/05 02:38:54 marcel Exp $ + */ + +#ifndef _SYS_ELF_COMMON_H_ +#define _SYS_ELF_COMMON_H_ 1 + +/* + * ELF definitions that are independent of architecture or word size. + */ + +/* + * Note header. The ".note" section contains an array of notes. Each + * begins with this header, aligned to a word boundary. Immediately + * following the note header is n_namesz bytes of name, padded to the + * next word boundary. Then comes n_descsz bytes of descriptor, again + * padded to a word boundary. The values of n_namesz and n_descsz do + * not include the padding. + */ + +typedef struct { + u_int32_t n_namesz; /* Length of name. */ + u_int32_t n_descsz; /* Length of descriptor. */ + u_int32_t n_type; /* Type of this note. */ +} Elf_Note; + +/* Indexes into the e_ident array. Keep synced with + http://www.sco.com/developer/gabi/ch4.eheader.html */ +#define EI_MAG0 0 /* Magic number, byte 0. */ +#define EI_MAG1 1 /* Magic number, byte 1. */ +#define EI_MAG2 2 /* Magic number, byte 2. */ +#define EI_MAG3 3 /* Magic number, byte 3. */ +#define EI_CLASS 4 /* Class of machine. */ +#define EI_DATA 5 /* Data format. */ +#define EI_VERSION 6 /* ELF format version. */ +#define EI_OSABI 7 /* Operating system / ABI identification */ +#define EI_ABIVERSION 8 /* ABI version */ +#define OLD_EI_BRAND 8 /* Start of architecture identification. */ +#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */ +#define EI_NIDENT 16 /* Size of e_ident array. */ + +/* Values for the magic number bytes. */ +#define ELFMAG0 0x7f +#define ELFMAG1 'E' +#define ELFMAG2 'L' +#define ELFMAG3 'F' +#define ELFMAG "\177ELF" /* magic string */ +#define SELFMAG 4 /* magic string size */ + +/* Values for e_ident[EI_VERSION] and e_version. */ +#define EV_NONE 0 +#define EV_CURRENT 1 + +/* Values for e_ident[EI_CLASS]. */ +#define ELFCLASSNONE 0 /* Unknown class. */ +#define ELFCLASS32 1 /* 32-bit architecture. */ +#define ELFCLASS64 2 /* 64-bit architecture. */ + +/* Values for e_ident[EI_DATA]. */ +#define ELFDATANONE 0 /* Unknown data format. */ +#define ELFDATA2LSB 1 /* 2's complement little-endian. */ +#define ELFDATA2MSB 2 /* 2's complement big-endian. */ + +/* Values for e_ident[EI_OSABI]. */ +#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ +#define ELFOSABI_NONE ELFOSABI_SYSV /* symbol used in old spec */ +#define ELFOSABI_HPUX 1 /* HP-UX operating system */ +#define ELFOSABI_NETBSD 2 /* NetBSD */ +#define ELFOSABI_LINUX 3 /* GNU/Linux */ +#define ELFOSABI_HURD 4 /* GNU/Hurd */ +#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ +#define ELFOSABI_SOLARIS 6 /* Solaris */ +#define ELFOSABI_MONTEREY 7 /* Monterey */ +#define ELFOSABI_IRIX 8 /* IRIX */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD */ +#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD */ +#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ + +/* e_ident */ +#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ + (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ + (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ + (ehdr).e_ident[EI_MAG3] == ELFMAG3) + +/* Values for e_type. */ +#define ET_NONE 0 /* Unknown type. */ +#define ET_REL 1 /* Relocatable. */ +#define ET_EXEC 2 /* Executable. */ +#define ET_DYN 3 /* Shared object. */ +#define ET_CORE 4 /* Core file. */ + +/* Values for e_machine. */ +#define EM_NONE 0 /* Unknown machine. */ +#define EM_M32 1 /* AT&T WE32100. */ +#define EM_SPARC 2 /* Sun SPARC. */ +#define EM_386 3 /* Intel i386. */ +#define EM_68K 4 /* Motorola 68000. */ +#define EM_88K 5 /* Motorola 88000. */ +#define EM_486 6 /* Intel i486. */ +#define EM_860 7 /* Intel i860. */ +#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */ + +/* Extensions. This list is not complete. */ +#define EM_S370 9 /* IBM System/370 */ +#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ /* Depreciated */ +#define EM_PARISC 15 /* HPPA */ +#define EM_SPARC32PLUS 18 /* SPARC v8plus */ +#define EM_PPC 20 /* PowerPC 32-bit */ +#define EM_PPC64 21 /* PowerPC 64-bit */ +#define EM_ARM 40 /* ARM */ +#define EM_SPARCV9 43 /* SPARC v9 64-bit */ +#define EM_IA_64 50 /* Intel IA-64 Processor */ +#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ +#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI */ + +/* Special section indexes. */ +#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ +#define SHN_LORESERVE 0xff00 /* First of reserved range. */ +#define SHN_LOPROC 0xff00 /* First processor-specific. */ +#define SHN_HIPROC 0xff1f /* Last processor-specific. */ +#define SHN_ABS 0xfff1 /* Absolute values. */ +#define SHN_COMMON 0xfff2 /* Common data. */ +#define SHN_HIRESERVE 0xffff /* Last of reserved range. */ + +/* sh_type */ +#define SHT_NULL 0 /* inactive */ +#define SHT_PROGBITS 1 /* program defined information */ +#define SHT_SYMTAB 2 /* symbol table section */ +#define SHT_STRTAB 3 /* string table section */ +#define SHT_RELA 4 /* relocation section with addends */ +#define SHT_H... [truncated message content] |
|
From: <du...@ma...> - 2008-12-25 00:22:25
|
Author: duane Date: 2008-12-25 00:22:22 +0100 (Thu, 25 Dec 2008) New Revision: 1274 Modified: trunk/src/target/target/str710.cfg trunk/src/target/target/str730.cfg trunk/src/target/target/str750.cfg Log: Typos found by miceal catudal Modified: trunk/src/target/target/str710.cfg =================================================================== --- trunk/src/target/target/str710.cfg 2008-12-23 12:52:14 UTC (rev 1273) +++ trunk/src/target/target/str710.cfg 2008-12-24 23:22:22 UTC (rev 1274) @@ -24,7 +24,7 @@ #jtag scan chain -tag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID set _TARGETNAME [format "%s.cpu" $_CHIPNAME] target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi Modified: trunk/src/target/target/str730.cfg =================================================================== --- trunk/src/target/target/str730.cfg 2008-12-23 12:52:14 UTC (rev 1273) +++ trunk/src/target/target/str730.cfg 2008-12-24 23:22:22 UTC (rev 1274) @@ -25,7 +25,7 @@ reset_config trst_and_srst srst_pulls_trst #jtag scan chain -tag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID #jtag nTRST and nSRST delay jtag_nsrst_delay 500 Modified: trunk/src/target/target/str750.cfg =================================================================== --- trunk/src/target/target/str750.cfg 2008-12-23 12:52:14 UTC (rev 1273) +++ trunk/src/target/target/str750.cfg 2008-12-24 23:22:22 UTC (rev 1274) @@ -27,7 +27,7 @@ #jtag scan chain -tag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID #jtag nTRST and nSRST delay jtag_nsrst_delay 500 |
|
From: ntfreak at B. <nt...@ma...> - 2008-12-23 13:52:22
|
Author: ntfreak
Date: 2008-12-23 13:52:14 +0100 (Tue, 23 Dec 2008)
New Revision: 1273
Modified:
trunk/src/server/httpd/Stylizer.class
trunk/src/server/httpd/Stylizer.java
trunk/src/server/httpd/browsemem.tcl
trunk/src/server/httpd/build.sh
trunk/src/server/httpd/downloadmem.tcl
trunk/src/server/httpd/editconfigs.tcl
trunk/src/server/httpd/editfile.tcl
trunk/src/server/httpd/erase.tcl
trunk/src/server/httpd/flash.tcl
trunk/src/server/httpd/flashinfo.tcl
trunk/src/server/httpd/guiupload.tcl
trunk/src/server/httpd/html2tcl.sh
trunk/src/server/httpd/httpd.tcl
trunk/src/server/httpd/index.tcl
trunk/src/server/httpd/log.tcl
trunk/src/server/httpd/menu.xml
trunk/src/server/httpd/menu.xsl
trunk/src/server/httpd/menu_cuts/center_bottom.png
trunk/src/server/httpd/menu_cuts/center_top.png
trunk/src/server/httpd/menu_cuts/h_tab1.png
trunk/src/server/httpd/menu_cuts/h_tab1_selected.png
trunk/src/server/httpd/menu_cuts/h_tab2.png
trunk/src/server/httpd/menu_cuts/h_tab2_selected.png
trunk/src/server/httpd/menu_cuts/h_tab_free.png
trunk/src/server/httpd/menu_cuts/logo_bottom.png
trunk/src/server/httpd/menu_cuts/logo_top.png
trunk/src/server/httpd/menu_cuts/right_bottom.png
trunk/src/server/httpd/menu_cuts/right_top.png
trunk/src/server/httpd/menu_cuts/right_top_small.png
trunk/src/server/httpd/menu_cuts/top_right.png
trunk/src/server/httpd/menu_cuts/v_1.png
trunk/src/server/httpd/menu_cuts/v_2_tile.png
trunk/src/server/httpd/menu_cuts/v_3.png
trunk/src/server/httpd/menu_cuts/v_tab.png
trunk/src/server/httpd/menu_cuts/v_tab_selected.png
trunk/src/server/httpd/menuweb.css
trunk/src/server/httpd/openocd.tcl
trunk/src/server/httpd/preconfig.tcl
trunk/src/server/httpd/production.tcl
trunk/src/server/httpd/readme.txt
trunk/src/server/httpd/reload.tcl
trunk/src/server/httpd/run.tcl
trunk/src/server/httpd/support.tcl
trunk/src/server/httpd/targets.tcl
trunk/src/server/httpd/terminal.tcl
trunk/src/server/httpd/upgrade.tcl
Log:
- add missing svn props from r1270 commit
- change mime-type for png files to image/png
Property changes on: trunk/src/server/httpd/Stylizer.class
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: trunk/src/server/httpd/Stylizer.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/src/server/httpd/browsemem.tcl
===================================================================
--- trunk/src/server/httpd/browsemem.tcl 2008-12-23 08:52:02 UTC (rev 1272)
+++ trunk/src/server/httpd/browsemem.tcl 2008-12-23 12:52:14 UTC (rev 1273)
@@ -1,454 +1,454 @@
-# converted to .tcl by html2tcl.tcl
-set buffer ""
-append buffer {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <html xmlns="http://www.w3.org/TR/REC-html40">
-<head>
-<title>OpenOCD debugger</title>
-<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
-<link type="text/css" rel="stylesheet" href="menuweb.css"/>
-</head>
-}
-
- set console ""
- set upload_filename /ram/upload
-
-append buffer {
-<body style="margin:0px;">
-<div style="width:974px;height:85px;">
-<div style="float:left;position:relative;left:32px;width:478px;">
-<a href="/">
- OpenOCD
- </a>
-</div>
-<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
-<div style="position:relative;left:15px;top:4px;" class="textlight">
-}
-append buffer [capture version]
-append buffer {
-</div>
-</div>
-</div>
-<table style="padding:0px;border-collapse:collapse;">
-<tr>
-<td style="width:33px;">
-<div style="width:20px;height:510px;">
-
- </div>
-</td>
-<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
-<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
-<tr style="height:59px;">
-<td/>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="browsemem.tcl" style="font-weight: bold;">Browse / Edit</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="downloadmem.tcl" style="">Download</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
-</tr>
-<tr>
-<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
-</tr>
-<tr>
-<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
-</tr>
-</table>
-</td>
-<td style="vertical-align:top;padding:0px;height:100%">
-<table style="padding:0px;border-collapse:collapse;height:100%;">
-<tr>
-<td>
-<table style="padding:0px;border-collapse:collapse;">
-<tr>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="index.tcl">Config Target</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="flashinfo.tcl">Flash</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="openocd.tcl">OpenOCD</a>
-</div>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-<tr>
-<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
-<div style="width:500px;background-color:#ffffff;height:100%;">
-
- </div>
-</td>
-</tr>
-<tr>
-<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
-<H1>Browse / Edit Memory</H1>
-</td>
-</tr>
-<tr style="height:100%;">
-<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
-
-
-
- }
-
-
- set form_address [formfetch form_address]
- set form_length [formfetch form_length]
- set form_type [formfetch form_type]
- set form_action [formfetch form_action]
- set form_value [formfetch form_value]
-
- if {[string compare $form_length ""]==0} {
- set form_length 0
- }
- if {$form_length<=0} {
- set form_length 0x80
- }
- if {$form_length>0x1000} {
- set form_length 0x1000
- }
-
- if {[string compare $form_type ""]==0} {
- set form_type mdw
- }
-
- if {[string compare $form_type "mdw"]==0} {
- set wordsize 4
- set modify_cmd mww
- }
- if {[string compare $form_type "mdh"]==0} {
- set wordsize 2
- set modify_cmd mwh
- }
- if {[string compare $form_type "mdb"]==0} {
- set wordsize 1
- set modify_cmd mwb
- }
-
-
-
-
- if {[string compare $form_address ""]!=0} {
- if {[string compare $form_action "Previous"]==0} {
- # Kludge! Work around problems parsing hex in Jim Tcl expressions
- incr form_address ; set form_address [expr $form_address-1]
- if {$form_address-$form_length>0} {
- set form_address "0x[tohex [expr $form_address-$form_length]]"
- } else {
- set form_address "0x0"
- }
- }
- if {[string compare $form_action "Next"]==0} {
- # Kludge! Work around problems parsing hex in Jim Tcl expressions
- incr form_address ; set form_address [expr $form_address-1]
- set form_address "0x[tohex [expr $form_address+$form_length]]"
- }
- if {[string compare $form_action "Modify"]==0} {
- append console [capture_catch "$modify_cmd $form_address $form_value"]
- }
- if {[string compare $form_action "Fill"]==0} {
- append console [capture_catch "$modify_cmd $form_address $form_value $form_length"]
- }
- }
-
-
-
-append buffer {
-
- <form action="browsemem.tcl" method="post">
- <table>
- <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
-append buffer $form_address
-append buffer {"></td></tr>
- <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
-append buffer "0x[tohex $form_length]"
-append buffer {"></td></tr>
- <tr><td class="formtext">Value</td><td><input type="text" name="form_value" value="}
-append buffer $form_value
-append buffer {"></td>
- <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Modify"></td>
- <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Fill"></td></tr>
- <tr><td class="formtext">Type</td><td style="padding-top:1px;">
- <select name="form_type">
- <option
- }
-if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} }
-append buffer { value ="mdb">8 bit
- </option>
- <option
- }
-if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} }
-append buffer { value ="mdh">16 bit
- </option>
- <option
- }
-if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} }
-append buffer {value ="mdw">32 bit
- </option>
- </select>
-
- </td></tr>
- </table>
- <table>
- <tr><td style="height:15px;width:535px;"> </td></tr>
- <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
- <tr><td style="height:15px;width:535px;"> </td></tr>
- </table>
-
- <table><tr>
- <td><input type="submit" name="form_action" value="Refresh"></td>
- <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Previous" ></td>
- <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Next" ></td>
- </tr></table>
- <br>
-
- </form>
- <p>
- <div class="fontbigger">Memory:</div><p>
- <code style="white-space: nowrap; font-size:11px;font:courier new;">
- }
-
- if {[string compare $form_address ""]!=0} {
- append console [encode [capture_catch halt]]
- append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]]
- }
-
-append buffer {
- </code>
-
-
-
-
-
- </td>
-</tr>
-}
-
-
- set toggle_details [formfetch toggle_details]
- if {[string length $toggle_details]==0} {
- set toggle_details 0
- }
- set show_details [load_var show_details]
- if {[string length $show_details]==0} {
- set show_details 0
- }
- if {$toggle_details==1} {
- set show_details [expr 1-$show_details]
- save_var show_details $show_details
- }
-
- if {[string length $console]!=0} {
-
-append buffer {
-<tr style="height:100%;">
-<td style="height:100%;background-color:red;" colspan="6">
-<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
-<td style="width:25px;"> </td>
-}
-
- if {$show_details==1} {
- append buffer <
- append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
- append buffer >
- } else {
- append buffer <
- append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"}
- append buffer >
- }
-
-append buffer {
-<a class="openocd" href="browsemem.tcl?toggle_details=1">
-}
-
- if {$show_details==1} {
- append buffer "Hide details"
- append buffer <br/>
- } else {
- append buffer {<div style="position:relative;top:7px;text-align:center;">}
- append buffer "Show details"
- append buffer {</div>}
- }
-
-append buffer {
-</a>
-}
-
- if {$show_details==1} {
- append buffer $console
- }
-
-append buffer {</td>}
-
- if {$show_details!=1} {
- append buffer {<td> </td>}
- }
-
-append buffer {
-<td style="width:25px;"> </td>
-</table>
-</td>
-</tr>
-}
-
- }
-
-append buffer {
-<tr>
-<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
-<div style="width:500px;background-color:#ffffff;height:100%;">
-
- </div>
-</td>
-</tr>
-</table>
-</td>
-<td style="width:6px;"/>
-<td style="width:245px;height:100%">
-<table style="padding:0px;border-collapse:collapse;height:100%;">
-<tr>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
- Documentation
- </div>
-</td>
-<td width="40px">
-
- </td>
-<td/>
-</tr>
-<tr>
-<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
-<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
-<br/>
-</td>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
-</tr>
-<tr>
-<td colspan="3">
-<table style="padding:0px;border-collapse:collapse;">
-<td style="background-color:#d8d7d7;width:10px;height:1px"/>
-<td style="background-color:#999999;width:225px; height:1px;"/>
-<td style="background-color:#d8d7d7;width:10px;height:1px"/>
-</table>
-</td>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
-</tr>
-<tr style="height:100%;">
-<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
-
- <p>Browse and edit target memory.<br>
- Length is in bytes, maximum 4096 bytes.</p>
- <p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
- <p>CPU will be halted if required.</p>
- <p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
- <p><b>Fill</b> - Will fill the specified region with the specified value.</p>
- <p><b>Refresh</b> - Display the content of the specified memory area.</p>
-
- </td>
-</tr>
-<tr>
-<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
-
- </td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</body>
-</html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-start_chunked "html"
-write_chunked $buffer
-end_chunked
-
+# converted to .tcl by html2tcl.tcl
+set buffer ""
+append buffer {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <html xmlns="http://www.w3.org/TR/REC-html40">
+<head>
+<title>OpenOCD debugger</title>
+<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
+<link type="text/css" rel="stylesheet" href="menuweb.css"/>
+</head>
+}
+
+ set console ""
+ set upload_filename /ram/upload
+
+append buffer {
+<body style="margin:0px;">
+<div style="width:974px;height:85px;">
+<div style="float:left;position:relative;left:32px;width:478px;">
+<a href="/">
+ OpenOCD
+ </a>
+</div>
+<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
+<div style="position:relative;left:15px;top:4px;" class="textlight">
+}
+append buffer [capture version]
+append buffer {
+</div>
+</div>
+</div>
+<table style="padding:0px;border-collapse:collapse;">
+<tr>
+<td style="width:33px;">
+<div style="width:20px;height:510px;">
+
+ </div>
+</td>
+<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
+<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
+<tr style="height:59px;">
+<td/>
+</tr>
+<tr>
+<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
+<div style="position:relative;left:10px;top:10px;font-weight:bold;">
+<a href="browsemem.tcl" style="font-weight: bold;">Browse / Edit</a>
+</div>
+</td>
+</tr>
+<tr>
+<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
+<div style="position:relative;left:10px;top:10px;font-weight:bold;">
+<a href="downloadmem.tcl" style="">Download</a>
+</div>
+</td>
+</tr>
+<tr>
+<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
+</tr>
+<tr>
+<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
+</tr>
+<tr>
+<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
+</tr>
+</table>
+</td>
+<td style="vertical-align:top;padding:0px;height:100%">
+<table style="padding:0px;border-collapse:collapse;height:100%;">
+<tr>
+<td>
+<table style="padding:0px;border-collapse:collapse;">
+<tr>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="index.tcl">Config Target</a>
+</div>
+</td>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="flashinfo.tcl">Flash</a>
+</div>
+</td>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
+</div>
+</td>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="openocd.tcl">OpenOCD</a>
+</div>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+<tr>
+<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
+<div style="width:500px;background-color:#ffffff;height:100%;">
+
+ </div>
+</td>
+</tr>
+<tr>
+<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
+<H1>Browse / Edit Memory</H1>
+</td>
+</tr>
+<tr style="height:100%;">
+<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
+
+
+
+ }
+
+
+ set form_address [formfetch form_address]
+ set form_length [formfetch form_length]
+ set form_type [formfetch form_type]
+ set form_action [formfetch form_action]
+ set form_value [formfetch form_value]
+
+ if {[string compare $form_length ""]==0} {
+ set form_length 0
+ }
+ if {$form_length<=0} {
+ set form_length 0x80
+ }
+ if {$form_length>0x1000} {
+ set form_length 0x1000
+ }
+
+ if {[string compare $form_type ""]==0} {
+ set form_type mdw
+ }
+
+ if {[string compare $form_type "mdw"]==0} {
+ set wordsize 4
+ set modify_cmd mww
+ }
+ if {[string compare $form_type "mdh"]==0} {
+ set wordsize 2
+ set modify_cmd mwh
+ }
+ if {[string compare $form_type "mdb"]==0} {
+ set wordsize 1
+ set modify_cmd mwb
+ }
+
+
+
+
+ if {[string compare $form_address ""]!=0} {
+ if {[string compare $form_action "Previous"]==0} {
+ # Kludge! Work around problems parsing hex in Jim Tcl expressions
+ incr form_address ; set form_address [expr $form_address-1]
+ if {$form_address-$form_length>0} {
+ set form_address "0x[tohex [expr $form_address-$form_length]]"
+ } else {
+ set form_address "0x0"
+ }
+ }
+ if {[string compare $form_action "Next"]==0} {
+ # Kludge! Work around problems parsing hex in Jim Tcl expressions
+ incr form_address ; set form_address [expr $form_address-1]
+ set form_address "0x[tohex [expr $form_address+$form_length]]"
+ }
+ if {[string compare $form_action "Modify"]==0} {
+ append console [capture_catch "$modify_cmd $form_address $form_value"]
+ }
+ if {[string compare $form_action "Fill"]==0} {
+ append console [capture_catch "$modify_cmd $form_address $form_value $form_length"]
+ }
+ }
+
+
+
+append buffer {
+
+ <form action="browsemem.tcl" method="post">
+ <table>
+ <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
+append buffer $form_address
+append buffer {"></td></tr>
+ <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
+append buffer "0x[tohex $form_length]"
+append buffer {"></td></tr>
+ <tr><td class="formtext">Value</td><td><input type="text" name="form_value" value="}
+append buffer $form_value
+append buffer {"></td>
+ <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Modify"></td>
+ <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Fill"></td></tr>
+ <tr><td class="formtext">Type</td><td style="padding-top:1px;">
+ <select name="form_type">
+ <option
+ }
+if {[string compare $form_type "mdb"]==0} { append buffer {selected="selected"} }
+append buffer { value ="mdb">8 bit
+ </option>
+ <option
+ }
+if {[string compare $form_type "mdh"]==0} { append buffer {selected="selected"} }
+append buffer { value ="mdh">16 bit
+ </option>
+ <option
+ }
+if {[string compare $form_type "mdw"]==0} { append buffer {selected="selected"} }
+append buffer {value ="mdw">32 bit
+ </option>
+ </select>
+
+ </td></tr>
+ </table>
+ <table>
+ <tr><td style="height:15px;width:535px;"> </td></tr>
+ <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
+ <tr><td style="height:15px;width:535px;"> </td></tr>
+ </table>
+
+ <table><tr>
+ <td><input type="submit" name="form_action" value="Refresh"></td>
+ <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Previous" ></td>
+ <td class="buttonspacesmall"> </td><td><input type="submit" name="form_action" value="Next" ></td>
+ </tr></table>
+ <br>
+
+ </form>
+ <p>
+ <div class="fontbigger">Memory:</div><p>
+ <code style="white-space: nowrap; font-size:11px;font:courier new;">
+ }
+
+ if {[string compare $form_address ""]!=0} {
+ append console [encode [capture_catch halt]]
+ append buffer [encode [capture_catch "$form_type $form_address [expr $form_length]"]]
+ }
+
+append buffer {
+ </code>
+
+
+
+
+
+ </td>
+</tr>
+}
+
+
+ set toggle_details [formfetch toggle_details]
+ if {[string length $toggle_details]==0} {
+ set toggle_details 0
+ }
+ set show_details [load_var show_details]
+ if {[string length $show_details]==0} {
+ set show_details 0
+ }
+ if {$toggle_details==1} {
+ set show_details [expr 1-$show_details]
+ save_var show_details $show_details
+ }
+
+ if {[string length $console]!=0} {
+
+append buffer {
+<tr style="height:100%;">
+<td style="height:100%;background-color:red;" colspan="6">
+<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
+<td style="width:25px;"> </td>
+}
+
+ if {$show_details==1} {
+ append buffer <
+ append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
+ append buffer >
+ } else {
+ append buffer <
+ append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"}
+ append buffer >
+ }
+
+append buffer {
+<a class="openocd" href="browsemem.tcl?toggle_details=1">
+}
+
+ if {$show_details==1} {
+ append buffer "Hide details"
+ append buffer <br/>
+ } else {
+ append buffer {<div style="position:relative;top:7px;text-align:center;">}
+ append buffer "Show details"
+ append buffer {</div>}
+ }
+
+append buffer {
+</a>
+}
+
+ if {$show_details==1} {
+ append buffer $console
+ }
+
+append buffer {</td>}
+
+ if {$show_details!=1} {
+ append buffer {<td> </td>}
+ }
+
+append buffer {
+<td style="width:25px;"> </td>
+</table>
+</td>
+</tr>
+}
+
+ }
+
+append buffer {
+<tr>
+<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
+<div style="width:500px;background-color:#ffffff;height:100%;">
+
+ </div>
+</td>
+</tr>
+</table>
+</td>
+<td style="width:6px;"/>
+<td style="width:245px;height:100%">
+<table style="padding:0px;border-collapse:collapse;height:100%;">
+<tr>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
+ Documentation
+ </div>
+</td>
+<td width="40px">
+
+ </td>
+<td/>
+</tr>
+<tr>
+<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
+</tr>
+<tr>
+<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
+<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
+<br/>
+</td>
+</tr>
+<tr>
+<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
+</tr>
+<tr>
+<td colspan="3">
+<table style="padding:0px;border-collapse:collapse;">
+<td style="background-color:#d8d7d7;width:10px;height:1px"/>
+<td style="background-color:#999999;width:225px; height:1px;"/>
+<td style="background-color:#d8d7d7;width:10px;height:1px"/>
+</table>
+</td>
+</tr>
+<tr>
+<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
+</tr>
+<tr style="height:100%;">
+<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
+
+ <p>Browse and edit target memory.<br>
+ Length is in bytes, maximum 4096 bytes.</p>
+ <p>An error message is shown when trying to browse or edit memory which cases a CPU fault.</p>
+ <p>CPU will be halted if required.</p>
+ <p><b>Modify</b> - Will modify only one byte, half-word or word starting at Address.</p>
+ <p><b>Fill</b> - Will fill the specified region with the specified value.</p>
+ <p><b>Refresh</b> - Display the content of the specified memory area.</p>
+
+ </td>
+</tr>
+<tr>
+<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
+
+ </td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</body>
+</html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+start_chunked "html"
+write_chunked $buffer
+end_chunked
+
Property changes on: trunk/src/server/httpd/browsemem.tcl
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/src/server/httpd/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ LF
Modified: trunk/src/server/httpd/downloadmem.tcl
===================================================================
--- trunk/src/server/httpd/downloadmem.tcl 2008-12-23 08:52:02 UTC (rev 1272)
+++ trunk/src/server/httpd/downloadmem.tcl 2008-12-23 12:52:14 UTC (rev 1273)
@@ -1,366 +1,366 @@
-# converted to .tcl by html2tcl.tcl
-set buffer ""
-append buffer {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <html xmlns="http://www.w3.org/TR/REC-html40">
-<head>
-<title>OpenOCD debugger</title>
-<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
-<link type="text/css" rel="stylesheet" href="menuweb.css"/>
-</head>
-}
-
- set console ""
- set upload_filename /ram/upload
-
-append buffer {
-<body style="margin:0px;">
-<div style="width:974px;height:85px;">
-<div style="float:left;position:relative;left:32px;width:478px;">
-<a href="/">
- OpenOCD
- </a>
-</div>
-<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
-<div style="position:relative;left:15px;top:4px;" class="textlight">
-}
-append buffer [capture version]
-append buffer {
-</div>
-</div>
-</div>
-<table style="padding:0px;border-collapse:collapse;">
-<tr>
-<td style="width:33px;">
-<div style="width:20px;height:510px;">
-
- </div>
-</td>
-<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
-<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
-<tr style="height:59px;">
-<td/>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="browsemem.tcl" style="">Browse / Edit</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="downloadmem.tcl" style="font-weight: bold;">Download</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
-</tr>
-<tr>
-<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
-</tr>
-<tr>
-<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
-</tr>
-</table>
-</td>
-<td style="vertical-align:top;padding:0px;height:100%">
-<table style="padding:0px;border-collapse:collapse;height:100%;">
-<tr>
-<td>
-<table style="padding:0px;border-collapse:collapse;">
-<tr>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="index.tcl">Config Target</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="flashinfo.tcl">Flash</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="openocd.tcl">OpenOCD</a>
-</div>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-<tr>
-<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
-<div style="width:500px;background-color:#ffffff;height:100%;">
-
- </div>
-</td>
-</tr>
-<tr>
-<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
-<H1>Download Memory Range</H1>
-</td>
-</tr>
-<tr style="height:100%;">
-<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
- }
-
- set form_address [formfetch form_address]
- set form_length [formfetch form_length]
- set form_action [formfetch form_action]
-
-append buffer {
- <form action="downloadmem.tcl" method="post">
- <table>
- <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
-append buffer $form_address
-append buffer {"></td></tr>
- <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
-append buffer $form_length
-append buffer {"></td></tr>
- </td></tr>
- </table>
-
- <table>
- <tr><td style="height:15px;width:535px;"> </td></tr>
- <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
- <tr><td style="height:15px;width:535px;"> </td></tr>
- </table>
-
- <input type="submit" value="Download" name="form_action">
-
-
- </form>
- }
-
- if {[string compare $form_action "Download"]==0} {
- append console [encode [capture_catch "reset init"]]
- append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]]
-
-append buffer {
- <form action="../dump.bin" target="_blank">
- <input type="submit" name="form_action" value="Save downloaded memory">
- </form>
- }
-
- }
-
-
-append buffer {
-
-
-
- </td>
-</tr>
-}
-
-
- set toggle_details [formfetch toggle_details]
- if {[string length $toggle_details]==0} {
- set toggle_details 0
- }
- set show_details [load_var show_details]
- if {[string length $show_details]==0} {
- set show_details 0
- }
- if {$toggle_details==1} {
- set show_details [expr 1-$show_details]
- save_var show_details $show_details
- }
-
- if {[string length $console]!=0} {
-
-append buffer {
-<tr style="height:100%;">
-<td style="height:100%;background-color:red;" colspan="6">
-<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
-<td style="width:25px;"> </td>
-}
-
- if {$show_details==1} {
- append buffer <
- append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
- append buffer >
- } else {
- append buffer <
- append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"}
- append buffer >
- }
-
-append buffer {
-<a class="openocd" href="downloadmem.tcl?toggle_details=1">
-}
-
- if {$show_details==1} {
- append buffer "Hide details"
- append buffer <br/>
- } else {
- append buffer {<div style="position:relative;top:7px;text-align:center;">}
- append buffer "Show details"
- append buffer {</div>}
- }
-
-append buffer {
-</a>
-}
-
- if {$show_details==1} {
- append buffer $console
- }
-
-append buffer {</td>}
-
- if {$show_details!=1} {
- append buffer {<td> </td>}
- }
-
-append buffer {
-<td style="width:25px;"> </td>
-</table>
-</td>
-</tr>
-}
-
- }
-
-append buffer {
-<tr>
-<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
-<div style="width:500px;background-color:#ffffff;height:100%;">
-
- </div>
-</td>
-</tr>
-</table>
-</td>
-<td style="width:6px;"/>
-<td style="width:245px;height:100%">
-<table style="padding:0px;border-collapse:collapse;height:100%;">
-<tr>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
- Documentation
- </div>
-</td>
-<td width="40px">
-
- </td>
-<td/>
-</tr>
-<tr>
-<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
-<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
-<br/>
-</td>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
-</tr>
-<tr>
-<td colspan="3">
-<table style="padding:0px;border-collapse:collapse;">
-<td style="background-color:#d8d7d7;width:10px;height:1px"/>
-<td style="background-color:#999999;width:225px; height:1px;"/>
-<td style="background-color:#d8d7d7;width:10px;height:1px"/>
-</table>
-</td>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
-</tr>
-<tr style="height:100%;">
-<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
-
- Download memory from target. <br>
- <b>Note</b> that download memory can take
- a long time(potentially minutes for megabytes at low JTAG clk speeds).
- <p/>
- Once the memory is downloaded a link is available on the page to download
- the file to your PC.
-
- </td>
-</tr>
-<tr>
-<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
-
- </td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</body>
-</html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-start_chunked "html"
-write_chunked $buffer
-end_chunked
-
+# converted to .tcl by html2tcl.tcl
+set buffer ""
+append buffer {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <html xmlns="http://www.w3.org/TR/REC-html40">
+<head>
+<title>OpenOCD debugger</title>
+<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
+<link type="text/css" rel="stylesheet" href="menuweb.css"/>
+</head>
+}
+
+ set console ""
+ set upload_filename /ram/upload
+
+append buffer {
+<body style="margin:0px;">
+<div style="width:974px;height:85px;">
+<div style="float:left;position:relative;left:32px;width:478px;">
+<a href="/">
+ OpenOCD
+ </a>
+</div>
+<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
+<div style="position:relative;left:15px;top:4px;" class="textlight">
+}
+append buffer [capture version]
+append buffer {
+</div>
+</div>
+</div>
+<table style="padding:0px;border-collapse:collapse;">
+<tr>
+<td style="width:33px;">
+<div style="width:20px;height:510px;">
+
+ </div>
+</td>
+<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
+<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
+<tr style="height:59px;">
+<td/>
+</tr>
+<tr>
+<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
+<div style="position:relative;left:10px;top:10px;font-weight:bold;">
+<a href="browsemem.tcl" style="">Browse / Edit</a>
+</div>
+</td>
+</tr>
+<tr>
+<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
+<div style="position:relative;left:10px;top:10px;font-weight:bold;">
+<a href="downloadmem.tcl" style="font-weight: bold;">Download</a>
+</div>
+</td>
+</tr>
+<tr>
+<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
+</tr>
+<tr>
+<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
+</tr>
+<tr>
+<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
+</tr>
+</table>
+</td>
+<td style="vertical-align:top;padding:0px;height:100%">
+<table style="padding:0px;border-collapse:collapse;height:100%;">
+<tr>
+<td>
+<table style="padding:0px;border-collapse:collapse;">
+<tr>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="index.tcl">Config Target</a>
+</div>
+</td>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="flashinfo.tcl">Flash</a>
+</div>
+</td>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="browsemem.tcl" style="font-weight: bold;">Memory</a>
+</div>
+</td>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
+<a href="openocd.tcl">OpenOCD</a>
+</div>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+<tr>
+<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
+<div style="width:500px;background-color:#ffffff;height:100%;">
+
+ </div>
+</td>
+</tr>
+<tr>
+<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
+<H1>Download Memory Range</H1>
+</td>
+</tr>
+<tr style="height:100%;">
+<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
+ }
+
+ set form_address [formfetch form_address]
+ set form_length [formfetch form_length]
+ set form_action [formfetch form_action]
+
+append buffer {
+ <form action="downloadmem.tcl" method="post">
+ <table>
+ <tr><td class="formtext">Address</td><td><input type="text" name="form_address" value="}
+append buffer $form_address
+append buffer {"></td></tr>
+ <tr><td class="formtext">Length</td><td><input type="text" name="form_length" value="}
+append buffer $form_length
+append buffer {"></td></tr>
+ </td></tr>
+ </table>
+
+ <table>
+ <tr><td style="height:15px;width:535px;"> </td></tr>
+ <tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr>
+ <tr><td style="height:15px;width:535px;"> </td></tr>
+ </table>
+
+ <input type="submit" value="Download" name="form_action">
+
+
+ </form>
+ }
+
+ if {[string compare $form_action "Download"]==0} {
+ append console [encode [capture_catch "reset init"]]
+ append console [encode [capture_catch "dump_image /tmp/dump.bin $form_address $form_length"]]
+
+append buffer {
+ <form action="../dump.bin" target="_blank">
+ <input type="submit" name="form_action" value="Save downloaded memory">
+ </form>
+ }
+
+ }
+
+
+append buffer {
+
+
+
+ </td>
+</tr>
+}
+
+
+ set toggle_details [formfetch toggle_details]
+ if {[string length $toggle_details]==0} {
+ set toggle_details 0
+ }
+ set show_details [load_var show_details]
+ if {[string length $show_details]==0} {
+ set show_details 0
+ }
+ if {$toggle_details==1} {
+ set show_details [expr 1-$show_details]
+ save_var show_details $show_details
+ }
+
+ if {[string length $console]!=0} {
+
+append buffer {
+<tr style="height:100%;">
+<td style="height:100%;background-color:red;" colspan="6">
+<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
+<td style="width:25px;"> </td>
+}
+
+ if {$show_details==1} {
+ append buffer <
+ append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
+ append buffer >
+ } else {
+ append buffer <
+ append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"}
+ append buffer >
+ }
+
+append buffer {
+<a class="openocd" href="downloadmem.tcl?toggle_details=1">
+}
+
+ if {$show_details==1} {
+ append buffer "Hide details"
+ append buffer <br/>
+ } else {
+ append buffer {<div style="position:relative;top:7px;text-align:center;">}
+ append buffer "Show details"
+ append buffer {</div>}
+ }
+
+append buffer {
+</a>
+}
+
+ if {$show_details==1} {
+ append buffer $console
+ }
+
+append buffer {</td>}
+
+ if {$show_details!=1} {
+ append buffer {<td> </td>}
+ }
+
+append buffer {
+<td style="width:25px;"> </td>
+</table>
+</td>
+</tr>
+}
+
+ }
+
+append buffer {
+<tr>
+<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
+<div style="width:500px;background-color:#ffffff;height:100%;">
+
+ </div>
+</td>
+</tr>
+</table>
+</td>
+<td style="width:6px;"/>
+<td style="width:245px;height:100%">
+<table style="padding:0px;border-collapse:collapse;height:100%;">
+<tr>
+<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
+<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
+ Documentation
+ </div>
+</td>
+<td width="40px">
+
+ </td>
+<td/>
+</tr>
+<tr>
+<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
+</tr>
+<tr>
+<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
+<a target="_blank" href="http://openocd.berlios.de/doc/openocd.pdf">OpenOCD Manual</a>
+<br/>
+</td>
+</tr>
+<tr>
+<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
+</tr>
+<tr>
+<td colspan="3">
+<table style="padding:0px;border-collapse:collapse;">
+<td style="background-color:#d8d7d7;width:10px;height:1px"/>
+<td style="background-color:#999999;width:225px; height:1px;"/>
+<td style="background-color:#d8d7d7;width:10px;height:1px"/>
+</table>
+</td>
+</tr>
+<tr>
+<td style="background-color:#d8d7d7;height:15px;" colspan="3"/>
+</tr>
+<tr style="height:100%;">
+<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray">
+
+ Download memory from target. <br>
+ <b>Note</b> that download memory can take
+ a long time(potentially minutes for megabytes at low JTAG clk speeds).
+ <p/>
+ Once the memory is downloaded a link is available on the page to download
+ the file to your PC.
+
+ </td>
+</tr>
+<tr>
+<td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3">
+
+ </td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</body>
+</html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+start_chunked "html"
+write_chunked $buffer
+end_chunked
+
Property changes on: trunk/src/server/httpd/downloadmem.tcl
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/src/server/httpd/editconfigs.tcl
===================================================================
--- trunk/src/server/httpd/editconfigs.tcl 2008-12-23 08:52:02 UTC (rev 1272)
+++ trunk/src/server/httpd/editconfigs.tcl 2008-12-23 12:52:14 UTC (rev 1273)
@@ -1,462 +1,462 @@
-# converted to .tcl by html2tcl.tcl
-set buffer ""
-append buffer {
-
-
-
-
-
-
-
-
-
- <html xmlns="http://www.w3.org/TR/REC-html40">
-<head>
-<title>Zylin ZY1000 JTAG debugger</title>
-<meta charset="utf-8" content="text/html" http-equiv="Content-Type"/>
-<link type="text/css" rel="stylesheet" href="menuweb.css"/>
-</head>
-}
-
- set console ""
- set upload_filename /ram/upload
-
-append buffer {
-<body style="margin:0px;">
-<div style="width:974px;height:85px;">
-<div style="float:left;position:relative;left:32px;width:478px;">
-<a href="/">
-<img src="menu_cuts/logo_top.png" style="border:0px;"/>
-</a>
-</div>
-<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
-<div style="position:relative;left:15px;top:4px;" class="textlight">
-}
-append buffer [capture version]
-append buffer {
-</div>
-</div>
-</div>
-<table style="padding:0px;border-collapse:collapse;">
-<tr>
-<td style="width:33px;">
-<div style="width:20px;height:510px;">
-
- </div>
-</td>
-<td style="vertical-align:top;height:100%;width:140px;padding:0px;">
-<table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
-<tr style="height:59px;">
-<td/>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="index.tcl" style="">Target Status</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="preconfig.tcl" style="">Select Target Config</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="editconfigs.tcl" style="font-weight: bold;">Edit Configurations</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;">
-<div style="position:relative;left:10px;top:10px;font-weight:bold;">
-<a href="reload.tcl" style="">Reload Config Scripts</a>
-</div>
-</td>
-</tr>
-<tr>
-<td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')"/>
-</tr>
-<tr>
-<td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')"/>
-</tr>
-<tr>
-<td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')"/>
-</tr>
-</table>
-</td>
-<td style="vertical-align:top;padding:0px;height:100%">
-<table style="padding:0px;border-collapse:collapse;height:100%;">
-<tr>
-<td>
-<table style="padding:0px;border-collapse:collapse;">
-<tr>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="index.tcl" style="font-weight: bold;">Config Target</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="flashinfo.tcl">Flash</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="browsemem.tcl">Memory</a>
-</div>
-</td>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
-<a href="openocd.tcl">OpenOCD</a>
-</div>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-<tr>
-<td style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
-<div style="width:500px;background-color:#ffffff;height:100%;">
-
- </div>
-</td>
-</tr>
-<tr>
-<td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6">
-<H1>Edit Target Configurations</H1>
-</td>
-</tr>
-<tr style="height:100%;">
-<td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6">
- <form action="editconfigs.tcl" method="post">
- }
-
- set form_edittext [formfetch form_edittext]
- set form_action [formfetch form_action]
- set form_filename [formfetch form_filename]
- set form_selected [formfetch form_selected]
-
- if {[string compare $form_action "Load"]==0} {
- set form_filename $form_selected
- }
-
- if {[string compare $form_action "Delete"]==0} {
- capture_catch "rm /config/settings/$form_selected"
- }
-
- if {[string compare $form_action "Save"]==0} {
- save_var $form_filename [from_textarea $form_edittext]
- append buffer "Wrote file $form_filename<br>"
- }
-
- set form_edittext ""
-
- # load original or script saved on disk.
- if {[string compare $form_action "Show default"]==0} {
- set form_edittext [load_file "/rom/$form_selected"]
- set form_filename $form_selected
- } else {
- set form_edittext [load_config $form_filename]
- }
-
- set form_edittext_subst [to_textarea $form_edittext]
-
-
- proc prepend { val list } {
- set res ""
- foreach value $list {
- set t $val
- append t $value
- lappend res $t
- }
- return $res
- }
-
- set files [prepend target/ [ls /rom/target]]
- set files [lunion $files [prepend event/ [ls /config/settings/event]]]
- set files [lunion $files [prepend target/ [ls /config/settings/target]]]
- set files [lsort $files]
-
-
-append buffer {
- <table style="padding:0px;border-collapse:collapse;"><tr>
- <td style="padding-top:1px;"><select name="form_selected">
- }
-
- set foundTarget 0
- foreach i $files {
-
-append buffer {
- <option
- }
-
- if {[string compare $form_filename $i]==0} {
- set foundTarget 1
- append buffer {selected="selected"}
- }
-
-append buffer {
- value="}
-append buffer $i
-append buffer {">}
-append buffer $i
-append buffer {</option>
- }
-
- }
- if {$foundTarget==0} {
-
-append buffer {
- <option selected="selected" value="">Select target config</option>
- }
-
- }
-
-append buffer {
- </select></td>
- <td class="buttonspacesmall"> </td>
- <td><input type="submit" value="Load" name="form_action"></td>
- <td class="buttonspacesmall"> </td>
- <td><input type="submit" value="Show default" name="form_action"></td>
- <td class="buttonspacesmall"> </td>
- <td><input type="submit" value="Delete" name="form_action"></td>
- </tr></table>
- <textarea style="overflow:auto;" rows="21" cols="65" name="form_edittext" wrap="off">}
-append buffer $form_edittext_subst
-append buffer {</textarea>
- <table style="padding:0px;border-collapse:collapse;"><tr>
- }
-
- append buffer {<td class="formtext">File</td><td><input type="text" name="form_filename" } "\n"
- append buffer "value=\"$form_filename\" ></td>\n"
- append buffer {<td class="buttonspacesmall"> </td><td><input type="submit" value="Save" name="form_action"></td><br>} "\n"
- append buffer {</tr></table>} "\n"
-
-append buffer {
- </form>
- </td>
-</tr>
-}
-
-
- set toggle_details [formfetch toggle_details]
- if {[string length $toggle_details]==0} {
- set toggle_details 0
- }
- set show_details [load_var show_details]
- if {[string length $show_details]==0} {
- set show_details 0
- }
- if {$toggle_details==1} {
- set show_details [expr 1-$show_details]
- save_var show_details $show_details
- }
-
- if {[string length $console]!=0} {
-
-append buffer {
-<tr style="height:100%;">
-<td style="height:100%;background-color:red;" colspan="6">
-<table style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%" class="textgray">
-<td style="width:25px;"> </td>
-}
-
- if {$show_details==1} {
- append buffer <
- append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
- append buffer >
- } else {
- append buffer <
- append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"}
- append buffer >
- }
-
-append buffer {
-<a class="openocd" href="editconfigs.tcl?toggle_details=1">
-}
-
- if {$show_details==1} {
- append buffer "Hide details"
- append buffer <br/>
- } else {
- append buffer {<div style="position:relative;top:7px;text-align:center;">}
- append buffer "Show details"
- append buffer {</div>}
- }
-
-append buffer {
-</a>
-}
-
- if {$show_details==1} {
- append buffer $console
- }
-
-append buffer {</td>}
-
- if {$show_details!=1} {
- append buffer {<td> </td>}
- }
-
-append buffer {
-<td style="width:25px;"> </td>
-</table>
-</td>
-</tr>
-}
-
- }
-
-append buffer {
-<tr>
-<td style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;" colspan="6">
-<div style="width:500px;background-color:#ffffff;height:100%;">
-
- </div>
-</td>
-</tr>
-</table>
-</td>
-<td style="width:6px;"/>
-<td style="width:245px;height:100%">
-<table style="padding:0px;border-collapse:collapse;height:100%;">
-<tr>
-<td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
-<div style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;" class="textgray">
- Documentation
- </div>
-</td>
-<td width="40px">
-
- </td>
-<td/>
-</tr>
-<tr>
-<td style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');" colspan="3"/>
-</tr>
-<tr>
-<td style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;" colspan="3">
-<a target="_blank" href="http://www.zylin.com/zy1000/ZY1000_Quick_S...
[truncated message content] |
|
From: <oh...@ma...> - 2008-12-23 09:52:06
|
Author: oharboe
Date: 2008-12-23 09:52:02 +0100 (Tue, 23 Dec 2008)
New Revision: 1272
Added:
trunk/src/server/httpd/httpd.tcl
Removed:
trunk/src/server/httpd/httpd.tcl
Modified:
trunk/src/server/httpd.c
trunk/src/server/httpd/build.sh
trunk/src/server/httpd/erase.tcl
trunk/src/server/httpd/menu.xml
trunk/src/server/httpd/openocd.tcl
Log:
httpd wip
Modified: trunk/src/server/httpd/build.sh
===================================================================
--- trunk/src/server/httpd/build.sh 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd/build.sh 2008-12-23 08:52:02 UTC (rev 1272)
@@ -1,3 +1,5 @@
set e
java -classpath ../../../../zy1000/build/xalan.jar\;. Stylizer menu.xsl menu.xml .
find . -regex ".*\.tcl" -type f -exec sh html2tcl.sh {} {} \;
+echo "Copy .tcl files to /usr/local/lib/openocd/httpd/"
+cp *.tcl /usr/local/lib/openocd/httpd/
\ No newline at end of file
Modified: trunk/src/server/httpd/erase.tcl
===================================================================
--- trunk/src/server/httpd/erase.tcl 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd/erase.tcl 2008-12-23 08:52:02 UTC (rev 1272)
@@ -161,7 +161,7 @@
set form_length 0x10000
}
if {[string compare $form_address ""]==0} {
- if {[catch {[zy1000_flash]} result]==0} {
+ if {[catch {[first_flash_base]} result]==0} {
set form_address "0x[tohex $result]"
}
}
Deleted: trunk/src/server/httpd/httpd.tcl
===================================================================
--- trunk/src/server/httpd/httpd.tcl 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd/httpd.tcl 2008-12-23 08:52:02 UTC (rev 1272)
@@ -1,113 +0,0 @@
-# some dummy proc's to get things going for test purposes
-
-
-
-proc ip {} {
-return 10.0.0.55
-}
-
-proc start_chunked {a} {
- global httpdata
- global httpmime
- set httpmime $a
- set httpdata ""
-}
-
-proc write_chunked {a} {
- global httpdata
- append httpdata $a
-}
-
-proc end_chunked {} {
-}
-
-
-
-#proc formfetch {a} {
-# global httppostdata
- #catch {
-# echo "$a=$httppostdata($a)"
- #return $httppostdata($a)
- #}
-#
- #return ""
-#}
-
-
-
-
-proc tohex {a} {
- set r ""
- while 1 {
-
- set rem [expr $a%16]
- set a [expr $a/16]
- set r [string index "0123456789abcdef" $rem]$r
- if ($a==0) then break
- }
- return $r
-}
-
-# encode text
-proc encode {a} {
- return [string map {\n <br/> { } { } \t { } > > < < / /} $a]
-}
-
-#stubs that can be overriden to save between sessions
-proc load_var {a} {
- global glob_var
- catch {
- return $glob_var($a)
- }
- return ""
-}
-#stubs that can be overriden to save between sessions
-proc save_var {a b} {
- catch {
- set glob_var($a) $b
- return ""
- } err
- set glob_var($a) ""
- return ""
-}
-
-
-
-proc to_textarea {a} {
- return [string map {& & > > < < / /} $a]
-}
-
-proc from_textarea {a} {
- return [string map {> > < < & & / /} $a]
-}
-
-proc lunion {a b} {
- foreach e $a {
- set x($e) {}
- }
- foreach e $b {
- if {![info exists x($e)]} {
- lappend a $e
- }
- }
- return $a
-}
-
-
-# encode text
-proc encode {a} {
- return [string map {\n <br/> { } { } \t { } > > < < / /} $a]
-}
-
-# catch any exceptions, capture output and return it
-proc capture_catch {a} {
- catch {
- return [eval {capture $a}]
- } result
- return $result
-}
-
-proc zy1000_flash {} {
- set t [lindex 0 [ocd_flash_banks]]
- return $t(base)
-}
Copied: trunk/src/server/httpd/httpd.tcl (from rev 1271, trunk/src/server/httpd/httpd.tcl)
===================================================================
--- trunk/src/server/httpd/httpd.tcl 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd/httpd.tcl 2008-12-23 08:52:02 UTC (rev 1272)
@@ -0,0 +1,113 @@
+# some dummy proc's to get things going for test purposes
+
+
+
+proc ip {} {
+return 10.0.0.55
+}
+
+proc start_chunked {a} {
+ global httpdata
+ global httpmime
+ set httpmime $a
+ set httpdata ""
+}
+
+proc write_chunked {a} {
+ global httpdata
+ append httpdata $a
+}
+
+proc end_chunked {} {
+}
+
+
+
+#proc formfetch {a} {
+# global httppostdata
+ #catch {
+# echo "$a=$httppostdata($a)"
+ #return $httppostdata($a)
+ #}
+#
+ #return ""
+#}
+
+
+
+
+proc tohex {a} {
+ set r ""
+ while 1 {
+
+ set rem [expr $a%16]
+ set a [expr $a/16]
+ set r [string index "0123456789abcdef" $rem]$r
+ if ($a==0) then break
+ }
+ return $r
+}
+
+# encode text
+proc encode {a} {
+ return [string map {\n <br/> { } { } \t { } > > < < / /} $a]
+}
+
+#stubs that can be overriden to save between sessions
+proc load_var {a} {
+ global glob_var
+ catch {
+ return $glob_var($a)
+ }
+ return ""
+}
+#stubs that can be overriden to save between sessions
+proc save_var {a b} {
+ catch {
+ set glob_var($a) $b
+ return ""
+ } err
+ set glob_var($a) ""
+ return ""
+}
+
+
+
+proc to_textarea {a} {
+ return [string map {& & > > < < / /} $a]
+}
+
+proc from_textarea {a} {
+ return [string map {> > < < & & / /} $a]
+}
+
+proc lunion {a b} {
+ foreach e $a {
+ set x($e) {}
+ }
+ foreach e $b {
+ if {![info exists x($e)]} {
+ lappend a $e
+ }
+ }
+ return $a
+}
+
+
+# encode text
+proc encode {a} {
+ return [string map {\n <br/> { } { } \t { } > > < < / /} $a]
+}
+
+# catch any exceptions, capture output and return it
+proc capture_catch {a} {
+ catch {
+ capture {uplevel $a}
+ } result
+ return $result
+}
+
+proc first_flash_base {} {
+ set t [lindex 0 [ocd_flash_banks]]
+ return $t(base)
+}
Property changes on: trunk/src/server/httpd/httpd.tcl
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/server/httpd/menu.xml
===================================================================
--- trunk/src/server/httpd/menu.xml 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd/menu.xml 2008-12-23 08:52:02 UTC (rev 1272)
@@ -438,7 +438,7 @@
set form_length 0x10000
}
if {[string compare $form_address ""]==0} {
- if {[catch {[zy1000_flash]} result]==0} {
+ if {[catch {[first_flash_base]} result]==0} {
set form_address "0x[tohex $result]"
}
}
@@ -794,8 +794,8 @@
set form_command [formfetch form_command]
set form_edittext ""
- if {[string length $form_command]>0} {
- catch {capture_catch {eval "$form_command"}} form_edittext
+ if {[string length $form_command]>0} {
+ set form_edittext [capture_catch {eval $form_command}]
}
append buffer {<form action="openocd.tcl" method="post">} "\n"
Modified: trunk/src/server/httpd/openocd.tcl
===================================================================
--- trunk/src/server/httpd/openocd.tcl 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd/openocd.tcl 2008-12-23 08:52:02 UTC (rev 1272)
@@ -154,8 +154,8 @@
set form_command [formfetch form_command]
set form_edittext ""
- if {[string length $form_command]>0} {
- catch {capture_catch {eval "$form_command"}} form_edittext
+ if {[string length $form_command]>0} {
+ set form_edittext [capture_catch {eval $form_command}]
}
append buffer {<form action="openocd.tcl" method="post">} "\n"
Modified: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2008-12-22 15:24:35 UTC (rev 1271)
+++ trunk/src/server/httpd.c 2008-12-23 08:52:02 UTC (rev 1272)
@@ -429,9 +429,14 @@
}
static struct MHD_Daemon * d;
+static pthread_mutex_t mutex;
+
int httpd_start(void)
{
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init( &attr );
+ pthread_mutex_init( &mutex, &attr );
int port = 8888;
LOG_USER("Launching httpd server on port %d", port);
@@ -461,15 +466,16 @@
void httpd_stop(void)
{
MHD_stop_daemon(d);
+ pthread_mutex_destroy( &mutex );
}
void openocd_sleep_prelude(void)
{
- /* FIX!!!! add locking here!!!! */
+ pthread_mutex_unlock( &mutex );
}
void openocd_sleep_postlude(void)
{
- /* FIX!!!! add locking here!!!! */
+ pthread_mutex_lock( &mutex );
}
|
|
From: <oh...@ma...> - 2008-12-22 16:24:40
|
Author: oharboe Date: 2008-12-22 16:24:35 +0100 (Mon, 22 Dec 2008) New Revision: 1271 Modified: trunk/src/server/httpd/browsemem.tcl trunk/src/server/httpd/downloadmem.tcl trunk/src/server/httpd/erase.tcl trunk/src/server/httpd/flash.tcl trunk/src/server/httpd/flashinfo.tcl trunk/src/server/httpd/guiupload.tcl trunk/src/server/httpd/httpd.tcl trunk/src/server/httpd/index.tcl trunk/src/server/httpd/menu.xml trunk/src/server/httpd/openocd.tcl trunk/src/server/httpd/production.tcl trunk/src/server/httpd/run.tcl trunk/src/server/httpd/targets.tcl trunk/src/server/httpd/terminal.tcl Log: httpd wip Modified: trunk/src/server/httpd/browsemem.tcl =================================================================== --- trunk/src/server/httpd/browsemem.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/browsemem.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - Modified: trunk/src/server/httpd/downloadmem.tcl =================================================================== --- trunk/src/server/httpd/downloadmem.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/downloadmem.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - @@ -317,12 +315,12 @@ <tr style="height:100%;"> <td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray"> - Download memory to ZY1000 from target. <br> + Download memory from target. <br> <b>Note</b> that download memory can take a long time(potentially minutes for megabytes at low JTAG clk speeds). <p/> Once the memory is downloaded a link is available on the page to download - the file from ZY1000 to your PC. + the file to your PC. </td> </tr> Modified: trunk/src/server/httpd/erase.tcl =================================================================== --- trunk/src/server/httpd/erase.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/erase.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - Modified: trunk/src/server/httpd/flash.tcl =================================================================== --- trunk/src/server/httpd/flash.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/flash.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - <html xmlns="http://www.w3.org/TR/REC-html40"> <head> Modified: trunk/src/server/httpd/flashinfo.tcl =================================================================== --- trunk/src/server/httpd/flashinfo.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/flashinfo.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,8 +14,6 @@ - - <html xmlns="http://www.w3.org/TR/REC-html40"> <head> <title>OpenOCD debugger</title> Modified: trunk/src/server/httpd/guiupload.tcl =================================================================== --- trunk/src/server/httpd/guiupload.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/guiupload.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - @@ -95,7 +93,7 @@ <tr> <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;"> <div style="position:relative;left:10px;top:10px;font-weight:bold;"> -<a href="guiupload.tcl" style="font-weight: bold;">Upload File to ZY1000</a> +<a href="guiupload.tcl" style="font-weight: bold;">Upload File</a> </div> </td> </tr> @@ -149,7 +147,7 @@ </tr> <tr> <td style="background-color:#ffffff;text-indent:30px;height:40px;" colspan="6"> -<H1>Upload File to ZY1000</H1> +<H1>Upload File</H1> </td> </tr> <tr style="height:100%;"> @@ -171,7 +169,7 @@ } } - append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on ZY1000</td><td><input type="text" name="form_filename"></td></tr>} + append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on OpenOCD machine</td><td><input type="text" name="form_filename"></td></tr>} append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>} append buffer {<table><tr><td style="height:15px;width:535px;"> </td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;"> </td></tr></table>} append buffer {<input type="submit" name="form_action" value="Upload" ><br> } @@ -302,43 +300,7 @@ <td style="background-color:#d8d7d7;height:15px;" colspan="3"/> </tr> <tr style="height:100%;"> -<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray"> - - <p>The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing - embedded into the firmware.</p> - - <p>Use "/ram" to store temporary files.<p/> - - <p> - You can browse filing systems and download files by pointing your web browser to: - <ul> - <li><a href="/ram" target="_blank">/ram</a> - <li><a href="/rom" target="_blank">/rom</a> - <li><a href="/config" target="_blank">/config</a> - </ul> - </p> - - <p> - You can also upload files using e.g. curl from the command line. Example: - </p> - <code> - curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf } -append buffer [ip] -append buffer {upload.tcl - </code> - <p> - If you have a tftp server installed on your development PC, you can access - files on your developer PC using a /tftp/ip/ prefix to the file to be accessed - on your developer PC. Note that if you do not increase the default packet - size for your tftp server, then the performance will be very poor. Normal - performance is about 500-600kBytes/s. - </p> - <code> - cp /tftp/10.0.0.106/build/src/openocd /ram/test - </code> - - - </td> +<td style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;" colspan="3" class="textgray"/> </tr> <tr> <td style="height:30px;background-image:url('menu_cuts/right_bottom.png');" colspan="3"> Modified: trunk/src/server/httpd/httpd.tcl =================================================================== --- trunk/src/server/httpd/httpd.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/httpd.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -106,3 +106,8 @@ } result return $result } + +proc zy1000_flash {} { + set t [lindex 0 [ocd_flash_banks]] + return $t(base) +} Modified: trunk/src/server/httpd/index.tcl =================================================================== --- trunk/src/server/httpd/index.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/index.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -298,10 +298,7 @@ See log for details. <br> <p><b>Target power</b> - Detects power on target. <br> If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p> - <p><b>Power on</b> - Turn on ZY1000 target power relay.</p> - <p><b>Power off</b> - Turn off ZY1000 target power relay.</p> <p>Type "help power" in telnet for command to control power relay.</p> - <p><b>Reboot ZY1000</b> - Reboots ZY1000 unit. Type "help reboot" in telnet.</p> </td> </tr> @@ -325,9 +322,7 @@ - - Modified: trunk/src/server/httpd/menu.xml =================================================================== --- trunk/src/server/httpd/menu.xml 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/menu.xml 2008-12-22 15:24:35 UTC (rev 1271) @@ -87,10 +87,7 @@ See log for details. <br> <p><b>Target power</b> - Detects power on target. <br> If the JTAG cable is not connected, or the target has no power, then no target power will be detected.</p> - <p><b>Power on</b> - Turn on ZY1000 target power relay.</p> - <p><b>Power off</b> - Turn off ZY1000 target power relay.</p> <p>Type "help power" in telnet for command to control power relay.</p> - <p><b>Reboot ZY1000</b> - Reboots ZY1000 unit. Type "help reboot" in telnet.</p> ]]></markup_code> </right_column> @@ -108,13 +105,13 @@ <markup_code><![CDATA[ A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either ZY1000 ships with an + the CPU, flash and reset init script. Either OpenOCD ships with an openocd.cfg file for your target or you need to take an existing config file and modify it for your needs. <p> The reset init script is crucial. It will set up e.g. MMU, chip select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides. <p> Writing an openocd.cfg from scratch is a non-trivial exercise, but fortunally it only has to be done once for a target and afterwards it @@ -133,33 +130,6 @@ - <page lang="eng"> - <outfile>reload.tcl</outfile> - <level2parent>index.tcl</level2parent> - <pageheading>Reload Config Scripts</pageheading> - <pagetext> - <markup_code><![CDATA[ - - <tcl> - set form_action [formfetch form_action] - - if {[string compare $form_action "Reload"]==0} { - append buffer "Reloading Config Scripts...<p>" - reboot - } - </tcl> - <form enctype="multipart/form-data" action="reload.tcl" method="post"> - <input type="submit" name="form_action" value="Reload"> - </form> - - ]]></markup_code> - <right_column> - Restart ZY1000 to reload selected target config script. - </right_column> - </pagetext> - - </page> - <page lang="eng"> <outfile>flashinfo.tcl</outfile> @@ -789,12 +759,12 @@ ]]></markup_code> <right_column> <![CDATA[ - Download memory to ZY1000 from target. <br> + Download memory from target. <br> <b>Note</b> that download memory can take a long time(potentially minutes for megabytes at low JTAG clk speeds). <p/> Once the memory is downloaded a link is available on the page to download - the file from ZY1000 to your PC. + the file to your PC. ]]> </right_column> </pagetext> @@ -811,9 +781,9 @@ <level2parent>openocd.tcl</level2parent> <level2menu href="openocd.tcl" title="Run Command" titlestyle="color:#4e6627;"> </level2menu> - <level2menu href="guiupload.tcl" title="Upload File to ZY1000" titlestyle="color:#4e6627;"> + <level2menu href="guiupload.tcl" title="Upload File" titlestyle="color:#4e6627;"> <![CDATA[ - Upload file to ZY1000 + Upload file ]]> </level2menu> @@ -869,7 +839,7 @@ <page lang="eng"> <outfile>guiupload.tcl</outfile> <level2parent>openocd.tcl</level2parent> - <pageheading>Upload File to ZY1000</pageheading> + <pageheading>Upload File</pageheading> <pagetext> <markup_code><![CDATA[ @@ -888,7 +858,7 @@ } } - append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on ZY1000</td><td><input type="text" name="form_filename"></td></tr>} + append buffer {<table style="padding:0px;border-collapse:collapse;"><tr><td class="formtext">Filename on OpenOCD machine</td><td><input type="text" name="form_filename"></td></tr>} append buffer {<td class="formtext">File to upload</td><td><input type="file" name="form_filecontent"></td></tr></table>} append buffer {<table><tr><td style="height:15px;width:535px;"> </td></tr><tr><td style="height:1px;width:535px;background-color:#a2c5d1;"></td></tr><tr><td style="height:15px;width:535px;"> </td></tr></table>} append buffer {<input type="submit" name="form_action" value="Upload" ><br> } @@ -897,41 +867,6 @@ </tcl> ]]></markup_code> - <right_column> - <![CDATA[ - <p>The ZY1000 has three filing systems "/rom", "/ram" and "/config". "/rom" is a read only filing - embedded into the firmware.</p> - - <p>Use "/ram" to store temporary files.<p/> - - <p> - You can browse filing systems and download files by pointing your web browser to: - <ul> - <li><a href="/ram" target="_blank">/ram</a> - <li><a href="/rom" target="_blank">/rom</a> - <li><a href="/config" target="_blank">/config</a> - </ul> - </p> - - <p> - You can also upload files using e.g. curl from the command line. Example: - </p> - <code> - curl --form form_filecontent=@/tmp/myfile.elf --form form_filename=/ram/myfile.elf <tcl>append buffer [ip]</tcl>upload.tcl - </code> - <p> - If you have a tftp server installed on your development PC, you can access - files on your developer PC using a /tftp/ip/ prefix to the file to be accessed - on your developer PC. Note that if you do not increase the default packet - size for your tftp server, then the performance will be very poor. Normal - performance is about 500-600kBytes/s. - </p> - <code> - cp /tftp/10.0.0.106/build/src/openocd /ram/test - </code> - - ]]> - </right_column> </pagetext> </page> @@ -946,13 +881,13 @@ <markup_code><![CDATA[ A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either ZY1000 ships with an + the CPU, flash and reset init script. Either OpenOCD ships with an openocd.cfg file for your target or you need to take an existing config file and modify it for your needs. <p> The reset init script is crucial. It will set up e.g. MMU, chip select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides. <p> Writing an openocd.cfg from scratch is a non-trivial exercise, but fortunally it only has to be done once for a target and afterwards it Modified: trunk/src/server/httpd/openocd.tcl =================================================================== --- trunk/src/server/httpd/openocd.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/openocd.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - @@ -91,7 +89,7 @@ <tr> <td style="width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;"> <div style="position:relative;left:10px;top:10px;font-weight:bold;"> -<a href="guiupload.tcl" style="">Upload File to ZY1000</a> +<a href="guiupload.tcl" style="">Upload File</a> </div> </td> </tr> Modified: trunk/src/server/httpd/production.tcl =================================================================== --- trunk/src/server/httpd/production.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/production.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - Modified: trunk/src/server/httpd/run.tcl =================================================================== --- trunk/src/server/httpd/run.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/run.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - Modified: trunk/src/server/httpd/targets.tcl =================================================================== --- trunk/src/server/httpd/targets.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/targets.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -105,13 +105,13 @@ <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6"> A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either ZY1000 ships with an + the CPU, flash and reset init script. Either OpenOCD ships with an openocd.cfg file for your target or you need to take an existing config file and modify it for your needs. <p> The reset init script is crucial. It will set up e.g. MMU, chip select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides. <p> Writing an openocd.cfg from scratch is a non-trivial exercise, but fortunally it only has to be done once for a target and afterwards it @@ -260,9 +260,7 @@ - - @@ -392,13 +390,13 @@ <td style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;" colspan="6"> A target needs an openocd.cfg file. This config file sets up - the CPU, flash and reset init script. Either ZY1000 ships with an + the CPU, flash and reset init script. Either OpenOCD ships with an openocd.cfg file for your target or you need to take an existing config file and modify it for your needs. <p> The reset init script is crucial. It will set up e.g. MMU, chip select registers, etc. after a reset. The init.cfg (reset init script) - is embedded into the openocd.cfg file in the sampls Zylin provides. + is embedded into the openocd.cfg file in the sampls OpenOCD provides. <p> Writing an openocd.cfg from scratch is a non-trivial exercise, but fortunally it only has to be done once for a target and afterwards it Modified: trunk/src/server/httpd/terminal.tcl =================================================================== --- trunk/src/server/httpd/terminal.tcl 2008-12-22 15:14:10 UTC (rev 1270) +++ trunk/src/server/httpd/terminal.tcl 2008-12-22 15:24:35 UTC (rev 1271) @@ -14,9 +14,7 @@ - - |
|
From: <oh...@ma...> - 2008-12-22 16:14:11
|
Author: oharboe Date: 2008-12-22 16:14:10 +0100 (Mon, 22 Dec 2008) New Revision: 1270 Added: zy1000/trunk/build/tcl/menu_cuts/zylin_logo_bottom_left.PNG Log: httpd wip Added: zy1000/trunk/build/tcl/menu_cuts/zylin_logo_bottom_left.PNG =================================================================== (Binary files differ) Property changes on: zy1000/trunk/build/tcl/menu_cuts/zylin_logo_bottom_left.PNG ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: <oh...@ma...> - 2008-12-22 16:10:27
|
Author: oharboe
Date: 2008-12-22 16:10:18 +0100 (Mon, 22 Dec 2008)
New Revision: 1269
Added:
trunk/src/server/httpd/menu_cuts/
trunk/src/server/httpd/menu_cuts/center_bottom.png
trunk/src/server/httpd/menu_cuts/center_top.png
trunk/src/server/httpd/menu_cuts/h_tab1.png
trunk/src/server/httpd/menu_cuts/h_tab1_selected.png
trunk/src/server/httpd/menu_cuts/h_tab2.png
trunk/src/server/httpd/menu_cuts/h_tab2_selected.png
trunk/src/server/httpd/menu_cuts/h_tab_free.png
trunk/src/server/httpd/menu_cuts/logo_bottom.png
trunk/src/server/httpd/menu_cuts/logo_top.png
trunk/src/server/httpd/menu_cuts/right_bottom.png
trunk/src/server/httpd/menu_cuts/right_top.png
trunk/src/server/httpd/menu_cuts/right_top_small.png
trunk/src/server/httpd/menu_cuts/top_right.png
trunk/src/server/httpd/menu_cuts/v_1.png
trunk/src/server/httpd/menu_cuts/v_2_tile.png
trunk/src/server/httpd/menu_cuts/v_3.png
trunk/src/server/httpd/menu_cuts/v_tab.png
trunk/src/server/httpd/menu_cuts/v_tab_selected.png
Modified:
trunk/src/server/httpd.c
trunk/src/server/httpd/readme.txt
Log:
httpd wip
Added: trunk/src/server/httpd/menu_cuts/center_bottom.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/center_bottom.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/center_top.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/center_top.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/h_tab1.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/h_tab1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/h_tab1_selected.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/h_tab1_selected.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/h_tab2.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/h_tab2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/h_tab2_selected.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/h_tab2_selected.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/h_tab_free.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/h_tab_free.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/logo_bottom.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/logo_bottom.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/logo_top.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/logo_top.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/right_bottom.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/right_bottom.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/right_top.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/right_top.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/right_top_small.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/right_top_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/top_right.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/top_right.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/v_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/v_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/v_2_tile.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/v_2_tile.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/v_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/v_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/v_tab.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/v_tab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/server/httpd/menu_cuts/v_tab_selected.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/server/httpd/menu_cuts/v_tab_selected.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/server/httpd/readme.txt
===================================================================
--- trunk/src/server/httpd/readme.txt 2008-12-22 15:02:09 UTC (rev 1268)
+++ trunk/src/server/httpd/readme.txt 2008-12-22 15:10:18 UTC (rev 1269)
@@ -19,6 +19,6 @@
../openocd/configure --enable-httpd --enable-dummy --enable-ioutil
make
make install
-openocd -c "interface dummy" -f target/at91eb40a.cfg
+openocd -f httpd/httpd.tcl -c "interface dummy" -f target/at91eb40a.cfg
4. Point browser to: http://localhost:8888
Modified: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2008-12-22 15:02:09 UTC (rev 1268)
+++ trunk/src/server/httpd.c 2008-12-22 15:10:18 UTC (rev 1269)
@@ -296,7 +296,7 @@
}
else
{
- printf("Tcl OK\n");
+ LOG_DEBUG("Tcl OK");
/* FIX!!! how to handle mime types??? */
const char *result;
int reslen;
|
|
From: <oh...@ma...> - 2008-12-22 15:26:49
|
Author: oharboe
Date: 2008-12-22 15:26:44 +0100 (Mon, 22 Dec 2008)
New Revision: 1267
Modified:
trunk/doc/openocd.texi
Log:
Dirk Behme <dir...@go...>
Add missing tap-enable and tap-disable events to documentation.
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2008-12-22 10:28:11 UTC (rev 1266)
+++ trunk/doc/openocd.texi 2008-12-22 14:26:44 UTC (rev 1267)
@@ -1744,8 +1744,8 @@
mychip.cpu configure -event gdb-attach @{ puts "Reset..." ; reset halt @}
@end example
-Current Events
-
+@section Current Events
+The following events are available:
@itemize @bullet
@item @b{debug-halted}
@* The target has halted for debug reasons (ie: breakpoint)
@@ -1809,6 +1809,22 @@
@* Success
@item @b{resumed}
@* Target has resumed
+@item @b{tap-enable}
+@* Executed by @b{jtag tapenable DOTTED.NAME} command. Example:
+@example
+jtag configure DOTTED.NAME -event tap-enable @{
+ puts "Enabling CPU"
+ ...
+@}
+@end example
+@item @b{tap-disable}
+@*Executed by @b{jtag tapdisable DOTTED.NAME} command. Example:
+@example
+jtag configure DOTTED.NAME -event tap-disable @{
+ puts "Disabling CPU"
+ ...
+@}
+@end example
@end itemize
|
|
From: <oh...@ma...> - 2008-12-22 11:28:14
|
Author: oharboe
Date: 2008-12-22 11:28:11 +0100 (Mon, 22 Dec 2008)
New Revision: 1266
Modified:
trunk/src/helper/ioutil.c
trunk/src/server/httpd.c
Log:
cygwin fixes
Modified: trunk/src/helper/ioutil.c
===================================================================
--- trunk/src/helper/ioutil.c 2008-12-22 10:27:53 UTC (rev 1265)
+++ trunk/src/helper/ioutil.c 2008-12-22 10:28:11 UTC (rev 1266)
@@ -62,8 +62,9 @@
#include <stdio.h>
#include <string.h>
-
+#if !defined(__CYGWIN__)
#include <ifaddrs.h>
+#endif
#include <unistd.h>
#include <stdio.h>
@@ -564,6 +565,7 @@
static int zylinjtag_Jim_Command_ip(Jim_Interp *interp, int argc,
Jim_Obj * const *argv)
{
+#if !defined(__CYGWIN__)
Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0);
struct ifaddrs *ifa = NULL, *ifp = NULL;
@@ -597,13 +599,14 @@
}
freeifaddrs(ifp);
-
+#else
+ Jim_Obj *tclOutput = Jim_NewStringObj(interp, "fixme!!!", 0);
+#endif
Jim_SetResult(interp, tclOutput);
return JIM_OK;
}
-
/* not so pretty code to fish out eth0 mac address */
static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc,
Jim_Obj * const *argv)
Modified: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2008-12-22 10:27:53 UTC (rev 1265)
+++ trunk/src/server/httpd.c 2008-12-22 10:28:11 UTC (rev 1266)
@@ -54,7 +54,7 @@
#define PAGE_NOT_FOUND "<html><head><title>File not found</title></head><body>File not found</body></html>"
-static const char *appendf(const *prev, const char *format, ...)
+static const char *appendf(const char *prev, const char *format, ...)
{
va_list ap;
va_start(ap, format);
@@ -69,7 +69,7 @@
if (prev != NULL)
{
- free(prev);
+ free((void *)prev);
}
if (string == NULL)
@@ -120,7 +120,7 @@
char *file = (char*) Jim_GetString(argv[2], NULL);
// Find length
- char *data;
+ const char *data;
int actual;
int retcode;
@@ -449,9 +449,11 @@
void openocd_sleep_prelude(void)
{
+ /* FIX!!!! add locking here!!!! */
}
void openocd_sleep_postlude(void)
{
+ /* FIX!!!! add locking here!!!! */
}
|
|
From: <oh...@ma...> - 2008-12-22 11:27:55
|
Author: oharboe Date: 2008-12-22 11:27:53 +0100 (Mon, 22 Dec 2008) New Revision: 1265 Modified: trunk/src/jtag/dummy.c Log: bumped a LOG_INFO to LOG_DEBUG level to reduce excessive output for normal execution Modified: trunk/src/jtag/dummy.c =================================================================== --- trunk/src/jtag/dummy.c 2008-12-19 19:45:01 UTC (rev 1264) +++ trunk/src/jtag/dummy.c 2008-12-22 10:27:53 UTC (rev 1265) @@ -90,7 +90,7 @@ int old_state = dummy_state; dummy_state = tap_state_transition( dummy_state, tms ); if( old_state != dummy_state ) - LOG_INFO( "dummy_tap=%s", jtag_state_name(dummy_state) ); + LOG_DEBUG( "dummy_tap=%s", jtag_state_name(dummy_state) ); } dummy_clock = tck; } |
|
From: <oh...@ma...> - 2008-12-19 20:45:05
|
Author: oharboe
Date: 2008-12-19 20:45:01 +0100 (Fri, 19 Dec 2008)
New Revision: 1264
Modified:
trunk/src/jtag/jtag.c
trunk/src/jtag/jtag.h
Log:
Dick Hollenbeck <di...@so...> better logging
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2008-12-19 19:41:58 UTC (rev 1263)
+++ trunk/src/jtag/jtag.c 2008-12-19 19:45:01 UTC (rev 1264)
@@ -1300,7 +1300,7 @@
{
if (cmd->fields[i].in_handler(cmd->fields[i].in_value, cmd->fields[i].in_handler_priv, cmd->fields+i) != ERROR_OK)
{
- LOG_WARNING("in_handler reported a failed check");
+ LOG_WARNING("in_handler: with \"in_value\", mismatch in %s", cmd->ir_scan ? "SIR" : "SDR" );
retval = ERROR_JTAG_QUEUE_FAILED;
}
}
@@ -1314,7 +1314,7 @@
/* We're going to call the error:handler later, but if the in_handler
* reported an error we report this failure upstream
*/
- LOG_WARNING("in_handler reported a failed check");
+ LOG_WARNING("in_handler: w/o \"in_value\", mismatch in %s", cmd->ir_scan ? "SIR" : "SDR" );
retval = ERROR_JTAG_QUEUE_FAILED;
}
}
Modified: trunk/src/jtag/jtag.h
===================================================================
--- trunk/src/jtag/jtag.h 2008-12-19 19:41:58 UTC (rev 1263)
+++ trunk/src/jtag/jtag.h 2008-12-19 19:45:01 UTC (rev 1264)
@@ -35,14 +35,14 @@
/* 16 Tap States, from page 21 of ASSET InterTech, Inc.'s svf.pdf
*/
-enum tap_state
+typedef enum tap_state
{
TAP_RESET = 0x0, TAP_IDLE = 0x8,
TAP_DRSELECT = 0x1, TAP_DRCAPTURE = 0x2, TAP_DRSHIFT = 0x3, TAP_DREXIT1 = 0x4,
TAP_DRPAUSE = 0x5, TAP_DREXIT2 = 0x6, TAP_DRUPDATE = 0x7,
TAP_IRSELECT = 0x9, TAP_IRCAPTURE = 0xa, TAP_IRSHIFT = 0xb, TAP_IREXIT1 = 0xc,
TAP_IRPAUSE = 0xd, TAP_IREXIT2 = 0xe, TAP_IRUPDATE = 0xf
-};
+} tap_state_t;
typedef struct tap_transition_s
{
@@ -530,7 +530,7 @@
/**
* Function jtag_state_name
- * Returns a string suitable for display representing the JTAG tap_state
+ * Returns a string suitable for display representing the JTAG tap_state
*/
const char* jtag_state_name(enum tap_state state);
|
|
From: <oh...@ma...> - 2008-12-19 20:42:00
|
Author: oharboe
Date: 2008-12-19 20:41:58 +0100 (Fri, 19 Dec 2008)
New Revision: 1263
Modified:
trunk/src/jtag/dummy.c
Log:
Dick Hollenbeck <di...@so...> - This patch adds JTAG state tracking to dummy.c
Modified: trunk/src/jtag/dummy.c
===================================================================
--- trunk/src/jtag/dummy.c 2008-12-19 19:40:38 UTC (rev 1262)
+++ trunk/src/jtag/dummy.c 2008-12-19 19:41:58 UTC (rev 1263)
@@ -26,6 +26,15 @@
#include "jtag.h"
#include "bitbang.h"
+
+/* my private tap controller state, which tracks state for calling code */
+static tap_state_t dummy_state = TAP_RESET;
+
+static int dummy_clock; /* edge detector */
+
+static tap_state_t tap_state_transition(tap_state_t cur_state, int tms);
+
+
int dummy_speed(int speed);
int dummy_register_commands(struct command_context_s *cmd_ctx);
int dummy_init(void);
@@ -70,12 +79,28 @@
return 1;
}
+
void dummy_write(int tck, int tms, int tdi)
{
+ /* TAP standard: "state transitions occur on rising edge of clock" */
+ if( tck != dummy_clock )
+ {
+ if( tck )
+ {
+ int old_state = dummy_state;
+ dummy_state = tap_state_transition( dummy_state, tms );
+ if( old_state != dummy_state )
+ LOG_INFO( "dummy_tap=%s", jtag_state_name(dummy_state) );
+ }
+ dummy_clock = tck;
+ }
}
void dummy_reset(int trst, int srst)
{
+ dummy_clock = 0;
+ dummy_state = TAP_RESET;
+ LOG_DEBUG( "reset to %s", jtag_state_name(dummy_state) );
}
static int dummy_khz(int khz, int *jtag_speed)
@@ -130,3 +155,107 @@
void dummy_led(int on)
{
}
+
+
+/**
+ * Function tap_state_transition
+ * takes a current TAP state and returns the next state according to the tms value.
+ *
+ * Even though there is code to duplicate this elsewhere, we do it here a little
+ * differently just to get a second opinion, i.e. a verification, on state tracking
+ * in that other logic. Plus array lookups without index checking are no favorite thing.
+ * This is educational for developers new to TAP controllers.
+ */
+static tap_state_t tap_state_transition(tap_state_t cur_state, int tms)
+{
+ tap_state_t new_state;
+
+ if (tms)
+ {
+ switch (cur_state)
+ {
+ case TAP_RESET:
+ new_state = cur_state;
+ break;
+ case TAP_IDLE:
+ case TAP_DRUPDATE:
+ case TAP_IRUPDATE:
+ new_state = TAP_DRSELECT;
+ break;
+ case TAP_DRSELECT:
+ new_state = TAP_IRSELECT;
+ break;
+ case TAP_DRCAPTURE:
+ case TAP_DRSHIFT:
+ new_state = TAP_DREXIT1;
+ break;
+ case TAP_DREXIT1:
+ case TAP_DREXIT2:
+ new_state = TAP_DRUPDATE;
+ break;
+ case TAP_DRPAUSE:
+ new_state = TAP_DREXIT2;
+ break;
+ case TAP_IRSELECT:
+ new_state = TAP_RESET;
+ break;
+ case TAP_IRCAPTURE:
+ case TAP_IRSHIFT:
+ new_state = TAP_IREXIT1;
+ break;
+ case TAP_IREXIT1:
+ case TAP_IREXIT2:
+ new_state = TAP_IRUPDATE;
+ break;
+ case TAP_IRPAUSE:
+ new_state = TAP_IREXIT2;
+ break;
+ default:
+ LOG_ERROR( "fatal: invalid argument cur_state=%d", cur_state );
+ exit(1);
+ break;
+ }
+ }
+ else
+ {
+ switch (cur_state)
+ {
+ case TAP_RESET:
+ case TAP_IDLE:
+ case TAP_DRUPDATE:
+ case TAP_IRUPDATE:
+ new_state = TAP_IDLE;
+ break;
+ case TAP_DRSELECT:
+ new_state = TAP_DRCAPTURE;
+ break;
+ case TAP_DRCAPTURE:
+ case TAP_DRSHIFT:
+ case TAP_DREXIT2:
+ new_state = TAP_DRSHIFT;
+ break;
+ case TAP_DREXIT1:
+ case TAP_DRPAUSE:
+ new_state = TAP_DRPAUSE;
+ break;
+ case TAP_IRSELECT:
+ new_state = TAP_IRCAPTURE;
+ break;
+ case TAP_IRCAPTURE:
+ case TAP_IRSHIFT:
+ case TAP_IREXIT2:
+ new_state = TAP_IRSHIFT;
+ break;
+ case TAP_IREXIT1:
+ case TAP_IRPAUSE:
+ new_state = TAP_IRPAUSE;
+ break;
+ default:
+ LOG_ERROR( "fatal: invalid argument cur_state=%d", cur_state );
+ exit(1);
+ break;
+ }
+ }
+
+ return new_state;
+}
|
|
From: <oh...@ma...> - 2008-12-19 20:40:40
|
Author: oharboe
Date: 2008-12-19 20:40:38 +0100 (Fri, 19 Dec 2008)
New Revision: 1262
Modified:
trunk/src/helper/log.c
Log:
Dick Hollenbeck <di...@so...> better logging
Modified: trunk/src/helper/log.c
===================================================================
--- trunk/src/helper/log.c 2008-12-19 14:48:00 UTC (rev 1261)
+++ trunk/src/helper/log.c 2008-12-19 19:40:38 UTC (rev 1262)
@@ -55,13 +55,14 @@
static char *log_strings[5] =
{
- "User: ",
- "Error: ",
- "Warning:",
- "Info: ",
- "Debug: "
+ "User : ",
+ "Error: ",
+ "Warn : ", /* want a space after each colon, all same width, colons aligned */
+ "Info : ",
+ "Debug: "
};
+
static int count = 0;
/* The log_puts() serves to somewhat different goals:
@@ -99,7 +100,7 @@
struct mallinfo info;
info = mallinfo();
#endif
- fprintf(log_output, "%s %d %d %s:%d %s()"
+ fprintf(log_output, "%s%d %d %s:%d %s()"
#if PRINT_MEM()
" %d"
#endif
@@ -217,7 +218,7 @@
LOG_WARNING("enabling log output as we are using pipes");
}
}
-
+
return ERROR_OK;
}
|
|
From: <oh...@ma...> - 2008-12-19 15:48:02
|
Author: oharboe Date: 2008-12-19 15:48:00 +0100 (Fri, 19 Dec 2008) New Revision: 1261 Modified: trunk/src/helper/types.h Log: Dick Hollenbeck <di...@so...> better comments Modified: trunk/src/helper/types.h =================================================================== --- trunk/src/helper/types.h 2008-12-19 13:58:15 UTC (rev 1260) +++ trunk/src/helper/types.h 2008-12-19 14:48:00 UTC (rev 1261) @@ -46,18 +46,22 @@ typedef struct jtag_tap_s jtag_tap_t; -/* DANGER!!!! here be dragons! - * +/* DANGER!!!! here be dragons! + * * Leave these fn's as byte accesses because it is safe * across architectures. Clever usage of 32 bit access * will create problems on some hosts. - * - * Note that the pointer in memory might be unaligned. - * - * On some CPU's, i.e. ARM7, the 2 lsb are ignored for 32 - * bit access, on others it will cause an exception and - * on e.g. x86, it works the same as if aligned. - * + * + * Note that the "buf" pointer in memory is probably unaligned. + * + * Were these functions to be re-written to take a 32 bit wide or 16 bit wide + * memory access shortcut, then on some CPU's, i.e. ARM7, the 2 lsbytes of the address are + * ignored for 32 bit access, whereas on other CPU's a 32 bit wide unaligned memory access + * will cause an exception, and lastly on x86, an unaligned "greater than bytewide" + * memory access works as if aligned. So what follows below will work for all + * platforms and gives the compiler leeway to do its own platform specific optimizations. + * + * Again, note that the "buf" pointer in memory is probably unaligned. */ |
|
From: ntfreak at B. <nt...@ma...> - 2008-12-19 14:58:16
|
Author: ntfreak
Date: 2008-12-19 14:58:15 +0100 (Fri, 19 Dec 2008)
New Revision: 1260
Added:
trunk/src/target/interface/rlink.cfg
Modified:
trunk/src/helper/replacements.h
trunk/src/jtag/rlink/call.m4
trunk/src/jtag/rlink/init.m4
trunk/src/jtag/rlink/rlink.c
trunk/src/server/httpd.c
trunk/tools/rlink_make_speed_table/rlink_make_speed_table
trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl
trunk/tools/st7_dtc_as/st7_dtc_as
trunk/tools/st7_dtc_as/st7_dtc_as.pl
Log:
- fix rlink build under native win32 (mingw)
- remove rlink build warnings
- add usb_set_configuration to rlink_init, win32 requires this
- add win32 ETIMEDOUT define
Modified: trunk/src/helper/replacements.h
===================================================================
--- trunk/src/helper/replacements.h 2008-12-19 06:49:34 UTC (rev 1259)
+++ trunk/src/helper/replacements.h 2008-12-19 13:58:15 UTC (rev 1260)
@@ -84,7 +84,6 @@
/* gettimeofday() */
#ifndef HAVE_GETTIMEOFDAY
-
#ifdef _WIN32
struct timezone {
int tz_minuteswest;
@@ -161,6 +160,12 @@
#include <windows.h>
#include <time.h>
+/* win32 systems do not support ETIMEDOUT */
+
+#ifndef ETIMEDOUT
+#define ETIMEDOUT WSAETIMEDOUT
+#endif
+
#if IS_MINGW == 1
static __inline unsigned char inb(unsigned short int port)
{
Property changes on: trunk/src/jtag/rlink/call.m4
___________________________________________________________________
Name: svn:eol-style
+ LF
Modified: trunk/src/jtag/rlink/init.m4
===================================================================
--- trunk/src/jtag/rlink/init.m4 2008-12-19 06:49:34 UTC (rev 1259)
+++ trunk/src/jtag/rlink/init.m4 2008-12-19 13:58:15 UTC (rev 1260)
@@ -1,74 +1,74 @@
-m4_divert(`-1')
-/***************************************************************************
- * Copyright (C) 2008 Lou Deluxe *
- * lou...@fi... *
- * *
- * 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. *
- ***************************************************************************/
-
-m4_undefine(`CTRL_MPEG_L')
-m4_undefine(`CTRL_CARD_L')
-
-m4_ifelse(SHIFTER_PRESCALER, 1, `
- m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x0')')
-')
-m4_ifelse(SHIFTER_PRESCALER, 2, `
- m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x2')')
- m4_define(`CTRL_CARD_L', `m4_eval(`0x8 | 0x1')')
-')
-m4_ifelse(SHIFTER_PRESCALER, 8, `
- m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x3')')
-')
-m4_ifelse(SHIFTER_PRESCALER, 11, `
- m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x4')')
-')
-m4_ifelse(SHIFTER_PRESCALER, 64, `
- m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x7')')
-')
-
-m4_ifdef(`CTRL_MPEG_L',,`
- m4_errprint(`SHIFTER_PRESCALER was not defined with a supported value
-') m4_m4exit(`1')
-')
-
-m4_divert(`0')m4_dnl
-
-init:
- A.H = 0
-
- A.L = 0
-
- DR_MPEG = A ; TDI and TCK start out low
- DR_CARD = A ; TMS starts out low
-
- A.L = 0x6
-
- CTRL_FCI = A ; MPEG and CARD driven by FCI
- DDR_MPEG = A ; TDI and TCK are outputs
-
- A.L = 0x1
-
- X = A ; X == 1
- DDR_CARD = A ; TMS is output
-
- A.L = CTRL_MPEG_L
- CTRL_MPEG = A
-m4_ifdef(`CTRL_CARD_L',
-` A.L = 'CTRL_CARD_L`
-')m4_dnl
- CTRL_CARD = A
-
- STATUS STOP
+m4_divert(`-1')
+/***************************************************************************
+ * Copyright (C) 2008 Lou Deluxe *
+ * lou...@fi... *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+m4_undefine(`CTRL_MPEG_L')
+m4_undefine(`CTRL_CARD_L')
+
+m4_ifelse(SHIFTER_PRESCALER, 1, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x0')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 2, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x2')')
+ m4_define(`CTRL_CARD_L', `m4_eval(`0x8 | 0x1')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 8, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x3')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 11, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x4')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 64, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x7')')
+')
+
+m4_ifdef(`CTRL_MPEG_L',,`
+ m4_errprint(`SHIFTER_PRESCALER was not defined with a supported value
+') m4_m4exit(`1')
+')
+
+m4_divert(`0')m4_dnl
+
+init:
+ A.H = 0
+
+ A.L = 0
+
+ DR_MPEG = A ; TDI and TCK start out low
+ DR_CARD = A ; TMS starts out low
+
+ A.L = 0x6
+
+ CTRL_FCI = A ; MPEG and CARD driven by FCI
+ DDR_MPEG = A ; TDI and TCK are outputs
+
+ A.L = 0x1
+
+ X = A ; X == 1
+ DDR_CARD = A ; TMS is output
+
+ A.L = CTRL_MPEG_L
+ CTRL_MPEG = A
+m4_ifdef(`CTRL_CARD_L',
+` A.L = 'CTRL_CARD_L`
+')m4_dnl
+ CTRL_CARD = A
+
+ STATUS STOP
Property changes on: trunk/src/jtag/rlink/init.m4
___________________________________________________________________
Name: svn:eol-style
+ LF
Modified: trunk/src/jtag/rlink/rlink.c
===================================================================
--- trunk/src/jtag/rlink/rlink.c 2008-12-19 06:49:34 UTC (rev 1259)
+++ trunk/src/jtag/rlink/rlink.c 2008-12-19 13:58:15 UTC (rev 1260)
@@ -31,6 +31,7 @@
#include <errno.h>
#include <string.h>
#include <usb.h>
+#include <stdint.h>
/* project specific includes */
#include "log.h"
@@ -1034,7 +1035,6 @@
int tdi_bit_offset;
u8 tdi_mask, *tdi_p;
u8 dtc_mask;
- dtc_reply_queue_entry_t *rq_entry;
if(scan_size < 1) {
LOG_ERROR("scan_size cannot be less than 1 bit\n");
@@ -1555,7 +1555,7 @@
{
struct usb_bus *busses;
struct usb_bus *bus;
- int c, i, a, j, retries,len;
+ int i, j, retries;
int found=0;
int success=0;
u8 reply_buffer[USB_EP1IN_SIZE];
@@ -1597,6 +1597,9 @@
{
LOG_DEBUG("Opened device, pHDev = %p\n",pHDev);
+ /* usb_set_configuration required under win32 */
+ usb_set_configuration(pHDev, dev->config[0].bConfigurationValue);
+
retries = 3;
do
{
Modified: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2008-12-19 06:49:34 UTC (rev 1259)
+++ trunk/src/server/httpd.c 2008-12-19 13:58:15 UTC (rev 1260)
@@ -1,457 +1,457 @@
-/***************************************************************************
- * Copyright (C) 2007,2008 vind Harboe *
- * oyv...@zy... *
- * *
- * Copyright (C) 2008 Free Software Foundation
- * *
- * 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. *
- ***************************************************************************/
-
-/* some bits were copied from ahttpd which is under eCos license and
- * copyright to FSF
- */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "replacements.h"
-
-#include "server.h"
-
-#include "log.h"
-#include "telnet_server.h"
-#include "target.h"
-
-#include <command.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-#include <microhttpd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-#define PAGE_NOT_FOUND "<html><head><title>File not found</title></head><body>File not found</body></html>"
-
-static const char *appendf(const *prev, const char *format, ...)
-{
- va_list ap;
- va_start(ap, format);
- char *string = alloc_vprintf(format, ap);
- va_end(ap);
- char *string2 = NULL;
-
- if (string != NULL)
- {
- string2 = alloc_printf("%s%s", (prev == NULL) ? "" : prev, string);
- }
-
- if (prev != NULL)
- {
- free(prev);
- }
-
- if (string == NULL)
- free(string);
-
- return string2;
-}
-
-static const char *httpd_exec_cgi_tcl_error(Jim_Interp *interp)
-{
- int len, i;
-
- const char *t = NULL;
- t = appendf(t, "<html><body>\n");
-
- t = appendf(t, "Runtime error, file \"%s\", line %d:<br>",
- interp->errorFileName, interp->errorLine);
- t = appendf(t, " %s<br>", Jim_GetString(interp->result, NULL));
- Jim_ListLength(interp, interp->stackTrace, &len);
- for (i = 0; i < len; i += 3)
- {
- Jim_Obj *objPtr;
- const char *proc, *file, *line;
-
- Jim_ListIndex(interp, interp->stackTrace, i, &objPtr, JIM_NONE);
- proc = Jim_GetString(objPtr, NULL);
- Jim_ListIndex(interp, interp->stackTrace, i + 1, &objPtr, JIM_NONE);
- file = Jim_GetString(objPtr, NULL);
- Jim_ListIndex(interp, interp->stackTrace, i + 2, &objPtr, JIM_NONE);
- line = Jim_GetString(objPtr, NULL);
- t = appendf(t, "In procedure '%s' called at file \"%s\", line %s<br>",
- proc, file, line);
- }
- t = appendf(t, "</html></body>\n");
-
- return t;
-}
-
-static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc,
- Jim_Obj * const *argv)
-{
- if (argc != 3)
- {
- Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
- return JIM_ERR;
- }
- char *name = (char*) Jim_GetString(argv[1], NULL);
- char *file = (char*) Jim_GetString(argv[2], NULL);
-
- // Find length
- char *data;
- int actual;
-
- int retcode;
-
- const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
- name);
- retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
- free((void *) script);
- if (retcode != JIM_OK)
- return retcode;
-
- data = Jim_GetString(Jim_GetResult(interp), &actual);
-
- FILE *f;
- f = fopen(file, "wb");
- if (f != NULL)
- {
- int ok;
- ok = fwrite(data, 1, actual, f) == actual;
- fclose(f);
-
- if (!ok)
- {
- Jim_SetResultString(interp, "Could not write to file", -1);
- return JIM_ERR;
- }
- }
- else
- {
- Jim_SetResultString(interp, "Could not create file", -1);
- return JIM_ERR;
- }
- return JIM_OK;
-}
-
-
-int
-httpd_Jim_Command_formfetch(Jim_Interp *interp,
- int argc,
- Jim_Obj *const *argv)
-{
- if (argc!=2)
- {
- Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
- return JIM_ERR;
- }
- char *name = (char*)Jim_GetString(argv[1], NULL);
-
-
- const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
- name);
- int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
- free((void *) script);
- if (retcode != JIM_OK)
- {
- Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
- } else
- {
- Jim_SetResult(interp, Jim_GetResult(interp));
- }
-
- return JIM_OK;
-}
-
-struct httpd_request
-{
- int post;
- struct MHD_PostProcessor *postprocessor;
-
- //Jim_Obj *dict;
-
- int complete; /* did we receive the entire post ? */
-
-};
-
-static void request_completed(void *cls, struct MHD_Connection *connection,
- void **con_cls, enum MHD_RequestTerminationCode toe)
-{
- struct httpd_request *r = (struct httpd_request*) *con_cls;
-
- if (NULL == r)
- return;
-
- if (r->postprocessor)
- {
- MHD_destroy_post_processor(r->postprocessor);
- }
-
- free(r);
- *con_cls = NULL;
-}
-
-/* append to said key in dictonary */
-static void append_key(struct httpd_request *r, const char *key,
- const char *data, size_t off, size_t size)
-{
- Jim_Obj *keyObj = Jim_NewStringObj(interp, key, -1);
- Jim_Obj *value = NULL;
-
- Jim_Obj *dict = Jim_GetVariableStr(interp, "httppostdata", 0);
-
- if (dict!=NULL)
- {
- if (Jim_DictKey(interp, dict, keyObj, &value, 0) != JIM_OK)
- {
- value = NULL;
- }
- }
- if (value == NULL)
- value = Jim_NewStringObj(interp, "", -1);
-
- /* create a new object we append to and insert into this location */
- Jim_Obj *newObj = Jim_NewStringObj(interp, "", -1);
- Jim_AppendObj(interp, newObj, value);
- Jim_AppendString(interp, newObj, data, size);
- /* uhh... use name here of dictionary */
- Jim_SetDictKeysVector(interp, Jim_NewStringObj(interp, "httppostdata", -1), &keyObj, 1, newObj);
-}
-
-/* append data to each key */
-static int iterate_post(void *con_cls, enum MHD_ValueKind kind,
- const char *key, const char *filename, const char *content_type,
- const char *transfer_encoding, const char *data, size_t off,
- size_t size)
-{
- struct httpd_request *r = (struct httpd_request*) con_cls;
-
- append_key(r, key, data, off, size);
-
- return MHD_YES;
-}
-
-static int record_arg(void *cls, enum MHD_ValueKind kind, const char *key,
- const char *value)
-{
- struct httpd_request *r = (struct httpd_request*) cls;
- append_key(r, key, value, 0, strlen(value));
- return MHD_YES;
-}
-
-static int ahc_echo(void * cls, struct MHD_Connection * connection,
- const char * url, const char * method, const char * version,
- const char * upload_data, unsigned int * upload_data_size, void ** ptr)
-{
- struct MHD_Response * response;
- int ret;
-
- int post = 0;
-
- if (0 == strcmp(method, "POST"))
- {
- post = 1;
- }
- else if (0 == strcmp(method, "GET"))
- {
- }
- else
- {
- return MHD_NO; /* unexpected method */
- }
-
- struct httpd_request *r;
- if (*ptr == NULL)
- {
- /* The first time only the headers are valid,
- do not respond in the first round... */
-
- *ptr = malloc(sizeof(struct httpd_request));
- if (*ptr == NULL)
- return MHD_NO;
- memset(*ptr, 0, sizeof(struct httpd_request));
-
- r = (struct httpd_request *) *ptr;
-
- r->post = post;
- Jim_SetVariableStr(interp, "httppostdata", Jim_NewDictObj(interp, NULL, 0));
-
- /* fill in url query strings in dictonary */
- MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND,
- record_arg, r);
-
- if (r->post)
- {
- r->postprocessor = MHD_create_post_processor(connection, 2048
- * 1024, iterate_post, r);
- }
-
- return MHD_YES;
- }
-
- r = (struct httpd_request *) *ptr;
-
- if (r->post)
- {
- /* consume post data */
- if (*upload_data_size)
- {
- MHD_post_process(r->postprocessor, upload_data, *upload_data_size);
- *upload_data_size = 0;
- return MHD_YES;
- }
- else
- {
- }
- } else
- {
- }
-
- /* hand over to request who will be using it. */
- // r->dict = NULL;
-
-
- /* FIX!!!! we need more advanced handling of url's to avoid them
- * being subverted to evil purposes
- */
-
- url++; /* skip '/' */
-
- const char *suffix;
- suffix = strrchr(url, '.');
- if ((suffix != NULL) && (strcmp(suffix, ".tcl") == 0))
- {
- printf("Run tcl %s\n", url);
-
- int retcode;
-
- const char *script = alloc_printf(
- "global httpdata; source {%s}; set httpdata", url);
- retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
- free((void *) script);
-
- if (retcode == JIM_ERR)
- {
- printf("Tcl failed\n");
- const char *t = httpd_exec_cgi_tcl_error(interp);
- if (t == NULL)
- return MHD_NO;
-
- response = MHD_create_response_from_data(strlen(t), (void *) t,
- MHD_YES, MHD_NO);
- ret = MHD_queue_response(connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR, response);
- MHD_destroy_response(response);
- return ret;
- }
- else
- {
- printf("Tcl OK\n");
- /* FIX!!! how to handle mime types??? */
- const char *result;
- int reslen;
- result = Jim_GetString(Jim_GetResult(interp), &reslen);
-
- response = MHD_create_response_from_data(reslen, (void *) result,
- MHD_NO, MHD_YES);
- ret = MHD_queue_response(connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR, response);
- MHD_destroy_response(response);
- return ret;
- }
- }
- else
- {
- void *data;
- int len;
-
- int retval = loadFile(url, &data, &len);
- if (retval != ERROR_OK)
- {
- printf("Did not find %s\n", url);
-
- response = MHD_create_response_from_data(strlen(PAGE_NOT_FOUND),
- (void *) PAGE_NOT_FOUND, MHD_NO, MHD_NO);
- ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response);
- MHD_destroy_response(response);
- return ret;
- }
-
- printf("Serving %s length=%d\n", url, len);
- /* serve file directly */
- response = MHD_create_response_from_data(len, data, MHD_YES, MHD_NO);
- MHD_add_response_header(response, "Content-Type", "image/png");
-
- ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
- MHD_destroy_response(response);
-
- //free(data);
- return ret;
- }
-}
-
-static struct MHD_Daemon * d;
-
-int httpd_start(void)
-{
-
- int port = 8888;
- LOG_USER("Launching httpd server on port %d", port);
- d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, port, NULL, NULL,
- &ahc_echo, NULL, /* could be data for handler, but we only have a single handler, use global variables instead */
- MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL, /* Closure... what's that??? */
- MHD_OPTION_END);
- if (d == NULL)
- return ERROR_FAIL;
-
- Jim_CreateCommand(interp,
- "formfetch",
- httpd_Jim_Command_formfetch,
- NULL,
- NULL);
-
- Jim_CreateCommand(interp,
- "writeform",
- httpd_Jim_Command_writeform,
- NULL,
- NULL);
-
-
- return ERROR_OK;
-}
-
-void httpd_stop(void)
-{
- MHD_stop_daemon(d);
-}
-
-void openocd_sleep_prelude(void)
-{
-}
-
-void openocd_sleep_postlude(void)
-{
-}
-
+/***************************************************************************
+ * Copyright (C) 2007,2008 vind Harboe *
+ * oyv...@zy... *
+ * *
+ * Copyright (C) 2008 Free Software Foundation
+ * *
+ * 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. *
+ ***************************************************************************/
+
+/* some bits were copied from ahttpd which is under eCos license and
+ * copyright to FSF
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "replacements.h"
+
+#include "server.h"
+
+#include "log.h"
+#include "telnet_server.h"
+#include "target.h"
+
+#include <command.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <microhttpd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#define PAGE_NOT_FOUND "<html><head><title>File not found</title></head><body>File not found</body></html>"
+
+static const char *appendf(const *prev, const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ char *string = alloc_vprintf(format, ap);
+ va_end(ap);
+ char *string2 = NULL;
+
+ if (string != NULL)
+ {
+ string2 = alloc_printf("%s%s", (prev == NULL) ? "" : prev, string);
+ }
+
+ if (prev != NULL)
+ {
+ free(prev);
+ }
+
+ if (string == NULL)
+ free(string);
+
+ return string2;
+}
+
+static const char *httpd_exec_cgi_tcl_error(Jim_Interp *interp)
+{
+ int len, i;
+
+ const char *t = NULL;
+ t = appendf(t, "<html><body>\n");
+
+ t = appendf(t, "Runtime error, file \"%s\", line %d:<br>",
+ interp->errorFileName, interp->errorLine);
+ t = appendf(t, " %s<br>", Jim_GetString(interp->result, NULL));
+ Jim_ListLength(interp, interp->stackTrace, &len);
+ for (i = 0; i < len; i += 3)
+ {
+ Jim_Obj *objPtr;
+ const char *proc, *file, *line;
+
+ Jim_ListIndex(interp, interp->stackTrace, i, &objPtr, JIM_NONE);
+ proc = Jim_GetString(objPtr, NULL);
+ Jim_ListIndex(interp, interp->stackTrace, i + 1, &objPtr, JIM_NONE);
+ file = Jim_GetString(objPtr, NULL);
+ Jim_ListIndex(interp, interp->stackTrace, i + 2, &objPtr, JIM_NONE);
+ line = Jim_GetString(objPtr, NULL);
+ t = appendf(t, "In procedure '%s' called at file \"%s\", line %s<br>",
+ proc, file, line);
+ }
+ t = appendf(t, "</html></body>\n");
+
+ return t;
+}
+
+static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc,
+ Jim_Obj * const *argv)
+{
+ if (argc != 3)
+ {
+ Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
+ return JIM_ERR;
+ }
+ char *name = (char*) Jim_GetString(argv[1], NULL);
+ char *file = (char*) Jim_GetString(argv[2], NULL);
+
+ // Find length
+ char *data;
+ int actual;
+
+ int retcode;
+
+ const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
+ name);
+ retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ free((void *) script);
+ if (retcode != JIM_OK)
+ return retcode;
+
+ data = Jim_GetString(Jim_GetResult(interp), &actual);
+
+ FILE *f;
+ f = fopen(file, "wb");
+ if (f != NULL)
+ {
+ int ok;
+ ok = fwrite(data, 1, actual, f) == actual;
+ fclose(f);
+
+ if (!ok)
+ {
+ Jim_SetResultString(interp, "Could not write to file", -1);
+ return JIM_ERR;
+ }
+ }
+ else
+ {
+ Jim_SetResultString(interp, "Could not create file", -1);
+ return JIM_ERR;
+ }
+ return JIM_OK;
+}
+
+
+int
+httpd_Jim_Command_formfetch(Jim_Interp *interp,
+ int argc,
+ Jim_Obj *const *argv)
+{
+ if (argc!=2)
+ {
+ Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
+ return JIM_ERR;
+ }
+ char *name = (char*)Jim_GetString(argv[1], NULL);
+
+
+ const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
+ name);
+ int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ free((void *) script);
+ if (retcode != JIM_OK)
+ {
+ Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
+ } else
+ {
+ Jim_SetResult(interp, Jim_GetResult(interp));
+ }
+
+ return JIM_OK;
+}
+
+struct httpd_request
+{
+ int post;
+ struct MHD_PostProcessor *postprocessor;
+
+ //Jim_Obj *dict;
+
+ int complete; /* did we receive the entire post ? */
+
+};
+
+static void request_completed(void *cls, struct MHD_Connection *connection,
+ void **con_cls, enum MHD_RequestTerminationCode toe)
+{
+ struct httpd_request *r = (struct httpd_request*) *con_cls;
+
+ if (NULL == r)
+ return;
+
+ if (r->postprocessor)
+ {
+ MHD_destroy_post_processor(r->postprocessor);
+ }
+
+ free(r);
+ *con_cls = NULL;
+}
+
+/* append to said key in dictonary */
+static void append_key(struct httpd_request *r, const char *key,
+ const char *data, size_t off, size_t size)
+{
+ Jim_Obj *keyObj = Jim_NewStringObj(interp, key, -1);
+ Jim_Obj *value = NULL;
+
+ Jim_Obj *dict = Jim_GetVariableStr(interp, "httppostdata", 0);
+
+ if (dict!=NULL)
+ {
+ if (Jim_DictKey(interp, dict, keyObj, &value, 0) != JIM_OK)
+ {
+ value = NULL;
+ }
+ }
+ if (value == NULL)
+ value = Jim_NewStringObj(interp, "", -1);
+
+ /* create a new object we append to and insert into this location */
+ Jim_Obj *newObj = Jim_NewStringObj(interp, "", -1);
+ Jim_AppendObj(interp, newObj, value);
+ Jim_AppendString(interp, newObj, data, size);
+ /* uhh... use name here of dictionary */
+ Jim_SetDictKeysVector(interp, Jim_NewStringObj(interp, "httppostdata", -1), &keyObj, 1, newObj);
+}
+
+/* append data to each key */
+static int iterate_post(void *con_cls, enum MHD_ValueKind kind,
+ const char *key, const char *filename, const char *content_type,
+ const char *transfer_encoding, const char *data, size_t off,
+ size_t size)
+{
+ struct httpd_request *r = (struct httpd_request*) con_cls;
+
+ append_key(r, key, data, off, size);
+
+ return MHD_YES;
+}
+
+static int record_arg(void *cls, enum MHD_ValueKind kind, const char *key,
+ const char *value)
+{
+ struct httpd_request *r = (struct httpd_request*) cls;
+ append_key(r, key, value, 0, strlen(value));
+ return MHD_YES;
+}
+
+static int ahc_echo(void * cls, struct MHD_Connection * connection,
+ const char * url, const char * method, const char * version,
+ const char * upload_data, unsigned int * upload_data_size, void ** ptr)
+{
+ struct MHD_Response * response;
+ int ret;
+
+ int post = 0;
+
+ if (0 == strcmp(method, "POST"))
+ {
+ post = 1;
+ }
+ else if (0 == strcmp(method, "GET"))
+ {
+ }
+ else
+ {
+ return MHD_NO; /* unexpected method */
+ }
+
+ struct httpd_request *r;
+ if (*ptr == NULL)
+ {
+ /* The first time only the headers are valid,
+ do not respond in the first round... */
+
+ *ptr = malloc(sizeof(struct httpd_request));
+ if (*ptr == NULL)
+ return MHD_NO;
+ memset(*ptr, 0, sizeof(struct httpd_request));
+
+ r = (struct httpd_request *) *ptr;
+
+ r->post = post;
+ Jim_SetVariableStr(interp, "httppostdata", Jim_NewDictObj(interp, NULL, 0));
+
+ /* fill in url query strings in dictonary */
+ MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND,
+ record_arg, r);
+
+ if (r->post)
+ {
+ r->postprocessor = MHD_create_post_processor(connection, 2048
+ * 1024, iterate_post, r);
+ }
+
+ return MHD_YES;
+ }
+
+ r = (struct httpd_request *) *ptr;
+
+ if (r->post)
+ {
+ /* consume post data */
+ if (*upload_data_size)
+ {
+ MHD_post_process(r->postprocessor, upload_data, *upload_data_size);
+ *upload_data_size = 0;
+ return MHD_YES;
+ }
+ else
+ {
+ }
+ } else
+ {
+ }
+
+ /* hand over to request who will be using it. */
+ // r->dict = NULL;
+
+
+ /* FIX!!!! we need more advanced handling of url's to avoid them
+ * being subverted to evil purposes
+ */
+
+ url++; /* skip '/' */
+
+ const char *suffix;
+ suffix = strrchr(url, '.');
+ if ((suffix != NULL) && (strcmp(suffix, ".tcl") == 0))
+ {
+ printf("Run tcl %s\n", url);
+
+ int retcode;
+
+ const char *script = alloc_printf(
+ "global httpdata; source {%s}; set httpdata", url);
+ retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ free((void *) script);
+
+ if (retcode == JIM_ERR)
+ {
+ printf("Tcl failed\n");
+ const char *t = httpd_exec_cgi_tcl_error(interp);
+ if (t == NULL)
+ return MHD_NO;
+
+ response = MHD_create_response_from_data(strlen(t), (void *) t,
+ MHD_YES, MHD_NO);
+ ret = MHD_queue_response(connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR, response);
+ MHD_destroy_response(response);
+ return ret;
+ }
+ else
+ {
+ printf("Tcl OK\n");
+ /* FIX!!! how to handle mime types??? */
+ const char *result;
+ int reslen;
+ result = Jim_GetString(Jim_GetResult(interp), &reslen);
+
+ response = MHD_create_response_from_data(reslen, (void *) result,
+ MHD_NO, MHD_YES);
+ ret = MHD_queue_response(connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR, response);
+ MHD_destroy_response(response);
+ return ret;
+ }
+ }
+ else
+ {
+ void *data;
+ int len;
+
+ int retval = loadFile(url, &data, &len);
+ if (retval != ERROR_OK)
+ {
+ printf("Did not find %s\n", url);
+
+ response = MHD_create_response_from_data(strlen(PAGE_NOT_FOUND),
+ (void *) PAGE_NOT_FOUND, MHD_NO, MHD_NO);
+ ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response);
+ MHD_destroy_response(response);
+ return ret;
+ }
+
+ printf("Serving %s length=%d\n", url, len);
+ /* serve file directly */
+ response = MHD_create_response_from_data(len, data, MHD_YES, MHD_NO);
+ MHD_add_response_header(response, "Content-Type", "image/png");
+
+ ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
+ MHD_destroy_response(response);
+
+ //free(data);
+ return ret;
+ }
+}
+
+static struct MHD_Daemon * d;
+
+int httpd_start(void)
+{
+
+ int port = 8888;
+ LOG_USER("Launching httpd server on port %d", port);
+ d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, port, NULL, NULL,
+ &ahc_echo, NULL, /* could be data for handler, but we only have a single handler, use global variables instead */
+ MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL, /* Closure... what's that??? */
+ MHD_OPTION_END);
+ if (d == NULL)
+ return ERROR_FAIL;
+
+ Jim_CreateCommand(interp,
+ "formfetch",
+ httpd_Jim_Command_formfetch,
+ NULL,
+ NULL);
+
+ Jim_CreateCommand(interp,
+ "writeform",
+ httpd_Jim_Command_writeform,
+ NULL,
+ NULL);
+
+
+ return ERROR_OK;
+}
+
+void httpd_stop(void)
+{
+ MHD_stop_daemon(d);
+}
+
+void openocd_sleep_prelude(void)
+{
+}
+
+void openocd_sleep_postlude(void)
+{
+}
+
Property changes on: trunk/src/server/httpd.c
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/src/target/interface/rlink.cfg
===================================================================
--- trunk/src/target/interface/rlink.cfg 2008-12-19 06:49:34 UTC (rev 1259)
+++ trunk/src/target/interface/rlink.cfg 2008-12-19 13:58:15 UTC (rev 1260)
@@ -0,0 +1,3 @@
+# rlink interface
+interface rlink
+
Property changes on: trunk/src/target/interface/rlink.cfg
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/tools/rlink_make_speed_table/rlink_make_speed_table
___________________________________________________________________
Name: svn:eol-style
+ LF
Property changes on: trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ LF
Property changes on: trunk/tools/st7_dtc_as/st7_dtc_as
___________________________________________________________________
Name: svn:eol-style
+ LF
Property changes on: trunk/tools/st7_dtc_as/st7_dtc_as.pl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ LF
|
|
From: <oh...@ma...> - 2008-12-19 07:49:38
|
Author: oharboe
Date: 2008-12-19 07:49:34 +0100 (Fri, 19 Dec 2008)
New Revision: 1259
Modified:
trunk/src/helper/types.h
Log:
Dick Hollenbeck <di...@so...> convert macros to inline fn's.
Modified: trunk/src/helper/types.h
===================================================================
--- trunk/src/helper/types.h 2008-12-19 04:25:22 UTC (rev 1258)
+++ trunk/src/helper/types.h 2008-12-19 06:49:34 UTC (rev 1259)
@@ -45,37 +45,68 @@
typedef struct jtag_tap_s jtag_tap_t;
-/* DANGER!!!! here be dragons! Note that the pointer in
- * memory might be unaligned. On some CPU's, i.e. ARM7,
- * the 2 lsb are ignored for 32 bit access, on others
- * it will cause an exception and on e.g. x86, it works
- * the same as if aligned.
+
+/* DANGER!!!! here be dragons!
+ *
+ * Leave these fn's as byte accesses because it is safe
+ * across architectures. Clever usage of 32 bit access
+ * will create problems on some hosts.
+ *
+ * Note that the pointer in memory might be unaligned.
+ *
+ * On some CPU's, i.e. ARM7, the 2 lsb are ignored for 32
+ * bit access, on others it will cause an exception and
+ * on e.g. x86, it works the same as if aligned.
+ *
*/
-#define le_to_h_u32(x) ((u32)((x)[0] | (x)[1] << 8 | (x)[2] << 16 | (x)[3] << 24))
-#define le_to_h_u16(x) ((u16)((x)[0] | (x)[1] << 8))
-#define be_to_h_u32(x) ((u32)((x)[3] | (x)[2] << 8 | (x)[1] << 16 | (x)[0] << 24))
-#define be_to_h_u16(x) ((u16)((x)[1] | (x)[0] << 8))
-#define h_u32_to_le(buf, val) do {\
- (buf)[3] = ((val) & 0xff000000) >> 24;\
- (buf)[2] = ((val) & 0x00ff0000) >> 16;\
- (buf)[1] = ((val) & 0x0000ff00) >> 8;\
- (buf)[0] = ((val) & 0x000000ff);\
-} while (0)
-#define h_u32_to_be(buf, val) do {\
- (buf)[0] = ((val) & 0xff000000) >> 24;\
- (buf)[1] = ((val) & 0x00ff0000) >> 16;\
- (buf)[2] = ((val) & 0x0000ff00) >> 8;\
- (buf)[3] = ((val) & 0x000000ff);\
-} while (0)
-#define h_u16_to_le(buf, val) do {\
- (buf)[1] = ((val) & 0xff00) >> 8;\
- (buf)[0] = ((val) & 0x00ff) >> 0;\
-} while (0)
-#define h_u16_to_be(buf, val) do {\
- (buf)[0] = ((val) & 0xff00) >> 8;\
- (buf)[1] = ((val) & 0x00ff) >> 0;\
-} while (0)
+static inline u32 le_to_h_u32(const u8* buf)
+{
+ return (u32)(buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24);
+}
+static inline u16 le_to_h_u16(const u8* buf)
+{
+ return (u16)(buf[0] | buf[1] << 8);
+}
+
+static inline u32 be_to_h_u32(const u8* buf)
+{
+ return (u32)(buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24);
+}
+
+static inline u16 be_to_h_u16(const u8* buf)
+{
+ return (u16)(buf[1] | buf[0] << 8);
+}
+
+static inline void h_u32_to_le(u8* buf, int val)
+{
+ buf[3] = (u8) (val >> 24);
+ buf[2] = (u8) (val >> 16);
+ buf[1] = (u8) (val >> 8);
+ buf[0] = (u8) (val >> 0);
+}
+
+static inline void h_u32_to_be(u8* buf, int val)
+{
+ buf[0] = (u8) (val >> 24);
+ buf[1] = (u8) (val >> 16);
+ buf[2] = (u8) (val >> 8);
+ buf[3] = (u8) (val >> 0);
+}
+
+static inline void h_u16_to_le(u8* buf, int val)
+{
+ buf[1] = (u8) (val >> 8);
+ buf[0] = (u8) (val >> 0);
+}
+
+static inline void h_u16_to_be(u8* buf, int val)
+{
+ buf[0] = (u8) (val >> 8);
+ buf[1] = (u8) (val >> 0);
+}
+
#endif /* TYPES_H */
|
|
From: <kc...@ma...> - 2008-12-19 05:25:41
|
Author: kc8apf
Date: 2008-12-19 05:25:22 +0100 (Fri, 19 Dec 2008)
New Revision: 1258
Added:
trunk/src/jtag/rlink/
trunk/src/jtag/rlink/Makefile
trunk/src/jtag/rlink/call.m4
trunk/src/jtag/rlink/dtc_cmd.h
trunk/src/jtag/rlink/ep1_cmd.h
trunk/src/jtag/rlink/init.m4
trunk/src/jtag/rlink/rlink.c
trunk/src/jtag/rlink/rlink.h
trunk/src/jtag/rlink/rlink_speed_table.c
trunk/src/jtag/rlink/st7.h
trunk/tools/
trunk/tools/rlink_make_speed_table/
trunk/tools/rlink_make_speed_table/rlink_make_speed_table
trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl
trunk/tools/st7_dtc_as/
trunk/tools/st7_dtc_as/st7_dtc_as
trunk/tools/st7_dtc_as/st7_dtc_as.pl
Modified:
trunk/configure.in
trunk/doc/openocd.texi
trunk/src/Makefile.am
trunk/src/jtag/Makefile.am
trunk/src/jtag/jtag.c
Log:
- rlink interface support from Lou Deluxe <lou...@fi...>
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/configure.in 2008-12-19 04:25:22 UTC (rev 1258)
@@ -116,6 +116,10 @@
AS_HELP_STRING([--enable-jlink], [Enable building support for the Segger J-Link JTAG Programmer]),
[build_jlink=$enableval], [build_jlink=no])
+AC_ARG_ENABLE(rlink,
+ AS_HELP_STRING([--enable-rlink], [Enable building support for the Raisonance RLink JTAG Programmer]),
+ [build_rlink=$enableval], [build_rlink=no])
+
AC_ARG_WITH(ftd2xx,
[AS_HELP_STRING(--with-ftd2xx,
[Where libftd2xx can be found <default=search>])],
@@ -286,6 +290,12 @@
AC_DEFINE(BUILD_JLINK, 0, [0 if you don't want the J-Link JTAG driver.])
fi
+if test $build_rlink = yes; then
+ AC_DEFINE(BUILD_RLINK, 1, [1 if you want the RLink JTAG driver.])
+else
+ AC_DEFINE(BUILD_RLINK, 0, [0 if you don't want the RLink JTAG driver.])
+fi
+
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(openocd, 1.0)
@@ -307,6 +317,7 @@
AM_CONDITIONAL(USBPROG, test $build_usbprog = yes)
AM_CONDITIONAL(OOCD_TRACE, test $build_oocd_trace = yes)
AM_CONDITIONAL(JLINK, test $build_jlink = yes)
+AM_CONDITIONAL(RLINK, test $build_rlink = yes)
AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes)
AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)
Modified: trunk/doc/openocd.texi
===================================================================
--- trunk/doc/openocd.texi 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/doc/openocd.texi 2008-12-19 04:25:22 UTC (rev 1258)
@@ -218,6 +218,8 @@
@option{--enable-presto_ftd2xx}
@item
@option{--enable-jlink}
+@item
+@option{--enable-rlink}
@end itemize
If you want to access the parallel port using the PPDEV interface you have to specify
@@ -322,6 +324,18 @@
@* Link: @url{http://www.iar.com/website1/1.0.1.0/369/1/index.php}
@end itemize
+@section USB RLINK based
+Raisonance has an adapter called @b{RLink}. It exists in a stripped-down form on the STM32 Primer, permanently attached to the JTAG lines. It also exists on the STM32 Primer2, but that is wired for SWD and not JTAG, thus not supported.
+
+@itemize @bullet
+@item @b{Raisonance RLink}
+@* Link: @url{http://www.raisonance.com/products/RLink.php}
+@item @b{STM32 Primer}
+@* Link: @url{http://www.stm32circle.com/resources/stm32primer.php}
+@item @b{STM32 Primer2}
+@* Link: @url{http://www.stm32circle.com/resources/stm32primer2.php}
+@end itemize
+
@section USB Other
@itemize @bullet
@item @b{USBprog}
@@ -1017,6 +1031,11 @@
# jlink interface
interface jlink
@end verbatim
+@b{A Raisonance RLink}
+@verbatim
+# rlink interface
+interface rlink
+@end verbatim
@b{Parallel Port}
@verbatim
interface parport
@@ -1066,6 +1085,9 @@
@item @b{jlink}
@* Segger jlink usb adapter
+
+@item @b{rlink}
+@* Raisonance RLink usb adapter
@comment - End parameters
@end itemize
@comment - End Interface
@@ -1247,6 +1269,7 @@
@item ft2232: 6MHz / (@var{number}+1)
@item amt jtagaccel: 8 / 2**@var{number}
@item jlink: maximum speed in kHz (0-12000), 0 will use RTCK
+@item rlink: 24MHz / @var{number}, but only for certain values of @var{number}
@comment end speed list.
@end itemize
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/Makefile.am 2008-12-19 04:25:22 UTC (rev 1258)
@@ -47,9 +47,13 @@
if JLINK
LIBUSB = -lusb
else
+if RLINK
+LIBUSB = -lusb
+else
LIBUSB =
endif
endif
+endif
if IS_WIN32
if FTD2XXDIR
Modified: trunk/src/jtag/Makefile.am
===================================================================
--- trunk/src/jtag/Makefile.am 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/Makefile.am 2008-12-19 04:25:22 UTC (rev 1258)
@@ -99,7 +99,13 @@
JLINKFILES =
endif
+if RLINK
+RLINKFILES = rlink/rlink.c rlink/rlink_speed_table.c
+else
+RLINKFILES =
+endif
+
libjtag_a_SOURCES = jtag.c $(BITBANGFILES) $(PARPORTFILES) $(DUMMYFILES) $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \
- $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) $(JLINKFILES)
+ $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) $(JLINKFILES) $(RLINKFILES)
noinst_HEADERS = bitbang.h jtag.h
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/jtag.c 2008-12-19 04:25:22 UTC (rev 1258)
@@ -196,6 +196,10 @@
extern jtag_interface_t jlink_interface;
#endif
+#if BUILD_RLINK == 1
+ extern jtag_interface_t rlink_interface;
+#endif
+
jtag_interface_t *jtag_interfaces[] = {
#if BUILD_ECOSBOARD == 1
&zy1000_interface,
@@ -233,6 +237,9 @@
#if BUILD_JLINK == 1
&jlink_interface,
#endif
+#if BUILD_RLINK == 1
+ &rlink_interface,
+#endif
NULL,
};
Added: trunk/src/jtag/rlink/Makefile
===================================================================
--- trunk/src/jtag/rlink/Makefile 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/rlink/Makefile 2008-12-19 04:25:22 UTC (rev 1258)
@@ -0,0 +1,73 @@
+#***************************************************************************
+#* Copyright (C) 2008 Lou Deluxe *
+#* lou...@fi... *
+#* *
+#* 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. *
+#***************************************************************************
+
+TOP = ../../..
+INTERFACE_NAME = rlink
+
+PERL = perl
+M4 = m4
+
+TARGETDIR = ${TOP}/src/target
+TOOLSDIR = ${TOP}/tools
+
+MAKE_SPEED_TABLE = ${TOOLSDIR}/rlink_make_speed_table/rlink_make_speed_table
+ST7_DTC_AS = ${TOOLSDIR}/st7_dtc_as/st7_dtc_as
+
+OPENOCD = ${TOP}/src/openocd
+OPENOCD_CONFIG = -s ${TARGETDIR}
+OPENOCD_CONFIG += -f interface/rlink.cfg
+OPENOCD_CONFIG += -f board/stm32f10x_128k_eval.cfg
+
+PATCHFILE = /tmp/openocd_${INTERFACE_NAME}.diff.gz
+
+# relative to ${TOP}
+SVNADDFILES =
+SVNADDFILES += src/target/interface/rlink.cfg
+SVNADDFILES += src/jtag/${INTERFACE_NAME}.c
+SVNADDFILES += src/jtag/${INTERFACE_NAME}
+
+PRESCALERS = 64 11 8 2
+
+DTCFILES =
+DTCFILES += $(addsuffix _init.dtc, ${PRESCALERS})
+DTCFILES += $(addsuffix _call.dtc, ${PRESCALERS})
+
+default: rlink_speed_table.c clean
+
+%_init.fsm: init.m4
+ ${M4} -P -DSHIFTER_PRESCALER=`echo "$@" | sed -e's/_.*//'` $< > $@
+
+%_call.fsm: call.m4
+ ${M4} -P -DSHIFTER_PRESCALER=`echo "$@" | sed -e's/_.*//'` $< > $@
+
+%.dtc: %.fsm
+ ${ST7_DTC_AS} -b -o $@ -i $< > /dev/null
+
+rlink_speed_table.c: ${DTCFILES}
+ ${MAKE_SPEED_TABLE} ${PRESCALERS} > $@ || rm $@
+
+clean:
+ -rm *.dtc *.fsm
+
+distclean: clean
+
+test: default
+ (cd ${TOP} && (rm src/jtag/${INTERFACE_NAME}.o; ${MAKE}))
+ ${OPENOCD} -d0 ${OPENOCD_CONFIG} -c init -c 'poll off'
Property changes on: trunk/src/jtag/rlink/Makefile
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/src/jtag/rlink/call.m4
===================================================================
--- trunk/src/jtag/rlink/call.m4 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/rlink/call.m4 2008-12-19 04:25:22 UTC (rev 1258)
@@ -0,0 +1,485 @@
+m4_divert(`-1')
+/***************************************************************************
+ * Copyright (C) 2008 Lou Deluxe *
+ * lou...@fi... *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+m4_dnl Setup and hold times depend on SHIFTER_PRESCALER
+m4_define(`SETUP_DELAY_CYCLES', m4_eval(`('SHIFTER_PRESCALER` + 1) / 2'))
+m4_define(`HOLD_DELAY_CYCLES', m4_eval(`'SHIFTER_PRESCALER` / 2'))
+
+m4_dnl Some macros to make nybble handling a little easier
+m4_define(`m4_high_nybble', `m4_eval(`(($1) >> 4) & 0xf')')
+m4_define(`m4_low_nybble', `m4_eval(`($1) & 0xf')')
+
+m4_dnl A macro to generate a number of NOPs depending on the argument
+m4_define(`m4_0_to_5_nops', `m4_ifelse(m4_eval(`($1) >= 1'), 1, ` NOP
+'m4_ifelse(m4_eval(`($1) >= 2'), 1, ` NOP
+'m4_ifelse(m4_eval(`($1) >= 3'), 1, ` NOP
+'m4_ifelse(m4_eval(`($1) >= 4'), 1, ` NOP
+'m4_ifelse(m4_eval(`($1) >= 5'), 1, ` NOP
+')))))')
+
+
+m4_dnl Some macros to facilitate bit-banging delays.
+m4_dnl There are 3 of them. One for self-contained delays, and two for those which must be split between setup and loop to keep from disturbing A at delay time.
+m4_dnl The argument passed to any of them is the number of cycles which the delay should consume.
+
+m4_dnl This one is self-contained.
+
+m4_define(`m4_delay',
+`; delay (m4_eval($1) cycles)'
+`m4_ifelse(m4_eval(`('$1`) < 6'), 1,
+ m4_0_to_5_nops($1)
+,
+ m4_ifelse(m4_eval(`(('$1`) - 3) % 2'), 1, ` NOP')
+ A.H = m4_high_nybble(`(('$1`) - 3) / 2')
+ A.L = m4_low_nybble(`(('$1`) - 3) / 2')
+ Y = A
+ DECY
+ JP -1
+)')
+
+
+m4_dnl These are the setup and loop parts of the split delay.
+m4_dnl The argument passed to both must match for the result to make sense.
+m4_dnl The setup does not figure into the delay. It takes 3 cycles when a loop is used and none if nops are used.
+
+m4_define(`m4_delay_setup',
+`; delay setup (m4_eval($1) cycles)'
+`m4_ifelse(m4_eval(`('$1`) < 6'), 0, ` '
+ A.H = m4_high_nybble(`('$1`) / 2')
+ A.L = m4_low_nybble(`('$1`) / 2')
+ Y = A
+)')
+
+m4_define(`m4_delay_loop',
+`; delay loop (m4_eval($1) cycles)'
+`m4_ifelse(m4_eval(`('$1`) < 6'), 1,
+ m4_0_to_5_nops($1)
+,
+ m4_ifelse(m4_eval(`('$1`) % 2'), 1, ` NOP')
+ DECY
+ JP -1
+)')
+
+m4_dnl These are utility macros for use with delays. Specifically, there is code below which needs some predictability in code size for relative jumps to reach. The m4_delay macro generates an extra NOP when an even delay is needed, and the m4_delay_loop macro generates an extra NOP when an odd delay is needed. Using this for the argument to the respective macro rounds up the argument so that the extra NOP will not be generated. There is also logic built in to cancel the rounding when the result is small enough that a loop would not be generated.
+
+m4_define(`m4_delay_loop_round_up', `m4_ifelse(m4_eval($1` < 6'), 1, $1, m4_eval(`(('$1`) + 1) / 2 * 2'))')
+m4_define(`m4_delay_round_up', `m4_ifelse(m4_eval($1` < 6'), 1, $1, m4_eval(`(('$1`) / 2 * 2) + 1'))')
+
+
+m4_divert(`0')m4_dnl
+
+;------------------------------------------------------------------------------
+:opcode_error
+; This is at address 0x00 in case of empty LUT entries
+ STATUS STOP ERROR
+
+;------------------------------------------------------------------------------
+; Command interpreter at address 0x01 because it is branched to a lot and having it be 0x01 means we can use X for it, which is already used for other purposes which want it to be 1.
+; Assumes X is 1
+; Assumes ADR_BUFFER0 points to the next command byte
+; Stores the current command byte in CMP01
+
+:command_interpreter
+ A = DATA_BUFFER0
+ ADR_BUFFER0 += X
+ CMP01 = A ; store the current command for later
+
+ EXCHANGE ; put MSN into LSN
+ A.H = 0xc ; lookup table at 0x1550 + 0xc0 = 0x1610
+
+ ; branch to address in lookup table
+ Y = A
+ A = <Y>
+ BRANCH
+
+;------------------------------------------------------------------------------
+; LUT for high nybble
+
+;LUT; c0 opcode_error
+;LUT; c1 opcode_shift_tdi_andor_tms_bytes
+;LUT; c2 opcode_shift_tdi_andor_tms_bytes
+;LUT; c3 opcode_shift_tdi_andor_tms_bytes
+;LUT; c4 opcode_shift_tdo_bytes
+;LUT; c5 opcode_error
+;LUT; c6 opcode_shift_tdio_bytes
+;LUT; c7 opcode_error
+;LUT; c8 opcode_shift_tms_tdi_bit_pair
+;LUT; c9 opcode_shift_tms_bits
+;LUT; ca opcode_error
+;LUT; cb opcode_error
+;LUT; cc opcode_error
+;LUT; cd opcode_error
+;LUT; ce opcode_shift_tdio_bits
+;LUT; cf opcode_stop
+
+
+;------------------------------------------------------------------------------
+; USB/buffer handling
+;
+
+;ENTRY; download entry_download
+
+opcode_stop:
+opcode_next_buffer:
+ ; pointer to completion flag
+ A.H = 0xf
+ A.L = 0xf
+ Y = A
+
+ A = OR_MPEG ; buffer indicator from previous iteration
+ <Y> = A ; either indicator will have bit 0 set
+ BSET 1 ; was buffer 1 previously current?
+; A.H = 0 ; already zero from OR_MPEG
+ JP opcode_next_buffer_0
+
+opcode_next_buffer_1:
+ A.L = 0x1 ; ack buffer 0
+ BUFFER_MNGT = A
+; A.H = 0x0 ; already zero from BUFFER_MNGT
+ A.L = 0x3 ; Input buffer 1 = 0x1850 (0x0300)
+ JP +4
+
+opcode_next_buffer_0:
+ A.L = 0x2 ; ack buffer 1
+ BUFFER_MNGT = A
+entry_download:
+ A = X ; Input buffer 0 = 0x1650 (0x0100)
+
+ ADR_BUFFER01 = A
+ OR_MPEG = A ; store for next iteration
+
+ A.L = 0x0
+ BUFFER_MNGT = A ; finish acking previous buffer
+ Y = A
+ ADR_BUFFER00 = A
+ ADR_BUFFER11 = A
+
+ A.H = 0x4 ; Output buffer = 0x1590 (0x0040)
+ ADR_BUFFER10 = A
+
+ EXCHANGE ; 0x04
+ X = A ; for the spin loop below
+
+ ; pointer to status in shared memory
+ DECY ; setting to 0 above and decrementing here saves a byte
+
+ ; wait until a command buffer is available
+ A = BUFFER_MNGT ; spin while neither of bits 2 or 3 are set
+ CP A<X ; this is slightly faster and smaller than trying to AND and compare the result, and it lets us just use the nybble-swapped 0x40 from the output buffer setup.
+ JP -2
+ <Y> = A ; update status once done spinning
+
+ ; restore X, since we used it
+; A.H = 0 ; high nybble of BUFFER_MNGT will always be 0 the way we use it
+ A.L = 1
+ X = A
+
+ ; go to command interpreter
+ BRANCH
+
+
+;;------------------------------------------------------------------------------
+;:opcode_stop
+;;
+;
+; ; Ack buffer 0 in download mode
+; A.L = 0x1
+; BUFFER_MNGT = A
+;
+; STATUS STOP
+
+
+;------------------------------------------------------------------------------
+:opcode_shift_tdi_andor_tms_bytes
+;
+
+ A = CMP01 ; bits 3..0 contain the number of bytes to shift - 1
+ A.H = 0
+ Y = A ; loop counter
+
+ A = CMP01
+ EXCHANGE
+ CMP01 = A ; we're interested in bits in the high nybble
+
+opcode_shift_tdi_andor_tms_bytes__loop:
+
+; set tdi to supplied byte or zero
+ A = CMP01
+ BSET 1
+ JP +4
+ A.H = 0
+ A.L = 0
+ JP +3
+ A = DATA_BUFFER0
+ ADR_BUFFER0 += X
+ SHIFT_MPEG = A
+
+; set tms to supplied byte or zero
+ A = CMP01
+ BCLR 0
+ JP +5
+ A = DATA_BUFFER0
+ ADR_BUFFER0 += X
+ SHIFT_CARD = A
+ SHIFT CARD OUT=>PIN0
+
+; run both shifters as nearly simultaneously as possible
+ SHIFT MPEG OUT=>PIN1
+
+ A = CTRL_FCI
+ EXCHANGE
+ BCLR 3
+ JP -3
+
+ DECY
+ JP opcode_shift_tdi_andor_tms_bytes__loop
+
+ A = X
+ BRANCH
+
+
+;------------------------------------------------------------------------------
+:opcode_shift_tdo_bytes
+;
+
+ A = CMP01 ; bits 3..0 contain the number of bytes to shift - 1
+ A.H = 0
+ Y = A ; loop counter
+
+opcode_shift_tdo_bytes__loop:
+ SHIFT MPEG PIN0=>IN
+
+ A = CTRL_FCI
+ EXCHANGE
+ BCLR 3
+ JP -3
+
+ ; put shifted byte into output buffer
+ A = SHIFT_MPEG
+ DATA_BUFFER1 = A
+ ADR_BUFFER1 += X
+
+ DECY
+ JP opcode_shift_tdo_bytes__loop
+
+ A = X
+ BRANCH
+
+
+;------------------------------------------------------------------------------
+:opcode_shift_tdio_bytes
+;
+
+ A = CMP01 ; bits 3..0 contain the number of bytes to shift - 1
+ A.H = 0
+ CMP10 = A ; byte loop counter
+
+ A.H = opcode_shift_tdio_bytes__sub_return
+ A.L = opcode_shift_tdio_bytes__sub_return
+ CMP00 = A ; return address
+
+opcode_shift_tdio_bytes__loop:
+ A.H = 0
+ A.L = 7
+ CMP11 = A ; always use 8 bits
+
+ JP sub_shift_tdio_bits
+opcode_shift_tdio_bytes__sub_return:
+
+ A = CMP10 ; byte loop counter
+ CP A=>X
+ CLC
+ A -= X
+ CMP10 = A
+ JP opcode_shift_tdio_bytes__loop
+
+ A = X
+;DR_MPEG = A ; return TCK low, as str912 reset halt seems to require it
+ BRANCH
+
+
+;------------------------------------------------------------------------------
+:opcode_shift_tdio_bits
+;
+
+ A = CMP01 ; bits 2..0 contain the number of bits to shift - 1
+ A.H = 0
+ BCLR 3 ; set TMS=1 if bit 3 was set
+ CMP11 = A ; bit loop counter
+
+ A.H = opcode_shift_tdio_bits__sub_return
+ A.L = opcode_shift_tdio_bits__sub_return
+ CMP00 = A ; return address
+
+ JP sub_shift_tdio_bits
+ A.L = 0x1 ; TMS=1
+ DR_CARD = A
+ JP sub_shift_tdio_bits
+opcode_shift_tdio_bits__sub_return:
+
+ A = X
+;DR_MPEG = A ; return TCK low, as str912 reset halt seems to require it
+ BRANCH
+
+
+;------------------------------------------------------------------------------
+:sub_shift_tdio_bits
+;
+
+ A = DATA_BUFFER0 ; get byte from input buffer
+ ADR_BUFFER0 += X
+ MASK = A ; put it in MASK where bit routine will use it
+
+:sub_shift_tdio_bits__loop
+m4_delay_setup(m4_delay_loop_round_up(SETUP_DELAY_CYCLES - 1))
+
+ A = MASK ; shift TDO into and TDI out of MASK via carry
+ A += MASK
+ MASK = A
+
+ ; shifting out TDI
+ A.L = 0x2 ; TCK=0, TDI=1
+ CP CARRY
+ JP +2
+ A.L = 0x0 ; TCK=0, TDI=0
+ DR_MPEG = A
+
+m4_delay_loop(m4_delay_loop_round_up(SETUP_DELAY_CYCLES - 1))
+
+ BSET 2 ; TCK high
+ DR_MPEG = A
+
+ A = DR_MPEG ; set carry bit to TDO
+ CLC
+ BCLR 0
+ JP +2
+ SEC
+
+m4_delay(HOLD_DELAY_CYCLES - 10)
+
+ A = CMP11 ; bit loop counter
+ Y = A ; use Y to avoid corrupting carry bit with subtract
+ DECY
+ A = Y
+ CMP11 = A
+ JP :sub_shift_tdio_bits__loop
+
+ ; shift last TDO bit into result
+ A = MASK
+ A += MASK
+ DATA_BUFFER1 = A
+ ADR_BUFFER1 += X
+
+ A = CMP00 ; return to caller
+ BRANCH
+
+
+;------------------------------------------------------------------------------
+:opcode_shift_tms_tdi_bit_pair
+;
+
+; set TMS line manually
+ A = CMP01 ; bits 3..0 contain TDI and TMS bits and whether to return TDO
+ BSET 0 ; TMS bit
+ A.L = 0x1 ; TMS=1
+ JP +2
+ A.L = 0x0 ; TMS=0
+ DR_CARD = A
+
+; stuff command buffer with bitmap of single TDI bit
+ A = CMP01
+ BSET 1 ; TDI bit
+ A.H = 0x8 ; TDI=1
+ JP +2
+ A.H = 0x0 ; TDI=0
+ ADR_BUFFER0 -= X
+ DATA_BUFFER0 = A
+
+ A.H = 0
+ A.L = 0
+ CMP11 = A ; bit loop counter (only doing one bit)
+
+ A.H = opcode_shift_tms_tdi_bit_pair__sub_return
+ A.L = opcode_shift_tms_tdi_bit_pair__sub_return
+ CMP00 = A ; return address
+
+; jump this way due to relative jump range issues
+ A.H = sub_shift_tdio_bits
+ A.L = sub_shift_tdio_bits
+ BRANCH
+opcode_shift_tms_tdi_bit_pair__sub_return:
+
+ A = CMP01
+ BSET 3 ; bit says whether to return TDO
+ JP +2
+ ADR_BUFFER1 -= X ; subroutine returns it, so undo that
+
+ A = X
+ DR_MPEG = A ; return TCK low, as str912 reset halt seems to require it
+ BRANCH
+
+
+;------------------------------------------------------------------------------
+:opcode_shift_tms_bits
+;
+
+ A = CMP01 ; bits 3..0 contain the number of bits to shift - 1 (only 1-8 bits is valid... no checking, just improper operation)
+ A.H = 0
+ CMP11 = A ; bit loop counter
+
+ A = DATA_BUFFER0 ; get byte from input buffer
+ ADR_BUFFER0 += X
+ MASK = A ; The byte we'll be shifting
+
+:opcode_shift_tms_bits__loop
+m4_delay_setup(SETUP_DELAY_CYCLES - 1)
+
+ A = MASK ; shift TMS out of MASK via carry
+ A += MASK
+ MASK = A
+
+ ; shifting out TMS
+ A.L = 0x1 ; TCK=0, TDI=0, TMS=1
+ CP CARRY
+ JP +2
+ A.L = 0x0 ; TCK=0, TDI=0, TMS=0
+ DR_CARD = A
+ DR_MPEG = A
+
+m4_delay_loop(SETUP_DELAY_CYCLES - 1)
+
+ BSET 2 ; TCK high
+ DR_MPEG = A
+
+m4_delay(HOLD_DELAY_CYCLES - 10)
+
+ A = CMP11 ; bit loop counter
+ CP A=>X
+ CLC
+ A -= X
+ CMP11 = A
+ JP :opcode_shift_tms_bits__loop
+
+ A = X
+ DR_MPEG = A ; return TCK low, as str912 reset halt seems to require it
+ BRANCH
+
+
Added: trunk/src/jtag/rlink/dtc_cmd.h
===================================================================
--- trunk/src/jtag/rlink/dtc_cmd.h 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/rlink/dtc_cmd.h 2008-12-19 04:25:22 UTC (rev 1258)
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * Copyright (C) 2008 Lou Deluxe *
+ * lou...@fi... *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+/* A command position with the high nybble of 0x0 is reserved for an error condition. If executed, it stops the DTC and raises the ERROR flag */
+
+#define DTC_CMD_SHIFT_TMS_BYTES(bytes) ((0x1 << 4) | ((bytes) - 1))
+/* Shift 1-16 bytes out TMS. TDI is 0. */
+/* Bytes to shift follow. */
+
+#define DTC_CMD_SHIFT_TDI_BYTES(bytes) ((0x2 << 4) | ((bytes) - 1))
+/* Shift 1-16 bytes out TDI. TMS is 0. */
+/* Bytes to shift follow. */
+
+#define DTC_CMD_SHIFT_TDI_AND_TMS_BYTES(bytes) ((0x3 << 4) | ((bytes) - 1))
+/* Shift 1-16 byte pairs out TDI and TMS. */
+/* Byte pairs to shift follow in TDI, TMS order. */
+
+#define DTC_CMD_SHIFT_TDO_BYTES(bytes) ((0x4 << 4) | ((bytes) - 1))
+/* Shift 1-16 bytes in TDO. TMS is unaffected. */
+/* Reply buffer contains bytes shifted in. */
+
+#define DTC_CMD_SHIFT_TDIO_BYTES(bytes) ((0x6 << 4) | ((bytes) - 1))
+/* Shift 1-16 bytes out TDI and in TDO. TMS is unaffected. */
+
+#define DTC_CMD_SHIFT_TMS_TDI_BIT_PAIR(tms, tdi, tdo) ((0x8 << 4) | ( \
+ (tms) ? (1 << 0) : 0 \
+ ) | ( \
+ (tdi) ? (1 << 1) : 0 \
+ ) | ( \
+ (tdo) ? (1 << 3) : 0 \
+ ))
+/* Single bit shift. */
+/* tms and tdi are the levels shifted out on TMS and TDI, respectively. */
+/* tdo indicates whether a byte will be returned in the reply buffer with its least significant bit set to reflect TDO */
+/* Care should be taken when tdo is zero, as the underlying code actually does put that byte in the reply buffer. Setting tdo to zero just moves the pointer back. The result is that if this command is executed when the reply buffer is already full, a byte will be written erroneously to memory not belonging to the reply buffer. This could be worked around at the expense of DTC code space and speed. */
+
+#define DTC_CMD_SHIFT_TMS_BITS(bits) ((0x9 << 4) | ((bits) - 1))
+/* Shift 1-8 bits out TMS. */
+/* Bits to be shifted out are left justified in the following byte. */
+
+#define DTC_CMD_SHIFT_TDIO_BITS(bits) ((0xe << 4) | ((bits) - 1))
+/* Shift 1-8 bits out TDI and in TDO, TMS is unaffected. */
+/* Bits to be shifted out are left justified in the following byte. */
+/* Bits shifted in are right justified in the byte placed in the reply buffer. */
+
+
+#define DTC_CMD_STOP (0xf << 4)
+/* Stop processing the command buffer and wait for the next one. */
+/* A shared status byte is updated with bit 0 set when this has happened, and it is cleared when a new command buffer becomes ready. The host can poll that byte to see when it is safe to read a reply. */
Property changes on: trunk/src/jtag/rlink/dtc_cmd.h
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/src/jtag/rlink/ep1_cmd.h
===================================================================
--- trunk/src/jtag/rlink/ep1_cmd.h 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/rlink/ep1_cmd.h 2008-12-19 04:25:22 UTC (rev 1258)
@@ -0,0 +1,57 @@
+/***************************************************************************
+ * Copyright (C) 2008 Lou Deluxe *
+ * lou...@fi... *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+/*
+ * Command opcodes that can be sent over endpoint 1.
+ * This codifies information provided by Rob Brown <ro...@co...>.
+ * The buffer can contain several of these, but only one which returns data.
+ * Some of these opcodes have arguments, which follow immediately.
+ * If shorter than the packet size, trailing positions should be zero-filled.
+ */
+
+/* LED update enables:
+ * When enabled, each LED is updated automatically.
+ * When not enabled, each LED can be controlled manually with EP1_CMD_SET_PORTD_LEDS.
+ */
+#define EP1_CMD_LEDUE_BOTH (0x05)
+/* EP1_CMD_LEDUE_NONE has the side effect of turning the LEDs on */
+#define EP1_CMD_LEDUE_NONE (0x06)
+#define EP1_CMD_LEDUE_ERROR (0x17)
+#define EP1_CMD_LEDUE_BUSY (0x18)
+
+#define EP1_CMD_DTC_STOP (0x0b)
+#define EP1_CMD_DTC_LOAD (0x0c)
+#define EP1_CMD_DTC_CALL (0x0d)
+#define EP1_CMD_SET_UPLOAD (0x0f)
+#define EP1_CMD_SET_DOWNLOAD (0x10)
+#define EP1_CMD_DTC_WAIT (0x12)
+#define EP1_CMD_DTC_GET_STATUS (0x15)
+/* a quick way to just read back one byte */
+#define EP1_CMD_DTC_GET_CACHED_STATUS (0x16)
+
+/* Writes upper 2 bits port D with argument */
+#define EP1_CMD_SET_PORTD_UPPER (0x19)
+/* Writes lower 2 bits (BUSY and ERROR) of port D with argument */
+#define EP1_CMD_SET_PORTD_LEDS (0x1a)
+
+#define EP1_CMD_MEMORY_READ (0x28)
+#define EP1_CMD_MEMORY_WRITE (0x29)
+#define EP1_CMD_GET_FWREV (0xfe)
+#define EP1_CMD_GET_SERIAL (0xff)
Property changes on: trunk/src/jtag/rlink/ep1_cmd.h
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/src/jtag/rlink/init.m4
===================================================================
--- trunk/src/jtag/rlink/init.m4 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/rlink/init.m4 2008-12-19 04:25:22 UTC (rev 1258)
@@ -0,0 +1,74 @@
+m4_divert(`-1')
+/***************************************************************************
+ * Copyright (C) 2008 Lou Deluxe *
+ * lou...@fi... *
+ * *
+ * 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. *
+ ***************************************************************************/
+
+m4_undefine(`CTRL_MPEG_L')
+m4_undefine(`CTRL_CARD_L')
+
+m4_ifelse(SHIFTER_PRESCALER, 1, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x0')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 2, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x2')')
+ m4_define(`CTRL_CARD_L', `m4_eval(`0x8 | 0x1')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 8, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x3')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 11, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x4')')
+')
+m4_ifelse(SHIFTER_PRESCALER, 64, `
+ m4_define(`CTRL_MPEG_L', `m4_eval(`0x8 | 0x7')')
+')
+
+m4_ifdef(`CTRL_MPEG_L',,`
+ m4_errprint(`SHIFTER_PRESCALER was not defined with a supported value
+') m4_m4exit(`1')
+')
+
+m4_divert(`0')m4_dnl
+
+init:
+ A.H = 0
+
+ A.L = 0
+
+ DR_MPEG = A ; TDI and TCK start out low
+ DR_CARD = A ; TMS starts out low
+
+ A.L = 0x6
+
+ CTRL_FCI = A ; MPEG and CARD driven by FCI
+ DDR_MPEG = A ; TDI and TCK are outputs
+
+ A.L = 0x1
+
+ X = A ; X == 1
+ DDR_CARD = A ; TMS is output
+
+ A.L = CTRL_MPEG_L
+ CTRL_MPEG = A
+m4_ifdef(`CTRL_CARD_L',
+` A.L = 'CTRL_CARD_L`
+')m4_dnl
+ CTRL_CARD = A
+
+ STATUS STOP
Added: trunk/src/jtag/rlink/rlink.c
===================================================================
--- trunk/src/jtag/rlink/rlink.c 2008-12-17 14:55:12 UTC (rev 1257)
+++ trunk/src/jtag/rlink/rlink.c 2008-12-19 04:25:22 UTC (rev 1258)
@@ -0,0 +1,1808 @@
+/***************************************************************************
+ * Copyright (C) 2005 by Dominic Rath *
+ * Dom...@gm... *
+ * *
+ * Copyright (C) 2007,2008 vind Harboe *
+ * oyv...@zy... *
+ * *
+ * Copyright (C) 2008 Rob Brown, Lou Deluxe *
+ * ro...@co..., lou...@fi... *
+ * *
+ * 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. *
+ ***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* system includes */
+#include <errno.h>
+#include <string.h>
+#include <usb.h>
+
+/* project specific includes */
+#include "log.h"
+#include "types.h"
+#include "jtag.h"
+#include "configuration.h"
+#include "rlink.h"
+#include "st7.h"
+#include "ep1_cmd.h"
+#include "dtc_cmd.h"
+
+
+/* This feature is made useless by running the DTC all the time. When automatic, the LED is on whenever the DTC is running. Otherwise, USB messages are sent to turn it on and off. */
+#undef AUTOMATIC_BUSY_LED
+
+/* This feature may require derating the speed due to reduced hold time. */
+#undef USE_HARDWARE_SHIFTER_FOR_TMS
+
+
+#define INTERFACE_NAME "RLink"
+
+#define USB_IDVENDOR (0x138e)
+#define USB_IDPRODUCT (0x9000)
+
+#define USB_EP1OUT_ADDR (0x01)
+#define USB_EP1OUT_SIZE (16)
+#define USB_EP1IN_ADDR (USB_EP1OUT_ADDR | 0x80)
+#define USB_EP1IN_SIZE (USB_EP1OUT_SIZE)
+
+#define USB_EP2OUT_ADDR (0x02)
+#define USB_EP2OUT_SIZE (64)
+#define USB_EP2IN_ADDR (USB_EP2OUT_ADDR | 0x80)
+#define USB_EP2IN_SIZE (USB_EP2OUT_SIZE)
+#define USB_EP2BANK_SIZE (512)
+
+#define USB_TIMEOUT_MS (3 * 1000)
+
+#define DTC_STATUS_POLL_BYTE (ST7_USB_BUF_EP0OUT + 0xff)
+
+
+/* Symbolic names for some pins */
+#define ST7_PA_NJTAG_TRST ST7_PA1
+#define ST7_PA_NRLINK_RST ST7_PA3
+#define ST7_PA_NLINE_DRIVER_ENABLE ST7_PA5
+
+/* mask for negative-logic pins */
+#define ST7_PA_NUNASSERTED (0 \
+ | ST7_PA_NJTAG_TRST \
+ | ST7_PA_NRLINK_RST \
+ | ST7_PA_NLINE_DRIVER_ENABLE \
+)
+
+#define ST7_PD_NBUSY_LED ST7_PD0
+#define ST7_PD_NERROR_LED ST7_PD1
+#define ST7_PD_NRUN_LED ST7_PD7
+
+#define ST7_PE_ADAPTER_SENSE_IN ST7_PE3
+#define ST7_PE_ADAPTER_SENSE_OUT ST7_PE4
+
+static usb_dev_handle *pHDev;
+
+
+/*
+ * ep1 commands are up to USB_EP1OUT_SIZE bytes in length.
+ * This function takes care of zeroing the unused bytes before sending the packet.
+ * Any reply packet is not handled by this function.
+ */
+static
+int
+ep1_generic_commandl(
+ usb_dev_handle *pHDev,
+ size_t length,
+ ...
+) {
+ uint8_t usb_buffer[USB_EP1OUT_SIZE];
+ uint8_t *usb_buffer_p;
+ va_list ap;
+ int usb_ret;
+
+ if(length > sizeof(usb_buffer)) {
+ length = sizeof(usb_buffer);
+ }
+
+ usb_buffer_p = usb_buffer;
+
+ va_start(ap, length);
+ while(length > 0) {
+ *usb_buffer_p++ = va_arg(ap, int);
+ length--;
+ }
+
+ memset(
+ usb_buffer_p,
+ 0,
+ sizeof(usb_buffer) - (usb_buffer_p - usb_buffer)
+ );
+
+ usb_ret = usb_bulk_write(
+ pHDev,
+ USB_EP1OUT_ADDR,
+ usb_buffer, sizeof(usb_buffer),
+ USB_TIMEOUT_MS
+ );
+
+ return(usb_ret);
+}
+
+
+
+#if 0
+static
+ssize_t
+ep1_memory_read(
+ usb_dev_handle *pHDev,
+ uint16_t addr,
+ size_t length,
+ uint8_t *buffer
+) {
+ uint8_t usb_buffer[USB_EP1OUT_SIZE];
+ int usb_ret;
+ size_t remain;
+ ssize_t count;
+
+ usb_buffer[0] = EP1_CMD_MEMORY_READ;
+ memset(
+ usb_buffer + 4,
+ 0,
+ sizeof(usb_buffer) - 4
+ );
+
+ remain = length;
+ count = 0;
+
+ while(remain) {
+ if(remain > sizeof(usb_buffer)) {
+ length = sizeof(usb_buffer);
+ } else {
+ length = remain;
+ }
+
+ usb_buffer[1] = addr >> 8;
+ usb_buffer[2] = addr;
+ usb_buffer[3] = length;
+
+ usb_ret = usb_bulk_write(
+ pHDev, USB_EP1OUT_ADDR,
+ usb_buffer, sizeof(usb_buffer),
+ USB_TIMEOUT_MS
+ );
+
+ if(usb_ret < sizeof(usb_buffer)) {
+ break;
+ }
+
+ usb_ret = usb_bulk_read(
+ pHDev, USB_EP1IN_ADDR,
+ buffer, length,
+ USB_TIMEOUT_MS
+ );
+
+ if(usb_ret < length) {
+ break;
+ }
+
+ addr += length;
+ buffer += length;
+ count += length;
+ remain -= length;
+ }
+
+ return(count);
+}
+#endif
+
+
+
+static
+ssize_t
+ep1_memory_write(
+ usb_dev_handle *pHDev,
+ uint16_t addr,
+ size_t length,
+ uint8_t const *buffer
+) {
+ uint8_t usb_buffer[USB_EP1OUT_SIZE];
+ int usb_ret;
+ size_t remain;
+ ssize_t count;
+
+ usb_buffer[0] = EP1_CMD_MEMORY_WRITE;
+
+ remain = length;
+ count = 0;
+
+ while(remain) {
+ if(remain > (sizeof(usb_buffer) - 4)) {
+ length = (sizeof(usb_buffer) - 4);
+ } else {
+ length = remain;
+ }
+
+ usb_buffer[1] = addr >> 8;
+ usb_buffer[2] = addr;
+ usb_buffer[3] = length;
+ memcpy(
+ usb_buffer + 4,
+ buffer,
+ length
+ );
+ memset(
+ usb_buffer + 4 + length,
+ 0,
+ sizeof(usb_buffer) - 4 - length
+ );
+
+ usb_ret = usb_bulk_write(
+ pHDev, USB_EP1OUT_ADDR,
+ usb_buffer, sizeof(usb_buffer),
+ USB_TIMEOUT_MS
+ );
+
+ if(usb_ret < sizeof(usb_buffer)) {
+ break;
+ }
+
+ addr += length;
+ buffer += length;
+ count += length;
+ remain -= length;
+ }
+
+ return(count);
+}
+
+
+#if 0
+static
+ssize_t
+ep1_memory_writel(
+ usb_dev_handle *pHDev,
+ uint16_t addr,
+ size_t length,
+ ...
+) {
+ uint8_t buffer[USB_EP1OUT_SIZE - 4];
+ uint8_t *buffer_p;
+ va_list ap;
+ size_t remain;
+
+ if(length > sizeof(buffer)) {
+ length = sizeof(buffer);
+ }
+
+ remain = length;
+ buffer_p = buffer;
+
+ va_start(ap, length);
+ while(remain > 0) {
+ *buffer_p++ = va_arg(ap, int);
+ remain--;
+ }
+
+ return(ep1_memory_write(pHDev, addr, length, buffer));
+}
+#endif
+
+
+#define DTCLOAD_COMMENT (0)
+#define DTCLOAD_ENTRY (1)
+#define DTCLOAD_LOAD (2)
+#define DTCLOAD_RUN (3)
+#define DTCLOAD_LUT_START (4)
+#define DTCLOAD_LUT (5)
+
+#define DTC_LOAD_BUFFER ST7_USB_BUF_EP2UIDO
+
+/* This gets set by the DTC loader */
+static uint8_t dtc_entry_download;
+
+
+/* The buffer is specially formatted to represent a valid image to load into the DTC. */
+static
+int
+dtc_load_from_buffer(
+ usb_dev_handle *pHDev,
+ const u8 *buffer,
+ size_t length
+) {
+ struct header_s {
+ u8 type;
+ u8 length;
+ };
+
+ int usb_err;
+ struct header_s *header;
+ u8 lut_start = 0xc0;
+
+ dtc_entry_download = 0;
+
+ /* Stop the DTC before loading anything. */
+ usb_err = ep1_generic_commandl(
+ pHDev, 1,
+ EP1_CMD_DTC_STOP
+ );
+ if(usb_err < 0) return(usb_err);
+
+ while(length) {
+ if(length < sizeof(*header)) {
+ LOG_ERROR("Malformed DTC image\n");
+ exit(1);
+ }
+
+ header = (struct header_s *)buffer;
+ buffer += sizeof(*header);
+ length -= sizeof(*header);
+
+ if(length < header->length + 1) {
+ LOG_ERROR("Malformed DTC image\n");
+ exit(1);
+ }
+
+ switch(header->type) {
+ case DTCLOAD_COMMENT:
+ break;
+
+ case DTCLOAD_ENTRY:
+ /* store entry addresses somewhere */
+ if(!strncmp("download", buffer + 1, 8)) {
+ dtc_entry_download = buffer[0];
+ }
+ break;
+
+ case DTCLOAD_LOAD:
+ /* Send the DTC program to ST7 RAM. */
+ usb_err = ep1_memory_write(
+ pHDev,
+ DTC_LOAD_BUFFER,
+ header->length + 1, buffer
+ );
+ if(usb_err < 0) return(usb_err);
+
+ /* Load it into the DTC. */
+ usb_err = ep1_generic_commandl(
+ pHDev, 3,
+ EP1_CMD_DTC_LOAD,
+ (DTC_LOAD_BUFFER >> 8),
+ DTC_LOAD_BUFFER
+ );
+ if(usb_err < 0) return(usb_err);
+
+ break;
+
+ case DTCLOAD_RUN:
+ usb_err = ep1_generic_commandl(
+ pHDev, 3,
+ EP1_CMD_DTC_CALL,
+ buffer[0],
+ EP1_CMD_DTC_WAIT
+ );
+ if(usb_err < 0) return(usb_err);
+
+ break;
+
+ case DTCLOAD_LUT_START:
+ lut_start = buffer[0];
+ break;
+
+ case DTCLOAD_LUT:
+ usb_err = ep1_memory_write(
+ pHDev,
+ ST7_USB_BUF_EP0OUT + lut_start,
+ header->length + 1, buffer
+ );
+ if(usb_err < 0) return(usb_err);
+ break;
+
+ default:
+ LOG_ERROR("Invalid DTC image record type: 0x%02x\n", header->type);
+ exit(1);
+ break;
+ }
+
+ buffer += (header->length + 1);
+ length -= (header->length + 1);
+ }
+
+ return(0);
+}
+
+
+/*
+ * Start the DTC running in download mode (waiting for 512 byte command packets on ep2).
+ */
+static
+int
+dtc_start_download(
+) {
+ int usb_err;
+ u8 ep2txr;
+
+ /* set up for download mode and make sure EP2 is set up to transmit */
+ usb_err = ep1_generic_commandl(
+ pHDev, 7,
+
+ EP1_CMD_DTC_STOP,
+ EP1_CMD_SET_UPLOAD,
+ EP1_CMD_SET_DOWNLOAD,
+ EP1_CMD_MEMORY_READ, /* read EP2TXR for its data toggle */
+ ST7_EP2TXR >> 8,
+ ST7_EP2TXR,
+ 1
+ );
+ if(usb_err < 0) return(usb_err);
+
+ /* read back ep2txr */
+ usb_err = usb_bulk_read(
+ pHDev, USB_EP1IN_ADDR,
+ &ep2txr, 1,
+ USB_TIMEOUT_MS
+ );
+ if(usb_err < 0) return(usb_err);
+
+ usb_err = ep1_generic_commandl(
+ pHDev, 13,
+
+ EP1_CMD_MEMORY_WRITE, /* preinitialize poll byte */
+ DTC_STATUS_POLL_BYTE >> 8,
+ DTC_STATUS_POLL_BYTE,
+ 1,
+ 0x00,
+ EP1_CMD_MEMORY_WRITE, /* set EP2IN to return data */
+ ST7_EP2TXR >> 8,
+ ST7_EP2TXR,
+ 1,
+ (ep2txr & ST7_EP2TXR_DTOG_TX) | ST7_EP2TXR_STAT_VALID,
+ EP1_CMD_DTC_CALL, /* start running the DTC */
+ dtc_entry_download,
+ EP1_CMD_DTC_GET_CACHED_STATUS
+ );
+ if(usb_err < 0) return(usb_err);
+
+ /* wait for completion */
+ usb_err = usb_bulk_read(
+ pHDev, USB_EP1IN_ADDR,
+ &ep2txr, 1,
+ USB_TIMEOUT_MS
+ );
+
+ return(usb_err);
+}
+
+
+static
+int
+dtc_run_download(
+ usb_dev_handle *pHDev,
+ u8 *command_buffer,
+ int command_buffer_size,
+ u8 *reply_buffer,
+ int reply_buffer_size
+) {
+ u8 ep2_buffer[USB_EP2IN_SIZE];
+ int usb_err;
+ int i;
+
+ LOG_DEBUG(": %d/%d\n", command_buffer_size, reply_buffer_size);
+
+ usb_err = usb_bulk_write(
+ pHDev,
+ USB_EP2OUT_ADDR,
+ command_buffer, USB_EP2BANK_SIZE,
+ USB_TIMEOUT_MS
+ );
+ if(usb_err < 0) return(usb_err);
+
+
+ /* Wait for DTC to finish running command buffer */
+ for(i = 5;;) {
+ usb_err = ep1_generic_commandl(
+ pHDev, 4,
+
+ EP1_CMD_MEMORY_READ,
+ DTC_STATUS_POLL_BYTE >> 8,
+ DTC_STATUS_POLL_BYTE,
+ 1
+ );
+ if(usb_err < 0) return(usb_err);
+
+ usb_err = usb_bulk_read(
+ pHDev,
+ USB_EP1IN_ADDR,
+ ep2_buffer, 1,
+ USB_TIMEOUT_MS
+ );
+ if(usb_err < 0) return(usb_err);
+
+ if(ep2_buffer[0] & 0x01) break;
+
+ if(!--i) {
+ LOG_ERROR("%s, %d: too many retries waiting for DTC status\n",
+ __FILE__, __LINE__
+ );
+ return(-ETIMEDOUT);
+ }
+ }
+
+
+ if(!reply_buffer) reply_buffer_size = 0;
+ if(reply_buffer_size) {
+ usb_err = usb_bulk_read(
+ pHDev,
+ USB_EP2IN_ADDR,
+ ep2_buffer, sizeof(ep2_buffer),
+ USB_TIMEOUT_MS
+ );
+
+ if(usb_err < (int)sizeof(ep2_buffer)) {
+ LOG_ERROR("%s, %d: Read of endpoint 2 returned %d\n",
+ __FILE__, __LINE__, usb_err
+ );
+ return(usb_err);
+ }
+
+ memcpy(reply_buffer, ep2_buffer, reply_buffer_size);
+
+ }
+
+ return(usb_err);
+}
+
+
+/*
+ * The dtc reply queue is a singly linked list that describes what to do with the reply packet that comes from the DTC. Only SCAN_IN and SCAN_IO generate these entries.
+ */
+
+typedef
+struct dtc_reply_queue_entry_s {
+ struct dtc_reply_queue_entry_s *next;
+ jtag_command_t *cmd; /* the command that resulted in this entry */
+
+ struct {
+ u8 *buffer; /* the scan buffer */
+ int size; /* size of the scan buffer in bits */
+ int offset; /* how many bits were already done before this? */
+ int length; /* how many bits are processed in this operation? */
+ enum scan_type type; /* SCAN_IN/SCAN_OUT/SCAN_IO */
+ } scan;
+} dtc_reply_queue_entry_t;
+
+
+/*
+ * The dtc_queue consists of a buffer of pending commands and a reply queue.
+ * rlink_scan and tap_state_run add to the command buffer and maybe to the reply queue.
+ */
+
+static
+struct {
+ dtc_reply_queue_entry_t *rq_head;
+ dtc_reply_queue_entry_t *rq_tail;
+ int cmd_index;
+ int reply_index;
+ u8 cmd_buffer[USB_EP2BANK_SIZE];
+} dtc_queue;
+
+
+/*
+ * The tap state queue is for accumulating TAP state changes wiithout needlessly flushing the dtc_queue. When it fills or is run, it adds the accumulated bytes to the dtc_queue.
+ */
+
+static
+struct {
+ int length;
+ u32 buffer;
+} tap_state_queue;
+
+
+
+static
+int
+dtc_queue_init(
+) {
+ dtc_queue.rq_head = NULL;
+ dtc_queue.rq_tail = NULL;
+ dtc_queue.cmd_index = 0;
+ dtc_queue.reply_index = 0;
+ return(0);
+}
+
+
+static
+inline
+dtc_reply_queue_entry_t *
+dtc_queue_enqueue_reply(
+ enum scan_type type,
+ u8 *buffer,
+ int size,
+ int offset,
+ int length,
+ jtag_command_t *cmd
+) {
+ dtc_reply_queue_entry_t *rq_entry;
+
+ rq_entry = malloc(sizeof(dtc_reply_queue_entry_t));
+ if(rq_entry != NULL) {
+ rq_entry->scan.type = type;
+ rq_entry->scan.buffer = buffer;
+ rq_entry->scan.size = size;
+ rq_entry->scan.offset = offset;
+ rq_entry->scan.length = length;
+ rq_entry->cmd = cmd;
+ rq_entry->next = NULL;
+
+ if(dtc_queue.rq_head == NULL)
+ dtc_queue.rq_head = rq_entry;
+ else
+ dtc_queue.rq_tail->next = rq_entry;
+
+ dtc_queue.rq_tail = rq_entry;
+ }
+
+ return(rq_entry);
+}
+
+
+/*
+ * Running the queue means that any pending command buffer is run and any reply data dealt with. The command buffer is then cleared for subsequent processing.
+ * The queue is automatically run by append when it is necessary to get space for the append.
+*/
+
+static
+int
+dtc_queue_run(
+) {
+ dtc_reply_queue_entry_t *rq_p, *rq_next;
+ int retval;
+ int usb_err;
+ int bit_cnt;
+ int x;
+ u8 *dtc_p, *tdo_p;
+ u8 dtc_mask, tdo_mask;
+ u8 reply_buffer[USB_EP2IN_SIZE];
+
+ retval = ERROR_OK;
+
+ if(dtc_queue.cmd_index < 1) return(retval);
+
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] = DTC_CMD_STOP;
+
+ /* run the cmd */
+ if(dtc_queue.rq_head == NULL) {
+ usb_err = dtc_run_download(pHDev,
+ dtc_queue.cmd_buffer, dtc_queue.cmd_index,
+ NULL, 0
+ );
+ if(usb_err < 0) {
+ LOG_ERROR("dtc_run_download: %s\n", usb_strerror());
+ exit(1);
+ }
+ } else {
+ usb_err = dtc_run_download(pHDev,
+ dtc_queue.cmd_buffer, dtc_queue.cmd_index,
+ reply_buffer, dtc_queue.reply_index
+ );
+ if(usb_err < 0) {
+ LOG_ERROR("dtc_run_download: %s\n", usb_strerror());
+ exit(1);
+ } else {
+ /* process the reply, which empties the reply queue and frees its entries */
+ dtc_p = reply_buffer;
+
+ /* The rigamarole with the masks and doing it bit-by-bit is due to the fact that the scan buffer is LSb-first and the DTC code is MSb-first for hardware reasons. It was that or craft a function to do the reversal, and that wouldn't work with bit-stuffing (supplying extra bits to use mostly byte operations), or any other scheme which would throw the byte alignment off. */
+
+ for(
+ rq_p = dtc_queue.rq_head;
+ rq_p != NULL;
+ rq_p = rq_next
+ ) {
+ tdo_p = rq_p->scan.buffer + (rq_p->scan.offset / 8);
+ tdo_mask = 1 << (rq_p->scan.offset % 8);
+
+
+ bit_cnt = rq_p->scan.length;
+ if(bit_cnt >= 8) {
+ /* bytes */
+
+ dtc_mask = 1 << (8 - 1);
+
+ for(
+ ;
+ bit_cnt;
+ bit_cnt--
+ ) {
+ if(*dtc_p & dtc_mask) {
+ *tdo_p |= tdo_mask;
+ } else {
+ *tdo_p &=~ tdo_mask;
+ }
+
+ dtc_mask >>= 1;
+ if(dtc_mask == 0) {
+ dtc_p++;
+ dtc_mask = 1 << (8 - 1);
+ }
+
+ tdo_mask <<= 1;
+ if(tdo_mask == 0) {
+ tdo_p++;
+ tdo_mask = 1;
+ }
+ }
+ } else {
+ /* extra bits or last bit */
+
+ x = *dtc_p++;
+ if((
+ rq_p->scan.type == SCAN_IN
+ ) && (
+ rq_p->scan.offset != rq_p->scan.size - 1
+ )) {
+ /* extra bits were sent as a full byte with padding on the end */
+ dtc_mask = 1 << (8 - 1);
+ } else {
+ dtc_mask = 1 << (bit_cnt - 1);
+ }
+
+ for(
+ ;
+ bit_cnt;
+ bit_cnt--
+ ) {
+ if(x & dtc_mask) {
+ *tdo_p |= tdo_mask;
+ } else {
+ *tdo_p &=~ tdo_mask;
+ }
+
+ dtc_mask >>= 1;
+
+ tdo_mask <<= 1;
+ if(tdo_mask == 0) {
+ tdo_p++;
+ tdo_mask = 1;
+ }
+
+ }
+ }
+
+ if((rq_p->scan.offset + rq_p->scan.length) >= rq_p->scan.size) {
+ /* feed scan buffer back into openocd and free it */
+ if(jtag_read_buffer(rq_p->scan.buffer, rq_p->cmd->cmd.scan) != ERROR_OK) {
+ retval = ERROR_JTAG_QUEUE_FAILED;
+ }
+ free(rq_p->scan.buffer);
+ }
+
+ rq_next = rq_p->next;
+ free(rq_p);
+ }
+ dtc_queue.rq_head = NULL;
+ dtc_queue.rq_tail = NULL;
+ }
+
+ }
+
+
+ /* reset state for new appends */
+ dtc_queue.cmd_index = 0;
+ dtc_queue.reply_index = 0;
+
+ return(retval);
+}
+
+
+
+static
+int
+tap_state_queue_init(
+) {
+ tap_state_queue.length = 0;
+ tap_state_queue.buffer = 0;
+ return(0);
+}
+
+
+static
+int
+tap_state_queue_run(
+) {
+ int i;
+ int bits;
+ u8 byte;
+ int retval;
+
+ retval = 0;
+ if(!tap_state_queue.length) return(retval);
+ bits = 1;
+ byte = 0;
+ for(i = tap_state_queue.length; i--;) {
+
+ byte <<= 1;
+ if(tap_state_queue.buffer & 1) {
+ byte |= 1;
+ }
+ if((bits >= 8) || !i) {
+ byte <<= (8 - bits);
+
+ /* make sure there's room for stop, byte op, and one byte */
+ if(dtc_queue.cmd_index >= (sizeof(dtc_queue.cmd_buffer) - (1 + 1 + 1))) {
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ DTC_CMD_STOP;
+ dtc_queue_run();
+ }
+
+#ifdef USE_HARDWARE_SHIFTER_FOR_TMS
+ if(bits == 8) {
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ DTC_CMD_SHIFT_TMS_BYTES(1);
+ } else {
+#endif
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ DTC_CMD_SHIFT_TMS_BITS(bits);
+#ifdef USE_HARDWARE_SHIFTER_FOR_TMS
+ }
+#endif
+
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ byte;
+
+ byte = 0;
+ bits = 1;
+ } else {
+ bits++;
+ }
+
+ tap_state_queue.buffer >>= 1;
+ }
+ retval = tap_state_queue_init();
+ return(retval);
+}
+
+
+static
+int
+tap_state_queue_append(
+ u8 tms
+) {
+ int retval;
+
+ if(tap_state_queue.length >= sizeof(tap_state_queue.buffer) * 8) {
+ retval = tap_state_queue_run();
+ if(retval != 0) return(retval);
+ }
+
+ if(tms) {
+ tap_state_queue.buffer |= (1 << tap_state_queue.length);
+ }
+ tap_state_queue.length++;
+
+ return(0);
+}
+
+
+static
+void rlink_end_state(enum tap_state state)
+{
+ if (tap_move_map[state] != -1)
+ end_state = state;
+ else
+ {
+ LOG_ERROR("BUG: %i is not a valid end state", state);
+ exit(-1);
+ }
+}
+
+
+static
+void rlink_state_move(void) {
+
+ int i=0, tms=0;
+ u8 tms_scan = TAP_MOVE(cur_state, end_state);
+
+ for (i = 0; i < 7; i++)
+ {
+ tms = (tms_scan >> i) & 1;
+ tap_state_queue_append(tms);
+ }
+
+ cur_state = end_state;
+}
+
+static
+void rlink_path_move(pathmove_command_t *cmd)
+{
+ int num_states = cmd->num_states;
+ int state_count;
+ int tms = 0;
+
+ state_count = 0;
+ while (num_states)
+ {
+ if (tap_transitions[cur_state].low == cmd->path[state_count])
+ {
+ tms = 0;
+ }
+ else if (tap_transitions[cur_state].high == cmd->path[state_count])
+ {
+ tms = 1;
+ }
+ else
+ {
+ LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition", jtag_state_name(cur_state), jtag_state_name(cmd->path[state_count]));
+ exit(-1);
+ }
+
+ tap_state_queue_append(tms);
+
+ cur_state = cmd->path[state_count];
+ state_count++;
+ num_states--;
+ }
+
+ end_state = cur_state;
+}
+
+
+static
+void rlink_runtest(int num_cycles)
+{
+ int i;
+
+ enum tap_state saved_end_state = end_state;
+
+ /* only do a state_move when we're not already in RTI */
+ if (cur_state != TAP_IDLE)
+ {
+ rlink_end_state(TAP_IDLE);
+ rlink_state_move();
+ }
+
+ /* execute num_cycles */
+ for (i = 0; i < num_cycles; i++)
+ {
+ tap_state_queue_append(0);
+ }
+
+ /* finish in end_state */
+ rlink_end_state(saved_end_state);
+ if (cur_state != end_state)
+ rlink_state_move();
+}
+
+
+/* (1) assert or (0) deassert reset lines */
+static
+void rlink_reset(int trst, int srst)
+{
+ u8 bitmap;
+ int usb_err;
+
+ bitmap = ((~(ST7_PA_NLINE_DRIVER_ENABLE)) & ST7_PA_NUNASSERTED);
+
+ if(trst) {
+ bitmap &= ~ST7_PA_NJTAG_TRST;
+ }
+ if(srst) {
+ bitmap &= ~ST7_PA_NRLINK_RST;
+ }
+
+ usb_err = ep1_generic_commandl(
+ pHDev, 5,
+
+ EP1_CMD_MEMORY_WRITE,
+ ST7_PADR >> 8,
+ ST7_PADR,
+ 1,
+ bitmap
+ );
+ if(usb_err < 0) {
+ LOG_ERROR("%s: %s\n", __func__, usb_strerror());
+ exit(1);
+ }
+}
+
+
+static
+int
+rlink_scan(
+ jtag_command_t *cmd,
+ enum scan_type type,
+ u8 *buffer,
+ int scan_size
+) {
+ int ir_scan;
+ enum tap_state saved_end_state;
+ int byte_bits;
+ int extra_bits;
+ int chunk_bits;
+ int chunk_bytes;
+ int x;
+
+ int tdi_bit_offset;
+ u8 tdi_mask, *tdi_p;
+ u8 dtc_mask;
+ dtc_reply_queue_entry_t *rq_entry;
+
+ if(scan_size < 1) {
+ LOG_ERROR("scan_size cannot be less than 1 bit\n");
+ exit(1);
+ }
+
+ ir_scan = cmd->cmd.scan->ir_scan;
+
+ /* Move to the proper state before starting to shift TDI/TDO. */
+ if (!(
+ (!ir_scan && (cur_state == TAP_DRSHIFT))
+ ||
+ (ir_scan && (cur_state == TAP_IRSHIFT))
+ )) {
+ saved_end_state = end_state;
+ rlink_end_state(ir_scan ? TAP_IRSHIFT : TAP_DRSHIFT);
+ rlink_state_move();
+ rlink_end_state(saved_end_state);
+ }
+
+ tap_state_queue_run();
+
+
+#if 0
+ printf("scan_size = %d, type=0x%x\n", scan_size, type);
+ {
+ int i;
+
+ /* clear unused bits in scan buffer for ease of debugging */
+ /* (it makes diffing output easier) */
+ buffer[scan_size / 8] &= ((1 << ((scan_size - 1) % 8) + 1) - 1);
+
+ printf("before scan:");
+ for(i = 0; i < (scan_size + 7) / 8; i++) {
+ printf(" %02x", buffer[i]);
+ }
+ printf("\n");
+ }
+#endif
+
+ /* The number of bits that can be shifted as complete bytes */
+ byte_bits = (int)(scan_size - 1) / 8 * 8;
+ /* The number of bits left over, not counting the last bit */
+ extra_bits = (scan_size - 1) - byte_bits;
+
+ tdi_bit_offset = 0;
+ tdi_p = buffer;
+ tdi_mask = 1;
+
+ if(extra_bits && (type == SCAN_OUT)) {
+ /* Schedule any extra bits into the DTC command buffer, padding as needed */
+ /* For SCAN_OUT, this comes before the full bytes so the (leading) padding bits will fall off the end */
+ /* make sure there's room for stop, byte op, and one byte */
+ if(
+ (dtc_queue.cmd_index >= sizeof(dtc_queue.cmd_buffer) - (1 + 1 + 1))
+ ) {
+ dtc_queue_run();
+ }
+
+ x = 0;
+ dtc_mask = 1 << (extra_bits - 1);
+
+ while(extra_bits--) {
+ if(*tdi_p & tdi_mask) {
+ x |= dtc_mask;
+ }
+
+ dtc_mask >>= 1;
+
+ tdi_mask <<= 1;
+ if(tdi_mask == 0) {
+ tdi_p++;
+ tdi_mask = 1;
+ }
+ }
+
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ DTC_CMD_SHIFT_TDI_BYTES(1);
+
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] = x;
+ }
+
+ /* Loop scheduling full bytes into the DTC command buffer */
+ while(byte_bits) {
+ if(type == SCAN_IN) {
+ /* make sure there's room for stop and byte op */
+ x = (dtc_queue.cmd_index >= sizeof(dtc_queue.cmd_buffer) - (1 + 1));
+ } else {
+ /* make sure there's room for stop, byte op, and at least one byte */
+ x = (dtc_queue.cmd_index >= sizeof(dtc_queue.cmd_buffer) - (1 + 1 + 1));
+ }
+
+ if(type != SCAN_OUT) {
+ /* make sure there's room for at least one reply byte */
+ x |= (dtc_queue.reply_index >= USB_EP2IN_SIZE - (1));
+ }
+
+ if(x) {
+ dtc_queue_run();
+ }
+
+ chunk_bits = byte_bits;
+ /* we can only use up to 16 bytes at a time */
+ if(chunk_bits > (16 * 8)) chunk_bits = (16 * 8);
+
+ if(type != SCAN_IN) {
+ /* how much is there room for, considering stop and byte op? */
+ x = (sizeof(dtc_queue.cmd_buffer) - (dtc_queue.cmd_index + 1 + 1)) * 8;
+ if(chunk_bits > x) chunk_bits = x;
+ }
+
+ if(type != SCAN_OUT) {
+ /* how much is there room for in the reply buffer? */
+ x = (USB_EP2IN_SIZE - dtc_queue.reply_index) * 8;
+ if(chunk_bits > x) chunk_bits = x;
+ }
+
+ /* so the loop will end */
+ byte_bits -= chunk_bits;
+
+ if(type != SCAN_OUT) {
+ if(dtc_queue_enqueue_reply(
+ type, buffer, scan_size, tdi_bit_offset,
+ chunk_bits,
+ cmd
+ ) == NULL) {
+ LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+ exit(1);
+ }
+
+ tdi_bit_offset += chunk_bits;
+ }
+
+ /* chunk_bits is a multiple of 8, so there are no rounding issues. */
+ chunk_bytes = chunk_bits / 8;
+
+ switch(type) {
+ case SCAN_IN:
+ x = DTC_CMD_SHIFT_TDO_BYTES(chunk_bytes);
+ break;
+ case SCAN_OUT:
+ x = DTC_CMD_SHIFT_TDI_BYTES(chunk_bytes);
+ break;
+ default:
+ x = DTC_CMD_SHIFT_TDIO_BYTES(chunk_bytes);
+ break;
+ }
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] = x;
+
+ if(type != SCAN_IN) {
+ x = 0;
+ dtc_mask = 1 << (8 - 1);
+
+ while(chunk_bits--) {
+ if(*tdi_p & tdi_mask) {
+ x |= dtc_mask;
+ }
+
+ dtc_mask >>= 1;
+ if(dtc_mask == 0) {
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] = x;
+ dtc_queue.reply_index++;
+ x = 0;
+ dtc_mask = 1 << (8 - 1);
+ }
+
+ tdi_mask <<= 1;
+ if(tdi_mask == 0) {
+ tdi_p++;
+ tdi_mask = 1;
+ }
+ }
+ }
+ }
+
+ if(extra_bits && (type != SCAN_OUT)) {
+ /* Schedule any extra bits into the DTC command buffer */
+ /* make sure there's room for stop, byte op, and one byte */
+ if(
+ (dtc_queue.cmd_index >= sizeof(dtc_queue.cmd_buffer) - (1 + 1 + 1))
+ ||
+ (dtc_queue.reply_index >= USB_EP2IN_SIZE - (1))
+ ) {
+ dtc_queue_run();
+ }
+
+ if(dtc_queue_enqueue_reply(
+ type, buffer, scan_size, tdi_bit_offset,
+ extra_bits,
+ cmd
+ ) == NULL) {
+ LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+ exit(1);
+ }
+
+ tdi_bit_offset += extra_bits;
+
+ if(type == SCAN_IN) {
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ DTC_CMD_SHIFT_TDO_BYTES(1);
+
+ } else {
+ dtc_queue.cmd_buffer[dtc_queue.cmd_index++] =
+ DTC_CM...
[truncated message content] |
|
From: <oh...@ma...> - 2008-12-17 15:55:16
|
Author: oharboe
Date: 2008-12-17 15:55:12 +0100 (Wed, 17 Dec 2008)
New Revision: 1257
Modified:
trunk/src/jtag/zy1000.c
trunk/src/openocd.c
zy1000/trunk/build/tcl/openocd.cfg
Log:
check syntax for init/version
Modified: trunk/src/jtag/zy1000.c
===================================================================
--- trunk/src/jtag/zy1000.c 2008-12-17 14:07:03 UTC (rev 1256)
+++ trunk/src/jtag/zy1000.c 2008-12-17 14:55:12 UTC (rev 1257)
@@ -355,7 +355,7 @@
int zy1000_init(void)
{
- LOG_ERROR("%s\n", ZYLIN_OPENOCD_VERSION);
+ LOG_USER("%s", ZYLIN_OPENOCD_VERSION);
ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x30); // Turn on LED1 & LED2
Modified: trunk/src/openocd.c
===================================================================
--- trunk/src/openocd.c 2008-12-17 14:07:03 UTC (rev 1256)
+++ trunk/src/openocd.c 2008-12-17 14:55:12 UTC (rev 1257)
@@ -82,6 +82,9 @@
/* Give TELNET a way to find out what version this is */
int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
+ if (argc!=0)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+
command_print(cmd_ctx, OPENOCD_VERSION);
return ERROR_OK;
@@ -123,6 +126,10 @@
/* OpenOCD can't really handle failure of this command. Patches welcome! :-) */
int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
+
+ if (argc!=0)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+
int retval;
static int initialized=0;
if (initialized)
Modified: zy1000/trunk/build/tcl/openocd.cfg
===================================================================
--- zy1000/trunk/build/tcl/openocd.cfg 2008-12-17 14:07:03 UTC (rev 1256)
+++ zy1000/trunk/build/tcl/openocd.cfg 2008-12-17 14:55:12 UTC (rev 1257)
@@ -90,6 +90,16 @@
}
+add_help_text ls "<directory> - lists files in directory"
+add_help_text reboot "reboots ZY1000 unit"
+add_help_text mac "prints MAC number of ZY1000 unit"
+add_help_text ip "print current IP number of ZY1000 unit"
+
+
+proc zy1000_flash {} {
+ set t [lindex 0 [ocd_flash_banks]]
+ return $t(base)
+}
interface ZY1000
telnet_port 23
@@ -105,18 +115,7 @@
# Here we do *not* catch the error since we want the file & line number to appear
# in the log
script /config/settings/openocd.cfg
-init result
+init
# Startup was OK
set startup_status 1
-
-add_help_text ls "<directory> - lists files in directory"
-add_help_text reboot "reboots ZY1000 unit"
-add_help_text mac "prints MAC number of ZY1000 unit"
-add_help_text ip "print current IP number of ZY1000 unit"
-
-
-proc zy1000_flash {} {
- set t [lindex 0 [ocd_flash_banks]]
- return $t(base)
-}
\ No newline at end of file
|
|
From: <oh...@ma...> - 2008-12-17 15:07:05
|
Author: oharboe
Date: 2008-12-17 15:07:03 +0100 (Wed, 17 Dec 2008)
New Revision: 1256
Modified:
trunk/src/jtag/zy1000.c
zy1000/trunk/build/menu/zy1000menu.xml
zy1000/trunk/build/tcl/index.tcl
Log:
more houskeeping
Modified: trunk/src/jtag/zy1000.c
===================================================================
--- trunk/src/jtag/zy1000.c 2008-12-17 13:39:40 UTC (rev 1255)
+++ trunk/src/jtag/zy1000.c 2008-12-17 14:07:03 UTC (rev 1256)
@@ -319,6 +319,25 @@
}
+static int
+zylinjtag_Jim_Command_powerstatus(Jim_Interp *interp,
+ int argc,
+ Jim_Obj * const *argv)
+{
+ if (argc != 1)
+ {
+ Jim_WrongNumArgs(interp, 1, argv, "powerstatus");
+ return JIM_ERR;
+ }
+
+ cyg_uint32 status;
+ ZY1000_PEEK(ZY1000_JTAG_BASE+0x10, status);
+
+ Jim_SetResult(interp, Jim_NewIntObj(interp, (status&0x80)!=0));
+
+ return JIM_OK;
+}
+
int zy1000_register_commands(struct command_context_s *cmd_ctx)
{
register_command(cmd_ctx, NULL, "power", handle_power_command, COMMAND_ANY,
@@ -326,11 +345,14 @@
register_command(cmd_ctx, NULL, "zy1000_version", handle_zy1000_version_command,
COMMAND_EXEC, "show zy1000 version numbers");
+ Jim_CreateCommand(interp, "powerstatus", zylinjtag_Jim_Command_powerstatus, NULL, NULL);
return ERROR_OK;
}
+
+
int zy1000_init(void)
{
LOG_ERROR("%s\n", ZYLIN_OPENOCD_VERSION);
Modified: zy1000/trunk/build/menu/zy1000menu.xml
===================================================================
--- zy1000/trunk/build/menu/zy1000menu.xml 2008-12-17 13:39:40 UTC (rev 1255)
+++ zy1000/trunk/build/menu/zy1000menu.xml 2008-12-17 14:07:03 UTC (rev 1256)
@@ -85,7 +85,7 @@
<tr>
<td class="fontbigger" style="height:20px;padding-right:10px;">Target power:
<tcl>
- if {[expr [peek 0x08000010] & 0x80]!=0} {
+ if {[powerstatus]!=0} {
append buffer "no"
} else {
append buffer "yes"
Modified: zy1000/trunk/build/tcl/index.tcl
===================================================================
--- zy1000/trunk/build/tcl/index.tcl 2008-12-17 13:39:40 UTC (rev 1255)
+++ zy1000/trunk/build/tcl/index.tcl 2008-12-17 14:07:03 UTC (rev 1256)
@@ -187,7 +187,7 @@
<tr>
<td class="fontbigger" style="height:20px;padding-right:10px;">Target power:
<tcl>
- if {[expr [peek 0x08000010] & 0x80]!=0} {
+ if {[powerstatus]!=0} {
append buffer "no"
} else {
append buffer "yes"
|
|
From: <oh...@ma...> - 2008-12-17 14:39:48
|
Author: oharboe
Date: 2008-12-17 14:39:40 +0100 (Wed, 17 Dec 2008)
New Revision: 1255
Modified:
trunk/src/ecosboard.c
trunk/src/helper/ioutil.c
trunk/src/server/telnet_server.c
Log:
houskeeping
Modified: trunk/src/ecosboard.c
===================================================================
--- trunk/src/ecosboard.c 2008-12-17 12:50:07 UTC (rev 1254)
+++ trunk/src/ecosboard.c 2008-12-17 13:39:40 UTC (rev 1255)
@@ -419,61 +419,7 @@
return JIM_OK;
}
-static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc,
- Jim_Obj * const *argv)
-{
- Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0);
-
- Jim_AppendString(httpstate.jim_interp, tclOutput, hwaddr, strlen(hwaddr));
-
- Jim_SetResult(interp, tclOutput);
-
- return JIM_OK;
-}
-
-static int zylinjtag_Jim_Command_ip(Jim_Interp *interp, int argc,
- Jim_Obj * const *argv)
-{
- Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0);
-
- struct ifaddrs *ifa = NULL, *ifp = NULL;
-
- if (getifaddrs(&ifp) < 0)
- {
- return JIM_ERR;
- }
-
- for (ifa = ifp; ifa; ifa = ifa->ifa_next)
- {
- char ip[200];
- socklen_t salen;
-
- if (ifa->ifa_addr->sa_family == AF_INET)
- salen = sizeof(struct sockaddr_in);
- else if (ifa->ifa_addr->sa_family == AF_INET6)
- salen = sizeof(struct sockaddr_in6);
- else
- continue;
-
- if (getnameinfo(ifa->ifa_addr, salen, ip, sizeof(ip), NULL, 0,
- NI_NUMERICHOST) < 0)
- {
- continue;
- }
-
- Jim_AppendString(httpstate.jim_interp, tclOutput, ip, strlen(ip));
- break;
-
- }
-
- freeifaddrs(ifp);
-
- Jim_SetResult(interp, tclOutput);
-
- return JIM_OK;
-}
-
extern Jim_Interp *interp;
static void zylinjtag_startNetwork()
@@ -506,10 +452,6 @@
zylinjtag_Jim_Command_reboot, NULL, NULL);
Jim_CreateCommand(httpstate.jim_interp, "threads",
zylinjtag_Jim_Command_threads, NULL, NULL);
- Jim_CreateCommand(httpstate.jim_interp, "mac", zylinjtag_Jim_Command_mac,
- NULL, NULL);
- Jim_CreateCommand(httpstate.jim_interp, "ip", zylinjtag_Jim_Command_ip,
- NULL, NULL);
Jim_CreateCommand(httpstate.jim_interp, "format_jffs2",
zylinjtag_Jim_Command_format_jffs2, NULL, NULL);
Modified: trunk/src/helper/ioutil.c
===================================================================
--- trunk/src/helper/ioutil.c 2008-12-17 12:50:07 UTC (rev 1254)
+++ trunk/src/helper/ioutil.c 2008-12-17 13:39:40 UTC (rev 1255)
@@ -63,6 +63,8 @@
#include <string.h>
+#include <ifaddrs.h>
+
#include <unistd.h>
#include <stdio.h>
@@ -557,6 +559,120 @@
return JIM_OK;
}
+
+/* not so pretty code to fish out ip number*/
+static int zylinjtag_Jim_Command_ip(Jim_Interp *interp, int argc,
+ Jim_Obj * const *argv)
+{
+ Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0);
+
+ struct ifaddrs *ifa = NULL, *ifp = NULL;
+
+ if (getifaddrs(&ifp) < 0)
+ {
+ return JIM_ERR;
+ }
+
+ for (ifa = ifp; ifa; ifa = ifa->ifa_next)
+ {
+ char ip[200];
+ socklen_t salen;
+
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ salen = sizeof(struct sockaddr_in);
+ else if (ifa->ifa_addr->sa_family == AF_INET6)
+ salen = sizeof(struct sockaddr_in6);
+ else
+ continue;
+
+ if (getnameinfo(ifa->ifa_addr, salen, ip, sizeof(ip), NULL, 0,
+ NI_NUMERICHOST) < 0)
+ {
+ continue;
+ }
+
+ Jim_AppendString(interp, tclOutput, ip, strlen(ip));
+ break;
+
+ }
+
+ freeifaddrs(ifp);
+
+ Jim_SetResult(interp, tclOutput);
+
+ return JIM_OK;
+}
+
+
+/* not so pretty code to fish out eth0 mac address */
+static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc,
+ Jim_Obj * const *argv)
+{
+
+
+ struct ifreq *ifr, *ifend;
+ struct ifreq ifreq;
+ struct ifconf ifc;
+ struct ifreq ifs[5];
+ int SockFD;
+
+ SockFD = socket(AF_INET, SOCK_DGRAM, 0);
+ if (SockFD < 0)
+ {
+ return JIM_ERR;
+ }
+
+ ifc.ifc_len = sizeof(ifs);
+ ifc.ifc_req = ifs;
+ if (ioctl(SockFD, SIOCGIFCONF, &ifc) < 0)
+ {
+ close(SockFD);
+ return JIM_ERR;
+ }
+
+ ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));
+ for (ifr = ifc.ifc_req; ifr < ifend; ifr++)
+ {
+ //if (ifr->ifr_addr.sa_family == AF_INET)
+ {
+ if (strcmp("eth0", ifr->ifr_name)!=0)
+ continue;
+ strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
+ if (ioctl(SockFD, SIOCGIFHWADDR, &ifreq) < 0)
+ {
+ close(SockFD);
+ return JIM_ERR;
+ }
+
+ close(SockFD);
+
+
+ Jim_Obj *tclOutput = Jim_NewStringObj(interp, "", 0);
+
+ char buffer[256];
+ sprintf(buffer, "%02x-%02x-%02x-%02x-%02x-%02x",
+ ifreq.ifr_hwaddr.sa_data[0]&0xff,
+ ifreq.ifr_hwaddr.sa_data[1]&0xff,
+ ifreq.ifr_hwaddr.sa_data[2]&0xff,
+ ifreq.ifr_hwaddr.sa_data[3]&0xff,
+ ifreq.ifr_hwaddr.sa_data[4]&0xff,
+ ifreq.ifr_hwaddr.sa_data[5]&0xff);
+
+ Jim_AppendString(interp, tclOutput, buffer, strlen(buffer));
+
+ Jim_SetResult(interp, tclOutput);
+
+ return JIM_OK;
+ }
+ }
+ close(SockFD);
+
+ return JIM_ERR;
+
+}
+
+
+
int ioutil_init(struct command_context_s *cmd_ctx)
{
register_command(cmd_ctx, NULL, "rm", handle_rm_command, COMMAND_ANY,
@@ -583,7 +699,12 @@
Jim_CreateCommand(interp, "poke", zylinjtag_Jim_Command_poke, NULL, NULL);
Jim_CreateCommand(interp, "ls", zylinjtag_Jim_Command_ls, NULL, NULL);
+ Jim_CreateCommand(interp, "mac", zylinjtag_Jim_Command_mac,
+ NULL, NULL);
+ Jim_CreateCommand(interp, "ip", zylinjtag_Jim_Command_ip,
+ NULL, NULL);
+
return ERROR_OK;
}
Modified: trunk/src/server/telnet_server.c
===================================================================
--- trunk/src/server/telnet_server.c 2008-12-17 12:50:07 UTC (rev 1254)
+++ trunk/src/server/telnet_server.c 2008-12-17 13:39:40 UTC (rev 1255)
@@ -626,7 +626,7 @@
COMMAND_EXEC, "exit telnet session");
register_command(command_context, NULL, "telnet_port", handle_telnet_port_command,
- COMMAND_CONFIG, "port on which to listen for incoming telnet connections");
+ COMMAND_ANY, "port on which to listen for incoming telnet connections");
return ERROR_OK;
}
|
|
From: <oh...@ma...> - 2008-12-17 13:50:09
|
Author: oharboe
Date: 2008-12-17 13:50:07 +0100 (Wed, 17 Dec 2008)
New Revision: 1254
Modified:
trunk/src/server/httpd.c
Log:
fixed gaffe in post handling
Modified: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2008-12-17 11:33:33 UTC (rev 1253)
+++ trunk/src/server/httpd.c 2008-12-17 12:50:07 UTC (rev 1254)
@@ -175,9 +175,13 @@
int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
free((void *) script);
if (retcode != JIM_OK)
- return retcode;
+ {
+ Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
+ } else
+ {
+ Jim_SetResult(interp, Jim_GetResult(interp));
+ }
- Jim_SetResult(interp, Jim_GetResult(interp));
return JIM_OK;
}
@@ -292,9 +296,8 @@
r = (struct httpd_request *) *ptr;
r->post = post;
+ Jim_SetVariableStr(interp, "httppostdata", Jim_NewDictObj(interp, NULL, 0));
-// r->dict = Jim_NewDictObj(interp, NULL, 0);
-
/* fill in url query strings in dictonary */
MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND,
record_arg, r);
@@ -327,7 +330,6 @@
}
/* hand over to request who will be using it. */
- //Jim_SetGlobalVariableStr(interp, "httppostdata", Jim_GetVariableStr(interp, "httppostdata", 0));
// r->dict = NULL;
|
|
From: <oh...@ma...> - 2008-12-17 12:33:49
|
Author: oharboe
Date: 2008-12-17 12:33:33 +0100 (Wed, 17 Dec 2008)
New Revision: 1253
Modified:
zy1000/trunk/build/include/rom.h
zy1000/trunk/build/tcl/browsemem.tcl
zy1000/trunk/build/tcl/downloadmem.tcl
zy1000/trunk/build/tcl/editconfigs.tcl
zy1000/trunk/build/tcl/editfile.tcl
zy1000/trunk/build/tcl/erase.tcl
zy1000/trunk/build/tcl/flash.tcl
zy1000/trunk/build/tcl/flashinfo.tcl
zy1000/trunk/build/tcl/guiupload.tcl
zy1000/trunk/build/tcl/index.tcl
zy1000/trunk/build/tcl/log.tcl
zy1000/trunk/build/tcl/openocd.tcl
zy1000/trunk/build/tcl/preconfig.tcl
zy1000/trunk/build/tcl/production.tcl
zy1000/trunk/build/tcl/reload.tcl
zy1000/trunk/build/tcl/run.tcl
zy1000/trunk/build/tcl/support.tcl
zy1000/trunk/build/tcl/targets.tcl
zy1000/trunk/build/tcl/terminal.tcl
zy1000/trunk/build/tcl/upgrade.tcl
zy1000/trunk/build/tcl/zy1000.tcl
Log:
wip
Modified: zy1000/trunk/build/include/rom.h
===================================================================
--- zy1000/trunk/build/include/rom.h 2008-12-17 09:56:59 UTC (rev 1252)
+++ zy1000/trunk/build/include/rom.h 2008-12-17 11:33:33 UTC (rev 1253)
@@ -2,688 +2,688 @@
static CYGBLD_ATTRIB_ALIGN(4) const unsigned char filedata[] = {
0x2e, 0x6d, 0x6f, 0x52, 0xaa, 0x00, 0x00, 0x00,
- 0x00, 0xde, 0x07, 0x00, 0x04, 0x03, 0x02, 0x01,
+ 0xc0, 0xdd, 0x07, 0x00, 0x04, 0x03, 0x02, 0x01,
0x52, 0x4f, 0x4d, 0x46, 0x53, 0x20, 0x76, 0x31,
0x2e, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x6f, 0x01, 0x09, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x40, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x60, 0x15, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0x15, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe0, 0x8f, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x80, 0x2e, 0x00, 0x00,
+ 0xe2, 0xcb, 0x48, 0x49, 0x80, 0x2e, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x01, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0xa0, 0x1a, 0x00, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xa0, 0x1a, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x90, 0x37, 0x00, 0x00,
- 0x2b, 0x3e, 0x46, 0x49, 0x60, 0xbe, 0x00, 0x00,
+ 0xec, 0xcb, 0x48, 0x49, 0x60, 0xbe, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x8a, 0x2b, 0x00, 0x00,
- 0x2b, 0x3e, 0x46, 0x49, 0x00, 0xf6, 0x00, 0x00,
+ 0xec, 0xcb, 0x48, 0x49, 0x00, 0xf6, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x00, 0x1c, 0x00, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0x1c, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xae, 0x37, 0x00, 0x00,
- 0x2c, 0x3e, 0x46, 0x49, 0xa0, 0x21, 0x01, 0x00,
+ 0xec, 0xcb, 0x48, 0x49, 0xa0, 0x21, 0x01, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x9d, 0x2f, 0x00, 0x00,
- 0x2c, 0x3e, 0x46, 0x49, 0x60, 0x59, 0x01, 0x00,
+ 0xed, 0xcb, 0x48, 0x49, 0x60, 0x59, 0x01, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf3, 0x2d, 0x00, 0x00,
- 0x2c, 0x3e, 0x46, 0x49, 0x00, 0x89, 0x01, 0x00,
+ 0xed, 0xcb, 0x48, 0x49, 0x00, 0x89, 0x01, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x9e, 0x00, 0x00, 0x00,
- 0x2c, 0x3e, 0x46, 0x49, 0x00, 0xb7, 0x01, 0x00,
+ 0xed, 0xcb, 0x48, 0x49, 0x00, 0xb7, 0x01, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x78, 0x38, 0x00, 0x00,
- 0x2d, 0x3e, 0x46, 0x49, 0xa0, 0xb7, 0x01, 0x00,
+ 0xed, 0xcb, 0x48, 0x49, 0xa0, 0xb7, 0x01, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x06, 0x2e, 0x00, 0x00,
- 0x2d, 0x3e, 0x46, 0x49, 0x20, 0xf0, 0x01, 0x00,
+ 0xee, 0xcb, 0x48, 0x49, 0x20, 0xf0, 0x01, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x8b, 0x65, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x40, 0x1e, 0x02, 0x00,
+ 0xe2, 0xcb, 0x48, 0x49, 0x40, 0x1e, 0x02, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x32, 0x3e,
0x08, 0x00, 0x6f, 0x01, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x92, 0x02, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x60, 0xdb, 0x07, 0x00,
+ 0xe2, 0xcb, 0x48, 0x49, 0x20, 0xdb, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf3, 0x2e, 0x00, 0x00,
- 0x2e, 0x3e, 0x46, 0x49, 0xe0, 0x83, 0x02, 0x00,
+ 0xee, 0xcb, 0x48, 0x49, 0xe0, 0x83, 0x02, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa9, 0x39, 0x00, 0x00,
- 0x2f, 0x3e, 0x46, 0x49, 0xe0, 0xb2, 0x02, 0x00,
+ 0xee, 0xcb, 0x48, 0x49, 0xe0, 0xb2, 0x02, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x35, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x00, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0x1c, 0x00, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x60, 0x1c, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x59, 0x26, 0x00, 0x00,
- 0x2f, 0x3e, 0x46, 0x49, 0xa0, 0xec, 0x02, 0x00,
+ 0xef, 0xcb, 0x48, 0x49, 0xa0, 0xec, 0x02, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x22, 0x03, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x00, 0x13, 0x03, 0x00,
+ 0xe2, 0xcb, 0x48, 0x49, 0x00, 0x13, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x6a, 0x08, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x40, 0x16, 0x03, 0x00,
+ 0xe2, 0xcb, 0x48, 0x49, 0x40, 0x16, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x31, 0x39, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xc0, 0x02, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x60, 0x1f, 0x00, 0x00,
+ 0xeb, 0xcb, 0x48, 0x49, 0x60, 0x1f, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0xed, 0x03, 0x01, 0x02, 0x30, 0x09, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xc0, 0x1e, 0x03, 0x00,
+ 0xed, 0x03, 0x01, 0x02, 0xf9, 0x08, 0x00, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xc0, 0x1e, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xdf, 0x2a, 0x00, 0x00,
- 0x35, 0x3e, 0x46, 0x49, 0x00, 0x28, 0x03, 0x00,
+ 0xf3, 0xcb, 0x48, 0x49, 0xc0, 0x27, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x19, 0x30, 0x00, 0x00,
- 0x35, 0x3e, 0x46, 0x49, 0xe0, 0x52, 0x03, 0x00,
+ 0xf4, 0xcb, 0x48, 0x49, 0xa0, 0x52, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xcb, 0x32, 0x00, 0x00,
- 0x35, 0x3e, 0x46, 0x49, 0x00, 0x83, 0x03, 0x00,
+ 0xf4, 0xcb, 0x48, 0x49, 0xc0, 0x82, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x0d, 0x29, 0x00, 0x00,
- 0x36, 0x3e, 0x46, 0x49, 0xe0, 0xb5, 0x03, 0x00,
+ 0xf4, 0xcb, 0x48, 0x49, 0xa0, 0xb5, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xd7, 0x2d, 0x00, 0x00,
- 0x36, 0x3e, 0x46, 0x49, 0x00, 0xdf, 0x03, 0x00,
+ 0xf4, 0xcb, 0x48, 0x49, 0xc0, 0xde, 0x03, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x26, 0x01, 0x00, 0x00,
- 0x36, 0x3e, 0x46, 0x49, 0xe0, 0x0c, 0x04, 0x00,
+ 0xf5, 0xcb, 0x48, 0x49, 0xa0, 0x0c, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x3f, 0x0b, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x20, 0x0e, 0x04, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xe0, 0x0d, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x91, 0x30, 0x00, 0x00,
- 0x37, 0x3e, 0x46, 0x49, 0x60, 0x19, 0x04, 0x00,
+ 0xf5, 0xcb, 0x48, 0x49, 0x20, 0x19, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x32, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x41, 0x07, 0x00, 0x00,
- 0x37, 0x3e, 0x46, 0x49, 0x00, 0x4a, 0x04, 0x00,
+ 0xf5, 0xcb, 0x48, 0x49, 0xc0, 0x49, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x30, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe0, 0x06, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x20, 0x22, 0x00, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x20, 0x22, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x22, 0x48, 0x00, 0x00,
- 0x37, 0x3e, 0x46, 0x49, 0x60, 0x51, 0x04, 0x00,
+ 0xf5, 0xcb, 0x48, 0x49, 0x20, 0x51, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x32, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x04, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x29, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x00, 0x29, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xca, 0x2e, 0x00, 0x00,
- 0x37, 0x3e, 0x46, 0x49, 0xa0, 0x99, 0x04, 0x00,
+ 0xf6, 0xcb, 0x48, 0x49, 0x60, 0x99, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xab, 0x30, 0x00, 0x00,
- 0x38, 0x3e, 0x46, 0x49, 0x80, 0xc8, 0x04, 0x00,
+ 0xf6, 0xcb, 0x48, 0x49, 0x40, 0xc8, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x70, 0x01, 0x00, 0x00,
- 0x38, 0x3e, 0x46, 0x49, 0x40, 0xf9, 0x04, 0x00,
+ 0xf7, 0xcb, 0x48, 0x49, 0x00, 0xf9, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x36, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x2a, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x00, 0x2a, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xb3, 0x35, 0x00, 0x00,
- 0x38, 0x3e, 0x46, 0x49, 0xc0, 0xfa, 0x04, 0x00,
+ 0xf7, 0xcb, 0x48, 0x49, 0x80, 0xfa, 0x04, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x13, 0x06, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x80, 0x30, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x40, 0x30, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x33, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x65, 0x03, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xa0, 0x36, 0x05, 0x00,
+ 0xe2, 0xcb, 0x48, 0x49, 0x60, 0x36, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xce, 0x00, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0x20, 0x3a, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0x39, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x51, 0x08, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0x00, 0x3b, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xc0, 0x3a, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x62, 0x09, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0x60, 0x43, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x20, 0x43, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x14, 0x04, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0xe0, 0x4c, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xa0, 0x4c, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x00, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0x00, 0x51, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xc0, 0x50, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x23, 0x01, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0x60, 0x51, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x20, 0x51, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x64, 0x00, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0xa0, 0x52, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x60, 0x52, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x69, 0x00, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0x20, 0x53, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0x52, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa9, 0x00, 0x00, 0x00,
- 0x77, 0x3e, 0x46, 0x49, 0xa0, 0x53, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x60, 0x53, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x34, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe0, 0x8f, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0x54, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x20, 0x54, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x85, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xe4, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0xe4, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x3d, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0xe4, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xa0, 0xe4, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xfc, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x20, 0xe5, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0xe4, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xfe, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x20, 0xe6, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0xe5, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xb4, 0x01, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x20, 0xe7, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0xe6, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x3a, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0xe8, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xa0, 0xe8, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x11, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x20, 0xe9, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0xe8, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xee, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xe9, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0xe9, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x26, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xea, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0xea, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x35, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x7b, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0xea, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x40, 0xea, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x7b, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x00, 0xeb, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xc0, 0xea, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa5, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0xeb, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x40, 0xeb, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x72, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xec, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0xec, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x86, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xc0, 0xec, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x80, 0xec, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x75, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0xed, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x20, 0xed, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x99, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0xed, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xa0, 0xed, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xad, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0xee, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x40, 0xee, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x72, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xef, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0xef, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x79, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xc0, 0xef, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x80, 0xef, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x36, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x6f, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xf0, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0xf0, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xc0, 0xf0, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x80, 0xf0, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x8d, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x20, 0xf1, 0x05, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xe0, 0xf0, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x35, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xc0, 0xf1, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x80, 0xf1, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x33, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x00, 0xf3, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xc0, 0xf2, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x6c, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x40, 0xf4, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x00, 0xf4, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x36, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xc0, 0xf5, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x80, 0xf5, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x5d, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x00, 0xf7, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xc0, 0xf6, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x4a, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x60, 0xf8, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x20, 0xf8, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xc6, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xc0, 0xf9, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x80, 0xf9, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x37, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xc0, 0x03, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xa0, 0xfb, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x60, 0xfb, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x0a, 0x0c, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x60, 0xff, 0x05, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x20, 0xff, 0x05, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x5f, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x80, 0x0b, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x40, 0x0b, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x19, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xe0, 0x0c, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xa0, 0x0c, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x09, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x00, 0x0e, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xc0, 0x0d, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x20, 0x0f, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xe0, 0x0e, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x31, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x80, 0x10, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x40, 0x10, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa9, 0x00, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xc0, 0x11, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x80, 0x11, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf1, 0x08, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x80, 0x12, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x40, 0x12, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x86, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x80, 0x1b, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x40, 0x1b, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x38, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x65, 0x01, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0x20, 0x1d, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0xe0, 0x1c, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x84, 0x0f, 0x00, 0x00,
- 0x2a, 0x3e, 0x46, 0x49, 0xa0, 0x1e, 0x06, 0x00,
+ 0xe8, 0xcb, 0x48, 0x49, 0x60, 0x1e, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x01, 0x06, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0x2e, 0x06, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x00, 0x2e, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x27, 0x07, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0x34, 0x06, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x20, 0x34, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x47, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0x3b, 0x06, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0x60, 0x3b, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x37, 0x06, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x00, 0x41, 0x06, 0x00,
+ 0x19, 0xcc, 0x48, 0x49, 0xc0, 0x40, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x52, 0x0c, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0x47, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0x47, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xfa, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0x53, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0x53, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x83, 0x0b, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0x57, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0x57, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x9f, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0x63, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0x63, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x20, 0x39, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf4, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0x66, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0x66, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf2, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0x6c, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0x6c, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x77, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0x72, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0x72, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xfe, 0x06, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0x77, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x20, 0x77, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x17, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0x7e, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x20, 0x7e, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe2, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0x81, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0x81, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x19, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0x87, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0x87, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xc2, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0x8c, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0x8c, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xbd, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0x91, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0x91, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf6, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0x96, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0x96, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x30, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa2, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0x9a, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0x9a, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x34, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x00, 0xa0, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xc0, 0x9f, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x31, 0x00, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xa0, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0xa0, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x4c, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0xa0, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0xa0, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x25, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0xa4, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0xa4, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x14, 0x01, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x20, 0xa8, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xe0, 0xa7, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x3c, 0x06, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xa9, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0xa9, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x05, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x80, 0xaf, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0xaf, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x88, 0x09, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0xb3, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0xb3, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x15, 0x02, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x40, 0xbd, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0xbd, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x31, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x9b, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x60, 0xbf, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x20, 0xbf, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xc3, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x00, 0xc5, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xc0, 0xc4, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xe0, 0xc9, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0xc9, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x98, 0x05, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0x00, 0xce, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xc0, 0xcd, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe3, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0xd3, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0xd3, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe3, 0x03, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0xd7, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0xd7, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x3f, 0x04, 0x00, 0x00,
- 0x78, 0x3e, 0x46, 0x49, 0xa0, 0xdb, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0xdb, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x4e, 0x02, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xe0, 0xdf, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0xdf, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x97, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x40, 0xe2, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0xe2, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x67, 0x02, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xe0, 0xe7, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0xe7, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x32, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x33, 0x01, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x60, 0xea, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x20, 0xea, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x84, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xeb, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x60, 0xeb, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x2d, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x40, 0xf1, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0xf1, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x48, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x80, 0xf6, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0xf6, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xfc, 0x04, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xe0, 0xfb, 0x06, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0xfb, 0x06, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x5d, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xe0, 0x00, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0x00, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x9e, 0x06, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x40, 0x06, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x00, 0x06, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x84, 0x07, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xe0, 0x0c, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xa0, 0x0c, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf0, 0x04, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x80, 0x14, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0x14, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xcc, 0x01, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x80, 0x19, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0x19, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x33, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x5a, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x60, 0x1b, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x20, 0x1b, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x21, 0x0f, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xc0, 0x1b, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x80, 0x1b, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xfa, 0x09, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x2b, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xc0, 0x2a, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf5, 0x0b, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x35, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xc0, 0x34, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x7f, 0x06, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x41, 0x07, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0xc0, 0x40, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x34, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x04, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x80, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x60, 0x2a, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0x2a, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x35, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x03, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xe0, 0x2a, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xe0, 0x2a, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x88, 0x0e, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x80, 0x47, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x40, 0x47, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe0, 0x06, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x20, 0x56, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xe0, 0x55, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x5e, 0x02, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x5d, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xc0, 0x5c, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x34, 0x39, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x03, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x40, 0x2b, 0x00, 0x00,
+ 0x1b, 0xcc, 0x48, 0x49, 0x40, 0x2b, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x30, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x03, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x60, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0x2b, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xa0, 0x2b, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x31, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x2c, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x00, 0x2c, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x32, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x18, 0x0c, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x60, 0x5f, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x20, 0x5f, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x21, 0x0f, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x80, 0x6b, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x40, 0x6b, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa9, 0x10, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xc0, 0x7a, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x80, 0x7a, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x66, 0x01, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x80, 0x8b, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x40, 0x8b, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xaf, 0x05, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x8d, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xc0, 0x8c, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xcf, 0x0e, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xc0, 0x92, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x80, 0x92, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x38, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xa0, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x00, 0x2d, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x00, 0x2d, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x35, 0x39, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xec, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xa1, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0xa1, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x30, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf1, 0x1d, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xa2, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0xa2, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x31, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xf6, 0x11, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xc0, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0xc0, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x32, 0x3e,
0x01, 0x00, 0x6f, 0x01, 0x02, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0xe0, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0x2d, 0x00, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xa0, 0x2d, 0x00, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x33, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x79, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xd2, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0xd2, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x34, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x77, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x20, 0xd3, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xe0, 0xd2, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x35, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x78, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xd3, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0xd3, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x36, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x78, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x20, 0xd4, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xe0, 0xd3, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x37, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x79, 0x00, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0xa0, 0xd4, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0x60, 0xd4, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x38, 0x3e,
0x08, 0x00, 0x4b, 0x00, 0x01, 0x00, 0x00, 0x00,
0xed, 0x03, 0x01, 0x02, 0x38, 0x06, 0x00, 0x00,
- 0x79, 0x3e, 0x46, 0x49, 0x20, 0xd5, 0x07, 0x00,
+ 0x1c, 0xcc, 0x48, 0x49, 0xe0, 0xd4, 0x07, 0x00,
0x3c, 0x20, 0x20, 0x20, 0x31, 0x36, 0x39, 0x3e,
0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6211,8 +6211,8 @@
0x65, 0x78, 0x74, 0x6c, 0x69, 0x67, 0x68, 0x74,
0x22, 0x3e, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
- 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70,
- 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x7a, 0x79,
+ 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x63, 0x61,
+ 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x7a, 0x79,
0x31, 0x30, 0x30, 0x30, 0x5f, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x5d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
@@ -6877,8 +6877,8 @@
0x3d, 0x30, 0x7d, 0x20, 0x7b, 0x0d, 0x0a, 0x09,
0x09, 0x09, 0x09, 0x09, 0x61, 0x70, 0x70, 0x65,
0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
- 0x6c, 0x65, 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e,
- 0x6f, 0x63, 0x64, 0x20, 0x22, 0x24, 0x6d, 0x6f,
+ 0x6c, 0x65, 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74,
+ 0x75, 0x72, 0x65, 0x20, 0x22, 0x24, 0x6d, 0x6f,
0x64, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6d, 0x64,
0x20, 0x24, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x24,
@@ -6894,7 +6894,7 @@
0x7b, 0x0d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09,
0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x63,
0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x5b,
- 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20,
+ 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20,
0x22, 0x24, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79,
0x5f, 0x63, 0x6d, 0x64, 0x20, 0x24, 0x66, 0x6f,
0x72, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65,
@@ -7183,13 +7183,13 @@
0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x63,
0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x5b,
0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b,
- 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20,
+ 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20,
0x68, 0x61, 0x6c, 0x74, 0x5d, 0x5d, 0x0d, 0x0a,
0x09, 0x09, 0x09, 0x09, 0x09, 0x61, 0x70, 0x70,
0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 0x66, 0x66,
0x65, 0x72, 0x20, 0x5b, 0x65, 0x6e, 0x63, 0x6f,
- 0x64, 0x65, 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e,
- 0x6f, 0x63, 0x64, 0x20, 0x22, 0x24, 0x66, 0x6f,
+ 0x64, 0x65, 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74,
+ 0x75, 0x72, 0x65, 0x20, 0x22, 0x24, 0x66, 0x6f,
0x72, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20,
0x24, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x61, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x5b, 0x65,
@@ -7993,8 +7993,8 @@
0x74, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e,
0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x61, 0x70, 0x70,
0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 0x66, 0x66,
- 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e,
- 0x6f, 0x63, 0x64, 0x20, 0x7a, 0x79, 0x31, 0x30,
+ 0x65, 0x72, 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74,
+ 0x75, 0x72, 0x65, 0x20, 0x7a, 0x79, 0x31, 0x30,
0x30, 0x30, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x5d, 0x0d, 0x0a, 0x61, 0x70, 0x70,
0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 0x66, 0x66,
@@ -8581,15 +8581,15 @@
0x0d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x63, 0x6f,
0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x5b, 0x65,
- 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b, 0x6f,
- 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x22,
+ 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b, 0x63,
+ 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x22,
0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x69, 0x6e,
0x69, 0x74, 0x22, 0x5d, 0x5d, 0x0d, 0x0a, 0x09,
0x09, 0x09, 0x09, 0x09, 0x61, 0x70, 0x70, 0x65,
0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
0x6c, 0x65, 0x20, 0x5b, 0x65, 0x6e, 0x63, 0x6f,
- 0x64, 0x65, 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e,
- 0x6f, 0x63, 0x64, 0x20, 0x22, 0x64, 0x75, 0x6d,
+ 0x64, 0x65, 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74,
+ 0x75, 0x72, 0x65, 0x20, 0x22, 0x64, 0x75, 0x6d,
0x70, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20,
0x2f, 0x72, 0x61, 0x6d, 0x2f, 0x64, 0x75, 0x6d,
0x70, 0x2e, 0x62, 0x69, 0x6e, 0x20, 0x24, 0x66,
@@ -9378,8 +9378,8 @@
0x65, 0x78, 0x74, 0x6c, 0x69, 0x67, 0x68, 0x74,
0x22, 0x3e, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
- 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70,
- 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x7a, 0x79,
+ 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x63, 0x61,
+ 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x7a, 0x79,
0x31, 0x30, 0x30, 0x30, 0x5f, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x5d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
@@ -9969,8 +9969,8 @@
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x22, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x22, 0x5d, 0x3d, 0x3d,
0x30, 0x7d, 0x20, 0x7b, 0x0d, 0x0a, 0x09, 0x09,
- 0x09, 0x09, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x6f,
- 0x63, 0x64, 0x20, 0x22, 0x72, 0x6d, 0x20, 0x2f,
+ 0x09, 0x09, 0x09, 0x63, 0x61, 0x70, 0x74, 0x75,
+ 0x72, 0x65, 0x20, 0x22, 0x72, 0x6d, 0x20, 0x2f,
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x73,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f,
0x24, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x73, 0x65,
@@ -11180,7 +11180,7 @@
0x68, 0x74, 0x22, 0x3e, 0x0d, 0x0a, 0x7d, 0x0d,
0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b,
- 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20,
+ 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20,
0x7a, 0x79, 0x31, 0x30, 0x30, 0x30, 0x5f, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5d, 0x0d,
0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
@@ -11784,8 +11784,8 @@
0x24, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x22, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x22, 0x5d, 0x3d, 0x3d,
- 0x30, 0x7d, 0x20, 0x7b, 0x0d, 0x0a, 0x09, 0x6f,
- 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x22,
+ 0x30, 0x7d, 0x20, 0x7b, 0x0d, 0x0a, 0x09, 0x63,
+ 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x22,
0x72, 0x6d, 0x20, 0x24, 0x66, 0x6f, 0x72, 0x6d,
0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d,
0x65, 0x22, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x0d,
@@ -12693,8 +12693,8 @@
0x65, 0x78, 0x74, 0x6c, 0x69, 0x67, 0x68, 0x74,
0x22, 0x3e, 0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
- 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70,
- 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x7a, 0x79,
+ 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x63, 0x61,
+ 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x7a, 0x79,
0x31, 0x30, 0x30, 0x30, 0x5f, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x5d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
@@ -13297,14 +13297,14 @@
0x09, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64,
0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65,
0x20, 0x5b, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65,
- 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63,
- 0x64, 0x20, 0x22, 0x72, 0x65, 0x73, 0x65, 0x74,
+ 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72,
+ 0x65, 0x20, 0x22, 0x72, 0x65, 0x73, 0x65, 0x74,
0x20, 0x69, 0x6e, 0x69, 0x74, 0x22, 0x5d, 0x5d,
0x0d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x63,
0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x5b,
0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b,
- 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20,
+ 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20,
0x22, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x65,
0x72, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x20, 0x24, 0x66, 0x6f,
@@ -14183,7 +14183,7 @@
0x68, 0x74, 0x22, 0x3e, 0x0d, 0x0a, 0x7d, 0x0d,
0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b,
- 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20,
+ 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20,
0x7a, 0x79, 0x31, 0x30, 0x30, 0x30, 0x5f, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5d, 0x0d,
0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
@@ -14827,7 +14827,7 @@
0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20,
0x5b, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20,
- 0x5b, 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64,
+ 0x5b, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65,
0x20, 0x22, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20,
0x69, 0x6e, 0x69, 0x74, 0x22, 0x5d, 0x5d, 0x0d,
0x0a, 0x09, 0x09, 0x09, 0x7d, 0x0d, 0x0a, 0x09,
@@ -15083,8 +15083,8 @@
0x09, 0x09, 0x09, 0x09, 0x61, 0x70, 0x70, 0x65,
0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
0x6c, 0x65, 0x20, 0x5b, 0x65, 0x6e, 0x63, 0x6f,
- 0x64, 0x65, 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e,
- 0x6f, 0x63, 0x64, 0x20, 0x22, 0x68, 0x61, 0x6c,
+ 0x64, 0x65, 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74,
+ 0x75, 0x72, 0x65, 0x20, 0x22, 0x68, 0x61, 0x6c,
0x74, 0x22, 0x5d, 0x5d, 0x0d, 0x0a, 0x09, 0x09,
0x09, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64,
0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20,
@@ -15136,8 +15136,8 @@
0x7b, 0x0d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x63, 0x6f,
0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20, 0x5b, 0x65,
- 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b, 0x6f,
- 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x22,
+ 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b, 0x63,
+ 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x22,
0x68, 0x61, 0x6c, 0x74, 0x22, 0x5d, 0x5d, 0x0d,
0x0a, 0x09, 0x09, 0x09, 0x09, 0x61, 0x70, 0x70,
0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 0x66, 0x66,
@@ -15990,8 +15990,8 @@
0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x0d, 0x0a,
0x7d, 0x0d, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e,
0x64, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72,
- 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63,
- 0x64, 0x20, 0x7a, 0x79, 0x31, 0x30, 0x30, 0x30,
+ 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72,
+ 0x65, 0x20, 0x7a, 0x79, 0x31, 0x30, 0x30, 0x30,
0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x5d, 0x0d, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e,
0x64, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72,
@@ -16570,21 +16570,21 @@
0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x20,
0x5b, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20,
- 0x5b, 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64,
+ 0x5b, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65,
0x20, 0x22, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20,
0x69, 0x6e, 0x69, 0x74, 0x22, 0x5d, 0x5d, 0x0d,
0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62,
0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x65,
- 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b, 0x6f,
- 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x22,
+ 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b, 0x63,
+ 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x22,
0x66, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x70, 0x72,
0x6f, 0x62, 0x65, 0x20, 0x30, 0x22, 0x5d, 0x5d,
0x0d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20,
0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b,
0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x5b,
- 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20,
+ 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20,
0x22, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x69,
0x6e, 0x66, 0x6f, 0x20, 0x30, 0x22, 0x5d, 0x5d,
0x0d, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
@@ -20729,8 +20729,8 @@
0x74, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e,
0x0d, 0x0a, 0x7d, 0x0d, 0x0a, 0x61, 0x70, 0x70,
0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 0x66, 0x66,
- 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e,
- 0x6f, 0x63, 0x64, 0x20, 0x7a, 0x79, 0x31, 0x30,
+ 0x65, 0x72, 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74,
+ 0x75, 0x72, 0x65, 0x20, 0x7a, 0x79, 0x31, 0x30,
0x30, 0x30, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x5d, 0x0d, 0x0a, 0x61, 0x70, 0x70,
0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 0x66, 0x66,
@@ -22216,8 +22216,8 @@
0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x0d, 0x0a,
0x7d, 0x0d, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e,
0x64, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72,
- 0x20, 0x5b, 0x6f, 0x70, 0x65, 0x6e, 0x6f, 0x63,
- 0x64, 0x20, 0x7a, 0x79, 0x31, 0x30, 0x30, 0x30,
+ 0x20, 0x5b, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72,
+ 0x65, 0x20, 0x7a, 0x79, 0x31, 0x30, 0x30, 0x30,
0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x5d, 0x0d, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e,
0x64, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72,
@@ -22853,8 +22853,8 @@
0x09, 0x3c, 0x62, 0x72, 0x3e, 0x0d, 0x0a, 0x09,
0x09, 0x09, 0x09, 0x09, 0x09, 0x7d, 0x0d, 0x0a,
0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62,
- 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x6f,
- 0x70, 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x7b,
+ 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x63,
+ 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x7b,
0x7a, 0x79, 0x31, 0x30, 0x30, 0x30, 0x5f, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x7a,
0x79, 0x31, 0x30, 0x30, 0x30, 0x7d, 0x5d, 0x0d,
@@ -22863,8 +22863,8 @@
0x3c, 0x62, 0x72, 0x3e, 0x0d, 0x0a, 0x09, 0x09,
0x09, 0x09, 0x09, 0x09, 0x7d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
- 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70,
- 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0x7b, 0x7a,
+ 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x63, 0x61,
+ 0x70, 0x74, 0x75, 0x72, 0x65, 0x20, 0x7b, 0x7a,
0x79, 0x31, 0x30, 0x30, 0x30, 0x5f, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70,
0x65, 0x6e, 0x6f, 0x63, 0x64, 0x7d, 0x5d, 0x0d,
@@ -22873,8 +22873,8 @@
0x3c, 0x62, 0x72, 0x3e, 0x0d, 0x0a, 0x09, 0x09,
0x09, 0x09, 0x09, 0x09, 0x7d, 0x0d, 0x0a, 0x61,
0x70, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75,
- 0x66, 0x66, 0x65, 0x72, 0x20, 0x5b, 0x6f, 0x70,
- 0x65, 0x6e, 0x6f, 0x63, 0x64, 0x20, 0...
[truncated message content] |
|
From: <oh...@ma...> - 2008-12-17 10:57:05
|
Author: oharboe
Date: 2008-12-17 10:56:59 +0100 (Wed, 17 Dec 2008)
New Revision: 1252
Modified:
zy1000/trunk/build/menu/zy1000menu.xml
zy1000/trunk/build/menu/zy1000menu.xsl
zy1000/trunk/build/tcl/openocd.cfg
Log:
retire unused code
Modified: zy1000/trunk/build/menu/zy1000menu.xml
===================================================================
--- zy1000/trunk/build/menu/zy1000menu.xml 2008-12-16 22:20:10 UTC (rev 1251)
+++ zy1000/trunk/build/menu/zy1000menu.xml 2008-12-17 09:56:59 UTC (rev 1252)
@@ -62,9 +62,9 @@
append buffer [ocd_jtag_khz]
</tcl>
<br>
- <tcl>append buffer [openocd {zy1000_version zy1000}]</tcl><br>
- <tcl>append buffer [openocd {zy1000_version openocd}]</tcl><br>
- <tcl>append buffer [openocd {zy1000_version date}]</tcl><br>
+ <tcl>append buffer [capture {zy1000_version zy1000}]</tcl><br>
+ <tcl>append buffer [capture {zy1000_version openocd}]</tcl><br>
+ <tcl>append buffer [capture {zy1000_version date}]</tcl><br>
<tcl>append buffer [ip]</tcl><br>
<tcl>append buffer [ocd_gdb_port]</tcl>
</td>
@@ -100,25 +100,25 @@
set form_action [formfetch form_action]
if {[string compare $form_action "Halt"]==0} {
- append console [encode [openocd "halt"]]
+ append console [encode [capture "halt"]]
}
if {[string compare $form_action "Resume"]==0} {
- append console [encode [openocd "resume"]]
+ append console [encode [capture "resume"]]
}
if {[string compare $form_action "Reset and run"]==0} {
- append console [encode [openocd "reset run"]]
+ append console [encode [capture "reset run"]]
}
if {[string compare $form_action "Power on"]==0} {
- append console [encode [openocd "power on"]]
+ append console [encode [capture "power on"]]
}
if {[string compare $form_action "Power off"]==0} {
- append console [encode [openocd "power off"]]
+ append console [encode [capture "power off"]]
}
</tcl>
- <tcl>append console [encode [openocd poll]]</tcl>
+ <tcl>append console [encode [capture poll]]</tcl>
</td>
</tr>
</table>
@@ -184,8 +184,8 @@
append buffer {<form enctype="multipart/form-data" action="preconfig.tcl" method="post">}
if {[string compare $form_action "Select and reload"]==0} {
- openocd "trunc /config/settings/openocd.cfg"
- openocd "append_file /config/settings/openocd.cfg script target/$form_target"
+ capture "trunc /config/settings/openocd.cfg"
+ capture "append_file /config/settings/openocd.cfg script target/$form_target"
reboot
}
@@ -271,7 +271,7 @@
}
if {[string compare $form_action "Delete"]==0} {
- openocd "rm /config/settings/$form_selected"
+ capture "rm /config/settings/$form_selected"
}
if {[string compare $form_action "Save"]==0} {
@@ -463,9 +463,9 @@
set form_action [formfetch form_action]
if {[string compare $form_action "Reset CPU and probe flash"]==0} {
- append console [encode [openocd "reset init"]]
- append buffer [encode [openocd "flash probe 0"]]
- append buffer [encode [openocd "flash info 0"]]
+ append console [encode [capture "reset init"]]
+ append buffer [encode [capture "flash probe 0"]]
+ append buffer [encode [capture "flash info 0"]]
}
} else {
append buffer "No flash bank configured."
@@ -540,7 +540,7 @@
set action_verify [expr {[string compare $form_action "Verify"]==0 || [string compare $form_action "Flash and verify"]==0}]
if {$action_reset} {
- append console [encode [openocd "reset init"]]
+ append console [encode [capture "reset init"]]
}
</tcl>
</code><tcl>
@@ -594,7 +594,7 @@
}
append buffer "<br>"
if {$action_flash} {
- append console [encode [openocd "halt"]]
+ append console [encode [capture "halt"]]
append buffer "<b>"
if {[catch {capture {eval "flash write_image erase $upload_filename $form_offset $form_type"}} result]} {
append buffer "Flash write failed<br>"
@@ -606,7 +606,7 @@
append buffer "</b>"
}
if {$action_verify} {
- append console [encode [openocd "halt"]]
+ append console [encode [capture "halt"]]
append buffer "<b>"
if {[catch {capture {eval "verify_image $upload_filename $form_offset $form_type"}} result]} {
append buffer "Verify failed<br>"
@@ -674,10 +674,10 @@
append console [encode [capture {catch production_test}]]
}
if {[string compare $form_action "Power on"]==0} {
- append console [encode [openocd "power on"]]
+ append console [encode [capture "power on"]]
}
if {[string compare $form_action "Power off"]==0} {
- append console [encode [openocd "power off"]]
+ append console [encode [capture "power off"]]
}
</tcl>
</code>
@@ -751,8 +751,8 @@
if {[string compare $form_address ""]!=0} {
if {[string compare $form_action "Erase"]==0} {
append buffer "<code style=\"white-space: nowrap;\">"
- append console [encode [openocd "reset init"]]
- append console [encode [openocd "flash erase_address $form_address $form_length"]]
+ append console [encode [capture "reset init"]]
+ append console [encode [capture "flash erase_address $form_address $form_length"]]
append buffer </code>
}
}
@@ -808,25 +808,25 @@
set form_action [formfetch form_action]
if {[string compare $form_action "Run from address"]==0} {
- append console [encode [openocd "halt"]]
- append console [encode [openocd "wait_halt"]]
- append console [encode [openocd "resume $form_address"]]
+ append console [encode [capture "halt"]]
+ append console [encode [capture "wait_halt"]]
+ append console [encode [capture "resume $form_address"]]
}
if {[string compare $form_action "Halt"]==0} {
- append console [encode [openocd "halt"]]
- append console [encode [openocd "wait_halt"]]
+ append console [encode [capture "halt"]]
+ append console [encode [capture "wait_halt"]]
}
if {[string compare $form_action "Reset and run"]==0} {
- append console [encode [openocd "reset run"]]
+ append console [encode [capture "reset run"]]
}
if {[string compare $form_action "Reset and init"]==0} {
- append console [encode [openocd "reset init"]]
+ append console [encode [capture "reset init"]]
}
-append console [encode [openocd poll]]
+append console [encode [capture poll]]
</tcl>
@@ -941,10 +941,10 @@
set form_address "0x[tohex [expr $form_address+$form_length]]"
}
if {[string compare $form_action "Modify"]==0} {
- append console [openocd "$modify_cmd $form_address $form_value"]
+ append console [capture "$modify_cmd $form_address $form_value"]
}
if {[string compare $form_action "Fill"]==0} {
- append console [openocd "$modify_cmd $form_address $form_value $form_length"]
+ append console [capture "$modify_cmd $form_address $form_value $form_length"]
}
}
@@ -992,8 +992,8 @@
<code style="white-space: nowrap; font-size:11px;font:courier new;">
<tcl>
if {[string compare $form_address ""]!=0} {
- append console [encode [openocd halt]]
- append buffer [encode [openocd "$form_type $form_address [expr $form_length]"]]
+ append console [encode [capture halt]]
+ append buffer [encode [capture "$form_type $form_address [expr $form_length]"]]
}
</tcl>
</code>
@@ -1051,8 +1051,8 @@
</form>
<tcl>
if {[string compare $form_action "Download"]==0} {
- append console [encode [openocd "reset init"]]
- append console [encode [openocd "dump_image /ram/dump.bin $form_address $form_length"]]
+ append console [encode [capture "reset init"]]
+ append console [encode [capture "dump_image /ram/dump.bin $form_address $form_length"]]
</tcl>
<form action="../dump.bin" target="_blank">
<input type="submit" name="form_action" value="Save downloaded memory">
@@ -1344,7 +1344,7 @@
} err
}
if {[string compare $form_action "Delete"]==0} {
- openocd "rm $form_filename"
+ capture "rm $form_filename"
}
set form_edittext_subst [to_textarea $form_edittext]
@@ -1560,9 +1560,9 @@
set form_config [load_config "target/[load_target]"]
set support_id [string range [rand] 0 7]
set form_log ""
- append form_log "Version: [openocd "zy1000_version zy1000"]"
- append form_log "OpenOCD version: [openocd "zy1000_version openocd"]"
- append form_log "Version date: [openocd "zy1000_version date"]"
+ append form_log "Version: [capture "zy1000_version zy1000"]"
+ append form_log "OpenOCD version: [capture "zy1000_version openocd"]"
+ append form_log "Version date: [capture "zy1000_version date"]"
append form_log [log]
</tcl>
Modified: zy1000/trunk/build/menu/zy1000menu.xsl
===================================================================
--- zy1000/trunk/build/menu/zy1000menu.xsl 2008-12-16 22:20:10 UTC (rev 1251)
+++ zy1000/trunk/build/menu/zy1000menu.xsl 2008-12-17 09:56:59 UTC (rev 1252)
@@ -36,7 +36,7 @@
</div>
<div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('/rom/menu_cuts/top_right.png');">
<div class="textlight" style="position:relative;left:15px;top:4px;">
- <tcl>append buffer [openocd zy1000_version]</tcl>
+ <tcl>append buffer [capture zy1000_version]</tcl>
</div>
</div>
</div>
Modified: zy1000/trunk/build/tcl/openocd.cfg
===================================================================
--- zy1000/trunk/build/tcl/openocd.cfg 2008-12-16 22:20:10 UTC (rev 1251)
+++ zy1000/trunk/build/tcl/openocd.cfg 2008-12-17 09:56:59 UTC (rev 1252)
@@ -2,12 +2,7 @@
-proc openocd {cmd} {
- catch "ocd_$cmd" t
- return $t
-}
-
proc tohex {a} {
set r ""
while 1 {
|
|
From: <oh...@ma...> - 2008-12-16 23:20:15
|
Author: oharboe
Date: 2008-12-16 23:20:10 +0100 (Tue, 16 Dec 2008)
New Revision: 1251
Added:
trunk/src/server/httpd.c
zy1000/trunk/build/testhttpd.tcl
Modified:
trunk/configure.in
trunk/src/Makefile.am
trunk/src/main.c
trunk/src/openocd.c
trunk/src/server/Makefile.am
Log:
work in progress to hook up libmicrohttpd + tcl integration
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2008-12-16 21:10:06 UTC (rev 1250)
+++ trunk/configure.in 2008-12-16 22:20:10 UTC (rev 1251)
@@ -71,6 +71,10 @@
AS_HELP_STRING([--enable-ioutil], [Enable ioutil functions - useful for standalone OpenOCD implementations]),
[build_ioutil=$enableval], [build_ioutil=no])
+AC_ARG_ENABLE(httpd,
+ AS_HELP_STRING([--enable-httpd], [Enable builtin httpd server - useful for standalone OpenOCD implementations]),
+ [build_httpd=$enableval], [build_httpd=no])
+
case "${host_cpu}" in
arm*)
AC_ARG_ENABLE(ep93xx,
@@ -189,6 +193,12 @@
AC_DEFINE(BUILD_IOUTIL, 0, [0 if you don't want ioutils.])
fi
+if test $build_httpd = yes; then
+ AC_DEFINE(BUILD_HTTPD, 1, [1 if you want httpd.])
+else
+ AC_DEFINE(BUILD_HTTPD, 0, [0 if you don't want httpd.])
+fi
+
if test $build_at91rm9200 = yes; then
build_bitbang=yes
AC_DEFINE(BUILD_AT91RM9200, 1, [1 if you want at91rm9200.])
@@ -285,6 +295,7 @@
AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes)
AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes)
+AM_CONDITIONAL(HTTPD, test $build_httpd = yes)
AM_CONDITIONAL(AT91RM9200, test $build_at91rm9200 = yes)
AM_CONDITIONAL(BITBANG, test $build_bitbang = yes)
AM_CONDITIONAL(FT2232_LIBFTDI, test $build_ft2232_libftdi = yes)
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-12-16 21:10:06 UTC (rev 1250)
+++ trunk/src/Makefile.am 2008-12-16 22:20:10 UTC (rev 1251)
@@ -79,6 +79,13 @@
$(top_builddir)/src/pld/libpld.a \
$(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)
+
+if HTTPD
+openocd_LDADD += -lmicrohttpd
+endif
+
+
+
nobase_dist_pkglib_DATA = \
tcl/bitsbytes.tcl \
tcl/chip/atmel/at91/aic.tcl \
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2008-12-16 21:10:06 UTC (rev 1250)
+++ trunk/src/main.c 2008-12-16 22:20:10 UTC (rev 1251)
@@ -18,6 +18,12 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if !BUILD_HTTPD
/* implementations of OpenOCD that uses multithreading needs to know when
* OpenOCD is sleeping. No-op in vanilla OpenOCD
*/
@@ -28,13 +34,14 @@
void openocd_sleep_postlude(void)
{
}
+#endif
/* This is the main entry for developer PC hosted OpenOCD.
*
* OpenOCD can also be used as a library that is linked with
* another application(not mainstream yet, but possible), e.g.
* w/as an embedded application.
- *
+ *
* Those applications will have their own main() implementation
* and use bits and pieces from openocd.c. */
Modified: trunk/src/openocd.c
===================================================================
--- trunk/src/openocd.c 2008-12-16 21:10:06 UTC (rev 1250)
+++ trunk/src/openocd.c 2008-12-16 22:20:10 UTC (rev 1251)
@@ -229,6 +229,9 @@
return cmd_ctx;
}
+int httpd_start(void);
+void httpd_stop(void);
+
/* normally this is the main() function entry, but if OpenOCD is linked
* into application, then this fn will not be invoked, but rather that
* application will have it's own implementation of main(). */
@@ -255,6 +258,11 @@
if ( (ret != ERROR_OK) && (ret != ERROR_COMMAND_CLOSE_CONNECTION) )
return EXIT_FAILURE;
+#if BUILD_HTTPD
+ if (httpd_start()!=ERROR_OK)
+ return EXIT_FAILURE;
+#endif
+
if (ret != ERROR_COMMAND_CLOSE_CONNECTION)
{
command_context_mode(cmd_ctx, COMMAND_EXEC);
@@ -268,10 +276,15 @@
/* shut server down */
server_quit();
+#if BUILD_HTTPD
+ httpd_stop();
+#endif
+
unregister_all_commands(cmd_ctx);
/* free commandline interface */
command_done(cmd_ctx);
+
return EXIT_SUCCESS;
}
Modified: trunk/src/server/Makefile.am
===================================================================
--- trunk/src/server/Makefile.am 2008-12-16 21:10:06 UTC (rev 1250)
+++ trunk/src/server/Makefile.am 2008-12-16 22:20:10 UTC (rev 1251)
@@ -4,6 +4,11 @@
noinst_HEADERS = server.h telnet_server.h gdb_server.h
libserver_a_SOURCES = server.c telnet_server.c gdb_server.c
+if HTTPD
+libserver_a_SOURCES += httpd.c
+endif
+
+
# tcl server addons
noinst_HEADERS += tcl_server.h
libserver_a_SOURCES += tcl_server.c
Added: trunk/src/server/httpd.c
===================================================================
--- trunk/src/server/httpd.c 2008-12-16 21:10:06 UTC (rev 1250)
+++ trunk/src/server/httpd.c 2008-12-16 22:20:10 UTC (rev 1251)
@@ -0,0 +1,455 @@
+/***************************************************************************
+ * Copyright (C) 2007,2008 vind Harboe *
+ * oyv...@zy... *
+ * *
+ * Copyright (C) 2008 Free Software Foundation
+ * *
+ * 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. *
+ ***************************************************************************/
+
+/* some bits were copied from ahttpd which is under eCos license and
+ * copyright to FSF
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "replacements.h"
+
+#include "server.h"
+
+#include "log.h"
+#include "telnet_server.h"
+#include "target.h"
+
+#include <command.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <microhttpd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#define PAGE_NOT_FOUND "<html><head><title>File not found</title></head><body>File not found</body></html>"
+
+static const char *appendf(const *prev, const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ char *string = alloc_vprintf(format, ap);
+ va_end(ap);
+ char *string2 = NULL;
+
+ if (string != NULL)
+ {
+ string2 = alloc_printf("%s%s", (prev == NULL) ? "" : prev, string);
+ }
+
+ if (prev != NULL)
+ {
+ free(prev);
+ }
+
+ if (string == NULL)
+ free(string);
+
+ return string2;
+}
+
+static const char *httpd_exec_cgi_tcl_error(Jim_Interp *interp)
+{
+ int len, i;
+
+ const char *t = NULL;
+ t = appendf(t, "<html><body>\n");
+
+ t = appendf(t, "Runtime error, file \"%s\", line %d:<br>",
+ interp->errorFileName, interp->errorLine);
+ t = appendf(t, " %s<br>", Jim_GetString(interp->result, NULL));
+ Jim_ListLength(interp, interp->stackTrace, &len);
+ for (i = 0; i < len; i += 3)
+ {
+ Jim_Obj *objPtr;
+ const char *proc, *file, *line;
+
+ Jim_ListIndex(interp, interp->stackTrace, i, &objPtr, JIM_NONE);
+ proc = Jim_GetString(objPtr, NULL);
+ Jim_ListIndex(interp, interp->stackTrace, i + 1, &objPtr, JIM_NONE);
+ file = Jim_GetString(objPtr, NULL);
+ Jim_ListIndex(interp, interp->stackTrace, i + 2, &objPtr, JIM_NONE);
+ line = Jim_GetString(objPtr, NULL);
+ t = appendf(t, "In procedure '%s' called at file \"%s\", line %s<br>",
+ proc, file, line);
+ }
+ t = appendf(t, "</html></body>\n");
+
+ return t;
+}
+
+static int httpd_Jim_Command_writeform(Jim_Interp *interp, int argc,
+ Jim_Obj * const *argv)
+{
+ if (argc != 3)
+ {
+ Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
+ return JIM_ERR;
+ }
+ char *name = (char*) Jim_GetString(argv[1], NULL);
+ char *file = (char*) Jim_GetString(argv[2], NULL);
+
+ // Find length
+ char *data;
+ int actual;
+
+ int retcode;
+
+ const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
+ name);
+ retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ free((void *) script);
+ if (retcode != JIM_OK)
+ return retcode;
+
+ data = Jim_GetString(Jim_GetResult(interp), &actual);
+
+ FILE *f;
+ f = fopen(file, "wb");
+ if (f != NULL)
+ {
+ int ok;
+ ok = fwrite(data, 1, actual, f) == actual;
+ fclose(f);
+
+ if (!ok)
+ {
+ Jim_SetResultString(interp, "Could not write to file", -1);
+ return JIM_ERR;
+ }
+ }
+ else
+ {
+ Jim_SetResultString(interp, "Could not create file", -1);
+ return JIM_ERR;
+ }
+ return JIM_OK;
+}
+
+
+int
+httpd_Jim_Command_formfetch(Jim_Interp *interp,
+ int argc,
+ Jim_Obj *const *argv)
+{
+ if (argc!=2)
+ {
+ Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?");
+ return JIM_ERR;
+ }
+ char *name = (char*)Jim_GetString(argv[1], NULL);
+
+
+ const char *script = alloc_printf("set dummy_val $httppostdata(%s); set dummy_val",
+ name);
+ int retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ free((void *) script);
+ if (retcode != JIM_OK)
+ return retcode;
+
+ Jim_SetResult(interp, Jim_GetResult(interp));
+ return JIM_OK;
+}
+
+struct httpd_request
+{
+ int post;
+ struct MHD_PostProcessor *postprocessor;
+
+ //Jim_Obj *dict;
+
+ int complete; /* did we receive the entire post ? */
+
+};
+
+static void request_completed(void *cls, struct MHD_Connection *connection,
+ void **con_cls, enum MHD_RequestTerminationCode toe)
+{
+ struct httpd_request *r = (struct httpd_request*) *con_cls;
+
+ if (NULL == r)
+ return;
+
+ if (r->postprocessor)
+ {
+ MHD_destroy_post_processor(r->postprocessor);
+ }
+
+ free(r);
+ *con_cls = NULL;
+}
+
+/* append to said key in dictonary */
+static void append_key(struct httpd_request *r, const char *key,
+ const char *data, size_t off, size_t size)
+{
+ Jim_Obj *keyObj = Jim_NewStringObj(interp, key, -1);
+ Jim_Obj *value = NULL;
+
+ Jim_Obj *dict = Jim_GetVariableStr(interp, "httppostdata", 0);
+
+ if (dict!=NULL)
+ {
+ if (Jim_DictKey(interp, dict, keyObj, &value, 0) != JIM_OK)
+ {
+ value = NULL;
+ }
+ }
+ if (value == NULL)
+ value = Jim_NewStringObj(interp, "", -1);
+
+ /* create a new object we append to and insert into this location */
+ Jim_Obj *newObj = Jim_NewStringObj(interp, "", -1);
+ Jim_AppendObj(interp, newObj, value);
+ Jim_AppendString(interp, newObj, data, size);
+ /* uhh... use name here of dictionary */
+ Jim_SetDictKeysVector(interp, Jim_NewStringObj(interp, "httppostdata", -1), &keyObj, 1, newObj);
+}
+
+/* append data to each key */
+static int iterate_post(void *con_cls, enum MHD_ValueKind kind,
+ const char *key, const char *filename, const char *content_type,
+ const char *transfer_encoding, const char *data, size_t off,
+ size_t size)
+{
+ struct httpd_request *r = (struct httpd_request*) con_cls;
+
+ append_key(r, key, data, off, size);
+
+ return MHD_YES;
+}
+
+static int record_arg(void *cls, enum MHD_ValueKind kind, const char *key,
+ const char *value)
+{
+ struct httpd_request *r = (struct httpd_request*) cls;
+ append_key(r, key, value, 0, strlen(value));
+ return MHD_YES;
+}
+
+static int ahc_echo(void * cls, struct MHD_Connection * connection,
+ const char * url, const char * method, const char * version,
+ const char * upload_data, unsigned int * upload_data_size, void ** ptr)
+{
+ struct MHD_Response * response;
+ int ret;
+
+ int post = 0;
+
+ if (0 == strcmp(method, "POST"))
+ {
+ post = 1;
+ }
+ else if (0 == strcmp(method, "GET"))
+ {
+ }
+ else
+ {
+ return MHD_NO; /* unexpected method */
+ }
+
+ struct httpd_request *r;
+ if (*ptr == NULL)
+ {
+ /* The first time only the headers are valid,
+ do not respond in the first round... */
+
+ *ptr = malloc(sizeof(struct httpd_request));
+ if (*ptr == NULL)
+ return MHD_NO;
+ memset(*ptr, 0, sizeof(struct httpd_request));
+
+ r = (struct httpd_request *) *ptr;
+
+ r->post = post;
+
+// r->dict = Jim_NewDictObj(interp, NULL, 0);
+
+ /* fill in url query strings in dictonary */
+ MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND,
+ record_arg, r);
+
+ if (r->post)
+ {
+ r->postprocessor = MHD_create_post_processor(connection, 2048
+ * 1024, iterate_post, r);
+ }
+
+ return MHD_YES;
+ }
+
+ r = (struct httpd_request *) *ptr;
+
+ if (r->post)
+ {
+ /* consume post data */
+ if (*upload_data_size)
+ {
+ MHD_post_process(r->postprocessor, upload_data, *upload_data_size);
+ *upload_data_size = 0;
+ return MHD_YES;
+ }
+ else
+ {
+ }
+ } else
+ {
+ }
+
+ /* hand over to request who will be using it. */
+ //Jim_SetGlobalVariableStr(interp, "httppostdata", Jim_GetVariableStr(interp, "httppostdata", 0));
+ // r->dict = NULL;
+
+
+ /* FIX!!!! we need more advanced handling of url's to avoid them
+ * being subverted to evil purposes
+ */
+
+ url++; /* skip '/' */
+
+ const char *suffix;
+ suffix = strrchr(url, '.');
+ if ((suffix != NULL) && (strcmp(suffix, ".tcl") == 0))
+ {
+ printf("Run tcl %s\n", url);
+
+ int retcode;
+
+ const char *script = alloc_printf(
+ "global httpdata; source {%s}; set httpdata", url);
+ retcode = Jim_Eval_Named(interp, script, "httpd.c", __LINE__ );
+ free((void *) script);
+
+ if (retcode == JIM_ERR)
+ {
+ printf("Tcl failed\n");
+ const char *t = httpd_exec_cgi_tcl_error(interp);
+ if (t == NULL)
+ return MHD_NO;
+
+ response = MHD_create_response_from_data(strlen(t), (void *) t,
+ MHD_YES, MHD_NO);
+ ret = MHD_queue_response(connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR, response);
+ MHD_destroy_response(response);
+ return ret;
+ }
+ else
+ {
+ printf("Tcl OK\n");
+ /* FIX!!! how to handle mime types??? */
+ const char *result;
+ int reslen;
+ result = Jim_GetString(Jim_GetResult(interp), &reslen);
+
+ response = MHD_create_response_from_data(reslen, (void *) result,
+ MHD_NO, MHD_YES);
+ ret = MHD_queue_response(connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR, response);
+ MHD_destroy_response(response);
+ return ret;
+ }
+ }
+ else
+ {
+ void *data;
+ int len;
+
+ int retval = loadFile(url, &data, &len);
+ if (retval != ERROR_OK)
+ {
+ printf("Did not find %s\n", url);
+
+ response = MHD_create_response_from_data(strlen(PAGE_NOT_FOUND),
+ (void *) PAGE_NOT_FOUND, MHD_NO, MHD_NO);
+ ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response);
+ MHD_destroy_response(response);
+ return ret;
+ }
+
+ printf("Serving %s length=%d\n", url, len);
+ /* serve file directly */
+ response = MHD_create_response_from_data(len, data, MHD_YES, MHD_NO);
+ MHD_add_response_header(response, "Content-Type", "image/png");
+
+ ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
+ MHD_destroy_response(response);
+
+ //free(data);
+ return ret;
+ }
+}
+
+static struct MHD_Daemon * d;
+
+int httpd_start(void)
+{
+
+ int port = 8888;
+ LOG_USER("Launching httpd server on port %d", port);
+ d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, port, NULL, NULL,
+ &ahc_echo, NULL, /* could be data for handler, but we only have a single handler, use global variables instead */
+ MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL, /* Closure... what's that??? */
+ MHD_OPTION_END);
+ if (d == NULL)
+ return ERROR_FAIL;
+
+ Jim_CreateCommand(interp,
+ "formfetch",
+ httpd_Jim_Command_formfetch,
+ NULL,
+ NULL);
+
+ Jim_CreateCommand(interp,
+ "writeform",
+ httpd_Jim_Command_writeform,
+ NULL,
+ NULL);
+
+
+ return ERROR_OK;
+}
+
+void httpd_stop(void)
+{
+ MHD_stop_daemon(d);
+}
+
+void openocd_sleep_prelude(void)
+{
+}
+
+void openocd_sleep_postlude(void)
+{
+}
+
Added: zy1000/trunk/build/testhttpd.tcl
===================================================================
--- zy1000/trunk/build/testhttpd.tcl 2008-12-16 21:10:06 UTC (rev 1250)
+++ zy1000/trunk/build/testhttpd.tcl 2008-12-16 22:20:10 UTC (rev 1251)
@@ -0,0 +1,41 @@
+# some dummy proc's to get things going for test purposes
+
+proc zy1000_version {args} {
+return abc
+}
+
+script ../zy1000/linux_zy1000/build/tcl/openocd.cfg
+
+interface dummy
+
+
+proc ip {} {
+return 10.0.0.55
+}
+
+proc start_chunked {a} {
+ global httpdata
+ global httpmime
+ set httpmime $a
+ set httpdata ""
+}
+
+proc write_chunked {a} {
+ global httpdata
+ append httpdata $a
+}
+
+proc end_chunked {} {
+}
+
+
+
+#proc formfetch {a} {
+# global httppostdata
+ #catch {
+# echo "$a=$httppostdata($a)"
+ #return $httppostdata($a)
+ #}
+#
+ #return ""
+#}
\ No newline at end of file
|