Commit Graph

4421 Commits

Author SHA1 Message Date
Spencer Oliver
de1fb8c6ac Revert "build: fix gcc 4.6.2 warnings"
This reverts commit 0ef5a90d93c5a026bcf70132e60e957ae339d1e1

Causes older versions of gcc to break - need to look into a better fix.

This passed through the jenkins build as we originally did not build this module - we do now.

Change-Id: Iafeac8442b2249269ff45a52ccd3e2870920f635
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/214
Tested-by: jenkins
2011-11-18 15:16:35 +00:00
Spencer Oliver
e1500a9c9d build: fix gcc 4.6.2 warnings
see trac #47

Change-Id: I48a3e963354dfc82209477672c2508c96fb737d6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/198
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-18 13:29:22 +00:00
Robert Pasz
280e1b334a presto: fix tms_sequence short issue
fix issue when using tms_sequence short

see Trac #31

Change-Id: I22a9cd2af59eae4d8a276dae60b6a99d05af53bb
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/201
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17 23:14:16 +00:00
Philip Nye
e5e2408680 gdb: Potential rounding error in reg_packet_size gdb_get_registers_packet
The calculation for reg_packet_size in gdb_get_registers_packet() could
generate a wrong result in the case of multiple registers whose size is
not a multiple of 8.

The current calculation sums the sizes for all registers then rounds the result
up to the next multiple of 8.

Instead it should round each register size up individually and sum the results for all registers.

Change-Id: Idfb5e5eeee0e69a6889dbe9769c0bf17feacb63b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/200
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17 23:10:59 +00:00
Philip Nye
950f240519 gdb: fix multi core gdb issue
gdb_memory_map() correctly calculates the target specific number of flash banks, but then uses the total number (all targets) instead of the target specific number to construct its GDB response, causing a crash.

Change-Id: I3f8639b3e90303a59753ebe140ce4fff96fd5db0
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/199
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17 23:01:30 +00:00
Spencer Oliver
2475e7b14c flash: match stm32f2x loader src name
Change-Id: I60523f809f2d9ec9c9283e0456746ce9a63576a7
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/196
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-17 22:48:25 +00:00
Andreas Fritiofson
a1f6b6612b stm32f1x: improve variable naming and avoid potential divide-by-zero
Don't call a variable num_pages if it holds the flash size. Also rearrange
flash size to num_pages calculation to avoid divide-by-zero if there will
be a device with < 1024 byte pages someday.

Change-Id: I2febea39694a2f9750de141f52ec88ae1599c086
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/211
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-17 17:28:13 +00:00
Andreas Fritiofson
7af4ec859d bitq: make private functions static
Change-Id: I3fabbdbda4ba8ba6557d79b97444fe06f1710b58
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/209
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16 23:47:59 +00:00
Andreas Fritiofson
ed13d3d3be bitq: reduce scope of variables
Change-Id: Ie1049b9d8ed5e44aee038e9181e423c35b4263c4
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/208
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16 23:47:23 +00:00
Andreas Fritiofson
aef1fe6024 bitq: remove the remaining static variables
in_mask and in_idx are just another encoding of the same state information
that is already kept in bitq_in_state.bit_pos so derive them from that
instead of maintaining them separately.

Change-Id: I4ac6bbe923698a8c1090a785b8babcbb90f82931
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/207
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16 23:46:35 +00:00
Øyvind Harboe
287ba1888b stm32f1x: add more asserts
this at least checks the post conditions after convoluted code.

Change-Id: Idfa8cbedce5288d8bae5743687949f141dfb07b2
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/187
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-16 23:29:53 +00:00
Andreas Fritiofson
9450da873c bitq: remove a static variable
in_buff is only ever set to field->in_value and that pointer is still
available when the parsing is restarted so it could just as well be used
directly, removing the need for the static variable.

Change-Id: I3dd7a8315ed5c5bdc3bfb74044f89492bca9816c
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/206
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16 09:22:48 +00:00
Andreas Fritiofson
d31803d3d9 bitq: remove dead code
field->in_value is already checked so it must be non-null here, which means
the else clause can never execute so the entire buffer allocation and
handling code is completely dead.

Change-Id: Id465012a7e607349401d554fc7a8e5db7e967998
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/205
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-16 09:21:58 +00:00
Tomas Frydrych
a17907d106 kinetis flash: use longword write when writing into pflash
Check whether the destination is in the program flash or NVM regions,
in the former case, use the normal longword mechanism, not the fast NVM
write.

Change-Id: I7366b7c8919928ee690252df83b99701776aee82
Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Reviewed-on: http://openocd.zylin.com/194
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-15 20:56:17 +00:00
Marek Vasut
ffe969898f Add Tincantools Flyswatter2 support
This is a successor to the Flyswatter cable and is very close to the original.
The new revision is based on FT2232H.

Change-Id: Icc6efcf0e4f9d8a10b65df8679b4973f6b375a9f
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: David Anders <danders@tincantools.com>
Reviewed-on: http://openocd.zylin.com/193
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-15 20:55:11 +00:00
Aurelien Jacobs
67c3ad8c40 at91sam7: ensure probed flash bank has a name (fix a segfault)
Before this commit, openocd used to segfault when probing flash
of an at91sam7x512 (which contains 2 banks of flash). This was due
to the way it systematically insert a new flash bank without setting
its name.
Then, when get_flash_bank_by_name_noprobe() is called, it is doing
a strcmp() on the non-initialized bank->name.

This commit prevents allocation of second probed bank if it is already
allocated (for example, if it is set in a target config file). If a
new bank really needs to be allocated, it ensures that a default name
is set.

Change-Id: I38d15bef1fda2ec746efad37171975136cf7b371
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Reviewed-on: http://openocd.zylin.com/171
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-15 09:27:50 +00:00
Øyvind Harboe
a943ec1ca9 target: make it absolutely clear that no null pointers are accepted
there are no comments about what the rules w.r.t. null pointers
are and it is inconsistent.

It's simply a bug in the app if we ask about the properties of a null
pointer w.r.t. what kind of target it is. It's equally wrong to say
that it is an arm target as that it isn't an arm target.

Change-Id: I0925a6a5c8b38e594ffa7c3ca4390487b5e9b718
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/168
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-14 23:39:20 +00:00
Øyvind Harboe
9e1a16690e image: remove assignments to local variables that is never read
Change-Id: I1a5e968f165e060fd4aa7c023ad870a9e21bb5dd
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/191
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-10 21:30:15 +00:00
Øyvind Harboe
eac1bc55d2 ft2232: fix warning about assignment to local variable
variable is not read afterwards.

Change-Id: I905bbb10c596190f75494e6c6ad400a3e51843f6
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/192
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-10 21:29:39 +00:00
Øyvind Harboe
fb5422261f svf: fix warnings
Change-Id: Ib7f67612db3a865f9acc5ae349455da7ddcd3348
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/177
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-10 15:43:30 +00:00
Kyle Manna
87552bc1d3 ft2232: Set PWR_RST and LOOPBACK for xds100v2
The CPLD on the xds100v2 expects to see a rising edge on PWR_RST to
enable the outputs.  This patch creates that transition correctly by
fixing the direction register for PWR_RST.

THe CPLD will also loop back the data if the LOOPBACK signal is
asserted.  Set this signal to an output and keep it clear.

This was tested with a TI DM3730 Beagleboard xM.

Change-Id: I4ea216bef6ae5c40e935741af5c69dc844d5d494
Signed-off-by: Kyle Manna <kyle.manna@fuel7.com>
Reviewed-on: http://openocd.zylin.com/189
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-10 15:42:53 +00:00
Attila Kinali
4c3a87c28f Work around silicon bug in the SAM3 family flash waitstates
* Add flash waitstate support for Atmel SAM3 chips.
* Set default waitstates to 6, to workaround a silicon bug in the SAM3 family

This code has been tested on SAM3U4, SAM3N4 and SAM3N1

based on Change-Id: I477446f9bfb3e910ea3e2414a6e9a75beb14a214
by Jim Norris <u17263@att.net>

Change-Id: I8d360080f6968979ca5e197ad638282cadd18fb7
Signed-off-by: Attila Kinali <attila@kinali.ch>
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/128
Tested-by: jenkins
2011-11-10 15:41:44 +00:00
Øyvind Harboe
b472c2f245 at91sam7: fix warnings by removing dead assignments
Change-Id: I836038b3518e617291ac7d5d255a388d9486f67f
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/180
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-09 16:30:55 +00:00
Øyvind Harboe
7d9d056eae buspirate: add missing error propagation
found by clang.

Change-Id: I80ea8e6afc8dcc1aa7edb6f63af0d94f6781b81c
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/182
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-09 16:30:24 +00:00
Øyvind Harboe
86d8ee7fe2 warning fix: remove unused variable assignment
Change-Id: I8c73b0f9a6a10734e539eedcedd79e1a34122f60
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/185
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-09 16:29:10 +00:00
Øyvind Harboe
234f51429e em357: fix warning by removing unused local variables
Change-Id: I9def63d36ed4fa8bf9cdeeedc18b1b25d0e487d6
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/184
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-09 16:27:11 +00:00
Øyvind Harboe
74558296d1 usbprog: fix unecessary and confusing assignment
clang found silly code that was trivially fixed.

Change-Id: Ied6c1b254c1823cd111140cbe0c8a03d2ede65fb
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/186
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-11-09 01:58:57 +00:00
Spencer Oliver
e74a081a1a flash: update luminary device table
add support for checking target against the device CLASS rather
then just the PARTNO.

This change also adds the new LM4F family (Blizzard).

Change-Id: Ia9d1e33f1f1c2817c0039a2232ecf932fae072f9
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/161
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-08 21:52:17 +00:00
Øyvind Harboe
3558721df7 arm7_9: remove warnings by reducing scope of variables
Change-Id: Idc384b733056a72108680b073da7c327a8eeedc3
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/179
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-08 08:09:15 +00:00
Øyvind Harboe
6fa4c5a456 disassembly: fix access to undefined memory pointer upon unknown instruction
return error message instead. Found by clang.

Change-Id: Ica109d077206236a12d007e77cc78061ffd05834
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/169
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 20:37:11 +00:00
Øyvind Harboe
3bab899063 xsvf: add missing error propagation
Change-Id: Ibc70deb980d6d18ceb376b72d9104e6180b16acf
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/176
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 20:35:42 +00:00
Øyvind Harboe
0552c05ee8 dsp5680xx: fix warnings
- propagate error
- remove dead assignment

Change-Id: I0d7078f531d96e421e95f08bfd908e818500d74c
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/170
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 20:34:41 +00:00
Øyvind Harboe
d931bb5a05 str9x: explain compiler that a local variable will always be initialized
Change-Id: I9ddb2793b4cdbf6acea6f69973531491e4ebcc5b
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/145
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 20:33:17 +00:00
Øyvind Harboe
00c8648351 at91sam3: fix warnings
- reduce scope of variables
- assert on post condition to fix clang warning

Change-Id: Id91038f73a632f9688ba52c9c34eae923626e770
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/160
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 20:32:51 +00:00
Øyvind Harboe
4bea65f1b2 str7x: fix error propagation
stick to convention of "retval" being used as error value to
be propagated and use "flash_flags" local variable for flash
flags read from how.

Change-Id: I63f1f2248b4f4538d6cd7634ae277f7c0aadc346
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/178
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 20:32:06 +00:00
Øyvind Harboe
17b546a900 ecos: add missing error propagation
Change-Id: Ib34815c9cf654517f22486a7c8001fdb7471338c
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/174
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 16:14:47 +00:00
Øyvind Harboe
6be4646d17 xscale: cleanup
- fix error propagation
- add some debug output for "unused" variables
- reduce scope of variable to avoid "unread" variables.

Change-Id: I136995f2a043102e64b8fff3017502fae564013b
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/175
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-07 16:13:08 +00:00
Øyvind Harboe
b01e136045 warning fix: add self-consitency check to remove warning
verify promise of code that more code can be pasted with an
assert at the end condition of the code passage that builds
string.

Change-Id: I76a4e5f91b9142fff932e1493cb43c29eb6a0f80
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/143
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-05 12:01:30 +00:00
Øyvind Harboe
61699628c8 cfi: fix gaffe in fixing warnings
introduced reading garbage value for arm32.

Change-Id: Ib5792a8a3207ee4db6d01d354df98c3cfabce037
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/162
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 22:53:31 +00:00
Øyvind Harboe
482e8a2b55 etm: fix warning by removing assignment that is immediately overwritten
Change-Id: Ia3a83d3c1fc3a1707d69017fce6cf142a81babc4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/165
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 09:15:14 +00:00
Øyvind Harboe
ed028542ed cortex_m: initialize unused CPU variables to 0 for poll info output
fixes warnings.

Change-Id: I1a9ec09083d4e6269889fb79e6121f25e83eb396
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/163
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 09:13:14 +00:00
Øyvind Harboe
5bdd2111d0 dsp5680xx: add missing and broken error propagation
found by clang.

Change-Id: Ie7e2ecad71bf0838ece93727e4778ad368b890ef
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/156
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 09:06:50 +00:00
Øyvind Harboe
2b20e4afac at91sam9: fix broken error propagation
Change-Id: I3288ce6f7642e519c26dd099be888a395fe1de94
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/159
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 09:05:47 +00:00
Øyvind Harboe
cb38df20dc avr32_regs: add missing error propagation
Change-Id: Ie8b141dd534d73eccfc045069d5f628bd1eea88e
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/166
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-04 09:05:15 +00:00
Øyvind Harboe
bab6db1fd9 gdb_server: assert to avoid malloc(0)
Change-Id: I6ae3e007f4aa768f8bc64de78351750138f12e53
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/135
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-03 11:16:16 +00:00
Øyvind Harboe
955316a727 fix warning: remove assigned to variable
variable is subsequently not used

Change-Id: I177d21c6ba9f1f2e3765feffdbf317ea375a8cfe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/149
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-02 09:44:08 +00:00
Øyvind Harboe
2c906384c3 cortex_a: add missing error propagation
found by clang.

Change-Id: I50eac219d7540fd48d3285f3f213cb659492d0c0
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/153
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-02 09:43:04 +00:00
Øyvind Harboe
5f00c007cb usbtoxxx: remove warning by reducing scope of variable
Change-Id: Icc3cfe601082cd83ad1c8818c1e21e7ada014150
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/154
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-02 09:42:34 +00:00
Øyvind Harboe
566faa17de arm11: print next address to debug
fixes clang warning. Basically the next address pointer is not
used for anything in the fn, except to be examined in debug.

Change-Id: I253519b8e49e54490bbe7da8ec3d2dd31f49052a
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/155
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-02 09:41:40 +00:00
Øyvind Harboe
2ea7a42e22 cortex_m: add missing error checking
found by clang.

Change-Id: I099c6fe6b044dba36c20221cb439bdcba5a6bb6f
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/152
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-11-01 22:12:59 +00:00
Øyvind Harboe
06216744ed target: fix null pointer exception
check if no target is selected and return error.

Change-Id: Ie8abb63c708d09572b45e88fc6766af108715077
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/148
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-01 21:20:19 +00:00
Spencer Oliver
889a306fc8 flash: add Stellaris Blizzard class
Change-Id: I83f0d6edf3ab31d9fa86682f20cec77dc47ba2f6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/146
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-11-01 19:45:33 +00:00
Spencer Oliver
3f8f583964 target: rename cortex_m3.[ch] to cortex_m.[ch]
This rename is in preparation for cortex_m4 support.

Change-Id: Ic08c298ec6ed2aabc2c39db67191f68b3a51f550
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/147
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-01 14:23:08 +00:00
Øyvind Harboe
01f461b20a warning fix: remove senseless assignment before bailing out of fn w/error
Change-Id: I822f3adce0eccb880007673d60c7eccf7d36b398
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/144
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-10-31 21:12:30 +00:00
Øyvind Harboe
9b9092b7fa warnings: null pointer check fix
rewrite broken null pointer check code by reducing scope
of variable.

Change-Id: I8254f6849b187e5c9cd083053cdc11973c6fe339
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/142
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-31 20:43:36 +00:00
Øyvind Harboe
9933fa334d cfi: unsupported code paths now report and return error
found by clang, would have done something undefined and mysterious
later on.

Change-Id: If7d7aca8514575d229ed0b17378bf8b1bbf347c4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/133
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-31 20:41:18 +00:00
Øyvind Harboe
08815946f6 bugfixes: tinker a bit with the targets command
return error when target can not be found instead of ERROR_OK,
split fn.

Change-Id: Iba5232d3862a490d0995c3bfece23685bd6856e3
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/131
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-31 17:41:44 +00:00
Øyvind Harboe
fc553327c0 dsp563xxx: fix missing error propagation found by clang
Change-Id: I7380ce145b4942e21b174f2a810928a877c32bc7
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/140
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-31 11:04:42 +00:00
Øyvind Harboe
fe2fd812fa clang: fix warning by adding assert that shows that a variable is used
Change-Id: I26e0ba9f1ae9d43c9a14c42c4225746782dc4d66
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/134
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-29 13:13:45 +00:00
Jonathan Dumaresq
af51c69fbc Fixes comment typo for page size
Change-Id: I6dd8aadcecd680c48e696aeec0daf74d2addbb05
Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
Reviewed-on: http://openocd.zylin.com/132
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-10-28 15:24:50 +00:00
Øyvind Harboe
97806831e2 bugfixes: numerous bugs in error propagation found by clang
Change-Id: I784068325b422d1918e28c08544bc5a1332d712f
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/130
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-27 22:08:35 +00:00
Øyvind Harboe
7e817839f3 clang: fix warning about missing check for return value
Change-Id: I0c6b6b8d1f0c30b6a503cb98df30584252bc0ee1
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/129
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-27 17:38:46 +00:00
Øyvind Harboe
e6d979eefc clang: fix warning about use of unitialized variable
this was a false positive, silence it.

Change-Id: I432e0c466c94cf8fd6bbf0ea153c8501a8a261eb
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/126
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-26 20:36:04 +00:00
Andreas Fritiofson
8f76ca05d9 armv7a: fix scan-build warnings
"Value stored to 'retval' is never read": Check and propagate error
"Dereference of null pointer": Probably bogus, maybe triggered by the null
check on armv7a, so remove the check since it can't be null anyway.

Change-Id: I3bc44e52af1589ff40e6a42deda0ce7f3a25e397
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/119
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-25 05:16:50 +00:00
Andreas Fritiofson
f80ec2aa37 armv7a: make local functions static
Also fix a spelling error and remove the declaration for a non-existent
function from the header.

Change-Id: I13177e2d81aa167c05c1cc766f06924211e6d735
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/118
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-25 05:16:04 +00:00
Andreas Fritiofson
8c6b95ed16 armv7m: improve error handling
Propagate errors unchanged.
Free allocated working area in the error return path.
Remove duplicated cleanup code by rewriting the logic.
As a side-effect, fixes a scan-build warning.

Change-Id: I80e3c0015be672778f916e998c8c2e4f23d7588c
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/117
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-25 05:14:11 +00:00
Freddie Chopin
ea10093422 Fix "Evaluate 'script' in the global scope"
This fixes commit Evaluate 'script' in the global scope. It caused
Windows builds behave differently than before because path was evaluated twice
and backslashes from Windows' paths got unescaped and effectively wiped out.
Configs could only be passed with "-f ../dir/config.cfg" or "-f
..\\dir\\config.cfg" instead of usual "-f dir/config.cfg" (or using backslash)
as previously.

Change-Id: I13b4abac6dbe6d770cc11a4e61c9421ef340da83
Author: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/40
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-24 17:40:52 +00:00
Øyvind Harboe
e5fd6131fe warning: silence gcc by initializing local variables
GCC doesn't understand that these are in fact initialized if they are
used.

Change-Id: I01988adb0547f785b48d869ddbe44cc17dca4739
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/116
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-24 17:10:40 +00:00
Antonio Borneo
8e8ff02b74 SERVER: fix clang warning
The fix is inline with the Linux coding style that forbids
assignment in if condition

Change-Id: I0b9d0b419d9c8b7a8c755e048d5faf72d1658ba2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/87
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 15:17:09 +00:00
Antonio Borneo
40c425e400 NOR/CORE: fix clang warning
The fix is inline with the Linux coding style that forbids
assignment in if condition

Change-Id: I10338a249bcfeff87d8596f7e17f209e26b41678
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/86
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 14:37:48 +00:00
Antonio Borneo
7b94f4c99d NAND/CORE: fix clang warning
The fix is inline with the Linux coding style that forbids
assignment in if condition

Change-Id: I42a371d6adfdf3b3fb867705211c47d89776ee2a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/85
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 14:32:11 +00:00
Antonio Borneo
3432049276 FLASH/CFI: fix clang warnings
Total of 5 warnings:
3x "Dead store": removed dead assignment to variable;
1x "Dereference of null pointer": this is not an error, but a
   limited visibility of clang, since pointer erase_region_info
   is initialized inside cfi_fixup_non_cfi();
1x "Branch condition evaluates to a garbage value":
   this is a real coding bug that could issue SIGSEGV, since
   "goto cleanup" can be executed before initialization
   of "source".

Change-Id: Id3c323c82bb15cbd3bb8fc04b23541f11145f109
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/84
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 14:16:45 +00:00
Øyvind Harboe
9bb3a05f0e mx2: add error propagation and remove warnings
Change-Id: Idd4fb452790e5d7921a749679dbd865586e5a4a9
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/48
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 13:30:46 +00:00
Øyvind Harboe
dad3850264 fm3: fix warning for superfluous assignment
Change-Id: I4f8e8c2e676a2728ddc6227daf9ca6a7ceb3d505
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/46
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 13:29:09 +00:00
Øyvind Harboe
d5b5f9f4fd kinetis: fix warning about malloc(0) w/assert
Change-Id: Ib40204675bfc5429c744f9ed7e2f7098384b753d
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/47
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 13:26:53 +00:00
Øyvind Harboe
c9f51acdc3 clang: fix warning w/assert so that clang knows that there will be no division by zero
Change-Id: I98ac62a22f21043bb535a667a4f1f1537ccde2a4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/42
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 11:57:34 +00:00
Øyvind Harboe
4e079d18bf clang: fix malloc() warning with assert
Change-Id: I989d2655622a9f11f4a0a2994014e42822587ecd
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/41
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 11:55:02 +00:00
Edgar Grimberg
0577ba8331 tms470: removed unnecessary operations
This should silence a warning.

Change-Id: Id91a9ebacae836083b1db2654a8e7bf24b2300e9
Signed-off-by: Edgar Grimberg <edgar.grimberg@gmail.com>
Reviewed-on: http://openocd.zylin.com/52
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 11:34:05 +00:00
Antonio Borneo
811f7d3f7e FLASH/STMSMI: fix clang "dead store" warning
Change-Id: Icfdefdc48432db2057d3fea19dc424571d2385eb
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/50
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-22 11:45:29 +00:00
Øyvind Harboe
8d5e34635c buspirate: ignore return value and fix warning
Perhaps we could do one better and propagate the error?

Change-Id: Idc45f516c26f09de4ee01fe05e8d3475f4b80db3
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/43
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-22 09:01:00 +00:00
Øyvind Harboe
5179738062 warning: fix false positive
may be used uninitialized in this function [-Werror=uninitialized]

Change-Id: Ida2cf8efe4e7da6fd9f669b806a20894563ac3d4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/49
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-22 06:45:55 +00:00
Øyvind Harboe
a093f82bb7 server: remove warning due to dead assignment
Change-Id: Idb08aef0c11b3fae92286e8fcea61ab09ab09e74
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/44
Reviewed-by: Peter Stuge <peter@stuge.se>
Tested-by: jenkins
2011-10-22 06:18:52 +00:00
Spencer Oliver
7fe05ff330 jim: add missing jim license
Change-Id: Ib8e34739d92cd54655b9b47d07b856a82ff25f3c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/39
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-21 09:29:44 +00:00
Andreas Fritiofson
6b209e7489 rtos: remove broken code for handling the deprecated qP packet
Change-Id: Icca522c1e2a2877abb20665b171c61079b1d8f48
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/37
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-10-20 01:45:25 +00:00
Andreas Fritiofson
3d2305f2e6 rtos: return the correct value if the T or H packets are handled
Change-Id: Iea31e20ee4e35c1a9cb7b93424c92b3f38081067
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/38
Tested-by: jenkins
Reviewed-by: Evan Hunter <evan@ozhiker.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
2011-10-20 01:45:06 +00:00
Freddie Chopin
1c1771ef6c Unused variables
Fix a few errors with set and unused variables detected by GCC 4.7.0

Change-Id: I59b748e18e514ee9f0cde7883b4ed5116198bd4a
Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-on: http://openocd.zylin.com/36
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-19 19:53:00 +00:00
Marc Willam / Holger Wech
9ddb94c1f3 Updated fm3.c, added Flash type 2 support, error handling improved
Change-Id: I684aca11c4554290d0e57c6d3318d8082980c1ef
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Reviewed-on: http://openocd.zylin.com/10
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-19 11:05:27 +00:00
Matt Reimer
4eca579a6e xscale: fix bug in xscale_receive()
The code in xscale_receive() that tries to skip invalid reads (i.e.
reads that don't have the DBG_SR[0] 'valid' bit set) seems to be
wrong, as it only looks at the first word's valid flag rather than
each word's own valid flag. Am I reading the code correctly? If so,
the attached patch should fix it.

If this looks correct, I'll generate a proper patch and commit message.

Matt

Change-Id: I74ebe2ad7a36d340a9dd3b8487578b6ea7f3cf1e
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/32
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-18 20:32:36 +00:00
Spencer Oliver
0dac042a10 luminary: add new targets
update target support from latest SW-DRL 8049

Change-Id: I40aba4d30fe2b79fd955f466c64d99a1dfd63ecf
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/31
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-18 06:36:11 +00:00
Attila Kinali
2f6bdac60a Add the SAM3N familly to the chip_details table
Change-Id: Ic122d324eacf6e667ed6008ebb84708be944222c
Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/29
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-17 17:40:25 +00:00
Øyvind Harboe
80c20a186b target_request: add target_got_message() that can be used to improve DCC performance
API change to allow implementing a back-off algorithm for
polling hardware.

Change-Id: I6cbe8b4534c8dfeb8442305171ea96b5481c1f17
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/26
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-17 12:32:38 +00:00
Øyvind Harboe
ea295bd694 target: DCC / target message backoff algorithm
by immediately polling again when we have received a message from
the target instead of waiting 100ms, we can hope for much better
performance. More than 100x? :-)

Change-Id: Ieaf0c6c8b6e5addc482895670ffbf9a743e07a29
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/27
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-17 12:32:11 +00:00
Spencer Oliver
3828b5827d arm-jtag-ew: whitespace cleanup
Change-Id: I8861e825f9c84525e0c09c3adaa3fe300640770d
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Reviewed-on: http://openocd.zylin.com/21
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-14 13:01:52 +00:00
Spencer Oliver
8c3c5e53e3 flash: fix lpc2000 driver typo
Change-Id: I3a759ed98a27fd186c12355b846d5e97dba86c5b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-14 14:18:56 +02:00
Spencer Oliver
8cd3832e2b target: whitespace cleanup
Change-Id: I1453f4f3dc0add529da20577e38b8b82d7d00366
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Reviewed-on: http://openocd.zylin.com/18
Reviewed-by: Alex Austin <alex.austin@spectrumdsi.com>
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-13 20:18:43 +00:00
Michel Jaouen
5a7cff26a5 breakpoint : smp software breakpoint issue
Change-Id: Iefe78bad71d4fdb38ae412ab8fe2f6282836c22e
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/14
Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-13 18:54:04 +00:00
Michel Jaouen
3ab7855d1a breakpoint : indentation
Change-Id: Icdb8f72dbb516cd0dfc612c3d61b6801f6382be6
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-10-11 22:04:24 +02:00
Spencer Oliver
cf692abe83 replace berlios url's with sourceforge url's
Change-Id: I1c9957bb64df87cee7c5e832f21453eb8934a5fb
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-10-11 17:18:05 +01:00
Andreas Fritiofson
92b14f8ca9 stm32f1x: use async algorithm in flash programming routine
Let the target algorithm be running in the background and buffer data
continuously through a FIFO. This reduces or removes the effect of latency
because only a very small number of queue executions needs to be done per
buffer fill. Previously, the many repeated target state changes, register
accesses (really inefficient) and algorithm uploads caused the flash
programming to be latency bound in many cases. Now it should scale better
with increased throughput.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-10-09 00:00:53 +02:00
Andreas Fritiofson
a147563ac1 stm32f1x: use register base instead of register offset
Access the different flash banks' registers using a bank specific register
base and a register specific offset. This is equivalent but feels more
natural.

Some accesses were discovered that maybe should not be hard coded to bank0
registers. Add a note about that.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-10-09 00:00:52 +02:00
Andreas Fritiofson
1163435e19 cortex_m3: use armv7m's async algorithm implementation
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-10-09 00:00:52 +02:00
Andreas Fritiofson
9d4c466c21 armv7m: implement async algorithm functions
Split armv7m_run_algorithm into two pieces and use them to reimplement it.
The arch_info parameter is used to keep context between the two calls, so
both calls must refer to the same armv7m_algorithm struct. Ugly but works
for a proof-of-concept.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-10-09 00:00:52 +02:00
Andreas Fritiofson
3f6ef7a40b target: add async algorithm entries to the target type
On supported targets, this may be used to start a long running algorithm in
the background so the target may be interacted with during execution and
later wait for its completion.

The most obvious use case is a double buffered flash algorithm that can
upload the next block of data while the algorithm is flashing the current.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2011-10-09 00:00:52 +02:00
Simon Barner
e56e5a3929 arm-jtag-ew: Send GDB keep_alive() messages when logging USB communication
- Ticket: #35
2011-10-08 23:10:20 +02:00
Simon Barner
830e76fecd arm-jtag-ew: Formatting 2011-10-08 23:10:11 +02:00
Simon Barner
028d9aa9ed arm-jtag-ew: In armjtagew_init(), set initial JTAG speed to 32 kHz (before TAP initialization).
This prevents rare communication errors during startup.
2011-10-08 23:09:42 +02:00
Simon Barner
b1c74747b6 arm-jtag-ew: Emit a warning if interface firmware version != 1.6 2011-10-08 23:09:30 +02:00
Simon Barner
e4590dad08 arm-jtag-ew: Declare interface as `jtag_only' 2011-10-08 23:09:21 +02:00
Simon Barner
07bf5f443a arm-jtag-ew: Provide armjtagew_speed_div() in order to fix interactive use of `adapter_khz' 2011-10-08 23:09:05 +02:00
Simon Barner
8b61ed2e95 arm-jtag-ew: Fix setting interface speed (2/2)
Interface expects speed in Hz, not kHz

- Ticket #34
2011-10-08 23:08:46 +02:00
Simon Barner
3977c5169b arm-jtag-ew: Fix setting interface speed (1/2)
CMD_SET_TCK_FREQUENCY message length is 5, not 4

- Ticket: #34
2011-10-08 23:08:15 +02:00
Clément Burin des Roziers
da8ce5f2e1 STM32L: Added flash driver and target
Added the flash driver for the STM32L family, which highly differ from the STM32F family.
Added the TCL target file for JTAG access.
2011-10-03 18:42:39 +02:00
Michel Jaouen
00ded4eb01 armv7a ,cortex a : add L1, L2 cache support, va to pa support 2011-09-30 09:45:26 +02:00
Steve Bennett
ef885d3b2a jim-nvp is moving from jimtcl to openocd
The jim-nvp code is specific to openocd, so it belongs in openocd,
not in the core jimtcl.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-30 09:38:22 +02:00
Mathias K
daa41473ab add target events, run algorithm and default r/w buffer api
Target events are added to get better gdb support. The run
algorithm functionality are implemented to support feature
fast flash write functionality. The new r/w buffer api is now
used to support the special memory address handling. The output
of the md command was fixed.
2011-09-23 15:32:49 +02:00
Michel Jaouen
508bc7ca36 kinetis : fix deadlock on device having hasidcode false. 2011-09-23 15:31:39 +02:00
Mathias K
bfe634aa91 kinetis cpu flash driver
Initial release of the freescale kinetis cpu flash driver.
2011-09-17 14:20:37 +02:00
Mathias K
5c91551ea7 kinetis auto mass erase on secured devices
This is a proof of concept to get access to the debug port of a
secured kinetis cpu. On full flash erase the cpu is automatically
secured and the debug port is not accessible.
To get this to work the srst line is needed and the necessary
configuration should be added to the configuration file.
2011-09-16 09:51:35 +02:00
Luca Bruno
4017af8492 Fixes and spellchecks for various Buspirate output messages
Signed-off-by: Luca Bruno <lucab@debian.org>
2011-09-11 00:07:54 +02:00
Richard Uhler
1411ad11c1 Implementation of a new jtag remote_bitbang driver.
The driver sends ascii encoded bitbang commands over unix sockets or TCP to
another process. This driver is useful for debugging software running on
processors which are being simulated.
2011-09-02 16:50:01 +02:00
Martin Schmölzer
48e8d2d21c ULINK driver: Remove typedefs in ulink.c
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-09-01 07:02:38 +02:00
Martin Schmölzer
70d9d808e5 ULINK driver: Remove typedefs in OpenULINK firmware: Use typedefs from stdint.h (uint8_t, uint16_t) instead of custom typedefs in shorttypes.h (u8, u16, ...)
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-09-01 07:02:38 +02:00
Martin Schmölzer
ea7c87e5e7 ULINK driver: Remove typedefs in OpenULINK firmware USB descriptor structures
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-09-01 07:02:38 +02:00
Rodrigo L. Rosa
355f183adb usleep to jtag_sleep
this will help avoid platform specific timing issues
2011-08-31 15:46:05 -07:00
Rodrigo L. Rosa
c4a1728a2d static for some functions
made two functions into static, since they are not required by anything external
2011-08-31 15:45:55 -07:00
Rodrigo L. Rosa
fb164bca55 speed up, relocate function
added an attempt to use the non-reseting halting sequence. if it fails, then the full sequence will be attempted. this makes things a bit faster most of the time.
changed the location of a function, avoiding a forward def
2011-08-31 15:45:45 -07:00
Øyvind Harboe
fbbce95140 Merge branch 'dsp5680xx_cherry' of git://repo.or.cz/openocd/dsp568013 into fix 2011-08-31 16:27:09 +02:00
Martin Schmoelzer
353362651f ULINK driver: Update firmware image to reflect the latest changes in source code.
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:42 +02:00
Martin Schmoelzer
1d135dddf2 ULINK driver: Add '-lm' linker flag when building this driver (required for correct calculation of JTAG TCK speed setting)
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:42 +02:00
Martin Schmoelzer
c331c9382f ULINK driver: Implement variable TCK frequency in OpenOCD driver
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:42 +02:00
Martin Schmölzer
6446dbaacb ULINK driver: Implement variable TCK frequency in OpenULINK firmware
Also, speed up jtag_clock_tck() significantly (150 kHz -> 375 kHz)

Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmoelzer
c881fb8532 ULINK driver: Fix whitespace in OpenULINK firmware usb.c module (trivial)
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmoelzer
d1bd5569b3 ULINK driver: Implement JTAG_PATHMOVE command
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmölzer
118a9a9ca0 ULINK driver: Implement JTAG_STABLECLOCKS command
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmölzer
b6e4d26695 ULINK driver: Implement command to manually force downloading firmware image from arbitrary location
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmölzer
d01cbd7143 ULINK driver: Re-order queue functions to reflect the order in commands.h
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmölzer
b6f8b2ab66 ULINK driver: Properly propagate return values in ulink_execute_queue()
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
Martin Schmölzer
3633e8d7b8 ULINK driver: Update some comments, fix some coding mistakes
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
2011-08-31 16:25:41 +02:00
simonqian.openocd
7e20eda944 vsllink driver compile fails with'vsllink_debug_buffer' defined but not used
USB communication is handled by code under versaloon directory.
So _DEBUG_USB_COMMS_  should not be used in vsllink.c.
Attachment is the patch.
2011-08-31 16:22:00 +02:00
Rodrigo L. Rosa
42300c98ab removed trailing whitespaces
emacs is awesome.
replace-regexp RET [ ]+$ RET RET
and it's done
2011-08-30 21:16:46 -07:00
Rodrigo L. Rosa
be568d37c0 fix enter debug mode for locking
added an alternative way to enter debug mode, which does not require restarting the chip.
this will not always work, but in general it will (failure 0.3%), and failure is not a dramatic issue, simply have to use the full sequence.
the user can only access "halt", which uses the full sequence, so the user should not have any problems.
restarting the chip requires reconfiguring the flash module. the doc is very poor, so i'd rather have the two methods, and live with the 0.3%.
2011-08-30 21:16:34 -07:00
Rodrigo L. Rosa
573cbeac1e fix irlen handling
sometimes the master tap will be enabled, since tap switching is required during halt/lock/unlocking procedures.
now irscan handles this, avoiding unnecessary warnings and preventing errors.
2011-08-30 15:17:00 -07:00
Rodrigo L. Rosa
eb0734de19 fix debug mode,lock,unlock
got new info regarding setting the chip to debug mode, and locking/unlocking flash memory.
the newer implementation is a bit slower, but always works.
the previous implementation would randomly (as once every 25k-70k times) get the chip into a state where the freescale tool would be necessary. this is fixed now.

added functions to play around with the jtag state machine. they are not the happiest, but are necessary to be able to execute the halting/locking/unlocking sequences.

Conflicts:

	src/target/dsp5680xx.c
2011-08-30 15:13:49 -07:00
Rodrigo L. Rosa
1d4f294c3c fix error handling during halt
the user can execute halt, but no enter_debug_mode. modified the error handling to suite this.
the new implementation of unlocking will use enter_debug_mode, and should not get the same errors as the user would, because not being able to enter debug mode is actually success when checking for locked flash.
2011-08-30 15:09:44 -07:00
Rodrigo L. Rosa
e1a2d7255e optional crc for flash writing
crc check was always performed on newly flashed data, now it is optional
flash mem can be locked by writing a specific word to a specific address in flash.
to verify flash, target must be halted, and this will (when the new halt sequence is implemented) require reseting the chip. if the target is reset after writing the lock words, then it will lock, hence the CRC will fail because it is not possible to read stuff from the target.

also added a function that resets the jtag state machine.
this is not used yet, but will be soon.
it is implemented to allow strict control over JTAG state machine, necessary to implement to halt and unlocking sequences.
2011-08-30 15:09:34 -07:00
Rodrigo L. Rosa
2aa14db677 def syntax to match tap irlen
the master tap has a 4 bit irlen
changed the instructions to be 4 bit, ie, removed the zeros.
it makes it clearer to interpret.
2011-08-30 15:09:23 -07:00
Heythem Bouhaja
c8926d1457 cortex_a hybrid & context breakpoints 2011-08-30 18:27:52 +02:00
Evan Hunter
e175f02715 Fix off by one bug in FreeRTOS 2011-08-27 19:37:22 +02:00
Jonathan Dumaresq
62eec47ff1 This will add the Value Line HD of stm32 devices.
This has been tested on STM32F100VE
2011-08-25 20:13:16 +02:00
Jie Zhang
8d7ddde5f1 remove target argument from gdb packet handling functions 2011-08-24 17:41:35 +02:00