Module Expr Str ImportFrom alias Import alias alias alias ImportFrom alias alias ImportFrom alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Num Assign NameStore Num Assign NameStore NameLoad Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad Str keyword NameLoad Assign NameStore Str Expr Call NameLoad Call AttributeLoad NameLoad attr Str Str Str Str keyword NameLoad Expr Call NameLoad Str keyword NameLoad For NameStore NameLoad body If AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str BinOpDiv AttributeLoad NameLoad attr Call NameLoad Num Assign NameStore BinOpMod Str AttributeLoad NameLoad attr orelse Assign NameStore Str Assign NameStore Str Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call NameLoad Str keyword NameLoad Expr Call NameLoad Str keyword NameLoad Assign NameStore Str Expr Call NameLoad Call AttributeLoad NameLoad attr Str Str Str Str keyword NameLoad Expr Call NameLoad Str keyword NameLoad For NameStore NameLoad body If AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str BinOpDiv AttributeLoad NameLoad attr Call NameLoad Num Assign NameStore BinOpMod Str BinOpDiv AttributeLoad NameLoad attr Call NameLoad Num Assign NameStore BinOpMod Str BinOpDiv AttributeLoad NameLoad attr Call NameLoad Num orelse Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq Call NameLoad NameLoad Call NameLoad NameLoad body Return NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body If CompareNotEq SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr keyword NameLoad keyword Num NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num If CompareEq NameLoad Str body Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareEq AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Assert CompareGtE NameLoad Num Assert CompareLtE NameLoad Num Assert BoolOpOr BoolOpAnd CompareEq NameLoad Num CompareEq AttributeLoad NameLoad attr Num CompareGtE NameLoad AttributeLoad NameLoad attr If CompareEq NameLoad Num body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareLt NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad BinOpMult NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad BinOpMult Str NameLoad Call NameLoad BinOpMult NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareGtE NameLoad Num body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If AttributeLoad NameLoad attr body Expr Call NameLoad Str decorator_list Assign AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad NameLoad NameLoad Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIs AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIs AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIs AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIs AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult NameLoad ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad NameLoad NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr BinOpDiv Call NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad keyword NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore BinOpAdd NameLoad BinOpDiv NameLoad Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpMult BinOpMult ListLoad Num NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIs AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore BinOpAdd NameLoad BinOpDiv NameLoad Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpMult BinOpMult ListLoad Num NameLoad Num Assign NameStore BinOpAdd BinOpAdd NameLoad BinOpDiv NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore NameLoad Assign NameStore BinOpAdd NameLoad BinOpDiv NameLoad Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad BinOpMod Str NameLoad Assign NameStore NameLoad If NameLoad body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Str AugAssignAdd NameStore Num AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call NameLoad Str AugAssignAdd NameStore Num AugAssignAdd NameStore Num If CompareEq NameLoad Num body Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num BinOpBitAnd SubscriptLoad NameLoad Index Num UnaryOpInvert Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad Str AugAssignAdd NameStore Num AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr BinOpDiv Call NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr BinOpDiv Call NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr BinOpDiv Call NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpDiv Call NameLoad Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpDiv BinOpMult NameLoad Num Num Assign NameStore BinOpSub NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult ListLoad Num NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Str AugAssignAdd NameStore Num orelse Expr Call NameLoad Str AugAssignAdd NameStore Num Expr Call NameLoad Str Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareEq NameLoad NameLoad body Expr Call NameLoad Str orelse Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr CompareEq NameLoad NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore IfExp AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword NameLoad Index Num Assign NameStore Call NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A 
 mbed CMSIS-DAP debugger
 Copyright (c) 2015 ARM Limited

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 __future__ print_function N/A argparse os sys time sleep time random randrange N/A math N/A struct N/A traceback N/A argparse N/A parentdir N/A N/A N/A os path dirname N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A N/A N/A N/A sys path insert 0 parentdir N/A pyOCD pyOCD.board MbedBoard pyOCD.utility.conversion float32beToU32be pyOCD.flash.flash Flash pyOCD.flash.flash_builder FlashBuilder test_util Test TestResult N/A addr 0 N/A size 0 N/A board None N/A logging FlashTestResult N/A TestResult N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super FlashTestResult self __init__ None None None N/A N/A self chip_erase_rate_erased None N/A N/A self page_erase_rate_same None N/A N/A self page_erase_rate None N/A N/A self analyze None N/A N/A self analyze_rate None N/A N/A self chip_erase_rate None N/A N/A FlashTest N/A Test N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super FlashTest self __init__ Flash Test flash_test N/A print_perf_info N/A N/A self result_list output_file N/A None N/A N/A result_list N/A filter N/A N/A N/A x N/A N/A isinstance x FlashTestResult result_list N/A N/A print 

------ Analyzer Performance ------ file output_file N/A perf_format_str {:<10}{:<12}{:<18}{:<18} N/A N/A print N/A N/A perf_format_str format Target Analyzer Rate Time file output_file N/A N/A print file output_file N/A result result_list N/A N/A N/A result passed N/A N/A analyze_rate N/A %f KB/s N/A N/A result analyze_rate N/A float 1000 N/A analyze_time N/A %s s N/A result analyze_time N/A N/A analyze_rate Fail N/A analyze_time Fail N/A N/A print N/A N/A perf_format_str format N/A N/A result board target_type N/A result analyze analyze_rate analyze_time file output_file N/A N/A print file output_file N/A N/A print 

------ Test Rate ------ file output_file N/A rate_format_str {:<10}{:<20}{:<20}{:<20} N/A N/A print N/A N/A rate_format_str format Target Chip Erase Page Erase Page Erase (Same data) file output_file N/A N/A print file output_file N/A result result_list N/A N/A N/A result passed N/A N/A chip_erase_rate N/A %f KB/s N/A N/A result chip_erase_rate N/A float 1000 N/A page_erase_rate N/A %f KB/s N/A N/A result page_erase_rate N/A float 1000 N/A page_erase_rate_same N/A %f KB/s N/A N/A result page_erase_rate_same N/A float 1000 N/A N/A chip_erase_rate Fail N/A page_erase_rate Fail N/A page_erase_rate_same Fail N/A N/A print N/A N/A rate_format_str format N/A N/A result board target_type chip_erase_rate page_erase_rate page_erase_rate_same file output_file N/A N/A print file output_file N/A run N/A N/A self board N/A N/A N/A N/A N/A result N/A N/A self test_function N/A N/A board getUniqueID N/A N/A N/A Exception N/A e N/A N/A result N/A FlashTestResult N/A N/A result passed False N/A N/A print N/A Exception %s when testing board %s N/A e N/A N/A board getUniqueID N/A N/A N/A traceback print_exc file N/A sys stdout N/A N/A result board board N/A N/A result test self N/A result N/A N/A same N/A N/A d1 d2 N/A N/A N/A N/A N/A len d1 N/A len d2 N/A N/A False N/A i N/A range N/A len d1 N/A N/A N/A N/A d1 N/A i N/A d2 N/A i N/A N/A False N/A True N/A flash_test N/A N/A board_id N/A N/A N/A N/A N/A MbedBoard chooseBoard board_id board_id frequency 1000000 board N/A N/A target_type N/A N/A board getTargetType N/A test_clock 10000000 N/A N/A target_type nrf51 N/A N/A test_clock 1000000 N/A memory_map N/A N/A N/A board target getMemoryMap N/A ram_regions N/A region N/A region memory_map N/A N/A region type ram N/A ram_region N/A ram_regions N/A 0 N/A rom_region N/A N/A memory_map getBootMemory N/A ram_start N/A ram_region start N/A ram_size N/A ram_region length N/A rom_start N/A rom_region start N/A rom_size N/A rom_region length N/A target N/A board target N/A link N/A board link N/A flash N/A board flash N/A N/A N/A link set_clock test_clock N/A N/A N/A link set_deferred_transfer True N/A test_pass_count 0 N/A test_count 0 N/A result N/A FlashTestResult print_progress N/A N/A progress N/A N/A N/A N/A progress 0.0 N/A N/A progress 1.0 N/A N/A N/A N/A progress 0 N/A N/A print_progress prev_progress 1.0 N/A progress N/A print_progress prev_progress N/A N/A progress 0.0 N/A N/A N/A print_progress prev_progress 0 N/A N/A print_progress backwards_progress False N/A N/A print_progress done False N/A N/A progress N/A print_progress prev_progress N/A N/A N/A print_progress backwards_progress True N/A N/A print_progress prev_progress progress N/A N/A N/A print_progress done N/A N/A N/A N/A N/A sys stdout write N/A i N/A int N/A progress 20.0 N/A N/A N/A N/A sys stdout write N/A [%-20s] %3d%% N/A N/A = i N/A round N/A progress 100 N/A N/A N/A N/A sys stdout flush N/A N/A progress 1.0 N/A N/A N/A N/A print_progress done N/A N/A N/A print_progress done True N/A N/A N/A N/A sys stdout write N/A N/A print_progress backwards_progress N/A N/A N/A print Progress went backwards during flash N/A N/A N/A print_progress prev_progress 0 N/A binary_file N/A N/A N/A os path join parentdir binaries N/A N/A board getTestBinary N/A N/A open binary_file rb f N/A N/A data N/A N/A f read N/A data N/A N/A struct unpack N/A %iB N/A len data data N/A unused N/A rom_size N/A len data N/A addr rom_start N/A size N/A len data N/A N/A N/A flash setFlashAlgoDebug True N/A N/A print 

------ Test Basic Page Erase ------ N/A info N/A N/A flash flashBlock addr data False False progress_cb print_progress N/A data_flashed N/A N/A target readBlockMemoryUnaligned8 addr size N/A N/A N/A same data_flashed data N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Basic Chip Erase ------ N/A info N/A N/A flash flashBlock addr data False True progress_cb print_progress N/A data_flashed N/A N/A target readBlockMemoryUnaligned8 addr size N/A N/A N/A same data_flashed data N/A N/A info program_type N/A FlashBuilder FLASH_CHIP_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Smart Page Erase ------ N/A info N/A N/A flash flashBlock addr data True False progress_cb print_progress N/A data_flashed N/A N/A target readBlockMemoryUnaligned8 addr size N/A N/A N/A same data_flashed data N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Smart Chip Erase ------ N/A info N/A N/A flash flashBlock addr data True True progress_cb print_progress N/A data_flashed N/A N/A target readBlockMemoryUnaligned8 addr size N/A N/A N/A same data_flashed data N/A N/A info program_type N/A FlashBuilder FLASH_CHIP_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A N/A flash setFlashAlgoDebug False N/A N/A print 

------ Test Basic Page Erase (Entire chip) ------ N/A new_data N/A list data N/A N/A N/A new_data extend N/A unused N/A 119 N/A info N/A N/A flash flashBlock 0 new_data False False progress_cb print_progress N/A N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A result page_erase_rate N/A N/A float N/A len new_data N/A float N/A info program_time N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Fast Verify ------ N/A info N/A N/A flash flashBlock 0 new_data progress_cb print_progress fast_verify True N/A N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Offset Write ------ N/A addr N/A rom_start N/A rom_size 2 N/A page_size N/A N/A N/A flash getPageInfo addr size N/A new_data N/A N/A N/A 85 page_size 2 N/A info N/A N/A flash flashBlock addr new_data progress_cb print_progress N/A data_flashed N/A N/A target readBlockMemoryUnaligned8 addr N/A len new_data N/A N/A N/A same data_flashed new_data N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Multiple Block Writes ------ N/A addr N/A rom_start N/A rom_size 2 N/A page_size N/A N/A N/A flash getPageInfo addr size N/A more_data N/A N/A N/A 51 page_size 2 N/A addr N/A N/A rom_start N/A rom_size 2 1 N/A fb N/A N/A flash getFlashBuilder N/A N/A N/A fb addData rom_start data N/A N/A N/A fb addData addr more_data N/A N/A N/A fb program progress_cb print_progress N/A data_flashed N/A N/A target readBlockMemoryUnaligned8 rom_start N/A len data N/A data_flashed_more N/A N/A target readBlockMemoryUnaligned8 addr N/A len more_data N/A N/A N/A same data_flashed data N/A same data_flashed_more more_data N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Overlapping Blocks ------ N/A test_pass False N/A addr N/A rom_start N/A rom_size 2 N/A page_size N/A N/A N/A flash getPageInfo addr size N/A new_data N/A N/A 51 page_size N/A fb N/A N/A flash getFlashBuilder N/A N/A N/A fb addData addr new_data N/A N/A N/A N/A N/A fb addData N/A addr 1 new_data N/A N/A N/A ValueError N/A e N/A N/A N/A print N/A Exception: %s e N/A test_pass True N/A test_pass N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Empty Block Write ------ N/A fb N/A N/A flash getFlashBuilder N/A N/A N/A fb program N/A N/A print TEST PASSED N/A test_pass_count 1 N/A test_count 1 N/A N/A print 

------ Test Missing Progress Callback ------ N/A addr rom_start N/A N/A N/A flash flashBlock rom_start data True N/A N/A print TEST PASSED N/A test_pass_count 1 N/A test_count 1 N/A N/A rom_start 0 N/A N/A N/A print 

------ Test Non-Thumb reset handler ------ N/A non_thumb_data N/A list data N/A N/A non_thumb_data N/A 4 N/A N/A non_thumb_data N/A 4 N/A 1 N/A N/A N/A flash flashBlock rom_start non_thumb_data N/A N/A N/A flash flashBlock rom_start data N/A N/A print TEST PASSED N/A test_pass_count 1 N/A test_count 1 N/A N/A print 

------ Test Chip Erase Decision ------ N/A new_data N/A list data N/A N/A N/A new_data extend N/A N/A 255 unused N/A info N/A N/A flash flashBlock 0 new_data progress_cb print_progress N/A N/A N/A info program_type N/A FlashBuilder FLASH_CHIP_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A result chip_erase_rate_erased N/A N/A float N/A len new_data N/A float N/A info program_time N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Chip Erase Decision 2 ------ N/A new_data N/A list data N/A N/A N/A new_data extend N/A N/A 0 unused N/A info N/A N/A flash flashBlock 0 new_data progress_cb print_progress N/A N/A N/A info program_type N/A FlashBuilder FLASH_CHIP_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A result chip_erase_rate N/A N/A float N/A len new_data N/A float N/A info program_time N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Page Erase Decision ------ N/A new_data N/A list data N/A N/A N/A new_data extend N/A N/A 0 unused N/A info N/A N/A flash flashBlock 0 new_data progress_cb print_progress N/A N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A result page_erase_rate_same N/A N/A float N/A len new_data N/A float N/A info program_time N/A N/A result analyze N/A info analyze_type N/A N/A result analyze_time N/A info analyze_time N/A N/A result analyze_rate N/A N/A float N/A len new_data N/A float N/A info analyze_time N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

------ Test Page Erase Decision 2 ------ N/A new_data N/A list data N/A size_same N/A N/A unused 5 6 N/A size_differ N/A unused size_same N/A N/A N/A new_data extend N/A N/A 0 size_same N/A N/A N/A new_data extend N/A N/A 85 size_differ N/A info N/A N/A flash flashBlock 0 new_data progress_cb print_progress N/A N/A N/A info program_type N/A FlashBuilder FLASH_PAGE_ERASE N/A N/A N/A print TEST PASSED N/A test_pass_count 1 N/A N/A N/A print TEST FAILED N/A test_count 1 N/A N/A print 

Test Summary: N/A N/A print N/A Pass count %i of %i tests N/A test_pass_count test_count N/A N/A test_pass_count test_count N/A N/A N/A print FLASH TEST SCRIPT PASSED N/A N/A N/A print FLASH TEST SCRIPT FAILED N/A N/A N/A target reset N/A N/A result passed N/A test_count test_pass_count N/A result N/A N/A N/A __name__ __main__ N/A N/A parser N/A N/A argparse ArgumentParser description pyOCD flash test N/A N/A N/A parser add_argument -d --debug action store_true help Enable debug logging N/A args N/A N/A parser parse_args N/A level N/A N/A args debug N/A logging DEBUG N/A logging INFO N/A N/A N/A logging basicConfig level level N/A board N/A N/A N/A N/A N/A N/A pyOCD board mbed_board MbedBoard getAllConnectedBoards close True N/A 0 N/A test N/A FlashTest N/A result N/A N/A N/A test run board N/A N/A N/A test print_perf_info result