)]}'
{"id":"openocd~master~Ic27c397568a514767cac6182d2e69a64060887ad","project":"openocd","branch":"master","topic":"avr32-uc3-connect-quirk","hashtags":[],"change_id":"Ic27c397568a514767cac6182d2e69a64060887ad","subject":"jtag: Define interface for command to bitbang JTAG pins manually","status":"NEW","created":"2019-10-27 22:32:18.000000000","updated":"2019-10-30 03:47:43.000000000","submit_type":"CHERRY_PICK","mergeable":true,"submittable":false,"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"fc23ca96e425c0183c9f168e035c88fb7400e212","_number":5334,"owner":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"all":[{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},{"value":1,"date":"2019-10-30 03:47:43.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}],"values":{"-1":"Fails"," 0":"No score","+1":"Verified"},"description":"","default_value":0},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-2,"max":2},"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2019-10-29 09:44:25.000000000","updated_by":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"reviewer":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"state":"REVIEWER"},{"updated":"2019-10-30 03:47:43.000000000","updated_by":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"d5c8b2115a8a285eba850d851911ff1626205d03","author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"real_author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"date":"2019-10-27 22:32:18.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"bb69150180f40dab3938f0d10d81c204ca790cec","author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"real_author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"date":"2019-10-27 22:33:17.000000000","message":"Topic set to avr32-uc3-connect-quirk","accounts_in_message":[],"_revision_number":1},{"id":"c69aef2b7066fa1203cf4bcc3125e78c08c8bed2","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2019-10-27 22:53:54.000000000","message":"Patch Set 1: Verified-1\n\nBuild Failed \n\nhttp://build.openocd.org/job/openocd-gerrit/12174/ : FAILURE\n\nhttp://build.openocd.org/job/openocd-gerrit-build/11482/ : FAILURE","accounts_in_message":[],"_revision_number":1},{"id":"c4f8c4792dbea0f4b975900de62fdc0c0959ea2b","author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"real_author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"date":"2019-10-28 09:27:00.000000000","message":"Patch Set 1:\n\nHi Alexandru, I have followed the talk on IRC, so understand the need for this patch series. I don\u0027t know what should be the \"default\" level for TCK during NRST, but I think could be good to have a generic interface to bit-bang the adapter\u0027s pins for special initialization cases, like the one you found with AVR32.\n\nTo keep it generic, I would like to move the pins bitbanging outside the JTAG queue concept, otherwise it would be difficult to extend it to other transports, like SWD or any other that could be added later.\n\nI\u0027m already doing some effort to \"extract\" NRST and TRST from the JTAG queue to better split JTAG and SWD transports.\nIn http://openocd.zylin.com/5277/ I add the command \"adapter [de]assert\" to bitbang TRST and NRST. This could be extended to bitbang any other pin of the adapter, e.g. TCK in your case.\n\nThen in http://openocd.zylin.com/4895/ I convert all the SWD adapters to use a new specific adapter API to bitbang the reset signals (removing this from the JTAG queue) and with http://openocd.zylin.com/5300/ I start moving also some JTAG adapter to the same API.\n\nI added the API \"reset\" for the reset bitbanging.\nWe can either think about a new API \"pin_bitbang\", or extend and rename \"reset\" as a generic \"pin_bitbang\".\n\nOn the negative side, my patch series is ongoing since February 2019. Cannot predict when would be merged.","accounts_in_message":[],"_revision_number":1},{"id":"8cb1163a8243b9440f4131f1e56523cb980f63ef","author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"real_author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"date":"2019-10-29 09:44:25.000000000","message":"Patch Set 1:\n\nWhat you need immediately is \"only\" bitbanging TCK. Adding now a complete implementation to bitbang EVERY pin of the JTAG is probably overly-engineered and not useful!\nAt the same time, would be nice to keep the door open for further improvement to add bitbanging of other pins, later on, if needed.\n\nBased on this, I would suggest you to:\n1) take my #5277 and #4895 in your code.\n\n2) Add a patch that extends the command \"adapter [de]assert\" to accept \"tck\". Keep it easy; you do not need to bitbang simultaneously tck with nrst and trst. What you need is simply \"adapter deassert tck; reset halt\". So it would be acceptable to extend the command for tck used alone in the command line.\n\n3) add a new api .bitbang_tck, like I have added .reset. In the comment in \"interface.h\" specify that today you need tck only, but this can be extended later and \"eventually\" merged with the .reset, since the purpose is quite similar. Changing later an internal code is better than breaking user\u0027s TCL scripts by changing a TCL command.\nBe sure you do a jtag_execute_queue() before changing the TCK pin, to avoid that any pending action that could overwrite the pin state after the bitbanging.\n\n4) eventually take also my #5286 to update the documentation of \u0027adapter [de]assert\u0027\n\nAgain, the drawback of my suggestion is that you enter in the hell of the dependency from my patch series, so feel free to send me to the hell alone :-)\nOr, just wait. Keep this series in gerrit so anyone can download something working. Once I get out of the merge hell (would be funny if it\u0027s on Halloween) we can restart this activity.","accounts_in_message":[],"_revision_number":1},{"id":"dd4019847716b93538835f4264d5821d369a8f96","author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"real_author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"date":"2019-10-29 16:39:33.000000000","message":"Patch Set 1:\n\nWith respect to .bitbang_tck, both it and .reset are bitbang APIs. In my opinion, it doesn\u0027t make sense to add two almost identical methods to an interface, if the intent is to keep it readable and intuitive. When we get to the chip that needs waveforms on TMS or TDI in the bitbang sequence, do we add two more API calls?\n\nIn regards to the TCL, my wish is to be very explicit that we are applying a TCK low de-assert reset sequence. What is there to guarantee that a \u0027reset halt\u0027 command leaves tck low? I\u0027ve already come afoul on this with the ATAMEL-ICE, wherein any command would bring TCK high, irrespective of the previous state.\n\nI like the idea of not bitbanging within a JTAG command queue. Sadly, I only have so many hours allocated to get AVR32 running before I have to give up. If you are unwilling to adjust your patch series so I can layer my work on top of it, I have little choice but to continue with my original idea.","accounts_in_message":[],"_revision_number":1},{"id":"453ba131c8ad51a0b46c194ea3e9b453f00bfe57","author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"real_author":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"date":"2019-10-30 03:27:45.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"fc23ca96e425c0183c9f168e035c88fb7400e212","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2019-10-30 03:47:43.000000000","message":"Patch Set 2: Verified+1\n\nBuild Successful \n\nhttp://build.openocd.org/job/openocd-gerrit/12180/ : SUCCESS\n\nhttp://build.openocd.org/job/openocd-gerrit-build/11488/ : SUCCESS","accounts_in_message":[],"_revision_number":2}],"current_revision":"b1cea96aabf054d030e3e8507bc54ee51dcd0e18","revisions":{"1e12fae2e6035dbdea472f9d1bf4ac1bb6ea81f8":{"kind":"REWORK","_number":1,"created":"2019-10-27 22:32:18.000000000","uploader":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"ref":"refs/changes/34/5334/1","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/34/5334/1","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/1 \u0026\u0026 git checkout -b change-5334 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/34/5334/1","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"3199e96ea7f38baad0863807410d6f2bde70c187","subject":"jtag: usb_blaster: Add missing \u0027default\u0027 to switch statement"}],"author":{"name":"Alexandru Gagniuc","email":"mr.nuke.me@gmail.com","date":"2019-10-27 16:35:32.000000000","tz":-300},"committer":{"name":"Alexandru Gagniuc","email":"mr.nuke.me@gmail.com","date":"2019-10-27 22:31:43.000000000","tz":-300},"subject":"jtag: Define interface for command to toggle JTAG pins manually","message":"jtag: Define interface for command to toggle JTAG pins manually\n\nOn some targets, a specific sequence of waveforms needs to be sent for\nthe JTAG pins to be enabled. Waveforms which do not involve the\nmanipulation of the JTAG state machine may not be achievable reliably\nwith pathmove() statemove() or reset APIs.\n\nFor such cases, controlling the JTAG pins individually may be required\non power-on or before a scan. I\u0027ve chosen to use two bitmasks: a mask\ncontaining the pin values, and a mask containing the pins to write.\nI\u0027ve also considered an array of pin numbers, but settled on the masks\nbecause they make the jtag commands easier to write.\n\nFor example, on AVR32 UC3 targets, TCK must be held low while SRST is\nde-asserted. Such a sequence cannot be created with the existing JTAG\ncommand API.\n\nChange-Id: Ic27c397568a514767cac6182d2e69a64060887ad\nSigned-off-by: Alexandru Gagniuc \u003cmr.nuke.me@gmail.com\u003e\n"}},"b1cea96aabf054d030e3e8507bc54ee51dcd0e18":{"kind":"REWORK","_number":2,"created":"2019-10-30 03:27:45.000000000","uploader":{"_account_id":1001723,"name":"mrnuke","email":"mr.nuke.me@gmail.com","username":"mrnuke"},"ref":"refs/changes/34/5334/2","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/34/5334/2","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/2 \u0026\u0026 git checkout -b change-5334 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/34/5334/2","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/34/5334/2 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"b324b0743e46fb64b417128a5805c37183672bfa","subject":"jtag: jtag_vpi: Add missing \u0027default\u0027 to switch statement"}],"author":{"name":"Alexandru Gagniuc","email":"mr.nuke.me@gmail.com","date":"2019-10-27 16:35:32.000000000","tz":-300},"committer":{"name":"Alexandru Gagniuc","email":"mr.nuke.me@gmail.com","date":"2019-10-30 03:18:09.000000000","tz":-300},"subject":"jtag: Define interface for command to bitbang JTAG pins manually","message":"jtag: Define interface for command to bitbang JTAG pins manually\n\nOn some targets, a specific sequence of waveforms needs to be sent for\nthe JTAG pins to be enabled. Waveforms which do not involve the\nmanipulation of the JTAG state machine may not be achievable reliably\nwith pathmove() statemove() or reset APIs.\n\nFor such cases, controlling the JTAG pins individually may be required\non power-on or before a scan. I\u0027ve chosen to use two bitmasks: a mask\ncontaining the pin values, and a mask containing the pins to write.\nI\u0027ve also considered an array of pin numbers, but settled on the masks\nbecause they make the jtag commands easier to write.\n\nFor example, on AVR32 UC3 targets, TCK must be held low while SRST is\nde-asserted. Such a sequence cannot be created with the existing JTAG\ncommand API.\n\nChange-Id: Ic27c397568a514767cac6182d2e69a64060887ad\nSigned-off-by: Alexandru Gagniuc \u003cmr.nuke.me@gmail.com\u003e\n"}}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"NOT_READY","labels":[{"label":"Verified","status":"OK","applied_by":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"NEED"}]}],"submit_requirements":[{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dMAX -label:Verified\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dMAX","-label:Verified\u003dMIN"],"failing_atoms":[]}},{"name":"Code-Review","status":"UNSATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","-label:Code-Review\u003dMIN"]}}]}
