)]}'
{"id":"openocd~master~I52018e1e2200cbd41af8e5031f7b35dc761b61d6","project":"openocd","branch":"master","topic":"swim-rework","hashtags":[],"change_id":"I52018e1e2200cbd41af8e5031f7b35dc761b61d6","subject":"swim: abstract the transport in stm8 target","status":"MERGED","created":"2020-03-19 17:01:46.000000000","updated":"2020-05-24 20:29:42.000000000","submitted":"2020-05-24 20:29:42.000000000","submitter":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"5528-1590352182090-906c76a8","meta_rev_id":"4e15e452082a4b2d21f884136e9ee7dfc62266f7","_number":5528,"owner":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"},{"value":0,"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"value":1,"date":"2020-05-24 20:29:42.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":{"approved":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"all":[{"value":0,"_account_id":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"},{"value":2,"date":"2020-05-24 20:29:42.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},{"value":0,"_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":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2020-04-21 12:30:17.000000000","updated_by":{"_account_id":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"},"reviewer":{"_account_id":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"},"state":"REVIEWER"},{"updated":"2020-05-15 02:38:57.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":"e4a0041cb6565bf8782d9872afdf8e8a4d0c9046","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":"2020-03-19 17:01:46.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"c9498988866dc662ce77404ac2cc255346b94448","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2020-03-19 19:28:12.000000000","message":"Patch Set 1: Verified+1\n\nBuild Successful \n\nhttp://build.openocd.org/job/openocd-gerrit/12702/ : SUCCESS\n\nhttp://build.openocd.org/job/openocd-gerrit-build/11997/ : SUCCESS","accounts_in_message":[],"_revision_number":1},{"id":"13c2862da5e18f18fe48b985efd1a9ff6c2746ea","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":"2020-03-19 21:54:22.000000000","message":"Patch Set 1: Code-Review+1","accounts_in_message":[],"_revision_number":1},{"id":"0d62317cbf4ede14bd261b81d7fd16c74cb1edc6","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":"2020-03-23 10:10:57.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"67b2c2397a7cbac53818c86587364085a73d84d3","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2020-03-23 12:03:42.000000000","message":"Patch Set 2: Verified+1\n\nBuild Successful \n\nhttp://build.openocd.org/job/openocd-gerrit/12725/ : SUCCESS\n\nhttp://build.openocd.org/job/openocd-gerrit-build/12020/ : SUCCESS","accounts_in_message":[],"_revision_number":2},{"id":"7a466b23aa8c44c47d44b97adae6807b8897d71f","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":"2020-03-23 14:49:12.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"a9758e624150ca60ec803bbb84d863b683605308","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":"2020-03-26 09:58:33.000000000","message":"Uploaded patch set 3: Patch Set 2 was rebased.","accounts_in_message":[],"_revision_number":3},{"id":"ca513fa696054d131036d95ea738880ecf423728","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2020-03-26 11:54:10.000000000","message":"Patch Set 3: Verified+1\n\nBuild Successful \n\nhttp://build.openocd.org/job/openocd-gerrit/12746/ : SUCCESS\n\nhttp://build.openocd.org/job/openocd-gerrit-build/12041/ : SUCCESS","accounts_in_message":[],"_revision_number":3},{"id":"ba73573baf8f9f51a21f29c7fb6cf53cae1cd829","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":"2020-03-26 15:43:35.000000000","message":"Patch Set 3: Code-Review+1","accounts_in_message":[],"_revision_number":3},{"id":"70987ce8db20aca22ff0dba8c1fea56240990d68","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":"2020-04-20 21:34:24.000000000","message":"Uploaded patch set 4: Patch Set 3 was rebased.","accounts_in_message":[],"_revision_number":4},{"id":"08d6b3affaa59837cc71184b8f86dfa69127d868","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2020-04-20 23:27:44.000000000","message":"Patch Set 4: Verified+1\n\nBuild Successful \n\nhttp://build.openocd.org/job/openocd-gerrit/12871/ : SUCCESS\n\nhttp://build.openocd.org/job/openocd-gerrit-build/12166/ : SUCCESS","accounts_in_message":[],"_revision_number":4},{"id":"b792d7b84e09c018ed8b3da6c14ee87718b9e949","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":"2020-04-21 09:49:46.000000000","message":"Patch Set 4: Code-Review+1","accounts_in_message":[],"_revision_number":4},{"id":"352302651d13d7fd62928260c3dbd7c308f41a35","author":{"_account_id":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"},"real_author":{"_account_id":1001281,"name":"Ake Rehnman","email":"ake.rehnman@gmail.com","username":"akre"},"date":"2020-04-21 12:30:17.000000000","message":"Patch Set 4: Code-Review+1","accounts_in_message":[],"_revision_number":4},{"id":"2a8017ca9844e9fce027a4436f64e66b39f009a6","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":"2020-05-14 14:10:29.000000000","message":"Uploaded patch set 5: Patch Set 4 was rebased.","accounts_in_message":[],"_revision_number":5},{"id":"cba8717324ff4f07e4a672dfeb7a7fe400ccc3e3","author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"real_author":{"_account_id":1000014,"name":"jenkins","username":"jenkins","tags":["SERVICE_USER"]},"date":"2020-05-15 02:38:57.000000000","message":"Patch Set 5: Verified+1\n\nBuild Successful \n\nhttp://build.openocd.org/job/openocd-gerrit/13036/ : SUCCESS\n\nhttp://build.openocd.org/job/openocd-gerrit-build/12320/ : SUCCESS","accounts_in_message":[],"_revision_number":5},{"id":"8e995b7f6dd92bd1e4d196fce309152c97e52367","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":"2020-05-15 08:48:55.000000000","message":"Patch Set 5: Code-Review+2","accounts_in_message":[],"_revision_number":5},{"id":"fae6951ce3d174f594fc72c61e12db40ac42df4c","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":"2020-05-24 20:29:42.000000000","message":"Change has been successfully cherry-picked as ac18e960ce79f06b22e71a17415be0feb741a482 by Antonio Borneo","accounts_in_message":[],"_revision_number":6}],"current_revision":"ac18e960ce79f06b22e71a17415be0feb741a482","revisions":{"ac18e960ce79f06b22e71a17415be0feb741a482":{"kind":"REWORK","_number":6,"created":"2020-05-24 20:29:42.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/28/5528/6","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/28/5528/6","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/6 \u0026\u0026 git checkout -b change-5528 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/6 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/6 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/6 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/28/5528/6","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/6 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"93c4c0fcbec1ebcb2ce19b37c39b63f10a91b9e8","subject":"adapter: expose HLA interface in struct adapter_driver"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-01-26 16:00:55.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-05-24 20:29:42.000000000","tz":60},"subject":"swim: abstract the transport in stm8 target","message":"swim: abstract the transport in stm8 target\n\nSWIM is implemented by (ab)using the HLA API. This was acceptable\nwhen OpenOCD code did not provided a clear separation between\ntransports and related APIs. Still today SWIM in OpenOCD is only\nsupported by STLink, so the decision to re-use the HLA API was the\nsimpler way to implement it.\nAfter commit efd1d642220a (\"adapter: switch from struct\njtag_interface to adapter_driver\") the transports API are better\nsplit and SWIM can be implemented as a separate set of API. This\nwould open the possibility to extend OpenOCD for other adapters\nthat provide SWIM, e.g. versaloon, or through SPI emulation [1].\n\nIntroduce a new set of files swim.[ch] to handle the SWIM API.\nBeside the API that almost match the transport low-level data\ncommunication (system_reset, read_mem, write_mem), add a further\nAPI reconnect. Today, inside HLA STLink code, the reconnect is\nimplemented by hacking the HLA API state(). Please notice that\ndue to this hack the return type is incorrect; stlink_usb_state()\nreturns ERROR_OK in SWIM mode, while its return type is enum\ntarget_state. Ignore the type mismatch and still call the HLA API\nstate in the new SWIM API reconnect. Further commit will fix it.\n\n[1] http://kuku.eu.org/?projects/stm8spi/stm8spi\n\nChange-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\nReviewed-on: http://openocd.zylin.com/5528\nTested-by: jenkins\n"}},"d87abc4e9213bc9a35ecdd7496a2bc56565af1bf":{"kind":"TRIVIAL_REBASE","_number":4,"created":"2020-04-20 21:34:24.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/28/5528/4","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/28/5528/4","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/4 \u0026\u0026 git checkout -b change-5528 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/28/5528/4","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/4 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"566a2b82c999f195be609f35b56ec14ec5fc8d15","subject":"adapter: expose HLA interface in struct adapter_driver"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-01-26 16:00:55.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-04-20 21:03:30.000000000","tz":120},"subject":"swim: abstract the transport in stm8 target","message":"swim: abstract the transport in stm8 target\n\nSWIM is implemented by (ab)using the HLA API. This was acceptable\nwhen OpenOCD code did not provided a clear separation between\ntransports and related APIs. Still today SWIM in OpenOCD is only\nsupported by STLink, so the decision to re-use the HLA API was the\nsimpler way to implement it.\nAfter commit efd1d642220a (\"adapter: switch from struct\njtag_interface to adapter_driver\") the transports API are better\nsplit and SWIM can be implemented as a separate set of API. This\nwould open the possibility to extend OpenOCD for other adapters\nthat provide SWIM, e.g. versaloon, or through SPI emulation [1].\n\nIntroduce a new set of files swim.[ch] to handle the SWIM API.\nBeside the API that almost match the transport low-level data\ncommunication (system_reset, read_mem, write_mem), add a further\nAPI reconnect. Today, inside HLA STLink code, the reconnect is\nimplemented by hacking the HLA API state(). Please notice that\ndue to this hack the return type is incorrect; stlink_usb_state()\nreturns ERROR_OK in SWIM mode, while its return type is enum\ntarget_state. Ignore the type mismatch and still call the HLA API\nstate in the new SWIM API reconnect. Further commit will fix it.\n\n[1] http://kuku.eu.org/?projects/stm8spi/stm8spi\n\nChange-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\n"}},"69ad1d01f6cc8d5b77c90e5785fdac403bc71552":{"kind":"TRIVIAL_REBASE","_number":5,"created":"2020-05-14 14:10:29.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/28/5528/5","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/28/5528/5","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/5 \u0026\u0026 git checkout -b change-5528 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/5 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/5 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/5 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/28/5528/5","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/5 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"81d1f6c092a88221e9277f0eba93ecbb43ed2af2","subject":"adapter: expose HLA interface in struct adapter_driver"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-01-26 16:00:55.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-05-14 14:08:36.000000000","tz":120},"subject":"swim: abstract the transport in stm8 target","message":"swim: abstract the transport in stm8 target\n\nSWIM is implemented by (ab)using the HLA API. This was acceptable\nwhen OpenOCD code did not provided a clear separation between\ntransports and related APIs. Still today SWIM in OpenOCD is only\nsupported by STLink, so the decision to re-use the HLA API was the\nsimpler way to implement it.\nAfter commit efd1d642220a (\"adapter: switch from struct\njtag_interface to adapter_driver\") the transports API are better\nsplit and SWIM can be implemented as a separate set of API. This\nwould open the possibility to extend OpenOCD for other adapters\nthat provide SWIM, e.g. versaloon, or through SPI emulation [1].\n\nIntroduce a new set of files swim.[ch] to handle the SWIM API.\nBeside the API that almost match the transport low-level data\ncommunication (system_reset, read_mem, write_mem), add a further\nAPI reconnect. Today, inside HLA STLink code, the reconnect is\nimplemented by hacking the HLA API state(). Please notice that\ndue to this hack the return type is incorrect; stlink_usb_state()\nreturns ERROR_OK in SWIM mode, while its return type is enum\ntarget_state. Ignore the type mismatch and still call the HLA API\nstate in the new SWIM API reconnect. Further commit will fix it.\n\n[1] http://kuku.eu.org/?projects/stm8spi/stm8spi\n\nChange-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\n"}},"306085777b9c998cdbaffb1f5ae146dbd47538e8":{"kind":"REWORK","_number":2,"created":"2020-03-23 10:10:57.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/28/5528/2","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/28/5528/2","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/2 \u0026\u0026 git checkout -b change-5528 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/28/5528/2","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/2 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"541db28bc175252a3cb7c7bdb80b1b94616811b0","subject":"adapter: expose HLA interface in struct adapter_driver"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-01-26 16:00:55.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-03-23 10:09:43.000000000","tz":60},"subject":"swim: abstract the transport in stm8 target","message":"swim: abstract the transport in stm8 target\n\nSWIM is implemented by (ab)using the HLA API. This was acceptable\nwhen OpenOCD code did not provided a clear separation between\ntransports and related APIs. Still today SWIM in OpenOCD is only\nsupported by STLink, so the decision to re-use the HLA API was the\nsimpler way to implement it.\nAfter commit efd1d642220a (\"adapter: switch from struct\njtag_interface to adapter_driver\") the transports API are better\nsplit and SWIM can be implemented as a separate set of API. This\nwould open the possibility to extend OpenOCD for other adapters\nthat provide SWIM, e.g. versaloon, or through SPI emulation [1].\n\nIntroduce a new set of files swim.[ch] to handle the SWIM API.\nBeside the API that almost match the transport low-level data\ncommunication (system_reset, read_mem, write_mem), add a further\nAPI reconnect. Today, inside HLA STLink code, the reconnect is\nimplemented by hacking the HLA API state(). Please notice that\ndue to this hack the return type is incorrect; stlink_usb_state()\nreturns ERROR_OK in SWIM mode, while its return type is enum\ntarget_state. Ignore the type mismatch and still call the HLA API\nstate in the new SWIM API reconnect. Further commit will fix it.\n\n[1] http://kuku.eu.org/?projects/stm8spi/stm8spi\n\nChange-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\n"}},"9ffdf6a7117e41a7a7c86479fb629210e85d2861":{"kind":"TRIVIAL_REBASE","_number":3,"created":"2020-03-26 09:58:33.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/28/5528/3","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/28/5528/3","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/3 \u0026\u0026 git checkout -b change-5528 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/28/5528/3","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/3 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"80c95891be64498bf203588866327304bf722cc4","subject":"adapter: expose HLA interface in struct adapter_driver"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-01-26 16:00:55.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-03-26 09:53:51.000000000","tz":60},"subject":"swim: abstract the transport in stm8 target","message":"swim: abstract the transport in stm8 target\n\nSWIM is implemented by (ab)using the HLA API. This was acceptable\nwhen OpenOCD code did not provided a clear separation between\ntransports and related APIs. Still today SWIM in OpenOCD is only\nsupported by STLink, so the decision to re-use the HLA API was the\nsimpler way to implement it.\nAfter commit efd1d642220a (\"adapter: switch from struct\njtag_interface to adapter_driver\") the transports API are better\nsplit and SWIM can be implemented as a separate set of API. This\nwould open the possibility to extend OpenOCD for other adapters\nthat provide SWIM, e.g. versaloon, or through SPI emulation [1].\n\nIntroduce a new set of files swim.[ch] to handle the SWIM API.\nBeside the API that almost match the transport low-level data\ncommunication (system_reset, read_mem, write_mem), add a further\nAPI reconnect. Today, inside HLA STLink code, the reconnect is\nimplemented by hacking the HLA API state(). Please notice that\ndue to this hack the return type is incorrect; stlink_usb_state()\nreturns ERROR_OK in SWIM mode, while its return type is enum\ntarget_state. Ignore the type mismatch and still call the HLA API\nstate in the new SWIM API reconnect. Further commit will fix it.\n\n[1] http://kuku.eu.org/?projects/stm8spi/stm8spi\n\nChange-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\n"}},"58861384807521decd5132efee25e0b85e065069":{"kind":"REWORK","_number":1,"created":"2020-03-19 17:01:46.000000000","uploader":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"ref":"refs/changes/28/5528/1","fetch":{"anonymous http":{"url":"https://review.openocd.org/openocd","ref":"refs/changes/28/5528/1","commands":{"Branch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/1 \u0026\u0026 git checkout -b change-5528 FETCH_HEAD","Checkout":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.openocd.org/openocd refs/changes/28/5528/1","Reset To":"git fetch https://review.openocd.org/openocd refs/changes/28/5528/1 \u0026\u0026 git reset --hard FETCH_HEAD"}}},"commit":{"parents":[{"commit":"5106a124cc6c2b6d13b51aa259907ab8aa016dcd","subject":"adapter: expose HLA interface in struct adapter_driver"}],"author":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-01-26 16:00:55.000000000","tz":60},"committer":{"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","date":"2020-03-19 16:57:54.000000000","tz":60},"subject":"swim: abstract the transport in stm8 target","message":"swim: abstract the transport in stm8 target\n\nSWIM is implemented by (ab)using the HLA API. This was acceptable\nwhen OpenOCD code did not provided a clear separation between\ntransports and related APIs. Still today SWIM in OpenOCD is only\nsupported by STLink, so the decision to re-use the HLA API was the\nsimpler way to implement it.\nAfter commit efd1d642220a (\"adapter: switch from struct\njtag_interface to adapter_driver\") the transports API are better\nsplit and SWIM can be implemented as a separate set of API. This\nwould open the possibility to extend OpenOCD for other adapters\nthat provide SWIM, e.g. versaloon, or through SPI emulation [1].\n\nIntroduce a new set of files swim.[ch] to handle the SWIM API.\nBeside the API that almost match the transport low-level data\ncommunication (system_reset, read_mem, write_mem), add a further\nAPI reconnect. Today, inside HLA STLink code, the reconnect is\nimplemented by hacking the HLA API state(). Please notice that\ndue to this hack the return type is incorrect; stlink_usb_state()\nreturns ERROR_OK in SWIM mode, while its return type is enum\ntarget_state. Ignore the type mismatch and still call the HLA API\nstate in the new SWIM API reconnect. Further commit will fix it.\n\n[1] http://kuku.eu.org/?projects/stm8spi/stm8spi\n\nChange-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6\nSigned-off-by: Antonio Borneo \u003cborneo.antonio@gmail.com\u003e\n"}}},"requirements":[],"submit_records":[],"submit_requirements":[]}
