)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1f596ef70fbf6f9eb29ab2208eccea2937ce0df0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a355f35a_94ec2899","updated":"2022-08-01 08:42:56.000000000","message":"See","commit_id":"3ec6104b0b5cde67e4707c6a2605144fb0ce5170"}],"src/flash/nor/psoc4.c":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1f596ef70fbf6f9eb29ab2208eccea2937ce0df0","unresolved":true,"context_lines":[{"line_number":663,"context_line":"\t\tmemset(row_buffer, bank-\u003edefault_padded_value, row_offset);"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"\t/*"},{"line_number":666,"context_line":"\t * We use breakpoint in target_run_algorithm()."},{"line_number":667,"context_line":"\t * Don\u0027t poll to avoid halted events"},{"line_number":668,"context_line":"\t * TODO: should mask/unmask this be moved in target_run_algorithm() ?"},{"line_number":669,"context_line":"\t */"},{"line_number":670,"context_line":"\tbool save_poll_mask \u003d jtag_poll_mask();"},{"line_number":671,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"e35f0ab7_615dd05d","line":668,"range":{"start_line":666,"start_character":3,"end_line":668,"end_character":70},"updated":"2022-08-01 08:42:56.000000000","message":"At least on Cortex-M armv7m_wait_algorithm() calls target_wait_state()\nand it calls in a loop target_poll() - so TARGET_EVENT_DEBUG_HALTED is emitted regardless of polling is masked or not.\n\nIt\u0027s my bad there is no comment explaining why psoc4 needs to suppress polling.\nIIRC SW-DP gets blocked for a while after ROM sys request is started. So masking perhaps prevents OpenOCD to poll too early.","commit_id":"3ec6104b0b5cde67e4707c6a2605144fb0ce5170"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"eb6b766b946c1e07892d0ec40b9d00bb4fa567c3","unresolved":false,"context_lines":[{"line_number":663,"context_line":"\t\tmemset(row_buffer, bank-\u003edefault_padded_value, row_offset);"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"\t/*"},{"line_number":666,"context_line":"\t * We use breakpoint in target_run_algorithm()."},{"line_number":667,"context_line":"\t * Don\u0027t poll to avoid halted events"},{"line_number":668,"context_line":"\t * TODO: should mask/unmask this be moved in target_run_algorithm() ?"},{"line_number":669,"context_line":"\t */"},{"line_number":670,"context_line":"\tbool save_poll_mask \u003d jtag_poll_mask();"},{"line_number":671,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"0bdbcd63_5ed2358c","line":668,"range":{"start_line":666,"start_character":3,"end_line":668,"end_character":70},"in_reply_to":"7c3ecf13_3940a603","updated":"2022-08-01 17:01:59.000000000","message":"Ack","commit_id":"3ec6104b0b5cde67e4707c6a2605144fb0ce5170"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"050439c03a6b27f698d303527208923c31a9c904","unresolved":true,"context_lines":[{"line_number":663,"context_line":"\t\tmemset(row_buffer, bank-\u003edefault_padded_value, row_offset);"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"\t/*"},{"line_number":666,"context_line":"\t * We use breakpoint in target_run_algorithm()."},{"line_number":667,"context_line":"\t * Don\u0027t poll to avoid halted events"},{"line_number":668,"context_line":"\t * TODO: should mask/unmask this be moved in target_run_algorithm() ?"},{"line_number":669,"context_line":"\t */"},{"line_number":670,"context_line":"\tbool save_poll_mask \u003d jtag_poll_mask();"},{"line_number":671,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"7c3ecf13_3940a603","line":668,"range":{"start_line":666,"start_character":3,"end_line":668,"end_character":70},"in_reply_to":"e35f0ab7_615dd05d","updated":"2022-08-01 16:29:11.000000000","message":"Thanks for checking this patch.\nI will change the comment","commit_id":"3ec6104b0b5cde67e4707c6a2605144fb0ce5170"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"eb6b766b946c1e07892d0ec40b9d00bb4fa567c3","unresolved":false,"context_lines":[{"line_number":662,"context_line":"\tif (row_offset)"},{"line_number":663,"context_line":"\t\tmemset(row_buffer, bank-\u003edefault_padded_value, row_offset);"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"\t/* Mask automatic polling triggered by execution of halted events */"},{"line_number":666,"context_line":"\tbool save_poll_mask \u003d jtag_poll_mask();"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"\twhile (count) {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"87c95901_c93a5204","line":665,"updated":"2022-08-01 17:01:59.000000000","message":"Reconsidering this comment...\nThis mask/unmask only blocks automatic polling that OpenOCD runs while executing TCL commands.\nYou pointed at calling target_poll() somewhere else in the code; that is fine!\nWhat we want to avoid here is that the execution of the TCL handler, triggered by TARGET_EVENT_DEBUG_HALTED, could call again poll().","commit_id":"bc480c167a09dd1cc65932063d5aaec60c58f660"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"92b7cbeb71b10869593e1568610470badad3e8a9","unresolved":false,"context_lines":[{"line_number":662,"context_line":"\tif (row_offset)"},{"line_number":663,"context_line":"\t\tmemset(row_buffer, bank-\u003edefault_padded_value, row_offset);"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"\t/* Mask automatic polling triggered by execution of halted events */"},{"line_number":666,"context_line":"\tbool save_poll_mask \u003d jtag_poll_mask();"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"\twhile (count) {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"d6c554bd_7d747c32","line":665,"in_reply_to":"87c95901_c93a5204","updated":"2022-08-02 10:44:57.000000000","message":"I wanted to test on PSoC hw if masking of polls is really needed. And guess what: I had to fix completely broken kitprog first 😞\n7107: jtag/drivers/kitprog: workaround serious firmware problem | https://review.openocd.org/c/openocd/+/7107\n\nWell the kitprog works again but I\u0027m not able to find any good reason why polling is masked during target algo flashing. Flashing works just fine with polling enabled. Let\u0027s keep masking for v0.12.0 and I\u0027ll remove it after release.","commit_id":"bc480c167a09dd1cc65932063d5aaec60c58f660"}]}
