X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETAT91X40.py;h=0776c2d68064d7f6ad22e90ec066019322c0f992;hp=c8c792c86a82ca66202db41a60914a802378cf5a;hb=a8b686459e73c8a37df4537083a675fc21de4699;hpb=8691ee02d0b0d75d4a44a9deadf14f394cd57740 diff --git a/client/GoodFETAT91X40.py b/client/GoodFETAT91X40.py index c8c792c..0776c2d 100644 --- a/client/GoodFETAT91X40.py +++ b/client/GoodFETAT91X40.py @@ -519,6 +519,10 @@ def at91x40_main(): at91x40_cli_handler(client, sys.argv) + + +BLOCK_DWORDS = 48 +BLOCK_SIZE = 4 * BLOCK_DWORDS def at91x40_cli_handler(client, argv): if(argv[1]=="chipRegStr"): @@ -579,76 +583,96 @@ def at91x40_cli_handler(client, argv): # Yes, this requires that you set the start and stop addresses special_reg_num=int(argv[5]) special_addr=int(argv[6],16) + err_list = [] print "Dumping from %04x to %04x as %s." % (start,stop,f) - #h = IntelHex16bit(None) # FIXME: get mcu state and return it to that state client.halt() h = IntelHex(None) - i=start - while i<=stop: - err_cnt = 0 - #data=client.ARMreadMem(i, 48) - try: - data=client.ARMreadChunk(i, 48, verbose=0) - print "Dumped %06x."%i - for dword in data: - if i<=stop and dword != 0xdeadbeef: - h.puts( i, struct.pack("