aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-11-01cortex_m: add missing error checkingØyvind Harboe
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-01target: fix null pointer exceptionØyvind Harboe
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-01flash: add Stellaris Blizzard classSpencer Oliver
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-01target: rename cortex_m3.[ch] to cortex_m.[ch]Spencer Oliver
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-10-31warning fix: remove senseless assignment before bailing out of fn w/errorØyvind Harboe
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-31warnings: null pointer check fixØyvind Harboe
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-31cfi: unsupported code paths now report and return errorØyvind Harboe
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-31bugfixes: tinker a bit with the targets commandØyvind Harboe
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-31dsp563xxx: fix missing error propagation found by clangØyvind Harboe
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-29clang: fix warning by adding assert that shows that a variable is usedØyvind Harboe
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-28Fixes comment typo for page sizeJonathan Dumaresq
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-27bugfixes: numerous bugs in error propagation found by clangØyvind Harboe
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-27clang: fix warning about missing check for return valueØyvind Harboe
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-26clang: fix warning about use of unitialized variableØyvind Harboe
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-25armv7a: fix scan-build warningsAndreas Fritiofson
"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-25armv7a: make local functions staticAndreas Fritiofson
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-25armv7m: improve error handlingAndreas Fritiofson
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-24Fix "Evaluate 'script' in the global scope"Freddie Chopin
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-24warning: silence gcc by initializing local variablesØyvind Harboe
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-23SERVER: fix clang warningAntonio Borneo
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-23NOR/CORE: fix clang warningAntonio Borneo
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-23NAND/CORE: fix clang warningAntonio Borneo
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-23FLASH/CFI: fix clang warningsAntonio Borneo
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-23mx2: add error propagation and remove warningsØyvind Harboe
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-23fm3: fix warning for superfluous assignmentØyvind Harboe
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-23kinetis: fix warning about malloc(0) w/assertØyvind Harboe
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-23clang: fix warning w/assert so that clang knows that there will be no ↵Øyvind Harboe
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-23clang: fix malloc() warning with assertØyvind Harboe
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-23tms470: removed unnecessary operationsEdgar Grimberg
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-22FLASH/STMSMI: fix clang "dead store" warningAntonio Borneo
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-22buspirate: ignore return value and fix warningØyvind Harboe
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-22warning: fix false positiveØyvind Harboe
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-22server: remove warning due to dead assignmentØyvind Harboe
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-21jim: add missing jim licenseSpencer Oliver
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-20rtos: remove broken code for handling the deprecated qP packetAndreas Fritiofson
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-20rtos: return the correct value if the T or H packets are handledAndreas Fritiofson
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-19Unused variablesFreddie Chopin
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-19Updated fm3.c, added Flash type 2 support, error handling improvedMarc Willam / Holger Wech
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-18xscale: fix bug in xscale_receive()Matt Reimer
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-18luminary: add new targetsSpencer Oliver
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-17Add the SAM3N familly to the chip_details tableAttila Kinali
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-17target_request: add target_got_message() that can be used to improve DCC ↵Øyvind Harboe
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-17target: DCC / target message backoff algorithmØyvind Harboe
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-14arm-jtag-ew: whitespace cleanupSpencer Oliver
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-14flash: fix lpc2000 driver typoSpencer Oliver
Change-Id: I3a759ed98a27fd186c12355b846d5e97dba86c5b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-10-13target: whitespace cleanupSpencer Oliver
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-13breakpoint : smp software breakpoint issueMichel Jaouen
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-11breakpoint : indentationMichel Jaouen
Change-Id: Icdb8f72dbb516cd0dfc612c3d61b6801f6382be6 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-10-11replace berlios url's with sourceforge url'sSpencer Oliver
Change-Id: I1c9957bb64df87cee7c5e832f21453eb8934a5fb Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2011-10-09stm32f1x: use async algorithm in flash programming routineAndreas Fritiofson
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>