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: <oh...@ma...> - 2009-05-12 19:29:27
|
Author: oharboe Date: 2009-05-12 19:29:16 +0200 (Tue, 12 May 2009) New Revision: 1768 Added: trunk/src/flash/nand_ecc_kw.c Modified: trunk/src/flash/Makefile.am trunk/src/flash/nand.c trunk/src/flash/nand.h trunk/src/target/board/sheevaplug.cfg Log: 4-bit ECC support for Marvell Kirkwood SOC Modified: trunk/src/flash/Makefile.am =================================================================== --- trunk/src/flash/Makefile.am 2009-05-12 17:14:10 UTC (rev 1767) +++ trunk/src/flash/Makefile.am 2009-05-12 17:29:16 UTC (rev 1768) @@ -7,7 +7,7 @@ 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 \ + str7x.c str9x.c aduc702x.c nand.c nand_ecc.c nand_ecc_kw.c \ lpc3180_nand_controller.c stellaris.c str9xpec.c stm32x.c tms470.c \ ecos.c orion_nand.c s3c24xx_nand.c s3c2410_nand.c s3c2412_nand.c \ s3c2440_nand.c s3c2443_nand.c lpc288x.c ocl.c mflash.c pic32mx.c avrf.c Modified: trunk/src/flash/nand.c =================================================================== --- trunk/src/flash/nand.c 2009-05-12 17:14:10 UTC (rev 1767) +++ trunk/src/flash/nand.c 2009-05-12 17:29:16 UTC (rev 1768) @@ -1332,6 +1332,8 @@ oob_format |= NAND_OOB_RAW | NAND_OOB_ONLY; else if (!strcmp(args[i], "oob_softecc")) oob_format |= NAND_OOB_SW_ECC; + else if (!strcmp(args[i], "oob_softecc_kw")) + oob_format |= NAND_OOB_SW_ECC_KW; else { command_print(cmd_ctx, "unknown option: %s", args[i]); @@ -1355,7 +1357,7 @@ page = malloc(p->page_size); } - if (oob_format & (NAND_OOB_RAW | NAND_OOB_SW_ECC)) + if (oob_format & (NAND_OOB_RAW | NAND_OOB_SW_ECC | NAND_OOB_SW_ECC_KW)) { if (p->page_size == 512) { oob_size = 16; @@ -1401,6 +1403,21 @@ oob[eccpos[j++]] = ecc[1]; oob[eccpos[j++]] = ecc[2]; } + } else if (oob_format & NAND_OOB_SW_ECC_KW) + { + /* + * In this case eccpos is not used as + * the ECC data is always stored contigously + * at the end of the OOB area. It consists + * of 10 bytes per 512-byte data block. + */ + u32 i; + u8 *ecc = oob + oob_size - page_size/512 * 10; + memset(oob, 0xff, oob_size); + for (i = 0; i < page_size; i += 512) { + nand_calculate_ecc_kw(p, page+i, ecc); + ecc += 10; + } } else if (NULL != oob) { Modified: trunk/src/flash/nand.h =================================================================== --- trunk/src/flash/nand.h 2009-05-12 17:14:10 UTC (rev 1767) +++ trunk/src/flash/nand.h 2009-05-12 17:29:16 UTC (rev 1768) @@ -200,6 +200,7 @@ NAND_OOB_ONLY = 0x2, /* only OOB data */ NAND_OOB_SW_ECC = 0x10, /* when writing, use SW ECC (as opposed to no ECC) */ NAND_OOB_HW_ECC = 0x20, /* when writing, use HW ECC (as opposed to no ECC) */ + NAND_OOB_SW_ECC_KW = 0x40, /* when writing, use Marvell's Kirkwood bootrom format */ NAND_OOB_JFFS2 = 0x100, /* when writing, use JFFS2 OOB layout */ NAND_OOB_YAFFS2 = 0x100,/* when writing, use YAFFS2 OOB layout */ }; @@ -210,6 +211,7 @@ extern int nand_write_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 data_size, u8 *oob, u32 oob_size); extern int nand_read_status(struct nand_device_s *device, u8 *status); extern int nand_calculate_ecc(struct nand_device_s *device, const u8 *dat, u8 *ecc_code); +extern int nand_calculate_ecc_kw(struct nand_device_s *device, const u8 *dat, u8 *ecc_code); extern int nand_register_commands(struct command_context_s *cmd_ctx); extern int nand_init(struct command_context_s *cmd_ctx); Added: trunk/src/flash/nand_ecc_kw.c =================================================================== --- trunk/src/flash/nand_ecc_kw.c 2009-05-12 17:14:10 UTC (rev 1767) +++ trunk/src/flash/nand_ecc_kw.c 2009-05-12 17:29:16 UTC (rev 1768) @@ -0,0 +1,174 @@ +/* + * Reed-Solomon ECC handling for the Marvell Kirkwood SOC + * Copyright (C) 2009 Marvell Semiconductor, Inc. + * + * Authors: Lennert Buytenhek <bu...@wa...> + * Nicolas Pitre <ni...@ca...> + * + * This file 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 or (at your option) any + * later version. + * + * This file 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. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <sys/types.h> +#include "nand.h" + + +/***************************************************************************** + * Arithmetic in GF(2^10) ("F") modulo x^10 + x^3 + 1. + * + * For multiplication, a discrete log/exponent table is used, with + * primitive element x (F is a primitive field, so x is primitive). + */ +#define MODPOLY 0x409 /* x^10 + x^3 + 1 in binary */ + +/* + * Maps an integer a [0..1022] to a polynomial b = gf_exp[a] in + * GF(2^10) mod x^10 + x^3 + 1 such that b = x ^ a. There's two + * identical copies of this array back-to-back so that we can save + * the mod 1023 operation when doing a GF multiplication. + */ +static uint16_t gf_exp[1023 + 1023]; + +/* + * Maps a polynomial b in GF(2^10) mod x^10 + x^3 + 1 to an index + * a = gf_log[b] in [0..1022] such that b = x ^ a. + */ +static uint16_t gf_log[1024]; + +static void gf_build_log_exp_table(void) +{ + int i; + int p_i; + + /* + * p_i = x ^ i + * + * Initialise to 1 for i = 0. + */ + p_i = 1; + + for (i = 0; i < 1023; i++) { + gf_exp[i] = p_i; + gf_exp[i + 1023] = p_i; + gf_log[p_i] = i; + + /* + * p_i = p_i * x + */ + p_i <<= 1; + if (p_i & (1 << 10)) + p_i ^= MODPOLY; + } +} + + +/***************************************************************************** + * Reed-Solomon code + * + * This implements a (1023,1015) Reed-Solomon ECC code over GF(2^10) + * mod x^10 + x^3 + 1, shortened to (520,512). The ECC data consists + * of 8 10-bit symbols, or 10 8-bit bytes. + * + * Given 512 bytes of data, computes 10 bytes of ECC. + * + * This is done by converting the 512 bytes to 512 10-bit symbols + * (elements of F), interpreting those symbols as a polynomial in F[X] + * by taking symbol 0 as the coefficient of X^8 and symbol 511 as the + * coefficient of X^519, and calculating the residue of that polynomial + * divided by the generator polynomial, which gives us the 8 ECC symbols + * as the remainder. Finally, we convert the 8 10-bit ECC symbols to 10 + * 8-bit bytes. + * + * The generator polynomial is hardcoded, as that is faster, but it + * can be computed by taking the primitive element a = x (in F), and + * constructing a polynomial in F[X] with roots a, a^2, a^3, ..., a^8 + * by multiplying the minimal polynomials for those roots (which are + * just 'x - a^i' for each i). + * + * Note: due to unfortunate circumstances, the bootrom in the Kirkwood SOC + * expects the ECC to be computed backward, i.e. from the last byte down + * to the first one. + */ +int nand_calculate_ecc_kw(struct nand_device_s *device, const u8 *data, u8 *ecc) +{ + unsigned int r7, r6, r5, r4, r3, r2, r1, r0; + int i; + static int tables_initialized = 0; + + if (!tables_initialized) { + gf_build_log_exp_table(); + tables_initialized = 1; + } + + /* + * Load bytes 504..511 of the data into r. + */ + r0 = data[504]; + r1 = data[505]; + r2 = data[506]; + r3 = data[507]; + r4 = data[508]; + r5 = data[509]; + r6 = data[510]; + r7 = data[511]; + + + /* + * Shift bytes 503..0 (in that order) into r0, followed + * by eight zero bytes, while reducing the polynomial by the + * generator polynomial in every step. + */ + for (i = 503; i >= -8; i--) { + unsigned int d; + + d = 0; + if (i >= 0) + d = data[i]; + + if (r7) { + u16 *t = gf_exp + gf_log[r7]; + + r7 = r6 ^ t[0x21c]; + r6 = r5 ^ t[0x181]; + r5 = r4 ^ t[0x18e]; + r4 = r3 ^ t[0x25f]; + r3 = r2 ^ t[0x197]; + r2 = r1 ^ t[0x193]; + r1 = r0 ^ t[0x237]; + r0 = d ^ t[0x024]; + } else { + r7 = r6; + r6 = r5; + r5 = r4; + r4 = r3; + r3 = r2; + r2 = r1; + r1 = r0; + r0 = d; + } + } + + ecc[0] = r0; + ecc[1] = (r0 >> 8) | (r1 << 2); + ecc[2] = (r1 >> 6) | (r2 << 4); + ecc[3] = (r2 >> 4) | (r3 << 6); + ecc[4] = (r3 >> 2); + ecc[5] = r4; + ecc[6] = (r4 >> 8) | (r5 << 2); + ecc[7] = (r5 >> 6) | (r6 << 4); + ecc[8] = (r6 >> 4) | (r7 << 6); + ecc[9] = (r7 >> 2); + + return 0; +} Modified: trunk/src/target/board/sheevaplug.cfg =================================================================== --- trunk/src/target/board/sheevaplug.cfg 2009-05-12 17:14:10 UTC (rev 1767) +++ trunk/src/target/board/sheevaplug.cfg 2009-05-12 17:29:16 UTC (rev 1768) @@ -99,7 +99,7 @@ sheevaplug_init nand probe 0 nand erase 0 0 4 - nand write 0 uboot.bin 0 oob_softecc + nand write 0 uboot.bin 0 oob_softecc_kw resume } @@ -108,7 +108,7 @@ # load u-Boot into RAM and execute it sheevaplug_init - load_image /tmp/uboot.elf + load_image uboot.elf verify_image uboot.elf resume 0x00600000 |
From: <oh...@ma...> - 2009-05-12 19:14:20
|
Author: oharboe Date: 2009-05-12 19:14:10 +0200 (Tue, 12 May 2009) New Revision: 1767 Modified: trunk/src/target/interface/sheevaplug.cfg Log: Nicolas Pitre <ni...@ca...> lower JTAG clock for SheevaPlug Modified: trunk/src/target/interface/sheevaplug.cfg =================================================================== --- trunk/src/target/interface/sheevaplug.cfg 2009-05-12 12:16:31 UTC (rev 1766) +++ trunk/src/target/interface/sheevaplug.cfg 2009-05-12 17:14:10 UTC (rev 1767) @@ -8,5 +8,5 @@ ft2232_layout sheevaplug ft2232_vid_pid 0x9e88 0x9e8f ft2232_device_desc "SheevaPlug JTAGKey FT2232D B" -jtag_khz 3000 +jtag_khz 2000 |
From: oharboe at B. <oh...@ma...> - 2009-05-12 14:16:32
|
Author: oharboe Date: 2009-05-12 14:16:31 +0200 (Tue, 12 May 2009) New Revision: 1766 Modified: trunk/src/helper/types.h trunk/src/jtag/jtag.h Log: move eCos type definition to types.h where it belongs. Modified: trunk/src/helper/types.h =================================================================== --- trunk/src/helper/types.h 2009-05-12 10:52:01 UTC (rev 1765) +++ trunk/src/helper/types.h 2009-05-12 12:16:31 UTC (rev 1766) @@ -60,7 +60,7 @@ #define true 1 typedef int _Bool; -#else +#else typedef bool _Bool; #endif /* __cplusplus */ #endif /* HAVE__BOOL */ @@ -136,4 +136,9 @@ buf[1] = (u8) (val >> 0); } +#ifdef __ECOS +/* eCos plain lacks this definition... */ +typedef CYG_ADDRWORD intptr_t; +#endif + #endif /* TYPES_H */ Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-05-12 10:52:01 UTC (rev 1765) +++ trunk/src/jtag/jtag.h 2009-05-12 12:16:31 UTC (rev 1766) @@ -608,10 +608,6 @@ #endif -#ifdef __ECOS -typedef CYG_ADDRWORD intptr_t; -#endif - /* This type can store an integer safely by a normal cast on 64 and * 32 bit systems. */ typedef intptr_t jtag_callback_data_t; |
From: <zw...@ma...> - 2009-05-12 12:52:19
|
Author: zwelch Date: 2009-05-12 12:52:01 +0200 (Tue, 12 May 2009) New Revision: 1765 Modified: trunk/src/helper/types.h trunk/src/jtag/rlink/rlink.c Log: Add stdint.h to types.h to provide intptr_t. Modified: trunk/src/helper/types.h =================================================================== --- trunk/src/helper/types.h 2009-05-12 10:47:48 UTC (rev 1764) +++ trunk/src/helper/types.h 2009-05-12 10:52:01 UTC (rev 1765) @@ -26,6 +26,9 @@ #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif #ifndef u8 typedef unsigned char u8; Modified: trunk/src/jtag/rlink/rlink.c =================================================================== --- trunk/src/jtag/rlink/rlink.c 2009-05-12 10:47:48 UTC (rev 1764) +++ trunk/src/jtag/rlink/rlink.c 2009-05-12 10:52:01 UTC (rev 1765) @@ -36,7 +36,6 @@ /* 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. */ |
From: ntfreak at B. <nt...@ma...> - 2009-05-12 12:47:49
|
Author: ntfreak Date: 2009-05-12 12:47:48 +0200 (Tue, 12 May 2009) New Revision: 1764 Modified: trunk/src/helper/replacements.h Log: - fix build issue when HAVE_ELF_H is not defined Modified: trunk/src/helper/replacements.h =================================================================== --- trunk/src/helper/replacements.h 2009-05-12 10:02:47 UTC (rev 1763) +++ trunk/src/helper/replacements.h 2009-05-12 10:47:48 UTC (rev 1764) @@ -210,22 +210,30 @@ #ifndef HAVE_ELF_H +typedef uint32_t Elf32_Addr; +typedef uint16_t Elf32_Half; +typedef uint32_t Elf32_Off; +typedef int32_t Elf32_Sword; +typedef uint32_t Elf32_Word; +typedef uint32_t Elf32_Size; +typedef Elf32_Off Elf32_Hashelt; + typedef struct { unsigned char e_ident[16]; /* Magic number and other info */ - u16 e_type; /* Object file type */ - u16 e_machine; /* Architecture */ - u32 e_version; /* Object file version */ - u32 e_entry; /* Entry point virtual address */ - u32 e_phoff; /* Program header table file offset */ - u32 e_shoff; /* Section header table file offset */ - u32 e_flags; /* Processor-specific flags */ - u16 e_ehsize; /* ELF header size in bytes */ - u16 e_phentsize; /* Program header table entry size */ - u16 e_phnum; /* Program header table entry count */ - u16 e_shentsize; /* Section header table entry size */ - u16 e_shnum; /* Section header table entry count */ - u16 e_shstrndx; /* Section header string table index */ + Elf32_Half e_type; /* Object file type */ + Elf32_Half e_machine; /* Architecture */ + Elf32_Word e_version; /* Object file version */ + Elf32_Addr e_entry; /* Entry point virtual address */ + Elf32_Off e_phoff; /* Program header table file offset */ + Elf32_Off e_shoff; /* Section header table file offset */ + Elf32_Word e_flags; /* Processor-specific flags */ + Elf32_Half e_ehsize; /* ELF header size in bytes */ + Elf32_Half e_phentsize; /* Program header table entry size */ + Elf32_Half e_phnum; /* Program header table entry count */ + Elf32_Half e_shentsize; /* Section header table entry size */ + Elf32_Half e_shnum; /* Section header table entry count */ + Elf32_Half e_shstrndx; /* Section header string table index */ } Elf32_Ehdr; #define ELFMAG "\177ELF" @@ -241,14 +249,14 @@ typedef struct { - u32 p_type; /* Segment type */ - u32 p_offset; /* Segment file offset */ - u32 p_vaddr; /* Segment virtual address */ - u32 p_paddr; /* Segment physical address */ - u32 p_filesz; /* Segment size in file */ - u32 p_memsz; /* Segment size in memory */ - u32 p_flags; /* Segment flags */ - u32 p_align; /* Segment alignment */ + Elf32_Word p_type; /* Segment type */ + Elf32_Off p_offset; /* Segment file offset */ + Elf32_Addr p_vaddr; /* Segment virtual address */ + Elf32_Addr p_paddr; /* Segment physical address */ + Elf32_Size p_filesz; /* Segment size in file */ + Elf32_Size p_memsz; /* Segment size in memory */ + Elf32_Word p_flags; /* Segment flags */ + Elf32_Size p_align; /* Segment alignment */ } Elf32_Phdr; #define PT_LOAD 1 /* Loadable program segment */ |
From: oharboe at B. <oh...@ma...> - 2009-05-12 12:02:49
|
Author: oharboe Date: 2009-05-12 12:02:47 +0200 (Tue, 12 May 2009) New Revision: 1763 Modified: trunk/src/helper/jim.c trunk/src/jtag/jtag.h Log: eCos fixes Modified: trunk/src/helper/jim.c =================================================================== --- trunk/src/helper/jim.c 2009-05-12 08:56:22 UTC (rev 1762) +++ trunk/src/helper/jim.c 2009-05-12 10:02:47 UTC (rev 1763) @@ -48,6 +48,15 @@ #ifdef __ECOS #include <pkgconf/jimtcl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <ctype.h> +#include <limits.h> +#include <assert.h> +#include <errno.h> +#include <time.h> #endif #ifndef JIM_ANSIC #define JIM_DYNLIB /* Dynamic library support for UNIX and WIN32 */ Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-05-12 08:56:22 UTC (rev 1762) +++ trunk/src/jtag/jtag.h 2009-05-12 10:02:47 UTC (rev 1763) @@ -607,6 +607,11 @@ /* implemented by minidriver */ #endif + +#ifdef __ECOS +typedef CYG_ADDRWORD intptr_t; +#endif + /* This type can store an integer safely by a normal cast on 64 and * 32 bit systems. */ typedef intptr_t jtag_callback_data_t; |
From: <zw...@ma...> - 2009-05-12 10:56:26
|
Author: zwelch Date: 2009-05-12 10:56:22 +0200 (Tue, 12 May 2009) New Revision: 1762 Modified: trunk/Makefile.am Log: Include project doxygen configuration with distribution tarballs. Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2009-05-12 08:35:17 UTC (rev 1761) +++ trunk/Makefile.am 2009-05-12 08:56:22 UTC (rev 1762) @@ -11,6 +11,8 @@ SUBDIRS = src doc +EXTRA_DIST = Doxyfile + MAINTAINERCLEANFILES = \ configure \ Makefile.in \ |
From: <zw...@ma...> - 2009-05-12 10:35:30
|
Author: zwelch Date: 2009-05-12 10:35:17 +0200 (Tue, 12 May 2009) New Revision: 1761 Modified: trunk/src/helper/fileio.h trunk/src/helper/jim-eventloop.c trunk/src/helper/jim.c trunk/src/helper/log.h trunk/src/helper/replacements.c trunk/src/helper/replacements.h trunk/src/target/algorithm.c trunk/src/target/target.h Log: Audit and remove redundant uses of replacements.h in the tree. Modified: trunk/src/helper/fileio.h =================================================================== --- trunk/src/helper/fileio.h 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/helper/fileio.h 2009-05-12 08:35:17 UTC (rev 1761) @@ -26,10 +26,10 @@ #ifndef FILEIO_H #define FILEIO_H +#include "types.h" + #define FILEIO_MAX_ERROR_STRING (128) -#include "replacements.h" - enum fileio_type { FILEIO_TEXT, Modified: trunk/src/helper/jim-eventloop.c =================================================================== --- trunk/src/helper/jim-eventloop.c 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/helper/jim-eventloop.c 2009-05-12 08:35:17 UTC (rev 1761) @@ -61,11 +61,6 @@ #include "jim-eventloop.h" #endif -#include "replacements.h" - - -/* --- */ - /* File event structure */ typedef struct Jim_FileEvent { void *handle; Modified: trunk/src/helper/jim.c =================================================================== --- trunk/src/helper/jim.c 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/helper/jim.c 2009-05-12 08:35:17 UTC (rev 1761) @@ -56,8 +56,6 @@ #include <stdarg.h> #include <limits.h> -#include "replacements.h" - /* Include the platform dependent libraries for * dynamic loading of libraries. */ #ifdef JIM_DYNLIB Modified: trunk/src/helper/log.h =================================================================== --- trunk/src/helper/log.h 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/helper/log.h 2009-05-12 08:35:17 UTC (rev 1761) @@ -26,7 +26,6 @@ #ifndef ERROR_H #define ERROR_H -#include "replacements.h" #include "command.h" /* logging priorities Modified: trunk/src/helper/replacements.c =================================================================== --- trunk/src/helper/replacements.c 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/helper/replacements.c 2009-05-12 08:35:17 UTC (rev 1761) @@ -23,17 +23,10 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - /* DANGER!!!! These must be defined *BEFORE* replacements.h and the malloc() macro!!!! */ #include <stdlib.h> #include <string.h> -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif /* * clear_malloc * @@ -65,10 +58,13 @@ } #define IN_REPLACEMENTS_C -#include "replacements.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif -#include <stdio.h> - #ifdef _WIN32 #include <io.h> #endif Modified: trunk/src/helper/replacements.h =================================================================== --- trunk/src/helper/replacements.h 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/helper/replacements.h 2009-05-12 08:35:17 UTC (rev 1761) @@ -26,8 +26,6 @@ #ifndef REPLACEMENTS_H #define REPLACEMENTS_H -#include "types.h" - /* MIN,MAX macros */ #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) Modified: trunk/src/target/algorithm.c =================================================================== --- trunk/src/target/algorithm.c 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/target/algorithm.c 2009-05-12 08:35:17 UTC (rev 1761) @@ -22,7 +22,6 @@ #endif #include "algorithm.h" -#include "replacements.h" #include "binarybuffer.h" Modified: trunk/src/target/target.h =================================================================== --- trunk/src/target/target.h 2009-05-12 08:33:18 UTC (rev 1760) +++ trunk/src/target/target.h 2009-05-12 08:35:17 UTC (rev 1761) @@ -30,8 +30,6 @@ #include "algorithm.h" #include "command.h" -#include "replacements.h" - struct reg_s; struct trace_s; struct command_context_s; |
From: <zw...@ma...> - 2009-05-12 10:33:21
|
Author: zwelch Date: 2009-05-12 10:33:18 +0200 (Tue, 12 May 2009) New Revision: 1760 Modified: trunk/configure.in Log: Make replacements.h private by including it from config.h autoheader. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-12 08:24:47 UTC (rev 1759) +++ trunk/configure.in 2009-05-12 08:33:18 UTC (rev 1760) @@ -780,6 +780,7 @@ AM_CONFIG_HEADER(config.h) AH_BOTTOM([ #include "system.h" +#include "replacements.h" ]) AM_INIT_AUTOMAKE([-Wall -Wno-portability]) |
From: <zw...@ma...> - 2009-05-12 10:24:53
|
Author: zwelch Date: 2009-05-12 10:24:47 +0200 (Tue, 12 May 2009) New Revision: 1759 Modified: trunk/configure.in trunk/src/helper/replacements.h Log: Make system.h private by including it from config.h autoheader. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-12 07:44:57 UTC (rev 1758) +++ trunk/configure.in 2009-05-12 08:24:47 UTC (rev 1759) @@ -778,6 +778,10 @@ fi AM_CONFIG_HEADER(config.h) +AH_BOTTOM([ +#include "system.h" +]) + AM_INIT_AUTOMAKE([-Wall -Wno-portability]) AM_MAINTAINER_MODE Modified: trunk/src/helper/replacements.h =================================================================== --- trunk/src/helper/replacements.h 2009-05-12 07:44:57 UTC (rev 1758) +++ trunk/src/helper/replacements.h 2009-05-12 08:24:47 UTC (rev 1759) @@ -27,7 +27,6 @@ #define REPLACEMENTS_H #include "types.h" -#include "system.h" /* MIN,MAX macros */ #ifndef MIN |
From: <zw...@ma...> - 2009-05-12 09:45:04
|
Author: zwelch Date: 2009-05-12 09:44:57 +0200 (Tue, 12 May 2009) New Revision: 1758 Modified: trunk/src/helper/jim-eventloop.c trunk/src/helper/jim.c Log: Audit and reduce #include directives in jim source files. Modified: trunk/src/helper/jim-eventloop.c =================================================================== --- trunk/src/helper/jim-eventloop.c 2009-05-12 07:35:00 UTC (rev 1757) +++ trunk/src/helper/jim-eventloop.c 2009-05-12 07:44:57 UTC (rev 1758) @@ -61,13 +61,6 @@ #include "jim-eventloop.h" #endif -/* POSIX includes */ -#include <sys/time.h> -#include <sys/types.h> -#include <unistd.h> -#include <stdio.h> -#include <errno.h> - #include "replacements.h" Modified: trunk/src/helper/jim.c =================================================================== --- trunk/src/helper/jim.c 2009-05-12 07:35:00 UTC (rev 1757) +++ trunk/src/helper/jim.c 2009-05-12 07:44:57 UTC (rev 1758) @@ -53,20 +53,8 @@ #define JIM_DYNLIB /* Dynamic library support for UNIX and WIN32 */ #endif /* JIM_ANSIC */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <stdarg.h> -#include <ctype.h> #include <limits.h> -#include <assert.h> -#include <errno.h> -#include <time.h> -#if defined(WIN32) -/* sys/time - need is different */ -#else -#include <sys/time.h> // for gettimeofday() -#endif #include "replacements.h" @@ -90,10 +78,6 @@ #endif /* WIN32 */ #endif /* JIM_DYNLIB */ -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - #ifdef __ECOS #include <cyg/jimtcl/jim.h> #else |
From: <zw...@ma...> - 2009-05-12 09:35:08
|
Author: zwelch Date: 2009-05-12 09:35:00 +0200 (Tue, 12 May 2009) New Revision: 1757 Modified: trunk/configure.in trunk/src/helper/jim.c trunk/src/target/oocd_trace.c Log: Define _GNU_SOURCE in config.h, remove definitions from source files. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-12 07:22:07 UTC (rev 1756) +++ trunk/configure.in 2009-05-12 07:35:00 UTC (rev 1757) @@ -851,6 +851,7 @@ AC_MSG_FAILURE([Could not find 'environ' in unistd.h or available libraries.]) fi +AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).]) # set default gcc warnings GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security" Modified: trunk/src/helper/jim.c =================================================================== --- trunk/src/helper/jim.c 2009-05-12 07:22:07 UTC (rev 1756) +++ trunk/src/helper/jim.c 2009-05-12 07:35:00 UTC (rev 1757) @@ -53,9 +53,6 @@ #define JIM_DYNLIB /* Dynamic library support for UNIX and WIN32 */ #endif /* JIM_ANSIC */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE /* for vasprintf() */ -#endif #include <stdio.h> #include <stdlib.h> #include <string.h> Modified: trunk/src/target/oocd_trace.c =================================================================== --- trunk/src/target/oocd_trace.c 2009-05-12 07:22:07 UTC (rev 1756) +++ trunk/src/target/oocd_trace.c 2009-05-12 07:35:00 UTC (rev 1757) @@ -21,11 +21,6 @@ #include "config.h" #endif -// we must define _GNU_SOURCE to get strndup -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include "oocd_trace.h" #include "arm7_9_common.h" |
From: <zw...@ma...> - 2009-05-12 09:22:10
|
Author: zwelch Date: 2009-05-12 09:22:07 +0200 (Tue, 12 May 2009) New Revision: 1756 Modified: trunk/src/helper/types.h Log: Remove config.h from types.h; all .c files are required to include it. Modified: trunk/src/helper/types.h =================================================================== --- trunk/src/helper/types.h 2009-05-12 07:13:12 UTC (rev 1755) +++ trunk/src/helper/types.h 2009-05-12 07:22:07 UTC (rev 1756) @@ -23,10 +23,6 @@ #ifndef TYPES_H #define TYPES_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif |
From: <zw...@ma...> - 2009-05-12 09:13:16
|
Author: zwelch Date: 2009-05-12 09:13:12 +0200 (Tue, 12 May 2009) New Revision: 1755 Modified: trunk/src/jtag/rlink/rlink_speed_table.c Log: Include config.h in pregenerated rlink_speed_table.c source. Modified: trunk/src/jtag/rlink/rlink_speed_table.c =================================================================== --- trunk/src/jtag/rlink/rlink_speed_table.c 2009-05-12 07:12:10 UTC (rev 1754) +++ trunk/src/jtag/rlink/rlink_speed_table.c 2009-05-12 07:13:12 UTC (rev 1755) @@ -1,4 +1,7 @@ /* This file was created automatically by ../../../tools/rlink_make_speed_table/rlink_make_speed_table.pl. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "rlink.h" #include "st7.h" |
From: <zw...@ma...> - 2009-05-12 09:12:15
|
Author: zwelch Date: 2009-05-12 09:12:10 +0200 (Tue, 12 May 2009) New Revision: 1754 Modified: trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl Log: Update rlink_make_speed_table.pl script to add config.h to its output. Modified: trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl =================================================================== --- trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl 2009-05-12 07:03:50 UTC (rev 1753) +++ trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl 2009-05-12 07:12:10 UTC (rev 1754) @@ -21,14 +21,21 @@ # A simple utility to read a list of files (names composed by numeric prescaler arguments) and compose a C source file defining data structures which hold the binary data read from those files. -@speed_table = (); +my @speed_table = (); -printf("/* This file was created automatically by %s. */\n\n", $0); -for $i ('rlink', 'st7') { - printf("#include \"$i.h\"\n"); -} -printf("\n"); +print <<HEADER; +/* This file was created automatically by the following script: + * $0 + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "rlink.h" +#include "st7.h" + +HEADER + for $prescaler (sort {$b <=> $a} @ARGV) { my(@ary) = ( byte_array_from_file(${prescaler} . "_init.dtc"), |
From: oharboe at B. <oh...@ma...> - 2009-05-12 09:03:50
|
Author: oharboe Date: 2009-05-12 09:03:50 +0200 (Tue, 12 May 2009) New Revision: 1753 Modified: trunk/src/target/arm7tdmi.c trunk/src/target/arm9tdmi.c Log: fix memory corruption introduce in 1730 Modified: trunk/src/target/arm7tdmi.c =================================================================== --- trunk/src/target/arm7tdmi.c 2009-05-12 06:59:21 UTC (rev 1752) +++ trunk/src/target/arm7tdmi.c 2009-05-12 07:03:50 UTC (rev 1753) @@ -244,9 +244,9 @@ } } -static int arm7endianness(u8 *in, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t dummy) +static int arm7endianness(u8 *in, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t captured) { - arm_endianness(in, in, (int)size, (int)be, 1); + arm_endianness((u8 *)captured, in, (int)size, (int)be, 1); return ERROR_OK; } @@ -274,11 +274,11 @@ fields[1].tap = jtag_info->tap; fields[1].num_bits = 32; fields[1].out_value = NULL; - fields[1].in_value = (u8 *)in; + jtag_alloc_in_value32(&fields[1]); jtag_add_dr_scan(2, fields, TAP_INVALID); - jtag_add_callback4(arm7endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)NULL); + jtag_add_callback4(arm7endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)fields[1].in_value); jtag_add_runtest(0, TAP_INVALID); Modified: trunk/src/target/arm9tdmi.c =================================================================== --- trunk/src/target/arm9tdmi.c 2009-05-12 06:59:21 UTC (rev 1752) +++ trunk/src/target/arm9tdmi.c 2009-05-12 07:03:50 UTC (rev 1753) @@ -291,9 +291,9 @@ extern void arm_endianness(u8 *tmp, void *in, int size, int be, int flip); -static int arm9endianness(u8 *in, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t dummy) +static int arm9endianness(u8 *in, jtag_callback_data_t size, jtag_callback_data_t be, jtag_callback_data_t captured) { - arm_endianness(in, in, (int)size, (int)be, 0); + arm_endianness((u8 *)captured, in, (int)size, (int)be, 0); return ERROR_OK; } @@ -317,7 +317,7 @@ fields[0].tap = jtag_info->tap; fields[0].num_bits = 32; fields[0].out_value = NULL; - fields[0].in_value = (u8 *)in; + jtag_alloc_in_value32(&fields[0]); fields[1].tap = jtag_info->tap; fields[1].num_bits = 3; @@ -331,7 +331,7 @@ jtag_add_dr_scan(3, fields, TAP_INVALID); - jtag_add_callback4(arm9endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, 0); + jtag_add_callback4(arm9endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)fields[0].in_value); jtag_add_runtest(0, TAP_INVALID); |
From: oharboe at B. <oh...@ma...> - 2009-05-12 08:59:23
|
Author: oharboe Date: 2009-05-12 08:59:21 +0200 (Tue, 12 May 2009) New Revision: 1752 Modified: trunk/src/jtag/jtag.c trunk/src/jtag/jtag.h Log: added jtag_alloc_in_value32 - not used in this commit. Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-05-12 06:17:22 UTC (rev 1751) +++ trunk/src/jtag/jtag.c 2009-05-12 06:59:21 UTC (rev 1752) @@ -718,7 +718,7 @@ if (fields[i].num_bits<=32) { /* This is enough space and we're executing this synchronously */ - fields[i].in_value=(u8 *)&fields[i].intmp; + fields[i].in_value=fields[i].intmp; } else { fields[i].in_value=(u8 *)malloc(CEIL(fields[i].num_bits, 8)); @@ -3562,4 +3562,12 @@ } #endif // _DEBUG_JTAG_IO_ +#ifndef HAVE_JTAG_MINIDRIVER_H +void jtag_alloc_in_value32(scan_field_t *field) +{ + field->in_value=(u8 *)cmd_queue_alloc(4); +} +#endif + + /*-----</Cable Helper API>--------------------------------------*/ Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-05-12 06:17:22 UTC (rev 1751) +++ trunk/src/jtag/jtag.h 2009-05-12 06:59:21 UTC (rev 1752) @@ -277,7 +277,7 @@ /* internal work space */ int allocated; /* in_value has been allocated for the queue */ int modified; /* did we modify the in_value? */ - u32 intmp; /* temporary storage for checking synchronously */ + u8 intmp[4]; /* temporary storage for checking synchronously */ } scan_field_t; enum scan_type { @@ -565,6 +565,26 @@ extern int interface_jtag_add_ir_scan(int num_fields, scan_field_t* fields, tap_state_t endstate); extern void jtag_add_dr_scan(int num_fields, scan_field_t* fields, tap_state_t endstate); +/* set in_value to point to 32 bits of memory to scan into. This function + * is a way to handle the case of synchronous and asynchronous + * JTAG queues. + * + * In the event of an asynchronous queue execution the queue buffer + * allocation method is used, for the synchronous case the temporary 32 bits come + * from the input field itself. + */ + +#ifndef HAVE_JTAG_MINIDRIVER_H +extern void jtag_alloc_in_value32(scan_field_t *field); +#else +static __inline__ void jtag_alloc_in_value32(scan_field_t *field) +{ + field->in_value=field->intmp; +} +#endif + + + /* This version of jtag_add_dr_scan() uses the check_value/mask fields */ extern void jtag_add_dr_scan_check(int num_fields, scan_field_t* fields, tap_state_t endstate); extern int interface_jtag_add_dr_scan(int num_fields, scan_field_t* fields, tap_state_t endstate); |
From: oharboe at B. <oh...@ma...> - 2009-05-12 08:17:26
|
Author: oharboe Date: 2009-05-12 08:17:22 +0200 (Tue, 12 May 2009) New Revision: 1751 Modified: trunk/src/jtag/jtag.c Log: fix ancient bug & SEGFAULT in irscan Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-05-12 04:52:15 UTC (rev 1750) +++ trunk/src/jtag/jtag.c 2009-05-12 06:17:22 UTC (rev 1751) @@ -2889,9 +2889,11 @@ } } - fields = malloc(sizeof(scan_field_t) * argc / 2); + int num_fields= num_fields; - for (i = 0; i < argc / 2; i++) + fields = malloc(sizeof(scan_field_t) * num_fields); + + for (i = 0; i < num_fields; i++) { tap = jtag_TapByString( args[i*2] ); if (tap==NULL) @@ -2901,19 +2903,20 @@ } int field_size = tap->ir_length; fields[i].tap = tap; + fields[i].num_bits = field_size; fields[i].out_value = malloc(CEIL(field_size, 8)); buf_set_u32(fields[i].out_value, 0, field_size, strtoul(args[i*2+1], NULL, 0)); fields[i].in_value = NULL; } - jtag_add_ir_scan(argc / 2, fields, TAP_INVALID); + jtag_add_ir_scan(num_fields, fields, TAP_INVALID); /* did we have an endstate? */ if (endstate != TAP_INVALID) jtag_add_end_state(endstate); jtag_execute_queue(); - for (i = 0; i < argc / 2; i++) + for (i = 0; i < num_fields; i++) free(fields[i].out_value); free (fields); |
From: <zw...@ma...> - 2009-05-12 06:52:28
|
Author: zwelch Date: 2009-05-12 06:52:15 +0200 (Tue, 12 May 2009) New Revision: 1750 Modified: trunk/src/helper/system.h trunk/src/jtag/jtag.c trunk/src/xsvf/xsvf.c Log: Include assert.h in system.h to promote tree-wide use of assertions. Modified: trunk/src/helper/system.h =================================================================== --- trunk/src/helper/system.h 2009-05-11 22:37:52 UTC (rev 1749) +++ trunk/src/helper/system.h 2009-05-12 04:52:15 UTC (rev 1750) @@ -26,6 +26,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <assert.h> #include <ctype.h> #include <errno.h> Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-05-11 22:37:52 UTC (rev 1749) +++ trunk/src/jtag/jtag.c 2009-05-12 04:52:15 UTC (rev 1750) @@ -33,8 +33,8 @@ #ifdef HAVE_STRINGS_H #include <strings.h> #endif -#include <assert.h> + int jtag_flush_queue_count; /* count # of flushes for profiling / debugging purposes */ static void jtag_add_scan_check(void (*jtag_add_scan)(int num_fields, scan_field_t *fields, tap_state_t state), Modified: trunk/src/xsvf/xsvf.c =================================================================== --- trunk/src/xsvf/xsvf.c 2009-05-11 22:37:52 UTC (rev 1749) +++ trunk/src/xsvf/xsvf.c 2009-05-12 04:52:15 UTC (rev 1750) @@ -44,9 +44,7 @@ #include "xsvf.h" #include "jtag.h" -#include <assert.h> - /* XSVF commands, from appendix B of xapp503.pdf */ #define XCOMPLETE 0x00 #define XTDOMASK 0x01 |
From: <zw...@ma...> - 2009-05-12 00:38:05
|
Author: zwelch Date: 2009-05-12 00:37:52 +0200 (Tue, 12 May 2009) New Revision: 1749 Modified: trunk/src/server/httpd/httpd.tcl Log: Remove duplicate definition of encode in httpd.tcl. Modified: trunk/src/server/httpd/httpd.tcl =================================================================== --- trunk/src/server/httpd/httpd.tcl 2009-05-11 21:05:51 UTC (rev 1748) +++ trunk/src/server/httpd/httpd.tcl 2009-05-11 22:37:52 UTC (rev 1749) @@ -94,11 +94,6 @@ } -# encode text -proc encode {a} { - return [string map {\n <br/> { } { } \t { } > > < < / /} $a] -} - proc first_flash_base {} { set t [lindex 0 [ocd_flash_banks]] return $t(base) |
From: <oh...@ma...> - 2009-05-11 23:05:54
|
Author: oharboe Date: 2009-05-11 23:05:51 +0200 (Mon, 11 May 2009) New Revision: 1748 Modified: trunk/src/jtag/jtag.c trunk/src/jtag/jtag.h trunk/src/target/arm7tdmi.c Log: now builds on 64 and 32 bit systems Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-05-11 13:40:48 UTC (rev 1747) +++ trunk/src/jtag/jtag.c 2009-05-11 21:05:51 UTC (rev 1748) @@ -737,7 +737,7 @@ if ((fields[i].check_value!=NULL)&&(fields[i].in_value!=NULL)) { /* this is synchronous for a minidriver */ - jtag_add_callback4(jtag_check_value_mask_callback, fields[i].in_value, fields[i].check_value, fields[i].check_mask, (jtag_callback_data_t)fields[i].num_bits); + jtag_add_callback4(jtag_check_value_mask_callback, fields[i].in_value, (jtag_callback_data_t)fields[i].check_value, (jtag_callback_data_t)fields[i].check_mask, (jtag_callback_data_t)fields[i].num_bits); } if (fields[i].allocated) { Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-05-11 13:40:48 UTC (rev 1747) +++ trunk/src/jtag/jtag.h 2009-05-11 21:05:51 UTC (rev 1748) @@ -589,7 +589,7 @@ /* This type can store an integer safely by a normal cast on 64 and * 32 bit systems. */ -typedef void *jtag_callback_data_t; +typedef intptr_t jtag_callback_data_t; /* The generic callback mechanism. * Modified: trunk/src/target/arm7tdmi.c =================================================================== --- trunk/src/target/arm7tdmi.c 2009-05-11 13:40:48 UTC (rev 1747) +++ trunk/src/target/arm7tdmi.c 2009-05-11 21:05:51 UTC (rev 1748) @@ -278,7 +278,7 @@ jtag_add_dr_scan(2, fields, TAP_INVALID); - jtag_add_callback4(arm7endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, NULL); + jtag_add_callback4(arm7endianness, in, (jtag_callback_data_t)size, (jtag_callback_data_t)be, (jtag_callback_data_t)NULL); jtag_add_runtest(0, TAP_INVALID); |
From: oharboe at B. <oh...@ma...> - 2009-05-11 15:40:51
|
Author: oharboe Date: 2009-05-11 15:40:48 +0200 (Mon, 11 May 2009) New Revision: 1747 Modified: zy1000/trunk/build/include/jtag_minidriver.h Log: sync up to bitbang driver when exiting scans Modified: zy1000/trunk/build/include/jtag_minidriver.h =================================================================== --- zy1000/trunk/build/include/jtag_minidriver.h 2009-05-11 12:03:40 UTC (rev 1746) +++ zy1000/trunk/build/include/jtag_minidriver.h 2009-05-11 13:40:48 UTC (rev 1747) @@ -162,7 +162,7 @@ nextTap=jtag_NextEnabledTap(tap); if (nextTap==NULL) { - pause_state = TAP_DRPAUSE; + pause_state = end_state; } if (tap == target_tap) { @@ -178,7 +178,6 @@ shiftValueInner(TAP_DRSHIFT, pause_state, 1, 0); } } - setCurrentState(end_state); } static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap, @@ -194,14 +193,12 @@ /* used by embeddedice_write_reg_inner() */ shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[0], value[0]); shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[1], value[1]); - shiftValueInner(TAP_DRSHIFT, TAP_DRPAUSE, num_bits[2], value[2]); - setCurrentState(end_state); + shiftValueInner(TAP_DRSHIFT, end_state, num_bits[2], value[2]); } else if ((singletap)&&(num_fields==2)) { /* used by arm7 code */ shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[0], value[0]); - shiftValueInner(TAP_DRSHIFT, TAP_DRPAUSE, num_bits[1], value[1]); - setCurrentState(end_state); + shiftValueInner(TAP_DRSHIFT, end_state, num_bits[1], value[1]); } else { interface_jtag_add_dr_out_core(target_tap, num_fields, num_bits, value, end_state); |
From: oharboe at B. <oh...@ma...> - 2009-05-11 14:03:41
|
Author: oharboe Date: 2009-05-11 14:03:40 +0200 (Mon, 11 May 2009) New Revision: 1746 Modified: trunk/src/target/etm.c Log: fix jtag_add_dr_scan() usage a bit... avoid lots of malloc()'s. Modified: trunk/src/target/etm.c =================================================================== --- trunk/src/target/etm.c 2009-05-11 11:27:35 UTC (rev 1745) +++ trunk/src/target/etm.c 2009-05-11 12:03:40 UTC (rev 1746) @@ -411,31 +411,27 @@ fields[0].tap = etm_reg->jtag_info->tap; fields[0].num_bits = 32; - fields[0].out_value = malloc(4); + u8 tmp1[4]; + fields[0].out_value = tmp1; buf_set_u32(fields[0].out_value, 0, 32, value); - fields[0].in_value = NULL; fields[1].tap = etm_reg->jtag_info->tap; fields[1].num_bits = 7; - fields[1].out_value = malloc(1); + u8 tmp2; + fields[1].out_value = &tmp2; buf_set_u32(fields[1].out_value, 0, 7, reg_addr); - fields[1].in_value = NULL; fields[2].tap = etm_reg->jtag_info->tap; fields[2].num_bits = 1; - fields[2].out_value = malloc(1); + u8 tmp3; + fields[2].out_value = &tmp3; buf_set_u32(fields[2].out_value, 0, 1, 1); - fields[2].in_value = NULL; jtag_add_dr_scan(3, fields, TAP_INVALID); - free(fields[0].out_value); - free(fields[1].out_value); - free(fields[2].out_value); - return ERROR_OK; } |
From: oharboe at B. <oh...@ma...> - 2009-05-11 13:27:36
|
Author: oharboe Date: 2009-05-11 13:27:35 +0200 (Mon, 11 May 2009) New Revision: 1745 Modified: zy1000/trunk/ecoshal/hal/zylin/phi/current/include/pkgconf/mlt_zylin_phi_dram_fast.ldi Log: wip Modified: zy1000/trunk/ecoshal/hal/zylin/phi/current/include/pkgconf/mlt_zylin_phi_dram_fast.ldi =================================================================== --- zy1000/trunk/ecoshal/hal/zylin/phi/current/include/pkgconf/mlt_zylin_phi_dram_fast.ldi 2009-05-11 11:20:45 UTC (rev 1744) +++ zy1000/trunk/ecoshal/hal/zylin/phi/current/include/pkgconf/mlt_zylin_phi_dram_fast.ldi 2009-05-11 11:27:35 UTC (rev 1745) @@ -39,6 +39,13 @@ * (*phi_misc*) ; * (*cyg_sbdrop*) ; * (*target_call_event_callbacks*) ; + * (*alarm_thread*) ; + * (*embedded_set_reg*) ; + * (*bcmp*) ; + * (text.write) ; + * (text.malloc) ; + * (text.cyg_ticks) ; + * (text.free) ; |
From: <zw...@ma...> - 2009-05-11 13:20:54
|
Author: zwelch Date: 2009-05-11 13:20:45 +0200 (Mon, 11 May 2009) New Revision: 1744 Modified: trunk/configure.in trunk/src/helper/jim-eventloop.c trunk/src/helper/jim.c trunk/src/helper/jim.h Log: Update jim helper files to use proper configure script support: - configure.in: Add AC_TYPE_LONG_LONG_INT to detect 'long long int' support. - configure.in: Add AC_C_CONST to provide equivalent support as jim.h. - jim*.c: include config.h when HAVE_CONFIG_H is defined. - jim*.{h,c}: use HAVE_LONG_LONG_INT definition from config.h. - jim.h: Remove hard-coded const and HAVE_LONG_LONG definitions. - jim.h: -DJIM_NO_CONST has been obsoleted; -Dconst is equivalent. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2009-05-11 10:10:11 UTC (rev 1743) +++ trunk/configure.in 2009-05-11 11:20:45 UTC (rev 1744) @@ -816,6 +816,10 @@ AC_PROG_RANLIB AC_PROG_LIBTOOL +dnl configure checks required for Jim files (these are obsolete w/ C99) +AC_C_CONST +AC_TYPE_LONG_LONG_INT + # 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]) AC_COMPILE_IFELSE([ Modified: trunk/src/helper/jim-eventloop.c =================================================================== --- trunk/src/helper/jim-eventloop.c 2009-05-11 10:10:11 UTC (rev 1743) +++ trunk/src/helper/jim-eventloop.c 2009-05-11 11:20:45 UTC (rev 1744) @@ -44,6 +44,9 @@ * - more complete [after] command with [after info] and other subcommands. * - Win32 port */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define JIM_EXTENSION #define __JIM_EVENTLOOP_CORE__ Modified: trunk/src/helper/jim.c =================================================================== --- trunk/src/helper/jim.c 2009-05-11 10:10:11 UTC (rev 1743) +++ trunk/src/helper/jim.c 2009-05-11 11:20:45 UTC (rev 1744) @@ -39,6 +39,10 @@ * are those of the authors and should not be interpreted as representing * official policies, either expressed or implied, of the Jim Tcl Project. **/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define __JIM_CORE__ #define JIM_OPTIMIZATION /* comment to avoid optimizations and reduce size */ @@ -160,7 +164,7 @@ * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT #define JimIsAscii(c) (((c) & ~0x7f) == 0) static jim_wide JimStrtoll(const char *nptr, char **endptr, register int base) { @@ -424,7 +428,7 @@ { char *endptr; -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT *widePtr = JimStrtoll(str, &endptr, base); #else *widePtr = strtol(str, &endptr, base); @@ -7662,7 +7666,7 @@ /* Try to scan a number with the given base */ if (descr->modifier == 'l') { -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT jwvalue = JimStrtoll(tok, &endp, base), #else jwvalue = strtol(tok, &endp, base), Modified: trunk/src/helper/jim.h =================================================================== --- trunk/src/helper/jim.h 2009-05-11 10:10:11 UTC (rev 1743) +++ trunk/src/helper/jim.h 2009-05-11 11:20:45 UTC (rev 1744) @@ -78,25 +78,6 @@ #include <stdarg.h> /* In order to get type va_list */ /* ----------------------------------------------------------------------------- -* Some /very/ old compiler maybe do not know how to -* handle 'const'. They even do not know, how to ignore -* it. For those compiler it may be better to compile with -* define JIM_NO_CONST activated -* ---------------------------------------------------------------------------*/ - -#ifdef JIM_NO_CONST -# define const -#endif - -/* ----------------------------------------------------------------------------- - * System configuration - * For most modern systems, you can leave the default. - * For embedded systems some change may be required. - * ---------------------------------------------------------------------------*/ - -#define HAVE_LONG_LONG - -/* ----------------------------------------------------------------------------- * Compiler specific fixes. * ---------------------------------------------------------------------------*/ @@ -106,7 +87,7 @@ #endif /* _MSC_VER */ /* Long Long type and related issues */ -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT # ifdef _MSC_VER /* MSC compiler */ # define jim_wide _int64 # ifndef LLONG_MAX @@ -138,7 +119,7 @@ * LIBC specific fixes * ---------------------------------------------------------------------------*/ -#ifdef HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG_INT # if defined(_MSC_VER) || defined(__MSVCRT__) # define JIM_WIDE_MODIFIER "I64d" # else |