| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since NOR flash devices does not handle "byte enable lanes",
each read/write access involves the whole "chip_width".
When multiple devices are in parallel, usually all chips are
enabled during each access.
All such cases are compatible with flash accesses at
"bus_width" size.
Access at "bus_width" size is mandatory for write access to
avoid transferring of garbage values to flash.
During read access the flash controller should take care,
and discard unneeded bytes. Anyway, it is good practice to
use "bus_width" size also for read.
Every memory access that does not respect "bus_width" size
is marked with a "FIXME" comment.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Review and simplify computation of bufferwsize.
Add comments about variables' meaning.
The same code is present 3 times in the file.
Current patch updates all the 3 instances.
Step 1)
Replace "switch(bank->chip_width) {...}".
Illegal values of bank->chip_width are already dropped.
For legal values, the code is equivalent to:
bufferwsize = buffersize / bank->chip_width;
Step 2)
The above code replacement plus the following line:
bufferwsize /= (bank->bus_width / bank->chip_width);
is merged in a single formula:
bufferwsize = (buffersize / bank->chip_width) /
(bank->bus_width / bank->chip_width);
and simplified as:
bufferwsize = buffersize / bank->bus_width;
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arguments chip_width and bus_width of command "flash bank" are
not fully checked.
While bus_width is later on redundantly checked in several other
parts (e.g. in cfi_command_val()) and generates run-time error,
chip_width is never checked, nor related to actual bus_width
value.
Added check to avoid:
- (chip_width == 0), that would mean no memory chip at all,
avoiding also division by zero e.g. in cfi_get_u8();
- (bus_width == 0), that would mean no bus at all;
- unsupported cases of chip_width or bus_width value not power
of 2;
- unsupported case of chip width wider than bus.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
|
| |
1. fix some errors in jtag.txt(in my personal opinion, please review).
2. remove a broken link
Signed-off-by: Jun Ma <sync.jma@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
reproducable when "./configure --enable-maintainer-mode CFLAGS=-D_DEBUG_GDB_IO_"
Signed-off-by: Jun Ma <sync.jma@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
| |
Last block was being skipped, fix by changing the loop test from "<" to "<="
First block argument was ignored, always started from block 0 (and counted
the wrong blocks as bad if first was nonzero). Now we use it.
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
The last_block argument to nand_erase() is checked against nand->num_blocks,
but the highest valid block number is (total - 1), the test for invalid should
be ">=" rather than ">".
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
As the flash bank name is now unique update the scripts to suit.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
| |
Make sure the flash bank name is unique
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
| |
flash cmds can now be passed either the bank name or the bank number.
For example.
flash info stm32.flash
flash info 0
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
gdb-attach does a reset init to make sure that the CFI probe
will succeed upon first gdb connect.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
big-endian arm926ej-s system
Signed-off-by: Jun Ma <sync.jma@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
This is my first post to the list. First, I would like to thank
everyone for their work on OpenOCD, it is a great tool to work with. I
have been using it to debug code on hardware for the Rockbox project
(www.rockbox.org).
The target that I primarily work with has a Spansion/Fujitsu NOR flash
(MBM29SL800TE). I attached a patch that adds support for this flash. I
hope it can be included in the main repository. If there is something
that needs to be changed with the patch before inclusion please let me
know.
-Karl Kurbjun
|
|
|
|
| |
Always use the complete name of the GDB command, not an abbreviation.
|
|
|
|
| |
There is a small typo in the cpu list, arm920t is armv4.
|
|
|
|
|
|
|
| |
There was a fixed 20 second timeout which is too little
for large, slow timeout checks.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
There was a fixed 20 second timeout which is too little
for large, slow timeout checks.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
The ST/Numonix M29W128G has an issue when a 0xff cmd is sent,
it cause an internal undefined state. The workaround according
to the Numonyx is to send another 0xf0 reset cmd
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
Increase working area for stm3210e_eval.cfg.
Add new configs for the following boards:
STM321000B-EVAL, STM32100C-EVAL, STM32100B-EVAL
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
c->sin.sin_port does not contain a valid port number so just use
service->port as this is always correct.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a million reasons why cached protection state might
be stale: power cycling of target, reset, code executing on
the target, etc.
The "flash protect_check" command is now gone. This is *always*
executed when running a "flash info".
As a bonus for more a more robust approach, lots of code could
be deleted.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
Quite useful to be able to unlock the flash, just like in
the flash write_image cmd.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
No error was propagated.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
introduced in latest commit. Should have held off merging
that commit. Sigh....
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Various commands, e.g. "arm mcr xxxx" would fail if invoked upon startup
since it there was no command context defined for the jim interpreter
in that case.
A Jim interpreter is now associated with a command context(telnet,
gdb server's) or the default global command context.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
| |
Remove/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>
|
|
|
|
|
|
| |
clean up error handling a bit. No change in behavior.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
Fix gaffe committed last time.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
fix build issue with 70226c221f5879bb6126ff3f2ec9ae64c68d80d6 commit
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Removed bogus errors when trying to allocate a large
a target memory buffer as possible.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
E.g. how much target memory that is used during flashing
is debug info.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The ecosflash driver is no longer used by any of the config
scripts. It is more useful to get more testing of CFI.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This patch adds support for the Voipac PXA270 module. Including NOR flash.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
|
|
|
|
|
|
|
| |
This patch adds definition file for the Voipac VPACLink JTAG adaptor. The
adaptor is combined JTAG/UART device.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
| |
add docs for missing args.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
Flash probing must succeed for e.g. gdb load and automatic
hardware/software breakpoints to work.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|