)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"fd9a282add0c44a8d136d215128fc636a75e807d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1fba2f55_aa15c0f5","updated":"2022-03-12 17:38:05.000000000","message":"Tarek, Tomas, any objections?","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"565a43932c236fd6ab7a32cbabdff87b20b8988b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"34e24101_9f3d438d","updated":"2022-03-19 21:25:18.000000000","message":"apart from the typo, I think this can go","commit_id":"ac352ad3275f6264007429bbbdee1c82fa3706c9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"1ae727d5f2b5c29fa678b725915b09bfbaa94c9f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"46392afa_b6821d9b","updated":"2022-03-19 22:12:35.000000000","message":"thanks","commit_id":"c100f3e0a3b3bb57a83e022ce0d5144db38994a7"}],"tcl/tools/test_cpu_speed.tcl":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8c391174f6ffa8588673bdedae8bd893f0e4e692","unresolved":true,"context_lines":[{"line_number":9,"context_line":"#"},{"line_number":10,"context_line":"# Note:"},{"line_number":11,"context_line":"#  You may need to adapt the number of cycles for your device."},{"line_number":12,"context_line":"#"},{"line_number":13,"context_line":"proc cortex_m_test_cpu_speed { address { timeout 200 } { cycles_per_loop 4 } } {"},{"line_number":14,"context_line":"\tset loop_counter_start 0xffffffff"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-tcl","patch_set":8,"id":"62043158_e3e04fe7","line":12,"updated":"2022-03-13 15:08:59.000000000","message":"Add something like\nadd_help_text cortex_m_test_cpu_speed \"Measure the CPU clock frequency of an ARM Cortex-M based device\"\nadd_usage_text cortex_m_test_cpu_speed {address [timeout [cycles_per_loop]]}","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bcea146bc4eecbfe609af4095b458b210e6e9cda","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#"},{"line_number":10,"context_line":"# Note:"},{"line_number":11,"context_line":"#  You may need to adapt the number of cycles for your device."},{"line_number":12,"context_line":"#"},{"line_number":13,"context_line":"proc cortex_m_test_cpu_speed { address { timeout 200 } { cycles_per_loop 4 } } {"},{"line_number":14,"context_line":"\tset loop_counter_start 0xffffffff"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-tcl","patch_set":8,"id":"bbe5b599_0435a80c","line":12,"in_reply_to":"62043158_e3e04fe7","updated":"2022-03-17 19:10:35.000000000","message":"Done","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8c391174f6ffa8588673bdedae8bd893f0e4e692","unresolved":true,"context_lines":[{"line_number":14,"context_line":"\tset loop_counter_start 0xffffffff"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\thalt"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\t# We place the following code at the given address to measure the"},{"line_number":19,"context_line":"\t# CPU clock frequency:"},{"line_number":20,"context_line":"\t#"}],"source_content_type":"text/x-tcl","patch_set":8,"id":"f7208e31_cb457254","line":17,"updated":"2022-03-13 15:08:59.000000000","message":"To avoid breaking the current execution, here we can save in a tcl variable/dictionary pc, r0 and xPSR:\nset regs [get_reg {pc r0 xPSR}]\nand restore them later ...","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bcea146bc4eecbfe609af4095b458b210e6e9cda","unresolved":false,"context_lines":[{"line_number":14,"context_line":"\tset loop_counter_start 0xffffffff"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\thalt"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\t# We place the following code at the given address to measure the"},{"line_number":19,"context_line":"\t# CPU clock frequency:"},{"line_number":20,"context_line":"\t#"}],"source_content_type":"text/x-tcl","patch_set":8,"id":"d5dfc67b_8665400a","line":17,"in_reply_to":"f7208e31_cb457254","updated":"2022-03-17 19:10:35.000000000","message":"Done","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8c391174f6ffa8588673bdedae8bd893f0e4e692","unresolved":true,"context_lines":[{"line_number":21,"context_line":"\t# 3801: subs r0, #1"},{"line_number":22,"context_line":"\t# d1fd: bne #-2"},{"line_number":23,"context_line":"\t# e7fe: b #-4"},{"line_number":24,"context_line":"\twrite_memory $address 32 {0xd1fd3801 0x0000e7fe}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\tset_reg \"pc $address r0 $loop_counter_start\""},{"line_number":27,"context_line":"\tresume"}],"source_content_type":"text/x-tcl","patch_set":8,"id":"04dbf6ac_54463270","line":24,"updated":"2022-03-13 15:08:59.000000000","message":"to handle 16-bits aligned $address, why not using\nwrite_memory $address 16 {0x3801 0xd1fd 0xe7fe}\n\nPlus, we could restore the memory by\nset mem [read_memory $address 16 3]\nbefore this, and\nwrite_memory $address 16 $mem\nlater","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bcea146bc4eecbfe609af4095b458b210e6e9cda","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\t# 3801: subs r0, #1"},{"line_number":22,"context_line":"\t# d1fd: bne #-2"},{"line_number":23,"context_line":"\t# e7fe: b #-4"},{"line_number":24,"context_line":"\twrite_memory $address 32 {0xd1fd3801 0x0000e7fe}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"\tset_reg \"pc $address r0 $loop_counter_start\""},{"line_number":27,"context_line":"\tresume"}],"source_content_type":"text/x-tcl","patch_set":8,"id":"72db748d_0dc9b19c","line":24,"in_reply_to":"04dbf6ac_54463270","updated":"2022-03-17 19:10:35.000000000","message":"Good idea!","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8c391174f6ffa8588673bdedae8bd893f0e4e692","unresolved":true,"context_lines":[{"line_number":31,"context_line":"\t# Get the loop counter value from register r0."},{"line_number":32,"context_line":"\tset loop_counter_end [dict values [get_reg r0]]"},{"line_number":33,"context_line":"\tset loop_counter_diff [expr {$loop_counter_start - $loop_counter_end}]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"\tif { [expr {$loop_counter_end \u003d\u003d 0}] } {"},{"line_number":36,"context_line":"\t\treturn -1"},{"line_number":37,"context_line":"\t}"}],"source_content_type":"text/x-tcl","patch_set":8,"id":"07536cd1_1a0812ff","line":34,"updated":"2022-03-13 15:08:59.000000000","message":"... here saved registers can be restored:\nset_reg $regs\nI don\u0027t think we should run \"resume\", here.","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bcea146bc4eecbfe609af4095b458b210e6e9cda","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\t# Get the loop counter value from register r0."},{"line_number":32,"context_line":"\tset loop_counter_end [dict values [get_reg r0]]"},{"line_number":33,"context_line":"\tset loop_counter_diff [expr {$loop_counter_start - $loop_counter_end}]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"\tif { [expr {$loop_counter_end \u003d\u003d 0}] } {"},{"line_number":36,"context_line":"\t\treturn -1"},{"line_number":37,"context_line":"\t}"}],"source_content_type":"text/x-tcl","patch_set":8,"id":"2f9bd007_687a77c9","line":34,"in_reply_to":"07536cd1_1a0812ff","updated":"2022-03-17 19:10:35.000000000","message":"Done","commit_id":"af52a8a47f7cd28e365fd50be0e23f50f190a025"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"565a43932c236fd6ab7a32cbabdff87b20b8988b","unresolved":true,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\thalt"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\t# Backup regsiters and memory."},{"line_number":21,"context_line":"\tset backup_regs [get_reg -force {pc r0 xPSR}]"},{"line_number":22,"context_line":"\tset backup_mem [read_memory $address 16 3]"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-tcl","patch_set":9,"id":"85f3c31c_cf11dfdd","line":20,"updated":"2022-03-19 21:25:18.000000000","message":"typo s/regsiters/registers/","commit_id":"ac352ad3275f6264007429bbbdee1c82fa3706c9"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"bea8a7f4799c68ec8e7f41ce5d6e80c926379125","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\thalt"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\t# Backup regsiters and memory."},{"line_number":21,"context_line":"\tset backup_regs [get_reg -force {pc r0 xPSR}]"},{"line_number":22,"context_line":"\tset backup_mem [read_memory $address 16 3]"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-tcl","patch_set":9,"id":"847abe01_5a27ceda","line":20,"in_reply_to":"85f3c31c_cf11dfdd","updated":"2022-03-19 22:35:06.000000000","message":"Done","commit_id":"ac352ad3275f6264007429bbbdee1c82fa3706c9"}]}
