| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Helper is now unused. Can be removed.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
this bunch was a bit less obvious, but looked
straightforward.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
this batch of fixes should be pretty straightforward
rename of 'index' and an 'i' local variable shadowing.
'index' conflicts with a global name.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
use obtuse local variable names in macros to avoid
interfering with global name space
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
tcl "puts" didn't work because the logging code sensored strings
that did not include a '\n'. The correct thing is to sensor
empty strings, which are used to keep gdb connection alive.
The tcl "puts" code broke apart strings which do contain '\n' in
order to implement the -nonewline argument, which is how it
got hurt by the bug in log.c
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Various commands, e.g. "arm mcr xxxx" would fail if invoked upon startup
since it there was no command context defined for the jim interpreter
in that case.
A Jim interpreter is now associated with a command context(telnet,
gdb server's) or the default global command context.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
Remove unused functions:
- log_catch
- log_rethrow
- log_try
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private data and functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
| |
Remove unused functions:
- timeval_add
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
When registering cmds we report duplicate attempts to register a cmd
as a LOG_ERROR.
Some situations need this, such as when registering dual flash banks.
http://www.mail-archive.com/openocd-development@lists.berlios.de/msg11152.html
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
| |
Building with clang took a few very small changes. The change to
helper/log.h is because clang doesn't like an expression where the
result is unused. In helper/system.h, I just defined true and false
since clang doesn't have them builtin.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cygwin would fail to reopen a previously written file if the mode is
not given.
Simplified converting the open flags and made sure the win32 O_BINARY
bit is set.
Added define for systems that do not support O_BINARY.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
SYS_FLEN would be called before a write on a descriptor to check its size.
Currently lseek would fail with -1 when given the stdout/stderr descriptor.
Changing to use fstat seems to be the standard way of handling this.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default script search path on Windows is out of date with
the current layout (from installation and documentation), which
makes the standard script library not be found after a normal
./configure && make && make install
under msys/MinGW. The same should hold true for cygwin native builds
(not verified).
Update search path to ../share/openocd/scripts not ../lib/openocd,
relative to the openocd executable.
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
| |
one line / command instead of one line per argument.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
we don't need to know the build path of command.c when
reading normal user level error messages.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
| |
Based on notes from Tomek Cedro <tomek.cedro@gmail.com> and
Steve Franks <bahamasfranks@gmail.com>.
In the User's Guide, sort the list of operating systems reported
through Tcl with $ocd_HOSTOS ... and include FreeBSD.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
Make "usage" messages use the same EBNF as the User's Guide;
no angle brackets. Improve and correct various helptexts.
Don't use "&function"; a function's name is its address.
Fix some whitespace glitches, shrink a few overlong lines.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
Recent Apple gcc versions use __APPLE__ instead of __DARWIN__; accept
that too.
Also use #warning, not #warn; neither is standard, but most CPP versions
require it to be spelled out.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
Starting the daemon with with just a bare "openocd" I saw:
Can't find openocd.cfg
That's not an error; don't treat it as if it were. There may
be an error later -- like, "no interface set up" -- but let
messages only report real errors, not fake ones.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most commands are usable only at runtime; so don't bother saying
that, it's noise. Moreover, tokens like EXEC are cryptic. Be
more clear: highlight only the commands which may (also) be used
during the config stage, thus matching the docs more closely.
There are
- Configuration commands (per documentation)
- And also some commands that valid at *any* time.
Update the docs to note that "help" now shows this mode info.
This also highlighted a few mistakes in command configuration,
mostly commands listed as "valid at any time" which shouldn't
have been. This just fixes ones I noted when sanity testing.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
This makes it so that the usage/help command properly uses the whole command,
including subcommand, in the search for help information. This previously
caused erroneous output from the usage command handler.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
| |
I wanted to make it so I can be ignorant of a commands invocation string, so
I tried to use CMD_CURRENT (aka cmd->current) which is supposed to house a
pointer to the current command. It turns out that this wasn't being set.
This patch adds the current command structure to the command invocation
structure before sending it along to the command handler.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
| |
It's less accepting of signed char ... insisting that e.g. tolower()
not receive one as a parameter.
It's probably good to phase out such usage, given the number of bugs
that lurk in the vicinity (assumptions that char is unsigned), so fix
these even though such usage is actually legal.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Restore behavior where help lists all commands that
match string passed to help.
Signed-off-by: Oyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
A crisper/faster implementation under eCos that makes profiling a
tad easier.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
COMMAND_REGISTER() was only used transiently during
code conversion.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
This allows including generated include files.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
More updates from the code review by Steve Grubb <sgrubb@redhat.com>.
The Jim float-comparision bug just gets a comment not a fix, though.
Cc: Steve Grubb <sgrubb@redhat.com>.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
| |
Commands that do not need to use Jim should be registered as
high-level command handlers.
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
| |
With all #include directives converted, we only need to have the
top-level src/ directory in the search path.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes from the flat namespace to heirarchical one. Instead of writing:
#include "server.h"
the following form should be used.
#include <server/server.h>
The exception is from .c files in the same directory.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes from the flat namespace to heirarchical one. Instead of writing:
#include "target.h"
the following form should be used.
#include <target/target.h>
The exception is from .c files in the same directory.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes from the flat namespace to heirarchical one. Instead of writing:
#include "types.h"
the following form should be used.
#include <helper/types.h>
The exception is from .c files in the same directory.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes from the flat namespace to heirarchical one. Instead of writing:
#include "jim.h"
the following form should be used.
#include <helper/jim.h>
The exception is from .c files in the same directory.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes from the flat namespace to heirarchical one. Instead of writing:
#include "command.h"
the following form should be used.
#include <helper/command.h>
The exception is from .c files in the same directory.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Includes the src directory in the search path, so header files may be
migrated from:
#include "foo.h"
to
#include <module/foo.h>
which is more conducive for installation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new stubs for httpd and ioutil gave errors like:
ioutil_stubs.c: In function ‘ioutil_init’:
ioutil_stubs.c:27: error: implicit declaration of function ‘LOG_DEBUG’
ioutil_stubs.c:28: error: ‘ERROR_OK’ undeclared (first use in this function)
ioutil_stubs.c:28: error: (Each undeclared identifier is reported only once
ioutil_stubs.c:28: error: for each function it appears in.)
Fix.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
Add ioutil_stubs.c to provide an empty ioutil_init() routine.
Add ioutil.h to prevent applications from needing to declare it.
Allows unconditionally calling that function during startup, and the
resulting libocdhelper library API is now more stable.
Prints a DEBUG message when the stub implementation is included.
|
|
|
|
|
|
|
| |
In embedded hosts, the Jim interpreter can come from the
existing context rather than be created by OpenOCD.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
Ensures that the correct information gets displayed, depending on the
mode of the command being denied. Fixes misreporting all commands as
needing to run "before 'init'".
|
|
|
|
|
|
|
| |
Finish removing references to the 'interp' global variable from the
command module, encapsulating all reference via command_context.
Eliminates use of the global entirely, so it can be removed. Hurrah!
|
|
|
|
|
|
| |
Adds a log_capture_state structure to pass to the log capture
callback used by the command module. Ensures that the capture occurs
in the proper context.
|