)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"598f6d310c6e14fe9c065dc5b3ed8488fbb8dae2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"026bca1e_835f7c02","updated":"2025-01-19 13:15:49.000000000","message":"Few more comments in the code.\n\nThe target CPU of this series is a RISC-V.\nAs you know, there is a fork of OpenOCD for RISC-V that has already diverged.\nWhile we are waiting for patches from the fork to merge them upstream, we are also avoiding merging here patches that would further diverge the two repositories.\n\nThis series is not present in the RISC-V branch, so is not an upstream from the fork; it\u0027s a new series.\n\nIf we accept the series here, it will be merged by the RISC-V in their periodic merge with upstream.\nWould the code merged in the fork still work? What about the TCL scripts in the last patch?\nIs there any feature from the fork that you would need upstream?","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"6872ef792c2dcf59861c0ff60d10c5fceb5cd014","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b263f409_d08d99a7","updated":"2025-01-19 11:08:19.000000000","message":"Hi Ryan, thanks for this series.\nI see that most of the files in this patch are almost copy-paste from HPM SDK.\nLikely, their license BSD-3 is compatible with OpenOCD GPLv2-or-later, so no license issues.\nIt could be nice to have in each file, or in a separate readme file, the indication of from which version of the SDK they come from and where to download it. Future changes could take advantage of such info.\nThe coding style doesn\u0027t fully match OpenOCD one, but adding the external reference implicitly means we should not modify them too much.\n\nBut, please put the SPDX in a separate first line comment, not inside a multi-line comment, keeping in mind the file type:\n- file.h \u003d\u003e `/* SPDX-License-Identifier: BSD-3-Clause */`\n- file.c \u003d\u003e `// SPDX-License-Identifier: BSD-3-Clause`\n- file.S \u003d\u003e `/* SPDX-License-Identifier: BSD-3-Clause */`\n- Makefile \u003d\u003e `# SPDX-License-Identifier: BSD-3-Clause`\n- file.ld \u003d\u003e `/* SPDX-License-Identifier: BSD-3-Clause */`","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"ade9a2ee67990dfc16a0de4bbc13338c8d0e1486","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"32f3a848_5a3118ef","in_reply_to":"026bca1e_835f7c02","updated":"2025-01-27 05:06:18.000000000","message":"Yes, these changes (including all these newly added TCL scripts) work in the riscv-openocd as well, there\u0027s no any specific needed from that fork.","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"ade9a2ee67990dfc16a0de4bbc13338c8d0e1486","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"4fe0a8b7_278adfdc","in_reply_to":"b263f409_d08d99a7","updated":"2025-01-27 05:06:18.000000000","message":"Ack","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"ade9a2ee67990dfc16a0de4bbc13338c8d0e1486","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f721de80_c5c8a41d","updated":"2025-01-27 05:06:18.000000000","message":"updated codes accordlying","commit_id":"f5b2b3a9c7f53e9c505e7e197864d41c0da0ee36"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"1243a6c9187db117a7e68ba0e6bdbe7031892c00","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"170d8b0f_334ed992","updated":"2025-09-10 13:53:11.000000000","message":"In a  previous comment I wrote:\n\u003e It could be nice to have in each file, or in a separate readme file,\n\u003e the indication of from which version of the SDK they come from and\n\u003e where to download it. Future changes could take advantage of such info.\n\nCan you please provide the version of the SDK you used here?","commit_id":"41ca2c69a805f695d344e0ef8fdcd070c941b2e6"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"50b6bf783af884cc3c40b3a8f131ef990474bf9d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"5263ed4f_108502c6","in_reply_to":"170d8b0f_334ed992","updated":"2025-09-10 14:05:19.000000000","message":"Hi Antonio,\n\nAs openocd has its own coding rule which differs from SDK\u0027s, although it is based on SDK v1.9.0, it still needs to be updated a little bit to pass the coding rule check. SDK can be found at https://github.com/hpmicro/hpm_sdk/releases. I\u0027ll add a readme.","commit_id":"41ca2c69a805f695d344e0ef8fdcd070c941b2e6"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"2ad4a05df5753ac35acc5d44e829421a8af3fc85","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"38501dc2_9b34cfff","updated":"2025-09-11 06:06:42.000000000","message":"Could you please use `tools/checkpatch.sh` locally instead of submitting whole series with checkpatch errors again and again?","commit_id":"bda61d3524e5b4ea6cdc4b28da84c2967cef0151"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"b7e8845f1b879ff75d1b7356d0f4d2ede7683d9d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"b760da76_63104431","updated":"2025-10-11 18:08:24.000000000","message":"Tomas,\ndo you have any comment on this series?","commit_id":"25d11f959b97d6fc95b576ec76602f55d28ce301"}],"contrib/loaders/flash/hpmicro/README":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"75348b81866e2a8744b1ae2f360cc6820628e97a","unresolved":true,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"- hpm_common.h and all the hpm_romapi_*.c/h are reused from hpm_sdk (v1.9.0 https://github.com/hpmicro/hpm_sdk/releases)."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Due to different coding rules, these source code needs to be updated accordinly to pass the coding rule check for openocd."}],"source_content_type":"application/octet-stream","patch_set":19,"id":"9fceecc0_d5ff8a56","line":5,"updated":"2025-09-13 15:31:03.000000000","message":"typos\ns/accordinly/accordingly/\ns/openocd/OpenOCD/\n\nWhile there, please wrap the lines to stay in 80 char/line","commit_id":"1312c4a2b4ebb3802a6f8e30f6de099353ffda44"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"e5b043a89b54247f3e029623c972518fb4cc1080","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"- hpm_common.h and all the hpm_romapi_*.c/h are reused from hpm_sdk (v1.9.0 https://github.com/hpmicro/hpm_sdk/releases)."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Due to different coding rules, these source code needs to be updated accordinly to pass the coding rule check for openocd."}],"source_content_type":"application/octet-stream","patch_set":19,"id":"40333c6b_5f297077","line":5,"in_reply_to":"9fceecc0_d5ff8a56","updated":"2025-09-15 07:46:08.000000000","message":"Done","commit_id":"1312c4a2b4ebb3802a6f8e30f6de099353ffda44"}],"contrib/loaders/flash/hpmicro/hpm_common.h":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"fc8ae6a7434cbed1d6c00753b02289a1b6033548","unresolved":true,"context_lines":[{"line_number":218,"context_line":"{"},{"line_number":219,"context_line":"\tif (value \u003d\u003d 0)"},{"line_number":220,"context_line":"\t\treturn 0;"},{"line_number":221,"context_line":"\treturn 1 + count_set_bits(value \u0026 (value - 1));"},{"line_number":222,"context_line":"}"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"/**"}],"source_content_type":"text/x-csrc","patch_set":23,"id":"bb76dc4a_669a0ab2","line":221,"updated":"2025-11-14 06:47:08.000000000","message":"The recursive implementation is horrible!\nBut seems that none of inline function is really used. Please drop them","commit_id":"12f9c34399862769feafe78a4c03c5e62271813f"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"6196d0981d7ff6c9e18c8b0183af5efa873d21f2","unresolved":false,"context_lines":[{"line_number":218,"context_line":"{"},{"line_number":219,"context_line":"\tif (value \u003d\u003d 0)"},{"line_number":220,"context_line":"\t\treturn 0;"},{"line_number":221,"context_line":"\treturn 1 + count_set_bits(value \u0026 (value - 1));"},{"line_number":222,"context_line":"}"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"/**"}],"source_content_type":"text/x-csrc","patch_set":23,"id":"61fb3dfa_4efd5447","line":221,"in_reply_to":"bb76dc4a_669a0ab2","updated":"2025-11-14 10:22:16.000000000","message":"Done","commit_id":"12f9c34399862769feafe78a4c03c5e62271813f"}],"contrib/loaders/flash/hpmicro/hpm_romapi.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"598f6d310c6e14fe9c065dc5b3ed8488fbb8dae2","unresolved":true,"context_lines":[{"line_number":50,"context_line":"#define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"#endif /* HPM_ROMAPI_H */"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"72540e62_838219bd","line":53,"updated":"2025-01-19 13:15:49.000000000","message":"no need for so many empty lines. Usually one is enough","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"ade9a2ee67990dfc16a0de4bbc13338c8d0e1486","unresolved":false,"context_lines":[{"line_number":50,"context_line":"#define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"#endif /* HPM_ROMAPI_H */"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"5fe6b5e8_1c27e3e4","line":53,"in_reply_to":"72540e62_838219bd","updated":"2025-01-27 05:06:18.000000000","message":"Ack","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"}],"contrib/loaders/flash/hpmicro/hpm_romapi_xpi_nor_def.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"1243a6c9187db117a7e68ba0e6bdbe7031892c00","unresolved":true,"context_lines":[{"line_number":1,"context_line":"/* SPDX-License-Identifier: BSD-3-Clause */"},{"line_number":2,"context_line":"/* Copyright (c) 2021 HPMicro"},{"line_number":3,"context_line":" *"},{"line_number":4,"context_line":" *"},{"line_number":5,"context_line":" */"}],"source_content_type":"text/x-csrc","patch_set":16,"id":"60dd754c_e61b4f50","line":2,"updated":"2025-09-10 13:53:11.000000000","message":"Strange comment style. Can you please change it as in the other files:\n```\n/*\n * Copyright (c) 2021 HPMicro\n */\n```","commit_id":"41ca2c69a805f695d344e0ef8fdcd070c941b2e6"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"8ef0b09c77ff17c219ac9b15cf7cd43c9a3c1d51","unresolved":false,"context_lines":[{"line_number":1,"context_line":"/* SPDX-License-Identifier: BSD-3-Clause */"},{"line_number":2,"context_line":"/* Copyright (c) 2021 HPMicro"},{"line_number":3,"context_line":" *"},{"line_number":4,"context_line":" *"},{"line_number":5,"context_line":" */"}],"source_content_type":"text/x-csrc","patch_set":16,"id":"4d4b0efd_516465e5","line":2,"in_reply_to":"60dd754c_e61b4f50","updated":"2025-09-10 14:05:43.000000000","message":"Done","commit_id":"41ca2c69a805f695d344e0ef8fdcd070c941b2e6"}],"contrib/loaders/flash/hpmicro/hpm_xpi_flash.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"598f6d310c6e14fe9c065dc5b3ed8488fbb8dae2","unresolved":true,"context_lines":[{"line_number":6,"context_line":"#ifndef HPM_XPI_FLASH_H"},{"line_number":7,"context_line":"#define HPM_XPI_FLASH_H"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"#define FLASH_INIT\t(0)"},{"line_number":10,"context_line":"#define FLASH_ERASE   (0x6)"},{"line_number":11,"context_line":"#define FLASH_PROGRAM (0xc)"},{"line_number":12,"context_line":"#define FLASH_READ (0x12)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"3fa85bbb_429623e4","line":9,"updated":"2025-01-19 13:15:49.000000000","message":"please be coherent with the use of TAB (as in this line) or space (as in next lines)","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"ade9a2ee67990dfc16a0de4bbc13338c8d0e1486","unresolved":false,"context_lines":[{"line_number":6,"context_line":"#ifndef HPM_XPI_FLASH_H"},{"line_number":7,"context_line":"#define HPM_XPI_FLASH_H"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"#define FLASH_INIT\t(0)"},{"line_number":10,"context_line":"#define FLASH_ERASE   (0x6)"},{"line_number":11,"context_line":"#define FLASH_PROGRAM (0xc)"},{"line_number":12,"context_line":"#define FLASH_READ (0x12)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"e2ad0bad_d210687e","line":9,"in_reply_to":"3fa85bbb_429623e4","updated":"2025-01-27 05:06:18.000000000","message":"Ack","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"598f6d310c6e14fe9c065dc5b3ed8488fbb8dae2","unresolved":true,"context_lines":[{"line_number":13,"context_line":"#define FLASH_GET_INFO (0x18)"},{"line_number":14,"context_line":"#define FLASH_ERASE_CHIP (0x1e)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"uint8_t flash_algo[] \u003d {"},{"line_number":17,"context_line":"#include \"hpm_xpi_flash.inc\""},{"line_number":18,"context_line":"};"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"#endif"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"1eec1a92_95506af5","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":0},"updated":"2025-01-19 13:15:49.000000000","message":"This file is used by the driver in OpenOCD.\nIt is not a good idea to initialize an array inside a file.h; there should be declarations only in include files.\nPlease move this in the C file of the driver with the whole path:\n```\nstatic uint8_t flash_algo[] \u003d {\n#include \"../../../contrib/loaders/flash/hpmicro/hpm_xpi_flash.inc\"\n};\n```\nFor the macros above, it could be ok either to keep a file .h in the `contrib` folder, or to move the macros directly in `flash/nor/hpm_xpi.c`","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"},{"author":{"_account_id":1001991,"name":"Ryan QIAN","email":"jianghao.qian@outlook.com","username":"jhqian"},"change_message_id":"ade9a2ee67990dfc16a0de4bbc13338c8d0e1486","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#define FLASH_GET_INFO (0x18)"},{"line_number":14,"context_line":"#define FLASH_ERASE_CHIP (0x1e)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"uint8_t flash_algo[] \u003d {"},{"line_number":17,"context_line":"#include \"hpm_xpi_flash.inc\""},{"line_number":18,"context_line":"};"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"#endif"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"d5271366_c9ac3c17","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":0},"in_reply_to":"1eec1a92_95506af5","updated":"2025-01-27 05:06:18.000000000","message":"Ack","commit_id":"c61ed0994f3ad171cb53231a9c4e897a492d7d62"}]}
