You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(37) |
Sep
|
Oct
|
Nov
|
Dec
|
From: David B. <dbr...@us...> - 2009-11-05 00:42:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1c51f342d7f6da760ddd4e46eae91b6d6c06f579 (commit) from 333601da4bbe2bf39ccc21ddc5160344ca953678 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1c51f342d7f6da760ddd4e46eae91b6d6c06f579 Author: David Brownell <dbr...@us...> Date: Wed Nov 4 15:38:06 2009 -0800 Tweak release docs Contrast releases to git snapshot tarballs. Mention that releases have some quality-improvement focus, with special non-"dev" version IDs. Explain more about version IDs, using "openocd -v" to see them, etc; Make release milestone info be less specific about timing, and presume we have both a merge window and an RC stage. Rework the release process information to match reality a bit more closely. Reference the version.sh script (in one place the wrong script was referenced). Bugfix branches get special treatment, while non-bugfix releases are more or less what *defines* being the mainline branch. Signed-off-by: David Brownell <dbr...@us...> diff --git a/doc/manual/release.txt b/doc/manual/release.txt index 00e987e..31bf44d 100644 --- a/doc/manual/release.txt +++ b/doc/manual/release.txt @@ -25,14 +25,21 @@ release, this command will package the tree into several popular archive formats: <code>openocd-\<version\>.{tar.gz,tar.bz2,zip}</code>. If produced properly, these files are suitable for release to the public. -When released for users, these archives present several important -advantages when contrasted to using the git repository: - --# They allow others to package and distribute the code. --# They build easier for developers, because they contain - a working configure script that was produced by the Release Manager. --# They prevent users from trying a random work-in-process revision. --# They free developers from answering questions about mainline breakage. +When properly versioned and released for users, these archives present +several important advantages compared to using the source repository +(including snapshots downloaded from that repository using gitweb): + +-# They allow others to package and distribute the code using + consistent version labels. Users won't normally need to care + whose package they use, just the version of OpenOCD. +-# They contain a working configure script and makefiles, which + were produced as part of creating the archive. +-# Because they have been formally released by the project, users + don't need to try a random work-in-process revision. Releasing + involves spending some time specifically on quality improvments, + including bugfixing source code and documentation. +-# They provide developers with the flexibility needed to address + larger issues, which sometimes involves temporary breakage. Hopefully, this shows several good reasons to produce regular releases, but the release processes were developed with some additional design @@ -45,66 +52,111 @@ following properties: -# Allow scheduling and automation of building and publishing milestones. The current release processes are documented in the following sections. -They attempt to meet these design goals, but there may improvements -remaining to be made toward automating the process. +They attempt to meet these design goals, but improvements may still +need to be made. + +@subsection version_labels Version Labels + +Users can display the OpenOCD version string in at least two +ways. The command line <code>openocd -v</code> invocation +displays it; as does the Tcl <code>version</code> command. + +Labels for released versions look like <em>0.3.0</em>, or +<em>0.3.0-rc1</em> for a preliminary release. +Non-released (developer) versions look like <em>0.3.0-dev</em>, +or <em>0.3.0-rc1-dev</em>. +In all cases, additional tags may be appended to those base +release version labels. + +The <code>tools/release/version.sh</code> script is used to +manipulate version IDs found in the source tree. -@section releaseversions Release Versions +@subsubsection releaseversions Release Versions and Tags The OpenOCD version string is composed of three numeric components separated by two decimal points: @c x.y.z, where @c x is the @a major version number, @c y is the @a minor number, and @c z is the @a micro. - -For a <i>bug-fix</i> release, the micro version number will be non-zero +For any <em>bug-fix</em> release, the micro version number will be non-zero (<code>z > 0</code>). For a <i>minor release</i>, the micro version number will be zero (<code>z = 0</code>). For a <i>major releases</i>, the minor version will @a also be zero (<code>y = 0, z = 0</code>). -@subsection releaseversiontags Version Tags - -After these required numeric components, the version string may contain -one or more <i>version tags</i>, such as '-rc1' or '-dev'. +After these required numeric components, release version strings +may contain tags such as as <em>-rc1</em> or <em>-rc2</em>. +These 'rc' tags indicate "release candidate" versions of the package. +Like the major/minor/micro numbers, these tags will be manipulated +by the automated release process. -Mainline and all branches should have the tag '-dev' in -their version number. This tag helps developers identify reports -created from the git repository, and it can be detected and -manipulated by the release script. Specifically, this tag will be -removed and re-added during the release process; it should never be -manipulated by developers in submitted patches. - -The 'rc' tags indicate a "release candidate" version of the package. -This tag will also be manipulated by the automated release process. - -Additional tags may be used as necessary. +The release process includes version number manipulations to the tree +being released, ensuring that all numbers are incremented (or rolled +over) at the right time and in the proper locations of the repository. +One of those manipulations creates a repository tag matching that +release's version label. -@subsection releaseversionsdist Packager Versions +@subsubsection releaseversionsdist Packager Versions Distributors of patched versions of OpenOCD are encouraged to extend the version string with a unique version tag when producing external releases, as this helps to identify your particular distribution series. +Knowing that a release has such patches can be essential to tracking +down and fixing bugs. -For example, the following command will add a 'foo1' tag to the -configure.in script of a local copy of the source tree: +Packager version tags should always be suffixes to the version +code from the OpenOCD project, signifying modifications to the +original code base. Each packager release should have a unique +version. + +For example, the following command will add a 'foo' tag to the +configure.in script of a local copy of the source tree, giving +a version label like <em>0.3.0-foo</em>: @code -tools/release.sh version bump tag foo +tools/release/version.sh version tag add foo @endcode This command will modify the configure.in script in your working copy only. After running the @c bootstrap sequence, the tree can be patched -and used to produce your own derived versions. The same command can be -used each time the derived package is released, incrementing the tag's +and used to produce your own derived versions. You might check that +change into a private branch of your git tree, along with the other +patches you are providing. + +You can also "bump" those tags (so "foo1" becomes "foo2" etc) +each time a derived package is released, incrementing the tag's version to facilitate tracking the changes you have distributed. -@subsection releaseversionhow Version Processes +@code +tools/release/version.sh version bump tag foo +@endcode -The release process includes version number manipulations to the tree -being released, ensuring that all numbers are incremented at the right -time and in the proper locations of the repository. +Of course, any patches in your branches must be provided to +your customers, and be in conformance with the GPL. In most +cases you should also work to merge your improvements to the +mainline tree. -The version numbers for any branch should increase monotonically -to the next successive integer, except when reset to zero -during major or minor releases. The community should decide when -major and minor milestones will be released. +@subsubsection version_tags Development Versions and Tags + +Everything except formal releases should have the tag <em>-dev</em> +in their version number. This helps developers identify reports +created from non-release versions, and it can be detected and +manipulated by the release script. Specifically, this tag will be +removed and re-added during the release process; it should never be +manipulated by developers in submitted patches. + +Versions built from developer trees may have additional tags. +Trees built from git snapshots have <em>snapshot</em> tags. +When built from a "live" git tree, tags specify +specific git revisions: + +0.3.0-rc1-dev-00015-gf37c9b8-dirty + +indicates a development tree based on git revison f37c9b8 +(a truncated version of a SHA1 hash) with some non-git +patches applied (the <em>dirty</em> tag). This information +can be useful when tracking down bugs. +(Note that at this writing, the tags do not directly +correspond to <code>git describe</code> output. The +hash ID can be used with <code>git show</code>, but +the preceding segments can't.) @section releasewho Release Manager @@ -132,14 +184,23 @@ the changes to the package version, though the release tools should manage the tasks of adding or removing any required development branch tags and incrementing the version. +These responsibilities matter most towards the end of the release +cycle, when the RM creates the first RC and all contributors enter +a quality-improvement mode. The RM works with other contributors +to make sure everyone knows what kinds of fixes should merge, the +status of major issues, and the release timetable. + +In particular, the RM has the final decision on whether a given +bug should block the release. + @section releasewhen Release Schedule The OpenOCD release process must be carried out on a periodic basis, so the project can realize the benefits presented in answer to the question, @ref releasewhy. -Starting with the 0.2.0 release, the OpenOCD project should produce a -new minor release every month or two, with a major release once a year. +Starting with the 0.2.0 release, the OpenOCD project expects to produce +new releases every few months. Bug fix releases could be provided more frequently. These release schedule goals may be adjusted in the future, after the project maintainers and distributors receive feedback and experience. @@ -155,16 +216,26 @@ beginning of the development cycle through the delivery of the new release. This section presents guidelines for scheduling key points where the community must be informed of changing conditions. -If T is the time of the next release, then the following schedule -might describe some of the key milestones of the new release cycle: - -- T minus one month: start of new development cycle -- T minus two weeks: announce pending mainline closure to new work -- T minus one week: close mainline to new work, begin testing phase -- T minus two days: call for final bug fixes -- T minus one day: produce -rc packages and distribute to testers -- T minus one hour: produce final packages and post on-line -- T minus zero: Announce the release to our mailing list and the world. +If Tn is the time of release n, then the following schedule +might describe some key T0-to-T1 release cycle milestones. + +- T0 ... End of T0 release cycle. T1 cycle starts, with merge + window opening. Developers begin to merge queued work. +- <em>... several weeks of merge window ...</em> +- RC1 ... Close mainline to new work. Produce RC1 + release, begin testing phase; developers are in "bugfix mode", + all other work is queued; send out planned endgame schedule. +- RC2 ... Produce RC2 and send schedule update to + mailing list, listing priorities for remaining fixes +- <em>... more RC milestones, until ready ...</em> +- T1: End of T1 release cycle. T2 cycle starts, with merge + window opening. Developers begin to merge queued work. + +Note that until it happens, any date for T1 is just a goal. +Critical bugs prevent releases from happening. We are just +beginning to use this window-plus-RCs process, so the lengths +of the merge windows versus the RC phase is subject to change. +Most projects have RC phases of a month or more. Some additional supplemental communication will be desirable. The above list omits the step-by-step instructions to daily release management. @@ -176,29 +247,21 @@ The next section explains why the OpenOCD project allows significant flexibility in the part of the development that precedes the release process. -@note The OpenOCD project does not presently produce -rc packages. As -such, the step suggested in the list above should be read as trying to -stimulate others to test the project build and packaging on as many -platforms as possible. This proposition will be palatable once release -management tools have been committed to the tree. - @subsection releasewhenflex Schedule Flexibility The Release Manager should attempt to follow the guidelines in this document, but the process of scheduling each release milestone should be -community driven at the start. By the end, missing features that were -scheduled for a release must be dropped by the Release Manager, rather -than allowing the release cycle to be delayed while waiting for them. +community driven at the start. Features that don't complete before +the merge window closes can be held (perhaps in some branch) until +the next merge window opens, rather than delaying the release cycle. -Despite any assurances this schedule may appear to give, the Release +The Release Manager cannot schedule the work that will be done on the project, when it will be submitted, reviewed, and deemed suitable to be committed. -In this way, the RM cannot act as a priest in a cathedral; OpenOCD uses +That is, the RM cannot act as a priest in a cathedral; OpenOCD uses the bazaar development model. The release schedule must adapt -continuously in response to changes in the rate of churn. - -In particular, the suggested period of "one or two month" reflects some -expectation of a fairly high rate of development. Fewer releases may be +continuously in response to changes in the rate of work. +Fewer releases may be required if developers contribute less patches, and more releases may be desirable if the project continues to grow and experience high rates of community contribution. During each cycle, the RM should be tracking @@ -206,48 +269,48 @@ the situation and gathering feedback from the community. @section releasehow Release Process: Step-by-Step -The release process may require a few iterations to work out any bugs. -Even with the release script, some steps require clear user intervention --- and not only by the Release Manager. +The release process is not final; it may need more iterations +to work out bugs. +While there are release scripts, key steps require community +support; the Release Manager isn't the only participant. The following steps should be followed to produce each release: --# Produce final manual patches to mainline (or release branch): +-# Produce final patches to mainline (or a release branch). Nobody + except the RM should be committing anything. -# Finalize @c NEWS file to describe the changes in the release - - This file is Used to automatically post "blurbs" about the project. + - This file is used to automatically post "blurbs" about the project. - This material should be produced during the development cycle. - Add a new item for each @c NEWS-worthy contribution, when committed. -# Bump library version if our API changed (not yet required) --# Produce and tag the final revision in the git repository: - - Update and commit the final package version in @c configure.in : - -# Remove @c -dev tag. - -# Remove @c -rc tag, if producing the final release from an -rc series. - - Tags must be named consistently: -@verbatim -@endverbatim - - Tag the final commit with a consistent GIT tag name and message: + -# Update and commit the final package version in @c configure.in: + <code>tools/release/version.sh</code> may help ensure the versions + are named consistently: + -# Remove @c -dev tag. + -# Update the @c -rc tag: + - If producing the final release from an -rc series, remove it + - If producing the first RC in a series, add rc1 + - If producing the next RC in a series, bump the rc number + -# Commit that version change. + -# Create a git tag for the final commit, with a tag name matching + the version string in <code>configure.in</code>: @verbatim PACKAGE_VERSION="x.y.z" PACKAGE_TAG="v${PACKAGE_VERSION}" git tag -m "The openocd-${PACKAGE_VERSION} release." "${PACKAGE_TAG}" @endverbatim --# Prepare to resume normal development on the branch: - - Restore @c -dev and -@c -rc0 version tags. +-# Prepare to resume normal development on mainline: + - Restore @c -dev version tag. - To start a new major (or minor) release cycle on the @c master branch: - - Bump major (or minor) package version, zeroing sub-components. - - Add -rc0 version tag: - - This insures casual releases from GIT always increase monotonically. - - For example, a major increment after releasing 1.2.3 starts 2.0.0-rc0-dev. - Archive @c NEWS file as "<code>doc/news/NEWS-${PACKAGE_VERSION}</code>". - Create a new @c NEWS file for the next release - - To start a bug-fix release on a non-master branch: - -# Bump bug-fix version. - - To start another release candidate on a major or minor branch: - -# Bump rc tag. + - Commit those changes, and push the commit and the release tag + to mainline. -# Produce the package source archives: - -# Start with a clean working copy, used for producing releases only. + -# <em>Start with a new clone of the source tree</em>, with the + release's tag. This is used only for producing these packages. -# Checkout the appropriate tag: -<code>git checkout $(git tag ) "${PACKAGE_VERSION}"</code> +<code>git checkout "${PACKAGE_VERSION}"</code> -# Produce a ChangeLog for the release (using @c git2cl). -# @c bootstrap, @c configure, and @c make the package. -# Run <code>make distcheck</code> to produce the distribution archives. @@ -258,7 +321,7 @@ git tag -m "The openocd-${PACKAGE_VERSION} release." "${PACKAGE_TAG}" - Place static copies of the following files on the project website: - @c NEWS: to provide a blurb for each release - @c ChangeLog: to show exactly what has been changed - - User Guide, Developer Manual: to allow easy on-line viewing + - User's Guide, Developer Manual: to allow easy on-line viewing -# Upload packages and post announcements of their availability: -# Release packages into files section of project sites: - SF.net: @@ -279,24 +342,23 @@ git tag -m "The openocd-${PACKAGE_VERSION} release." "${PACKAGE_TAG}" -# Announce updates on freshmeat.net and other trackers. -# Submit big updates to news feeds (e.g. Digg, Reddit, etc.). -@section releasescript The Release Script - -Many of the processes described in the last section are no longer -entrusted to humans. Instead, the @c release.sh script provides -automation of the mechanical steps. - -Presently, the @c release.sh script automates steps 2 through 4, -allowing the Release Manager from perform these tasks in easy steps. - -The following task still need to be automated: - -- Step 5: produce documentation for website using released source archive. -- Step 6(a): package archive upload process. -- Step 6(b): package announcement e-mail process. -- Step 6(c): post files and announce them using releaseforge. +To start a bug-fix release branch: +-# Create a new branch, starting from a major or + minor release tag +-# Restore @c -dev version tag. +-# Bump micro version number in configure.in +-# Backport bugfix patches from mainline into that branch. + (Always be sure mainline has the fix first, so it's hard + to just lose a bugfix.) +-# Commit and push those patches. +-# When desired, release as above ... except note that the next + release of a bugfix branch is never a new major or minor release @subsection releasescriptcmds Release Script Commands +The @c release.sh script automates some of the steps involved +in making releases, simplifying the Release Manager's work. + The release script can be used for two tasks: - Creating releases and starting a new release cycle: @code ----------------------------------------------------------------------- Summary of changes: doc/manual/release.txt | 282 +++++++++++++++++++++++++++++------------------- 1 files changed, 172 insertions(+), 110 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-11-05 00:25:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 333601da4bbe2bf39ccc21ddc5160344ca953678 (commit) from b8e7408b92dd8c1bd33b810ea3d6268fb8437c97 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 333601da4bbe2bf39ccc21ddc5160344ca953678 Author: David Brownell <dbr...@us...> Date: Wed Nov 4 15:20:18 2009 -0800 Release scripts: comments, run on Ubuntu The "source" command isn't accepted by ASH; easy to fix. Failures with "-e" are harder to fix. Remove the "-e" (for now) and force bash, for safety. Un-obfuscate the release steps, by using names instead of numbers. Comment the version-number manipulation. Signed-off-by: David Brownell <dbr...@us...> diff --git a/tools/release.sh b/tools/release.sh index 26be151..e7fbc6c 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -1,8 +1,10 @@ -#!/bin/sh -e +#!/bin/bash # release.sh: openocd release process automation # Copyright (C) 2009 by Zachary T Welch <zw...@su...> # Release under the GNU GPL v2 (or later versions). +# FIXME Remove more bash-isms. Fix errors making "ash -e" lose. + ## set these to control the build process #CONFIG_OPTS="" #MAKE_OPTS="" @@ -13,7 +15,7 @@ ## The default is the current user name, as found by the 'id' command. #RELEASE_TAG="$(id -un)" -source "tools/release/helpers.sh" +. "tools/release/helpers.sh" VERSION_SH="tools/release/version.sh" @@ -238,13 +240,6 @@ do_release_step_rebranch() { git branch -d "${OLD_BRANCH}" } -do_release_step_0() { do_release_step_branch; } -do_release_step_1() { do_release_step_tag; } -do_release_step_2() { do_release_step_bump; } -do_release_step_3() { do_release_step_news; } -do_release_step_4() { do_release_step_package; } -do_release_step_5() { do_release_step_rebranch; } - do_release_setup() { echo "Starting $CMD for ${RELEASE_VERSION}..." [ "${RELEASE_TYPE}" ] || \ @@ -274,7 +269,7 @@ do_countdown() { do_branch() { do_release_setup local i= - for i in 0 2 5; do + for i in branch bump rebranch; do "do_release_step_${i}" done } @@ -284,7 +279,7 @@ do_release() { do_release_setup do_release_check local i= - for i in $(seq 0 5); do + for i in branch tag bump news package rebranch; do "do_release_step_${i}" done } diff --git a/tools/release/version.sh b/tools/release/version.sh index bef79d0..8c6da27 100755 --- a/tools/release/version.sh +++ b/tools/release/version.sh @@ -1,9 +1,20 @@ -#!/bin/sh -e +#!/bin/bash # version.sh: openocd version process automation # Copyright (C) 2009 by Zachary T Welch <zw...@su...> # Release under the GNU GPL v2 (or later versions). -source "tools/release/helpers.sh" +# FIXME Remove more bash-isms. Fix errors making "ash -e" lose. + +# NOTE Use with care! "RC" should only follow x.x.x, with +# vendor tags after that. Be traditional; avoid "rc0". + +# NOTE: This *ONLY* updates the "configure.in" version tag. +# It does not affect GIT tags. Use this script immediately +# before making a release, to remove the "-dev" tag and to +# update the version label. Then commit the change and tag +# that commit to match the version label. + +. "tools/release/helpers.sh" do_version_usage() { cat << USAGE @@ -15,6 +26,7 @@ Version Commands: bump tag <label> Add or bump a versioned tag (e.g. -rcN). bump final <label> Remove a versioned tag (e.g. -rcN). USAGE +# REVISIT ... "commit" not listed. } do_version_sed() { ----------------------------------------------------------------------- Summary of changes: tools/release.sh | 17 ++++++----------- tools/release/version.sh | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 13 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-11-04 19:30:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b8e7408b92dd8c1bd33b810ea3d6268fb8437c97 (commit) from 099e5b69201608b5f52a3e527c180aedb45db905 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b8e7408b92dd8c1bd33b810ea3d6268fb8437c97 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Nov 4 13:16:38 2009 +0100 configure: fix build problems with eCos Various include files require some other include files to be included first. Copied solution from net/if.h. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/configure.in b/configure.in index 1b86403..5772383 100644 --- a/configure.in +++ b/configure.in @@ -35,27 +35,78 @@ AC_TYPE_LONG_LONG_INT AC_SEARCH_LIBS([ioperm], [ioperm]) AC_SEARCH_LIBS([dlopen], [dl]) -AC_CHECK_HEADERS(arpa/inet.h) +AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS(arpa/inet.h, [], [], [dnl +#include <stdio.h> +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +]) AC_CHECK_HEADERS(elf.h) AC_CHECK_HEADERS(dirent.h) AC_CHECK_HEADERS(fcntl.h) -AC_CHECK_HEADERS(ifaddrs.h) +AC_CHECK_HEADERS(ifaddrs.h, [], [], [dnl +#include <stdio.h> +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +]) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(netdb.h) -AC_CHECK_HEADERS(netinet/in.h) -AC_CHECK_HEADERS(netinet/tcp.h) +AC_CHECK_HEADERS([netinet/in.h], [], [], [dnl +#include <stdio.h> +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +]) +AC_CHECK_HEADERS(netinet/tcp.h, [], [], [dnl +#include <stdio.h> +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +]) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/poll.h) AC_CHECK_HEADERS(sys/select.h) -AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(unistd.h) - AC_CHECK_HEADERS([net/if.h], [], [], [dnl #include <stdio.h> #ifdef STDC_HEADERS ----------------------------------------------------------------------- Summary of changes: configure.in | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 57 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-11-04 19:26:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 099e5b69201608b5f52a3e527c180aedb45db905 (commit) from 1b60ce8d5badb730739744323cb7cd4ac6c252af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 099e5b69201608b5f52a3e527c180aedb45db905 Author: Ãyvind Harboe <oyv...@zy...> Date: Wed Nov 4 19:25:20 2009 +0100 docs: add reference to git bisect docs on BUGS page Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/BUGS b/BUGS index d224177..0cb99ae 100644 --- a/BUGS +++ b/BUGS @@ -22,7 +22,8 @@ that may be important. - If the report is for a regression: - Include logs for both working and broken versions. - Find the precise version that caused the regression by binary search. - You can use "git bisect" to expedite this binary search. + You can use "git bisect" to expedite this binary search: + http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html If possible, please develop and attach a patch that helps to expose or solve the reported problem. See the PATCHES file for more information ----------------------------------------------------------------------- Summary of changes: BUGS | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-11-04 10:43:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 1b60ce8d5badb730739744323cb7cd4ac6c252af (commit) from f37c9b8d1560d0081e53c71c55113a3c9858011a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1b60ce8d5badb730739744323cb7cd4ac6c252af Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Nov 3 15:38:09 2009 +0100 target: 20 second timeout/megabyte for CRC check There was a fixed 20 second timeout which is too little for large, slow timeout checks. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 2b064f2..3275584 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2821,8 +2821,11 @@ int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t c buf_set_u32(reg_params[0].value, 0, 32, address); buf_set_u32(reg_params[1].value, 0, 32, count); + /* 20 second timeout/megabyte */ + int timeout = 20000 * (1 + (count / (1024*1024))); + if ((retval = target_run_algorithm(target, 0, NULL, 2, reg_params, - crc_algorithm->address, crc_algorithm->address + (sizeof(arm7_9_crc_code) - 8), 20000, &armv4_5_info)) != ERROR_OK) + crc_algorithm->address, crc_algorithm->address + (sizeof(arm7_9_crc_code) - 8), timeout, &armv4_5_info)) != ERROR_OK) { LOG_ERROR("error executing arm7_9 crc algorithm"); destroy_reg_param(®_params[0]); ----------------------------------------------------------------------- Summary of changes: src/target/arm7_9_common.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-11-03 14:19:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via f37c9b8d1560d0081e53c71c55113a3c9858011a (commit) from b5ce7fe8125da3044a2b4f2d0ef57af4d9eef5e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f37c9b8d1560d0081e53c71c55113a3c9858011a Author: Ãyvind Harboe <oyv...@zy...> Date: Tue Nov 3 12:28:00 2009 +0100 arm920t: memory writes were broken when MMU was disabled To support breakpoints, flush data cache line and invalidate instruction cache when 4 and 2 byte words are written. The previous code was trying to write directly to the physical memory, which was buggy and had a number of other situations that were not handled. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 2531d9b..a332db0 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -555,26 +555,25 @@ int arm920t_write_memory(struct target_s *target, uint32_t address, uint32_t siz if ((retval = arm7_9_write_memory(target, address, size, count, buffer)) != ERROR_OK) return retval; + /* This fn is used to write breakpoints, so we need to make sure that the + * datacache is flushed and the instruction cache is invalidated */ if (((size == 4) || (size == 2)) && (count == 1)) { if (arm920t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled) { - LOG_DEBUG("D-Cache enabled, writing through to main memory"); - uint32_t pa, cb, ap; - int type, domain; - - pa = armv4_5_mmu_translate_va(target, &arm920t->armv4_5_mmu, address, &type, &cb, &domain, &ap); - if (type == -1) - return ERROR_OK; - /* cacheable & bufferable means write-back region */ - if (cb == 3) - armv4_5_mmu_write_physical(target, &arm920t->armv4_5_mmu, pa, size, count, buffer); + LOG_DEBUG("D-Cache enabled, flush and invalidate cache line"); + /* MCR p15,0,Rd,c7,c10,2 */ + retval = arm920t_write_cp15_interpreted(target, 0xee070f5e, 0x0, address); + if (retval != ERROR_OK) + return retval; } if (arm920t->armv4_5_mmu.armv4_5_cache.i_cache_enabled) { LOG_DEBUG("I-Cache enabled, invalidating affected I-Cache line"); - arm920t_write_cp15_interpreted(target, 0xee070f35, 0x0, address); + retval = arm920t_write_cp15_interpreted(target, 0xee070f35, 0x0, address); + if (retval != ERROR_OK) + return retval; } } ----------------------------------------------------------------------- Summary of changes: src/target/arm920t.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Øyvind H. <go...@us...> - 2009-11-03 11:59:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b5ce7fe8125da3044a2b4f2d0ef57af4d9eef5e7 (commit) from e901cee72f0f8ec5fc3b15d4c5320c3da5dbd39c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b5ce7fe8125da3044a2b4f2d0ef57af4d9eef5e7 Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Nov 2 11:10:09 2009 +0100 target: require working area for physical/virtual addresses to be specified Fixed bug: if virtual address for working memory was not specified and MMU was enabled, then address 0 would be used. Require working address to be specified for both MMU enabled and disabled case. For some completely inexplicable reason this fixes the regression in svn 2646 for flash write in arm926ejs target. The logs showed that MMU was disabled in the case below: https://lists.berlios.de/pipermail/openocd-development/2009-November/011882.html Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/target.c b/src/target/target.c index 99b3d18..9289d37 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1045,13 +1045,29 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar { return retval; } + if (enabled) { - target->working_area = target->working_area_virt; - } - else + if (target->working_area_phys_spec) + { + LOG_DEBUG("MMU disabled, using physical address for working memory 0x%08x", (unsigned)target->working_area_phys); + target->working_area = target->working_area_phys; + } else + { + LOG_ERROR("No working memory available. Specify -work-area-phys to target."); + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; + } + } else { - target->working_area = target->working_area_phys; + if (target->working_area_virt_spec) + { + LOG_DEBUG("MMU enabled, using virtual address for working memory 0x%08x", (unsigned)target->working_area_virt); + target->working_area = target->working_area_virt; + } else + { + LOG_ERROR("No working memory available. Specify -work-area-virt to target."); + return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; + } } } @@ -1080,8 +1096,6 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar uint32_t first_free = target->working_area; uint32_t free_size = target->working_area_size; - LOG_DEBUG("allocating new working area"); - c = target->working_areas; while (c) { @@ -1098,6 +1112,8 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } + LOG_DEBUG("allocated new working area at address 0x%08x", (unsigned)first_free); + new_wa = malloc(sizeof(working_area_t)); new_wa->next = NULL; new_wa->size = size; @@ -3763,6 +3779,7 @@ static int target_configure(Jim_GetOptInfo *goi, target_t *target) return e; } target->working_area_virt = w; + target->working_area_virt_spec = true; } else { if (goi->argc != 0) { goto no_params; @@ -3780,6 +3797,7 @@ static int target_configure(Jim_GetOptInfo *goi, target_t *target) return e; } target->working_area_phys = w; + target->working_area_phys_spec = true; } else { if (goi->argc != 0) { goto no_params; diff --git a/src/target/target.h b/src/target/target.h index ef57837..c971f18 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -128,9 +128,11 @@ typedef struct target_s int reset_halt; /* attempt resetting the CPU into the halted mode? */ uint32_t working_area; /* working area (initialized RAM). Evaluated * upon first allocation from virtual/physical address. */ - uint32_t working_area_virt; /* virtual address */ - uint32_t working_area_phys; /* physical address */ - uint32_t working_area_size; /* size in bytes */ + bool working_area_virt_spec; /* virtual address specified? */ + uint32_t working_area_virt; /* virtual address */ + bool working_area_phys_spec; /* virtual address specified? */ + uint32_t working_area_phys; /* physical address */ + uint32_t working_area_size; /* size in bytes */ uint32_t backup_working_area; /* whether the content of the working area has to be preserved */ struct working_area_s *working_areas;/* list of allocated working areas */ enum target_debug_reason debug_reason;/* reason why the target entered debug state */ ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 30 ++++++++++++++++++++++++------ src/target/target.h | 8 +++++--- 2 files changed, 29 insertions(+), 9 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-11-02 04:57:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via e901cee72f0f8ec5fc3b15d4c5320c3da5dbd39c (commit) from 72210fe3a3bcdecbabca5c37d23fa6d548daf2d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e901cee72f0f8ec5fc3b15d4c5320c3da5dbd39c Author: Dimitar Dimitrov <di...@gm...> Date: Fri Oct 30 20:54:07 2009 +0200 FT2232: increase read retry counts This change is necessary to debug AT91SAM9260 on my PC with a FT2232H dongle. Signed-off-by: Dimitar Dimitrov <di...@gm...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index cf3fc01..e570cbe 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -71,6 +71,17 @@ /* this speed value tells that RTCK is requested */ #define RTCK_SPEED -1 +/* + * On my Athlon XP 1900+ EHCI host with FT2232H JTAG dongle I get read timeout + * errors with a retry count of 100. Increasing it solves the problem for me. + * - Dimitar + * + * FIXME There's likely an issue with the usb_read_timeout from libftdi. + * Fix that (libusb? kernel? libftdi? here?) and restore the retry count + * to something sane. + */ +#define LIBFTDI_READ_RETRY_COUNT 2000 + #ifndef BUILD_FT2232_HIGHSPEED #if BUILD_FT2232_FTD2XX == 1 enum { FT_DEVICE_2232H = 6, FT_DEVICE_4232H }; @@ -400,7 +411,7 @@ static int ft2232_read(uint8_t* buf, uint32_t size, uint32_t* bytes_read) #elif BUILD_FT2232_LIBFTDI == 1 int retval; - int timeout = 100; + int timeout = LIBFTDI_READ_RETRY_COUNT; *bytes_read = 0; while ((*bytes_read < size) && timeout--) @@ -418,9 +429,10 @@ static int ft2232_read(uint8_t* buf, uint32_t size, uint32_t* bytes_read) if (*bytes_read < size) { - LOG_ERROR("couldn't read the requested number of bytes from FT2232 device (%i < %i)", - (unsigned int)(*bytes_read), - (unsigned int)size); + LOG_ERROR("couldn't read enough bytes from " + "FT2232 device (%i < %i)", + (unsigned)*bytes_read, + (unsigned)size); return ERROR_JTAG_DEVICE_ERROR; } @@ -679,7 +691,8 @@ static int ft2232_send_and_recv(jtag_command_t* first, jtag_command_t* last) if (ft2232_expect_read) { - int timeout = 100; + /* FIXME this "timeout" is never changed ... */ + int timeout = LIBFTDI_READ_RETRY_COUNT; ft2232_buffer_size = 0; #ifdef _DEBUG_USB_IO_ @@ -709,16 +722,21 @@ static int ft2232_send_and_recv(jtag_command_t* first, jtag_command_t* last) if (ft2232_expect_read != ft2232_buffer_size) { - LOG_ERROR("ft2232_expect_read (%i) != ft2232_buffer_size (%i) (%i retries)", ft2232_expect_read, + LOG_ERROR("ft2232_expect_read (%i) != " + "ft2232_buffer_size (%i) " + "(%i retries)", + ft2232_expect_read, ft2232_buffer_size, - 100 - timeout); + LIBFTDI_READ_RETRY_COUNT - timeout); ft2232_debug_dump_buffer(); exit(-1); } #ifdef _DEBUG_USB_COMMS_ - LOG_DEBUG("read buffer (%i retries): %i bytes", 100 - timeout, ft2232_buffer_size); + LOG_DEBUG("read buffer (%i retries): %i bytes", + LIBFTDI_READ_RETRY_COUNT - timeout, + ft2232_buffer_size); ft2232_debug_dump_buffer(); #endif } ----------------------------------------------------------------------- Summary of changes: src/jtag/ft2232.c | 34 ++++++++++++++++++++++++++-------- 1 files changed, 26 insertions(+), 8 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-11-02 02:58:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 72210fe3a3bcdecbabca5c37d23fa6d548daf2d2 (commit) via 13e264426c5933ee3aa241c4f63feedf8f49b128 (commit) from 2120231afd710ce6720b82838810240195122b5a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 72210fe3a3bcdecbabca5c37d23fa6d548daf2d2 Author: David Brownell <dbr...@us...> Date: Sun Nov 1 17:54:47 2009 -0800 User's Guide: more init info, autoprobing, etc Mention the autoprobing as a tool that may be useful when figuring out how to set up; and add a section showing how to use that mechanism (with an example). Strengthen the differences between config and run stage descriptions; add a section for the latter. Mention Dragonite. Signed-off-by: David Brownell <dbr...@us...> diff --git a/doc/openocd.texi b/doc/openocd.texi index b91fb3b..2108f8e 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -725,6 +725,13 @@ than the target config file, as in the AT91SAM7X256 example. That's because there is no external memory (flash, DDR RAM), and the board differences are encapsulated by application code. +@item Maybe you don't know yet what your board looks like to JTAG. +Once you know the @file{interface.cfg} file to use, you may +need help from OpenOCD to discover what's on the board. +Once you find the TAPs, you can just search for appropriate +configuration files ... or write your own, from the bottom up. +@xref{Autoprobing}. + @item You can often reuse some standard config files but need to write a few new ones, probably a @file{board.cfg} file. You will be using commands described later in this User's Guide, @@ -1533,6 +1540,8 @@ may access or activate TAPs. After it leaves this stage, configuration commands may no longer be issued. +@section Entering the Run Stage + The first thing OpenOCD does after leaving the configuration stage is to verify that it can talk to the scan chain (list of TAPs) which has been configured. @@ -1545,10 +1554,18 @@ Common errors include using an initial JTAG speed that's too fast, and not providing the right IDCODE values for the TAPs on the scan chain. +Once OpenOCD has entered the run stage, a number of commands +become available. +A number of these relate to the debug targets you may have declared. +For example, the @command{mww} command will not be available until +a target has been successfuly instantiated. +If you want to use those commands, you may need to force +entry to the run stage. + @deffn {Config Command} init This command terminates the configuration stage and -enters the normal command mode. This can be useful to add commands to -the startup scripts and commands such as resetting the target, +enters the run stage. This helps when you need to have +the startup scripts manage tasks such as resetting the target, programming flash, etc. To reset the CPU upon startup, add "init" and "reset" at the end of the config script or at the end of the OpenOCD command line using the @option{-c} command line switch. @@ -2791,6 +2808,75 @@ for querying the state of the JTAG taps. @end quotation @end deffn +@anchor{Autoprobing} +@section Autoprobing +@cindex autoprobe +@cindex JTAG autoprobe + +TAP configuration is the first thing that needs to be done +after interface and reset configuration. Sometimes it's +hard finding out what TAPs exist, or how they are identified. +Vendor documentation is not always easy to find and use. + +To help you get past such problems, OpenOCD has a limited +@emph{autoprobing} ability to look at the scan chain, doing +a @dfn{blind interrogation} and then reporting the TAPs it finds. +To use this mechanism, start the OpenOCD server with only data +that configures your JTAG interface, and arranges to come up +with a slow clock (many devices don't support fast JTAG clocks +right when they come out of reset). + +For example, your @file{openocd.cfg} file might have: + +@example +source [find interface/olimex-arm-usb-tiny-h.cfg] +reset_config trst_and_srst +jtag_rclk 8 +@end example + +When you start the server without any TAPs configured, it will +attempt to autoconfigure the TAPs. There are two parts to this: + +@enumerate +@item @emph{TAP discovery} ... +After a JTAG reset (sometimes a system reset may be needed too), +each TAP's data registers will hold the contents of either the +IDCODE or BYPASS register. +If JTAG communication is working, OpenOCD will see each TAP, +and report what @option{-expected-id} to use with it. +@item @emph{IR Length discovery} ... +Unfortunately JTAG does not provide a reliable way to find out +the value of the @option{-irlen} parameter to use with a TAP +that is discovered. +If OpenOCD can discover the length of a TAP's instruction +register, it will report it. +Otherwise you may need to consult vendor documentation, such +as chip data sheets or BSDL files. +@end enumerate + +In many cases your board will have a simple scan chain with just +a single device. Here's what OpenOCD reported with one board +that's a bit more complex: + +@example +clock speed 8 kHz +There are no enabled taps. AUTO PROBING MIGHT NOT WORK!! +AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x2b900f0f ..." +AUTO auto1.tap - use "jtag newtap auto1 tap -expected-id 0x07926001 ..." +AUTO auto2.tap - use "jtag newtap auto2 tap -expected-id 0x0b73b02f ..." +AUTO auto0.tap - use "... -irlen 4" +AUTO auto1.tap - use "... -irlen 4" +AUTO auto2.tap - use "... -irlen 6" +no gdb ports allocated as no target has been specified +@end example + +Given that information, you should be able to either find some existing +config files to use, or create your own. If you create your own, you +would configure from the bottom up: first a @file{target.cfg} file +with these TAPs, any targets associated with them, and any on-chip +resources; then a @file{board.cfg} with off-chip resources, clocking, +and so forth. + @node CPU Configuration @chapter CPU Configuration @cindex GDB target @@ -2923,15 +3009,15 @@ At this writing, the supported CPU types and variants are: @itemize @bullet @item @code{arm11} -- this is a generation of ARMv6 cores -@item @code{arm720t} -- this is an ARMv4 core +@item @code{arm720t} -- this is an ARMv4 core with an MMU @item @code{arm7tdmi} -- this is an ARMv4 core -@item @code{arm920t} -- this is an ARMv5 core -@item @code{arm926ejs} -- this is an ARMv5 core +@item @code{arm920t} -- this is an ARMv5 core with an MMU +@item @code{arm926ejs} -- this is an ARMv5 core with an MMU @item @code{arm966e} -- this is an ARMv5 core @item @code{arm9tdmi} -- this is an ARMv4 core @item @code{avr} -- implements Atmel's 8-bit AVR instruction set. (Support for this is preliminary and incomplete.) -@item @code{cortex_a8} -- this is an ARMv7 core +@item @code{cortex_a8} -- this is an ARMv7 core with an MMU @item @code{cortex_m3} -- this is an ARMv7 core, supporting only the compact Thumb2 instruction set. It supports one variant: @itemize @minus @@ -2941,6 +3027,7 @@ SRST, to avoid a issue with clearing the debug registers. This is fixed in Fury Rev B, DustDevil Rev B, Tempest; these revisions will be detected and the normal reset behaviour used. @end itemize +@item @code{dragonite} -- resembles arm966e @item @code{fa526} -- resembles arm920 (w/o Thumb) @item @code{feroceon} -- resembles arm926 @item @code{mips_m4k} -- a MIPS core. This supports one variant: commit 13e264426c5933ee3aa241c4f63feedf8f49b128 Author: David Brownell <dbr...@us...> Date: Sun Nov 1 17:34:52 2009 -0800 doxygen: avoid most internals For some reason, all the interals are documented by default. This is wrong for two basic reasons:  - We need to focus on public interfaces, since those are the architectural interfaces and relationships.  - Since virtually nothing has doxygen support yet, this   maximizes the noise, and minimizes the usefulness of doxygen output. So don't expose so much by default. diff --git a/Doxyfile.in b/Doxyfile.in index 0b204a0..038f1e5 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -307,13 +307,13 @@ EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. -EXTRACT_STATIC = YES +EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. -EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_CLASSES = NO # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in ----------------------------------------------------------------------- Summary of changes: Doxyfile.in | 4 +- doc/openocd.texi | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 95 insertions(+), 8 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-11-01 16:02:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 2120231afd710ce6720b82838810240195122b5a (commit) from c352c96f74bd5d5c3a498805856e4c2e6145eb0a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2120231afd710ce6720b82838810240195122b5a Author: Freddie Chopin <fre...@op...> Date: Sun Nov 1 11:58:48 2009 +0100 remove "-ircapture 0x1 -irmask 0x1" from stm32.cfg Gets rid of the runtime warning "stm32.bs: nonstandard IR mask" [dbr...@us...: line lengths, note issue, section ref] Signed-off-by: David Brownell <dbr...@us...> diff --git a/tcl/target/stm32.cfg b/tcl/target/stm32.cfg index b5a8652..97d7678 100644 --- a/tcl/target/stm32.cfg +++ b/tcl/target/stm32.cfg @@ -40,10 +40,11 @@ if { [info exists CPUTAPID ] } { jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID if { [info exists BSTAPID ] } { + # FIXME this never gets used to override defaults... set _BSTAPID $BSTAPID } else { # See STM Document RM0008 - # Section 26.6.2 + # Section 29.6.2 # Low density devices, Rev A set _BSTAPID1 0x06412041 # Medium density devices, Rev A @@ -55,7 +56,9 @@ if { [info exists BSTAPID ] } { # Connectivity line devices, Rev A and Rev Z set _BSTAPID5 0x06418041 } -jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID1 -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 -expected-id $_BSTAPID4 -expected-id $_BSTAPID5 +jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \ + -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \ + -expected-id $_BSTAPID4 -expected-id $_BSTAPID5 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME ----------------------------------------------------------------------- Summary of changes: tcl/target/stm32.cfg | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-11-01 03:19:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c352c96f74bd5d5c3a498805856e4c2e6145eb0a (commit) from 0da0bfd40a0ba46a68a6b9db428700241d2700b1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c352c96f74bd5d5c3a498805856e4c2e6145eb0a Author: David Brownell <dbr...@us...> Date: Sat Oct 31 18:03:54 2009 -0700 arm9tdmi: more correct fix for vector_catch Just use the array of names we're given, ignoring indices. The "reserved means don't use" patch missed that change. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index e3c6ca3..9c90f00 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -1042,14 +1042,11 @@ static int handle_arm9tdmi_catch_vectors_command( embeddedice_store_reg(vector_catch); } - /* output current settings (skip RESERVED vector) */ - for (i = 0; i < 8; i++) - { - if (i != 5) - { - command_print(cmd_ctx, "%s: %s", arm9tdmi_vectors[i].name, - (vector_catch_value & (1 << i)) ? "catch" : "don't catch"); - } + /* output current settings */ + for (i = 0; arm9tdmi_vectors[i].name; i++) { + command_print(cmd_ctx, "%s: %s", arm9tdmi_vectors[i].name, + (vector_catch_value & arm9tdmi_vectors[i].value) + ? "catch" : "don't catch"); } return ERROR_OK; ----------------------------------------------------------------------- Summary of changes: src/target/arm9tdmi.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-31 19:13:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 0da0bfd40a0ba46a68a6b9db428700241d2700b1 (commit) from 81521064194bdd7f904bfbfd23b53a91d1a458b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0da0bfd40a0ba46a68a6b9db428700241d2700b1 Author: Freddie Chopin <fre...@op...> Date: Thu Oct 29 19:23:05 2009 +0100 target.cfg: use $_TARGETNAME for flash This gets rid of runtime warnings from the use of numbers. STM32 and LPC2103 were tested. Other LPC updates are the same, and so are safe. The CFI updates match other tested changes now in the tree. Signed-off-by: David Brownell <dbr...@us...> diff --git a/tcl/target/at91r40008.cfg b/tcl/target/at91r40008.cfg index fe755b4..eb6caba 100644 --- a/tcl/target/at91r40008.cfg +++ b/tcl/target/at91r40008.cfg @@ -45,7 +45,7 @@ $_TARGETNAME configure -event gdb-flash-erase-start { $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x3C000 -work-area-size 0x4000 -work-area-backup 0 -flash bank cfi 0x10000000 0x400000 2 2 0 +flash bank cfi 0x10000000 0x400000 2 2 $_TARGETNAME # For more information about the configuration files, take a look at: # openocd.texi diff --git a/tcl/target/epc9301.cfg b/tcl/target/epc9301.cfg index f3fe7eb..2b4155f 100644 --- a/tcl/target/epc9301.cfg +++ b/tcl/target/epc9301.cfg @@ -28,4 +28,4 @@ target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME #flash configuration #flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...] -flash bank cfi 0x60000000 0x1000000 2 2 0 +flash bank cfi 0x60000000 0x1000000 2 2 $_TARGETNAME diff --git a/tcl/target/lpc1768.cfg b/tcl/target/lpc1768.cfg index fbf7117..63ec1bb 100644 --- a/tcl/target/lpc1768.cfg +++ b/tcl/target/lpc1768.cfg @@ -44,7 +44,7 @@ $_TARGETNAME configure -event reset-init { # LPC1768 has 512kB of user-available FLASH (bootloader is located in separate dedicated region). # flash bank lpc1700 <base> <size> 0 0 <target#> <variant> <cclk> [calc_checksum] -flash bank lpc2000 0x0 0x80000 0 0 0 lpc1700 12000 calc_checksum +flash bank lpc2000 0x0 0x80000 0 0 $_TARGETNAME lpc1700 12000 calc_checksum # 4MHz / 6 = 666kHz, so use 500 jtag_khz 500 diff --git a/tcl/target/lpc2103.cfg b/tcl/target/lpc2103.cfg index 899ca23..1a88076 100644 --- a/tcl/target/lpc2103.cfg +++ b/tcl/target/lpc2103.cfg @@ -35,4 +35,4 @@ $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-s # 32kB of internal Flash, core clocked with 12MHz crystal # flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc_checksum] -flash bank lpc2000 0x0 0x8000 0 0 0 lpc2000_v2 12000 calc_checksum +flash bank lpc2000 0x0 0x8000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum diff --git a/tcl/target/lpc2124.cfg b/tcl/target/lpc2124.cfg index 9430c1b..61d411b 100644 --- a/tcl/target/lpc2124.cfg +++ b/tcl/target/lpc2124.cfg @@ -39,4 +39,4 @@ $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-s #flash bank <driver> <base> <size> <chip_width> <bus_width> -flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14745 calc_checksum +flash bank lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14745 calc_checksum diff --git a/tcl/target/lpc2129.cfg b/tcl/target/lpc2129.cfg index daaa8d5..5438fc3 100644 --- a/tcl/target/lpc2129.cfg +++ b/tcl/target/lpc2129.cfg @@ -38,4 +38,4 @@ target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAM $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0 #flash bank <driver> <base> <size> <chip_width> <bus_width> -flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum +flash bank lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum diff --git a/tcl/target/lpc2148.cfg b/tcl/target/lpc2148.cfg index e70947f..b502343 100644 --- a/tcl/target/lpc2148.cfg +++ b/tcl/target/lpc2148.cfg @@ -52,4 +52,4 @@ $_TARGETNAME configure -event reset-init { } # flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc_checksum] -flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 14765 calc_checksum +flash bank lpc2000 0x0 0x7d000 0 0 $_TARGETNAME lpc2000_v2 14765 calc_checksum diff --git a/tcl/target/lpc2294.cfg b/tcl/target/lpc2294.cfg index 399b11d..08fbf58 100644 --- a/tcl/target/lpc2294.cfg +++ b/tcl/target/lpc2294.cfg @@ -32,7 +32,7 @@ $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-s #flash configuration #flash bank lpc2000 <base> <size> 0 0 <target#> <variant> -flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum +flash bank lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum # For more information about the configuration files, take a look at: # openocd.texi diff --git a/tcl/target/lpc2378.cfg b/tcl/target/lpc2378.cfg index d34ffae..34b9963 100644 --- a/tcl/target/lpc2378.cfg +++ b/tcl/target/lpc2378.cfg @@ -43,7 +43,7 @@ $_TARGETNAME configure -event reset-init { # LPC2378 has 512kB of FLASH, but upper 8kB are occupied by bootloader. # After reset the chip uses its internal 4MHz RC oscillator #flash bank lpc2000 <base> <size> 0 0 <target#> <variant> -flash bank lpc2000 0x0 0x0007D000 0 0 0 lpc2000_v2 4000 calc_checksum +flash bank lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum # 4MHz / 6 = 666kHz, so use 500 jtag_khz 500 diff --git a/tcl/target/lpc2478.cfg b/tcl/target/lpc2478.cfg index 1d2058b..bf33ae0 100644 --- a/tcl/target/lpc2478.cfg +++ b/tcl/target/lpc2478.cfg @@ -43,7 +43,7 @@ $_TARGETNAME configure -event reset-init { # LPC2378 has 512kB of FLASH, but upper 8kB are occupied by bootloader. # After reset the chip uses its internal 4MHz RC oscillator. # flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc checksum] -flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 12000 calc_checksum +flash bank lpc2000 0x0 0x7D000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum # Try to use RCLK, if RCLK is not available use "normal" mode. 4MHz / 6 = 666kHz, so use 500. jtag_rclk 500 diff --git a/tcl/target/smdk6410.cfg b/tcl/target/smdk6410.cfg index 6ce07ca..7f15f8b 100644 --- a/tcl/target/smdk6410.cfg +++ b/tcl/target/smdk6410.cfg @@ -5,4 +5,4 @@ source [find target/samsung_s3c6410.cfg] -flash bank cfi 0x00000000 0x00100000 2 2 0 jedec_probe \ No newline at end of file +flash bank cfi 0x00000000 0x00100000 2 2 $_TARGETNAME jedec_probe diff --git a/tcl/target/stm32.cfg b/tcl/target/stm32.cfg index a37e733..b5a8652 100644 --- a/tcl/target/stm32.cfg +++ b/tcl/target/stm32.cfg @@ -62,7 +62,7 @@ target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNA $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 -flash bank stm32x 0 0 0 0 0 +flash bank stm32x 0 0 0 0 $_TARGETNAME # For more information about the configuration files, take a look at: # openocd.texi diff --git a/tcl/target/xba_revA3.cfg b/tcl/target/xba_revA3.cfg index 0595fa1..e1c8870 100644 --- a/tcl/target/xba_revA3.cfg +++ b/tcl/target/xba_revA3.cfg @@ -79,7 +79,7 @@ $_TARGETNAME configure -event reset-init { $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20010000 -work-area-size 0x8060 -work-area-backup 0 -flash bank cfi 0x50000000 0x400000 2 2 0 +flash bank cfi 0x50000000 0x400000 2 2 $_TARGETNAME init reset init ----------------------------------------------------------------------- Summary of changes: tcl/target/at91r40008.cfg | 2 +- tcl/target/epc9301.cfg | 2 +- tcl/target/lpc1768.cfg | 2 +- tcl/target/lpc2103.cfg | 2 +- tcl/target/lpc2124.cfg | 2 +- tcl/target/lpc2129.cfg | 2 +- tcl/target/lpc2148.cfg | 2 +- tcl/target/lpc2294.cfg | 2 +- tcl/target/lpc2378.cfg | 2 +- tcl/target/lpc2478.cfg | 2 +- tcl/target/smdk6410.cfg | 2 +- tcl/target/stm32.cfg | 2 +- tcl/target/xba_revA3.cfg | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-31 04:21:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 81521064194bdd7f904bfbfd23b53a91d1a458b8 (commit) from 54c3cab266d2437299a6a3ba27e9f028d97822fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 81521064194bdd7f904bfbfd23b53a91d1a458b8 Author: David Brownell <dbr...@us...> Date: Fri Oct 30 20:21:31 2009 -0700 NEWS: more info There were a few more changes worth mentioning, including support for more JTAG adapters, boundary scan improvements, another NAND driver, and the Win64 stuff. Signed-off-by: David Brownell <dbr...@us...> diff --git a/NEWS b/NEWS index 436dab7..2cf5d9f 100644 --- a/NEWS +++ b/NEWS @@ -5,12 +5,22 @@ other issues not mentioned here. JTAG Layer: FT2232H (high speed USB) support doesn't need separate configuration + New FT2232H JTAG adapters: Amontec, Olimex, Signalyzer New reset_config options for SRST gating the JTAG clock (or not) TAP declaration no longer requires ircapture and mask attributes - New "post-reset" event handler for TAP-invariant setup code + Scan chain setup should be more robust, with better diagnostics + New TAP events: + "post-reset" for TAP-invariant setup code (TAPs not usable yet) + "setup" for use once TAPs are addressable (e.g. with ICEpick) Overridable Tcl "init_reset" and "jtag_init" procedures + Simple "autoprobe" mechanism to help simplify server setup + +Boundary Scan: + SVF bugfixes ... parsing fixes, better STATE switch conformance + XSVF bugfixes ... be more correct, handle Xilinx tool output Target Layer: + Warn on use of obsolete numeric target IDs New commands for use with Cortex-M3 processors: "cortex_m3 disassemble" ... Thumb2 disassembly (UAL format) "cortex_m3 vector_catch" ... traps certain hardware faults @@ -18,20 +28,28 @@ Target Layer: If you're willing to help debug it VERY EARLY Cortex-A8 and ARMv7A support Updated BeagleBoard.org hardware support + you may need to explicitly "reset" after connect-to-Beagle New commands for use with XScale processors: "xscale vector_table" + ARM + bugfixes to single-stepping Thumb code + ETM: unavailable registers are not listed + ETB, ETM: report actual hardware status ARM9 name change: "arm9 vector_catch" not "arm9tdmi vector_catch" ARM11 single stepping support for i.MX31 bugfix for missing "arm11" prefix on "arm11 memwrite ..." - ETM support - Unavailable registers are not listed + GDB support + gdb_attach command is gone Flash Layer: The lpc2000 driver handles the new NXP LPC1700 (Cortex-M3) chips - New lpc2900 driver for NXP LPC2900 chips (ARM968 based) + New drivers: + lpc2900, for NXP LPC2900 chips (ARM968 based) + mx3_nand, for imx31 New "last" flag for NOR "flash erase_sector" and "flash protect" The "nand erase N" command now erases all of bank N + Speed up davinci_nand by about 3x Board, Target, and Interface Configuration Scripts: Amontec JTAGkey2 support @@ -48,6 +66,8 @@ Documentation: Notes on target source code changes that may help debugging Build and Release: + Clean builds on (32-bit) Cygwin + Clean builds on 64-bit MinGW For more details about what has changed since the last release, see the ChangeLog associated with this source archive. For older NEWS, ----------------------------------------------------------------------- Summary of changes: NEWS | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-31 01:29:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 54c3cab266d2437299a6a3ba27e9f028d97822fa (commit) from e8a5092f1e23cee70cf1c3565db2ca40a61a11af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 54c3cab266d2437299a6a3ba27e9f028d97822fa Author: David Brownell <dbr...@us...> Date: Fri Oct 30 17:29:38 2009 -0700 ARM926: fix arm926ejs_mmu() reading from bad pointer I'm suspecting this code can never have worked, since the original commit (svn #335) in early 2008. Fix is just copy/paste from another (working) function. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 53f7980..608a7ed 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -906,7 +906,9 @@ static int arm926ejs_virt2phys(struct target_s *target, uint32_t virtual, uint32 static int arm926ejs_mmu(struct target_s *target, int *enabled) { armv4_5_common_t *armv4_5 = target->arch_info; - arm926ejs_common_t *arm926ejs = armv4_5->arch_info; + arm7_9_common_t *arm7_9 = armv4_5->arch_info; + arm9tdmi_common_t *arm9tdmi = arm7_9->arch_info; + arm926ejs_common_t *arm926ejs = arm9tdmi->arch_info; if (target->state != TARGET_HALTED) { ----------------------------------------------------------------------- Summary of changes: src/target/arm926ejs.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Spencer O. <nt...@us...> - 2009-10-30 13:03:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via e8a5092f1e23cee70cf1c3565db2ca40a61a11af (commit) from a53c72cdab7ea14e4aa0526270febf15a7248759 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e8a5092f1e23cee70cf1c3565db2ca40a61a11af Author: Spencer Oliver <nt...@us...> Date: Fri Oct 30 11:59:57 2009 +0000 bin2char: for win32 set stdin/stdout to binary mode Signed-off-by: Spencer Oliver <nt...@us...> diff --git a/src/helper/bin2char.c b/src/helper/bin2char.c index 36198c7..5bb4a6d 100644 --- a/src/helper/bin2char.c +++ b/src/helper/bin2char.c @@ -21,6 +21,10 @@ #include <stdio.h> #include <stdlib.h> +#ifdef _WIN32 + #include <fcntl.h> +#endif + int main(int argc, char **argv) { int c; @@ -34,6 +38,12 @@ int main(int argc, char **argv) exit(1); } +#ifdef _WIN32 + /* for win32 set stdin/stdout to binary mode */ + _setmode(_fileno(stdin), _O_BINARY); + _setmode(_fileno(stdout), _O_BINARY); +#endif + n = 0; name = argv[1]; fprintf(stdout, "/* autogenerated from %s */\n", argv[0]); ----------------------------------------------------------------------- Summary of changes: src/helper/bin2char.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-29 23:39:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via a53c72cdab7ea14e4aa0526270febf15a7248759 (commit) via 517049dca50fa2af965b2ba9db43d50e65400c3f (commit) from 0c4d5b8b1f8da402a1de675ad4c2d479edf372b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a53c72cdab7ea14e4aa0526270febf15a7248759 Author: Michael Roth <mr...@ne...> Date: Thu Oct 29 14:24:28 2009 +0100 SVF: fix checking bit pattern against length The code works like follow (N = bit_len): N -1 %4 2<< -1 ~ (binary) -------------------------------------------------- 1 0 0 2 1 1111 1110 2 1 1 4 3 1111 1100 3 2 2 8 7 1111 1000 4 3 3 16 15 1111 0000 5 4 0 2 1 1111 1110 6 5 1 4 3 1111 1100 7 6 2 8 7 1111 1000 8 7 3 16 15 1111 0000 ... ... ... ... ... ... Addresses a bug reported by FangfangLi <ff...@sy...>. [dbr...@us...: fix spelling bug too] Signed-off-by: Michael Roth <mr...@ne...> Cc: FangfangLi <ff...@sy...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/svf/svf.c b/src/svf/svf.c index 276a374..9c597bf 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -685,9 +685,9 @@ static int svf_copy_hexstring_to_binary(char *str, uint8_t **bin, int orig_bit_l str_len--; // check valid - if (str_len > 0 || (ch & ~((1 << (4 - (bit_len % 4))) - 1)) != 0) + if (str_len > 0 || (ch & ~((2 << ((bit_len - 1) % 4)) - 1)) != 0) { - LOG_ERROR("value execede length"); + LOG_ERROR("value execeeds length"); return ERROR_FAIL; } commit 517049dca50fa2af965b2ba9db43d50e65400c3f Author: Dimitar Dimitrov <di...@gm...> Date: Thu Oct 29 15:39:03 2009 -0700 Olimex FT2232H JTAG adapters Add interface configs for two new high speed JTAG adapters from Olimex. They need some other speed related tweaks to work well at high speed. Signed-off-by: David Brownell <dbr...@us...> diff --git a/tcl/interface/olimex-arm-usb-ocd-h.cfg b/tcl/interface/olimex-arm-usb-ocd-h.cfg new file mode 100644 index 0000000..47daa92 --- /dev/null +++ b/tcl/interface/olimex-arm-usb-ocd-h.cfg @@ -0,0 +1,11 @@ +# +# Olimex ARM-USB-OCD-H +# +# http://www.olimex.com/dev/arm-usb-ocd.html +# + +interface ft2232 +ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H" +ft2232_layout olimex-jtag +ft2232_vid_pid 0x15ba 0x002b + diff --git a/tcl/interface/olimex-arm-usb-tiny-h.cfg b/tcl/interface/olimex-arm-usb-tiny-h.cfg new file mode 100644 index 0000000..b6aa952 --- /dev/null +++ b/tcl/interface/olimex-arm-usb-tiny-h.cfg @@ -0,0 +1,11 @@ +# +# Olimex ARM-USB-TINY-H +# +# http://www.olimex.com/dev/arm-usb-tiny-h.html +# + +interface ft2232 +ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H" +ft2232_layout olimex-jtag +ft2232_vid_pid 0x15ba 0x002a + ----------------------------------------------------------------------- Summary of changes: src/svf/svf.c | 4 ++-- tcl/interface/olimex-arm-usb-ocd-h.cfg | 11 +++++++++++ tcl/interface/olimex-arm-usb-tiny-h.cfg | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 tcl/interface/olimex-arm-usb-ocd-h.cfg create mode 100644 tcl/interface/olimex-arm-usb-tiny-h.cfg hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-29 20:43:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 0c4d5b8b1f8da402a1de675ad4c2d479edf372b8 (commit) from b628207ea6dd39280ebdd8b66a1ac869350c6d00 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0c4d5b8b1f8da402a1de675ad4c2d479edf372b8 Author: David Brownell <dbr...@us...> Date: Thu Oct 29 12:42:41 2009 -0700 XSVF: bugfix handling state paths Implement XSVF support for detailed state path transitions, by collecting sequences of XSTATE transitions into paths and then calling pathmove(). It seems that the Xilinx tools want to force state-by-state transitions instead of relying on the standardized SVF paths. Like maybe there are XSVF tools not implementing SVF paths, which are all that we support using svf_statemove(). So from IRPAUSE, instead of just issuing "XSTATE DRPAUSE" they will issue XSTATES for each intermediate state: first IREXIT2, then IRUPDATE, DRSELECT, DRCAPTURE, DREXIT1, and finally DRPAUSE. This works now. Handling of paths that go *through* reset is a trifle dodgey, but it should be safe. Tested-by: Wookey <wo...@wo...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index d00c47c..719470e 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -211,9 +211,16 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha int tdo_mismatch = 0; int result; int verbose = 1; - char* filename; + char *filename; - int runtest_requires_tck = 0; /* a flag telling whether to clock TCK during waits, or simply sleep, controled by virt2 */ + bool collecting_path = false; + tap_state_t path[XSTATE_MAX_PATH]; + unsigned pathlen = 0; + + /* a flag telling whether to clock TCK during waits, + * or simply sleep, controled by virt2 + */ + int runtest_requires_tck = 0; /* use NULL to indicate a "plain" xsvf file which accounts for @@ -263,9 +270,88 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha while (read(xsvf_fd, &opcode, 1) > 0) { - /* record the position of the just read opcode within the file */ + /* record the position of this opcode within the file */ file_offset = lseek(xsvf_fd, 0, SEEK_CUR) - 1; + /* maybe collect another state for a pathmove(); + * or terminate a path. + */ + if (collecting_path) { + tap_state_t mystate; + uint8_t uc; + + switch (opcode) { + case XCOMMENT: + /* ignore/show comments between XSTATE ops */ + break; + case XSTATE: + /* try to collect another transition */ + if (pathlen == XSTATE_MAX_PATH) { + LOG_ERROR("XSVF: path too long"); + do_abort = 1; + break; + } + + if (read(xsvf_fd, &uc, 1) < 0) + { + do_abort = 1; + break; + } + + mystate = xsvf_to_tap(uc); + path[pathlen++] = mystate; + + LOG_DEBUG("XSTATE 0x%02X %s", uc, + tap_state_name(mystate)); + + /* If path is incomplete, collect more */ + if (!svf_tap_state_is_stable(mystate)) + continue; + + /* Else execute the path transitions we've + * collected so far. + * + * NOTE: Punting on the saved path is not + * strictly correct, but we must to do this + * unless jtag_add_pathmove() stops rejecting + * paths containing RESET. This is probably + * harmless, since there aren't many options + * for going from a stable state to reset; + * at the worst, we may issue extra clocks + * once we get to RESET. + */ + if (mystate == TAP_RESET) { + LOG_WARNING("XSVF: dodgey RESET"); + path[0] = mystate; + } + + /* FALL THROUGH */ + default: + /* Execute the path we collected + * + * NOTE: OpenOCD requires something that XSVF + * doesn't: the last TAP state in the path + * must be stable. In practice, tools that + * create XSVF seem to follow that rule too. + */ + collecting_path = false; + + if (path[0] == TAP_RESET) + jtag_add_tlr(); + else + jtag_add_pathmove(pathlen, path); + + result = jtag_get_error(); + if (result != ERROR_OK) { + LOG_ERROR("XSVF: pathmove error %d", + result); + do_abort = 1; + break; + } + continue; + } + } + switch (opcode) { case XCOMPLETE: @@ -500,6 +586,12 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha LOG_DEBUG("XSTATE 0x%02X %s", uc, tap_state_name(mystate)); + if (mystate == TAP_INVALID) { + LOG_ERROR("XSVF: bad XSTATE %02x", uc); + do_abort = 1; + break; + } + /* NOTE: the current state is SVF-stable! */ /* no change == NOP */ @@ -518,19 +610,12 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha /* * A sequence of XSTATE transitions, each TAP - * state adjacent to the previous one. - * - * NOTE: OpenOCD requires something that XSVF - * doesn't: the last TAP state in the path - * must be stable. - * - * FIXME Implement path collection; submit via - * jtag_add_pathmove() after teaching it to - * report errors. + * state adjacent to the previous one. Start + * collecting them. */ - LOG_ERROR("XSVF: 'XSTATE %s' ... NYET", - tap_state_name(mystate)); - unsupported = 1; + collecting_path = true; + pathlen = 1; + path[0] = mystate; } break; ----------------------------------------------------------------------- Summary of changes: src/xsvf/xsvf.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 100 insertions(+), 15 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Zach W. <zw...@us...> - 2009-10-29 05:30:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The annotated tag, v0.3.0-rc0 has been created at f74fdc5e4afc94b65cba4b4c357f0e67cc9d185a (tag) tagging 70f735007d7b0f7ec9d269c4529d9f62c0eb779d (commit) replaces v0.2.0 tagged by Zachary T Welch on Wed Oct 28 21:23:17 2009 -0700 - Log ----------------------------------------------------------------- The openocd 0.3.0-rc0 release. David Brownell (59): Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Houston, we have Mirror! make OMAP5912 resets more reliable Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd Stop ignoring most scan chain validation errors prevent abort via polling during jtag_reset initial builds of OSK5912 boards need srst_pulls_trst minor JTAG init messaging tweaks add overridable Tcl "init_reset" make PXA255 targets enumerate sort-of-OK add documentation about reset customization tweak new "translating ..." text printf format warning fixes xscale minor cleanup xscale bugfix to handler loading xscale.c cleanup xscale_load_ic cleanup more xscale cleanup (mostly removing JTAG hooks) simplify XScale debug handler installation xscale: stackframe corruption bugfix cosmetic cleanup in TMS tables omap2420.cfg updates Fix problems building xscale_debug.S doc updates to match "help" better portability updates another portability update xscale: better fix for debug_handler.bin build tweak for bin2char Ignore two more generated files Ignore openocd.exe for "git status" Doc: jtag_init must validate scan chain too SVF/XSVF: comment and whitespace fixes jtag_add_statemove() always uses TLR to get to RESET davinci: add watchdog reset method SVF: better spec conformance for STATE switch XSVF: use svf_add_statemove() ETM: rename registers, doc tweaks have "reg" command print cache names too SVF: clean up, mostly for TAP state name handling jtag: clean up TAP state name handling arm9tdmi vector_catch: reserved means "don't use" xscale: always reload handler after reset JTAG: jtag_tap_init() bugfixes ARM: rename "arm9tdmi vector_catch" to "arm9 ..." minor fixes to TODO list JTAG: simple autoprobing Merge branch 'master' of ssh://dbr...@op.../gitroot/openocd/openocd ARM ADIv5: "dap info" gets more readable omap3530: target reset/init improvements PXA255: force reset config JTAG: "jtag newtap ..." cleanup ft2232: less noise with _DEBUG_JTAG_IO_ ARM926: remove exports and forward decls Cortex-M3: remove exports and forward decls Dean Glazeski (1): SDRAM and clock configuration for the SAM9-L9260 board from Olimex Franck HÃRÃSON (1): bugfix: stack corruption loading IHex images John Rigby (1): iMX25 target support Lennert Buytenhek (2): fix pass_condition() LE condition code check fix detection of PLD instructions Michael Roth (1): SVF: fix parsing hex strings containing leading '0' characters Nicolas Pitre (7): fix single step of bx instruction going into Thumb mode Ferocion: fix corruption of r0 when resuming Thumb mode ARM: call thumb_pass_branch_condition() only for actual branch opcodes ARM: allow proper single stepping of Thumb BL and BLX instructions ARM: fix Thumb mode handling when single-stepping register based branch insns ARM: fix target address when disassembling Thumb BLX ARM: fix single-step of Thumb unconditional branch Oleg Seiljus (2): Signalyzer: new config files Signalyzer: H2 and H4 support Rabeeh Khoury (1): Function to flash SheevaPlug u-boot sectors Redirect 'Slash' NIL (5): More MinGW C99 printf compliance safer conversion to HANDLER on MinGW-W64 corrective fix for MinGW GNU C99 printf compliance MinGW: use WinSock2 MinGW: always use "-D__USE_MINGW_ANSI_STDIO" Redirect \"Slash\" NIL (1): jim-eventloop for MinGW-w64 Spencer Oliver (1): Fix incorrect line endings Wookey (4): Fix reset delays and tinker with ID's Xilinx xcr3256.cfg basic config script Fw: [PATCH] OpenRD board configuration balloon3 board base config Yauheni Kaliuta (2): Do not replace virt2phys with the default one if it was assigned Cleanup: nuke trailling whitespaces Zachary T Welch (8): Improve Makefile rules for XScale debug handler; fixes 'make distcheck'. Improve .gitignore rules. Add git2cl from repo.or.cz as a submodule in tools/git2cl. Factor release version functions into new script. Factor version munging capabilities out of release.sh. Rewrite release script to use GIT. Add script to test the release process. The openocd 0.3.0-rc0 release. dbrownell (60): Doc update: mention how ARM's WFI instruction affects The "arm9tdmi.c" file is more of a generic ARM9 support file: Fix coredump seen in some code paths. Minor fixes to NAND code and docs Address codereview comment from Steve Grubb <sg...@re...>: Tweak TCL reset script ... mostly improving descriptions of Minor tweaks to description of JTAG adapter/dongle issues. Minor behavior fixes for the two JTAG reset events (C/internal, Style cleanup for the updated ft2232_add_pathmove(). Minor regression bugfix for the jtag_tap_handle_event() case Debug message updates: Update the User's Guide to cover the scan chain verification step Enhancement: stm32 flash protection error message Update the jtag-examine_chain() logic to verify that there's no Ensure that DaVinci chips can't start with a too-fast JTAG clock. Remove annoying end-of-line whitespace from most src/* Remove annoying end-of-line whitespace from tcl/* files Remove annoying end-of-line whitespace from doc/* files. Update presentation of TAP events and tap enable/disable. Make it easier to erase or protect through to the end Initial ETM cleanups. Most of these are cosmetic: Start cleaning up ETM register handling. On one ARM926 ETM+ETB When setting up an ETM, cache its ETM_CONFIG register. Then Start handling the (second) SRST stage of reset better: Update DM355 target config to know about ICEpick. Streamline Capture-IR handling and integrity test. Updates to the initial scanchain validation code: Diagnostics tweaks for jtag_examine_chain() failure paths. On DM355 EVM board, associate NAND chips with $_TARGETNAME Don't provide invalid OMAP5912 IR capture value/mask attributes Update FT2232 driver so that it reliably enters TAP_RESET. Add list of JTAG adapter drivers with TAP_RESET statemove bug. Shrink symbols exported from arm9tdmi.c and remove a forward ref. ETB: cleanup needless symbol exports and forward decls. ETM: fix build issue on MinGW. Doc updates: add section on target software changes, minor fixes Make "-expected-id 0" suppress warnings; not unlike it used to do. ARM11 command handling fixes Streamline Capture-IR validation code Remove annoying EOL whitespace (again, sigh). Minor ETB and ETM bugfixes and doc updates Get rid of needless OMAP and Davinci target config options Update the NEWS file to cover more of the user-visible changes. Minor cleanup to ARM926 debug entry: Add a new JTAG "setup" event; use for better DaVinci ICEpick support. Improve jtag_validate_ircapture() diagnostics. Add initial ".gitignore". Take "patches" out of .gitignore ... Win32 is case-crazy Dragonite target script Dragonite has the same EICE affliction as feroceon. Add basic support for DM6446 EVM board. Change version labels to work better with GIT Updates for "reset_config": Note bug in handling of variables through command line parameters. Remove pointless "target library" chapter. buildfix Remove much #ifdeffery around _DEBUG_JTAG_IO_ usage. Better fix for TAPs violating the JTAG spec for IR-Capture. Force sane SRST and TRST initialization Change most in-tree references from SVN to GIT. duane (2): Warning fix Crusty Code fixes from the tcl directory re-arragements mlu (24): Improved handling of instruction set state, helps for debugging Thumb state. Load PC with bit 0 set to 1 when resuming to say in Thumb instruction state. Report correct core instruction state for ARMv/A targets Fix argument passing in cortex_a8_write_cp. More CortexA8 debug register definitions. Cache invalidation when writing to memory Check return values to avoid infinite wait in loop on error. Definy symbolic values for VA to PA address translation operations Updated mode string list. Define debug_base, debug_ap, memory_ap in armv7a_common_t Use a variable armv7a->debug_base instead of hardedcoded OMAP3530_DEBUG_BASE Remove unused varables (moved to armv7a) Move Cortex A8 debug access initialisation from omap3530.cfg to cortex_a8.c Reduced sleep time after reset Avoid cache invalidation when writing to hardware debug registers Added CPUDBG_WCR_BASE define Add DSCR_DTR_RX_FULL bit define ARMv7A: Report fault status registers when in Abort state Added asser_reset and deassert_reset for cortex_a8 Added asser_reset and deassert_reset for cortex_a8 More error reporting in Cortex_a8 execute_opcode Make sure that DSCR_DTR_RX is not full before writing It is not possible to invalidate I-Cache on memory writes while the target is running Updated reset event handling in omap3530 cfg ntfreak (27): - fix small typo in documentation - disable using parport ppdev under win32 hosts - fix issue with reading device id, bug appeared when flash_address code was added David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: - add configure error if building parport interface under cygwin and sys/io.h missing - Bring all the ftdi names inline in the cfg scripts. scripts will now work for either ftd2xx or libftdi drivers. Gary Carlson [gca...@ca...]: - fix segfault introduced during cortex reg cleanup Ferdinand Postema [fer...@po...] David Brownell <da...@pa...>: David Brownell <da...@pa...>: Audrius UrmanaviÄius [did...@gm...]: Jonas Horberg [jho...@sa...] Jonas Horberg [jho...@sa...] - add cfg file for Amontec JTAGKey2 jtag interface David Brownell [da...@pa...]: Jonas Horberg [jho...@sa...]: - remove enable-ft2232-highspeed configure option, high speed ftdi support is now detected during the configure stage - fix build warnings - fix a regression when using cortex_m3 emulated dcc channel - fixes the incorrect info msg displayed during stellaris flash programming. - revert change made to sheevaplug.cfg in rev2573 - add missing svn props from previous commit - fix build issue under win32 (cygwin/msys) from svn r2746 oharboe (165): 1.54 snapshot David Brownell <da...@pa...> mention udev, and correct D2XX speed mentions Eclipse settings include charset. retire Eclipse settings, charset will be set elsewhere. print errno when parport fails to open. microscopic white space fixes microscopic whitespace cleanup added item to come up with slick new 32 bit jtag_add_xxx() API Andreas Fritiofson <and...@gm...> UTF8 fixes aduc flash problems have been resolved Stefano Voulaz <s.v...@pr...> first cut samsung_s3c2450 Jonathan Cameron <ji...@ca...> fix regression from 1836 when the reset_config command was removed from pxa270.cfg David Brownell <da...@pa...> fix warnings Ferdinand Postema <fer...@po...> fix cygwin warnings David Brownell <da...@pa...> thumb2 disassembly for Load byte, memory hints David Brownell <da...@pa...> thumb2 disassembly for Load halfword Andreas Fritiofson <and...@gm...> I noticed there are a few checks for (rt == 0xf) even though that case David Brownell <da...@pa...> Bugfix some instruction decoding ... I've crafted asm files David Brownell <da...@pa...> More instruction decoding fixes based on test cases, covering David Brownell <da...@pa...> More instruction decoding fixes: David Brownell <da...@pa...> More fixes from test cases: More instruction decoding fixes: David Brownell <da...@pa...> More testcase work: add "dummy" interface trick to the BUGS reporting suggestions Fix NPE in GDB_EVENT_END as logforwarding was not disabled early enough added note w/reference to discussion on whether or not arm11 code is broken or not. Ferdinand Postema <fer...@po...> cygwin 32 bit warning Xiaofan Chen <xia...@gm...> Add config file for TI-Luminary LM3S1968 chip and EK-LM3S1968 board michal smulski <mic...@oo...> arm11 target config files Xiaofan Chen <xia...@gm...> Split LM3S811 config file into target file and board file Piotr Ziecik <ko...@se...> Due to errors in chipselect management in davinci_nand driver David Brownell <da...@pa...> Several of the ARMv7M registers are 8 bits or less; don't David Brownell <da...@pa...> Clean up ARM7/ARM9 EmbeddedICE register handling ... don't use parallel David Brownell <da...@pa...> Add "cortex_m3 vector_catch" command and docs. One minor David Brownell <da...@pa...> Cleanup the Stellaris target configs: Brian Findlay <fin...@gm...> Board support for mini2440 (friendlyARM) samsung s3c2440 based board David Brownell <da...@pa...> Clean up some Cortex-M3 reset handling. David Brownell <da...@pa...>Fix some command helptext: David Brownell <da...@pa...>More Thumb2 disassembly: Piotr Ziecik <ko...@se...> This patch adds handling blank characters between hex digits in Florian Boor <flo...@ke...> fixes a segfault executing commands from the web interface using the Pieter Conradie <Pie...@ps...> Scripts for Atmel AT91SAM7S256 and AT91SAM9260 native line endings Pieter Conradie <Pie...@ps...> shuffle things around to the right spots. Should have been done in previous commit. Jonas Horberg <jho...@sa...> Steve Grubb <sg...@re...> fix various and sundry leaks add missing isblank() for eCos David Brownell Subset of Cortex-A8 support from Magnus: create an armv7a file David Brownell The rest of the Cortex-A8 support from Magnus: replace the previous use cortex_a8 instead of cortex_m3 Brian Findlay <fin...@gm...> finalize mini2440.cfg Audrius UrmanaviÄius <did...@gm...> Latest source (R2606) does not compile under Windows+Cygwin - fails with error about possibly uninitialized use of variable 'ch'. Michael Schwingen <rin...@di...> The attached patch adds a "xscale vector_table" command that allows to set Ferdinand Postema <fer...@po...> increase reset delay to fix regression from 2600 to 2604 Ferdinand Postema <fer...@po...> fix warnings strange.... the code build and links w/Linux GCC target but fails w/arm-elf. The code was clearly broken as it was missing two extern's in the .h file... Michael Schwingen <rin...@di...> a small CFI cleanup Michael Schwingen <rin...@di...> fix previous doc patch David Brownell <da...@pa...> Accomodate targets which don't support various target-specific David Brownell <da...@pa...> Some jtag_add_reset() cleanup: David Brownell <da...@pa...> More jtag_add_reset() cleanup: David Brownell <da...@pa...> More jtag_add_reset() cleanup: David Brownell <da...@pa...> Tweak disassembly commands: David Brownell <da...@pa...> Various updates to 0.3.0 NEWS David Brownell <da...@pa...> Clock updates/fixes for the Stellaris flash driver: Michael Schwingen <rin...@di...> news about xscale reduce arm11 output noise Remove bogus "BUG:". If the PC is pointing to an invalid instruction, then simulation will fail. This is expected. added missing check on jtag_execute David Brownell <da...@pa...> Fix segv in jtag_examine_chain(): exit loop on no-tap. Keep Matt Hsu <ma...@0x...> and Holger Hans Peter Freyther <ze...@se...> Before executing a new instruction wait for the previous Matt Hsu <ma...@0x...> Wait for the DTRRX to be full before reading it. Remove the trans_mode change as it is done in the mem_ap_read_atomic_u32 function. Matt Hsu <ma...@0x...> cortex_a8_exec_opcode is writing the ARM instruction into Matt Hsu <ma...@0x...> cortex-a8: Copy some more registers from the documentation Matt Hsu <ma...@0x...> and Holger Hans Peter Freyther <ze...@se...> Only dap_ap_select when we are going to do a memory access Matt Hsu <ma...@0x...> and Holger Hans Peter Freyther <ze...@se...> Print the value that the method didn't like Matt Hsu <ma...@0x...> and Holger Hans Peter Freyther <ze...@se...> cortex-a8: Wait for the CPU to be halted/started some arm11 stuff that isn't done yet. refactor arm simulator to allow arm11 code to use it as well - no observable changes otherwise. arm11 single stepping wip arm11 single stepping wip - at least we know the next PC now arm11 hardware step using simulation + breakpoint. Use "hardware_step enable" command to revert to hardware stepping. Ideally we could retire the "hardware_step enable" command once we no longer believe it to be necessary. David Brownell <da...@pa...> ARM disassembly support for about five dozen non-Thumb instructions David Brownell <da...@pa...> The Stellaris eval boards don't have TRST signals, so restore ICE watchpoint registers when the *last* software breakpoint is removed added arm11 timeout error messages David Brownell <da...@pa...> fix warnings David Brownell <da...@pa...> Be sure the built-in search paths always go *after* ones provided David Brownell <da...@pa...> start phasing out integers as target IDs David Brownell <da...@pa...> Minor doc updates: David Brownell <da...@pa...> Remove duplicate check for flash write status. David Brownell <da...@pa...> Fix Sandstorm revision checking: right bits, right value! Dirk Behme <dir...@go...> Fix typo in help text. It has to be 'production_test' instead of 'production' here. David Brownell <da...@pa...> Minor code bugfix: check right variable. Ferdinand Postema <fer...@po...> config script for the MMnet1001 module from Propox. Gary Carlson <gca...@ca...> config file David Claffey <dnc...@gm...> tested with the Atheros reference design "PB44" David Brownell David Claffey <dnc...@gm...> get rid of reset recursion David Brownell <da...@pa...> "set _TARGETNAME ..." cleanup Matt Hsu <ma...@0x...> Tidy up the bit-offset operation for DSCR register more debug output for breakpoints Matt Hsu <ma...@0x...> This patch simply enables the halting debug mode. set ARM mode using explicit command rather than soft_reset_halt which has lots of side effects. Dirk Behme <dir...@go...> Add default fall back freqency. Dirk Behme <dir...@go...> retire jtag_speed usage use "armv4_5 core_state arm" instead of soft_reset_halt, fewer side effects Mahr, Stefan <Ste...@sp...> removes the endianness swapping in mips_m4k.c Swapping is already done in target.c David Brownell <da...@pa...> David Brownell <da...@pa...> David Brownell <da...@pa...> David Brownell <da...@pa...> - Fix bug-in-waiting when adding more than one TAP event type Rolf Meeser <rol...@ya...> michal smulski <mic...@oo...> telo target/board scripts Alexei Babich <a.b...@re...> fix problems with unecessary tailend byte accesses. Use 16 bit access on tailend of a memory read if possible. Alexei Babich <a.b...@re...> imx31 nand flash controller support eol-style:native Nicolas Pitre <ni...@ca...> tighten error checking in bulk_write Alexei Babich <a.b...@re...> cleanup syntax error fix registering a target event twice caused infinite loop. Same bug as in jtag/core.c copy & pasted. do not use dynamically sized stack arrays, not compatible with embedded OS's spelling mistake Nicolas Pitre <ni...@ca...> Dragonite support Nicolas Pitre <ni...@ca...> put feroceon target definition at the end so to avoid a tap post reset event added. Allows omap3530 to send 100 runtest idle tickle's after a TAP_RESET. David Brownell <da...@pa...> some early todo items on run_algorithm David Brownell <da...@pa...> David Brownell <da...@pa...> Dirk Behme <dir...@go...> document post TAP reset event Magnus Lundin <lu...@ml...> Disable poll while core register initialization fix warning Rolf Meeser <rol...@ya...> warning fix in previous commit was wrong. target_code_size needs the real value later. fix email address error message upon recursive invocation of reset from reset event handlers added embedded ice programming while srst is asserted todo item fix bug when using 32 instead of 64 bit value in callback, caught by -Wall Rolf Meeser <rol...@ya...> adds flash support for NXP's LPC2900 family (ARM968E). srst_gates_jtag option. at91sam9260 needs retesting, and possibly srst_gates_jtag added to reset_config. Could i.MX27 be a case where srst does not pull trst, but really srst gates jtag clock? prefix zy1000_reboot command to avoid name conflicts michal smulski <mic...@oo...> fix regression in jtag_add_pathmove() which broke arm11 in r1825. Other uses of jtag_add_pathmove are svn + xsvf + xscale... remove unused externs Ethan Eade <et...@ev...> board config script for Cogent CSB732 i.MX35 (arm1136) Nico Coesel <nc...@de...> fix warnings. . I'm wondering why these When attaching GDB to OpenOCD, the target state is no longer affected. Try/catch scheme. Typed up the functionality and regression tested. Michael Hasselberg <mh...@op...> target configuration files for Toshiba TX09 familiy spelling fix if srst pulls trst, then set state to TAP_RESET. added t/nsrst_assert_width commands httpd smoketest info reentry assert handle single threading michal smulski <mic...@oo...> reset now works strip gdb config options stop using targetnum Introduced jtag_init and "jtag arp_init" to allow target scripts more control over how OpenOCD starts up and initializes the target. 1.55 snapshot Do not check ir capture if there is no IDCODE increase pause before reboot so web interface remains responsive when issuing a reboot of zy1000 add timeouts and fix syntax error handling of mrc/mcr commands. add timeouts and fix syntax error handling of mrc/mcr commands. remove recrusive reset invocation from reset init callback first stab at imx35 reset init script oyvind (2): Switch from svn to git version string handling. Sync with official Jim Tcl repository. zwelch (25): Bump minor version and add tag: Archive released NEWS file: NEWS -> NEWS-0.2.0 David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: David Brownell <da...@pa...>: Magnus Lundin <lu...@ml...>, Oyvind Harboe <oyv...@zy...>, David Brownell <da...@pa...>: Magnus Lundin <lu...@ml...>, Oyvind Harboe <oyv...@zy...>, David Brownell <da...@pa...>: michal smulski <mic...@oo...>: Fix release script bugs after experience from 0.2.0: Document and automate signature creation for the release archives. Add workaround to release script to update source code URL keyword. Improve release script version handling commands. Add numeric version tag support to release script. Improve release script version tag management commands. Update release process documentation. Ãyvind Harboe (52): Update copyright statements. Make it easier to sync with Jim Tcl Stop GDB when polling fails, srst assert or powerdropout is detected Add .project to .gitignore Testing committing changes to .gitignore to ignore more build output Added tip in documentation on how to translate quirky syntax Merge commit 'origin/master' ARM11 error checking Stop debug session if halt fails Supply default reset_config statement to make target scripts useful standalone and provide sensible default If halt times out, stop GDB. Allows e.g. manual reset via monitor commands. Merge commit 'origin/master' Fix bogus 'transfer errors' with arm11 'memwrite burst enable'. A regression introduced in b8103660fa36a77158bd77379572c09913d85c00 burst writes work fine. clean up junk. Fix warning and improve error message upon burst transfer failure Propagate wDTR/rDTR failure immediately, otherwise it's followed up by timeout errors. Retire arm11 no_increment. Intended for future expansion to read/write to ports. New arm11 commands would have to be added to exploit it. arm11 burst writes are now only enabled for writes larger than 1 word. Single word writes are frequently used from reset init scripts to non-memory peripherals. More error propagation fixes. Propagate error from assert, deassert and halt on tcl target object. arm11 seems to gate JTAG when srst is asserted Delete commented out code. Add a bit of error checking. Fix warning. Missing type for eCos. Retired gdb_attach. gdb-detach event covers this functionality. iMX target config script's ported from Freescale BSP. Work in progress on arm11 reset. Assert srst. S29WS-N CFI query fix is to try 0x555 if 0x55 fails. More svn to git version string fixes. Added 'unlock' option to flash write_image Added the faux flash driver and target. Used for testing. Removed unused interface_jtag_set_end_state and wrote down some notes on TCP/IP client/server scheme. eCos synthetic target updates. Defined target_write_memory() to be able to handle implementing breakpoints for read only ram(e.g. MMU write protected. First cut at implementing software breakpoints for mmu read only memory Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c Retire obsolete and superfluous implementations of virt2phys in each target. This is done in a polymorphic implementation in target.c Merge branch 'master' of ssh://go...@op.../gitroot/openocd/openocd into HEAD Added target_read/write_phys_memory() fn's. mdX/mwX commands updated to support phys flag to specify bypassing of MMU. add support for target_read/write_phys_memory callbacks. read/write physical target fn's retire obsolete mXY_phys commands. Handled by generic memory read/modify commands and target read/write physical memory callbacks. virt2phys is now implemented by target.c globally, retire target specific documentation. mww_phys retired. Replaced by generic mww phys in target.c disable ZY1000's UART forwarding test code. Embedded ICE version is now dumped with debug_level 1 mcr/mrc interface work. Implemented for arm926ejs and arm720t. mcr/mrc commands added. Remove debug output that could cause compile warnings. Improve help for arm9 vector_catch. vector_catch and watchpoint TODO items. check if mmu is enabled before using mmu code path fix syntax of mww phys. Idea for adding watchpoint masks. ----------------------------------------------------------------------- hooks/post-receive -- Main OpenOCD repository |
From: Zach W. <zw...@us...> - 2009-10-29 05:28:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b628207ea6dd39280ebdd8b66a1ac869350c6d00 (commit) via 70f735007d7b0f7ec9d269c4529d9f62c0eb779d (commit) from ce88e8adf7de87b0f2e5904c1f620e47774a0458 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b628207ea6dd39280ebdd8b66a1ac869350c6d00 Author: Zachary T Welch <zw...@su...> Date: Wed Oct 28 21:23:17 2009 -0700 Bump rc version and add -dev tag. Bump rc package version number: 0.3.0-rc0 -> 0.3.0-rc1 Add '-dev' version tag: 0.3.0-rc1 -> 0.3.0-rc1-dev diff --git a/configure.in b/configure.in index 6cdf2a4..1b86403 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT([openocd], [0.3.0-rc0], +AC_INIT([openocd], [0.3.0-rc1-dev], [OpenOCD Mailing List <ope...@li...>]) AC_CONFIG_SRCDIR([src/openocd.c]) commit 70f735007d7b0f7ec9d269c4529d9f62c0eb779d Author: Zachary T Welch <zw...@su...> Date: Wed Oct 28 21:23:17 2009 -0700 The openocd 0.3.0-rc0 release. Remove '-dev' version tag: 0.3.0-rc0-dev -> 0.3.0-rc0 diff --git a/configure.in b/configure.in index 99f97da..6cdf2a4 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT([openocd], [0.3.0-dev], +AC_INIT([openocd], [0.3.0-rc0], [OpenOCD Mailing List <ope...@li...>]) AC_CONFIG_SRCDIR([src/openocd.c]) ----------------------------------------------------------------------- Summary of changes: configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-28 19:10:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ce88e8adf7de87b0f2e5904c1f620e47774a0458 (commit) via 4d17541a2c46fe75fbdcdfdaa647c4a4327c6561 (commit) from 053a763aa61a801ac2259ee87aaed4cd140557d9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ce88e8adf7de87b0f2e5904c1f620e47774a0458 Author: David Brownell <dbr...@us...> Date: Wed Oct 28 10:53:11 2009 -0700 Cortex-M3: remove exports and forward decls Unneeded exports cause confusion about the module interfaces. Make most functions static, and fix some line-too-long issues. Delete some now-obviously-unused code. The forward decls are just code clutter; move their references later, after the normal declarations. (Or vice versa.) Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 5f5287a..1c59f02 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -40,66 +40,20 @@ #define ARRAY_SIZE(x) ((int)(sizeof(x)/sizeof((x)[0]))) -/* cli handling */ -int cortex_m3_register_commands(struct command_context_s *cmd_ctx); -int handle_cortex_m3_mask_interrupts_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); - /* forward declarations */ -void cortex_m3_enable_breakpoints(struct target_s *target); -void cortex_m3_enable_watchpoints(struct target_s *target); -int cortex_m3_target_create(struct target_s *target, Jim_Interp *interp); -int cortex_m3_init_target(struct command_context_s *cmd_ctx, struct target_s *target); -int cortex_m3_quit(void); -int cortex_m3_load_core_reg_u32(target_t *target, enum armv7m_regtype type, uint32_t num, uint32_t *value); -int cortex_m3_store_core_reg_u32(target_t *target, enum armv7m_regtype type, uint32_t num, uint32_t value); -int cortex_m3_target_request_data(target_t *target, uint32_t size, uint8_t *buffer); -int cortex_m3_examine(struct target_s *target); +static int cortex_m3_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint); +static int cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint); +static void cortex_m3_enable_watchpoints(struct target_s *target); +static int cortex_m3_store_core_reg_u32(target_t *target, + enum armv7m_regtype type, uint32_t num, uint32_t value); #ifdef ARMV7_GDB_HACKS extern uint8_t armv7m_gdb_dummy_cpsr_value[]; extern reg_t armv7m_gdb_dummy_cpsr_reg; #endif -target_type_t cortexm3_target = -{ - .name = "cortex_m3", - - .poll = cortex_m3_poll, - .arch_state = armv7m_arch_state, - - .target_request_data = cortex_m3_target_request_data, - - .halt = cortex_m3_halt, - .resume = cortex_m3_resume, - .step = cortex_m3_step, - - .assert_reset = cortex_m3_assert_reset, - .deassert_reset = cortex_m3_deassert_reset, - .soft_reset_halt = cortex_m3_soft_reset_halt, - - .get_gdb_reg_list = armv7m_get_gdb_reg_list, - - .read_memory = cortex_m3_read_memory, - .write_memory = cortex_m3_write_memory, - .bulk_write_memory = cortex_m3_bulk_write_memory, - .checksum_memory = armv7m_checksum_memory, - .blank_check_memory = armv7m_blank_check_memory, - - .run_algorithm = armv7m_run_algorithm, - - .add_breakpoint = cortex_m3_add_breakpoint, - .remove_breakpoint = cortex_m3_remove_breakpoint, - .add_watchpoint = cortex_m3_add_watchpoint, - .remove_watchpoint = cortex_m3_remove_watchpoint, - - .register_commands = cortex_m3_register_commands, - .target_create = cortex_m3_target_create, - .init_target = cortex_m3_init_target, - .examine = cortex_m3_examine, - .quit = cortex_m3_quit -}; - -int cortexm3_dap_read_coreregister_u32(swjdp_common_t *swjdp, uint32_t *value, int regnum) +static int cortexm3_dap_read_coreregister_u32(swjdp_common_t *swjdp, + uint32_t *value, int regnum) { int retval; uint32_t dcrdr; @@ -129,7 +83,8 @@ int cortexm3_dap_read_coreregister_u32(swjdp_common_t *swjdp, uint32_t *value, i return retval; } -int cortexm3_dap_write_coreregister_u32(swjdp_common_t *swjdp, uint32_t value, int regnum) +static int cortexm3_dap_write_coreregister_u32(swjdp_common_t *swjdp, + uint32_t value, int regnum) { int retval; uint32_t dcrdr; @@ -159,7 +114,8 @@ int cortexm3_dap_write_coreregister_u32(swjdp_common_t *swjdp, uint32_t value, i return retval; } -int cortex_m3_write_debug_halt_mask(target_t *target, uint32_t mask_on, uint32_t mask_off) +static int cortex_m3_write_debug_halt_mask(target_t *target, + uint32_t mask_on, uint32_t mask_off) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -174,7 +130,7 @@ int cortex_m3_write_debug_halt_mask(target_t *target, uint32_t mask_on, uint32_t return mem_ap_write_atomic_u32(swjdp, DCB_DHCSR, cortex_m3->dcb_dhcsr); } -int cortex_m3_clear_halt(target_t *target) +static int cortex_m3_clear_halt(target_t *target) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -193,7 +149,7 @@ int cortex_m3_clear_halt(target_t *target) return ERROR_OK; } -int cortex_m3_single_step_core(target_t *target) +static int cortex_m3_single_step_core(target_t *target) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -217,39 +173,7 @@ int cortex_m3_single_step_core(target_t *target) return ERROR_OK; } -int cortex_m3_exec_opcode(target_t *target,uint32_t opcode, int len /* MODE, r0_invalue, &r0_outvalue */) -{ - /* get pointers to arch-specific information */ - armv7m_common_t *armv7m = target->arch_info; - swjdp_common_t *swjdp = &armv7m->swjdp_info; - uint32_t savedram; - int retvalue; - - mem_ap_read_u32(swjdp, 0x20000000, &savedram); - mem_ap_write_u32(swjdp, 0x20000000, opcode); - cortexm3_dap_write_coreregister_u32(swjdp, 0x20000000, 15); - cortex_m3_single_step_core(target); - armv7m->core_cache->reg_list[15].dirty = armv7m->core_cache->reg_list[15].valid; - retvalue = mem_ap_write_atomic_u32(swjdp, 0x20000000, savedram); - - return retvalue; -} - -#if 0 -/* Enable interrupts */ -int cortex_m3_cpsie(target_t *target, uint32_t IF) -{ - return cortex_m3_exec_opcode(target, ARMV7M_T_CPSIE(IF), 2); -} - -/* Disable interrupts */ -int cortex_m3_cpsid(target_t *target, uint32_t IF) -{ - return cortex_m3_exec_opcode(target, ARMV7M_T_CPSID(IF), 2); -} -#endif - -int cortex_m3_endreset_event(target_t *target) +static int cortex_m3_endreset_event(target_t *target) { int i; uint32_t dcb_demcr; @@ -307,7 +231,7 @@ int cortex_m3_endreset_event(target_t *target) return ERROR_OK; } -int cortex_m3_examine_debug_reason(target_t *target) +static int cortex_m3_examine_debug_reason(target_t *target) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -336,7 +260,7 @@ int cortex_m3_examine_debug_reason(target_t *target) return ERROR_OK; } -int cortex_m3_examine_exception_reason(target_t *target) +static int cortex_m3_examine_exception_reason(target_t *target) { uint32_t shcsr, except_sr, cfsr = -1, except_ar = -1; @@ -386,7 +310,7 @@ int cortex_m3_examine_exception_reason(target_t *target) return ERROR_OK; } -int cortex_m3_debug_entry(target_t *target) +static int cortex_m3_debug_entry(target_t *target) { int i; uint32_t xPSR; @@ -462,7 +386,7 @@ int cortex_m3_debug_entry(target_t *target) return ERROR_OK; } -int cortex_m3_poll(target_t *target) +static int cortex_m3_poll(target_t *target) { int retval; enum target_state prev_target_state = target->state; @@ -539,7 +463,7 @@ int cortex_m3_poll(target_t *target) return ERROR_OK; } -int cortex_m3_halt(target_t *target) +static int cortex_m3_halt(target_t *target) { LOG_DEBUG("target->state: %s", target_state_name(target)); @@ -581,7 +505,7 @@ int cortex_m3_halt(target_t *target) return ERROR_OK; } -int cortex_m3_soft_reset_halt(struct target_s *target) +static int cortex_m3_soft_reset_halt(struct target_s *target) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -622,7 +546,21 @@ int cortex_m3_soft_reset_halt(struct target_s *target) return ERROR_OK; } -int cortex_m3_resume(struct target_s *target, int current, uint32_t address, int handle_breakpoints, int debug_execution) +static void cortex_m3_enable_breakpoints(struct target_s *target) +{ + breakpoint_t *breakpoint = target->breakpoints; + + /* set any pending breakpoints */ + while (breakpoint) + { + if (breakpoint->set == 0) + cortex_m3_set_breakpoint(target, breakpoint); + breakpoint = breakpoint->next; + } +} + +static int cortex_m3_resume(struct target_s *target, int current, + uint32_t address, int handle_breakpoints, int debug_execution) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -710,7 +648,8 @@ int cortex_m3_resume(struct target_s *target, int current, uint32_t address, int } /* int irqstepcount = 0; */ -int cortex_m3_step(struct target_s *target, int current, uint32_t address, int handle_breakpoints) +static int cortex_m3_step(struct target_s *target, int current, + uint32_t address, int handle_breakpoints) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -758,7 +697,7 @@ int cortex_m3_step(struct target_s *target, int current, uint32_t address, int h return ERROR_OK; } -int cortex_m3_assert_reset(target_t *target) +static int cortex_m3_assert_reset(target_t *target) { armv7m_common_t *armv7m = target->arch_info; cortex_m3_common_t *cortex_m3 = armv7m->arch_info; @@ -896,7 +835,7 @@ int cortex_m3_assert_reset(target_t *target) return ERROR_OK; } -int cortex_m3_deassert_reset(target_t *target) +static int cortex_m3_deassert_reset(target_t *target) { LOG_DEBUG("target->state: %s", target_state_name(target)); @@ -907,20 +846,8 @@ int cortex_m3_deassert_reset(target_t *target) return ERROR_OK; } -void cortex_m3_enable_breakpoints(struct target_s *target) -{ - breakpoint_t *breakpoint = target->breakpoints; - - /* set any pending breakpoints */ - while (breakpoint) - { - if (breakpoint->set == 0) - cortex_m3_set_breakpoint(target, breakpoint); - breakpoint = breakpoint->next; - } -} - -int cortex_m3_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint) +static int +cortex_m3_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint) { int retval; int fp_num = 0; @@ -990,7 +917,8 @@ int cortex_m3_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint) return ERROR_OK; } -int cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint) +static int +cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint) { int retval; /* get pointers to arch-specific information */ @@ -1046,7 +974,8 @@ int cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint return ERROR_OK; } -int cortex_m3_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint) +static int +cortex_m3_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1096,7 +1025,8 @@ int cortex_m3_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint) return ERROR_OK; } -int cortex_m3_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint) +static int +cortex_m3_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1124,7 +1054,8 @@ int cortex_m3_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoin return ERROR_OK; } -int cortex_m3_set_watchpoint(struct target_s *target, watchpoint_t *watchpoint) +static int +cortex_m3_set_watchpoint(struct target_s *target, watchpoint_t *watchpoint) { int dwt_num = 0; uint32_t mask, temp; @@ -1180,7 +1111,8 @@ int cortex_m3_set_watchpoint(struct target_s *target, watchpoint_t *watchpoint) } -int cortex_m3_unset_watchpoint(struct target_s *target, watchpoint_t *watchpoint) +static int +cortex_m3_unset_watchpoint(struct target_s *target, watchpoint_t *watchpoint) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1213,7 +1145,8 @@ int cortex_m3_unset_watchpoint(struct target_s *target, watchpoint_t *watchpoint return ERROR_OK; } -int cortex_m3_add_watchpoint(struct target_s *target, watchpoint_t *watchpoint) +static int +cortex_m3_add_watchpoint(struct target_s *target, watchpoint_t *watchpoint) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1241,7 +1174,8 @@ int cortex_m3_add_watchpoint(struct target_s *target, watchpoint_t *watchpoint) return ERROR_OK; } -int cortex_m3_remove_watchpoint(struct target_s *target, watchpoint_t *watchpoint) +static int +cortex_m3_remove_watchpoint(struct target_s *target, watchpoint_t *watchpoint) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1264,7 +1198,7 @@ int cortex_m3_remove_watchpoint(struct target_s *target, watchpoint_t *watchpoin return ERROR_OK; } -void cortex_m3_enable_watchpoints(struct target_s *target) +static void cortex_m3_enable_watchpoints(struct target_s *target) { watchpoint_t *watchpoint = target->watchpoints; @@ -1277,7 +1211,8 @@ void cortex_m3_enable_watchpoints(struct target_s *target) } } -int cortex_m3_load_core_reg_u32(struct target_s *target, enum armv7m_regtype type, uint32_t num, uint32_t * value) +static int cortex_m3_load_core_reg_u32(struct target_s *target, + enum armv7m_regtype type, uint32_t num, uint32_t * value) { int retval; /* get pointers to arch-specific information */ @@ -1340,7 +1275,8 @@ int cortex_m3_load_core_reg_u32(struct target_s *target, enum armv7m_regtype typ return ERROR_OK; } -int cortex_m3_store_core_reg_u32(struct target_s *target, enum armv7m_regtype type, uint32_t num, uint32_t value) +static int cortex_m3_store_core_reg_u32(struct target_s *target, + enum armv7m_regtype type, uint32_t num, uint32_t value) { int retval; uint32_t reg; @@ -1418,7 +1354,8 @@ int cortex_m3_store_core_reg_u32(struct target_s *target, enum armv7m_regtype ty return ERROR_OK; } -int cortex_m3_read_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +static int cortex_m3_read_memory(struct target_s *target, uint32_t address, + uint32_t size, uint32_t count, uint8_t *buffer) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1450,7 +1387,8 @@ int cortex_m3_read_memory(struct target_s *target, uint32_t address, uint32_t si return retval; } -int cortex_m3_write_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +static int cortex_m3_write_memory(struct target_s *target, uint32_t address, + uint32_t size, uint32_t count, uint8_t *buffer) { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; @@ -1480,23 +1418,25 @@ int cortex_m3_write_memory(struct target_s *target, uint32_t address, uint32_t s return retval; } -int cortex_m3_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, uint8_t *buffer) +static int cortex_m3_bulk_write_memory(target_t *target, uint32_t address, + uint32_t count, uint8_t *buffer) { return cortex_m3_write_memory(target, address, 4, count, buffer); } -void cortex_m3_build_reg_cache(target_t *target) +static void cortex_m3_build_reg_cache(target_t *target) { armv7m_build_reg_cache(target); } -int cortex_m3_init_target(struct command_context_s *cmd_ctx, struct target_s *target) +static int cortex_m3_init_target(struct command_context_s *cmd_ctx, + struct target_s *target) { cortex_m3_build_reg_cache(target); return ERROR_OK; } -int cortex_m3_examine(struct target_s *target) +static int cortex_m3_examine(struct target_s *target) { int retval; uint32_t cpuid, fpcr, dwtcr, ictr; @@ -1560,13 +1500,12 @@ int cortex_m3_examine(struct target_s *target) return ERROR_OK; } -int cortex_m3_quit(void) +static int cortex_m3_quit(void) { - return ERROR_OK; } -int cortex_m3_dcc_read(swjdp_common_t *swjdp, uint8_t *value, uint8_t *ctrl) +static int cortex_m3_dcc_read(swjdp_common_t *swjdp, uint8_t *value, uint8_t *ctrl) { uint16_t dcrdr; @@ -1587,7 +1526,8 @@ int cortex_m3_dcc_read(swjdp_common_t *swjdp, uint8_t *value, uint8_t *ctrl) return ERROR_OK; } -int cortex_m3_target_request_data(target_t *target, uint32_t size, uint8_t *buffer) +static int cortex_m3_target_request_data(target_t *target, + uint32_t size, uint8_t *buffer) { armv7m_common_t *armv7m = target->arch_info; swjdp_common_t *swjdp = &armv7m->swjdp_info; @@ -1604,7 +1544,7 @@ int cortex_m3_target_request_data(target_t *target, uint32_t size, uint8_t *buff return ERROR_OK; } -int cortex_m3_handle_target_request(void *priv) +static int cortex_m3_handle_target_request(void *priv) { target_t *target = priv; if (!target_was_examined(target)) @@ -1642,7 +1582,8 @@ int cortex_m3_handle_target_request(void *priv) return ERROR_OK; } -int cortex_m3_init_arch_info(target_t *target, cortex_m3_common_t *cortex_m3, jtag_tap_t *tap) +static int cortex_m3_init_arch_info(target_t *target, + cortex_m3_common_t *cortex_m3, jtag_tap_t *tap) { int retval; armv7m_common_t *armv7m; @@ -1689,7 +1630,7 @@ int cortex_m3_init_arch_info(target_t *target, cortex_m3_common_t *cortex_m3, jt return ERROR_OK; } -int cortex_m3_target_create(struct target_s *target, Jim_Interp *interp) +static int cortex_m3_target_create(struct target_s *target, Jim_Interp *interp) { cortex_m3_common_t *cortex_m3 = calloc(1,sizeof(cortex_m3_common_t)); @@ -1810,30 +1751,9 @@ write: return ERROR_OK; } -int cortex_m3_register_commands(struct command_context_s *cmd_ctx) -{ - int retval; - command_t *cortex_m3_cmd; - - retval = armv7m_register_commands(cmd_ctx); - - cortex_m3_cmd = register_command(cmd_ctx, NULL, "cortex_m3", - NULL, COMMAND_ANY, "cortex_m3 specific commands"); - - register_command(cmd_ctx, cortex_m3_cmd, "disassemble", - handle_cortex_m3_disassemble_command, COMMAND_EXEC, - "disassemble Thumb2 instructions <address> [<count>]"); - register_command(cmd_ctx, cortex_m3_cmd, "maskisr", - handle_cortex_m3_mask_interrupts_command, COMMAND_EXEC, - "mask cortex_m3 interrupts ['on'|'off']"); - register_command(cmd_ctx, cortex_m3_cmd, "vector_catch", - handle_cortex_m3_vector_catch_command, COMMAND_EXEC, - "catch hardware vectors ['all'|'none'|<list>]"); - - return retval; -} - -int handle_cortex_m3_mask_interrupts_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int +handle_cortex_m3_mask_interrupts_command(struct command_context_s *cmd_ctx, + char *cmd, char **args, int argc) { target_t *target = get_current_target(cmd_ctx); armv7m_common_t *armv7m = target->arch_info; @@ -1866,3 +1786,66 @@ int handle_cortex_m3_mask_interrupts_command(struct command_context_s *cmd_ctx, return ERROR_OK; } + +static int cortex_m3_register_commands(struct command_context_s *cmd_ctx) +{ + int retval; + command_t *cortex_m3_cmd; + + retval = armv7m_register_commands(cmd_ctx); + + cortex_m3_cmd = register_command(cmd_ctx, NULL, "cortex_m3", + NULL, COMMAND_ANY, "cortex_m3 specific commands"); + + register_command(cmd_ctx, cortex_m3_cmd, "disassemble", + handle_cortex_m3_disassemble_command, COMMAND_EXEC, + "disassemble Thumb2 instructions <address> [<count>]"); + register_command(cmd_ctx, cortex_m3_cmd, "maskisr", + handle_cortex_m3_mask_interrupts_command, COMMAND_EXEC, + "mask cortex_m3 interrupts ['on'|'off']"); + register_command(cmd_ctx, cortex_m3_cmd, "vector_catch", + handle_cortex_m3_vector_catch_command, COMMAND_EXEC, + "catch hardware vectors ['all'|'none'|<list>]"); + + return retval; +} + +target_type_t cortexm3_target = +{ + .name = "cortex_m3", + + .poll = cortex_m3_poll, + .arch_state = armv7m_arch_state, + + .target_request_data = cortex_m3_target_request_data, + + .halt = cortex_m3_halt, + .resume = cortex_m3_resume, + .step = cortex_m3_step, + + .assert_reset = cortex_m3_assert_reset, + .deassert_reset = cortex_m3_deassert_reset, + .soft_reset_halt = cortex_m3_soft_reset_halt, + + .get_gdb_reg_list = armv7m_get_gdb_reg_list, + + .read_memory = cortex_m3_read_memory, + .write_memory = cortex_m3_write_memory, + .bulk_write_memory = cortex_m3_bulk_write_memory, + .checksum_memory = armv7m_checksum_memory, + .blank_check_memory = armv7m_blank_check_memory, + + .run_algorithm = armv7m_run_algorithm, + + .add_breakpoint = cortex_m3_add_breakpoint, + .remove_breakpoint = cortex_m3_remove_breakpoint, + .add_watchpoint = cortex_m3_add_watchpoint, + .remove_watchpoint = cortex_m3_remove_watchpoint, + + .register_commands = cortex_m3_register_commands, + .target_create = cortex_m3_target_create, + .init_target = cortex_m3_init_target, + .examine = cortex_m3_examine, + .quit = cortex_m3_quit +}; + diff --git a/src/target/cortex_m3.h b/src/target/cortex_m3.h index 4e8cd11..f4cefa7 100644 --- a/src/target/cortex_m3.h +++ b/src/target/cortex_m3.h @@ -29,9 +29,7 @@ #include "register.h" #include "target.h" #include "armv7m.h" -//#include "arm_adi_v5.h" -extern char* cortex_m3_state_strings[]; #define CORTEX_M3_COMMON_MAGIC 0x1A451A45 @@ -167,33 +165,7 @@ typedef struct cortex_m3_common_s uint32_t *intsetenable; armv7m_common_t armv7m; -// swjdp_common_t swjdp_info; void *arch_info; } cortex_m3_common_t; -extern void cortex_m3_build_reg_cache(target_t *target); - -int cortex_m3_poll(target_t *target); -int cortex_m3_halt(target_t *target); -int cortex_m3_resume(struct target_s *target, int current, uint32_t address, int handle_breakpoints, int debug_execution); -int cortex_m3_step(struct target_s *target, int current, uint32_t address, int handle_breakpoints); - -int cortex_m3_assert_reset(target_t *target); -int cortex_m3_deassert_reset(target_t *target); -int cortex_m3_soft_reset_halt(struct target_s *target); - -int cortex_m3_read_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); -int cortex_m3_write_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); -int cortex_m3_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, uint8_t *buffer); - -int cortex_m3_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint); -int cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint); -int cortex_m3_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint); -int cortex_m3_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint); -int cortex_m3_add_watchpoint(struct target_s *target, watchpoint_t *watchpoint); -int cortex_m3_remove_watchpoint(struct target_s *target, watchpoint_t *watchpoint); - -//extern int cortex_m3_register_commands(struct command_context_s *cmd_ctx); -extern int cortex_m3_init_arch_info(target_t *target, cortex_m3_common_t *cortex_m3, jtag_tap_t *tap); - #endif /* CORTEX_M3_H */ commit 4d17541a2c46fe75fbdcdfdaa647c4a4327c6561 Author: David Brownell <dbr...@us...> Date: Wed Oct 28 10:42:23 2009 -0700 ARM926: remove exports and forward decls Unneeded exports cause confusion about the module interfaces. Only the Feroceon code builds on this, so only routines it reuses should be public.. Make most remaining functions static, and fix some of the line-too-long issues. The forward decls are just code clutter; move their references later, after the normal declarations. Turns out we don't need even one forward declaration in this file. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index ef9a494..53f7980 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -33,94 +33,8 @@ #define _DEBUG_INSTRUCTION_EXECUTION_ #endif -/* cli handling */ -int arm926ejs_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int arm926ejs_handle_cache_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); - -int arm926ejs_handle_read_cache_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int arm926ejs_handle_read_mmu_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); - -/* forward declarations */ -int arm926ejs_target_create(struct target_s *target, Jim_Interp *interp); -int arm926ejs_init_target(struct command_context_s *cmd_ctx, struct target_s *target); -int arm926ejs_quit(void); - -int arm926ejs_read_phys_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); -int arm926ejs_write_phys_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); - -static int arm926ejs_virt2phys(struct target_s *target, uint32_t virtual, uint32_t *physical); -static int arm926ejs_mmu(struct target_s *target, int *enabled); - -int arm926ejs_cp15_read(target_t *target, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value); -int arm926ejs_cp15_write(target_t *target, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value); - -static int arm926ejs_mrc(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value) -{ - if (cpnum!=15) - { - LOG_ERROR("Only cp15 is supported"); - return ERROR_FAIL; - } - return arm926ejs_cp15_read(target, op1, op2, CRn, CRm, value); -} - -static int arm926ejs_mcr(target_t *target, int cpnum, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value) -{ - if (cpnum!=15) - { - LOG_ERROR("Only cp15 is supported"); - return ERROR_FAIL; - } - return arm926ejs_cp15_write(target, op1, op2, CRn, CRm, value); -} - -target_type_t arm926ejs_target = -{ - .name = "arm926ejs", - - .poll = arm7_9_poll, - .arch_state = arm926ejs_arch_state, - - .target_request_data = arm7_9_target_request_data, - - .halt = arm7_9_halt, - .resume = arm7_9_resume, - .step = arm7_9_step, - - .assert_reset = arm7_9_assert_reset, - .deassert_reset = arm7_9_deassert_reset, - .soft_reset_halt = arm926ejs_soft_reset_halt, - - .get_gdb_reg_list = armv4_5_get_gdb_reg_list, - - .read_memory = arm7_9_read_memory, - .write_memory = arm926ejs_write_memory, - .bulk_write_memory = arm7_9_bulk_write_memory, - .checksum_memory = arm7_9_checksum_memory, - .blank_check_memory = arm7_9_blank_check_memory, - - .run_algorithm = armv4_5_run_algorithm, - - .add_breakpoint = arm7_9_add_breakpoint, - .remove_breakpoint = arm7_9_remove_breakpoint, - .add_watchpoint = arm7_9_add_watchpoint, - .remove_watchpoint = arm7_9_remove_watchpoint, - - .register_commands = arm926ejs_register_commands, - .target_create = arm926ejs_target_create, - .init_target = arm926ejs_init_target, - .examine = arm9tdmi_examine, - .quit = arm926ejs_quit, - .virt2phys = arm926ejs_virt2phys, - .mmu = arm926ejs_mmu, - - .read_phys_memory = arm926ejs_read_phys_memory, - .write_phys_memory = arm926ejs_write_phys_memory, - .mrc = arm926ejs_mrc, - .mcr = arm926ejs_mcr, -}; - -int arm926ejs_catch_broken_irscan(uint8_t *captured, void *priv, scan_field_t *field) +static int arm926ejs_catch_broken_irscan(uint8_t *captured, void *priv, + scan_field_t *field) { /* FIX!!!! this code should be reenabled. For now it does not check * the queue...*/ @@ -144,7 +58,8 @@ int arm926ejs_catch_broken_irscan(uint8_t *captured, void *priv, scan_field_t *f #define ARM926EJS_CP15_ADDR(opcode_1, opcode_2, CRn, CRm) ((opcode_1 << 11) | (opcode_2 << 8) | (CRn << 4) | (CRm << 0)) -int arm926ejs_cp15_read(target_t *target, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value) +static int arm926ejs_cp15_read(target_t *target, uint32_t op1, uint32_t op2, + uint32_t CRn, uint32_t CRm, uint32_t *value) { int retval = ERROR_OK; armv4_5_common_t *armv4_5 = target->arch_info; @@ -226,7 +141,18 @@ int arm926ejs_cp15_read(target_t *target, uint32_t op1, uint32_t op2, uint32_t C return ERROR_OK; } -int arm926ejs_cp15_write(target_t *target, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value) +static int arm926ejs_mrc(target_t *target, int cpnum, uint32_t op1, + uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value) +{ + if (cpnum != 15) { + LOG_ERROR("Only cp15 is supported"); + return ERROR_FAIL; + } + return arm926ejs_cp15_read(target, op1, op2, CRn, CRm, value); +} + +static int arm926ejs_cp15_write(target_t *target, uint32_t op1, uint32_t op2, + uint32_t CRn, uint32_t CRm, uint32_t value) { int retval = ERROR_OK; armv4_5_common_t *armv4_5 = target->arch_info; @@ -306,6 +232,16 @@ int arm926ejs_cp15_write(target_t *target, uint32_t op1, uint32_t op2, uint32_t return ERROR_OK; } +static int arm926ejs_mcr(target_t *target, int cpnum, uint32_t op1, + uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t value) +{ + if (cpnum != 15) { + LOG_ERROR("Only cp15 is supported"); + return ERROR_FAIL; + } + return arm926ejs_cp15_write(target, op1, op2, CRn, CRm, value); +} + static int arm926ejs_examine_debug_reason(target_t *target) { armv4_5_common_t *armv4_5 = target->arch_info; @@ -410,7 +346,7 @@ static int arm926ejs_examine_debug_reason(target_t *target) return ERROR_OK; } -uint32_t arm926ejs_get_ttb(target_t *target) +static uint32_t arm926ejs_get_ttb(target_t *target) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -425,7 +361,8 @@ uint32_t arm926ejs_get_ttb(target_t *target) return ttb; } -void arm926ejs_disable_mmu_caches(target_t *target, int mmu, int d_u_cache, int i_cache) +static void arm926ejs_disable_mmu_caches(target_t *target, int mmu, + int d_u_cache, int i_cache) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -476,7 +413,8 @@ void arm926ejs_disable_mmu_caches(target_t *target, int mmu, int d_u_cache, int arm926ejs->write_cp15(target, 0, 0, 1, 0, cp15_control); } -void arm926ejs_enable_mmu_caches(target_t *target, int mmu, int d_u_cache, int i_cache) +static void arm926ejs_enable_mmu_caches(target_t *target, int mmu, + int d_u_cache, int i_cache) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -500,7 +438,7 @@ void arm926ejs_enable_mmu_caches(target_t *target, int mmu, int d_u_cache, int i arm926ejs->write_cp15(target, 0, 0, 1, 0, cp15_control); } -void arm926ejs_post_debug_entry(target_t *target) +static void arm926ejs_post_debug_entry(target_t *target) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -542,7 +480,7 @@ void arm926ejs_post_debug_entry(target_t *target) arm926ejs->write_cp15(target, 7, 0, 15, 0, cache_dbg_ctrl); } -void arm926ejs_pre_restore_context(target_t *target) +static void arm926ejs_pre_restore_context(target_t *target) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -563,7 +501,11 @@ void arm926ejs_pre_restore_context(target_t *target) arm926ejs->write_cp15(target, 7, 0, 15, 0, cache_dbg_ctrl); } -int arm926ejs_get_arch_pointers(target_t *target, armv4_5_common_t **armv4_5_p, arm7_9_common_t **arm7_9_p, arm9tdmi_common_t **arm9tdmi_p, arm926ejs_common_t **arm926ejs_p) +static int arm926ejs_get_arch_pointers(target_t *target, + armv4_5_common_t **armv4_5_p, + arm7_9_common_t **arm7_9_p, + arm9tdmi_common_t **arm9tdmi_p, + arm926ejs_common_t **arm926ejs_p) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9; @@ -702,7 +644,8 @@ int arm926ejs_soft_reset_halt(struct target_s *target) return target_call_event_callbacks(target, TARGET_EVENT_HALTED); } -int arm926ejs_write_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +int arm926ejs_write_memory(struct target_s *target, uint32_t address, + uint32_t size, uint32_t count, uint8_t *buffer) { int retval; armv4_5_common_t *armv4_5 = target->arch_info; @@ -765,7 +708,9 @@ int arm926ejs_write_memory(struct target_s *target, uint32_t address, uint32_t s return retval; } -int arm926ejs_write_phys_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +static int arm926ejs_write_phys_memory(struct target_s *target, + uint32_t address, uint32_t size, + uint32_t count, uint8_t *buffer) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -775,7 +720,9 @@ int arm926ejs_write_phys_memory(struct target_s *target, uint32_t address, uint3 return armv4_5_mmu_write_physical(target, &arm926ejs->armv4_5_mmu, address, size, count, buffer); } -int arm926ejs_read_phys_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) +static int arm926ejs_read_phys_memory(struct target_s *target, + uint32_t address, uint32_t size, + uint32_t count, uint8_t *buffer) { armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; @@ -785,19 +732,21 @@ int arm926ejs_read_phys_memory(struct target_s *target, uint32_t address, uint32 return armv4_5_mmu_read_physical(target, &arm926ejs->armv4_5_mmu, address, size, count, buffer); } -int arm926ejs_init_target(struct command_context_s *cmd_ctx, struct target_s *target) +static int arm926ejs_init_target(struct command_context_s *cmd_ctx, + struct target_s *target) { arm9tdmi_init_target(cmd_ctx, target); return ERROR_OK; } -int arm926ejs_quit(void) +static int arm926ejs_quit(void) { return ERROR_OK; } -int arm926ejs_init_arch_info(target_t *target, arm926ejs_common_t *arm926ejs, jtag_tap_t *tap) +int arm926ejs_init_arch_info(target_t *target, arm926ejs_common_t *arm926ejs, + jtag_tap_t *tap) { arm9tdmi_common_t *arm9tdmi = &arm926ejs->arm9tdmi_common; arm7_9_common_t *arm7_9 = &arm9tdmi->arm7_9_common; @@ -834,7 +783,7 @@ int arm926ejs_init_arch_info(target_t *target, arm926ejs_common_t *arm926ejs, jt return ERROR_OK; } -int arm926ejs_target_create(struct target_s *target, Jim_Interp *interp) +static int arm926ejs_target_create(struct target_s *target, Jim_Interp *interp) { arm926ejs_common_t *arm926ejs = calloc(1,sizeof(arm926ejs_common_t)); @@ -843,24 +792,8 @@ int arm926ejs_target_create(struct target_s *target, Jim_Interp *interp) return ERROR_OK; } -int arm926ejs_register_commands(struct command_context_s *cmd_ctx) -{ - int retval; - command_t *arm926ejs_cmd; - - - retval = arm9tdmi_register_commands(cmd_ctx); - - arm926ejs_cmd = register_command(cmd_ctx, NULL, "arm926ejs", NULL, COMMAND_ANY, "arm926ejs specific commands"); - - register_command(cmd_ctx, arm926ejs_cmd, "cp15", arm926ejs_handle_cp15_command, COMMAND_EXEC, "display/modify cp15 register <opcode_1> <opcode_2> <CRn> <CRm> [value]"); - - register_command(cmd_ctx, arm926ejs_cmd, "cache_info", arm926ejs_handle_cache_info_command, COMMAND_EXEC, "display information about target caches"); - - return retval; -} - -int arm926ejs_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int arm926ejs_handle_cp15_command(struct command_context_s *cmd_ctx, + char *cmd, char **args, int argc) { int retval; target_t *target = get_current_target(cmd_ctx); @@ -925,7 +858,9 @@ int arm926ejs_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, return ERROR_OK; } -int arm926ejs_handle_cache_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int +arm926ejs_handle_cache_info_command(struct command_context_s *cmd_ctx, + char *cmd, char **args, int argc) { target_t *target = get_current_target(cmd_ctx); armv4_5_common_t *armv4_5; @@ -981,3 +916,73 @@ static int arm926ejs_mmu(struct target_s *target, int *enabled) *enabled = arm926ejs->armv4_5_mmu.mmu_enabled; return ERROR_OK; } + +int arm926ejs_register_commands(struct command_context_s *cmd_ctx) +{ + int retval; + command_t *arm926ejs_cmd; + + retval = arm9tdmi_register_commands(cmd_ctx); + + arm926ejs_cmd = register_command(cmd_ctx, NULL, "arm926ejs", + NULL, COMMAND_ANY, + "arm926ejs specific commands"); + + register_command(cmd_ctx, arm926ejs_cmd, "cp15", + arm926ejs_handle_cp15_command, COMMAND_EXEC, + "display/modify cp15 register " + "<opcode_1> <opcode_2> <CRn> <CRm> [value]"); + + register_command(cmd_ctx, arm926ejs_cmd, "cache_info", + arm926ejs_handle_cache_info_command, COMMAND_EXEC, + "display information about target caches"); + + return retval; +} + +target_type_t arm926ejs_target = +{ + .name = "arm926ejs", + + .poll = arm7_9_poll, + .arch_state = arm926ejs_arch_state, + + .target_request_data = arm7_9_target_request_data, + + .halt = arm7_9_halt, + .resume = arm7_9_resume, + .step = arm7_9_step, + + .assert_reset = arm7_9_assert_reset, + .deassert_reset = arm7_9_deassert_reset, + .soft_reset_halt = arm926ejs_soft_reset_halt, + + .get_gdb_reg_list = armv4_5_get_gdb_reg_list, + + .read_memory = arm7_9_read_memory, + .write_memory = arm926ejs_write_memory, + .bulk_write_memory = arm7_9_bulk_write_memory, + .checksum_memory = arm7_9_checksum_memory, + .blank_check_memory = arm7_9_blank_check_memory, + + .run_algorithm = armv4_5_run_algorithm, + + .add_breakpoint = arm7_9_add_breakpoint, + .remove_breakpoint = arm7_9_remove_breakpoint, + .add_watchpoint = arm7_9_add_watchpoint, + .remove_watchpoint = arm7_9_remove_watchpoint, + + .register_commands = arm926ejs_register_commands, + .target_create = arm926ejs_target_create, + .init_target = arm926ejs_init_target, + .examine = arm9tdmi_examine, + .quit = arm926ejs_quit, + .virt2phys = arm926ejs_virt2phys, + .mmu = arm926ejs_mmu, + + .read_phys_memory = arm926ejs_read_phys_memory, + .write_phys_memory = arm926ejs_write_phys_memory, + .mrc = arm926ejs_mrc, + .mcr = arm926ejs_mcr, +}; + ----------------------------------------------------------------------- Summary of changes: src/target/arm926ejs.c | 249 ++++++++++++++++++++------------------- src/target/cortex_m3.c | 305 +++++++++++++++++++++++------------------------- src/target/cortex_m3.h | 28 ----- 3 files changed, 271 insertions(+), 311 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-28 18:25:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 053a763aa61a801ac2259ee87aaed4cd140557d9 (commit) from 0b882951b7f2d2bb25a2d78db4bb84134a86216c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 053a763aa61a801ac2259ee87aaed4cd140557d9 Author: Franck HÃRÃSON <fra...@se...> Date: Wed Oct 28 10:24:55 2009 -0700 bugfix: stack corruption loading IHex images The Hex parser uses a fixed number of sections. When the number of sections in the file is greater than that, the stack get corrupted and a CHECKSUM ERROR is detected which is very confusing. This checks the number of sections read, and increases IMAGE_MAX_SECTIONS so it works on my file. Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/image.c b/src/target/image.c index d51e874..b9e641b 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -8,6 +8,9 @@ * Copyright (C) 2008 by Spencer Oliver * * sp...@sp... * * * + * Copyright (C) 2009 by Franck Hereson * + * fra...@se... * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -196,6 +199,12 @@ static int image_ihex_buffer_complete(image_t *image) if (section[image->num_sections].size != 0) { image->num_sections++; + if (image->num_sections >= IMAGE_MAX_SECTIONS) + { + /* too many sections */ + LOG_ERROR("Too many sections found in IHEX file"); + return ERROR_IMAGE_FORMAT_ERROR; + } section[image->num_sections].size = 0x0; section[image->num_sections].flags = 0; section[image->num_sections].private = &ihex->buffer[cooked_bytes]; @@ -252,6 +261,12 @@ static int image_ihex_buffer_complete(image_t *image) if (section[image->num_sections].size != 0) { image->num_sections++; + if (image->num_sections >= IMAGE_MAX_SECTIONS) + { + /* too many sections */ + LOG_ERROR("Too many sections found in IHEX file"); + return ERROR_IMAGE_FORMAT_ERROR; + } section[image->num_sections].size = 0x0; section[image->num_sections].flags = 0; section[image->num_sections].private = &ihex->buffer[cooked_bytes]; @@ -292,6 +307,12 @@ static int image_ihex_buffer_complete(image_t *image) if (section[image->num_sections].size != 0) { image->num_sections++; + if (image->num_sections >= IMAGE_MAX_SECTIONS) + { + /* too many sections */ + LOG_ERROR("Too many sections found in IHEX file"); + return ERROR_IMAGE_FORMAT_ERROR; + } section[image->num_sections].size = 0x0; section[image->num_sections].flags = 0; section[image->num_sections].private = &ihex->buffer[cooked_bytes]; diff --git a/src/target/image.h b/src/target/image.h index d90b544..551524e 100644 --- a/src/target/image.h +++ b/src/target/image.h @@ -33,7 +33,7 @@ #endif #define IMAGE_MAX_ERROR_STRING (256) -#define IMAGE_MAX_SECTIONS (128) +#define IMAGE_MAX_SECTIONS (512) #define IMAGE_MEMORY_CACHE_SIZE (2048) ----------------------------------------------------------------------- Summary of changes: src/target/image.c | 21 +++++++++++++++++++++ src/target/image.h | 2 +- 2 files changed, 22 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: Zach W. <zw...@us...> - 2009-10-28 07:55:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 0b882951b7f2d2bb25a2d78db4bb84134a86216c (commit) via e8dc384be9d4bf2b7ed61178c02154dffdb15a9e (commit) via 07c85e41a47b418d7c6647041542764861105231 (commit) via c970d03ddb7084713533c935864df18a6828d21a (commit) via eb9790dc91bd2d46c480277b1f275ba2d6e1ca3f (commit) via 89c1bea9310c5ecfe09ba3b544240556160cfbec (commit) from 76afa936ba4bfa5a5780dbad562c6637c252524b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0b882951b7f2d2bb25a2d78db4bb84134a86216c Author: Zachary T Welch <zw...@su...> Date: Thu Oct 22 03:04:08 2009 -0700 Add script to test the release process. Runs the release.sh script in a freshly cloned repository, charting one hypothetical future of OpenOCD's lineage. diff --git a/tools/release/test.sh b/tools/release/test.sh new file mode 100755 index 0000000..1f321e0 --- /dev/null +++ b/tools/release/test.sh @@ -0,0 +1,121 @@ +#!/bin/sh -e + +SRC="$1" +if [ "${SRC}" ]; then + shift +else + SRC="${0%%/*}" +fi +if [ ! -d "${SRC}/.git" ]; then + echo "'${SRC}' is not a git repository" + exit 1 +fi + +DST="$1" +[ "${DST}" ] || DST="release-${SRC}" + +export RELEASE_FAST=yes + +cat <<EOF +Starting test release clone process: + from: '${SRC}' + to: '${DST}' +This will destroy any contents in '${DST}'. +EOF +echo -n "Press Control-C to abort in " +for i in $(seq 5 -1 1); do echo -n "$i "; sleep 1; done +echo "go!" + +rm -rf "${DST}" +git clone "${SRC}" "${DST}" + +cd "${DST}" +# TAG+RELEASE NEW BRANCH (w/ -dev) +# 0.3.0 0.4.0-rc0 +tools/release.sh release --next='minor' --start-rc + +git checkout -q "v0.3.0" +# <none> 0.3.1 +tools/release.sh branch --next='micro' +# 0.3.1 0.3.2 +tools/release.sh release --next='micro' + +git checkout "v0.4.0-rc0-dev" +# 0.4.0-rc0 0.4.0-rc1 +tools/release.sh release --next='rc' +# 0.4.0 1.0.0-rc0 +tools/release.sh release --next='major' --final --start-rc + +git checkout -q "v0.4.0" +# <none> 0.4.1 +tools/release.sh branch --next='micro' +# 0.4.1 0.4.2 +tools/release.sh release --next='micro' + +git checkout "v1.0.0-rc0-dev" +# 1.0.0-rc0 1.0.0-rc1 +tools/release.sh release --next='rc' +# 1.0.0 1.1.0-rc0 +tools/release.sh release --next='minor' --final --start-rc + +git checkout -q "v1.0.0" +# <none> 1.0.1 +tools/release.sh branch --next='micro' +# 1.0.1 1.0.2 +tools/release.sh release --next='micro' + +git checkout "v1.1.0-rc0-dev" +# 1.1.0-rc0 1.1.0-rc1 +tools/release.sh release --next='rc' +# 1.1.0 1.2.0 +tools/release.sh release --next='minor' --final --start-rc + +git checkout -q "v1.0.0" +tools/release.sh branch --next='major' --start-rc + +# <none> 2.0.0-rc0 +git checkout "v2.0.0-rc0-dev" +# 2.0.0-rc0 2.0.0-rc1 +tools/release.sh release --next='rc' +# 2.0.0-rc1 2.0.0-rc2 +tools/release.sh release --next='rc' +# 2.0.0 2.1.0-rc0 +tools/release.sh release --next='minor' --final --start-rc + +git checkout -q "v1.1.0" +# <none> 1.1.1 +tools/release.sh branch --next='micro' +# 1.1.1 1.1.2 +tools/release.sh release --next='micro' + +git checkout -q "v2.0.0" +# <none> 2.0.0 +tools/release.sh branch --next='micro' +# 2.0.1 2.0.2 +tools/release.sh release --next='micro' + +git checkout "v1.2.0-rc0-dev" +# 1.2.0-rc0 1.2.0-rc1 +tools/release.sh release --next='rc' +# 1.2.0 1.3.0-rc0 +tools/release.sh release --next='micro' --final + +git checkout "v2.1.0-rc0-dev" +# 2.1.0-rc0 2.1.0-rc1 +tools/release.sh release --next='rc' +# 2.1.0-rc1 2.1.0-rc2 +tools/release.sh release --next='rc' +# 2.1.0 2.2.0-rc0 +tools/release.sh release --next='minor' --final --start-rc + +git checkout -q "v2.1.0" +# <none> 2.1.1 +tools/release.sh branch --next='micro' +# 2.1.1 2.1.2 +tools/release.sh release --next='micro' + +git checkout "v2.2.0-rc0-dev" +# 2.2.0-rc0 2.2.0-rc1 +tools/release.sh release --next='rc' + +gitk --all commit e8dc384be9d4bf2b7ed61178c02154dffdb15a9e Author: Zachary T Welch <zw...@su...> Date: Tue Oct 20 17:11:33 2009 -0700 Rewrite release script to use GIT. Update documentation to reflect GIT methodology. Rewrite release.sh script to use appropriate process. With this update, tools/release.sh can be used for producing private release tags on local branches. The documentation still needs work, but their use for v0.3.x should help rectify the deficiences. diff --git a/doc/manual/release.txt b/doc/manual/release.txt index 64dcb81..00e987e 100644 --- a/doc/manual/release.txt +++ b/doc/manual/release.txt @@ -212,46 +212,47 @@ Even with the release script, some steps require clear user intervention The following steps should be followed to produce each release: --# Produce final patches to mainline (or release branch): +-# Produce final manual patches to mainline (or release branch): -# Finalize @c NEWS file to describe the changes in the release - This file is Used to automatically post "blurbs" about the project. - This material should be produced during the development cycle. - Add a new item for each @c NEWS-worthy contribution, when committed. - -# bump library version if our API changed (not yet required) - -# Remove -dev tag from package version in configure.in: - - For major/minor releases, remove version tag from mainline, @a or - - For bug-fix releases, remove version tag from release branch. --# Branch or tag the required tree in the git repository: - - Tags and branches for releases must be named consistently: @par - "${PACKAGE_TARNAME}-${PACKAGE_VERSION}" - - For a major/minor release from the mainline, the code should be - tagged in the repository: + -# Bump library version if our API changed (not yet required) +-# Produce and tag the final revision in the git repository: + - Update and commit the final package version in @c configure.in : + -# Remove @c -dev tag. + -# Remove @c -rc tag, if producing the final release from an -rc series. + - Tags must be named consistently: @verbatim -svn cp .../trunk .../branches/${RELEASE_BRANCH} -svn cp .../branches/${RELEASE_BRANCH} .../tags/${RELEASE_TAG} @endverbatim - - For bug-fix releases produced in their respective branch, a tag - should be created in the repository: + - Tag the final commit with a consistent GIT tag name and message: @verbatim -svn cp .../branches/${RELEASE_BRANCH} .../tags/${RELEASE_TAG} +PACKAGE_VERSION="x.y.z" +PACKAGE_TAG="v${PACKAGE_VERSION}" +git tag -m "The openocd-${PACKAGE_VERSION} release." "${PACKAGE_TAG}" @endverbatim --# Prepare to resume normal development activities: - - Archive @c NEWS file as <code>doc/news/NEWS-${PACKAGE_VERSION}</code>. - - Create a new @c NEWS file for the next release - - For major/minor release from the mainline: - -# Bump major or minor package version in mainline. - -# Restore version tag to mainline. - - For bug-fix releases from a release branch: - -# Bump bug-fix version in release branch. - -# Restore version tag to release branch. +-# Prepare to resume normal development on the branch: + - Restore @c -dev and -@c -rc0 version tags. + - To start a new major (or minor) release cycle on the @c master branch: + - Bump major (or minor) package version, zeroing sub-components. + - Add -rc0 version tag: + - This insures casual releases from GIT always increase monotonically. + - For example, a major increment after releasing 1.2.3 starts 2.0.0-rc0-dev. + - Archive @c NEWS file as "<code>doc/news/NEWS-${PACKAGE_VERSION}</code>". + - Create a new @c NEWS file for the next release + - To start a bug-fix release on a non-master branch: + -# Bump bug-fix version. + - To start another release candidate on a major or minor branch: + -# Bump rc tag. -# Produce the package source archives: -# Start with a clean working copy, used for producing releases only. - -# Switch to release tag branch: svn switch .../${RELEASE_TAG} - -# Produce a ChangeLog for the release (using svn2cl). + -# Checkout the appropriate tag: +<code>git checkout $(git tag ) "${PACKAGE_VERSION}"</code> + -# Produce a ChangeLog for the release (using @c git2cl). -# @c bootstrap, @c configure, and @c make the package. -# Run <code>make distcheck</code> to produce the distribution archives. -# Run <code>make maintainer-clean</code> verify the repository is empty. - -# Create signature files using md5sum, sha1sum, etc. + -# Create signature files using @c md5sum, @c sha1sum, etc. -# Publish documentation for the release: - Allow users to access the documentation for each of our releases. - Place static copies of the following files on the project website: @@ -259,12 +260,21 @@ svn cp .../branches/${RELEASE_BRANCH} .../tags/${RELEASE_TAG} - @c ChangeLog: to show exactly what has been changed - User Guide, Developer Manual: to allow easy on-line viewing -# Upload packages and post announcements of their availability: - -# Release packages into files section of berliOS project site: + -# Release packages into files section of project sites: + - SF.net: + -# Create a new folder named "${PACKAGE_VERSION}" + -# Select new folder as the target for uploads. + -# Upload files via Web interface into new + -# Set platform types for each archive: + - .tar.bz2: Linux, Mac + - .tar.gz: BSD, Solaris, Others + - .zip: Windows + - Berlios: -# Create the new release for the new version. -# Provide @c NEWS and ChangeLog files, as requested. -# Upload files via FTP to ftp://ftp.berlios.de/incoming/ -# Edit descriptions for each file. - -# Send E-mail Release Notice + -# Click button to send E-mail Release Notice. -# Post announcement e-mail to the openocd-development list. -# Announce updates on freshmeat.net and other trackers. -# Submit big updates to news feeds (e.g. Digg, Reddit, etc.). @@ -275,7 +285,7 @@ Many of the processes described in the last section are no longer entrusted to humans. Instead, the @c release.sh script provides automation of the mechanical steps. -Presently, the @c release.sh script automates steps 1(c) through 4, +Presently, the @c release.sh script automates steps 2 through 4, allowing the Release Manager from perform these tasks in easy steps. The following task still need to be automated: @@ -285,61 +295,34 @@ The following task still need to be automated: - Step 6(b): package announcement e-mail process. - Step 6(c): post files and announce them using releaseforge. -In addition, support for '-rc' releases needs to be added. - @subsection releasescriptcmds Release Script Commands -The following output was taken from the release script: -@verbatim -usage: tools/release.sh [options] <command> - -Main Commands: - info Show a summary of the next pending release. - release Release the current tree as an archive. - upload Upload archives to berliOS project site - -Build Commands: - bootstrap Prepare the working copy for configuration and building. - configure Configures the package; runs bootstrap, if needed. - build Compiles the project; runs configure, if needed. - -Packaging Commands: - changelog Generate a new ChangeLog using svn2cl. - package Produce new distributable source archives. - stage Move archives to staging area for upload. - -Repository Commands: - commit Perform branch and tag, as appropriate for the version. - branch Create a release branch from project mainline. - tag Create a tag for the current release branch. - -Other Commands: - version ... Perform version number and tag manipulations. - clean Forces regeneration of results. - clean_all Removes all traces of the release process. - help Provides this list of commands. - -For more information about this script, see the Release Processes page -in the OpenOCD Developer's Manual (doc/manual/release.txt). - -WARNING: This script should be used by the Release Manager ONLY. -@endverbatim +The release script can be used for two tasks: +- Creating releases and starting a new release cycle: +@code +git checkout master +tools/release.sh --type=minor --final --start-rc release +@endcode +- Creating a development branch from a tagged release: +@code +git checkout 'v0.2.0' +tools/release.sh --type=micro branch +@endcode -Run <code>tools/release.sh help</code> for current command support. +Both of these variations make automatic commits and tags in your +repository, so you should be sure to run it on a cloned copy before +proceding with a live release. @subsection releasescriptopts Release Script Options The @c release.sh script recognizes some command-line options that affect its behavior: -- @c --live : Use this option to perform a live release. - When this option has been given, the release commands will affect - the repository; otherwise, the script reports the actions to take, - and it produces archives that are unsuitable for public release. - -@note Only the Release Manager should use the @c --live option, as -it will make permanent changes to the git repository that -cannot be undone. +- The @c --start-rc indicates that the new development release cycle + should start with @c -rc0. Without this, the @c -rc tag will be omitted, + leading to non-monotonic versioning of the in-tree version numbers. +- The @c --final indicates that the release should drop the @c -rc tag, + to going from @c x.y.z-rcN-dev to x.y.z. @subsection releasescriptenv Release Script Environment @@ -351,66 +334,9 @@ affect its behavior: @section releasetutorial Release Tutorials -This section provides tutorials for using the Release Script to perform -common release tasks. - -@subsection releasetutorialsetup Release Tutorial Setup - -The tutorials in this section assume the following environment -variables have been set properly: -@verbatim -SVN_USER="maintainer" -SVN_URL="https://${SVN_USER}@svn.berlios.de/svnroot/repos/openocd" -@endverbatim - -@subsection releasetutorialminor Minor Release Tutorial - -This section provides a step-by-step tutorial for a Release Manager to -use to run the @c release.sh script to produce a minor release. - -If the proper environment has been set, the following steps will produce -a new minor release: - --# Check out (or update) mainline from the repository: -@code -svn checkout "${SVN_URL}/trunk" openocd-trunk -@endcode --# Change to the new working copy directory: -@code -cd openocd-trunk -@endcode --# Run @c release.sh to produce the minor release: -@code -tools/release.sh all -@endcode - -@subsection releasetutorialmicro Bug-Fix Release Tutorial - -This section provides a step-by-step tutorial for a Release Manager to -use to run the @c release.sh script to produce a bug-fix release. - -In addition to the environment variables described in the introduction -to these tutorials, the following variables are also used in the -instructions for this section: -@verbatim -PACKAGE_BRANCH_VERSION="x.y.z" -PACKAGE_BRANCH="openocd-${PACKAGE_BRANCH_VERSION}" -@endverbatim - -If the proper environment has been set, the following steps will produce -a new bug-fix release: - --# Check out (or update) the release branch from the project repository: -@code -svn checkout "${SVN_URL}/branches/${PACKAGE_BRANCH}" "${PACKAGE_BRANCH}" -@endcode -@code -cd "${PACKAGE_BRANCH}" -@endcode --# Run @c release.sh to produce the bug-fix release: -@code -tools/release.sh all -@endcode +This section should contain a brief tutorial for using the Release +Script to perform release tasks, but the new script needs to be +used for 0.3.0. @section releasetodo Release Script Shortcomings diff --git a/tools/release.sh b/tools/release.sh index f1ed4a7..26be151 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -7,142 +7,27 @@ #CONFIG_OPTS="" #MAKE_OPTS="" -## DO NOT PERFORM LIVE RELEASES UNLESS YOU ARE THE RELEASE MANAGER!!! -RELEASE_DRY_RUN=1 -## set this to perform individual steps on past releases -RELEASE_VERSION= - -die() { - echo "$@" >&2 - exit 1 -} - -svn_info_get() { - svn info | grep "$1" | cut -d':' -f2- | cut -c2- -} - -svn_setup_load() { - SVN_ROOT="$(svn_info_get 'Repository Root')" - SVN_URL="$(svn_info_get 'URL')" - - SVN_TRUNK="${SVN_ROOT}/trunk" - - SVN_BRANCHES="${SVN_ROOT}/branches" - PACKAGE_BRANCH="${SVN_BRANCHES}/${PACKAGE_RELEASE}" - - SVN_TAGS="${SVN_ROOT}/tags" - PACKAGE_TAG="${SVN_TAGS}/${PACKAGE_RELEASE}" - - if [ "${SVN_URL}" = "${SVN_TRUNK}" ]; then - RELEASE_TYPE=minor - elif [ "${SVN_URL/${SVN_BRANCHES}/}" != "${SVN_URL}" ]; then - RELEASE_TYPE=micro - else - echo "error: bad URL: ${SVN_URL}" >&2 - die "unable to branch from the current location" - fi -} -svn_setup_show() { - cat <<INFO -Release Type: ${RELEASE_TYPE} - Branch URL: ${PACKAGE_BRANCH} - Tag URL: ${PACKAGE_TAG} -INFO -} - -do_svn_echo_msg() { echo "svn: $1: $3"; } -do_svn_echo() { - case "$1" in - commit) - do_svn_echo_msg "$@" - shift 3 - [ "$*" ] && echo "Files: $@" - ;; - copy|move) - do_svn_echo_msg "$@" - echo "From: ${4:-$2}" - echo " To: ${5:-$3}" - ;; - *) - local ACTION="$1" - shift - echo "svn: ${ACTION}: $@" - ;; - esac -} -do_svn() { - do_svn_echo "$@" - [ "${RELEASE_DRY_RUN}" ] || svn "$@" -} -do_svn_switch() { - do_svn switch "$@" - package_info_load -} - +## specifies the --next release type: major, minor, micro, rc, tag +#RELEASE_TYPE=tag +## For tag release type, specifies the name of the tag (e.g. "foo"). +## The default is the current user name, as found by the 'id' command. +#RELEASE_TAG="$(id -un)" -package_info_load_name() { - grep AC_INIT configure.in | perl -ne 's/^.+\(\[([-\w]*)\],.+$/$1/ and print' -} -package_info_load_version() { - grep AC_INIT configure.in | perl -ne 's/^.+\[([-\w\.]*)\],$/$1/ and print' -} - -package_info_load() { - [ -f "configure.in" ] || \ - die "package_info_load: configure.in is missing" - - PACKAGE_NAME="$(package_info_load_name)" - # todo: fix this - PACKAGE_TARNAME="${PACKAGE_NAME}" - - PACKAGE_VERSION="$(package_info_load_version)" - [ "${RELEASE_VERSION}" ] || \ - RELEASE_VERSION=${PACKAGE_VERSION/-dev/} - - [ "${PACKAGE_NAME}" -a "${PACKAGE_VERSION}" ] || \ - die "package information is missing from configure script" - - PACKAGE_VERSION_TAGS= - [ "${PACKAGE_VERSION/-/}" = "${PACKAGE_VERSION}" ] || \ - PACKAGE_VERSION_TAGS="-${PACKAGE_VERSION#*-}" - PACKAGE_VERSION_BASE="${PACKAGE_VERSION%%-*}" - PACKAGE_MICRO="${PACKAGE_VERSION_BASE##*.}" - PACKAGE_MAJOR_AND_MINOR="${PACKAGE_VERSION_BASE%.*}" - PACKAGE_MAJOR="${PACKAGE_MAJOR_AND_MINOR%.*}" - PACKAGE_MINOR="${PACKAGE_MAJOR_AND_MINOR#*.}" - - PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}" - if [ "${RELEASE_DRY_RUN}" ]; then - PACKAGE_RELEASE="${PACKAGE_TARNAME}-${PACKAGE_VERSION}" - else - PACKAGE_RELEASE="${PACKAGE_TARNAME}-${RELEASE_VERSION}" - fi -} +source "tools/release/helpers.sh" -package_info_show() { - cat <<INFO -Name: ${PACKAGE_TARNAME} -Release: ${RELEASE_VERSION} -Version: ${PACKAGE_VERSION} - Number: ${PACKAGE_VERSION_BASE} - Series: ${PACKAGE_MAJOR_AND_MINOR} - Major: ${PACKAGE_MAJOR} - Minor: ${PACKAGE_MINOR} - Micro: ${PACKAGE_MICRO} - Tags: ${PACKAGE_VERSION_TAGS} - Branch: ${PACKAGE_RELEASE} -Release: ${PACKAGE_TARNAME}-${PACKAGE_VERSION_BASE}${PACKAGE_VERSION_TAGS} -INFO -} +VERSION_SH="tools/release/version.sh" usage() { cat << USAGE -usage: $0 <command> +usage: $0 <command> ... +Command Options: + --next name The branch's next release type: major, minor, micro, rc, tag. + --next-tag name The name for the package version tag. + --live Perform the actions in the repository. Main Commands: info Show a summary of the next pending release. release Release the current tree as an archive. - upload Upload archives to berliOS project site Build Commands: bootstrap Prepare the working copy for configuration and building. @@ -150,42 +35,26 @@ Build Commands: build Compiles the project; runs configure, if needed. Packaging Commands: - changelog Generate a new ChangeLog using svn2cl. + changelog Generate a new ChangeLog using ${SCM}2cl. package Produce new distributable source archives. stage Move archives to staging area for upload. -Repository Commands: - commit Perform branch and tag, as appropriate for the version. - branch Create a release branch from the project trunk. - tag Create a tag for the current release branch. - Other Commands: - version ... Perform version number and tag manipulations. - maryslamb Mary had a little lamb, but no one noticed. clean Forces regeneration of results. clean_all Removes all traces of the release process. help Provides this list of commands. - + For more information about this script, see the Release Processes page in the OpenOCD Developer's Manual (doc/manual/release.txt). - -WARNING: This script should be used by the Release Manager ONLY. USAGE exit 0 } do_usage() { usage; } do_help() { usage; } -do_info_show() { +do_info() { echo "Current Release Analysis:" package_info_show - svn_setup_show -} - -do_info() { - package_info_load - svn_setup_load - do_info_show } do_bootstrap() { @@ -213,26 +82,16 @@ maybe_build() { [ -f "src/openocd" ] || do_build; } do_build_clean() { [ -f Makefile ] && make maintainer-clean >/dev/null; } do_changelog() { - echo "Updating working copy to HEAD..." - do_svn update echo "Creating ChangeLog..." - svn2cl -i --authors AUTHORS.ChangeLog -} -maybe_changelog() { - if [ -z "${RELEASE_DRY_RUN}" ] \ - || [ ! -f ChangeLog ] \ - || [ "$(cat ChangeLog | wc -l)" -lt 2 ] - then - do_changelog - fi + local CMD=tools/git2cl/git2cl + eval ${CMD} ${OPTS} > ChangeLog } do_changelog_clean() { - do_svn revert ChangeLog + git checkout ChangeLog } do_package() { - package_info_load - maybe_changelog + do_changelog maybe_build echo "Building distribution packages..." make ${MAKE_OPTS} distcheck 2>&1 | perl tools/logger.pl > "release-pkg.log" @@ -266,207 +125,76 @@ do_stage_clean() { rm -v -f -r archives; } do_clean() { do_build_clean do_package_clean - rm -v -f configure - - svn revert configure.in + do_changelog_clean rm -v -f release-*.log } do_clean_all() { do_clean - do_changelog_clean do_stage_clean } -do_version_usage() { - cat << USAGE -usage: $0 version <command> -Version Commands: - tag {add|remove} <label> Add or remove the specified tag. - bump {major|minor|micro} Bump the specified version number, and - reset less-significant numbers to zero. - bump tag <label> Add or bump a versioned tag (e.g. -rcN). - bump final <label> Remove a versioned tag (e.g. -rcN). -USAGE -} - -do_version_sed() { - local OLD_VERSION="${PACKAGE_VERSION}" - local NEW_VERSION="$1" - local MSG="$2" - - sed -i -e "/AC_INIT/ s|${OLD_VERSION}|${NEW_VERSION}|" configure.in - package_info_load - echo "${MSG}: ${OLD_VERSION} -> ${NEW_VERSION}" -} -do_version_bump_sed() { - local NEW_VERSION="$1" - [ -z "${PACKAGE_VERSION_TAGS}" ] || \ - NEW_VERSION="${NEW_VERSION}${PACKAGE_VERSION_TAGS}" - - do_version_sed "${NEW_VERSION}" \ - "Bump ${CMD} package version number" -} -do_version_bump_major() { - do_version_bump_sed "$((PACKAGE_MAJOR + 1)).0.0" -} -do_version_bump_minor() { - do_version_bump_sed "${PACKAGE_MAJOR}.$((PACKAGE_MINOR + 1)).0" -} -do_version_bump_micro() { - do_version_bump_sed "${PACKAGE_MAJOR_AND_MINOR}.$((PACKAGE_MICRO + 1))" -} -do_version_bump_tag() { - local TAG="$1" - [ "${TAG}" ] || die "TAG argument is missing" - local TAGS="${PACKAGE_VERSION_TAGS}" - if has_version_tag "${TAG}"; then - local RC=$(do_version_tag_value "${TAG}") - RC=$((${RC} + 1)) - TAGS=$(echo ${TAGS} | perl -npe "s/-${TAG}[\\d]*/-${TAG}${RC}/") - else - TAGS="-${TAG}1${PACKAGE_VERSION_TAGS}" - fi - PACKAGE_VERSION_TAGS="${TAGS}" - do_version_bump_sed "${PACKAGE_VERSION_BASE}" -} -do_version_bump_final() { - local TAG="$1" - [ "${TAG}" ] || die "TAG argument is missing" - has_version_tag "${TAG}" || die "-${TAG} tag is missing" - do_version_tag_remove "${TAG}$(do_version_tag_value "${TAG}")" -} -do_version_bump() { - CMD="$1" - shift - case "${CMD}" in - major|minor|micro|final|tag) - eval "do_version_bump_${CMD}" "$@" - ;; - *) - do_version_usage - ;; - esac -} - -has_version_tag() { - test "${PACKAGE_VERSION/-${1}/}" != "${PACKAGE_VERSION}" -} -do_version_tag_value() { - local TAG="$1" - echo ${PACKAGE_VERSION_TAGS} | perl -ne "/-${TAG}"'(\d+)/ && print $1' -} -do_version_tag_add() { - local TAG="$1" - has_version_tag "${TAG}" && \ - die "error: tag '-${TAG}' exists in '${PACKAGE_VERSION}'" - do_version_sed "${PACKAGE_VERSION}-${TAG}" \ - "Add '-${TAG}' version tag" -} -do_version_tag_remove() { - local TAG="$1" - has_version_tag "${TAG}" || \ - die "error: tag '-${TAG}' missing from '${PACKAGE_VERSION}'" - do_version_sed "${PACKAGE_VERSION/-${TAG}/}" \ - "Remove '-${TAG}' version tag" -} -do_version_tag() { - CMD="$1" - shift - case "${CMD}" in - add|remove) - local i= - for i in "$@"; do - eval "do_version_tag_${CMD}" "${i}" - done - ;; - *) - do_version_usage - ;; - esac -} - do_version_commit() { - [ "$(svn diff configure.in | wc -l)" -gt 0 ] || \ - die "error: no version changes to commit" - do_svn commit -m "$1" configure.in + [ "$*" ] || die "usage: $0 commit <message>" + git add configure.in || die "error: no version changes to commit" + git commit -q -m "$*" configure.in } -do_version() { - package_info_load - CMD="$1" - shift - case "${CMD}" in - tag|bump) - do_version_commit "$(eval "do_version_${CMD}" "$@")" - ;; - commit) - local MSG="$1" - [ "${MSG}" ] || die "usage: $0 version commit <message>" - do_version_commit "${MSG}" - ;; - *) - do_version_usage - ;; - esac +do_version_finalize() { + echo "The ${PACKAGE_NAME} ${RELEASE_VERSION} release." + echo + ${VERSION_SH} tag remove dev + [ -z "${RELEASE_FINAL}" ] || ${VERSION_SH} bump final rc } - - -do_branch() { - package_info_load - svn_setup_load - do_svn copy -m "Branching version ${PACKAGE_VERSION}" \ - "${SVN_TRUNK}" "${PACKAGE_BRANCH}" +has_dev_tag() { + [ "${PACKAGE_VERSION/dev/}" != "${PACKAGE_VERSION}" ] } -do_tag() { - package_info_load - svn_setup_load - do_svn copy -m "Tagging version ${PACKAGE_VERSION}" \ - "${PACKAGE_BRANCH}" "${PACKAGE_TAG}" +do_release_step_branch() { + git checkout -b "v${RELEASE_VERSION}-release" } -do_commit() { - package_info_load - svn_setup_load +do_release_step_tag() { + do_version_commit "$(do_version_finalize)" + package_info_load [ "${PACKAGE_VERSION/dev/}" = "${PACKAGE_VERSION}" ] || \ - die "'${PACKAGE_NAME}-${PACKAGE_VERSION}' cannot be released" - - [ "${PACKAGE_VERSION%.0}" = "${PACKAGE_VERSION}" ] || \ - do_branch - do_tag + die "'${PACKAGE_NAME}-${PACKAGE_VERSION}' should not be tagged" + local MSG="The ${PACKAGE_STRING} release." + git tag -m "${MSG}" "v${PACKAGE_VERSION}" +} + +do_bump_version() { + echo -n "Bump ${RELEASE_TYPE} " + [ -z "${RELEASE_TAG}" ] || echo -n "-${RELEASE_TAG} " + echo -n "version and add " + [ -z "${RELEASE_START_RC}" ] || echo -n "-rc0" + echo "-dev tag." + echo + ${VERSION_SH} bump "${RELEASE_TYPE}" "${RELEASE_TAG}" + [ -z "${RELEASE_START_RC}" ] || ${VERSION_SH} bump tag rc + ${VERSION_SH} tag add dev } - - -do_release_step_prep() { - do_version tag remove dev - # reset RELEASE_VERSION now to allow release version to be detected - export RELEASE_VERSION= +do_release_step_bump() { + # bump the version number + do_version_commit "$(do_bump_version)" } -do_release_step_commit() { do_commit; } -do_release_step_branch_bump() { - local TYPE="$1" - echo "Bump ${TYPE} version and add tag:" - do_version_bump ${TYPE} - do_version_tag_add dev -} -do_release_step_branch() { - do_svn_switch "${PACKAGE_BRANCH}" - do_version_commit "$(do_release_step_branch_bump micro)" - do_svn_switch "${SVN_URL}" -} do_release_step_news_msg() { cat <<MSG -Archive released NEWS file: NEWS -> NEWS-${RELEASE_VERSION} -Create new NEWS file from relesse script template. +Archive and recreate NEWS file. + +Archive released NEWS file as NEWS-${RELEASE_VERSION}. +Create new NEWS file from release script template. MSG } do_release_step_news() { + # only archive the NEWS file for major/minor releases + [ "${RELEASE_TYPE}" = "major" -o "${RELEASE_TYPE}" = "minor" ] || \ + return 0 # archive NEWS and create new one from template - do_svn move "NEWS" "NEWS-${RELEASE_VERSION}" + git mv "NEWS" "NEWS-${RELEASE_VERSION}" - [ "${RELEASE_DRY_RUN}" ] || cat >NEWS <<NEWS + cat >NEWS <<NEWS This file should include items worth mentioning in the -OpenOCD ${PACKAGE_RELEASE} source archive release. +OpenOCD ${NEXT_RELEASE_VERSION} source archive release. The following areas of OpenOCD functionality changed in this release: @@ -485,71 +213,79 @@ For more information about contributing test reports, bug fixes, or new features and device support, please read the new Developer Manual (or the BUGS and PATCHES files in the source archive). NEWS - do_svn add NEWS + git add NEWS local MSG="$(do_release_step_news_msg)" - do_svn commit -m "${MSG}" NEWS NEWS-${RELEASE_VERSION} + git commit -q -m "${MSG}" NEWS "NEWS-${RELEASE_VERSION}" } -do_release_step_bump() { - # major and minor releases require branch version update too - [ "${RELEASE_TYPE}" = "micro" ] || do_release_step_branch - # bump the current tree version as required. - do_version_commit "$(do_release_step_branch_bump "${RELEASE_TYPE}")" - [ "${RELEASE_TYPE}" = "micro" ] || do_release_step_news -} do_release_step_package() { - local A=${PACKAGE_TAG} - local B=${A/https/http} - local PACKAGE_BUILD=${B/${USER}@/} - - do_svn_switch "${PACKAGE_TAG}" - do_svn_switch --relocate "${PACKAGE_TAG}" "${PACKAGE_BUILD}" - - # required to force SVN to update the in-source URL keyword - [ "${RELEASE_DRY_RUN}" ] || rm -v -f src/openocd.c - do_svn revert src/openocd.c + [ -z "${RELEASE_FAST}" ] || return 0 + git checkout -q "v${RELEASE_VERSION}" do_stage do_clean +} - do_svn_switch --relocate "${PACKAGE_BUILD}" "${PACKAGE_TAG}" - do_svn_switch "${SVN_URL}" +do_release_step_rebranch() { + # return to the new development head + local OLD_BRANCH="v${RELEASE_VERSION}-release" + git checkout "${OLD_BRANCH}" + + # create new branch with new version information + package_info_load + git checkout -b "v${PACKAGE_VERSION}" + git branch -d "${OLD_BRANCH}" } -do_release_step_1() { do_release_step_prep; } -do_release_step_2() { do_release_step_commit; } -do_release_step_3() { do_release_step_bump; } +do_release_step_0() { do_release_step_branch; } +do_release_step_1() { do_release_step_tag; } +do_release_step_2() { do_release_step_bump; } +do_release_step_3() { do_release_step_news; } do_release_step_4() { do_release_step_package; } +do_release_step_5() { do_release_step_rebranch; } + +do_release_setup() { + echo "Starting $CMD for ${RELEASE_VERSION}..." + [ "${RELEASE_TYPE}" ] || \ + die "The --next release type must be provided. See --help." +} do_release_check() { - echo -n "Are you sure you want to release '${PACKAGE_RELEASE}'?" + [ -z "${RELEASE_FAST}" ] || return 0 + echo "Are you sure you want to ${CMD} '${PACKAGE_RELEASE}', " + echo -n " to start a new ${RELEASE_TYPE} development cycle? (y/N) " read ANSWER if [ "${ANSWER}" != 'y' ]; then echo "Live release aborted!" exit 0 fi + do_countdown "Starting live release" } do_countdown() { echo -n "$1 in " for i in $(seq 5 -1 1); do echo -n "$i, " + sleep 1 done echo "go!" } -do_release() { - package_info_load - package_info_show - - if [ -z "${RELEASE_DRY_RUN}" ]; then - do_release_check - do_countdown "Starting live release" - fi +do_branch() { + do_release_setup + local i= + for i in 0 2 5; do + "do_release_step_${i}" + done +} +do_release() { + local CMD='release' + do_release_setup + do_release_check local i= - for i in $(seq 1 4); do - eval "do_release_step_${i}" + for i in $(seq 0 5); do + "do_release_step_${i}" done } do_all() { do_release "$@"; } @@ -558,18 +294,35 @@ do_reset() { maybe_bootstrap maybe_configure do_clean_all - svn revert configure.in + git checkout configure.in } -OPTIONS=$(getopt -o V --long live -n $0 -- "$@") +LONGOPTS="fast,final,start-rc,next-tag:,next:,help" +OPTIONS=$(getopt -o 'V,n:' --long "${LONGOPTS}" -n $0 -- "$@") if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi eval set -- "${OPTIONS}" while true; do case "$1" in - --live) - export RELEASE_DRY_RUN= + --fast) + RELEASE_FAST=yes + shift + ;; + --final) + RELEASE_FINAL=yes shift ;; + --start-rc) + RELEASE_START_RC=yes + shift + ;; + -n|--next) + export RELEASE_TYPE="$2" + shift 2 + ;; + --next-tag) + export RELEASE_TAG="$2" + shift 2 + ;; -V) exec $0 info ;; @@ -577,6 +330,10 @@ while true; do shift break ;; + --help) + usage + shift + ;; *) echo "Internal error" exit 1 @@ -584,18 +341,33 @@ while true; do esac done +case "${RELEASE_TYPE}" in +major|minor|micro|rc) + ;; +tag) + [ "${RELEASE_TAG}" ] || RELEASE_TAG="$(id -u -n)" + ;; +'') + ;; +*) + die "Unknown release type '${RELEASE_TYPE}'" + ;; +esac + CMD=$1 [ "${CMD}" ] || usage shift ACTION_CMDS="bootstrap|configure|build|changelog|package|stage|clean" -MISC_CMDS="all|info|version|tag|branch|commit|release|reset|help|usage" +MISC_CMDS="all|info|release|branch|reset|help|usage" CLEAN_CMDS="build_clean|changelog_clean|package_clean|stage_clean|clean_all" CMDS="|${ACTION_CMDS}|${CLEAN_CMDS}|${MISC_CMDS}|" is_command() { echo "${CMDS}" | grep "|$1|" >/dev/null; } +package_info_load if is_command "${CMD}"; then - eval "do_${CMD}" "$@" + "do_${CMD}" "$@" + echo "Done with '${CMD}'." >&2 else echo "error: unknown command: '${CMD}'" usage commit 07c85e41a47b418d7c6647041542764861105231 Author: Zachary T Welch <zw...@su...> Date: Tue Oct 20 17:12:17 2009 -0700 Factor version munging capabilities out of release.sh. diff --git a/tools/release/version.sh b/tools/release/version.sh new file mode 100755 index 0000000..bef79d0 --- /dev/null +++ b/tools/release/version.sh @@ -0,0 +1,137 @@ +#!/bin/sh -e +# version.sh: openocd version process automation +# Copyright (C) 2009 by Zachary T Welch <zw...@su...> +# Release under the GNU GPL v2 (or later versions). + +source "tools/release/helpers.sh" + +do_version_usage() { + cat << USAGE +usage: $0 <command> +Version Commands: + tag {add|remove} <label> Add or remove the specified tag. + bump {major|minor|micro|rc} Bump the specified version number, and + reset less-significant numbers to zero. + bump tag <label> Add or bump a versioned tag (e.g. -rcN). + bump final <label> Remove a versioned tag (e.g. -rcN). +USAGE +} + +do_version_sed() { + local OLD_VERSION="${PACKAGE_VERSION}" + local NEW_VERSION="$1" + local MSG="$2" + + sed -i -e "/AC_INIT/ s|${OLD_VERSION}|${NEW_VERSION}|" configure.in + package_info_load + echo "${MSG}: ${OLD_VERSION} -> ${NEW_VERSION}" +} +do_version_bump_sed() { + local NEW_VERSION="$1" + [ -z "${PACKAGE_VERSION_TAGS}" ] || \ + NEW_VERSION="${NEW_VERSION}${PACKAGE_VERSION_TAGS}" + + do_version_sed "${NEW_VERSION}" \ + "Bump ${CMD} package version number" +} +do_version_bump_major() { + do_version_bump_sed "$((PACKAGE_MAJOR + 1)).0.0" +} +do_version_bump_minor() { + do_version_bump_sed "${PACKAGE_MAJOR}.$((PACKAGE_MINOR + 1)).0" +} +do_version_bump_micro() { + do_version_bump_sed "${PACKAGE_MAJOR_AND_MINOR}.$((PACKAGE_MICRO + 1))" +} +do_version_bump_tag() { + local TAG="$1" + [ "${TAG}" ] || die "TAG argument is missing" + local TAGS="${PACKAGE_VERSION_TAGS}" + if has_version_tag "${TAG}"; then + local RC=$(do_version_tag_value "${TAG}") + RC=$((${RC} + 1)) + TAGS=$(echo ${TAGS} | perl -npe "s/-${TAG}[\\d]*/-${TAG}${RC}/") + else + TAGS="-${TAG}0${PACKAGE_VERSION_TAGS}" + fi + PACKAGE_VERSION_TAGS="${TAGS}" + do_version_bump_sed "${PACKAGE_VERSION_BASE}" +} +do_version_bump_final() { + local TAG="$1" + [ "${TAG}" ] || die "TAG argument is missing" + has_version_tag "${TAG}" || die "-${TAG} tag is missing" + do_version_tag_remove "${TAG}$(do_version_tag_value "${TAG}")" +} +do_version_bump() { + CMD="$1" + shift + case "${CMD}" in + major|minor|micro|final|tag) + "do_version_bump_${CMD}" "$@" + ;; + rc) + do_version_bump_tag "rc" + ;; + *) + do_version_usage + ;; + esac +} + +has_version_tag() { + test "${PACKAGE_VERSION/-${1}/}" != "${PACKAGE_VERSION}" +} +do_version_tag_value() { + local TAG="$1" + echo ${PACKAGE_VERSION_TAGS} | perl -ne "/-${TAG}"'(\d+)/ && print $1' +} +do_version_tag_add() { + local TAG="$1" + has_version_tag "${TAG}" && \ + die "error: tag '-${TAG}' exists in '${PACKAGE_VERSION}'" + do_version_sed "${PACKAGE_VERSION}-${TAG}" \ + "Add '-${TAG}' version tag" +} +do_version_tag_remove() { + local TAG="$1" + has_version_tag "${TAG}" || \ + die "error: tag '-${TAG}' missing from '${PACKAGE_VERSION}'" + do_version_sed "${PACKAGE_VERSION/-${TAG}/}" \ + "Remove '-${TAG}' version tag" +} +do_version_tag() { + CMD="$1" + shift + case "${CMD}" in + add|remove) + local i= + for i in "$@"; do + "do_version_tag_${CMD}" "${i}" + done + ;; + *) + do_version_usage + ;; + esac +} + +do_version() { + CMD="$1" + shift + case "${CMD}" in + tag|bump) + "do_version_${CMD}" "$@" + ;; + commit) + do_version_commit "$@" + ;; + *) + do_version_usage + ;; + esac +} + +package_info_load +do_version "$@" + commit c970d03ddb7084713533c935864df18a6828d21a Author: Zachary T Welch <zw...@su...> Date: Thu Oct 22 01:38:22 2009 -0700 Factor release version functions into new script. diff --git a/tools/release/helpers.sh b/tools/release/helpers.sh new file mode 100644 index 0000000..2dd5bae --- /dev/null +++ b/tools/release/helpers.sh @@ -0,0 +1,60 @@ +#!/bin/sh -e + +die() { + echo "$@" >&2 + exit 1 +} + +package_info_load_name() { + grep AC_INIT configure.in | perl -ne 's/^.+\(\[([-\w]*)\],.+$/$1/ and print' +} +package_info_load_version() { + grep AC_INIT configure.in | perl -ne 's/^.+\[([-\w\.]*)\],$/$1/ and print' +} + +package_info_load() { + [ -f "configure.in" ] || \ + die "package_info_load: configure.in is missing" + + PACKAGE_NAME="$(package_info_load_name)" + # todo: fix this + PACKAGE_TARNAME="${PACKAGE_NAME}" + + PACKAGE_VERSION="$(package_info_load_version)" + + [ "${PACKAGE_NAME}" -a "${PACKAGE_VERSION}" ] || \ + die "package information is missing from configure script" + + PACKAGE_VERSION_TAGS= + [ "${PACKAGE_VERSION/-/}" = "${PACKAGE_VERSION}" ] || \ + PACKAGE_VERSION_TAGS="-${PACKAGE_VERSION#*-}" + PACKAGE_VERSION_BASE="${PACKAGE_VERSION%%-*}" + PACKAGE_MICRO="${PACKAGE_VERSION_BASE##*.}" + PACKAGE_MAJOR_AND_MINOR="${PACKAGE_VERSION_BASE%.*}" + PACKAGE_MAJOR="${PACKAGE_MAJOR_AND_MINOR%.*}" + PACKAGE_MINOR="${PACKAGE_MAJOR_AND_MINOR#*.}" + + [ "${RELEASE_FINAL}" ] \ + && RELEASE_VERSION="${PACKAGE_VERSION_BASE}" \ + || RELEASE_VERSION="${PACKAGE_VERSION/-dev/}" + PACKAGE_RELEASE="${PACKAGE_TARNAME}-${RELEASE_VERSION}" + PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}" +} + +package_info_show() { + cat <<INFO +Name: ${PACKAGE_TARNAME} +Version: ${PACKAGE_VERSION} +Release: ${RELEASE_VERSION} + Number: ${PACKAGE_VERSION_BASE} + Series: ${PACKAGE_MAJOR_AND_MINOR} + Major: ${PACKAGE_MAJOR} + Minor: ${PACKAGE_MINOR} + Micro: ${PACKAGE_MICRO} + Tags: ${PACKAGE_VERSION_TAGS} + Full: ${PACKAGE_TARNAME}-${PACKAGE_VERSION_BASE}${PACKAGE_VERSION_TAGS} +Release: ${PACKAGE_RELEASE} + Type: ${RELEASE_TYPE} +INFO +} + commit eb9790dc91bd2d46c480277b1f275ba2d6e1ca3f Author: Zachary T Welch <zw...@su...> Date: Sat Oct 24 03:04:28 2009 -0700 Add git2cl from repo.or.cz as a submodule in tools/git2cl. diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2fcecfd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tools/git2cl"] + path = tools/git2cl + url = git://repo.or.cz/git2cl.git diff --git a/tools/git2cl b/tools/git2cl new file mode 160000 index 0000000..8373c9f --- /dev/null +++ b/tools/git2cl @@ -0,0 +1 @@ +Subproject commit 8373c9f74993e218a08819cbcdbab3f3564bbeba commit 89c1bea9310c5ecfe09ba3b544240556160cfbec Author: Zachary T Welch <zw...@su...> Date: Sat Oct 24 03:05:41 2009 -0700 Improve .gitignore rules. A '.*' rule prevents the 'git submodule add' from correctly adding the first submodule, because it creates the .gitmodule file. This file will not be added (without -f) result in incomplete submodule commits. The new rules mask the specific files present in my own build tree, but additional rules may be needed to hide other types of temporary files. diff --git a/.gitignore b/.gitignore index c0aba19..2c1c536 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,17 @@ # stuff "git status" should ignore # build output -.* +.libs +.deps *.o *.a *.lo *.la *.in +# editor files +*.swp + startup_tcl.c xscale_debug.h ----------------------------------------------------------------------- Summary of changes: .gitignore | 6 +- .gitmodules | 3 + doc/manual/release.txt | 198 ++++++------------ tools/git2cl | 1 + tools/release.sh | 524 +++++++++++++--------------------------------- tools/release/helpers.sh | 60 ++++++ tools/release/test.sh | 121 +++++++++++ tools/release/version.sh | 137 ++++++++++++ 8 files changed, 537 insertions(+), 513 deletions(-) create mode 100644 .gitmodules create mode 160000 tools/git2cl create mode 100644 tools/release/helpers.sh create mode 100755 tools/release/test.sh create mode 100755 tools/release/version.sh hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-28 03:26:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 76afa936ba4bfa5a5780dbad562c6637c252524b (commit) via 39dd68bca649e9275c602fa212f448ae8497f306 (commit) from 993fe4ab633eff4f04dd63e4751ccc2a6ea2d52e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 76afa936ba4bfa5a5780dbad562c6637c252524b Author: Nicolas Pitre <ni...@fl...> Date: Tue Oct 27 21:19:43 2009 -0400 ARM: fix single-step of Thumb unconditional branch Only type 1 branch instruction has a condition code, not type 2. Currently they're both tagged with ARM_B which doesn't allow for the distinction. Signed-off-by: Nicolas Pitre <ni...@ma...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index c50a52c..27957b2 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -317,8 +317,8 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si return retval; instruction_size = 2; - /* check condition code (only for branch instructions) */ - if (instruction.type == ARM_B && + /* check condition code (only for branch (1) instructions) */ + if ((opcode & 0xf000) == 0xd000 && !thumb_pass_branch_condition(sim->get_cpsr(sim, 0, 32), opcode)) { if (dry_run_pc) commit 39dd68bca649e9275c602fa212f448ae8497f306 Author: Nicolas Pitre <ni...@fl...> Date: Tue Oct 27 21:19:42 2009 -0400 ARM: fix target address when disassembling Thumb BLX A Thumb BLX instruction is branching to ARM code, and therefore the first 2 bits of the target address must be cleared. Signed-off-by: Nicolas Pitre <ni...@ma...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c index 5b0046b..ee087b1 100644 --- a/src/target/arm_disassembler.c +++ b/src/target/arm_disassembler.c @@ -1768,6 +1768,7 @@ static int evaluate_b_bl_blx_thumb(uint16_t opcode, case 1: instruction->type = ARM_BLX; mnemonic = "BLX"; + target_address &= 0xfffffffc; break; /* BL/BLX prefix */ case 2: ----------------------------------------------------------------------- Summary of changes: src/target/arm_disassembler.c | 1 + src/target/arm_simulator.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-27 20:40:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 993fe4ab633eff4f04dd63e4751ccc2a6ea2d52e (commit) via ad5192a2b948669aeeb9ccf5da81fa59ec21c346 (commit) from 68937cadfb42026b4c8b2c9e43acaf3fb409c4db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 993fe4ab633eff4f04dd63e4751ccc2a6ea2d52e Author: Oleg Seiljus <ol...@si...> Date: Tue Oct 27 12:40:24 2009 -0700 Signalyzer: H2 and H4 support This patch includes partial support for these new JTAG adapters. More complete support will require updates to the libftdi code, for EEPROM access. [dbr...@us...: fix whitespace, linelen, etc ] Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index fad07dc..cf3fc01 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -137,6 +137,7 @@ static int axm0432_jtag_init(void); static int sheevaplug_init(void); static int icebear_jtag_init(void); static int cortino_jtag_init(void); +static int signalyzer_h_init(void); /* reset procedures for supported layouts */ static void usbjtag_reset(int trst, int srst); @@ -149,11 +150,13 @@ static void stm32stick_reset(int trst, int srst); static void axm0432_jtag_reset(int trst, int srst); static void sheevaplug_reset(int trst, int srst); static void icebear_jtag_reset(int trst, int srst); +static void signalyzer_h_reset(int trst, int srst); /* blink procedures for layouts that support a blinking led */ static void olimex_jtag_blink(void); static void flyswatter_jtag_blink(void); static void turtle_jtag_blink(void); +static void signalyzer_h_blink(void); static const ft2232_layout_t ft2232_layouts[] = { @@ -173,6 +176,7 @@ static const ft2232_layout_t ft2232_layouts[] = { "sheevaplug", sheevaplug_init, sheevaplug_reset, NULL }, { "icebear", icebear_jtag_init, icebear_jtag_reset, NULL }, { "cortino", cortino_jtag_init, comstick_reset, NULL }, + { "signalyzer-h", signalyzer_h_init, signalyzer_h_reset, signalyzer_h_blink }, { NULL, NULL, NULL, NULL }, }; @@ -3070,3 +3074,808 @@ static void icebear_jtag_reset(int trst, int srst) { LOG_DEBUG("trst: %i, srst: %i, low_output: 0x%2.2x, low_direction: 0x%2.2x", trst, srst, low_output, low_direction); } + +/* --------------------------------------------------------------------- + * Support for Signalyzer H2 and Signalyzer H4 + * JTAG adapter from Xverve Technologies Inc. + * http://www.signalyzer.com or http://www.xverve.com + * + * Author: Oleg Seiljus, ol...@si... + */ +static unsigned char signalyzer_h_side; +static unsigned int signalyzer_h_adapter_type; + +static int signalyzer_h_ctrl_write(int address, unsigned short value); + +#if BUILD_FT2232_FTD2XX == 1 +static int signalyzer_h_ctrl_read(int address, unsigned short *value); +#endif + +#define SIGNALYZER_COMMAND_ADDR 128 +#define SIGNALYZER_DATA_BUFFER_ADDR 129 + +#define SIGNALYZER_COMMAND_VERSION 0x41 +#define SIGNALYZER_COMMAND_RESET 0x42 +#define SIGNALYZER_COMMAND_POWERCONTROL_GET 0x50 +#define SIGNALYZER_COMMAND_POWERCONTROL_SET 0x51 +#define SIGNALYZER_COMMAND_PWM_SET 0x52 +#define SIGNALYZER_COMMAND_LED_SET 0x53 +#define SIGNALYZER_COMMAND_ADC 0x54 +#define SIGNALYZER_COMMAND_GPIO_STATE 0x55 +#define SIGNALYZER_COMMAND_GPIO_MODE 0x56 +#define SIGNALYZER_COMMAND_GPIO_PORT 0x57 +#define SIGNALYZER_COMMAND_I2C 0x58 + +#define SIGNALYZER_CHAN_A 1 +#define SIGNALYZER_CHAN_B 2 +/* LEDS use channel C */ +#define SIGNALYZER_CHAN_C 4 + +#define SIGNALYZER_LED_GREEN 1 +#define SIGNALYZER_LED_RED 2 + +#define SIGNALYZER_MODULE_TYPE_EM_LT16_A 0x0301 +#define SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG 0x0302 +#define SIGNALYZER_MODULE_TYPE_EM_JTAG 0x0303 +#define SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG_P 0x0304 +#define SIGNALYZER_MODULE_TYPE_EM_JTAG_P 0x0305 + + +static int signalyzer_h_ctrl_write(int address, unsigned short value) +{ +#if BUILD_FT2232_FTD2XX == 1 + return FT_WriteEE(ftdih, address, value); +#elif BUILD_FT2232_LIBFTDI == 1 + return 0; +#endif +} + +#if BUILD_FT2232_FTD2XX == 1 +static int signalyzer_h_ctrl_read(int address, unsigned short *value) +{ + return FT_ReadEE(ftdih, address, value); +} +#endif + +static int signalyzer_h_led_set(unsigned char channel, unsigned char led, + int on_time_ms, int off_time_ms, unsigned char cycles) +{ + unsigned char on_time; + unsigned char off_time; + + if (on_time_ms < 0xFFFF) + on_time = (unsigned char)(on_time_ms / 62); + else + on_time = 0xFF; + + off_time = (unsigned char)(off_time_ms / 62); + +#if BUILD_FT2232_FTD2XX == 1 + FT_STATUS status; + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_DATA_BUFFER_ADDR, + ((uint32_t)(channel << 8) | led))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + (SIGNALYZER_DATA_BUFFER_ADDR + 1), + ((uint32_t)(on_time << 8) | off_time))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + (SIGNALYZER_DATA_BUFFER_ADDR + 2), + ((uint32_t)cycles))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_LED_SET)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + return ERROR_OK; +#elif BUILD_FT2232_LIBFTDI == 1 + int retval; + + if ((retval = signalyzer_h_ctrl_write(SIGNALYZER_DATA_BUFFER_ADDR, + ((uint32_t)(channel << 8) | led))) < 0) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %s", + ftdi_get_error_string(&ftdic)); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((retval = signalyzer_h_ctrl_write( + (SIGNALYZER_DATA_BUFFER_ADDR + 1), + ((uint32_t)(on_time << 8) | off_time))) < 0) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %s", + ftdi_get_error_string(&ftdic)); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((retval = signalyzer_h_ctrl_write( + (SIGNALYZER_DATA_BUFFER_ADDR + 2), + (uint32_t)cycles)) < 0) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %s", + ftdi_get_error_string(&ftdic)); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((retval = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_LED_SET)) < 0) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %s", + ftdi_get_error_string(&ftdic)); + return ERROR_JTAG_DEVICE_ERROR; + } + + return ERROR_OK; +#endif +} + +static int signalyzer_h_init(void) +{ +#if BUILD_FT2232_FTD2XX == 1 + FT_STATUS status; + int i; +#endif + + char *end_of_desc; + + uint16_t read_buf[12]; + uint8_t buf[3]; + uint32_t bytes_written; + + /* turn on center green led */ + signalyzer_h_led_set(SIGNALYZER_CHAN_C, SIGNALYZER_LED_GREEN, + 0xFFFF, 0x00, 0x00); + + /* determine what channel config wants to open + * TODO: change me... current implementation is made to work + * with openocd description parsing. + */ + end_of_desc = strrchr(ft2232_device_desc, 0x00); + + if (end_of_desc) + { + signalyzer_h_side = *(end_of_desc - 1); + if (signalyzer_h_side == 'B') + signalyzer_h_side = SIGNALYZER_CHAN_B; + else + signalyzer_h_side = SIGNALYZER_CHAN_A; + } + else + { + LOG_ERROR("No Channel was specified"); + return ERROR_FAIL; + } + + signalyzer_h_led_set(signalyzer_h_side, SIGNALYZER_LED_GREEN, + 1000, 1000, 0xFF); + +#if BUILD_FT2232_FTD2XX == 1 + /* read signalyzer versionining information */ + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_VERSION)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + for (i = 0; i < 10; i++) + { + if ((status = signalyzer_h_ctrl_read( + (SIGNALYZER_DATA_BUFFER_ADDR + i), + &read_buf[i])) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_read returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + } + + LOG_INFO("Signalyzer: ID info: { %.4x %.4x %.4x %.4x %.4x %.4x %.4x }", + read_buf[0], read_buf[1], read_buf[2], read_buf[3], + read_buf[4], read_buf[5], read_buf[6]); + + /* set gpio register */ + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_DATA_BUFFER_ADDR, + (uint32_t)(signalyzer_h_side << 8))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_DATA_BUFFER_ADDR + 1, + 0x0404)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_GPIO_STATE)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + /* read adapter type information */ + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_DATA_BUFFER_ADDR, + ((uint32_t)(signalyzer_h_side << 8) | 0x01))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + (SIGNALYZER_DATA_BUFFER_ADDR + 1), 0xA000)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + (SIGNALYZER_DATA_BUFFER_ADDR + 2), 0x0008)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_I2C)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + usleep(100000); + + if ((status = signalyzer_h_ctrl_read(SIGNALYZER_COMMAND_ADDR, + &read_buf[0])) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_read returned: %lu", status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if (read_buf[0] != 0x0498) + signalyzer_h_adapter_type = 0x0000; + else + { + for (i = 0; i < 4; i++) + { + if ((status = signalyzer_h_ctrl_read( + (SIGNALYZER_DATA_BUFFER_ADDR + i), + &read_buf[i])) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_read returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + } + + signalyzer_h_adapter_type = read_buf[0]; + } + +#elif BUILD_FT2232_LIBFTDI == 1 + /* currently libftdi does not allow reading individual eeprom + * locations, therefore adapter type cannot be detected. + * override with most common type + */ + signalyzer_h_adapter_type = SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG; +#endif + + enum reset_types jtag_reset_config = jtag_get_reset_config(); + + /* ADAPTOR: EM_LT16_A */ + if (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_LT16_A) + { + LOG_INFO("Signalyzer: EM-LT (16-channel level translator) " + "detected. (HW: %2x).", (read_buf[1] >> 8)); + + nTRST = 0x10; + nTRSTnOE = 0x10; + nSRST = 0x20; + nSRSTnOE = 0x20; + + low_output = 0x08; + low_direction = 0x1b; + + high_output = 0x0; + high_direction = 0x0; + + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + { + low_direction &= ~nTRSTnOE; /* nTRST input */ + low_output &= ~nTRST; /* nTRST = 0 */ + } + else + { + low_direction |= nTRSTnOE; /* nTRST output */ + low_output |= nTRST; /* nTRST = 1 */ + } + + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + { + low_direction |= nSRSTnOE; /* nSRST output */ + low_output |= nSRST; /* nSRST = 1 */ + } + else + { + low_direction &= ~nSRSTnOE; /* nSRST input */ + low_output &= ~nSRST; /* nSRST = 0 */ + } + +#if BUILD_FT2232_FTD2XX == 1 + /* enable power to the module */ + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR, + ((uint32_t)(signalyzer_h_side << 8) | 0x01))) + != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_POWERCONTROL_SET)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + /* set gpio mode register */ + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR, + (uint32_t)(signalyzer_h_side << 8))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR + 1, 0x0000)) + != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write(SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_GPIO_MODE)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + /* set gpio register */ + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR, + (uint32_t)(signalyzer_h_side << 8))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR + 1, 0x4040)) + != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_GPIO_STATE)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } +#endif + } + + /* ADAPTOR: EM_ARM_JTAG, EM_ARM_JTAG_P, EM_JTAG, EM_JTAG_P */ + else if ((signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG) || + (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG_P) || + (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_JTAG) || + (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_JTAG_P)) + { + if (signalyzer_h_adapter_type + == SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG) + LOG_INFO("Signalyzer: EM-ARM-JTAG (ARM JTAG) " + "detected. (HW: %2x).", (read_buf[1] >> 8)); + else if (signalyzer_h_adapter_type + == SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG_P) + LOG_INFO("Signalyzer: EM-ARM-JTAG_P " + "(ARM JTAG with PSU) detected. (HW: %2x).", + (read_buf[1] >> 8)); + else if (signalyzer_h_adapter_type + == SIGNALYZER_MODULE_TYPE_EM_JTAG) + LOG_INFO("Signalyzer: EM-JTAG (Generic JTAG) " + "detected. (HW: %2x).", (read_buf[1] >> 8)); + else if (signalyzer_h_adapter_type + == SIGNALYZER_MODULE_TYPE_EM_JTAG_P) + LOG_INFO("Signalyzer: EM-JTAG-P " + "(Generic JTAG with PSU) detected. (HW: %2x).", + (read_buf[1] >> 8)); + + nTRST = 0x02; + nTRSTnOE = 0x04; + nSRST = 0x08; + nSRSTnOE = 0x10; + + low_output = 0x08; + low_direction = 0x1b; + + high_output = 0x0; + high_direction = 0x1f; + + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + { + high_output |= nTRSTnOE; + high_output &= ~nTRST; + } + else + { + high_output &= ~nTRSTnOE; + high_output |= nTRST; + } + + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + { + high_output &= ~nSRSTnOE; + high_output |= nSRST; + } + else + { + high_output |= nSRSTnOE; + high_output &= ~nSRST; + } + +#if BUILD_FT2232_FTD2XX == 1 + /* enable power to the module */ + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR, + ((uint32_t)(signalyzer_h_side << 8) | 0x01))) + != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_POWERCONTROL_SET)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + /* set gpio mode register (IO_16 and IO_17 set as analog + * inputs, other is gpio) + */ + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR, + (uint32_t)(signalyzer_h_side << 8))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR + 1, 0x0060)) + != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_GPIO_MODE)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + /* set gpio register (all inputs, for -P modules, + * PSU will be turned off) + */ + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR, + (uint32_t)(signalyzer_h_side << 8))) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_DATA_BUFFER_ADDR + 1, 0x0000)) + != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } + + if ((status = signalyzer_h_ctrl_write( + SIGNALYZER_COMMAND_ADDR, + SIGNALYZER_COMMAND_GPIO_STATE)) != FT_OK) + { + LOG_ERROR("signalyzer_h_ctrl_write returned: %lu", + status); + return ERROR_JTAG_DEVICE_ERROR; + } +#endif + } + + else if (signalyzer_h_adapter_type == 0x0000) + { + LOG_INFO("Signalyzer: No external modules were detected."); + + nTRST = 0x10; + nTRSTnOE = 0x10; + nSRST = 0x20; + nSRSTnOE = 0x20; + + low_output = 0x08; + low_direction = 0x1b; + + high_output = 0x0; + high_direction = 0x0; + + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + { + low_direction &= ~nTRSTnOE; /* nTRST input */ + low_output &= ~nTRST; /* nTRST = 0 */ + } + else + { + low_direction |= nTRSTnOE; /* nTRST output */ + low_output |= nTRST; /* nTRST = 1 */ + } + + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + { + low_direction |= nSRSTnOE; /* nSRST output */ + low_output |= nSRST; /* nSRST = 1 */ + } + else + { + low_direction &= ~nSRSTnOE; /* nSRST input */ + low_output &= ~nSRST; /* nSRST = 0 */ + } + } + else + { + LOG_ERROR("Unknown module type is detected: %.4x", + signalyzer_h_adapter_type); + return ERROR_JTAG_DEVICE_ERROR; + } + + /* initialize low byte of controller for jtag operation */ + buf[0] = 0x80; + buf[1] = low_output; + buf[2] = low_direction; + + if (((ft2232_write(buf, 3, &bytes_written)) != ERROR_OK) + || (bytes_written != 3)) + { + LOG_ERROR("couldn't initialize Signalyzer-H layout"); + return ERROR_JTAG_INIT_FAILED; + } + +#if BUILD_FT2232_FTD2XX == 1 + if (ftdi_device == FT_DEVICE_2232H) + { + /* initialize high byte of controller for jtag operation */ + buf[0] = 0x82; + buf[1] = high_output; + buf[2] = high_direction; + + if ((ft2232_write(buf, 3, &bytes_written) != ERROR_OK) + || (bytes_written != 3)) + { + LOG_ERROR("couldn't initialize Signalyzer-H layout"); + return ERROR_JTAG_INIT_FAILED; + } + } +#elif BUILD_FT2232_LIBFTDI == 1 + if (ftdi_device == TYPE_2232H) + { + /* initialize high byte of controller for jtag operation */ + buf[0] = 0x82; + buf[1] = high_output; + buf[2] = high_direction; + + if ((ft2232_write(buf, 3, &bytes_written) != ERROR_OK) + || (bytes_written != 3)) + { + LOG_ERROR("couldn't initialize Signalyzer-H layout"); + return ERROR_JTAG_INIT_FAILED; + } + } +#endif + return ERROR_OK; +} + +static void signalyzer_h_reset(int trst, int srst) +{ + enum reset_types jtag_reset_config = jtag_get_reset_config(); + + /* ADAPTOR: EM_LT16_A */ + if (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_LT16_A) + { + if (trst == 1) + { + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + /* switch to output pin (output is low) */ + low_direction |= nTRSTnOE; + else + /* switch output low */ + low_output &= ~nTRST; + } + else if (trst == 0) + { + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + /* switch to input pin (high-Z + internal + * and external pullup) */ + low_direction &= ~nTRSTnOE; + else + /* switch output high */ + low_output |= nTRST; + } + + if (srst == 1) + { + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + /* switch output low */ + low_output &= ~nSRST; + else + /* switch to output pin (output is low) */ + low_direction |= nSRSTnOE; + } + else if (srst == 0) + { + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + /* switch output high */ + low_output |= nSRST; + else + /* switch to input pin (high-Z) */ + low_direction &= ~nSRSTnOE; + } + + /* command "set data bits low byte" */ + buffer_write(0x80); + buffer_write(low_output); + buffer_write(low_direction); + LOG_DEBUG("trst: %i, srst: %i, low_output: 0x%2.2x, " + "low_direction: 0x%2.2x", + trst, srst, low_output, low_direction); + } + /* ADAPTOR: EM_ARM_JTAG, EM_ARM_JTAG_P, EM_JTAG, EM_JTAG_P */ + else if ((signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG) || + (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_ARM_JTAG_P) || + (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_JTAG) || + (signalyzer_h_adapter_type == SIGNALYZER_MODULE_TYPE_EM_JTAG_P)) + { + if (trst == 1) + { + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + high_output &= ~nTRSTnOE; + else + high_output &= ~nTRST; + } + else if (trst == 0) + { + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + high_output |= nTRSTnOE; + else + high_output |= nTRST; + } + + if (srst == 1) + { + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + high_output &= ~nSRST; + else + high_output &= ~nSRSTnOE; + } + else if (srst == 0) + { + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + high_output |= nSRST; + else + high_output |= nSRSTnOE; + } + + /* command "set data bits high byte" */ + buffer_write(0x82); + buffer_write(high_output); + buffer_write(high_direction); + LOG_INFO("trst: %i, srst: %i, high_output: 0x%2.2x, " + "high_direction: 0x%2.2x", + trst, srst, high_output, high_direction); + } + else if (signalyzer_h_adapter_type == 0x0000) + { + if (trst == 1) + { + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + /* switch to output pin (output is low) */ + low_direction |= nTRSTnOE; + else + /* switch output low */ + low_output &= ~nTRST; + } + else if (trst == 0) + { + if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) + /* switch to input pin (high-Z + internal + * and external pullup) */ + low_direction &= ~nTRSTnOE; + else + /* switch output high */ + low_output |= nTRST; + } + + if (srst == 1) + { + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + /* switch output low */ + low_output &= ~nSRST; + else + /* switch to output pin (output is low) */ + low_direction |= nSRSTnOE; + } + else if (srst == 0) + { + if (jtag_reset_config & RESET_SRST_PUSH_PULL) + /* switch output high */ + low_output |= nSRST; + else + /* switch to input pin (high-Z) */ + low_direction &= ~nSRSTnOE; + } + + /* command "set data bits low byte" */ + buffer_write(0x80); + buffer_write(low_output); + buffer_write(low_direction); + LOG_DEBUG("trst: %i, srst: %i, low_output: 0x%2.2x, " + "low_direction: 0x%2.2x", + trst, srst, low_output, low_direction); + } +} + +static void signalyzer_h_blink(void) +{ + signalyzer_h_led_set(signalyzer_h_side, SIGNALYZER_LED_RED, 100, 0, 1); +} diff --git a/tcl/interface/signalyzer.cfg b/tcl/interface/signalyzer.cfg index ff5f125..b0581c5 100644 --- a/tcl/interface/signalyzer.cfg +++ b/tcl/interface/signalyzer.cfg @@ -1,7 +1,7 @@ # # Xverve Signalyzer Tool (DT-USB-ST) # -# http://www.signalyzer.com/products/development-tools/signalyzer-tool-dt-usb-st.html +# http://www.signalyzer.com # interface ft2232 commit ad5192a2b948669aeeb9ccf5da81fa59ec21c346 Author: Oleg Seiljus <ol...@si...> Date: Tue Oct 27 11:56:04 2009 -0700 Signalyzer: new config files Add configs for H2, H4, LITE. Signed-off-by: David Brownell <dbr...@us...> diff --git a/tcl/interface/signalyzer-h2.cfg b/tcl/interface/signalyzer-h2.cfg new file mode 100644 index 0000000..24288ac --- /dev/null +++ b/tcl/interface/signalyzer-h2.cfg @@ -0,0 +1,11 @@ +# +# Xverve Signalyzer H2 (DT-USB-SH2) +# +# http://www.signalyzer.com +# + +interface ft2232 +ft2232_device_desc "Signalyzer H2" +ft2232_layout signalyzer-h +ft2232_vid_pid 0x0403 0xbca2 + diff --git a/tcl/interface/signalyzer-h4.cfg b/tcl/interface/signalyzer-h4.cfg new file mode 100644 index 0000000..d2b260b --- /dev/null +++ b/tcl/interface/signalyzer-h4.cfg @@ -0,0 +1,11 @@ +# +# Xverve Signalyzer H4 (DT-USB-SH4) +# +# http://www.signalyzer.com +# + +interface ft2232 +ft2232_device_desc "Signalyzer H4" +ft2232_layout signalyzer-h +ft2232_vid_pid 0x0403 0xbca4 + diff --git a/tcl/interface/signalyzer-lite.cfg b/tcl/interface/signalyzer-lite.cfg new file mode 100644 index 0000000..834bc0c --- /dev/null +++ b/tcl/interface/signalyzer-lite.cfg @@ -0,0 +1,11 @@ +# +# Xverve Signalyzer LITE (DT-USB-SLITE) +# +# http://www.signalyzer.com +# + +interface ft2232 +ft2232_device_desc "Signalyzer LITE" +ft2232_layout signalyzer +ft2232_vid_pid 0x0403 0xbca1 + ----------------------------------------------------------------------- Summary of changes: src/jtag/ft2232.c | 809 +++++++++++++++++++++++++++++++++++++ tcl/interface/signalyzer-h2.cfg | 11 + tcl/interface/signalyzer-h4.cfg | 11 + tcl/interface/signalyzer-lite.cfg | 11 + tcl/interface/signalyzer.cfg | 2 +- 5 files changed, 843 insertions(+), 1 deletions(-) create mode 100644 tcl/interface/signalyzer-h2.cfg create mode 100644 tcl/interface/signalyzer-h4.cfg create mode 100644 tcl/interface/signalyzer-lite.cfg hooks/post-receive -- Main OpenOCD repository |
From: David B. <dbr...@us...> - 2009-10-27 07:53:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 68937cadfb42026b4c8b2c9e43acaf3fb409c4db (commit) via 068a6c7895607a6af6758ad18bace683f6b7499d (commit) via ee8e93cb836bc01581329c5685c888c4d85e6c1b (commit) from 1020569b9ffa5073df0966b519f05dd492bfa460 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 68937cadfb42026b4c8b2c9e43acaf3fb409c4db Author: Nicolas Pitre <ni...@fl...> Date: Tue Oct 27 01:14:34 2009 -0400 ARM: fix Thumb mode handling when single-stepping register based branch insns Currently, OpenOCD is always caching the PC value without the T bit. This means that assignment to the PC register must clear that bit and set the processor state to Thumb when it is set. And when the PC register value is transferred to another register or stored into memory then the T bit must be restored. Discussion: It is arguable if OpenOCd should have preserved the original PC value which would have greatly simplified this code. The processor state could then be obtained simply by getting at bit 0 of the PC. This however would require special handling elsewhere instead since the T bit is not always relevant (like when PC is used with ALU insns or as an index with some addressing modes). It is unclear which way would be simpler in the end. Signed-off-by: Nicolas Pitre <ni...@ma...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 5af2c12..c50a52c 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -380,7 +380,8 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si else if (instruction.type == ARM_BL) { uint32_t old_pc = sim->get_reg(sim, 15); - sim->set_reg_mode(sim, 14, old_pc + 4); + int T = (sim->get_state(sim) == ARMV4_5_STATE_THUMB); + sim->set_reg_mode(sim, 14, old_pc + 4 + T); sim->set_reg(sim, 15, target); } else if (instruction.type == ARM_BX) @@ -398,7 +399,8 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si else if (instruction.type == ARM_BLX) { uint32_t old_pc = sim->get_reg(sim, 15); - sim->set_reg_mode(sim, 14, old_pc + 4); + int T = (sim->get_state(sim) == ARMV4_5_STATE_THUMB); + sim->set_reg_mode(sim, 14, old_pc + 4 + T); if (target & 0x1) { @@ -465,24 +467,24 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si if (dry_run_pc) { if (instruction.info.data_proc.Rd == 15) - { - *dry_run_pc = Rd; - return ERROR_OK; - } + *dry_run_pc = Rd & ~1; else - { *dry_run_pc = current_pc + instruction_size; - } return ERROR_OK; } else { + if (instruction.info.data_proc.Rd == 15) { + sim->set_reg_mode(sim, 15, Rd & ~1); + if (Rd & 1) + sim->set_state(sim, ARMV4_5_STATE_THUMB); + else + sim->set_state(sim, ARMV4_5_STATE_ARM); + return ERROR_OK; + } sim->set_reg_mode(sim, instruction.info.data_proc.Rd, Rd); LOG_WARNING("no updating of flags yet"); - - if (instruction.info.data_proc.Rd == 15) - return ERROR_OK; } } /* compare instructions (CMP, CMN, TST, TEQ) */ @@ -566,15 +568,9 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si if (dry_run_pc) { if (instruction.info.load_store.Rd == 15) - { - *dry_run_pc = load_value; - return ERROR_OK; - } + *dry_run_pc = load_value & ~1; else - { *dry_run_pc = current_pc + instruction_size; - } - return ERROR_OK; } else @@ -584,10 +580,16 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si { sim->set_reg_mode(sim, instruction.info.load_store.Rn, modified_address); } - sim->set_reg_mode(sim, instruction.info.load_store.Rd, load_value); - if (instruction.info.load_store.Rd == 15) + if (instruction.info.load_store.Rd == 15) { + sim->set_reg_mode(sim, 15, load_value & ~1); + if (load_value & 1) + sim->set_state(sim, ARMV4_5_STATE_THUMB); + else + sim->set_state(sim, ARMV4_5_STATE_ARM); return ERROR_OK; + } + sim->set_reg_mode(sim, instruction.info.load_store.Rd, load_value); } } /* load multiple instruction */ @@ -636,7 +638,7 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si { if (instruction.info.load_store_multiple.register_list & 0x8000) { - *dry_run_pc = load_values[15]; + *dry_run_pc = load_values[15] & ~1; return ERROR_OK; } } @@ -657,7 +659,16 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si { if (instruction.info.load_store_multiple.register_list & (1 << i)) { - sim->set_reg_mode(sim, i, load_values[i]); + if (i == 15) { + uint32_t val = load_values[i]; + sim->set_reg_mode(sim, i, val & ~1); + if (val & 1) + sim->set_state(sim, ARMV4_5_STATE_THUMB); + else + sim->set_state(sim, ARMV4_5_STATE_ARM); + } else { + sim->set_reg_mode(sim, i, load_values[i]); + } } } commit 068a6c7895607a6af6758ad18bace683f6b7499d Author: Nicolas Pitre <ni...@fl...> Date: Tue Oct 27 01:14:33 2009 -0400 ARM: allow proper single stepping of Thumb BL and BLX instructions Whenever an unconditional branch with the H bits set to 0b10 is met, the offset must be combined with the offset from the following opcode and not ignored like it is now. A comment in evaluate_b_bl_blx_thumb() suggests that the Thumb2 decoder would be a simpler solution. That might be true when single-stepping of Thumb2 code is implemented. But for now this appears to be the simplest solution to fix Thumb1 support. Signed-off-by: Nicolas Pitre <ni...@ma...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 646baea..5af2c12 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -332,6 +332,18 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si return ERROR_OK; } + + /* Deal with 32-bit BL/BLX */ + if ((opcode & 0xf800) == 0xf000) { + uint32_t high = instruction.info.b_bl_bx_blx.target_address; + retval = target_read_u16(target, current_pc+2, &opcode); + if (retval != ERROR_OK) + return retval; + retval = thumb_evaluate_opcode(opcode, current_pc, &instruction); + if (retval != ERROR_OK) + return retval; + instruction.info.b_bl_bx_blx.target_address += high; + } } /* examine instruction type */ commit ee8e93cb836bc01581329c5685c888c4d85e6c1b Author: Nicolas Pitre <ni...@fl...> Date: Tue Oct 27 01:14:32 2009 -0400 ARM: call thumb_pass_branch_condition() only for actual branch opcodes Calling it first with every opcodes and then testing if the opcode was indeed a branch instruction is wasteful and rather strange. If ever thumb_pass_branch_condition() has side effects (say, like printing a debugging traces) then the result would be garbage for most Thumb instructions which have no condition code. While at it, let's make the nearby code more readable by reducing some of the redundant brace noise and reworking the error handling construct. Signed-off-by: Nicolas Pitre <ni...@ma...> Signed-off-by: David Brownell <dbr...@us...> diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index e2f49c3..646baea 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -309,19 +309,17 @@ int arm_simulate_step_core(target_t *target, uint32_t *dry_run_pc, struct arm_si { uint16_t opcode; - if ((retval = target_read_u16(target, current_pc, &opcode)) != ERROR_OK) - { + retval = target_read_u16(target, current_pc, &opcode); + if (retval != ERROR_OK) return retval; - } - if ((retval = thumb_evaluate_opcode(opcode, current_pc, &instruction)) != ERROR_OK) - { + retval = thumb_evaluate_opcode(opcode, current_pc, &instruction); + if (retval != ERROR_OK) return retval; - } instruction_size = 2; /* check condition code (only for branch instructions) */ - if ((!thumb_pass_branch_condition(sim->get_cpsr(sim, 0, 32), opcode)) && - (instruction.type == ARM_B)) + if (instruction.type == ARM_B && + !thumb_pass_branch_condition(sim->get_cpsr(sim, 0, 32), opcode)) { if (dry_run_pc) { ----------------------------------------------------------------------- Summary of changes: src/target/arm_simulator.c | 81 +++++++++++++++++++++++++++---------------- 1 files changed, 51 insertions(+), 30 deletions(-) hooks/post-receive -- Main OpenOCD repository |