summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* cfi: fix error handling for protect fnØyvind Harboe2010-05-051-4/+4
| | | | | | No error was propagated. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix tcl command to read power dropout statusØyvind Harboe2010-05-051-3/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* gdb: connect will now fail if flash autoprobe failsØyvind Harboe2010-05-054-24/+44
| | | | | | | | | | | | This stops GDB from launching with an empty memory map, making gdb load w/flashing fail for no obvious reason. The error message points in the direction of the gdb-attach event that can be set up to issue a halt or "reset init" which will put GDB in a well defined stated upon attach and thus have a robust flash autoprobe. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix keep_alive() bugØyvind Harboe2010-05-051-0/+2
| | | | | | | introduced in latest commit. Should have held off merging that commit. Sigh.... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fixed bug in tcl-serverMatthias Bode2010-05-053-5/+5
| | | | | | | | No segmentationfault when sending commands to tcl-server. modified: src/server/server.c modified: src/server/tcl_server.c modified: src/server/tcl_server.h
* command context: fix errors when running certain commands on startupØyvind Harboe2010-05-055-23/+30
| | | | | | | | | | | Various commands, e.g. "arm mcr xxxx" would fail if invoked upon startup since it there was no command context defined for the jim interpreter in that case. A Jim interpreter is now associated with a command context(telnet, gdb server's) or the default global command context. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: more flash write_image bugfixesØyvind Harboe2010-05-051-21/+11
| | | | | | | | | Remove/fix lots of bugs in handling of non-contigious sections and out of order sections. Fix a gaffe introduced in previous commit to src/flash/nor/core.c Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* str7x: improve error handlingØyvind Harboe2010-05-051-73/+133
| | | | | | clean up error handling a bit. No change in behavior. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* str71x: fix previous commitSpencer Oliver2010-05-041-3/+4
| | | | | | fix build issue with 70226c221f5879bb6126ff3f2ec9ae64c68d80d6 commit Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* flash: less bogus errorsØyvind Harboe2010-05-047-8/+8
| | | | | | | Removed bogus errors when trying to allocate a large a target memory buffer as possible. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* str7x: fix bogus error messagesØyvind Harboe2010-05-041-3/+5
| | | | | | | | Remove bogus error messages when trying to allocate a large chunk of target memory and then falling back to a smaller one. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* target: clean up target memory allocation error messagesØyvind Harboe2010-05-042-3/+22
| | | | | | | | | | target memory allocation can be implemented not to show bogus error messages. E.g. when trying a big allocation first and then a smaller one if that fails. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: wait for srst to deassertØyvind Harboe2010-05-041-13/+27
| | | | | | | | make wait for srst deassert more long latency friendly (JTAG over TCP/IP), print actual time if it was more than 1ms. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cfi: made som info output debug outputØyvind Harboe2010-05-041-2/+2
| | | | | | | E.g. how much target memory that is used during flashing is debug info. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* STM32 flash erase timeout fixTobias Ringström2010-05-031-2/+2
| | | | | | | | | | | | | | | The current timeout for STM32 flash block erase and flash mass erase is 10 (ms), which is too tight, and fails around 50% of the time for me. The data sheet for STM32F107VC specifies a maximum erase time of 40 ms (for both operations). I'd also consider it a bug that the code does not detect a timeout, but just assumes that the operation has completed. The attached patch does not address this bug. The attached patch increases the timeouts from 10 to 100 ms. Please apply. /Tobias
* flash: write_image would fail for certain imagesØyvind Harboe2010-04-291-14/+55
| | | | | | | | | | | Fix a bug where write_image would fail if the sections in the image were not in ascending order. This has previously been fixed in gdb load. Solved by sorting the image sections before running flash write_image erase unlock foo.elf. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: write_image will now pad erase to nearest sectorØyvind Harboe2010-04-291-8/+2
| | | | | | | | | | this is done for unlocking and it is a simple omission that it wasn't done for sectors. The unnerving thing is that nobody has complained about this until now.... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* nor: remove bogus output about padding sectionsØyvind Harboe2010-04-281-1/+2
| | | | | | | padding of 0 bytes is actually no padding, do not output warning about padding in that case. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* xscale: add support for length arg to wp commandMike Dunn2010-04-241-8/+51
| | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the length argument to the xscale implementation of the wp command. Per discussion with David, the length argument specifies the range of addresses over which a memory access should generate a debug exception. This patch utilizes the "mask" feature of the xscale debug hardware to implement the correct functionality of the length argument. Some limitations imposed by the hardware are: - The length must be a power of two, with a minumum of 4. - Two data breakpoint registers are available, allowing for two watchpoints. However, if the length of a watchpoint is greater than four, both registers are used (the second for a mask value), limiting the number of watchpoints to one. This patch also removes a useless call to xscale_get_reg(dbcon) in xscale_set_watchpoint() (value had already been read from the register cache, and the same previously read value is then modified and written back). I have been using and testing this patch for a couple days. Questions, corrections, criticisms of course gratefully received.
* adapter: allow adjusting srst assert withmichal smulski2010-04-241-0/+24
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* stm32x: allow flash probe on a running targetAndreas Fritiofson2010-04-201-6/+0
| | | | | | | | | | | | | | | If the flash has not yet been probed and GDB connects while the target is running, the flash probe triggered by GDB's memory map read will fail. In that case the returned memory map will be empty, causing a subsequent load from within GDB to fail. There's not much you can do from GDB to recover, other than a restart; a 'mon reset init' and manual 'mon flash probe' won't help since GDB has already made up its mind about the memory map. It seems there's no reason to require the target to be halted when probing the flash. Remove the check to let a valid memory map be provided to GDB even when connecting to a running target. Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
* NOR/core bugfix: restore invariantsDavid Brownell2010-04-151-5/+16
| | | | | | | | | | | | | | | | The The patch labeled "CFI CORE: bug-fix protect single sector" was merged rged without some requested bugfixes. Most significantly it broke invariants in the code, invalidating descriptions and changing the calling convention for underlying drivers. (It (Also wasn't CFI-specific...) Fix that, and Include an update from Antonio Borneo for the degenerate "nothing to do" case, (although that's still in the wrong location. which is presumably why that is it was working in some cases but not all.) src/flash/nor/core.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* NOR/CFI: remove redundant codeAntonio Borneo2010-04-151-6/+2
| | | | | | | | Arguments for "flash bank" command are already parsed and put in "bank" struct. Removed code to parse them again. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/CFI: fix order of arguments checkAntonio Borneo2010-04-151-2/+2
| | | | | | | | | | | | Syntax of "flash bank" command requires: - chip_width as CMD_ARGV[3] - bus_width as CMD_ARGV[4] Actual code swaps the arguments. Bug has no run time impact since wrong variables are only used to check value and both are checked against same constraint. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* xscale: fix analyze_trace for trace data collected in wrap modeMike Dunn2010-04-152-216/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the xscale_analyze_trace() function. This function was defective for a trace collected in 'fill' mode (hiccups with repeated instructions) and completely broken when buffer overflowed in 'wrap' mode. The reason for the latter case is that the checkpoint registers were interpreted incorrectly when two checkpoints are present in the trace (which will be true in 'wrap' mode once the buffer fills). In this case, checkpoint1 register will contain the older entry, and checkpoint0 the newer. The original code assumed the opposite. I eventually gave up trying to understand all the logic of the function, and rewrote it. I think it's much cleaner and understandable now. I have been using and testing this for a few weeks now. I'm confident it hasn't regressed in any way. Also added capability to handle (as best as possible) the case where an instruction can not be read from the loaded trace image; e.g., partial image. This was a 'TODO' comment in the original xscale_analyze_trace(). Outside of xcsale_analyze_trace(), these (related) changes were made: - Remove pc_ok and current_pc elements from struct xscale_trace. These elements and associated logic are useless clutter because the very first entry placed in the trace buffer is always an indirect jump to the address at which execution resumed. This type of trace entry includes the literal address in the trace buffer, so the initial address of the trace is immediately determined from the trace buffer contents and does not need to be recorded when trace is enabled. - Added num_checkpoints to struct xscale_trace_data, which is necessary in order to correctly interpret the checkpoint register contents. - In xscale_read_trace() - Fix potential array out-of-bounds condition. - Eliminate partial address entries when parsing trace (can occur in wrap mode). - Count and record number of checkpoints in trace. - Added small, inlined utility function xscale_display_instruction() to help make the code more concise and clear. TODO: - Save processor state (arm or thumb) in struct xscale_trace when trace is enabled so that trace can be analyzed correctly (currently assumes arm mode). - Add element to struct xscale_trace that records (when trace is enabled) whether vector table is relocated high (to 0xffff0000) or not, so that a branch to an exception vector is traced correctly (curently assumes vectors at 0x0).
* cortex-a8: more MMU supportAnton Fedotov2010-04-142-98/+321
| | | | | | | | | | | | | | | | | | | + virt2phys() can now convert virtual address to real + read_memory() and write_memory() are renamed to read_phys_memory() and write_phys_memory() + new read_memory() and write_memory() try to resolve real address if mmu is enambled than perform real address reading/writing + if address is bellow 0xc000000 than TTB0 is used for page table dereference, if above - than TTB1. Linux style of user/kernel address separation + if above fails (i.e address is unspecified) than mode is checked whether it is Supervisor (than TTB1) or User (than TTB0) - Software breakpoints doesn't work. You should invoke "gdb_breakpoint_override hard" before you start debugging + cortex_a8_mmu(), cortex_a8_enable_mmu_caches(), cortex_a8_disable_mmu_caches() are implemented Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* TARGET/ARM7_9_COMMON: review scope of symbolsAntonio Borneo2010-04-112-17/+14
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/TMS470: review scope of symbolsAntonio Borneo2010-04-111-7/+7
| | | | | | Add "static" qualifier to private functions and data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/MIPS32: review scope of functionsAntonio Borneo2010-04-112-11/+9
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/MIPS32_PRACC: review scope of functionsAntonio Borneo2010-04-112-26/+26
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/MIPS32_DMAACC: review scope of functionsAntonio Borneo2010-04-112-20/+19
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* HELPER/LOG: review unused symbolsAntonio Borneo2010-04-102-46/+0
| | | | | | | | | Remove unused functions: - log_catch - log_rethrow - log_try Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/MIPS_EJTAG: review scope of functionsAntonio Borneo2010-04-102-4/+4
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/CFI: review scope of functionsAntonio Borneo2010-04-101-3/+3
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TARGET/DSP563XX_ONCE: review scope of functionsAntonio Borneo2010-04-102-8/+2
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* OPENOCD: review scope of functionsAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* JTAG/COMMANDS: review scope of functionsAntonio Borneo2010-04-102-2/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* BINARYBUFFER: review scope of data and functionsAntonio Borneo2010-04-101-2/+2
| | | | | | Add "static" qualifier to private data and functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/STR7X: review scope of dataAntonio Borneo2010-04-101-2/+2
| | | | | | Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/TCL: review scope of functionsAntonio Borneo2010-04-102-3/+4
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* MFLASH: review scope of functionsAntonio Borneo2010-04-102-2/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/ARM_IO: review scope of functionsAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/CORE: review scope of functionsAntonio Borneo2010-04-102-10/+8
| | | | | | | Add "static" qualifier to private functions. Move function's comment from core.h to core.c. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/MX3: review scope of dataAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/ADUC702X: review scope of dataAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/AVRF: review scope of dataAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/CORE: review scope of dataAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/DRIVERS: review scope of functionsAntonio Borneo2010-04-102-4/+1
| | | | | | | Add "static" qualifier to private functions. Remove unused "extern" in src/ecosboard.c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* STR9XPEC: review scope of functionsAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* TCL: review scope of functionsAntonio Borneo2010-04-102-3/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>