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
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <zw...@ma...> - 2009-05-11 07:50:32
|
Author: zwelch Date: 2009-05-11 07:50:21 +0200 (Mon, 11 May 2009) New Revision: 1718 Modified: trunk/src/helper/log.c trunk/src/helper/options.c Log: Mark API layering violations in the helper module with @todo notes. Modified: trunk/src/helper/log.c =================================================================== --- trunk/src/helper/log.c 2009-05-11 05:33:39 UTC (rev 1717) +++ trunk/src/helper/log.c 2009-05-11 05:50:21 UTC (rev 1718) @@ -29,6 +29,7 @@ #include "log.h" #include "time_support.h" +// @todo the inclusion of server.h here is a layering violation #include "server.h" #include <stdarg.h> Modified: trunk/src/helper/options.c =================================================================== --- trunk/src/helper/options.c 2009-05-11 05:33:39 UTC (rev 1717) +++ trunk/src/helper/options.c 2009-05-11 05:50:21 UTC (rev 1718) @@ -26,6 +26,7 @@ #include "configuration.h" #include "log.h" +// @todo the inclusion of server.h here is a layering violation #include "server.h" #include <getopt.h> |
From: <zw...@ma...> - 2009-05-11 07:33:50
|
Author: zwelch Date: 2009-05-11 07:33:39 +0200 (Mon, 11 May 2009) New Revision: 1717 Modified: trunk/src/helper/replacements.h Log: Remove redundant config.h from replacements.h, obtained from types.h. Modified: trunk/src/helper/replacements.h =================================================================== --- trunk/src/helper/replacements.h 2009-05-11 05:00:17 UTC (rev 1716) +++ trunk/src/helper/replacements.h 2009-05-11 05:33:39 UTC (rev 1717) @@ -26,10 +26,6 @@ #ifndef REPLACEMENTS_H #define REPLACEMENTS_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "types.h" #include "system.h" |
From: <zw...@ma...> - 2009-05-11 07:00:48
|
Author: zwelch Date: 2009-05-11 07:00:17 +0200 (Mon, 11 May 2009) New Revision: 1716 Modified: trunk/src/ecosboard.c trunk/src/openocd.c Log: Audit and eliminate redundant #include directives in main src/ files. Modified: trunk/src/ecosboard.c =================================================================== --- trunk/src/ecosboard.c 2009-05-11 04:56:37 UTC (rev 1715) +++ trunk/src/ecosboard.c 2009-05-11 05:00:17 UTC (rev 1716) @@ -21,68 +21,54 @@ #include "config.h" #endif -#include "log.h" -#include "types.h" -#include "jtag.h" #include "configuration.h" +#include "time_support.h" + +#include "jtag.h" #include "xsvf.h" #include "svf.h" #include "target.h" #include "flash.h" #include "nand.h" #include "pld.h" +#include "rom.h" -#include "command.h" #include "server.h" #include "telnet_server.h" #include "gdb_server.h" -#include <time_support.h> -#include <sys/time.h> -#include <strings.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> - -#include <cyg/io/flash.h> #include <pkgconf/fs_jffs2.h> // Address of JFFS2 #include <network.h> -#include <fcntl.h> -#include <sys/stat.h> -#include <cyg/fileio/fileio.h> +#include <arpa/inet.h> #include <dirent.h> +#include <net/if.h> +#include <netdb.h> +#include <netinet/tcp.h> +#include <stdarg.h> +#include <sys/ioctl.h> +#include <sys/stat.h> + #include <cyg/athttpd/http.h> #include <cyg/athttpd/socket.h> #include <cyg/athttpd/handler.h> #include <cyg/athttpd/cgi.h> #include <cyg/athttpd/forms.h> #include <cyg/discover/discover.h> +#include <cyg/fileio/fileio.h> #include <cyg/hal/hal_diag.h> -#include <cyg/kernel/kapi.h> +#include <cyg/io/flash.h> #include <cyg/io/serialio.h> #include <cyg/io/io.h> -#include <netinet/tcp.h> -#include "rom.h" -#include <sys/ioctl.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <net/if.h> -#include <arpa/inet.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netdb.h> -#include <netinet/in.h> -#include <unistd.h> -#include <arpa/inet.h> -#include <stdio.h> +#include <cyg/kernel/kapi.h> + +#ifdef HAVE_IFADDRS_H #include <ifaddrs.h> -#include <string.h> +#endif +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif -#include <unistd.h> -#include <stdio.h> #define MAX_IFS 64 #if defined(CYGPKG_NET_FREEBSD_STACK) #include <tftp_support.h> @@ -1096,20 +1082,7 @@ #include <cyg/kernel/ktypes.h> // base kernel types #include <cyg/infra/cyg_trac.h> // tracing macros #include <cyg/infra/cyg_ass.h> // assertion macros -#include <unistd.h> -#include <sys/types.h> -#include <fcntl.h> -#include <sys/stat.h> -#include <errno.h> -#include <dirent.h> - -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include <cyg/fileio/fileio.h> - #include <cyg/kernel/kapi.h> #include <cyg/infra/diag.h> Modified: trunk/src/openocd.c =================================================================== --- trunk/src/openocd.c 2009-05-11 04:56:37 UTC (rev 1715) +++ trunk/src/openocd.c 2009-05-11 05:00:17 UTC (rev 1716) @@ -28,8 +28,6 @@ #include "config.h" #endif -#include "log.h" -#include "types.h" #include "jtag.h" #include "configuration.h" #include "xsvf.h" @@ -40,19 +38,14 @@ #include "pld.h" #include "mflash.h" -#include "command.h" #include "server.h" #include "telnet_server.h" #include "gdb_server.h" #include "tcl_server.h" -#include <sys/time.h> +#ifdef HAVE_STRINGS_H #include <strings.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> +#endif #define OPENOCD_VERSION \ |
From: <zw...@ma...> - 2009-05-11 06:57:36
|
Author: zwelch Date: 2009-05-11 06:56:37 +0200 (Mon, 11 May 2009) New Revision: 1715 Modified: trunk/src/target/algorithm.c trunk/src/target/avrt.c trunk/src/target/avrt.h trunk/src/target/breakpoints.c trunk/src/target/cortex_a8.c trunk/src/target/cortex_m3.c trunk/src/target/embeddedice.c trunk/src/target/embeddedice.h trunk/src/target/etb.c trunk/src/target/etb.h trunk/src/target/etm.c trunk/src/target/etm.h trunk/src/target/etm_dummy.c trunk/src/target/etm_dummy.h trunk/src/target/feroceon.c trunk/src/target/image.c trunk/src/target/image.h trunk/src/target/mips32.c trunk/src/target/mips32.h trunk/src/target/mips32_dmaacc.c trunk/src/target/mips32_pracc.c trunk/src/target/mips_ejtag.c trunk/src/target/mips_ejtag.h trunk/src/target/mips_m4k.c trunk/src/target/mips_m4k.h trunk/src/target/oocd_trace.c trunk/src/target/oocd_trace.h trunk/src/target/register.c trunk/src/target/register.h trunk/src/target/target_request.c trunk/src/target/trace.c trunk/src/target/trace.h trunk/src/target/xscale.c trunk/src/target/xscale.h Log: Audit and eliminate redundant #include directives in other target files. Modified: trunk/src/target/algorithm.c =================================================================== --- trunk/src/target/algorithm.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/algorithm.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -22,14 +22,10 @@ #endif #include "algorithm.h" - -#include "log.h" -#include "configuration.h" +#include "replacements.h" #include "binarybuffer.h" -#include <stdlib.h> - void init_mem_param(mem_param_t *param, u32 address, u32 size, enum param_direction direction) { param->address = address; Modified: trunk/src/target/avrt.c =================================================================== --- trunk/src/target/avrt.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/avrt.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,27 +21,12 @@ #include "config.h" #endif -#include "replacements.h" - #include "avrt.h" - -#include "register.h" #include "target.h" -#include "log.h" -#include "jtag.h" -#include "binarybuffer.h" -#include "time_support.h" -#include "breakpoints.h" -#include "fileio.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> +#define AVR_JTAG_INS_LEN 4 -#define AVR_JTAG_INS_LEN 4 - /* cli handling */ int avr_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/target/avrt.h =================================================================== --- trunk/src/target/avrt.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/avrt.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -20,6 +20,8 @@ #ifndef AVRT_H #define AVRT_H +#include "jtag.h" + typedef struct mcu_jtag_s { jtag_tap_t *tap; Modified: trunk/src/target/breakpoints.c =================================================================== --- trunk/src/target/breakpoints.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/breakpoints.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,15 +21,11 @@ #include "config.h" #endif -#include <stdlib.h> - -#include "binarybuffer.h" #include "target.h" #include "log.h" -#include "types.h" - #include "breakpoints.h" + static char *breakpoint_type_strings[] = { "hardware", Modified: trunk/src/target/cortex_a8.c =================================================================== --- trunk/src/target/cortex_a8.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/cortex_a8.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -33,20 +33,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "cortex_a8.h" -#include "armv7m.h" - -#include "register.h" -#include "target.h" #include "target_request.h" -#include "log.h" -#include "jtag.h" -#include "arm_jtag.h" -#include <stdlib.h> -#include <string.h> /* cli handling */ int cortex_a8_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/target/cortex_m3.c =================================================================== --- trunk/src/target/cortex_m3.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/cortex_m3.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -31,20 +31,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "cortex_m3.h" -#include "armv7m.h" - -#include "register.h" -#include "target.h" #include "target_request.h" -#include "log.h" -#include "jtag.h" -#include "arm_jtag.h" -#include <stdlib.h> -#include <string.h> /* cli handling */ int cortex_m3_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/target/embeddedice.c =================================================================== --- trunk/src/target/embeddedice.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/embeddedice.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -29,19 +29,7 @@ #include "embeddedice.h" -#include "armv4_5.h" -#include "arm7_9_common.h" -#include "log.h" -#include "arm_jtag.h" -#include "types.h" -#include "binarybuffer.h" -#include "target.h" -#include "register.h" -#include "jtag.h" - -#include <stdlib.h> - #if 0 static bitfield_desc_t embeddedice_comms_ctrl_bitfield_desc[] = { Modified: trunk/src/target/embeddedice.h =================================================================== --- trunk/src/target/embeddedice.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/embeddedice.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -26,9 +26,6 @@ #ifndef EMBEDDED_ICE_H #define EMBEDDED_ICE_H -#include "target.h" -#include "register.h" -#include "arm_jtag.h" #include "arm7_9_common.h" enum Modified: trunk/src/target/etb.c =================================================================== --- trunk/src/target/etb.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/etb.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,21 +21,10 @@ #include "config.h" #endif -#include <string.h> - #include "arm7_9_common.h" #include "etb.h" -#include "etm.h" -#include "log.h" -#include "types.h" -#include "binarybuffer.h" -#include "target.h" -#include "register.h" -#include "jtag.h" -#include <stdlib.h> - static char* etb_reg_list[] = { "ETB_identification", Modified: trunk/src/target/etb.h =================================================================== --- trunk/src/target/etb.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/etb.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -20,12 +20,6 @@ #ifndef ETB_H #define ETB_H -#include "command.h" -#include "target.h" -#include "register.h" -#include "arm_jtag.h" - -#include "etb.h" #include "etm.h" /* ETB registers */ Modified: trunk/src/target/etm.c =================================================================== --- trunk/src/target/etm.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/etm.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,27 +21,13 @@ #include "config.h" #endif -#include <string.h> - #include "etm.h" #include "etb.h" - -#include "armv4_5.h" +#include "image.h" #include "arm7_9_common.h" #include "arm_disassembler.h" -#include "arm_simulator.h" -#include "log.h" -#include "arm_jtag.h" -#include "types.h" -#include "binarybuffer.h" -#include "target.h" -#include "register.h" -#include "jtag.h" -#include "fileio.h" -#include <stdlib.h> - /* ETM register access functionality * */ Modified: trunk/src/target/etm.h =================================================================== --- trunk/src/target/etm.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/etm.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -23,14 +23,12 @@ #ifndef ETM_H #define ETM_H -#include "image.h" #include "trace.h" -#include "target.h" -#include "register.h" #include "arm_jtag.h" - #include "armv4_5.h" +struct image_s; + /* ETM registers (V1.3 protocol) */ enum { @@ -152,7 +150,7 @@ etm_portmode_t portmode; /* normal, multiplexed or demultiplexed */ etmv1_tracemode_t tracemode; /* type of information the trace contains (data, addres, contextID, ...) */ armv4_5_state_t core_state; /* current core state (ARM, Thumb, Jazelle) */ - image_t *image; /* source for target opcodes */ + struct image_s *image; /* source for target opcodes */ u32 pipe_index; /* current trace cycle */ u32 data_index; /* cycle holding next data packet */ int data_half; /* port half on a 16 bit port */ Modified: trunk/src/target/etm_dummy.c =================================================================== --- trunk/src/target/etm_dummy.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/etm_dummy.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,20 +21,9 @@ #include "config.h" #endif -#include <string.h> - #include "etm_dummy.h" -#include "etm.h" - #include "arm7_9_common.h" -#include "log.h" -#include "types.h" -#include "binarybuffer.h" -#include "target.h" -#include "register.h" -#include "jtag.h" -#include <stdlib.h> static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { Modified: trunk/src/target/etm_dummy.h =================================================================== --- trunk/src/target/etm_dummy.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/etm_dummy.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -20,11 +20,6 @@ #ifndef ETM_DUMMY_H #define ETM_DUMMY_H -#include "command.h" -#include "target.h" -#include "register.h" -#include "arm_jtag.h" - #include "etm.h" extern etm_capture_driver_t etm_dummy_capture_driver; Modified: trunk/src/target/feroceon.c =================================================================== --- trunk/src/target/feroceon.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/feroceon.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -50,11 +50,7 @@ #endif #include "arm926ejs.h" -#include "jtag.h" -#include "log.h" -#include <stdlib.h> -#include <string.h> int feroceon_examine(struct target_s *target); int feroceon_target_create(struct target_s *target, Jim_Interp *interp); Modified: trunk/src/target/image.c =================================================================== --- trunk/src/target/image.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/image.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -27,20 +27,10 @@ #include "config.h" #endif -#include <stdlib.h> -#include <string.h> -#ifdef HAVE_ELF_H -#include <elf.h> -#endif - #include "image.h" - -#include "types.h" -#include "replacements.h" +#include "target.h" #include "log.h" -#include "fileio.h" -#include "target.h" /* convert ELF header field to host endianness */ #define field16(elf,field)\ Modified: trunk/src/target/image.h =================================================================== --- trunk/src/target/image.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/image.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -26,16 +26,11 @@ #ifndef IMAGE_H #define IMAGE_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include "fileio.h" #ifdef HAVE_ELF_H #include <elf.h> #endif -#include "replacements.h" -#include "fileio.h" -#include "target.h" #define IMAGE_MAX_ERROR_STRING (256) #define IMAGE_MAX_SECTIONS (128) @@ -85,7 +80,7 @@ typedef struct image_memory_s { - target_t *target; + struct target_s *target; u8 *cache; u32 cache_address; } image_memory_t; Modified: trunk/src/target/mips32.c =================================================================== --- trunk/src/target/mips32.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips32.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -27,11 +27,7 @@ #endif #include "mips32.h" -#include "jtag.h" -#include "log.h" -#include <stdlib.h> -#include <string.h> char* mips32_core_reg_list[] = { Modified: trunk/src/target/mips32.h =================================================================== --- trunk/src/target/mips32.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips32.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -25,9 +25,9 @@ #include "target.h" #include "register.h" -#include "mips_ejtag.h" #include "mips32_pracc.h" + #define MIPS32_COMMON_MAGIC 0xB320B320 /* offsets into mips32 core register cache */ @@ -69,7 +69,7 @@ typedef struct mips32_core_reg_s { u32 num; - target_t *target; + struct target_s *target; mips32_common_t *mips32_common; } mips32_core_reg_t; Modified: trunk/src/target/mips32_dmaacc.c =================================================================== --- trunk/src/target/mips32_dmaacc.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips32_dmaacc.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -26,11 +26,9 @@ #include "config.h" #endif -#include <string.h> -#include "log.h" -#include "mips32.h" #include "mips32_dmaacc.h" + /* * The following logic shamelessly cloned from HairyDairyMaid's wrt54g_debrick * to support the Broadcom BCM5352 SoC in the Linksys WRT54GL wireless router Modified: trunk/src/target/mips32_pracc.c =================================================================== --- trunk/src/target/mips32_pracc.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips32_pracc.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -74,8 +74,6 @@ #include "config.h" #endif -#include <string.h> -#include "log.h" #include "mips32.h" #include "mips32_pracc.h" Modified: trunk/src/target/mips_ejtag.c =================================================================== --- trunk/src/target/mips_ejtag.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips_ejtag.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -26,12 +26,7 @@ #include "mips32.h" #include "mips_ejtag.h" -#include "binarybuffer.h" -#include "log.h" -#include "jtag.h" -#include <stdlib.h> - int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, void *delete_me_and_submit_patch) { jtag_tap_t *tap; Modified: trunk/src/target/mips_ejtag.h =================================================================== --- trunk/src/target/mips_ejtag.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips_ejtag.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -23,7 +23,6 @@ #ifndef MIPS_EJTAG #define MIPS_EJTAG -#include "types.h" #include "jtag.h" /* tap instructions */ Modified: trunk/src/target/mips_m4k.c =================================================================== --- trunk/src/target/mips_m4k.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips_m4k.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -26,11 +26,7 @@ #include "mips32.h" #include "mips_m4k.h" #include "mips32_dmaacc.h" -#include "jtag.h" -#include "log.h" -#include <stdlib.h> -#include <string.h> /* cli handling */ Modified: trunk/src/target/mips_m4k.h =================================================================== --- trunk/src/target/mips_m4k.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/mips_m4k.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -23,9 +23,10 @@ #ifndef MIPS_M4K_H #define MIPS_M4K_H -#include "register.h" -#include "target.h" +#include "types.h" +struct target_s; + #define MIPSM4K_COMMON_MAGIC 0xB321B321 typedef struct mips_m4k_common_s @@ -34,7 +35,7 @@ mips32_common_t mips32_common; } mips_m4k_common_t; -extern int mips_m4k_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buffer); +extern int mips_m4k_bulk_write_memory(struct target_s *target, u32 address, u32 count, u8 *buffer); extern void mips_m4k_enable_breakpoints(struct target_s *target); extern int mips_m4k_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint); Modified: trunk/src/target/oocd_trace.c =================================================================== --- trunk/src/target/oocd_trace.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/oocd_trace.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,25 +21,14 @@ #include "config.h" #endif +// we must define _GNU_SOURCE to get strndup #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif -#include <string.h> -#include <errno.h> #include "oocd_trace.h" -#include "etm.h" - -#include "log.h" -#include "types.h" -#include "binarybuffer.h" -#include "target.h" -#include "register.h" -#include "jtag.h" #include "arm7_9_common.h" -#include "replacements.h" -#include <stdlib.h> static int oocd_trace_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/target/oocd_trace.h =================================================================== --- trunk/src/target/oocd_trace.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/oocd_trace.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -20,12 +20,9 @@ #ifndef OOCD_TRACE_H #define OOCD_TRACE_H -#include "command.h" - #include "etm.h" #include <termios.h> -#include <unistd.h> /* registers */ enum Modified: trunk/src/target/register.c =================================================================== --- trunk/src/target/register.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/register.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -25,12 +25,8 @@ #endif #include "register.h" - #include "log.h" -#include "command.h" -#include <string.h> -#include <stdlib.h> reg_arch_type_t *reg_arch_types = NULL; Modified: trunk/src/target/register.h =================================================================== --- trunk/src/target/register.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/register.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -24,7 +24,6 @@ #define REGISTER_H #include "types.h" -#include "target.h" struct target_s; Modified: trunk/src/target/target_request.c =================================================================== --- trunk/src/target/target_request.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/target_request.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -27,16 +27,11 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" -#include "target.h" #include "target_request.h" #include "binarybuffer.h" -#include "command.h" #include "trace.h" +#include "log.h" -#include <stdlib.h> -#include <string.h> static command_t *target_request_cmd = NULL; static int charmsg_mode = 0; Modified: trunk/src/target/trace.c =================================================================== --- trunk/src/target/trace.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/trace.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -21,14 +21,10 @@ #include "config.h" #endif -#include "replacements.h" #include "log.h" #include "trace.h" #include "target.h" -#include "command.h" -#include <stdlib.h> -#include <string.h> #include <inttypes.h> int trace_point(target_t *target, u32 number) Modified: trunk/src/target/trace.h =================================================================== --- trunk/src/target/trace.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/trace.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -20,10 +20,11 @@ #ifndef TRACE_H #define TRACE_H -#include "target.h" -#include "command.h" #include "types.h" +struct target_s; +struct command_context_s; + typedef struct trace_point_s { u32 address; Modified: trunk/src/target/xscale.c =================================================================== --- trunk/src/target/xscale.c 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/xscale.c 2009-05-11 04:56:37 UTC (rev 1715) @@ -24,30 +24,13 @@ #include "config.h" #endif -#include "replacements.h" - #include "xscale.h" - #include "arm7_9_common.h" -#include "register.h" -#include "target.h" -#include "armv4_5.h" #include "arm_simulator.h" #include "arm_disassembler.h" -#include "log.h" -#include "jtag.h" -#include "binarybuffer.h" #include "time_support.h" -#include "breakpoints.h" -#include "fileio.h" +#include "image.h" -#include <stdlib.h> -#include <string.h> - -#include <unistd.h> -#include <errno.h> - - /* cli handling */ int xscale_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/target/xscale.h =================================================================== --- trunk/src/target/xscale.h 2009-05-11 04:46:21 UTC (rev 1714) +++ trunk/src/target/xscale.h 2009-05-11 04:56:37 UTC (rev 1715) @@ -23,12 +23,9 @@ #ifndef XSCALE_H #define XSCALE_H -#include "target.h" -#include "register.h" #include "armv4_5.h" #include "armv4_5_mmu.h" #include "trace.h" -#include "image.h" #define XSCALE_COMMON_MAGIC 0x58534341 @@ -77,7 +74,7 @@ typedef struct xscale_trace_s { trace_status_t capture_status; /* current state of capture run */ - image_t *image; /* source for target opcodes */ + struct image_s *image; /* source for target opcodes */ xscale_trace_data_t *data; /* linked list of collected trace data */ int buffer_enabled; /* whether trace buffer is enabled */ int buffer_fill; /* maximum number of trace runs to read (-1 for wrap-around) */ |
From: <zw...@ma...> - 2009-05-11 06:47:30
|
Author: zwelch Date: 2009-05-11 06:46:21 +0200 (Mon, 11 May 2009) New Revision: 1714 Modified: trunk/src/target/arm11.c trunk/src/target/arm11.h trunk/src/target/arm11_dbgtap.c trunk/src/target/arm720t.c trunk/src/target/arm720t.h trunk/src/target/arm7_9_common.c trunk/src/target/arm7_9_common.h trunk/src/target/arm7tdmi.c trunk/src/target/arm7tdmi.h trunk/src/target/arm920t.c trunk/src/target/arm920t.h trunk/src/target/arm926ejs.c trunk/src/target/arm926ejs.h trunk/src/target/arm966e.c trunk/src/target/arm966e.h trunk/src/target/arm9tdmi.c trunk/src/target/arm9tdmi.h trunk/src/target/arm_adi_v5.c trunk/src/target/arm_disassembler.c trunk/src/target/arm_jtag.c trunk/src/target/arm_jtag.h trunk/src/target/arm_simulator.c trunk/src/target/arm_simulator.h trunk/src/target/armv4_5.c trunk/src/target/armv4_5_cache.c trunk/src/target/armv4_5_cache.h trunk/src/target/armv4_5_mmu.c trunk/src/target/armv4_5_mmu.h trunk/src/target/armv7m.c trunk/src/target/armv7m.h Log: Audit and eliminate redundant #include directives in arm target files. Modified: trunk/src/target/arm11.c =================================================================== --- trunk/src/target/arm11.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm11.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -26,11 +26,7 @@ #endif #include "arm11.h" -#include "jtag.h" -#include "log.h" -#include <stdlib.h> -#include <string.h> #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ Modified: trunk/src/target/arm11.h =================================================================== --- trunk/src/target/arm11.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm11.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -22,11 +22,7 @@ #ifndef ARM11_H #define ARM11_H -#include "target.h" -#include "register.h" #include "embeddedice.h" -#include "arm_jtag.h" -#include "types.h" #define asizeof(x) (sizeof(x) / sizeof((x)[0])) Modified: trunk/src/target/arm11_dbgtap.c =================================================================== --- trunk/src/target/arm11_dbgtap.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm11_dbgtap.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -24,11 +24,7 @@ #endif #include "arm11.h" -#include "jtag.h" -#include "log.h" -#include <stdlib.h> -#include <string.h> #if 0 #define JTAG_DEBUG(expr ...) DEBUG(expr) Modified: trunk/src/target/arm720t.c =================================================================== --- trunk/src/target/arm720t.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm720t.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -22,12 +22,8 @@ #endif #include "arm720t.h" -#include "jtag.h" -#include "log.h" #include "time_support.h" -#include <stdlib.h> -#include <string.h> #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ Modified: trunk/src/target/arm720t.h =================================================================== --- trunk/src/target/arm720t.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm720t.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -20,13 +20,8 @@ #ifndef ARM720T_H #define ARM720T_H -#include "target.h" -#include "register.h" -#include "embeddedice.h" -#include "arm_jtag.h" #include "arm7tdmi.h" #include "armv4_5_mmu.h" -#include "armv4_5_cache.h" #define ARM720T_COMMON_MAGIC 0xa720a720 Modified: trunk/src/target/arm7_9_common.c =================================================================== --- trunk/src/target/arm7_9_common.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm7_9_common.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -30,28 +30,13 @@ #include "config.h" #endif -#include "replacements.h" - #include "embeddedice.h" -#include "target.h" #include "target_request.h" -#include "armv4_5.h" -#include "arm_jtag.h" -#include "jtag.h" -#include "log.h" #include "arm7_9_common.h" -#include "breakpoints.h" #include "time_support.h" #include "arm_simulator.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <sys/stat.h> -#include <sys/time.h> -#include <errno.h> - int arm7_9_debug_entry(target_t *target); int arm7_9_enable_sw_bkpts(struct target_s *target); Modified: trunk/src/target/arm7_9_common.h =================================================================== --- trunk/src/target/arm7_9_common.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm7_9_common.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -29,11 +29,7 @@ #ifndef ARM7_9_COMMON_H #define ARM7_9_COMMON_H -#include "armv4_5.h" -#include "arm_jtag.h" #include "breakpoints.h" -#include "target.h" - #include "etm.h" #define ARM7_9_COMMON_MAGIC 0x0a790a79 Modified: trunk/src/target/arm7tdmi.c =================================================================== --- trunk/src/target/arm7tdmi.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm7tdmi.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -29,19 +29,7 @@ #include "arm7tdmi.h" -#include "arm7_9_common.h" -#include "register.h" -#include "target.h" -#include "armv4_5.h" -#include "embeddedice.h" -#include "etm.h" -#include "log.h" -#include "jtag.h" -#include "arm_jtag.h" -#include <stdlib.h> -#include <string.h> - #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ #endif Modified: trunk/src/target/arm7tdmi.h =================================================================== --- trunk/src/target/arm7tdmi.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm7tdmi.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -23,12 +23,7 @@ #ifndef ARM7TDMI_H #define ARM7TDMI_H -#include "target.h" -#include "register.h" -#include "armv4_5.h" #include "embeddedice.h" -#include "arm_jtag.h" -#include "arm7_9_common.h" #define ARM7TDMI_COMMON_MAGIC 0x00a700a7 Modified: trunk/src/target/arm920t.c =================================================================== --- trunk/src/target/arm920t.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm920t.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -22,12 +22,8 @@ #endif #include "arm920t.h" -#include "jtag.h" -#include "log.h" #include "time_support.h" -#include <stdlib.h> -#include <string.h> #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ Modified: trunk/src/target/arm920t.h =================================================================== --- trunk/src/target/arm920t.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm920t.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -20,13 +20,8 @@ #ifndef ARM920T_H #define ARM920T_H -#include "target.h" -#include "register.h" -#include "embeddedice.h" -#include "arm_jtag.h" #include "arm9tdmi.h" #include "armv4_5_mmu.h" -#include "armv4_5_cache.h" #define ARM920T_COMMON_MAGIC 0xa920a920 Modified: trunk/src/target/arm926ejs.c =================================================================== --- trunk/src/target/arm926ejs.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm926ejs.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -22,12 +22,8 @@ #endif #include "arm926ejs.h" -#include "jtag.h" -#include "log.h" #include "time_support.h" -#include <stdlib.h> -#include <string.h> #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ Modified: trunk/src/target/arm926ejs.h =================================================================== --- trunk/src/target/arm926ejs.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm926ejs.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -20,13 +20,8 @@ #ifndef ARM926EJS_H #define ARM926EJS_H -#include "target.h" -#include "register.h" -#include "embeddedice.h" -#include "arm_jtag.h" #include "arm9tdmi.h" #include "armv4_5_mmu.h" -#include "armv4_5_cache.h" #define ARM926EJS_COMMON_MAGIC 0xa926a926 Modified: trunk/src/target/arm966e.c =================================================================== --- trunk/src/target/arm966e.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm966e.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -26,18 +26,7 @@ #include "arm966e.h" -#include "arm7_9_common.h" -#include "register.h" -#include "target.h" -#include "armv4_5.h" -#include "embeddedice.h" -#include "log.h" -#include "jtag.h" -#include "arm_jtag.h" -#include <stdlib.h> -#include <string.h> - #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ #endif Modified: trunk/src/target/arm966e.h =================================================================== --- trunk/src/target/arm966e.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm966e.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -23,10 +23,6 @@ #ifndef ARM966E_H #define ARM966E_H -#include "target.h" -#include "register.h" -#include "embeddedice.h" -#include "arm_jtag.h" #include "arm9tdmi.h" #define ARM966E_COMMON_MAGIC 0x20f920f9 Modified: trunk/src/target/arm9tdmi.c =================================================================== --- trunk/src/target/arm9tdmi.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm9tdmi.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -29,20 +29,7 @@ #include "arm9tdmi.h" -#include "arm7_9_common.h" -#include "register.h" -#include "target.h" -#include "armv4_5.h" -#include "embeddedice.h" -#include "etm.h" -#include "etb.h" -#include "log.h" -#include "jtag.h" -#include "arm_jtag.h" -#include <stdlib.h> -#include <string.h> - #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ #endif Modified: trunk/src/target/arm9tdmi.h =================================================================== --- trunk/src/target/arm9tdmi.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm9tdmi.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -23,12 +23,7 @@ #ifndef ARM9TDMI_H #define ARM9TDMI_H -#include "target.h" -#include "register.h" -#include "armv4_5.h" #include "embeddedice.h" -#include "arm_jtag.h" -#include "arm7_9_common.h" #define ARM9TDMI_COMMON_MAGIC 0x00a900a9 Modified: trunk/src/target/arm_adi_v5.c =================================================================== --- trunk/src/target/arm_adi_v5.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm_adi_v5.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -38,14 +38,8 @@ #include "config.h" #endif -#include "replacements.h" - #include "arm_adi_v5.h" -#include "jtag.h" -#include "log.h" #include "time_support.h" -#include <stdlib.h> -#include <string.h> /* * Transaction Mode: Modified: trunk/src/target/arm_disassembler.c =================================================================== --- trunk/src/target/arm_disassembler.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm_disassembler.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -22,10 +22,8 @@ #endif #include "arm_disassembler.h" - #include "log.h" -#include <string.h> /* textual represenation of the condition field */ /* ALways (default) is ommitted (empty string) */ Modified: trunk/src/target/arm_jtag.c =================================================================== --- trunk/src/target/arm_jtag.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm_jtag.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -26,12 +26,7 @@ #include "arm_jtag.h" -#include "binarybuffer.h" -#include "log.h" -#include "jtag.h" -#include <stdlib.h> - #if 0 #define _ARM_JTAG_SCAN_N_CHECK_ #endif Modified: trunk/src/target/arm_jtag.h =================================================================== --- trunk/src/target/arm_jtag.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm_jtag.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -23,7 +23,6 @@ #ifndef ARM_JTAG #define ARM_JTAG -#include "types.h" #include "jtag.h" typedef struct arm_jtag_s Modified: trunk/src/target/arm_simulator.c =================================================================== --- trunk/src/target/arm_simulator.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm_simulator.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -24,14 +24,12 @@ #include "config.h" #endif -#include "target.h" #include "armv4_5.h" #include "arm_disassembler.h" #include "arm_simulator.h" #include "log.h" #include "binarybuffer.h" -#include <string.h> u32 arm_shift(u8 shift, u32 Rm, u32 shift_amount, u8 *carry) { Modified: trunk/src/target/arm_simulator.h =================================================================== --- trunk/src/target/arm_simulator.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/arm_simulator.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -20,11 +20,11 @@ #ifndef ARM_SIMULATOR_H #define ARM_SIMULATOR_H -#include "target.h" #include "types.h" -extern int arm_simulate_step(target_t *target, u32 *dry_run_pc); +struct target_s; +extern int arm_simulate_step(struct target_s *target, u32 *dry_run_pc); #define ERROR_ARM_SIMULATOR_NOT_IMPLEMENTED (-700) Modified: trunk/src/target/armv4_5.c =================================================================== --- trunk/src/target/armv4_5.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv4_5.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -27,21 +27,10 @@ #include "config.h" #endif -#include "replacements.h" - -#include "arm_disassembler.h" - #include "armv4_5.h" - -#include "target.h" -#include "register.h" -#include "log.h" +#include "arm_disassembler.h" #include "binarybuffer.h" -#include "command.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> bitfield_desc_t armv4_5_psr_bitfield_desc[] = { Modified: trunk/src/target/armv4_5_cache.c =================================================================== --- trunk/src/target/armv4_5_cache.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv4_5_cache.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -22,9 +22,7 @@ #endif #include "armv4_5_cache.h" - #include "log.h" -#include "command.h" int armv4_5_identify_cache(u32 cache_type_reg, armv4_5_cache_common_t *cache) { Modified: trunk/src/target/armv4_5_cache.h =================================================================== --- trunk/src/target/armv4_5_cache.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv4_5_cache.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -21,8 +21,9 @@ #define ARMV4_5_CACHE_H #include "types.h" -#include "command.h" +struct command_context_s; + typedef struct armv4_5_cachesize_s { int linelen; Modified: trunk/src/target/armv4_5_mmu.c =================================================================== --- trunk/src/target/armv4_5_mmu.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv4_5_mmu.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -21,13 +21,9 @@ #include "config.h" #endif -#include "arm7_9_common.h" #include "log.h" -#include "command.h" #include "armv4_5_mmu.h" -#include "target.h" -#include <stdlib.h> u32 armv4mmu_translate_va(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 va, int *type, u32 *cb, int *domain, u32 *ap); Modified: trunk/src/target/armv4_5_mmu.h =================================================================== --- trunk/src/target/armv4_5_mmu.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv4_5_mmu.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -21,6 +21,7 @@ #define ARMV4_5_MMU_H #include "armv4_5_cache.h" +#include "target.h" typedef struct armv4_5_mmu_common_s { Modified: trunk/src/target/armv7m.c =================================================================== --- trunk/src/target/armv7m.c 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv7m.c 2009-05-11 04:46:21 UTC (rev 1714) @@ -30,17 +30,8 @@ #include "config.h" #endif -#include "replacements.h" - #include "armv7m.h" -#include "register.h" -#include "target.h" -#include "log.h" -#include "jtag.h" -#include "arm_jtag.h" -#include <stdlib.h> -#include <string.h> #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ Modified: trunk/src/target/armv7m.h =================================================================== --- trunk/src/target/armv7m.h 2009-05-11 04:38:18 UTC (rev 1713) +++ trunk/src/target/armv7m.h 2009-05-11 04:46:21 UTC (rev 1714) @@ -26,9 +26,6 @@ #ifndef ARMV7M_COMMON_H #define ARMV7M_COMMON_H -#include "register.h" -#include "target.h" -#include "arm_jtag.h" #include "arm_adi_v5.h" /* define for enabling armv7 gdb workarounds */ |
From: <zw...@ma...> - 2009-05-11 06:38:44
|
Author: zwelch Date: 2009-05-11 06:38:18 +0200 (Mon, 11 May 2009) New Revision: 1713 Modified: trunk/src/target/breakpoints.h trunk/src/target/target.c trunk/src/target/target.h Log: Audit and eliminate redundant #include directives in core target files. Modified: trunk/src/target/breakpoints.h =================================================================== --- trunk/src/target/breakpoints.h 2009-05-11 04:30:41 UTC (rev 1712) +++ trunk/src/target/breakpoints.h 2009-05-11 04:38:18 UTC (rev 1713) @@ -20,7 +20,7 @@ #ifndef BREAKPOINTS_H #define BREAKPOINTS_H -#include "target.h" +#include "types.h" struct target_s; Modified: trunk/src/target/target.c =================================================================== --- trunk/src/target/target.c 2009-05-11 04:30:41 UTC (rev 1712) +++ trunk/src/target/target.c 2009-05-11 04:38:18 UTC (rev 1713) @@ -33,31 +33,17 @@ #include "config.h" #endif -#include "replacements.h" #include "target.h" #include "target_request.h" - -#include "log.h" -#include "configuration.h" -#include "binarybuffer.h" +#include "time_support.h" +#include "register.h" +#include "trace.h" +#include "image.h" #include "jtag.h" -#include <string.h> -#include <stdlib.h> #include <inttypes.h> -#include <sys/stat.h> -#include <unistd.h> -#include <errno.h> -#include <sys/time.h> -#include <time.h> - -#include <time_support.h> - -#include <fileio.h> -#include <image.h> - static int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); Modified: trunk/src/target/target.h =================================================================== --- trunk/src/target/target.h 2009-05-11 04:30:41 UTC (rev 1712) +++ trunk/src/target/target.h 2009-05-11 04:38:18 UTC (rev 1713) @@ -26,19 +26,16 @@ #ifndef TARGET_H #define TARGET_H -#include "register.h" #include "breakpoints.h" #include "algorithm.h" -#include "trace.h" - #include "command.h" -#include "types.h" -#include <sys/time.h> -#include <time.h> +#include "replacements.h" struct reg_s; +struct trace_s; struct command_context_s; + /* * TARGET_UNKNOWN = 0: we don't know anything about the target yet * TARGET_RUNNING = 1: the target is executing user code |
From: <zw...@ma...> - 2009-05-11 06:31:47
|
Author: zwelch Date: 2009-05-11 06:30:41 +0200 (Mon, 11 May 2009) New Revision: 1712 Modified: trunk/src/flash/aduc702x.c trunk/src/flash/at91sam7.c trunk/src/flash/avrf.c trunk/src/flash/cfi.c trunk/src/flash/ecos.c trunk/src/flash/flash.c trunk/src/flash/lpc2000.c trunk/src/flash/lpc288x.c trunk/src/flash/lpc3180_nand_controller.c trunk/src/flash/mflash.c trunk/src/flash/nand.c trunk/src/flash/nand_ecc.c trunk/src/flash/non_cfi.c trunk/src/flash/ocl.c trunk/src/flash/orion_nand.c trunk/src/flash/pic32mx.c trunk/src/flash/s3c2410_nand.c trunk/src/flash/s3c2412_nand.c trunk/src/flash/s3c2440_nand.c trunk/src/flash/s3c2443_nand.c trunk/src/flash/s3c24xx_nand.c trunk/src/flash/stellaris.c trunk/src/flash/stm32x.c trunk/src/flash/str7x.c trunk/src/flash/str9x.c trunk/src/flash/str9xpec.c trunk/src/flash/tms470.c Log: Audit and eliminate redundant #include directives in src/flash sources. Modified: trunk/src/flash/aduc702x.c =================================================================== --- trunk/src/flash/aduc702x.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/aduc702x.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -23,18 +23,11 @@ #include "config.h" #endif -#include "replacements.h" -#include "time_support.h" #include "flash.h" -#include "target.h" -#include "log.h" #include "armv4_5.h" -#include "algorithm.h" #include "binarybuffer.h" +#include "time_support.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> static int aduc702x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); static int aduc702x_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/flash/at91sam7.c =================================================================== --- trunk/src/flash/at91sam7.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/at91sam7.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -39,19 +39,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "at91sam7.h" - -#include "flash.h" -#include "target.h" -#include "log.h" #include "binarybuffer.h" -#include "types.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> static int at91sam7_register_commands(struct command_context_s *cmd_ctx); static int at91sam7_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); Modified: trunk/src/flash/avrf.c =================================================================== --- trunk/src/flash/avrf.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/avrf.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -21,18 +21,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "avrf.h" #include "avrt.h" #include "flash.h" -#include "target.h" -#include "log.h" -#include "algorithm.h" -#include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> /* AVR_JTAG_Instructions */ #define AVR_JTAG_INS_LEN 4 Modified: trunk/src/flash/cfi.c =================================================================== --- trunk/src/flash/cfi.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/cfi.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -23,22 +23,11 @@ #include "config.h" #endif -#include "replacements.h" - #include "cfi.h" #include "non_cfi.h" - -#include "flash.h" -#include "target.h" -#include "log.h" #include "armv4_5.h" -#include "algorithm.h" #include "binarybuffer.h" -#include "types.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> static int cfi_register_commands(struct command_context_s *cmd_ctx); static int cfi_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); Modified: trunk/src/flash/ecos.c =================================================================== --- trunk/src/flash/ecos.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/ecos.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -21,21 +21,11 @@ #include "config.h" #endif -#include <string.h> - -#include "replacements.h" - #include "flash.h" +#include "embeddedice.h" +#include "image.h" -#include "target.h" -#include "flash.h" -#include "target.h" -#include "log.h" -#include "binarybuffer.h" -#include "../target/embeddedice.h" -#include "types.h" - static int ecosflash_register_commands(struct command_context_s *cmd_ctx); static int ecosflash_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); static int ecosflash_erase(struct flash_bank_s *bank, int first, int last); Modified: trunk/src/flash/flash.c =================================================================== --- trunk/src/flash/flash.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/flash.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,22 +28,9 @@ #endif #include "flash.h" -#include "command.h" -#include "target.h" -#include "time_support.h" -#include "fileio.h" #include "image.h" -#include "log.h" -#include "armv4_5.h" -#include "algorithm.h" -#include "binarybuffer.h" -#include "armv7m.h" +#include "time_support.h" -#include <string.h> -#include <unistd.h> -#include <stdlib.h> -#include <sys/stat.h> -#include <errno.h> #include <inttypes.h> /* command handlers */ Modified: trunk/src/flash/lpc2000.c =================================================================== --- trunk/src/flash/lpc2000.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/lpc2000.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -23,16 +23,9 @@ #endif #include "lpc2000.h" - -#include "flash.h" -#include "target.h" -#include "log.h" #include "armv4_5.h" -#include "algorithm.h" #include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> /* flash programming support for Philips LPC2xxx devices * currently supported devices: Modified: trunk/src/flash/lpc288x.c =================================================================== --- trunk/src/flash/lpc288x.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/lpc288x.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -31,19 +31,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "lpc288x.h" - -#include "flash.h" -#include "target.h" -#include "log.h" #include "binarybuffer.h" -#include "types.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> #define LOAD_TIMER_ERASE 0 #define LOAD_TIMER_WRITE 1 Modified: trunk/src/flash/lpc3180_nand_controller.c =================================================================== --- trunk/src/flash/lpc3180_nand_controller.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/lpc3180_nand_controller.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -22,15 +22,7 @@ #endif #include "lpc3180_nand_controller.h" - -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - #include "nand.h" -#include "target.h" static int lpc3180_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device); static int lpc3180_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/flash/mflash.c =================================================================== --- trunk/src/flash/mflash.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/mflash.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -21,21 +21,12 @@ #include "config.h" #endif -#include <ctype.h> -#include <string.h> -#include <unistd.h> -#include <stdlib.h> -#include <sys/stat.h> -#include <errno.h> -#include <inttypes.h> - -#include "command.h" -#include "log.h" -#include "target.h" +#include "mflash.h" #include "time_support.h" #include "fileio.h" -#include "mflash.h" +#include "log.h" + static int s3c2440_set_gpio_to_output (mflash_gpio_num_t gpio); static int s3c2440_set_gpio_output_val (mflash_gpio_num_t gpio, u8 val); static int pxa270_set_gpio_to_output (mflash_gpio_num_t gpio); Modified: trunk/src/flash/nand.c =================================================================== --- trunk/src/flash/nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -24,21 +24,13 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> -#include <inttypes.h> - -#include <errno.h> - #include "nand.h" -#include "flash.h" #include "time_support.h" #include "fileio.h" -#include "image.h" +#include <inttypes.h> + + static int handle_nand_list_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_nand_probe_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_nand_check_bad_blocks_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); Modified: trunk/src/flash/nand_ecc.c =================================================================== --- trunk/src/flash/nand_ecc.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/nand_ecc.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -41,10 +41,6 @@ #include "config.h" #endif -#include "replacements.h" - -#include <inttypes.h> - #include "nand.h" /* Modified: trunk/src/flash/non_cfi.c =================================================================== --- trunk/src/flash/non_cfi.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/non_cfi.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -23,14 +23,10 @@ #include "config.h" #endif -#include <stdlib.h> - -#include "log.h" - -#include "flash.h" -#include "cfi.h" #include "non_cfi.h" +#include "cfi.h" + #define KB 1024 #define MB (1024*1024) #define ERASE_REGION(num, size) (((size/256)<<16)|(num-1)) Modified: trunk/src/flash/ocl.c =================================================================== --- trunk/src/flash/ocl.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/ocl.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -21,21 +21,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "ocl.h" - #include "flash.h" -#include "target.h" -#include "log.h" -#include "binarybuffer.h" -#include "types.h" #include "embeddedice.h" -#include "arm7_9_common.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> static int ocl_register_commands(struct command_context_s *cmd_ctx); static int ocl_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); Modified: trunk/src/flash/orion_nand.c =================================================================== --- trunk/src/flash/orion_nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/orion_nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -26,17 +26,11 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - #include "nand.h" -#include "target.h" #include "armv4_5.h" #include "binarybuffer.h" + typedef struct orion_nand_controller_s { struct target_s *target; Modified: trunk/src/flash/pic32mx.c =================================================================== --- trunk/src/flash/pic32mx.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/pic32mx.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -27,18 +27,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "pic32mx.h" -#include "flash.h" -#include "target.h" -#include "log.h" #include "mips32.h" -#include "algorithm.h" -#include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> static struct pic32mx_devs_s { Modified: trunk/src/flash/s3c2410_nand.c =================================================================== --- trunk/src/flash/s3c2410_nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/s3c2410_nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,16 +28,9 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - -#include "nand.h" #include "s3c24xx_nand.h" -#include "target.h" + static int s3c2410_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device); static int s3c2410_init(struct nand_device_s *device); static int s3c2410_read_data(struct nand_device_s *device, void *data); Modified: trunk/src/flash/s3c2412_nand.c =================================================================== --- trunk/src/flash/s3c2412_nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/s3c2412_nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,16 +28,9 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - -#include "nand.h" #include "s3c24xx_nand.h" -#include "target.h" + static int s3c2412_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device); static int s3c2412_init(struct nand_device_s *device); Modified: trunk/src/flash/s3c2440_nand.c =================================================================== --- trunk/src/flash/s3c2440_nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/s3c2440_nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,16 +28,9 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - -#include "nand.h" #include "s3c24xx_nand.h" -#include "target.h" + static int s3c2440_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device); static int s3c2440_init(struct nand_device_s *device); //static int s3c2440_nand_ready(struct nand_device_s *device, int timeout); Modified: trunk/src/flash/s3c2443_nand.c =================================================================== --- trunk/src/flash/s3c2443_nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/s3c2443_nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,16 +28,9 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - -#include "nand.h" #include "s3c24xx_nand.h" -#include "target.h" + static int s3c2443_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device); static int s3c2443_init(struct nand_device_s *device); Modified: trunk/src/flash/s3c24xx_nand.c =================================================================== --- trunk/src/flash/s3c24xx_nand.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/s3c24xx_nand.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,16 +28,9 @@ #include "config.h" #endif -#include "replacements.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> - -#include "nand.h" #include "s3c24xx_nand.h" -#include "target.h" + s3c24xx_nand_controller_t * s3c24xx_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, Modified: trunk/src/flash/stellaris.c =================================================================== --- trunk/src/flash/stellaris.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/stellaris.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -28,20 +28,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "stellaris.h" -#include "cortex_m3.h" - -#include "flash.h" -#include "target.h" -#include "log.h" +#include "armv7m.h" #include "binarybuffer.h" -#include "types.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> #define DID0_VER(did0) ((did0>>28)&0x07) static int stellaris_register_commands(struct command_context_s *cmd_ctx); Modified: trunk/src/flash/stm32x.c =================================================================== --- trunk/src/flash/stm32x.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/stm32x.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -24,18 +24,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "stm32x.h" -#include "flash.h" -#include "target.h" -#include "log.h" #include "armv7m.h" -#include "algorithm.h" #include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> static int stm32x_register_commands(struct command_context_s *cmd_ctx); static int stm32x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); Modified: trunk/src/flash/str7x.c =================================================================== --- trunk/src/flash/str7x.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/str7x.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -24,19 +24,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "str7x.h" -#include "flash.h" -#include "target.h" -#include "log.h" #include "armv4_5.h" -#include "algorithm.h" #include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> str7x_mem_layout_t mem_layout_str7bank0[] = { {0x00000000, 0x02000, 0x01}, Modified: trunk/src/flash/str9x.c =================================================================== --- trunk/src/flash/str9x.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/str9x.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -27,20 +27,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "str9x.h" -#include "flash.h" -#include "target.h" -#include "log.h" -#include "armv4_5.h" #include "arm966e.h" -#include "algorithm.h" -#include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> static u32 bank1start = 0x00080000; Modified: trunk/src/flash/str9xpec.c =================================================================== --- trunk/src/flash/str9xpec.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/str9xpec.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -24,21 +24,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "str9xpec.h" -#include "flash.h" -#include "target.h" -#include "log.h" -#include "armv4_5.h" #include "arm7_9_common.h" -#include "jtag.h" -#include "binarybuffer.h" -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <getopt.h> static int str9xpec_register_commands(struct command_context_s *cmd_ctx); static int str9xpec_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); Modified: trunk/src/flash/tms470.c =================================================================== --- trunk/src/flash/tms470.c 2009-05-11 04:28:24 UTC (rev 1711) +++ trunk/src/flash/tms470.c 2009-05-11 04:30:41 UTC (rev 1712) @@ -21,11 +21,9 @@ #include "config.h" #endif -#include "log.h" #include "tms470.h" -#include <string.h> -#include <unistd.h> + static int tms470_register_commands(struct command_context_s *cmd_ctx); static int tms470_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); static int tms470_erase(struct flash_bank_s *bank, int first, int last); |
From: <zw...@ma...> - 2009-05-11 06:28:58
|
Author: zwelch Date: 2009-05-11 06:28:24 +0200 (Mon, 11 May 2009) New Revision: 1711 Modified: trunk/src/flash/at91sam7.h trunk/src/flash/avrf.h trunk/src/flash/cfi.h trunk/src/flash/flash.h trunk/src/flash/lpc2000.h trunk/src/flash/lpc288x.h trunk/src/flash/mflash.h trunk/src/flash/non_cfi.h trunk/src/flash/pic32mx.h trunk/src/flash/s3c24xx_nand.h trunk/src/flash/stellaris.h trunk/src/flash/stm32x.h trunk/src/flash/str7x.h trunk/src/flash/str9x.h trunk/src/flash/str9xpec.h Log: Audit and eliminate redundant #include directives in src/flash headers. Modified: trunk/src/flash/at91sam7.h =================================================================== --- trunk/src/flash/at91sam7.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/at91sam7.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -24,7 +24,6 @@ #define AT91SAM7_H #include "flash.h" -#include "target.h" typedef struct at91sam7_flash_bank_s { Modified: trunk/src/flash/avrf.h =================================================================== --- trunk/src/flash/avrf.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/avrf.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -20,6 +20,8 @@ #ifndef AVRF_H #define AVRF_H +#include "types.h" + typedef struct avrf_type_s { char name[15]; Modified: trunk/src/flash/cfi.h =================================================================== --- trunk/src/flash/cfi.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/cfi.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -21,7 +21,6 @@ #define CFI_H #include "flash.h" -#include "target.h" #define CFI_STATUS_POLL_MASK_DQ5_DQ6_DQ7 0xE0 /* DQ5..DQ7 */ #define CFI_STATUS_POLL_MASK_DQ6_DQ7 0xC0 /* DQ6..DQ7 */ Modified: trunk/src/flash/flash.h =================================================================== --- trunk/src/flash/flash.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/flash.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -27,8 +27,10 @@ #define FLASH_H #include "target.h" -#include "image.h" +#include "log.h" +struct image_s; + #define FLASH_MAX_ERROR_STR (128) typedef struct flash_sector_s @@ -65,7 +67,7 @@ typedef struct flash_bank_s { - target_t *target; + struct target_s *target; flash_driver_t *driver; void *driver_priv; int bank_number; @@ -81,8 +83,8 @@ extern int flash_register_commands(struct command_context_s *cmd_ctx); extern int flash_init_drivers(struct command_context_s *cmd_ctx); -extern int flash_erase_address_range(target_t *target, u32 addr, u32 length); -extern int flash_write(target_t *target, image_t *image, u32 *written, int erase); +extern int flash_erase_address_range(struct target_s *target, u32 addr, u32 length); +extern int flash_write(struct target_s *target, struct image_s *image, u32 *written, int erase); extern void flash_set_dirty(void); extern int flash_get_bank_count(void); extern int default_flash_blank_check(struct flash_bank_s *bank); @@ -90,7 +92,7 @@ extern flash_bank_t *get_flash_bank_by_num(int num); extern flash_bank_t *get_flash_bank_by_num_noprobe(int num); -extern flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr); +extern flash_bank_t *get_flash_bank_by_addr(struct target_s *target, u32 addr); #define ERROR_FLASH_BANK_INVALID (-900) #define ERROR_FLASH_SECTOR_INVALID (-901) Modified: trunk/src/flash/lpc2000.h =================================================================== --- trunk/src/flash/lpc2000.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/lpc2000.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -21,7 +21,6 @@ #define LPC2000_H #include "flash.h" -#include "target.h" typedef struct lpc2000_flash_bank_s { Modified: trunk/src/flash/lpc288x.h =================================================================== --- trunk/src/flash/lpc288x.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/lpc288x.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -22,7 +22,6 @@ #define lpc288x_H #include "flash.h" -#include "target.h" typedef struct lpc288x_flash_bank_s { Modified: trunk/src/flash/mflash.h =================================================================== --- trunk/src/flash/mflash.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/mflash.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -20,6 +20,8 @@ #ifndef _MFLASH_H #define _MFLASH_H +#include "target.h" + typedef unsigned long mg_io_uint32; typedef unsigned short mg_io_uint16; typedef unsigned char mg_io_uint8; Modified: trunk/src/flash/non_cfi.h =================================================================== --- trunk/src/flash/non_cfi.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/non_cfi.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -20,7 +20,7 @@ #ifndef NON_CFI_H #define NON_CFI_H -#include "types.h" +#include "flash.h" typedef struct non_cfi_s { Modified: trunk/src/flash/pic32mx.h =================================================================== --- trunk/src/flash/pic32mx.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/pic32mx.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -27,7 +27,6 @@ #define PIC32MX_H #include "flash.h" -#include "target.h" typedef struct pic32mx_flash_bank_s { Modified: trunk/src/flash/s3c24xx_nand.h =================================================================== --- trunk/src/flash/s3c24xx_nand.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/s3c24xx_nand.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -24,7 +24,7 @@ * Many thanks to Simtec Electronics for sponsoring this work. */ -#include "target.h" +#include "nand.h" #include "s3c24xx_regs_nand.h" typedef struct s3c24xx_nand_controller_s Modified: trunk/src/flash/stellaris.h =================================================================== --- trunk/src/flash/stellaris.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/stellaris.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -21,7 +21,6 @@ #define STELLARIS_FLASH_H #include "flash.h" -#include "target.h" typedef struct stellaris_flash_bank_s { Modified: trunk/src/flash/stm32x.h =================================================================== --- trunk/src/flash/stm32x.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/stm32x.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -24,7 +24,6 @@ #define STM32X_H #include "flash.h" -#include "target.h" typedef struct stm32x_options_s { Modified: trunk/src/flash/str7x.h =================================================================== --- trunk/src/flash/str7x.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/str7x.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -24,7 +24,6 @@ #define STR7X_H #include "flash.h" -#include "target.h" typedef struct str7x_flash_bank_s { Modified: trunk/src/flash/str9x.h =================================================================== --- trunk/src/flash/str9x.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/str9x.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -24,7 +24,6 @@ #define STR9X_H #include "flash.h" -#include "target.h" typedef struct str9x_flash_bank_s { Modified: trunk/src/flash/str9xpec.h =================================================================== --- trunk/src/flash/str9xpec.h 2009-05-11 04:25:09 UTC (rev 1710) +++ trunk/src/flash/str9xpec.h 2009-05-11 04:28:24 UTC (rev 1711) @@ -24,7 +24,6 @@ #define STR9XPEC_H #include "flash.h" -#include "target.h" #include "jtag.h" typedef struct str9xpec_flash_controller_s |
From: <zw...@ma...> - 2009-05-11 06:25:19
|
Author: zwelch Date: 2009-05-11 06:25:09 +0200 (Mon, 11 May 2009) New Revision: 1710 Modified: trunk/src/pld/pld.c trunk/src/pld/virtex2.c trunk/src/pld/virtex2.h trunk/src/pld/xilinx_bit.c trunk/src/svf/svf.c trunk/src/xsvf/xsvf.c Log: Audit and eliminate redundant #include directives in src/{pld,svf,xsvf}. Modified: trunk/src/pld/pld.c =================================================================== --- trunk/src/pld/pld.c 2009-05-11 04:22:15 UTC (rev 1709) +++ trunk/src/pld/pld.c 2009-05-11 04:25:09 UTC (rev 1710) @@ -21,24 +21,11 @@ #include "config.h" #endif -#include "replacements.h" - #include "pld.h" - -#include "jtag.h" -#include "command.h" #include "log.h" #include "time_support.h" -#include <stdlib.h> -#include <unistd.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <string.h> -#include <sys/time.h> -#include <time.h> - /* pld drivers */ extern pld_driver_t virtex2_pld; Modified: trunk/src/pld/virtex2.c =================================================================== --- trunk/src/pld/virtex2.c 2009-05-11 04:22:15 UTC (rev 1709) +++ trunk/src/pld/virtex2.c 2009-05-11 04:25:09 UTC (rev 1710) @@ -22,14 +22,9 @@ #endif #include "virtex2.h" - -#include "pld.h" #include "xilinx_bit.h" -#include "command.h" -#include "log.h" -#include "jtag.h" +#include "pld.h" -#include <stdlib.h> int virtex2_register_commands(struct command_context_s *cmd_ctx); int virtex2_pld_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct pld_device_s *pld_device); Modified: trunk/src/pld/virtex2.h =================================================================== --- trunk/src/pld/virtex2.h 2009-05-11 04:22:15 UTC (rev 1709) +++ trunk/src/pld/virtex2.h 2009-05-11 04:25:09 UTC (rev 1710) @@ -20,9 +20,7 @@ #ifndef VIRTEX2_H #define VIRTEX2_H -#include "types.h" -#include "pld.h" -#include "xilinx_bit.h" +#include "jtag.h" typedef struct virtex2_pld_device_s { Modified: trunk/src/pld/xilinx_bit.c =================================================================== --- trunk/src/pld/xilinx_bit.c 2009-05-11 04:22:15 UTC (rev 1709) +++ trunk/src/pld/xilinx_bit.c 2009-05-11 04:25:09 UTC (rev 1710) @@ -22,19 +22,11 @@ #endif #include "xilinx_bit.h" - #include "pld.h" #include "log.h" -#include <stdlib.h> -#include <unistd.h> #include <sys/stat.h> -#include <fcntl.h> -#include <string.h> -#include <errno.h> -#include <sys/time.h> -#include <time.h> int read_section(FILE *input_file, int length_size, char section, u32 *buffer_length, u8 **buffer) { Modified: trunk/src/svf/svf.c =================================================================== --- trunk/src/svf/svf.c 2009-05-11 04:22:15 UTC (rev 1709) +++ trunk/src/svf/svf.c 2009-05-11 04:25:09 UTC (rev 1710) @@ -33,22 +33,10 @@ #endif #include "svf.h" - #include "jtag.h" -#include "command.h" -#include "log.h" #include "time_support.h" -#include <ctype.h> -#include <stdlib.h> -#include <unistd.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <string.h> -#include <sys/time.h> -#include <time.h> - // SVF command typedef enum { Modified: trunk/src/xsvf/xsvf.c =================================================================== --- trunk/src/xsvf/xsvf.c 2009-05-11 04:22:15 UTC (rev 1709) +++ trunk/src/xsvf/xsvf.c 2009-05-11 04:25:09 UTC (rev 1710) @@ -42,22 +42,11 @@ #endif #include "xsvf.h" - #include "jtag.h" -#include "command.h" -#include "log.h" -#include <stdlib.h> -#include <unistd.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <string.h> #include <assert.h> -#include <sys/time.h> -#include <time.h> - /* XSVF commands, from appendix B of xapp503.pdf */ #define XCOMPLETE 0x00 #define XTDOMASK 0x01 |
From: <zw...@ma...> - 2009-05-11 06:22:26
|
Author: zwelch Date: 2009-05-11 06:22:15 +0200 (Mon, 11 May 2009) New Revision: 1709 Modified: trunk/src/server/gdb_server.c trunk/src/server/gdb_server.h trunk/src/server/httpd.c trunk/src/server/server.c trunk/src/server/server.h trunk/src/server/tcl_server.c trunk/src/server/telnet_server.c Log: Audit and eliminate redundant #include directives from src/server. Modified: trunk/src/server/gdb_server.c =================================================================== --- trunk/src/server/gdb_server.c 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/gdb_server.c 2009-05-11 04:22:15 UTC (rev 1709) @@ -27,24 +27,14 @@ #include "config.h" #endif -#include "replacements.h" - #include "gdb_server.h" - +#include "target_request.h" +#include "register.h" #include "server.h" -#include "log.h" -#include "binarybuffer.h" -#include "jtag.h" -#include "breakpoints.h" #include "flash.h" -#include "target.h" -#include "target_request.h" -#include "configuration.h" +#include "image.h" +#include "jtag.h" -#include <string.h> -#include <errno.h> -#include <unistd.h> -#include <stdlib.h> #if 0 #define _DEBUG_GDB_IO_ Modified: trunk/src/server/gdb_server.h =================================================================== --- trunk/src/server/gdb_server.h 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/gdb_server.h 2009-05-11 04:22:15 UTC (rev 1709) @@ -27,9 +27,9 @@ #define GDB_SERVER_H #include "target.h" -#include "server.h" -#include "image.h" +struct image_s; + #define GDB_BUFFER_SIZE 16384 typedef struct gdb_connection_s @@ -39,7 +39,7 @@ int buf_cnt; int ctrl_c; enum target_state frontend_state; - image_t *vflash_image; + struct image_s *vflash_image; int closed; int busy; int noack_mode; Modified: trunk/src/server/httpd.c =================================================================== --- trunk/src/server/httpd.c 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/httpd.c 2009-05-11 04:22:15 UTC (rev 1709) @@ -27,30 +27,13 @@ #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 <fcntl.h> +#include <microhttpd.h> #include <pthread.h> #include <signal.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>" int loadFile(const char *name, void **data, size_t *len); Modified: trunk/src/server/server.c =================================================================== --- trunk/src/server/server.c 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/server.c 2009-05-11 04:22:15 UTC (rev 1709) @@ -27,25 +27,16 @@ #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 <fcntl.h> #include <signal.h> + #ifndef _WIN32 #include <netinet/tcp.h> #endif + service_t *services = NULL; /* shutdown_openocd == 1: exit the main event loop, and quit the debugger */ Modified: trunk/src/server/server.h =================================================================== --- trunk/src/server/server.h 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/server.h 2009-05-11 04:22:15 UTC (rev 1709) @@ -26,10 +26,12 @@ #ifndef SERVER_H #define SERVER_H -#include "command.h" -#include "binarybuffer.h" -#include "replacements.h" +#include "log.h" +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif + enum connection_type { CONNECTION_TCP, Modified: trunk/src/server/tcl_server.c =================================================================== --- trunk/src/server/tcl_server.c 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/tcl_server.c 2009-05-11 04:22:15 UTC (rev 1709) @@ -21,18 +21,9 @@ #include "config.h" #endif -#include <stdarg.h> #include "tcl_server.h" -#include "log.h" -#include "command.h" -#include <stdlib.h> -#include <unistd.h> -#include <errno.h> -#include <string.h> -#include <ctype.h> - #define TCL_SERVER_VERSION "TCL Server 0.1" #define TCL_MAX_LINE (4096) Modified: trunk/src/server/telnet_server.c =================================================================== --- trunk/src/server/telnet_server.c 2009-05-11 04:21:24 UTC (rev 1708) +++ trunk/src/server/telnet_server.c 2009-05-11 04:22:15 UTC (rev 1709) @@ -27,22 +27,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "telnet_server.h" - -#include "server.h" -#include "log.h" -#include "command.h" -#include "target.h" #include "target_request.h" -#include <stdlib.h> -#include <unistd.h> -#include <errno.h> -#include <string.h> -#include <ctype.h> - static unsigned short telnet_port = 0; int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); |
From: <zw...@ma...> - 2009-05-11 06:21:31
|
Author: zwelch Date: 2009-05-11 06:21:24 +0200 (Mon, 11 May 2009) New Revision: 1708 Modified: trunk/src/target/target_request.h Log: Fix compilation of target_request.h when it is included first. Modified: trunk/src/target/target_request.h =================================================================== --- trunk/src/target/target_request.h 2009-05-11 04:04:58 UTC (rev 1707) +++ trunk/src/target/target_request.h 2009-05-11 04:21:24 UTC (rev 1708) @@ -26,7 +26,7 @@ #ifndef TARGET_REQUEST_H #define TARGET_REQUEST_H -#include "command.h" +#include "target.h" typedef enum target_req_cmd { |
From: <zw...@ma...> - 2009-05-11 06:05:28
|
Author: zwelch Date: 2009-05-11 06:04:58 +0200 (Mon, 11 May 2009) New Revision: 1707 Modified: trunk/src/jtag/amt_jtagaccel.c trunk/src/jtag/arm-jtag-ew.c trunk/src/jtag/at91rm9200.c trunk/src/jtag/bitbang.c trunk/src/jtag/bitq.c trunk/src/jtag/dummy.c trunk/src/jtag/ep93xx.c trunk/src/jtag/ft2232.c trunk/src/jtag/gw16012.c trunk/src/jtag/jlink.c trunk/src/jtag/jtag.c trunk/src/jtag/jtag.h trunk/src/jtag/parport.c trunk/src/jtag/presto.c trunk/src/jtag/rlink/rlink.c trunk/src/jtag/usbprog.c trunk/src/jtag/vsllink.c trunk/src/jtag/zy1000.c Log: Audit and eliminate redundant #include directives from src/jtag. Modified: trunk/src/jtag/amt_jtagaccel.c =================================================================== --- trunk/src/jtag/amt_jtagaccel.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/amt_jtagaccel.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,25 +21,13 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" -/* system includes */ -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - -#include <string.h> -#include <stdlib.h> - #if PARPORT_USE_PPDEV == 1 #include <linux/parport.h> #include <linux/ppdev.h> -#include <fcntl.h> #include <sys/ioctl.h> -#include <unistd.h> #else /* not PARPORT_USE_PPDEV */ #ifndef _WIN32 #include <sys/io.h> @@ -49,12 +37,9 @@ #if PARPORT_USE_GIVEIO == 1 #if IS_CYGWIN == 1 #include <windows.h> -#include <errno.h> #endif #endif -#include "log.h" - /* configuration */ static u16 amt_jtagaccel_port; Modified: trunk/src/jtag/arm-jtag-ew.c =================================================================== --- trunk/src/jtag/arm-jtag-ew.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/arm-jtag-ew.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -24,17 +24,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include <usb.h> -#include <string.h> -#include <ctype.h> -/* system includes */ -#include "log.h" - #define USB_VID 0x15ba #define USB_PID 0x001e Modified: trunk/src/jtag/at91rm9200.c =================================================================== --- trunk/src/jtag/at91rm9200.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/at91rm9200.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,18 +21,12 @@ #include "config.h" #endif -#include "log.h" #include "jtag.h" #include "bitbang.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> #include <sys/mman.h> -#include <unistd.h> -#include <fcntl.h> + /* AT91RM9200 */ #define AT91C_BASE_SYS (0xfffff000) Modified: trunk/src/jtag/bitbang.c =================================================================== --- trunk/src/jtag/bitbang.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/bitbang.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -25,19 +25,8 @@ #endif #include "bitbang.h" - -/* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <unistd.h> - - /** * Function bitbang_stableclocks * issues a number of clock cycles while staying in a stable state. Modified: trunk/src/jtag/bitq.c =================================================================== --- trunk/src/jtag/bitq.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/bitq.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -23,17 +23,7 @@ #include "bitq.h" -/* project specific includes */ -#include "log.h" -#include "types.h" -#include "jtag.h" -#include "configuration.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <unistd.h> - bitq_interface_t* bitq_interface; /* low level bit queue interface */ static bitq_state_t bitq_in_state; /* state of input queue */ Modified: trunk/src/jtag/dummy.c =================================================================== --- trunk/src/jtag/dummy.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/dummy.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,8 +21,6 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include "bitbang.h" Modified: trunk/src/jtag/ep93xx.c =================================================================== --- trunk/src/jtag/ep93xx.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/ep93xx.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,7 +21,6 @@ #include "config.h" #endif -#include "log.h" #include "jtag.h" #include "bitbang.h" @@ -33,14 +32,7 @@ #define SRST_BIT 32 #define VCC_BIT 64 -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <time.h> #include <sys/mman.h> -#include <unistd.h> -#include <fcntl.h> static u8 output_value = 0x0; static int dev_mem_fd; Modified: trunk/src/jtag/ft2232.c =================================================================== --- trunk/src/jtag/ft2232.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/ft2232.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -33,23 +33,14 @@ #include "config.h" #endif -#include "replacements.h" - #if IS_CYGWIN == 1 #include "windows.h" #endif /* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" #include "time_support.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <unistd.h> /* FT2232 access library includes */ #if BUILD_FT2232_FTD2XX == 1 Modified: trunk/src/jtag/gw16012.c =================================================================== --- trunk/src/jtag/gw16012.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/gw16012.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,10 +21,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" + #if 1 #define _DEBUG_GW16012_IO_ #endif @@ -40,14 +39,8 @@ #else -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - #endif /* __FreeBSD__, __FreeBSD_kernel__ */ -#include <string.h> -#include <stdlib.h> #if PARPORT_USE_PPDEV == 1 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -67,14 +60,10 @@ #endif #endif -#if PARPORT_USE_GIVEIO == 1 -#if IS_CYGWIN == 1 +#if PARPORT_USE_GIVEIO == 1 && IS_CYGWIN == 1 #include <windows.h> -#include <errno.h> #endif -#endif -#include "log.h" /* configuration */ u16 gw16012_port; Modified: trunk/src/jtag/jlink.c =================================================================== --- trunk/src/jtag/jlink.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/jlink.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -25,15 +25,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include <usb.h> -#include <string.h> -#include <errno.h> -#include "log.h" #define VID 0x1366 #define PID 0x0101 Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/jtag.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -28,16 +28,8 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" -#include "command.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> -#include <unistd.h> #ifdef HAVE_STRINGS_H #include <strings.h> #endif Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/jtag.h 2009-05-11 04:04:58 UTC (rev 1707) @@ -23,13 +23,10 @@ #ifndef JTAG_H #define JTAG_H -#include "types.h" #include "binarybuffer.h" #include "log.h" -#include "command.h" - #ifdef _DEBUG_JTAG_IO_ #define DEBUG_JTAG_IO(expr ...) LOG_DEBUG(expr) #else Modified: trunk/src/jtag/parport.c =================================================================== --- trunk/src/jtag/parport.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/parport.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -24,32 +24,17 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include "bitbang.h" -/* system includes */ /* -ino: 060521-1036 */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - #include <machine/sysarch.h> #include <machine/cpufunc.h> #define ioperm(startport,length,enable)\ i386_set_ioperm((startport), (length), (enable)) - -#else - -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - #endif /* __FreeBSD__ */ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> - #if PARPORT_USE_PPDEV == 1 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include <dev/ppbus/ppi.h> @@ -60,7 +45,6 @@ #include <linux/parport.h> #include <linux/ppdev.h> #endif -#include <fcntl.h> #include <sys/ioctl.h> #else /* not PARPORT_USE_PPDEV */ #ifndef _WIN32 @@ -68,14 +52,10 @@ #endif #endif -#if PARPORT_USE_GIVEIO == 1 -#if IS_CYGWIN == 1 +#if PARPORT_USE_GIVEIO == 1 && IS_CYGWIN == 1 #include <windows.h> -#include <errno.h> #endif -#endif -#include "log.h" /* parallel port cable description */ Modified: trunk/src/jtag/presto.c =================================================================== --- trunk/src/jtag/presto.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/presto.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -25,20 +25,10 @@ #include "windows.h" #endif -#include "replacements.h" - -/* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" #include "time_support.h" #include "bitq.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <unistd.h> /* PRESTO access library includes */ #if BUILD_PRESTO_FTD2XX == 1 Modified: trunk/src/jtag/rlink/rlink.c =================================================================== --- trunk/src/jtag/rlink/rlink.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/rlink/rlink.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -27,23 +27,18 @@ #include "config.h" #endif -/* system includes */ -#include <errno.h> -#include <string.h> -#include <usb.h> -#include <stdint.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" +/* system includes */ +#include <usb.h> +#include <stdint.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 Modified: trunk/src/jtag/usbprog.c =================================================================== --- trunk/src/jtag/usbprog.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/usbprog.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -34,15 +34,11 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" + #include <usb.h> -/* system includes */ -#include "log.h" - #define VID 0x1781 #define PID 0x0c63 Modified: trunk/src/jtag/vsllink.c =================================================================== --- trunk/src/jtag/vsllink.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/vsllink.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -26,14 +26,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include <usb.h> -#include <string.h> -#include "log.h" //#define _VSLLINK_IN_DEBUG_MODE_ Modified: trunk/src/jtag/zy1000.c =================================================================== --- trunk/src/jtag/zy1000.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/zy1000.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -20,17 +20,12 @@ #include "config.h" #endif - -#include "log.h" -#include "jtag.h" +#include "embeddedice.h" #include "bitbang.h" -#include "../target/embeddedice.h" - #include <cyg/hal/hal_io.h> // low level i/o #include <cyg/hal/hal_diag.h> -#include <stdlib.h> #define ZYLIN_VERSION "1.51" #define ZYLIN_DATE __DATE__ |
From: <zw...@ma...> - 2009-05-11 05:59:21
|
Author: zwelch Date: 2009-05-11 05:59:02 +0200 (Mon, 11 May 2009) New Revision: 1706 Modified: trunk/src/helper/binarybuffer.c trunk/src/helper/command.c trunk/src/helper/command.h trunk/src/helper/configuration.c trunk/src/helper/configuration.h trunk/src/helper/fileio.c trunk/src/helper/fileio.h trunk/src/helper/log.c trunk/src/helper/log.h trunk/src/helper/options.c trunk/src/helper/time_support.c Log: Audit and eliminate redundant helper #include directives. Modified: trunk/src/helper/binarybuffer.c =================================================================== --- trunk/src/helper/binarybuffer.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/binarybuffer.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -24,12 +24,7 @@ #include "config.h" #endif -#include <stdlib.h> -#include <string.h> - -#include "types.h" #include "log.h" - #include "binarybuffer.h" const unsigned char bit_reverse_table256[] = Modified: trunk/src/helper/command.c =================================================================== --- trunk/src/helper/command.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/command.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -30,22 +30,14 @@ #include "config.h" #endif -#include "replacements.h" +// @todo the inclusion of target.h here is a layering violation #include "target.h" #include "command.h" #include "configuration.h" - #include "log.h" #include "time_support.h" #include "jim-eventloop.h" -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <stdarg.h> -#include <stdio.h> -#include <unistd.h> -#include <errno.h> int fast_and_dangerous = 0; Jim_Interp *interp = NULL; Modified: trunk/src/helper/command.h =================================================================== --- trunk/src/helper/command.h 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/command.h 2009-05-11 03:59:02 UTC (rev 1706) @@ -23,7 +23,16 @@ #ifndef COMMAND_H #define COMMAND_H +/* Integrate the JIM TCL interpretor into the command processing. */ +#if BUILD_ECOSBOARD #include <stdio.h> +#include <stdarg.h> +/* Jim is provied by eCos */ +#include <cyg/jimtcl/jim.h> +#else +#define JIM_EMBEDDED +#include "jim.h" +#endif enum command_mode { @@ -87,16 +96,6 @@ extern int fast_and_dangerous; -/* Integrate the JIM TCL interpretor into the command processing. */ -#include <stdarg.h> -#if BUILD_ECOSBOARD -/* Jim is provied by eCos */ -#include <cyg/jimtcl/jim.h> -#else -#define JIM_EMBEDDED -#include "jim.h" -#endif - extern Jim_Interp *interp; void register_jim(command_context_t *context, const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj *const *argv), const char *help); Modified: trunk/src/helper/configuration.c =================================================================== --- trunk/src/helper/configuration.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/configuration.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -24,14 +24,9 @@ #include "config.h" #endif -#include "types.h" -#include "command.h" #include "configuration.h" #include "log.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> static size_t num_config_files; static char** config_file_names; Modified: trunk/src/helper/configuration.h =================================================================== --- trunk/src/helper/configuration.h 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/configuration.h 2009-05-11 03:59:02 UTC (rev 1706) @@ -24,7 +24,6 @@ #define CONFIGURATION_H #include "command.h" -#include "types.h" extern int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]); extern int parse_config_file(struct command_context_s *cmd_ctx); Modified: trunk/src/helper/fileio.c =================================================================== --- trunk/src/helper/fileio.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/fileio.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -27,21 +27,10 @@ #include "config.h" #endif -#include "types.h" -#include "replacements.h" #include "log.h" #include "configuration.h" - #include "fileio.h" -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <stdlib.h> -#include <sys/stat.h> -#include <errno.h> -#include <ctype.h> - static inline int fileio_open_local(fileio_t *fileio) { char access[4]; Modified: trunk/src/helper/fileio.h =================================================================== --- trunk/src/helper/fileio.h 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/fileio.h 2009-05-11 03:59:02 UTC (rev 1706) @@ -28,15 +28,8 @@ #define FILEIO_MAX_ERROR_STRING (128) -#include "types.h" +#include "replacements.h" -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <sys/stat.h> -#include <errno.h> -#include <ctype.h> - enum fileio_type { FILEIO_TEXT, Modified: trunk/src/helper/log.c =================================================================== --- trunk/src/helper/log.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/log.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -27,18 +27,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "log.h" -#include "configuration.h" #include "time_support.h" -#include "command.h" #include "server.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> #include <stdarg.h> #ifdef _DEBUG_FREE_SPACE_ Modified: trunk/src/helper/log.h =================================================================== --- trunk/src/helper/log.h 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/log.h 2009-05-11 03:59:02 UTC (rev 1706) @@ -29,8 +29,6 @@ #include "replacements.h" #include "command.h" -#include <stdarg.h> - /* logging priorities * LOG_LVL_SILENT - turn off all output. In lieu of try+catch this can be used as a * feeble ersatz. Modified: trunk/src/helper/options.c =================================================================== --- trunk/src/helper/options.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/options.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -24,18 +24,11 @@ #include "config.h" #endif -#include "replacements.h" - -#include "types.h" -#include "command.h" #include "configuration.h" #include "log.h" #include "server.h" -#include <stdio.h> -#include <stdlib.h> #include <getopt.h> -#include <string.h> static int help_flag, version_flag; Modified: trunk/src/helper/time_support.c =================================================================== --- trunk/src/helper/time_support.c 2009-05-11 03:48:32 UTC (rev 1705) +++ trunk/src/helper/time_support.c 2009-05-11 03:59:02 UTC (rev 1706) @@ -27,13 +27,10 @@ #include "config.h" #endif -#include "replacements.h" #include "time_support.h" #include "log.h" -#include <stdlib.h> - /* calculate difference between two struct timeval values */ int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) { |
From: <zw...@ma...> - 2009-05-11 05:48:36
|
Author: zwelch Date: 2009-05-11 05:48:32 +0200 (Mon, 11 May 2009) New Revision: 1705 Modified: trunk/src/helper/ioutil.c Log: Simplify #include directives in ioutil.c, use new header checks. Modified: trunk/src/helper/ioutil.c =================================================================== --- trunk/src/helper/ioutil.c 2009-05-11 03:47:56 UTC (rev 1704) +++ trunk/src/helper/ioutil.c 2009-05-11 03:48:32 UTC (rev 1705) @@ -24,48 +24,39 @@ #endif #include "log.h" -#include "types.h" -#include "configuration.h" -#include "target.h" +#include "time_support.h" -#include "command.h" - -#include <time_support.h> -#include <sys/time.h> -#include <strings.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#if !BUILD_ECOSBOARD -#include <malloc.h> +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> #endif -#include <errno.h> - - -#include <fcntl.h> -#include <sys/stat.h> +#ifdef HAVE_DIRENT_H #include <dirent.h> -#include <netinet/tcp.h> -#include <sys/ioctl.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <net/if.h> -#include <arpa/inet.h> -#include <sys/socket.h> +#endif +#ifdef HAVE_NETDB_H #include <netdb.h> -#include <netinet/in.h> -#include <unistd.h> -#include <arpa/inet.h> -#include <stdio.h> -#include <string.h> - -#if !defined(__CYGWIN__) +#endif +#ifdef HAVE_NET_IF_H +#include <net/if.h> +#endif +//#ifdef HAVE_NETINET_TCP_H +//#include <netinet/tcp.h> +//#endif +#ifdef HAVE_SYS_IOCTL_H +#include <sys/ioctl.h> +#endif +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif +#ifdef HAVE_IFADDRS_H #include <ifaddrs.h> #endif +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif +//#ifdef HAVE_STRINGS_H +//#include <strings.h> +//#endif -#include <unistd.h> -#include <stdio.h> int handle_rm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) |
From: <zw...@ma...> - 2009-05-11 05:48:03
|
Author: zwelch Date: 2009-05-11 05:47:56 +0200 (Mon, 11 May 2009) New Revision: 1704 Modified: trunk/configure.in Log: Add remaining header checks to be used in subsequent patches. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 03:35:25 UTC (rev 1703) +++ trunk/configure.in 2009-05-11 03:47:56 UTC (rev 1704) @@ -8,18 +8,25 @@ AC_SEARCH_LIBS([ioperm], [ioperm]) AC_SEARCH_LIBS([dlopen], [dl]) +AC_CHECK_HEADERS(arpa/inet.h) AC_CHECK_HEADERS(elf.h) +AC_CHECK_HEADERS(dirent.h) AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(ifaddrs.h) AC_CHECK_HEADERS(jtag_minidriver.h) AC_CHECK_HEADERS(malloc.h) +AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(netinet/in.h) +AC_CHECK_HEADERS(netinet/tcp.h) +AC_CHECK_HEADERS(net/if.h) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(strings.h) +AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/poll.h) AC_CHECK_HEADERS(sys/select.h) AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(unistd.h) |
From: <zw...@ma...> - 2009-05-11 05:35:32
|
Author: zwelch Date: 2009-05-11 05:35:25 +0200 (Mon, 11 May 2009) New Revision: 1703 Modified: trunk/configure.in trunk/src/helper/log.c Log: Add --enable-malloc-logging configure option and update log.c to match. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 02:52:00 UTC (rev 1702) +++ trunk/configure.in 2009-05-11 03:35:25 UTC (rev 1703) @@ -250,6 +250,19 @@ fi +debug_malloc=no +AC_ARG_ENABLE(malloc_logging, + AS_HELP_STRING([--enable-malloc-logging], + [Include free space in logging messages (requires malloc.h).]), + [debug_malloc=$enableval], []) + +AC_MSG_CHECKING([whether to enable malloc free space logging]); +AC_MSG_RESULT($debug_malloc) +if test $debug_malloc = yes; then + AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging]) +fi + + AC_ARG_ENABLE(parport, AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]), [build_parport=$enableval], [build_parport=no]) Modified: trunk/src/helper/log.c =================================================================== --- trunk/src/helper/log.c 2009-05-11 02:52:00 UTC (rev 1702) +++ trunk/src/helper/log.c 2009-05-11 03:35:25 UTC (rev 1703) @@ -41,10 +41,13 @@ #include <unistd.h> #include <stdarg.h> -#define PRINT_MEM() 0 -#if PRINT_MEM() +#ifdef _DEBUG_FREE_SPACE_ +#ifdef HAVE_MALLOC_H #include <malloc.h> +#else +#error "malloc.h is required to use --enable-malloc-logging" #endif +#endif int debug_level = -1; @@ -99,16 +102,16 @@ { /* print with count and time information */ int t=(int)(timeval_ms()-start); -#if PRINT_MEM() +#ifdef _DEBUG_FREE_SPACE_ struct mallinfo info; info = mallinfo(); #endif fprintf(log_output, "%s%d %d %s:%d %s()" -#if PRINT_MEM() +#ifdef _DEBUG_FREE_SPACE_ " %d" #endif ": %s", log_strings[level+1], count, t, file, line, function, -#if PRINT_MEM() +#ifdef _DEBUG_FREE_SPACE_ info.fordblks, #endif string); |
From: <zw...@ma...> - 2009-05-11 04:52:10
|
Author: zwelch Date: 2009-05-11 04:52:00 +0200 (Mon, 11 May 2009) New Revision: 1702 Added: trunk/src/helper/system.h Modified: trunk/configure.in trunk/src/helper/Makefile.am trunk/src/helper/replacements.h Log: Factor system #includes out of replacements.h into new system.h. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 02:29:53 UTC (rev 1701) +++ trunk/configure.in 2009-05-11 02:52:00 UTC (rev 1702) @@ -9,15 +9,20 @@ AC_SEARCH_LIBS([dlopen], [dl]) AC_CHECK_HEADERS(elf.h) +AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(ifaddrs.h) AC_CHECK_HEADERS(jtag_minidriver.h) AC_CHECK_HEADERS(malloc.h) +AC_CHECK_HEADERS(netinet/in.h) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/param.h) +AC_CHECK_HEADERS(sys/poll.h) +AC_CHECK_HEADERS(sys/select.h) +AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/time.h) -AC_CHECK_HEADERS(sys/select.h) AC_CHECK_HEADERS(sys/types.h) +AC_CHECK_HEADERS(unistd.h) AC_HEADER_ASSERT AC_HEADER_STDBOOL Modified: trunk/src/helper/Makefile.am =================================================================== --- trunk/src/helper/Makefile.am 2009-05-11 02:29:53 UTC (rev 1701) +++ trunk/src/helper/Makefile.am 2009-05-11 02:52:00 UTC (rev 1702) @@ -32,7 +32,7 @@ noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \ time_support.h replacements.h fileio.h jim.h jim-eventloop.h \ - startup.tcl bin2char.c + system.h startup.tcl bin2char.c bin2char$(EXEEXT_FOR_BUILD): bin2char.c ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@ Modified: trunk/src/helper/replacements.h =================================================================== --- trunk/src/helper/replacements.h 2009-05-11 02:29:53 UTC (rev 1701) +++ trunk/src/helper/replacements.h 2009-05-11 02:52:00 UTC (rev 1702) @@ -31,36 +31,8 @@ #endif #include "types.h" +#include "system.h" -#if BUILD_ECOSBOARD -#include <pkgconf/system.h> -#include <stdlib.h> -#endif - -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> /* select, FD_SET and friends (POSIX.1-2001) */ -#endif - -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> /* FD_SET and friends (pre-POSIX.1-2001) */ -#endif - -/* include necessary headers for socket functionality */ -#ifdef _WIN32 -#include <winsock2.h> -#include <ws2tcpip.h> -#else -#include <sys/socket.h> -#include <sys/poll.h> -#include <netinet/in.h> -#include <unistd.h> -#include <fcntl.h> -#endif - -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> /* for MIN/MAX macros */ -#endif - /* MIN,MAX macros */ #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) Added: trunk/src/helper/system.h =================================================================== --- trunk/src/helper/system.h 2009-05-11 02:29:53 UTC (rev 1701) +++ trunk/src/helper/system.h 2009-05-11 02:52:00 UTC (rev 1702) @@ -0,0 +1,77 @@ +/*************************************************************************** + * Copyright (C) 2006 by Dominic Rath <Dom...@gm...> * + * Copyright (C) 2007-2008 by Øyvind Harboe <oyv...@zy...> * + * Copyright (C) 2008 by Spencer Oliver <sp...@sp...> * + * Copyright (C) 2009 by Zachary T Welch <zw...@su...> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SYSTEM_H +#define SYSTEM_H + +// standard C library header files +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <errno.h> + +// +++ AC_HEADER_TIME +++ +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif +// --- AC_HEADER_TIME --- + +// +++ platform specific headers +++ +#if BUILD_ECOSBOARD == 1 +#include <pkgconf/system.h> +#endif +#ifdef _WIN32 +#include <winsock2.h> +#include <ws2tcpip.h> +#endif +// --- platform specific headers --- + +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#ifdef HAVE_SYS_POLL_H +#include <sys/poll.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> /* select, FD_SET and friends (POSIX.1-2001) */ +#endif +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> /* for MIN/MAX macros */ +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif + +#endif // SYSTEM_H |
From: <zw...@ma...> - 2009-05-11 04:29:56
|
Author: zwelch Date: 2009-05-11 04:29:53 +0200 (Mon, 11 May 2009) New Revision: 1701 Modified: trunk/src/helper/types.h Log: Finish portability support for AC_HEADER_STDBOOL configure macro. Modified: trunk/src/helper/types.h =================================================================== --- trunk/src/helper/types.h 2009-05-11 02:27:16 UTC (rev 1700) +++ trunk/src/helper/types.h 2009-05-11 02:29:53 UTC (rev 1701) @@ -54,15 +54,20 @@ #else /* HAVE_STDBOOL_H */ #define __bool_true_false_are_defined 1 +#ifndef HAVE__BOOL #ifndef __cplusplus #define false 0 #define true 1 -#define bool _Bool typedef int _Bool; +#else +typedef bool _Bool; #endif /* __cplusplus */ +#endif /* HAVE__BOOL */ +#define bool _Bool + #endif /* HAVE_STDBOOL_H */ /* DANGER!!!! here be dragons! |
From: <zw...@ma...> - 2009-05-11 04:27:44
|
Author: zwelch Date: 2009-05-11 04:27:16 +0200 (Mon, 11 May 2009) New Revision: 1700 Modified: trunk/src/ecosboard.c trunk/src/flash/flash.c trunk/src/flash/mflash.c trunk/src/helper/fileio.c trunk/src/helper/fileio.h trunk/src/helper/ioutil.c trunk/src/jtag/gw16012.c trunk/src/jtag/parport.c trunk/src/jtag/rlink/rlink.h trunk/src/openocd.c trunk/src/pld/pld.c trunk/src/pld/xilinx_bit.c trunk/src/server/httpd.c trunk/src/server/server.c trunk/src/server/server.h trunk/src/svf/svf.c trunk/src/target/arm7_9_common.c trunk/src/target/avrt.c trunk/src/target/target.c trunk/src/target/xscale.c trunk/src/xsvf/xsvf.c Log: Remove redundant sys/types.h #include directives (now in types.h). Modified: trunk/src/ecosboard.c =================================================================== --- trunk/src/ecosboard.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/ecosboard.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -39,7 +39,6 @@ #include <time_support.h> #include <sys/time.h> -#include <sys/types.h> #include <strings.h> #include <stdio.h> #include <stdlib.h> Modified: trunk/src/flash/flash.c =================================================================== --- trunk/src/flash/flash.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/flash/flash.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -42,7 +42,6 @@ #include <string.h> #include <unistd.h> #include <stdlib.h> -#include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <inttypes.h> Modified: trunk/src/flash/mflash.c =================================================================== --- trunk/src/flash/mflash.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/flash/mflash.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -25,7 +25,6 @@ #include <string.h> #include <unistd.h> #include <stdlib.h> -#include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <inttypes.h> Modified: trunk/src/helper/fileio.c =================================================================== --- trunk/src/helper/fileio.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/helper/fileio.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -38,7 +38,6 @@ #include <string.h> #include <unistd.h> #include <stdlib.h> -#include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <ctype.h> Modified: trunk/src/helper/fileio.h =================================================================== --- trunk/src/helper/fileio.h 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/helper/fileio.h 2009-05-11 02:27:16 UTC (rev 1700) @@ -33,7 +33,6 @@ #include <stdio.h> #include <unistd.h> #include <stdlib.h> -#include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <ctype.h> Modified: trunk/src/helper/ioutil.c =================================================================== --- trunk/src/helper/ioutil.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/helper/ioutil.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -32,7 +32,6 @@ #include <time_support.h> #include <sys/time.h> -#include <sys/types.h> #include <strings.h> #include <stdio.h> #include <stdlib.h> @@ -53,7 +52,6 @@ #include <netinet/in.h> #include <net/if.h> #include <arpa/inet.h> -#include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <netinet/in.h> Modified: trunk/src/jtag/gw16012.c =================================================================== --- trunk/src/jtag/gw16012.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/jtag/gw16012.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -33,7 +33,6 @@ /* -ino: 060521-1036 */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -#include <sys/types.h> #include <machine/sysarch.h> #include <machine/cpufunc.h> #define ioperm(startport,length,enable)\ Modified: trunk/src/jtag/parport.c =================================================================== --- trunk/src/jtag/parport.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/jtag/parport.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -33,7 +33,6 @@ /* -ino: 060521-1036 */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -#include <sys/types.h> #include <machine/sysarch.h> #include <machine/cpufunc.h> #define ioperm(startport,length,enable)\ Modified: trunk/src/jtag/rlink/rlink.h =================================================================== --- trunk/src/jtag/rlink/rlink.h 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/jtag/rlink/rlink.h 2009-05-11 02:27:16 UTC (rev 1700) @@ -19,7 +19,6 @@ ***************************************************************************/ #include "types.h" -#include <sys/types.h> typedef struct rlink_speed_table_s { Modified: trunk/src/openocd.c =================================================================== --- trunk/src/openocd.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/openocd.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -47,7 +47,6 @@ #include "tcl_server.h" #include <sys/time.h> -#include <sys/types.h> #include <strings.h> #include <stdio.h> #include <stdlib.h> Modified: trunk/src/pld/pld.c =================================================================== --- trunk/src/pld/pld.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/pld/pld.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -32,7 +32,6 @@ #include <stdlib.h> #include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> Modified: trunk/src/pld/xilinx_bit.c =================================================================== --- trunk/src/pld/xilinx_bit.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/pld/xilinx_bit.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -28,7 +28,6 @@ #include <stdlib.h> #include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> Modified: trunk/src/server/httpd.c =================================================================== --- trunk/src/server/httpd.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/server/httpd.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -40,12 +40,10 @@ #include <stdlib.h> #include <errno.h> #include <unistd.h> -#include <sys/types.h> #include <fcntl.h> #include <pthread.h> #include <signal.h> -#include <sys/types.h> #include <sys/select.h> #include <sys/socket.h> #include <microhttpd.h> Modified: trunk/src/server/server.c =================================================================== --- trunk/src/server/server.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/server/server.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -40,7 +40,6 @@ #include <stdlib.h> #include <errno.h> #include <unistd.h> -#include <sys/types.h> #include <fcntl.h> #include <signal.h> #ifndef _WIN32 Modified: trunk/src/server/server.h =================================================================== --- trunk/src/server/server.h 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/server/server.h 2009-05-11 02:27:16 UTC (rev 1700) @@ -30,8 +30,6 @@ #include "binarybuffer.h" #include "replacements.h" -#include <sys/types.h> - enum connection_type { CONNECTION_TCP, Modified: trunk/src/svf/svf.c =================================================================== --- trunk/src/svf/svf.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/svf/svf.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -42,7 +42,6 @@ #include <ctype.h> #include <stdlib.h> #include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> Modified: trunk/src/target/arm7_9_common.c =================================================================== --- trunk/src/target/arm7_9_common.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/target/arm7_9_common.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -48,7 +48,6 @@ #include <string.h> #include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> #include <sys/time.h> #include <errno.h> Modified: trunk/src/target/avrt.c =================================================================== --- trunk/src/target/avrt.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/target/avrt.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -37,7 +37,6 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <unistd.h> #include <errno.h> Modified: trunk/src/target/target.c =================================================================== --- trunk/src/target/target.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/target/target.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -46,7 +46,6 @@ #include <stdlib.h> #include <inttypes.h> -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <errno.h> Modified: trunk/src/target/xscale.c =================================================================== --- trunk/src/target/xscale.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/target/xscale.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -44,7 +44,6 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <unistd.h> #include <errno.h> Modified: trunk/src/xsvf/xsvf.c =================================================================== --- trunk/src/xsvf/xsvf.c 2009-05-11 02:24:58 UTC (rev 1699) +++ trunk/src/xsvf/xsvf.c 2009-05-11 02:27:16 UTC (rev 1700) @@ -49,7 +49,6 @@ #include <stdlib.h> #include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> |
From: <zw...@ma...> - 2009-05-11 04:25:09
|
Author: zwelch Date: 2009-05-11 04:24:58 +0200 (Mon, 11 May 2009) New Revision: 1699 Modified: trunk/configure.in trunk/src/helper/types.h Log: Add configure check for sys/types.h; include in our types.h. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 00:57:19 UTC (rev 1698) +++ trunk/configure.in 2009-05-11 02:24:58 UTC (rev 1699) @@ -17,6 +17,7 @@ AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/select.h) +AC_CHECK_HEADERS(sys/types.h) AC_HEADER_ASSERT AC_HEADER_STDBOOL Modified: trunk/src/helper/types.h =================================================================== --- trunk/src/helper/types.h 2009-05-11 00:57:19 UTC (rev 1698) +++ trunk/src/helper/types.h 2009-05-11 02:24:58 UTC (rev 1699) @@ -27,6 +27,10 @@ #include "config.h" #endif +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + #ifndef u8 typedef unsigned char u8; #endif |
From: <zw...@ma...> - 2009-05-11 02:57:31
|
Author: zwelch Date: 2009-05-11 02:57:19 +0200 (Mon, 11 May 2009) New Revision: 1698 Modified: trunk/configure.in Log: Add AC_HEADER_ASSERT macro to configure; provides --disable-assert option. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 00:49:51 UTC (rev 1697) +++ trunk/configure.in 2009-05-11 00:57:19 UTC (rev 1698) @@ -18,6 +18,7 @@ AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/select.h) +AC_HEADER_ASSERT AC_HEADER_STDBOOL AC_HEADER_TIME |
From: <zw...@ma...> - 2009-05-11 02:49:56
|
Author: zwelch Date: 2009-05-11 02:49:51 +0200 (Mon, 11 May 2009) New Revision: 1697 Modified: trunk/configure.in Log: Use AC_HEADER_STDBOOL macro instead of AC_CHEACK_HEADERS(stdbool.h). Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 00:44:59 UTC (rev 1696) +++ trunk/configure.in 2009-05-11 00:49:51 UTC (rev 1697) @@ -13,12 +13,12 @@ AC_CHECK_HEADERS(jtag_minidriver.h) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(pthread.h) -AC_CHECK_HEADERS(stdbool.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/select.h) +AC_HEADER_STDBOOL AC_HEADER_TIME AC_C_BIGENDIAN |
From: <zw...@ma...> - 2009-05-11 02:45:05
|
Author: zwelch Date: 2009-05-11 02:44:59 +0200 (Mon, 11 May 2009) New Revision: 1696 Modified: trunk/configure.in Log: OpenOCD now requires autoconf 2.60 to process AC_PROG_CC_C99 macro. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-10 22:03:57 UTC (rev 1695) +++ trunk/configure.in 2009-05-11 00:44:59 UTC (rev 1696) @@ -1,4 +1,4 @@ -AC_PREREQ(2.59) +AC_PREREQ(2.60) AC_INIT([openocd], [0.2.0-in-development], [OpenOCD Mailing List <ope...@li...>]) AC_CONFIG_SRCDIR([src/openocd.c]) |
From: <zw...@ma...> - 2009-05-11 00:04:10
|
Author: zwelch Date: 2009-05-11 00:03:57 +0200 (Mon, 11 May 2009) New Revision: 1695 Modified: trunk/Makefile.am trunk/bootstrap trunk/configure.in trunk/src/Makefile.am trunk/src/flash/Makefile.am trunk/src/helper/Makefile.am trunk/src/jtag/Makefile.am trunk/src/pld/Makefile.am trunk/src/server/Makefile.am trunk/src/svf/Makefile.am trunk/src/target/Makefile.am trunk/src/xsvf/Makefile.am Log: Extend autotools build to create shared library libopenocd with libtool: - Add libtoolize step too bootstrap script; creates ltmain.sh script. - Add AC_PROG_LIBTOOL to configure.in to add libtool support to build. - Change Makefile.am library rules from static (_a) to libtool (_la). - Install libopenocd.{la,so,a} in $(libdir); update openocd link rules. - Extend MAINTAINERCLEANFILES in top-level Makefile.am to remove ltmain.sh. Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -20,6 +20,7 @@ config.h.in \ config.h.in~ \ compile \ + ltmain.sh \ missing \ aclocal.m4 \ install-sh Modified: trunk/bootstrap =================================================================== --- trunk/bootstrap 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/bootstrap 2009-05-10 22:03:57 UTC (rev 1695) @@ -1,5 +1,6 @@ aclocal \ && autoheader \ +&& libtoolize --automake \ && automake --foreign --add-missing --copy \ && autoconf Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/configure.in 2009-05-10 22:03:57 UTC (rev 1695) @@ -787,6 +787,7 @@ AC_PROG_CC_C99 AM_PROG_CC_C_O AC_PROG_RANLIB +AC_PROG_LIBTOOL # Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h? AC_MSG_CHECKING([for environ in unistd.h and stdlib.h]) Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -1,3 +1,6 @@ +SUBDIRS = helper jtag xsvf svf target server flash pld + +lib_LTLIBRARIES = libopenocd.la bin_PROGRAMS = openocd if ECOSBOARD @@ -6,8 +9,11 @@ MAINFILE = main.c endif -openocd_SOURCES = $(MAINFILE) openocd.c +openocd_SOURCES = $(MAINFILE) +openocd_LDADD = libopenocd.la +libopenocd_la_SOURCES = openocd.c + # set the include path found by configure AM_CPPFLAGS = \ -I$(top_srcdir)/src \ @@ -21,22 +27,21 @@ -I$(top_srcdir)/src/pld # pass path to prefix path -openocd_CPPFLAGS = \ +libopenocd_la_CPPFLAGS = \ -DPKGLIBDIR=\"$(pkglibdir)\" \ -DPKGBLDDATE=\"`date +%F-%R`\" if RELEASE -openocd_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\" +libopenocd_la_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\" else -openocd_CPPFLAGS += -DRELSTR=\"svn:\" -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\" +libopenocd_la_CPPFLAGS += -DRELSTR=\"svn:\" -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\" endif # add default CPPFLAGS -openocd_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS) +libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS) # the library search path. -openocd_LDFLAGS = $(all_libraries) -SUBDIRS = helper jtag xsvf svf target server flash pld +libopenocd_la_LDFLAGS = $(all_libraries) if IS_MINGW MINGWLDADD = -lwsock32 @@ -72,16 +77,19 @@ endif endif -openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a $(top_builddir)/src/svf/libsvf.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 \ +libopenocd_la_LIBADD = \ + $(top_builddir)/src/xsvf/libxsvf.la \ + $(top_builddir)/src/svf/libsvf.la \ + $(top_builddir)/src/pld/libpld.la \ + $(top_builddir)/src/jtag/libjtag.la \ + $(top_builddir)/src/flash/libflash.la \ + $(top_builddir)/src/target/libtarget.la \ + $(top_builddir)/src/server/libserver.la \ + $(top_builddir)/src/helper/libhelper.la \ $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) if HTTPD -openocd_LDADD += -lmicrohttpd +libopenocd_la_LIBADD += -lmicrohttpd endif nobase_dist_pkglib_DATA = \ Modified: trunk/src/flash/Makefile.am =================================================================== --- trunk/src/flash/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/flash/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -4,8 +4,8 @@ -I$(top_srcdir)/src/target METASOURCES = AUTO -noinst_LIBRARIES = libflash.a -libflash_a_SOURCES = \ +noinst_LTLIBRARIES = libflash.la +libflash_la_SOURCES = \ flash.c lpc2000.c cfi.c non_cfi.c at91sam7.c \ str7x.c str9x.c aduc702x.c nand.c nand_ecc.c \ lpc3180_nand_controller.c stellaris.c str9xpec.c stm32x.c tms470.c \ Modified: trunk/src/helper/Makefile.am =================================================================== --- trunk/src/helper/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/helper/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -5,7 +5,7 @@ -DPKGLIBDIR=\"$(pkglibdir)\" METASOURCES = AUTO -noinst_LIBRARIES = libhelper.a +noinst_LTLIBRARIES = libhelper.la if ECOSBOARD CONFIGFILES = @@ -15,19 +15,19 @@ -libhelper_a_SOURCES = \ +libhelper_la_SOURCES = \ binarybuffer.c $(CONFIGFILES) configuration.c \ log.c command.c time_support.c \ replacements.c fileio.c startup_tcl.c if IOUTIL -libhelper_a_SOURCES += ioutil.c +libhelper_la_SOURCES += ioutil.c endif -libhelper_a_CFLAGS = +libhelper_la_CFLAGS = if IS_MINGW # FD_* macros are sloppy with their signs on MinGW32 platform -libhelper_a_CFLAGS += -Wno-sign-compare +libhelper_la_CFLAGS += -Wno-sign-compare endif noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \ Modified: trunk/src/jtag/Makefile.am =================================================================== --- trunk/src/jtag/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/jtag/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -3,7 +3,7 @@ -I$(top_srcdir)/src/target METASOURCES = AUTO -noinst_LIBRARIES = libjtag.a +noinst_LTLIBRARIES = libjtag.la if BITBANG BITBANGFILES = bitbang.c @@ -109,8 +109,12 @@ ARMJTAGEWFILES = endif -libjtag_a_SOURCES = jtag.c $(BITBANGFILES) $(PARPORTFILES) $(DUMMYFILES) $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \ - $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) $(JLINKFILES) $(RLINKFILES) $(VSLLINKFILES) $(ARMJTAGEWFILES) +libjtag_la_SOURCES = jtag.c \ + $(BITBANGFILES) $(PARPORTFILES) $(DUMMYFILES) \ + $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \ + $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) \ + $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES) \ + $(JLINKFILES) $(RLINKFILES) $(VSLLINKFILES) $(ARMJTAGEWFILES) noinst_HEADERS = bitbang.h jtag.h bitq.h rlink/dtc_cmd.h rlink/ep1_cmd.h rlink/rlink.h rlink/st7.h Modified: trunk/src/pld/Makefile.am =================================================================== --- trunk/src/pld/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/pld/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -4,8 +4,8 @@ -I$(top_srcdir)/src/jtag METASOURCES = AUTO -noinst_LIBRARIES = libpld.a +noinst_LTLIBRARIES = libpld.la noinst_HEADERS = pld.h xilinx_bit.h virtex2.h -libpld_a_SOURCES = pld.c xilinx_bit.c virtex2.c +libpld_la_SOURCES = pld.c xilinx_bit.c virtex2.c MAINTAINERCLEANFILES = Makefile.in Modified: trunk/src/server/Makefile.am =================================================================== --- trunk/src/server/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/server/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -6,23 +6,23 @@ -DPKGLIBDIR=\"$(pkglibdir)\" METASOURCES = AUTO -noinst_LIBRARIES = libserver.a +noinst_LTLIBRARIES = libserver.la noinst_HEADERS = server.h telnet_server.h gdb_server.h -libserver_a_SOURCES = server.c telnet_server.c gdb_server.c +libserver_la_SOURCES = server.c telnet_server.c gdb_server.c if HTTPD -libserver_a_SOURCES += httpd.c +libserver_la_SOURCES += httpd.c endif -libserver_a_CFLAGS = +libserver_la_CFLAGS = if IS_MINGW # FD_* macros are sloppy with their signs on MinGW32 platform -libserver_a_CFLAGS += -Wno-sign-compare +libserver_la_CFLAGS += -Wno-sign-compare endif # tcl server addons noinst_HEADERS += tcl_server.h -libserver_a_SOURCES += tcl_server.c +libserver_la_SOURCES += tcl_server.c if HTTPD nobase_dist_pkglib_DATA = $(wildcard $(srcdir)/httpd/*.tcl $(srcdir)/httpd/*.css $(srcdir)/httpd/menu_cuts/*.png) Modified: trunk/src/svf/Makefile.am =================================================================== --- trunk/src/svf/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/svf/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -4,8 +4,8 @@ -I$(top_srcdir)/src/jtag METASOURCES = AUTO -noinst_LIBRARIES = libsvf.a +noinst_LTLIBRARIES = libsvf.la noinst_HEADERS = svf.h -libsvf_a_SOURCES = svf.c +libsvf_la_SOURCES = svf.c MAINTAINERCLEANFILES = Makefile.in Modified: trunk/src/target/Makefile.am =================================================================== --- trunk/src/target/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/target/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -11,8 +11,9 @@ -I$(top_srcdir)/src/xsvf METASOURCES = AUTO -noinst_LIBRARIES = libtarget.a -libtarget_a_SOURCES = target.c register.c breakpoints.c armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \ +noinst_LTLIBRARIES = libtarget.la +libtarget_la_SOURCES = target.c register.c breakpoints.c \ + armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \ arm_jtag.c arm7_9_common.c algorithm.c arm920t.c arm720t.c armv4_5_mmu.c armv4_5_cache.c arm_disassembler.c \ arm966e.c arm926ejs.c feroceon.c etb.c xscale.c arm_simulator.c image.c armv7m.c cortex_m3.c cortex_a8.c arm_adi_v5.c \ etm_dummy.c $(OOCD_TRACE_FILES) target_request.c trace.c arm11.c arm11_dbgtap.c mips32.c mips_m4k.c \ Modified: trunk/src/xsvf/Makefile.am =================================================================== --- trunk/src/xsvf/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) +++ trunk/src/xsvf/Makefile.am 2009-05-10 22:03:57 UTC (rev 1695) @@ -4,8 +4,8 @@ -I$(top_srcdir)/src/jtag METASOURCES = AUTO -noinst_LIBRARIES = libxsvf.a +noinst_LTLIBRARIES = libxsvf.la noinst_HEADERS = xsvf.h -libxsvf_a_SOURCES = xsvf.c +libxsvf_la_SOURCES = xsvf.c MAINTAINERCLEANFILES = Makefile.in |
From: <zw...@ma...> - 2009-05-10 23:33:59
|
Author: zwelch Date: 2009-05-10 23:33:53 +0200 (Sun, 10 May 2009) New Revision: 1694 Removed: trunk/src/helper/tclapi.c trunk/src/helper/tclapi.h Modified: trunk/src/helper/Makefile.am trunk/src/openocd.c Log: Reverse revision 1691: all of its functionality has migrated elsewhere. Modified: trunk/src/helper/Makefile.am =================================================================== --- trunk/src/helper/Makefile.am 2009-05-10 20:10:11 UTC (rev 1693) +++ trunk/src/helper/Makefile.am 2009-05-10 21:33:53 UTC (rev 1694) @@ -17,7 +17,7 @@ libhelper_a_SOURCES = \ binarybuffer.c $(CONFIGFILES) configuration.c \ - log.c command.c time_support.c tclapi.c \ + log.c command.c time_support.c \ replacements.c fileio.c startup_tcl.c if IOUTIL Deleted: trunk/src/helper/tclapi.c =================================================================== --- trunk/src/helper/tclapi.c 2009-05-10 20:10:11 UTC (rev 1693) +++ trunk/src/helper/tclapi.c 2009-05-10 21:33:53 UTC (rev 1694) @@ -1,516 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007,2008 vind Harboe * - * Copyright (C) 2008 Duane Ellis * - * * - * 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 - -#include "tclapi.h" -#include "../target/target.h" -#include "../jtag/jtag.h" -#include "../flash/flash.h" - -#include <string.h> - - -static int new_int_array_element(Jim_Interp * interp, const char *varname, int idx, u32 val) -{ - char *namebuf; - Jim_Obj *nameObjPtr, *valObjPtr; - int result; - - namebuf = alloc_printf("%s(%d)", varname, idx); - if (!namebuf) - return JIM_ERR; - - nameObjPtr = Jim_NewStringObj(interp, namebuf, -1); - valObjPtr = Jim_NewIntObj(interp, val); - if (!nameObjPtr || !valObjPtr) - { - free(namebuf); - return JIM_ERR; - } - - Jim_IncrRefCount(nameObjPtr); - Jim_IncrRefCount(valObjPtr); - result = Jim_SetVariable(interp, nameObjPtr, valObjPtr); - Jim_DecrRefCount(interp, nameObjPtr); - Jim_DecrRefCount(interp, valObjPtr); - free(namebuf); - /* printf("%s(%d) <= 0%08x\n", varname, idx, val); */ - return result; -} - -static int jim_mem2array(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - target_t *target; - command_context_t *context; - long l; - u32 width; - int len; - u32 addr; - unsigned count; - u32 v; - const char *varname; - u8 buffer[4096]; - unsigned i, n; - int e, retval; - - /* argv[1] = name of array to receive the data - * argv[2] = desired width - * argv[3] = memory address - * argv[4] = count of times to read - */ - if (argc != 5) { - Jim_WrongNumArgs(interp, 1, argv, "varname width addr nelems"); - return JIM_ERR; - } - varname = Jim_GetString(argv[1], &len); - /* given "foo" get space for worse case "foo(%d)" .. add 20 */ - - e = Jim_GetLong(interp, argv[2], &l); - width = l; - if (e != JIM_OK) { - return e; - } - - e = Jim_GetLong(interp, argv[3], &l); - addr = l; - if (e != JIM_OK) { - return e; - } - e = Jim_GetLong(interp, argv[4], &l); - len = l; - if (e != JIM_OK) { - return e; - } - switch (width) { - case 8: - width = 1; - break; - case 16: - width = 2; - break; - case 32: - width = 4; - break; - default: - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings( interp, Jim_GetResult(interp), "Invalid width param, must be 8/16/32", NULL ); - return JIM_ERR; - } - if (len == 0) { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "mem2array: zero width read?", NULL); - return JIM_ERR; - } - if ((addr + (len * width)) < addr) { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "mem2array: addr + len - wraps to zero?", NULL); - return JIM_ERR; - } - /* absurd transfer size? */ - if (len > 65536) { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "mem2array: absurd > 64K item request", NULL); - return JIM_ERR; - } - - if ((width == 1) || - ((width == 2) && ((addr & 1) == 0)) || - ((width == 4) && ((addr & 3) == 0))) { - /* all is well */ - } else { - char buf[100]; - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - sprintf(buf, "mem2array address: 0x%08x is not aligned for %d byte reads", addr, width); - Jim_AppendStrings(interp, Jim_GetResult(interp), buf , NULL); - return JIM_ERR; - } - - context = Jim_GetAssocData(interp, "context"); - if (context == NULL) - { - LOG_ERROR("mem2array: no command context"); - return JIM_ERR; - } - target = get_current_target(context); - if (target == NULL) - { - LOG_ERROR("mem2array: no current target"); - return JIM_ERR; - } - - /* Transfer loop */ - - /* index counter */ - n = 0; - /* assume ok */ - e = JIM_OK; - while (len) { - /* Slurp... in buffer size chunks */ - - count = len; /* in objects.. */ - if (count > (sizeof(buffer)/width)) { - count = (sizeof(buffer)/width); - } - - retval = target->type->read_memory( target, addr, width, count, buffer ); - if (retval != ERROR_OK) { - /* BOO !*/ - LOG_ERROR("mem2array: Read @ 0x%08x, w=%d, cnt=%d, failed", addr, width, count); - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "mem2array: cannot read memory", NULL); - e = JIM_ERR; - len = 0; - } else { - v = 0; /* shut up gcc */ - for (i = 0 ;i < count ;i++, n++) { - switch (width) { - case 4: - v = target_buffer_get_u32(target, &buffer[i*width]); - break; - case 2: - v = target_buffer_get_u16(target, &buffer[i*width]); - break; - case 1: - v = buffer[i] & 0x0ff; - break; - } - new_int_array_element(interp, varname, n, v); - } - len -= count; - } - } - - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - - return JIM_OK; -} - -static int get_int_array_element(Jim_Interp * interp, const char *varname, int idx, u32 *val) -{ - char *namebuf; - Jim_Obj *nameObjPtr, *valObjPtr; - int result; - long l; - - namebuf = alloc_printf("%s(%d)", varname, idx); - if (!namebuf) - return JIM_ERR; - - nameObjPtr = Jim_NewStringObj(interp, namebuf, -1); - if (!nameObjPtr) - { - free(namebuf); - return JIM_ERR; - } - - Jim_IncrRefCount(nameObjPtr); - valObjPtr = Jim_GetVariable(interp, nameObjPtr, JIM_ERRMSG); - Jim_DecrRefCount(interp, nameObjPtr); - free(namebuf); - if (valObjPtr == NULL) - return JIM_ERR; - - result = Jim_GetLong(interp, valObjPtr, &l); - /* printf("%s(%d) => 0%08x\n", varname, idx, val); */ - *val = l; - return result; -} - -static int jim_array2mem(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - target_t *target; - command_context_t *context; - long l; - u32 width; - int len; - u32 addr; - u32 count; - u32 v; - const char *varname; - u8 buffer[4096]; - int n, e, retval; - - /* argv[1] = name of array to get the data - * argv[2] = desired width - * argv[3] = memory address - * argv[4] = count to write - */ - if (argc != 5) { - Jim_WrongNumArgs(interp, 1, argv, "varname width addr nelems"); - return JIM_ERR; - } - varname = Jim_GetString(argv[1], &len); - /* given "foo" get space for worse case "foo(%d)" .. add 20 */ - - e = Jim_GetLong(interp, argv[2], &l); - width = l; - if (e != JIM_OK) { - return e; - } - - e = Jim_GetLong(interp, argv[3], &l); - addr = l; - if (e != JIM_OK) { - return e; - } - e = Jim_GetLong(interp, argv[4], &l); - len = l; - if (e != JIM_OK) { - return e; - } - switch (width) { - case 8: - width = 1; - break; - case 16: - width = 2; - break; - case 32: - width = 4; - break; - default: - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings( interp, Jim_GetResult(interp), "Invalid width param, must be 8/16/32", NULL ); - return JIM_ERR; - } - if (len == 0) { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "array2mem: zero width read?", NULL); - return JIM_ERR; - } - if ((addr + (len * width)) < addr) { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "array2mem: addr + len - wraps to zero?", NULL); - return JIM_ERR; - } - /* absurd transfer size? */ - if (len > 65536) { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "array2mem: absurd > 64K item request", NULL); - return JIM_ERR; - } - - if ((width == 1) || - ((width == 2) && ((addr & 1) == 0)) || - ((width == 4) && ((addr & 3) == 0))) { - /* all is well */ - } else { - char buf[100]; - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - sprintf(buf, "array2mem address: 0x%08x is not aligned for %d byte reads", addr, width); - Jim_AppendStrings(interp, Jim_GetResult(interp), buf , NULL); - return JIM_ERR; - } - - context = Jim_GetAssocData(interp, "context"); - if (context == NULL) - { - LOG_ERROR("array2mem: no command context"); - return JIM_ERR; - } - target = get_current_target(context); - if (target == NULL) - { - LOG_ERROR("array2mem: no current target"); - return JIM_ERR; - } - - /* Transfer loop */ - - /* index counter */ - n = 0; - /* assume ok */ - e = JIM_OK; - while (len) { - /* Slurp... in buffer size chunks */ - - count = len; /* in objects.. */ - if (count > (sizeof(buffer)/width)) { - count = (sizeof(buffer)/width); - } - - v = 0; /* shut up gcc */ - for (unsigned i = 0 ;i < count ;i++, n++) { - get_int_array_element(interp, varname, n, &v); - switch (width) { - case 4: - target_buffer_set_u32(target, &buffer[i*width], v); - break; - case 2: - target_buffer_set_u16(target, &buffer[i*width], v); - break; - case 1: - buffer[i] = v & 0x0ff; - break; - } - } - len -= count; - - retval = target->type->write_memory(target, addr, width, count, buffer); - if (retval != ERROR_OK) { - /* BOO !*/ - LOG_ERROR("array2mem: Write @ 0x%08x, w=%d, cnt=%d, failed", addr, width, count); - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "mem2array: cannot read memory", NULL); - e = JIM_ERR; - len = 0; - } - } - - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - - return JIM_OK; -} - -int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args) -{ - int retval; - scan_field_t *fields; - int num_fields; - int field_count = 0; - int i, e; - long device; - - /* args[1] = device - * args[2] = num_bits - * args[3] = hex string - * ... repeat num bits and hex string ... - */ - if ((argc < 4) || ((argc % 2)!=0)) - { - Jim_WrongNumArgs(interp, 1, args, "<device> <num_bits1> <value1> <num_bits2> <value2> ..."); - return JIM_ERR; - } - - for (i = 2; i < argc; i+=2) - { - long bits; - - e = Jim_GetLong(interp, args[i], &bits); - if (e != JIM_OK) - return e; - } - - e = Jim_GetLong(interp, args[1], &device); - if (e != JIM_OK) - return e; - - num_fields=(argc-2)/2; - fields = malloc(sizeof(scan_field_t) * num_fields); - for (i = 2; i < argc; i+=2) - { - long bits; - int len; - const char *str; - - Jim_GetLong(interp, args[i], &bits); - str = Jim_GetString(args[i+1], &len); - - fields[field_count].num_bits = bits; - fields[field_count].out_value = malloc(CEIL(bits, 8)); - str_to_buf(str, len, fields[field_count].out_value, bits, 0); - fields[field_count].in_value = fields[field_count].out_value; - } - - jtag_add_dr_scan(num_fields, fields, TAP_INVALID); - retval = jtag_execute_queue(); - if (retval != ERROR_OK) - { - Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - Jim_AppendStrings(interp, Jim_GetResult(interp), "drscan: jtag execute failed", NULL); - return JIM_ERR; - } - - field_count=0; - Jim_Obj *list = Jim_NewListObj(interp, NULL, 0); - for (i = 2; i < argc; i+=2) - { - long bits; - char *str; - - Jim_GetLong(interp, args[i], &bits); - str = buf_to_str(fields[field_count].in_value, bits, 16); - free(fields[field_count].out_value); - - Jim_ListAppendElement(interp, list, Jim_NewStringObj(interp, str, strlen(str))); - free(str); - field_count++; - } - - Jim_SetResult(interp, list); - - free(fields); - - return JIM_OK; -} - -static int jim_flash_banks(Jim_Interp *interp, int argc, Jim_Obj *const *argv) -{ - - if (argc != 1) { - Jim_WrongNumArgs(interp, 1, argv, "no arguments to flash_banks command"); - return JIM_ERR; - } - - unsigned flash_banks = flash_get_bank_count(); - if (!flash_banks) - { - return JIM_ERR; - } - - Jim_Obj *list=Jim_NewListObj(interp, NULL, 0); - for (unsigned i = 0; i < flash_banks; i++) - { - flash_bank_t *p = get_flash_bank_by_num(i); - Jim_Obj *elem=Jim_NewListObj(interp, NULL, 0); - - Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "name", -1)); - Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, p->driver->name, -1)); - Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "base", -1)); - Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->base)); - Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "size", -1)); - Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->size)); - Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "bus_width", -1)); - Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->bus_width)); - Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "chip_width", -1)); - Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->chip_width)); - - Jim_ListAppendElement(interp, list, elem); - } - - Jim_SetResult(interp, list); - - return JIM_OK; -} - -int tclapi_register_commands(struct command_context_s *cmd_ctx) -{ - register_jim(cmd_ctx, "ocd_mem2array", &jim_mem2array, - "read memory and return as a TCL array for script processing"); - register_jim(cmd_ctx, "ocd_array2mem", &jim_array2mem, - "convert a TCL array to memory locations and write the values"); - register_jim(cmd_ctx, "drscan", &Jim_Command_drscan, - "execute DR scan <device> <num_bits> <value> <num_bits1> <value2> ..."); - register_jim(cmd_ctx, "ocd_flash_banks", &jim_flash_banks, - "return information about the flash banks"); - return ERROR_OK; -} Deleted: trunk/src/helper/tclapi.h =================================================================== --- trunk/src/helper/tclapi.h 2009-05-10 20:10:11 UTC (rev 1693) +++ trunk/src/helper/tclapi.h 2009-05-10 21:33:53 UTC (rev 1694) @@ -1,26 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 by Zachary T Welch <zw...@su...> * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef TCLAPI_H -#define TCLAPI_H - -#include "command.h" - -int tclapi_register_commands(struct command_context_s *ctx); - -#endif // TCLAPI_H Modified: trunk/src/openocd.c =================================================================== --- trunk/src/openocd.c 2009-05-10 20:10:11 UTC (rev 1693) +++ trunk/src/openocd.c 2009-05-10 21:33:53 UTC (rev 1694) @@ -41,7 +41,6 @@ #include "mflash.h" #include "command.h" -#include "tclapi.h" #include "server.h" #include "telnet_server.h" #include "gdb_server.h" @@ -203,7 +202,6 @@ telnet_register_commands(cmd_ctx); gdb_register_commands(cmd_ctx); tcl_register_commands(cmd_ctx); /* tcl server commands */ - tclapi_register_commands(cmd_ctx); /* misc tcl commands */ log_register_commands(cmd_ctx); jtag_register_commands(cmd_ctx); xsvf_register_commands(cmd_ctx); |