Browse Source

target: further shrink Jim-awareness

Don't include <helper/jim.h> from target.h ... not everything
which touches targets needs to be able to talk to Jim.  Plus,
most files include this header by another path.

Also, switch the affected files to use the classic sequence
for #included files:  all <framework/headers.h> first, then
the "local_headers.h".  This helps prevent growth of problematic
layering, by minimizing entanglement.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
tags/v0.4.0-rc1
David Brownell 14 years ago
parent
commit
38e376d232
4 changed files with 10 additions and 7 deletions
  1. +3
    -2
      src/target/target.c
  2. +1
    -2
      src/target/target.h
  3. +3
    -2
      src/target/target_request.c
  4. +3
    -1
      src/target/testee.c

+ 3
- 2
src/target/target.c View File

@@ -33,15 +33,16 @@
#include "config.h"
#endif

#include <helper/time_support.h>
#include <jtag/jtag.h>

#include "target.h"
#include "target_type.h"
#include "target_request.h"
#include "breakpoints.h"
#include <helper/time_support.h>
#include "register.h"
#include "trace.h"
#include "image.h"
#include <jtag/jtag.h>


static int target_array2mem(Jim_Interp *interp, struct target *target, int argc, Jim_Obj *const *argv);


+ 1
- 2
src/target/target.h View File

@@ -27,7 +27,6 @@
#define TARGET_H

#include <helper/types.h>
#include <helper/jim.h>

struct reg;
struct trace;
@@ -214,7 +213,7 @@ enum target_event

struct target_event_action {
enum target_event event;
Jim_Interp *interp;
struct Jim_Interp *interp;
struct Jim_Obj *body;
int has_percent;
struct target_event_action *next;


+ 3
- 2
src/target/target_request.c View File

@@ -27,12 +27,13 @@
#include "config.h"
#endif

#include <helper/log.h>
#include <helper/binarybuffer.h>

#include "target.h"
#include "target_request.h"
#include "target_type.h"
#include <helper/binarybuffer.h>
#include "trace.h"
#include <helper/log.h>


static int charmsg_mode = 0;


+ 3
- 1
src/target/testee.c View File

@@ -20,9 +20,11 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <helper/log.h>

#include "target.h"
#include "target_type.h"
#include <helper/log.h>
#include "hello.h"

static const struct command_registration testee_command_handlers[] = {


Loading…
Cancel
Save