)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1002363,"name":"Jasper v. B.","email":"jasper@mezzo.de","username":"jazzpi"},"change_message_id":"0500210f3258a03dcd16b67c501bace5f1d957ac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"22608c87_86a086d7","updated":"2026-10-05 15:06:03.000000000","message":"Gerrit is showing a merge conflict, but I already rebased the branch onto `origin/master`. Not sure what\u0027s going on...","commit_id":"2ce92b6ab9cc503ac840543dbb982e62c65478b4"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"6325e95c6d9e82c84663f1b627cfe90f5894dfcb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"1a0332a9_576b1da6","in_reply_to":"22608c87_86a086d7","updated":"2026-10-05 15:32:26.000000000","message":"It\u0027s normal in the chained patch series, it just shows that this patch alone cannot be merged onto master and should disappear as soon as the previous patches get merged.\n\nBTW No need to rebase the series of patches with every change. Better save some load of our overloaded jenkins.","commit_id":"2ce92b6ab9cc503ac840543dbb982e62c65478b4"}],"src/flash/nor/kinetis.c":[{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"cd76ca3e411002896fdf0e9727470f077030b7ec","unresolved":true,"context_lines":[{"line_number":3184,"context_line":""},{"line_number":3185,"context_line":"\tk_chip \u003d kinetis_get_chip(target);"},{"line_number":3186,"context_line":"\tif (!k_chip) {"},{"line_number":3187,"context_line":"\t\tLOG_ERROR(\"Chip not probed.\");"},{"line_number":3188,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":3189,"context_line":"\t}"},{"line_number":3190,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"2ac9cea6_d94a9124","line":3187,"range":{"start_line":3187,"start_character":2,"end_line":3187,"end_character":32},"updated":"2026-10-02 04:47:36.000000000","message":"k_chip is allocated during init, not in probe.\nThis actually should not happen and in other parts of the driver does not log anything. Or reword to something like \"BUG: cannot find Kinetis chip structure\"","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1002363,"name":"Jasper v. B.","email":"jasper@mezzo.de","username":"jazzpi"},"change_message_id":"74c524f5ad8aa6be56e05a35cf8a22bba33d9bf2","unresolved":true,"context_lines":[{"line_number":3184,"context_line":""},{"line_number":3185,"context_line":"\tk_chip \u003d kinetis_get_chip(target);"},{"line_number":3186,"context_line":"\tif (!k_chip) {"},{"line_number":3187,"context_line":"\t\tLOG_ERROR(\"Chip not probed.\");"},{"line_number":3188,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":3189,"context_line":"\t}"},{"line_number":3190,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"b037e60d_90286347","line":3187,"range":{"start_line":3187,"start_character":2,"end_line":3187,"end_character":32},"in_reply_to":"2ac9cea6_d94a9124","updated":"2026-10-05 10:28:17.000000000","message":"I just moved it from the `SHOW_INFO` branch since other branches also touch `k_chip`. But I guess previously this line already dereferenced `k_chip` before anything did a NULL check. Should I just get rid of the check altogether?","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1002363,"name":"Jasper v. B.","email":"jasper@mezzo.de","username":"jazzpi"},"change_message_id":"0500210f3258a03dcd16b67c501bace5f1d957ac","unresolved":false,"context_lines":[{"line_number":3184,"context_line":""},{"line_number":3185,"context_line":"\tk_chip \u003d kinetis_get_chip(target);"},{"line_number":3186,"context_line":"\tif (!k_chip) {"},{"line_number":3187,"context_line":"\t\tLOG_ERROR(\"Chip not probed.\");"},{"line_number":3188,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":3189,"context_line":"\t}"},{"line_number":3190,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"8861598e_5c8f4711","line":3187,"range":{"start_line":3187,"start_character":2,"end_line":3187,"end_character":32},"in_reply_to":"adf1e379_bcc10486","updated":"2026-10-05 15:06:03.000000000","message":"Done","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"3f5ae4c55845545ccb4e8431be1e0ea5d7cf7a8d","unresolved":true,"context_lines":[{"line_number":3184,"context_line":""},{"line_number":3185,"context_line":"\tk_chip \u003d kinetis_get_chip(target);"},{"line_number":3186,"context_line":"\tif (!k_chip) {"},{"line_number":3187,"context_line":"\t\tLOG_ERROR(\"Chip not probed.\");"},{"line_number":3188,"context_line":"\t\treturn ERROR_FAIL;"},{"line_number":3189,"context_line":"\t}"},{"line_number":3190,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"adf1e379_bcc10486","line":3187,"range":{"start_line":3187,"start_character":2,"end_line":3187,"end_character":32},"in_reply_to":"b037e60d_90286347","updated":"2026-10-05 13:12:13.000000000","message":"Yes, it\u0027s the problem of the original (probably my) code.\nLooked more carefully... `target` is get by `get_current_target(CMD_CTX)`. If we select other target than the one the kinetis flash is created with we get NULL from `kinetis_get_chip(target)`. So unlike the standard driver API functions the check and error message should be here. Please change the error log to\n`command_print(CMD, \"[%s] is not a Kinetis chip\", target_name(target))`","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"cd76ca3e411002896fdf0e9727470f077030b7ec","unresolved":true,"context_lines":[{"line_number":3200,"context_line":"\t}"},{"line_number":3201,"context_line":"\tswitch (sz_type) {"},{"line_number":3202,"context_line":"\tcase SHOW_INFO:"},{"line_number":3203,"context_line":"\t\tresult \u003d target_read_u32(target, k_chip-\u003esim_base + SIM_FCFG1_OFFSET, \u0026k_chip-\u003esim_fcfg1);"},{"line_number":3204,"context_line":"\t\tif (result !\u003d ERROR_OK)"},{"line_number":3205,"context_line":"\t\t\treturn result;"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"7bb48053_590e58a9","line":3203,"range":{"start_line":3203,"start_character":73,"end_line":3203,"end_character":90},"updated":"2026-10-02 04:47:36.000000000","message":"The original code intentionally reads FCFG1 to a local variable not to break anything by changing the cached value without running the probe. Could you recheck all `sim_fcfg1` usage?\n\nOr may be safer: read to a local var and if differs from stored `k_chip-\u003esim_fcfg1` then invalidate probed flags similarly as at the end of repartitioning (could be done also at the end of command). Forcing re-probe, updating of `k_chip-\u003esim_fcfg1` should be safe.","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1002363,"name":"Jasper v. B.","email":"jasper@mezzo.de","username":"jazzpi"},"change_message_id":"0500210f3258a03dcd16b67c501bace5f1d957ac","unresolved":true,"context_lines":[{"line_number":3200,"context_line":"\t}"},{"line_number":3201,"context_line":"\tswitch (sz_type) {"},{"line_number":3202,"context_line":"\tcase SHOW_INFO:"},{"line_number":3203,"context_line":"\t\tresult \u003d target_read_u32(target, k_chip-\u003esim_base + SIM_FCFG1_OFFSET, \u0026k_chip-\u003esim_fcfg1);"},{"line_number":3204,"context_line":"\t\tif (result !\u003d ERROR_OK)"},{"line_number":3205,"context_line":"\t\t\treturn result;"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"3cc783c2_ccec555d","line":3203,"range":{"start_line":3203,"start_character":73,"end_line":3203,"end_character":90},"in_reply_to":"223dbb1c_c14733dc","updated":"2026-10-05 15:06:03.000000000","message":"Done. The non-anonymous `chip_type` enum led to a somewhat bigger change set in the previous commit.","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"6325e95c6d9e82c84663f1b627cfe90f5894dfcb","unresolved":false,"context_lines":[{"line_number":3200,"context_line":"\t}"},{"line_number":3201,"context_line":"\tswitch (sz_type) {"},{"line_number":3202,"context_line":"\tcase SHOW_INFO:"},{"line_number":3203,"context_line":"\t\tresult \u003d target_read_u32(target, k_chip-\u003esim_base + SIM_FCFG1_OFFSET, \u0026k_chip-\u003esim_fcfg1);"},{"line_number":3204,"context_line":"\t\tif (result !\u003d ERROR_OK)"},{"line_number":3205,"context_line":"\t\t\treturn result;"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"40d9fed3_6748b81f","line":3203,"range":{"start_line":3203,"start_character":73,"end_line":3203,"end_character":90},"in_reply_to":"3cc783c2_ccec555d","updated":"2026-10-05 15:32:26.000000000","message":"Ack","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1002363,"name":"Jasper v. B.","email":"jasper@mezzo.de","username":"jazzpi"},"change_message_id":"74c524f5ad8aa6be56e05a35cf8a22bba33d9bf2","unresolved":true,"context_lines":[{"line_number":3200,"context_line":"\t}"},{"line_number":3201,"context_line":"\tswitch (sz_type) {"},{"line_number":3202,"context_line":"\tcase SHOW_INFO:"},{"line_number":3203,"context_line":"\t\tresult \u003d target_read_u32(target, k_chip-\u003esim_base + SIM_FCFG1_OFFSET, \u0026k_chip-\u003esim_fcfg1);"},{"line_number":3204,"context_line":"\t\tif (result !\u003d ERROR_OK)"},{"line_number":3205,"context_line":"\t\t\treturn result;"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"f94d155c_ee1b432f","line":3203,"range":{"start_line":3203,"start_character":73,"end_line":3203,"end_character":90},"in_reply_to":"7bb48053_590e58a9","updated":"2026-10-05 10:28:17.000000000","message":"The only reason this reads to the `k_chip` structure is to be able to reuse the `kinetis_fcfg1_depart()` function.\n\nIf you prefer, we could change the signature of that function to directly take `kinetis_fcfg1_depart(chip_type_t chip_type, uint32_t sim_fcfg1)`. That would require having a non-anonymous `chip_type` enum definition though.","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"3f5ae4c55845545ccb4e8431be1e0ea5d7cf7a8d","unresolved":true,"context_lines":[{"line_number":3200,"context_line":"\t}"},{"line_number":3201,"context_line":"\tswitch (sz_type) {"},{"line_number":3202,"context_line":"\tcase SHOW_INFO:"},{"line_number":3203,"context_line":"\t\tresult \u003d target_read_u32(target, k_chip-\u003esim_base + SIM_FCFG1_OFFSET, \u0026k_chip-\u003esim_fcfg1);"},{"line_number":3204,"context_line":"\t\tif (result !\u003d ERROR_OK)"},{"line_number":3205,"context_line":"\t\t\treturn result;"},{"line_number":3206,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":1,"id":"223dbb1c_c14733dc","line":3203,"range":{"start_line":3203,"start_character":73,"end_line":3203,"end_character":90},"in_reply_to":"f94d155c_ee1b432f","updated":"2026-10-05 13:12:13.000000000","message":"Agree","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"cd76ca3e411002896fdf0e9727470f077030b7ec","unresolved":true,"context_lines":[{"line_number":3311,"context_line":""},{"line_number":3312,"context_line":"\tcommand_print(CMD, \"FlexNVM partition set. Please reset MCU.\");"},{"line_number":3313,"context_line":""},{"line_number":3314,"context_line":"\tif (k_chip) {"},{"line_number":3315,"context_line":"\t\tfirst_nvm_bank \u003d k_chip-\u003enum_pflash_blocks;"},{"line_number":3316,"context_line":"\t\tnum_blocks \u003d k_chip-\u003enum_pflash_blocks + k_chip-\u003enum_nvm_blocks;"},{"line_number":3317,"context_line":"\t\tfor (bank_idx \u003d first_nvm_bank; bank_idx \u003c num_blocks; bank_idx++)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"c291fcd2_67d855fe","line":3314,"range":{"start_line":3314,"start_character":1,"end_line":3314,"end_character":14},"updated":"2026-10-02 04:47:36.000000000","message":"Now useless","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1002363,"name":"Jasper v. B.","email":"jasper@mezzo.de","username":"jazzpi"},"change_message_id":"0500210f3258a03dcd16b67c501bace5f1d957ac","unresolved":false,"context_lines":[{"line_number":3311,"context_line":""},{"line_number":3312,"context_line":"\tcommand_print(CMD, \"FlexNVM partition set. Please reset MCU.\");"},{"line_number":3313,"context_line":""},{"line_number":3314,"context_line":"\tif (k_chip) {"},{"line_number":3315,"context_line":"\t\tfirst_nvm_bank \u003d k_chip-\u003enum_pflash_blocks;"},{"line_number":3316,"context_line":"\t\tnum_blocks \u003d k_chip-\u003enum_pflash_blocks + k_chip-\u003enum_nvm_blocks;"},{"line_number":3317,"context_line":"\t\tfor (bank_idx \u003d first_nvm_bank; bank_idx \u003c num_blocks; bank_idx++)"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"5007e8dd_af86b249","line":3314,"range":{"start_line":3314,"start_character":1,"end_line":3314,"end_character":14},"in_reply_to":"c291fcd2_67d855fe","updated":"2026-10-05 15:06:03.000000000","message":"Done","commit_id":"0aa82b59e322ff3299d77df6743569e3d9d18863"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"tomas.vanek.oocd@gmail.com","username":"vanekt"},"change_message_id":"6695038b716ccb726df60e04400f69896d8e2252","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"\t\t}"},{"line_number":3270,"context_line":""},{"line_number":3271,"context_line":"\t\tif (k_chip-\u003echip_type \u003d\u003d KINETIS_CT_S32K \u0026\u0026 ee1 !\u003d ee2) {"},{"line_number":3272,"context_line":"\t\t\tLOG_ERROR(\"S32K1xx EEPROM cannot be split into two blocks\");"},{"line_number":3273,"context_line":"\t\t\treturn ERROR_COMMAND_ARGUMENT_INVALID;"},{"line_number":3274,"context_line":"\t\t}"},{"line_number":3275,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"13229d70_e1df1580","line":3272,"range":{"start_line":3272,"start_character":3,"end_line":3272,"end_character":12},"updated":"2026-10-05 19:14:51.000000000","message":"`command_print()` should be used in the command handler code. But this is the old code and lot of LOG_ERRORs are around, so it would need an update anyway.\nLet\u0027s merge it as is.","commit_id":"2ce92b6ab9cc503ac840543dbb982e62c65478b4"}]}
