)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"bd66d8e9_fc23227a","updated":"2023-03-29 18:44:50.000000000","message":"Use tools/checkpatch.sh before submitting the patch.","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"feffd8457c14247a398a1ebcf0a427c86e1e3b34","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"38ce1969_760b5cae","updated":"2023-04-02 07:22:52.000000000","message":"Done replying","commit_id":"0364d93bbdc59c6e69b33492016df183e8558e88"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"37face7aedafa91af1be048969b4aba6baf6abf0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"219ab9c0_4e6a3059","updated":"2023-04-01 13:16:58.000000000","message":"Fast read definitely is faster. Especially when doing bitbanging JTAG.\nAnything I shall do next ?","commit_id":"0364d93bbdc59c6e69b33492016df183e8558e88"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"8183ec0a_fb2fbce0","updated":"2023-03-30 16:09:06.000000000","message":"I answered most questions. I can\u0027t tell about the time gain however. If that\u0027s OK, I could simply suppress the comment. Tell me.","commit_id":"0364d93bbdc59c6e69b33492016df183e8558e88"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"cae9cda0349be6edadd9403b8f6a60a19a07b9dd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"a5aae828_11886797","updated":"2023-04-01 17:03:50.000000000","message":"Thanks for the patch.\nCan you please answer to my question below?","commit_id":"0364d93bbdc59c6e69b33492016df183e8558e88"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"9c1a96dfb0acc9bbab6dcba66353bf805a44967c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"f56d7d74_fc4743a0","in_reply_to":"8183ec0a_fb2fbce0","updated":"2023-03-31 15:21:23.000000000","message":"Yes, it would be ok. I just wanted to be sure that fast read is really faster than normal read.","commit_id":"0364d93bbdc59c6e69b33492016df183e8558e88"}],"src/target/mips_m4k.c":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":true,"context_lines":[{"line_number":1027,"context_line":"\t\tint retval \u003d mips_m4k_bulk_read_memory(target, address, count, buffer);"},{"line_number":1028,"context_line":"\t\tif (retval \u003d\u003d ERROR_OK)"},{"line_number":1029,"context_line":"\t\t\treturn ERROR_OK;"},{"line_number":1030,"context_line":"\t\tLOG_WARNING(\"Falling back to non-bulk write\");"},{"line_number":1031,"context_line":"\t}"},{"line_number":1032,"context_line":"\t/* since we don\u0027t know if buffer is aligned, we allocate new mem that is always aligned */"},{"line_number":1033,"context_line":"\tvoid *t \u003d NULL;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"264c18dd_613da1f6","line":1030,"range":{"start_line":1030,"start_character":40,"end_line":1030,"end_character":45},"updated":"2023-03-29 18:44:50.000000000","message":"read?","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"\t\tint retval \u003d mips_m4k_bulk_read_memory(target, address, count, buffer);"},{"line_number":1028,"context_line":"\t\tif (retval \u003d\u003d ERROR_OK)"},{"line_number":1029,"context_line":"\t\t\treturn ERROR_OK;"},{"line_number":1030,"context_line":"\t\tLOG_WARNING(\"Falling back to non-bulk write\");"},{"line_number":1031,"context_line":"\t}"},{"line_number":1032,"context_line":"\t/* since we don\u0027t know if buffer is aligned, we allocate new mem that is always aligned */"},{"line_number":1033,"context_line":"\tvoid *t \u003d NULL;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"cb802ef2_9d8b121a","line":1030,"range":{"start_line":1030,"start_character":40,"end_line":1030,"end_character":45},"in_reply_to":"264c18dd_613da1f6","updated":"2023-03-30 16:09:06.000000000","message":"Done","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":true,"context_lines":[{"line_number":1274,"context_line":"\t\treturn ERROR_TARGET_UNALIGNED_ACCESS;"},{"line_number":1275,"context_line":""},{"line_number":1276,"context_line":"\tif (!mips32-\u003efast_data_area) {"},{"line_number":1277,"context_line":"\t\t/* Get memory for block write handler"},{"line_number":1278,"context_line":"\t\t * we preserve this area between calls and gain a speed increase"},{"line_number":1279,"context_line":"\t\t * of about 3kb/sec when writing flash"},{"line_number":1280,"context_line":"\t\t * this will be released/nulled by the system when the target is resumed or reset */"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"99fee387_2b07dade","line":1277,"range":{"start_line":1277,"start_character":26,"end_line":1277,"end_character":31},"updated":"2023-03-29 18:44:50.000000000","message":"read","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"\t\treturn ERROR_TARGET_UNALIGNED_ACCESS;"},{"line_number":1275,"context_line":""},{"line_number":1276,"context_line":"\tif (!mips32-\u003efast_data_area) {"},{"line_number":1277,"context_line":"\t\t/* Get memory for block write handler"},{"line_number":1278,"context_line":"\t\t * we preserve this area between calls and gain a speed increase"},{"line_number":1279,"context_line":"\t\t * of about 3kb/sec when writing flash"},{"line_number":1280,"context_line":"\t\t * this will be released/nulled by the system when the target is resumed or reset */"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"688b23e7_9efdd3ff","line":1277,"range":{"start_line":1277,"start_character":26,"end_line":1277,"end_character":31},"in_reply_to":"99fee387_2b07dade","updated":"2023-03-30 16:09:06.000000000","message":"Done","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":true,"context_lines":[{"line_number":1276,"context_line":"\tif (!mips32-\u003efast_data_area) {"},{"line_number":1277,"context_line":"\t\t/* Get memory for block write handler"},{"line_number":1278,"context_line":"\t\t * we preserve this area between calls and gain a speed increase"},{"line_number":1279,"context_line":"\t\t * of about 3kb/sec when writing flash"},{"line_number":1280,"context_line":"\t\t * this will be released/nulled by the system when the target is resumed or reset */"},{"line_number":1281,"context_line":"\t\tretval \u003d target_alloc_working_area(target,"},{"line_number":1282,"context_line":"\t\t\t\tMIPS32_FASTDATA_HANDLER_SIZE,"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"bbdc099a_63992ece","line":1279,"range":{"start_line":1279,"start_character":5,"end_line":1279,"end_character":40},"updated":"2023-03-29 18:44:50.000000000","message":"Same for read? Did you measured the speed?","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"cae9cda0349be6edadd9403b8f6a60a19a07b9dd","unresolved":true,"context_lines":[{"line_number":1276,"context_line":"\tif (!mips32-\u003efast_data_area) {"},{"line_number":1277,"context_line":"\t\t/* Get memory for block write handler"},{"line_number":1278,"context_line":"\t\t * we preserve this area between calls and gain a speed increase"},{"line_number":1279,"context_line":"\t\t * of about 3kb/sec when writing flash"},{"line_number":1280,"context_line":"\t\t * this will be released/nulled by the system when the target is resumed or reset */"},{"line_number":1281,"context_line":"\t\tretval \u003d target_alloc_working_area(target,"},{"line_number":1282,"context_line":"\t\t\t\tMIPS32_FASTDATA_HANDLER_SIZE,"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"d3c22bff_f2dae6d3","line":1279,"range":{"start_line":1279,"start_character":5,"end_line":1279,"end_character":40},"in_reply_to":"adaf2933_f0a44144","updated":"2023-04-01 17:03:50.000000000","message":"What do you mean here? That the standard read is not working?","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":true,"context_lines":[{"line_number":1276,"context_line":"\tif (!mips32-\u003efast_data_area) {"},{"line_number":1277,"context_line":"\t\t/* Get memory for block write handler"},{"line_number":1278,"context_line":"\t\t * we preserve this area between calls and gain a speed increase"},{"line_number":1279,"context_line":"\t\t * of about 3kb/sec when writing flash"},{"line_number":1280,"context_line":"\t\t * this will be released/nulled by the system when the target is resumed or reset */"},{"line_number":1281,"context_line":"\t\tretval \u003d target_alloc_working_area(target,"},{"line_number":1282,"context_line":"\t\t\t\tMIPS32_FASTDATA_HANDLER_SIZE,"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"adaf2933_f0a44144","line":1279,"range":{"start_line":1279,"start_character":5,"end_line":1279,"end_character":40},"in_reply_to":"bbdc099a_63992ece","updated":"2023-03-30 16:09:06.000000000","message":"No, I did not measure the speed as without fast read, I never got though reading even after hours.","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"feffd8457c14247a398a1ebcf0a427c86e1e3b34","unresolved":true,"context_lines":[{"line_number":1276,"context_line":"\tif (!mips32-\u003efast_data_area) {"},{"line_number":1277,"context_line":"\t\t/* Get memory for block write handler"},{"line_number":1278,"context_line":"\t\t * we preserve this area between calls and gain a speed increase"},{"line_number":1279,"context_line":"\t\t * of about 3kb/sec when writing flash"},{"line_number":1280,"context_line":"\t\t * this will be released/nulled by the system when the target is resumed or reset */"},{"line_number":1281,"context_line":"\t\tretval \u003d target_alloc_working_area(target,"},{"line_number":1282,"context_line":"\t\t\t\tMIPS32_FASTDATA_HANDLER_SIZE,"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"f8fdd7fa_a291aff8","line":1279,"range":{"start_line":1279,"start_character":5,"end_line":1279,"end_character":40},"in_reply_to":"d3c22bff_f2dae6d3","updated":"2023-04-02 07:22:52.000000000","message":"I can\u0027t tell for sure. But I have a kind of \"special setup\" where I do JTAG emulation by bitbanging GPIOs. On that setup, I could never successfully either program or readback the embedded flash of the PIC32MX being present on the chain. I may not have wait long enought though.","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":true,"context_lines":[{"line_number":1294,"context_line":""},{"line_number":1295,"context_line":"\tif (address \u003c (fast_data_area-\u003eaddress + fast_data_area-\u003esize) \u0026\u0026"},{"line_number":1296,"context_line":"\t\t\tfast_data_area-\u003eaddress \u003c (address + count)) {"},{"line_number":1297,"context_line":"\t\tLOG_ERROR(\"fast_data (\" TARGET_ADDR_FMT \") is within write area \""},{"line_number":1298,"context_line":"\t\t\t\t\"(\" TARGET_ADDR_FMT \"-\" TARGET_ADDR_FMT \").\","},{"line_number":1299,"context_line":"\t\t\t\tfast_data_area-\u003eaddress, address, address + count);"},{"line_number":1300,"context_line":"\t\tLOG_ERROR(\"Change work-area-phys or load_image address!\");"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"b207cb0c_d712110f","line":1297,"range":{"start_line":1297,"start_character":55,"end_line":1297,"end_character":60},"updated":"2023-03-29 18:44:50.000000000","message":"read","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":false,"context_lines":[{"line_number":1294,"context_line":""},{"line_number":1295,"context_line":"\tif (address \u003c (fast_data_area-\u003eaddress + fast_data_area-\u003esize) \u0026\u0026"},{"line_number":1296,"context_line":"\t\t\tfast_data_area-\u003eaddress \u003c (address + count)) {"},{"line_number":1297,"context_line":"\t\tLOG_ERROR(\"fast_data (\" TARGET_ADDR_FMT \") is within write area \""},{"line_number":1298,"context_line":"\t\t\t\t\"(\" TARGET_ADDR_FMT \"-\" TARGET_ADDR_FMT \").\","},{"line_number":1299,"context_line":"\t\t\t\tfast_data_area-\u003eaddress, address, address + count);"},{"line_number":1300,"context_line":"\t\tLOG_ERROR(\"Change work-area-phys or load_image address!\");"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"653f2151_ef23b50e","line":1297,"range":{"start_line":1297,"start_character":55,"end_line":1297,"end_character":60},"in_reply_to":"b207cb0c_d712110f","updated":"2023-03-30 16:09:06.000000000","message":"Done","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":true,"context_lines":[{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":"\t/* mips32_pracc_fastdata_xfer requires uint32_t in host endianness, */"},{"line_number":1305,"context_line":"\t/* but byte array represents target endianness                      */"},{"line_number":1306,"context_line":"\tuint32_t *t \u003d NULL;"},{"line_number":1307,"context_line":"\tt \u003d malloc(count * sizeof(uint32_t));"},{"line_number":1308,"context_line":"\tif (!t) {"},{"line_number":1309,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"7d93641b_610e2ed5","line":1306,"range":{"start_line":1306,"start_character":13,"end_line":1306,"end_character":20},"updated":"2023-03-29 18:44:50.000000000","message":"Copied from write code but useless. Directly assign malloc() result","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":false,"context_lines":[{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":"\t/* mips32_pracc_fastdata_xfer requires uint32_t in host endianness, */"},{"line_number":1305,"context_line":"\t/* but byte array represents target endianness                      */"},{"line_number":1306,"context_line":"\tuint32_t *t \u003d NULL;"},{"line_number":1307,"context_line":"\tt \u003d malloc(count * sizeof(uint32_t));"},{"line_number":1308,"context_line":"\tif (!t) {"},{"line_number":1309,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"2148121c_61f93ed4","line":1306,"range":{"start_line":1306,"start_character":13,"end_line":1306,"end_character":20},"in_reply_to":"7d93641b_610e2ed5","updated":"2023-03-30 16:09:06.000000000","message":"Done","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"67593d6426fb5de92586e984b854668489fa0a9a","unresolved":true,"context_lines":[{"line_number":1313,"context_line":"\tretval \u003d mips32_pracc_fastdata_xfer(ejtag_info, mips32-\u003efast_data_area, write_t, address,"},{"line_number":1314,"context_line":"\t\t\tcount, t);"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"\tuint32_t *h \u003d NULL;"},{"line_number":1317,"context_line":"\th \u003d malloc(count * sizeof(uint32_t));"},{"line_number":1318,"context_line":"\tif (!h) {"},{"line_number":1319,"context_line":"\t\tfree(t);"},{"line_number":1320,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":1321,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1322,"context_line":"\t}"},{"line_number":1323,"context_line":"\ttarget_buffer_get_u32_array(target, (uint8_t *)t, count, h);"},{"line_number":1324,"context_line":"\tmemcpy (buffer, h, count * sizeof(uint32_t));"},{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"\tfree(t);"},{"line_number":1327,"context_line":"\tfree(h);"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"a9419822_33ac1523","line":1324,"range":{"start_line":1316,"start_character":1,"end_line":1324,"end_character":46},"updated":"2023-03-29 18:44:50.000000000","message":"Don\u0027t invent nonsense. Don\u0027t type cast pointers.\ntarget_buffer_set_u32_array() is probably the function you need.","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"},{"author":{"_account_id":1002132,"name":"boblegal31","email":"devel@thom.fr.eu.org","username":"boblegal31"},"change_message_id":"1b4e6131b19dbc143289022b08e0a90497d069d0","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"\tretval \u003d mips32_pracc_fastdata_xfer(ejtag_info, mips32-\u003efast_data_area, write_t, address,"},{"line_number":1314,"context_line":"\t\t\tcount, t);"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"\tuint32_t *h \u003d NULL;"},{"line_number":1317,"context_line":"\th \u003d malloc(count * sizeof(uint32_t));"},{"line_number":1318,"context_line":"\tif (!h) {"},{"line_number":1319,"context_line":"\t\tfree(t);"},{"line_number":1320,"context_line":"\t\tLOG_ERROR(\"Out of memory\");"},{"line_number":1321,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":1322,"context_line":"\t}"},{"line_number":1323,"context_line":"\ttarget_buffer_get_u32_array(target, (uint8_t *)t, count, h);"},{"line_number":1324,"context_line":"\tmemcpy (buffer, h, count * sizeof(uint32_t));"},{"line_number":1325,"context_line":""},{"line_number":1326,"context_line":"\tfree(t);"},{"line_number":1327,"context_line":"\tfree(h);"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"13f2e150_e5478f8c","line":1324,"range":{"start_line":1316,"start_character":1,"end_line":1324,"end_character":46},"in_reply_to":"a9419822_33ac1523","updated":"2023-03-30 16:09:06.000000000","message":"I missed this one sorry. Fixed now","commit_id":"5e9a8356cc0c3769ef625bcfa4a8ad2d537938c7"}]}
