| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
No error was propagated.
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions and data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Remove unused "extern" in src/ecosboard.c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
| |
Add "static" qualifier to private functions.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
|
|
|
|
|
|
|
| |
The command "flash bank" has updated syntax.
Add the mandatory parameter <target> to the usage message
that prints in case of error.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
These were relatively straightforward fixes which are
backwards compatible.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
'unlock' performs a full unlock/erase of the device, removing any
code protection.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jtag_get/set_end_state() is now deprecated.
There were lots of places in the code where the end state was
unintentionally modified.
The big Q is whether there were any places where the intention
was to modify the end state. 0.5 is a long way off, so we'll
get a fair amount of testing.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until this time only basic SLC functionality exists when you want to use SLC to access external nand flash.
Basic functionality can be selected with command:
lpc3180 select 0 slc
It is anyway very slow to write/read to/from nand flash.
With the new command, SLC speed improved about 20 times, and hardware ECC info also read/written from/to nand flash OOB area:
lpc3180 select 0 slc bulk
Speed improvement achieved by using working are in SRAM of the LPC3250 chip and controlling DMA controller to interact between SRAM and SLC peripheral.
Here are the patches, and if they are ok than take them.
Tested with hitex LPC3250 usb stick.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug that prevented users from specifying a base address of
0x80000000 or higher in image commands (flash write_image, etm image,
xscale trace_image).
image.base_address is an offset from the start address contained in
the image file (if there is one), or from 0 (for binary files). As a
signed 32-bit int, it couldn't be greater than 0x7fffffff, which is a
problem when trying to write a binary file to flash above that
address. Changing it to a 64-bit long long keeps it as a signed
offset, but allows it to cover the entire 32-bit address space.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add flash algorithm support for the PIC32MX.
Still a few things todo but this dramatically decreases
the programing time, eg. approx programming for 2.5k test file.
- without fastload: 60secs
- with fastload: 45secs
- with fastload and algorithm: 2secs.
Add new devices to supported list.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
| |
- make algorithm array static const.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
- make algorithm array static const.
- increase algorithm buffer size to 32k.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
| |
- make algorithm array static const.
- increase algorithm buffer size to 32k.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
| |
- make algorithm array static const.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
Cannot protect or unprotect single sector in cfi flash.
When first==last the procedure fails.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the end I have added comments /* FIXME: to be removed */
There are 3 lines in which my simplification is not complete due to
data dependency with LOG_DEBUG() messages visible in the patch.
Such log_debug has been introduced on Jan 22, 2007 with commit
4fc97d3f2726efa147cfdb0c456eace51550e1e3 during development activity
in this file/procedure.
From my point of view, these logs can be removed, since not part of a
consistent flow of information.
Alternatively, could be borrowed in the new cfi_send_command(), but
this will increase verbosity.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
| |
In the code a single field was all that was ever used. Makes
jtag_add_ir_scan() simpler and leaves more complicated stuff
to jtag_add_plain_ir_scan().
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jtag_add_dr/ir_scan() now takes the tap as the first
argument, rather than for each of the fields passed
in.
The code never exercised the path where there was
more than one tap being scanned, who knows if it even
worked.
This simplifies the implementation and reduces clutter
in the calling code.
use jtag_add_ir/dr_plain_scan() for more fancy situations.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
JEDEC standard reports Vpp integer part encoded as 4 bit HEX value.
To print it using decimal digits, %u is required.
Other voltage values are coded as BCD, so %x is appropriate.
Code already prints one nibble at a time, so no need for field width
and precision in format string.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the beginning or end of the specified range of sectors
already has the requested protection status, don't ask the
flash driver to change those sectors.
This will among other things turn command sequences like
this into the NOPs one would expect:
flash protect_check 0
flash info 0
... reports everything as unprotected ...
flash protect 0 0 1 off
That speeds things up (by whatever work was just avoided).
Also, with Stellaris (which can't unprotect flash at page level)
this can eliminate some undesirable/false error reports. (And
finishes fixing a bug currently listed in our bug database...)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NOR infrastructure caches some per-sector state, but
it's not used much ... because the cache is not trustworthy.
This patch addresses one part of that problem, by ensuring
that state cached by NOR drivers gets invalidated once we
resume the target -- since targets may then modify sectors.
Now if we see sector protection or erase status marked as
anything other than "unknown", we should be able to rely
on that as being accurate. (That is ... if we assume the
drivers initialize and update this state correctly.)
Another part of that problem is that the cached state isn't
much used (being unreliable, it would have been unsafe).
Those issues can be addressed in later patches.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Give a more accurate failure message when trying to unprotect; don't
complain about pages being write protected, just say that unprotect is
not supported by the hardware ... referencing the new "recover" command,
which is the way to achieve that.
Likewise, when trying to protect, talk about "pages" (matching hardware
doc) not "sectors" (an concept that's alien to these chips).
Also make the helptext for the "recover" command mention that it
also erases the device.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|