str9x_write(): flash writing failed

I currently using a str9-comstick with openocd and developing

the basic setup for a new project. I have the ST Micro firmware

building within eclipse. The project’s flash image and elf file

successfully load the first time I start openocd and gdb. However,

if I quit gdb and restart it (either within eclipse or by manually

running arm-elf-gdb), the flash load fails. I see this in the openocd

log when I turnon debug output:

armv4_5.c:647 armv4_5_run_algorithm(): restoring register pc with value 0x00000000

Debug: armv4_5.c:647 armv4_5_run_algorithm(): restoring register spsr_svc with value 0x00000010

Error: str9x.c:409 str9x_write_block(): error executing str9x flash write algorithm

Error: str9x.c:488 str9x_write(): flash writing failed with error code: 0xfffffc7a

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$O6661696c65642077726974696e672066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f666673657420307830303030303030300a#9f’

Debug: gdb_server.c:126 gdb_get_char(): received ‘—+$k#6b$k#6b+’

Warning: gdb_server.c:197 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$O6661696c65642077726974696e672066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f666673657420307830303030303030300a#9f’

Warning: gdb_server.c:197 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$O6661696c65642077726974696e672066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f666673657420307830303030303030300a#9f’

Warning: gdb_server.c:197 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$O6661696c65642077726974696e672066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f666673657420307830303030303030300a#9f’

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$O666c6173682070726f6772616d206572726f720a#6d’

Error: gdb_server.c:215 gdb_put_packet(): unknown character 0x24 in reply, dropping connection

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$O77726f7465202038393220627974652066726f6d2066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f6666736574203078303030303030303020696e203135732037303330303075732028302e303535343733206b622f73290a#c2’

Error: gdb_server.c:215 gdb_put_packet(): unknown character 0x6b in reply, dropping connection

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$OK#9a’

Error: gdb_server.c:215 gdb_put_packet(): unknown character 0x23 in reply, dropping connection

Debug: gdb_server.c:239 gdb_get_packet(): character: ‘6’

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x36

Debug: gdb_server.c:239 gdb_get_packet(): character: ‘b’

Warning: gdb_server.c:256 gdb_get_packet(): ignoring character 0x62

Debug: gdb_server.c:239 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1338 gdb_input(): received packet: ‘k’

Debug: gdb_server.c:179 gdb_put_packet(): sending packet ‘$OK#9a’

Info: server.c:360 server_loop(): dropped ‘gdb’ connection

At this point, I’m not sure why flash writing fails when gdb is restarted.

It doesn’t fail if I repeat the flash write within a gdb session. It would

seem something isn’t being reset/initialized the gdb connection is

dropped/connected. Eclipse isn’t too happy about the gdb server

dropping connections.

I’ve noticed that there is a problem with working areas target_free_working_area() doesn’t seem to ever get called. So,

we never free and reuse working areas. So, each time I restart gdb,

the working areas get smaller and smaller. Ultimately, this would

cause flash writes to fail, but it doesn’t seem to be the problem the

second time around.

Finally, svn seems broken at the moment. svn can’t seem to

connect to host svn.berlios.de at the moment.

you are quite correct, just checked the str9 code and it does not free the working area - i will commit changes to svn.

Regarding your other problem, can you give all your scripts etc.

Regards

Spen

My previous attempts at replying seem to be held. The following

patch resolves the working area problem.

Index: src/server/gdb_server.c

===================================================================

— src/server/gdb_server.c (revision 208)

+++ src/server/gdb_server.c (working copy)

@@ -1335,7 +1335,7 @@

/* terminate with zero */

packet[packet_size] = 0;

  • DEBUG(“recevied packet: ‘%s’”, packet);
  • DEBUG(“received packet: ‘%s’”, packet);

if (packet_size > 0)

{

Index: src/target/arm7_9_common.c

===================================================================

— src/target/arm7_9_common.c (revision 208)

+++ src/target/arm7_9_common.c (working copy)

@@ -704,12 +704,12 @@

{

int retval;

  • /* There might be working areas allocated */

  • target_free_all_working_areas(target);

DEBUG(“target->state: %s”, target_state_strings[target->state]);

if (target->state == TARGET_HALTED || target->state == TARGET_UNKNOWN)

{

  • /* if the target wasn’t running, there might be working areas allocated */

  • target_free_all_working_areas(target);

/* assert SRST and TRST */

/* system would get ouf sync if we didn’t reset test-logic, too */

@@ -830,6 +830,9 @@

reg_t *dbg_ctrl = &arm7_9->eice_cache->reg_list[EICE_DBG_CTRL];

int i;

  • /* There might be working areas allocated */

  • target_free_all_working_areas(target);

if (target->state == TARGET_RUNNING)

{

target->type->halt(target);

There’s still a problem when no working area is specified. More

details are in my previous posts. The simplest way to see this is

to do a flash write without a working area.

thanks for the patch, i will look into it.

This is the current fix for the str9 problem of not freeing memory.

Index: str9x.c
===================================================================
--- str9x.c	(revision 208)
+++ str9x.c	(working copy)
@@ -28,6 +28,7 @@
 #include "target.h"
 #include "log.h"
 #include "armv4_5.h"
+#include "arm966e.h"
 #include "algorithm.h"
 #include "binarybuffer.h"
 
@@ -355,20 +356,17 @@
 	int i;
 	
 	/* flash write code */
-	if (!str9x_info->write_algorithm)
+	if (target_alloc_working_area(target, 4 * 19, &str9x_info->write_algorithm) != ERROR_OK)
 	{
-		if (target_alloc_working_area(target, 4 * 19, &str9x_info->write_algorithm) != ERROR_OK)
-		{
-			WARNING("no working area available, can't do block memory writes");
-			return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
-		};
+		WARNING("no working area available, can't do block memory writes");
+		return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
+	};
 
-		/* convert flash writing code into a buffer in target endianness */
-		for (i = 0; i < 19; i++)
-			target_buffer_set_u32(target, str9x_flash_write_code_buf + i*4, str9x_flash_write_code[i]);
-			
-		target_write_buffer(target, str9x_info->write_algorithm->address, 19 * 4, str9x_flash_write_code_buf);
-	}
+	/* convert flash writing code into a buffer in target endianness */
+	for (i = 0; i < 19; i++)
+		target_buffer_set_u32(target, str9x_flash_write_code_buf + i*4, str9x_flash_write_code[i]);
+		
+	target_write_buffer(target, str9x_info->write_algorithm->address, 19 * 4, str9x_flash_write_code_buf);
 
 	/* memory buffer */
 	while (target_alloc_working_area(target, buffer_size, &source) != ERROR_OK)
@@ -383,7 +381,7 @@
 			WARNING("no large enough working area available, can't do block memory writes");
 			return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
 		}
-	};
+	}
 	
 	armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
 	armv4_5_info.core_mode = ARMV4_5_MODE_SVC;
@@ -406,6 +404,8 @@
 
 		if ((retval = target->type->run_algorithm(target, 0, NULL, 4, reg_params, str9x_info->write_algorithm->address, str9x_info->write_algorithm->address + (18 * 4), 10000, &armv4_5_info)) != ERROR_OK)
 		{
+			target_free_working_area(target, source);
+			target_free_working_area(target, str9x_info->write_algorithm);
 			ERROR("error executing str9x flash write algorithm");
 			return ERROR_FLASH_OPERATION_FAILED;
 		}
@@ -420,6 +420,9 @@
 		count -= thisrun_count;
 	}
 	
+	target_free_working_area(target, source);
+	target_free_working_area(target, str9x_info->write_algorithm);
+	
 	destroy_reg_param(&reg_params[0]);
 	destroy_reg_param(&reg_params[1]);
 	destroy_reg_param(&reg_params[2]);
@@ -618,6 +621,9 @@
     target_write_u32(target, FLASH_BBADR, (strtoul(args[2], NULL, 0) >> 2));
     target_write_u32(target, FLASH_NBBADR, (strtoul(args[3], NULL, 0) >> 2));
 
+	/* set b18 instruction TCM order as per flash programming manual */
+	arm966e_write_cp15(target, 62, 0x40000);
+	
 	/* enable flash bank 1 */
     target_write_u32(target, FLASH_CR, 0x18);
 	return ERROR_OK;

I have not committed to svn yet as i am working on a few other changes.

Cheers

Spen

Thanks, your patch and updating to revision 209 fix the working area problem. However, there is still a problem with flash loads when a working area is not specified. The following command fails with a packet error:

#Load flash
monitor flash write 0 main.bin 0

This is what gdb outputs:

...
Ignoring packet error, continuing...
/cygdrive/c/Documents and Settings/dave_e/My Documents/ECLIPSE/worspace/OM200 OCB/gdbinit:85: Error in sourced command file:
Reply contains invalid hex digit 115

It appears from the openocd log that the error occurs after it has completed writing to flash the main.bin image. Here is the log:

Debug: arm966e.c:139 arm966e_target_command(): chain_pos: 1, variant: arm966e

Debug: jtag.c:1407 jtag_init(): -

Debug: ft2232.c:1300 ft2232_init_ftd2xx(): ‘ft2232’ interface using FTD2XX with ‘comstick’ layout (0640:002c)

Debug: ft2232.c:1389 ft2232_init_ftd2xx(): current latency timer: 2

Debug: ft2232.c:1888 comstick_init(): 80 08 0b

Debug: ft2232.c:1908 comstick_init(): 82 03 03

Debug: ft2232.c:255 ft2232_speed(): 86 01 00

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1291 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0

Debug: jtag.c:1291 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2

Debug: jtag.c:1291 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: openocd.c:113 main(): jtag init complete

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 4

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST released

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 0

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000000

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:671 arm7_9_poll(): DBGACK set, dbg_state->value: 0x2cd

Warning: arm7_9_common.c:674 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1047 arm7_9_debug_entry(): target entered debug from ARM state

Debug: arm7_9_common.c:1079 arm7_9_debug_entry(): target entered debug state in Supervisor mode

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r0: 0x600000d3

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r1: 0xe14f1000

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r2: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r3: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r4: 0xe12fff1e

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r5: 0xe52de008

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r6: 0xebfffc24

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r7: 0xe3a00000

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r8: 0xe49de008

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r9: 0xe12fff1e

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r10: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r11: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r12: 0xe1a010a1

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r13: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r14: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r15: 0x5001d11c

Debug: arm7_9_common.c:1114 arm7_9_debug_entry(): entered debug state at PC 0x5001d11c

Debug: target.c:469 target_call_event_callbacks(): target event 0

Debug: arm7_9_common.c:1431 arm7_9_resume(): -

Debug: arm7_9_common.c:1230 arm7_9_restore_context(): -

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining User mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: r0

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1309 arm7_9_restore_context(): writing register 0 of mode User with value 0x600000d3

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining FIQ mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining IRQ mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining Supervisor mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining Abort mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining Undefined mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1349 arm7_9_restore_context(): writing PC with value 0x5001d11c

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: target.c:469 target_call_event_callbacks(): target event 4

Debug: arm7_9_common.c:1534 arm7_9_resume(): target resumed

Debug: embeddedice.c:384 embeddedice_write_reg(): 2: 0x00000001

Debug: arm7_9_common.c:707 arm7_9_assert_reset(): target->state: debug_running

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: SRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: ft2232.c:1073 comstick_reset(): trst: 0, srst: 1, high_output: 0x01, high_direction: 0x03

Debug: arm7_9_common.c:929 arm7_9_halt(): target->state: reset

Debug: arm7_9_common.c:773 arm7_9_deassert_reset(): target->state: reset

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: SRST released

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: ft2232.c:1073 comstick_reset(): trst: 0, srst: 0, high_output: 0x03, high_direction: 0x03

Debug: openocd.c:117 main(): target init complete

Debug: openocd.c:121 main(): flash init complete

Debug: openocd.c:125 main(): NAND init complete

Debug: openocd.c:129 main(): pld init complete

Debug: gdb_server.c:1484 gdb_init(): gdb service for target arm966e at port 3333

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:671 arm7_9_poll(): DBGACK set, dbg_state->value: 0x10d

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1047 arm7_9_debug_entry(): target entered debug from ARM state

Debug: arm7_9_common.c:1079 arm7_9_debug_entry(): target entered debug state in Supervisor mode

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r0: 0x600000d3

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r1: 0x600000d7

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r2: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r3: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r4: 0xe12fff1e

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r5: 0xe52de008

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r6: 0xebfffc24

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r7: 0xe3a00000

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r8: 0xe49de008

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r9: 0xe12fff1e

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r10: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r11: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r12: 0x50014410

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r13: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r14: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r15: 0x00000000

Debug: arm7_9_common.c:1114 arm7_9_debug_entry(): entered debug state at PC 0x0

Debug: target.c:469 target_call_event_callbacks(): target event 0

Debug: arm7_9_common.c:929 arm7_9_halt(): target->state: halted

Warning: arm7_9_common.c:933 arm7_9_halt(): target was already halted

Debug: gdb_server.c:136 gdb_get_char(): received ‘$qSupported#37’

Info: server.c:67 add_connection(): accepted ‘gdb’ connection from 0

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qSupported’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$#00’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$Hc-1#09’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘Hc-1’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$#00’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qC#b4’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qC’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$#00’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qOffsets#4b’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qOffsets’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$#00’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$?#3f

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘?’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$S02#b5’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$Hg0#df’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘Hg0’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$#00’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$pf#d6’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘pf’

Debug: gdb_server.c:672 gdb_get_register_packet(): -

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$00000000#80’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:136 gdb_get_char(): received ‘$m0,4#fd’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘m0,4’

Debug: gdb_server.c:826 gdb_read_memory_packet(): addr: 0x00000000, len: 0x00000004

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000004, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$e0f19fe5#65’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,72657365742068616c74#72’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,72657365742068616c74’

Debug: target.c:1446 handle_reset_command(): -

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:671 arm7_9_poll(): DBGACK set, dbg_state->value: 0x2cd

Debug: arm7_9_common.c:1431 arm7_9_resume(): -

Debug: arm7_9_common.c:1230 arm7_9_restore_context(): -

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining User mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: r0

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: r1

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1309 arm7_9_restore_context(): writing register 0 of mode User with value 0x600000d3

Debug: arm7_9_common.c:1309 arm7_9_restore_context(): writing register 1 of mode User with value 0x600000d7

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining FIQ mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining IRQ mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining Supervisor mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining Abort mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1246 arm7_9_restore_context(): examining Undefined mode

Debug: arm7_9_common.c:1260 arm7_9_restore_context(): examining dirty reg: pc

Debug: arm7_9_common.c:1349 arm7_9_restore_context(): writing PC with value 0x00000000

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: target.c:469 target_call_event_callbacks(): target event 4

Debug: arm7_9_common.c:1534 arm7_9_resume(): target resumed

Debug: embeddedice.c:384 embeddedice_write_reg(): 2: 0x00000001

Debug: arm7_9_common.c:707 arm7_9_assert_reset(): target->state: debug_running

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: SRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: ft2232.c:1073 comstick_reset(): trst: 0, srst: 1, high_output: 0x01, high_direction: 0x03

Debug: arm7_9_common.c:929 arm7_9_halt(): target->state: reset

Debug: arm7_9_common.c:773 arm7_9_deassert_reset(): target->state: reset

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: SRST released

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: ft2232.c:1073 comstick_reset(): trst: 0, srst: 0, high_output: 0x03, high_direction: 0x03

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,776169745f68616c74#46’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,776169745f68616c74’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77616974696e6720666f72207461726765742068616c7465642e2e2e0a#8e’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:671 arm7_9_poll(): DBGACK set, dbg_state->value: 0x10d

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1047 arm7_9_debug_entry(): target entered debug from ARM state

Debug: arm7_9_common.c:1079 arm7_9_debug_entry(): target entered debug state in Supervisor mode

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r0: 0x00000000

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r1: 0x50009738

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r2: 0x500096d4

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r3: 0x7c000000

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r4: 0xe12fff1e

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r5: 0xe52de008

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r6: 0xebfffc24

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r7: 0x00000004

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r8: 0xe49de008

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r9: 0xe12fff1e

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r10: 0xe1500001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r11: 0x50017af8

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r12: 0x50017aec

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r13: 0x50017ffc

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r14: 0x20400001

Debug: arm7_9_common.c:1108 arm7_9_debug_entry(): r15: 0x00000000

Debug: arm7_9_common.c:1114 arm7_9_debug_entry(): entered debug state at PC 0x0

Debug: target.c:469 target_call_event_callbacks(): target event 0

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O7461726765742068616c7465640a#6e’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,6d7777203078354330303230333420307830313936#c7’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,6d7777203078354330303230333420307830313936’

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x5c002034, size: 0x00000004, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:136 gdb_get_char(): received ‘$qRcmd,61726d375f3920666f7263655f68775f626b70747320656e61626c65#2e’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,61726d375f3920666f7263655f68775f626b70747320656e61626c65’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O666f72636520686172647761726520627265616b706f696e747320656e61626c65640a#fc’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,61726d375f392073775f626b7074732064697361626c65#87’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,61726d375f392073775f626b7074732064697361626c65’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O736f66747761726520627265616b706f696e74732064697361626c65640a#c7’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:136 gdb_get_char(): received ‘$qRcmd,776169745f68616c74#46’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,776169745f68616c74’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77616974696e6720666f72207461726765742068616c7465642e2e2e0a#8e’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:671 arm7_9_poll(): DBGACK set, dbg_state->value: 0x2cd

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O7461726765742068616c7465640a#6e’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,666c6173682070726f74656374203020302030206f6666#04’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,666c6173682070726f74656374203020302030206f6666’

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000060

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x000000d0

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x80

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O636c65617265642070726f74656374696f6e20666f7220736563746f72732030207468726f7567682030206f6e20666c6173682062616e6b20300a#d6’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,666c617368206572617365203020302030#28’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,666c617368206572617365203020302030’

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000020

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x000000d0

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x00

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O65726173656420736563746f72732030207468726f7567682030206f6e20666c6173682062616e6b203020696e2031732031383830303075730a#84’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:136 gdb_get_char(): received ‘$qRcmd,776169745f68616c74#46’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,776169745f68616c74’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77616974696e6720666f72207461726765742068616c7465642e2e2e0a#8e’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:671 arm7_9_poll(): DBGACK set, dbg_state->value: 0x2cd

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O7461726765742068616c7465640a#6e’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+$qRcmd,666c6173682077726974652030206d61696e2e62696e2030#e5’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,666c6173682077726974652030206d61696e2e62696e2030’

Debug: target.c:550 target_alloc_working_area(): target 0x10032020: allocating 76 bytes for new working area

Warning: target.c:563 target_alloc_working_area(): not enough working area available

Warning: str9x.c:358 str9x_write_block(): no working area available, can’t do block memory writes

Warning: str9x.c:480 str9x_write(): couldn’t use block writes, falling back to single memory accesses

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000040

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000040

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000002, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000000, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000000, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000000, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000000, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x00000040

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000004, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000004, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x00000040

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000006, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000004, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000004, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000004, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000004, value: 0x00000050

[deleted]

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000378, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000378, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x00000040

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x0000037a, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x00000070

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: arm7_9_common.c:1779 arm7_9_read_memory(): address: 0x00000378, size: 0x00000001, count: 0x00000001

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:804 target_read_u8(): address: 0x00000378, value: 0x80

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:836 target_write_u16(): address: 0x00000378, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00000378, size: 0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77726f7465202038393220627974652066726f6d2066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f6666736574203078303030303030303020696e2031317320373830303075732028302e303738363333206b622f73290a#63’

Debug: gdb_server.c:136 gdb_get_char(): received ‘—+’

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77726f7465202038393220627974652066726f6d2066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f6666736574203078303030303030303020696e2031317320373830303075732028302e303738363333206b622f73290a#63’

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77726f7465202038393220627974652066726f6d2066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f6666736574203078303030303030303020696e2031317320373830303075732028302e303738363333206b622f73290a#63’

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$O77726f7465202038393220627974652066726f6d2066696c65206d61696e2e62696e20746f20666c6173682062616e6b2030206174206f6666736574203078303030303030303020696e2031317320373830303075732028302e303738363333206b622f73290a#63’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘$qRcmd,73687574646f776e#e1+++++’

Error: gdb_server.c:224 gdb_put_packet(): unknown character 0x24 in reply, dropping connection

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘q’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x71

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘R’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x52

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘c’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x63

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘m’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x6d

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘d’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x64

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘,’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x2c

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘7’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x37

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘3’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x33

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘6’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x36

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘8’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x38

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘7’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x37

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘5’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x35

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘7’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x37

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘4’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x34

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘6’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x36

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘4’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x34

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘6’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x36

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘f’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x66

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘7’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x37

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘7’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x37

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘6’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x36

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘e’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x65

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘#’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x23

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘e’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x65

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘1’

Warning: gdb_server.c:265 gdb_get_packet(): ignoring character 0x31

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Debug: gdb_server.c:136 gdb_get_char(): received ‘$qRcmd,73687574646f776e#e1’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘$’

Debug: gdb_server.c:1372 gdb_input(): received packet: ‘qRcmd,73687574646f776e’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Thoughts? This is not a crucial problem but I thought I would report it.

I will look into it.

The speed of writing will be very slow if a working area is not specified however.

Spen

Looking at your log i see the line:

‘$qRcmd,73687574646f776e#e1’

You are telling openocd to shutdown after programming, i am guessing this is not the behaviour you are after?

Also i would really recommend to use a working area, the speed diff is quite a lot.

Cheers

Spen

There is a real dis-connect in the “logical” FLASH mapping on the STR9x devices. Everything worked fine for me with OpenOCD (after creating my own scripts) and was able to program/erase flash @ will. Now however, I have progressed into writing a boot loader (risides in BANK1) and as soon as I flipped the boot bank (str9xpec options_cmap 0 bank1) everything broke! The security bits have been set (not what I wanted) and even after using a different program (HiTOP5) to erase ALL flash and revert to BANK0 operation, everthing is “screwie”. OpenOCD will sometimes work, but then @ random periods will re-set back to BANK1 booting and secuirity bits on even though I did not select it. It seems that the root of the problem that I only errase sectors 0-7 (Bank0) and program into it the App. When I want to program Bank1 (boot loader) it wont program as OpenOCD complains that a start address “0x080000” for the start of sector 8 (First sector in BANK1) is beond the flash programming range. When I attempt to define a second bank in the config file (BANK1) it gaks… On inspecting the checked in sources from SVN I see that there is a LOT that needs to be fixed… Should I do this and submit a patch or is someone else doing this already???

Jeff.

that would make sense, the programming is broken when the boot bank is switched.

I have started a patch, i will check the status - i would disagree saying lots of changes are required.

Remember you also have to change the str9x flash_config aswell before programming.

Cheers

Spen

I have just committed some fixes to the str91x flash driver (svn 211).

Changes as follows:

Each str9 flash bank will need configuring, eg.

flash bank str9x 0x00000000 0x00080000 0 0 0

flash bank str9x 0x00080000 0x00008000 0 0 0

bank number now required for str9x flash_config command, eg.

old - str9x flash_config 4 2 0 0x80000

new - str9x flash_config 0 4 2 0 0x80000

The str9 remap can be a bit confusing, so here is a working bootloader example.

bootloader resides and boots from bank1, main application runs from bank0.

To program the bootloader into bank1 we setup as follows:

flash bank str9x 0x00000000 0x00008000 0 0 0

flash bank str9x 0x00080000 0x00080000 0 0 0

flash programming script:

flash auto_erase on

str9x flash_config 0 0 6 0 0x80000

flash protect 0 0 3 off

flash write_image bloader.s19

To program the main application:

flash bank str9x 0x00000000 0x00080000 0 0 0

flash bank str9x 0x00080000 0x00008000 0 0 0

and flash script:

flash auto_erase on

str9x flash_config 0 0 6 0x80000 0

flash protect 0 0 7 off

flash write_image appli.s19

There are many other ways to program both banks, i do the above so that the main appli is remapped to 0 (for interrupts etc).

Cheers

Spen

Hi,

I have been watching with interest this thread; I am also using a STR9-comStick. Did those using this target eventually get it all working? I’m still having trouble with the GDB communications though when programming the flash.

All seems fine until the flash erase, when the openocd console reports an Acknowledgement error. After this, writing doesn’t work and then openocd exits with a segfault or glibc freelist check. I’m grateful for any help to get this working.

I have pasted below lots of debug information below. My config file is below also. I hope this is useful to you, openocd is certainly a great tool.

Thanks

Ian

Linux/debian using openocd svn 211 and debian libftdi-dev.

Config file:

telnet_port 4444

gdb_port 4445

daemon_startup reset

interface ft2232

ft2232_layout “comstick”

ft2232_vid_pid 0x0640 0x002c

jtag_speed 10

reset_config trst_and_srst

jtag_device 8 0x1 0x1 0xfe

jtag_device 4 0x1 0xf 0xce

jtag_device 5 0x1 0x1 0x1e

target arm966e little reset_halt 1 arm996e

working_area 0 0x50000000 32768 nobackup

flash bank str9x 0x00000000 0x00080000 0 0 0

flash bank str9x 0x00080000 0x00008000 0 0 0

Here is the GDB trascript:

(gdb) monitor str9x flash_config 0 0 6 0x80000 0

(gdb) monitor flash banks

#0: str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0

#1: str9x at 0x00080000, size 0x00008000, buswidth 0, chipwidth 0

(gdb) monitor flash protect 0 0 7 off

cleared protection for sectors 0 through 7 on flash bank 0

(gdb) monitor flash erase 0 0 7

erased sectors 0 through 7 on flash bank 0 in 3s 94796us

erased sectors 0 through 7 on flash bank 0 in 3s 94796us

Here is the end of the debug script after the erase:

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: target.c:832 target_read_u8(): address: 0x00070000, value: 0x80

Debug: target.c:864 target_write_u16(): address: 0x00070000, value: 0x00000050

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00070000, size:

0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: target.c:864 target_write_u16(): address: 0x00070000, value: 0x000000ff

Debug: arm7_9_common.c:1925 arm7_9_write_memory(): address: 0x00070000, size:

0x00000002, count: 0x00000001

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000004

Debug: embeddedice.c:220 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:384 embeddedice_write_reg(): 0: 0x00000005

Debug: gdb_server.c:188 gdb_put_packet(): sending packet '$O657261736564207365

63746f72732030207468726f7567682037206f6e20666c6173682062616e6b203020696e20337320

393437393675730a#3c’

Debug: gdb_server.c:136 gdb_get_char(): received ‘-’

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

Debug: gdb_server.c:188 gdb_put_packet(): sending packet '$O657261736564207365

63746f72732030207468726f7567682037206f6e20666c6173682062616e6b203020696e20337320

393437393675730a#3c’

Debug: gdb_server.c:136 gdb_get_char(): received ‘++’

Debug: gdb_server.c:188 gdb_put_packet(): sending packet ‘$OK#9a’

Debug: gdb_server.c:136 gdb_get_char(): received ‘+’

Debug: gdb_server.c:248 gdb_get_packet(): character: ‘+’

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no pack

et pending

Here is the segfault:

Debug: gdb_server.c:188 gdb_put_packet(): sending packet '$O77726f746520302062

7974652066726f6d2066696c65202f686f6d652f69616e622f7261706974612f73766e2f6c696e75

782f7261706974696d652f6578616d706c65732f435f6576616c5f6b69742f68656c6c6f776f726c

642f68656c6c6f2e656c6620696e2033732033303838343875732028302e303030303030206b622f

73290a#63’

*** glibc detected *** /home/ianb/rapita/svn/linux/openocd/src/openocd: double free or corruption (fasttop): 0x080c0c30 ***

Here is the backtrace, as line numbers, not that I think it will help

openocd/src/flash/flash.c:597

openocd/src/helper/command.c:372

openocd/src/server/gdb_server.c:1189

openocd/src/server/gdb_server.c:1427

openocd/src/server/server.c:356

openocd/src/openocd.c:142

Perhaps more usefully, here’s a valgrind output:

==31666== Memcheck, a memory error detector.

==31666== Copyright (C) 2002-2007, and GNU GPL’d, by Julian Seward et al.

==31666== Using LibVEX rev 1732, a library for dynamic binary translation.

==31666== Copyright (C) 2004-2007, and GNU GPL’d, by OpenWorks LLP.

==31666== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework.

==31666== Copyright (C) 2000-2007, and GNU GPL’d, by Julian Seward et al.

==31666== For more details, rerun with: -v

==31666==

Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)

==31666== Invalid read of size 1

==31666== at 0x418EDB3: usb_parse_descriptor (in /lib/libusb-0.1.so.4.4.4)

==31666== by 0x418F199: usb_parse_configuration (in /lib/libusb-0.1.so.4.4.4)

==31666== by 0x4191364: usb_os_find_devices (in /lib/libusb-0.1.so.4.4.4)

==31666== by 0x418E7AA: usb_find_devices (in /lib/libusb-0.1.so.4.4.4)

==31666== by 0x4042874: ftdi_usb_open_desc (in /usr/lib/libftdi.so.0.10.0)

==31666== by 0x808041D: ft2232_init (ft2232.c:1433)

==31666== by 0x807C3AA: jtag_init (jtag.c:1421)

==31666== by 0x80497AA: main (openocd.c:111)

==31666== Address 0x41A44E4 is 0 bytes after a block of size 20 alloc’d

==31666== at 0x4023765: malloc (vg_replace_malloc.c:149)

==31666== by 0x41912FE: usb_os_find_devices (in /lib/libusb-0.1.so.4.4.4)

==31666== by 0x418E7AA: usb_find_devices (in /lib/libusb-0.1.so.4.4.4)

==31666== by 0x4042874: ftdi_usb_open_desc (in /usr/lib/libftdi.so.0.10.0)

==31666== by 0x808041D: ft2232_init (ft2232.c:1433)

==31666== by 0x807C3AA: jtag_init (jtag.c:1421)

==31666== by 0x80497AA: main (openocd.c:111)

==31666==

==31666== Syscall param ioctl(USBDEVFS_URB).buffer points to uninitialised byte(s)

==31666== at 0x4110754: ioctl (in /lib/libc-2.6.1.so)

==31666== by 0x404260D: ftdi_write_data (in /usr/lib/libftdi.so.0.10.0)

==31666== by 0x807E623: ft2232_write (ft2232.c:186)

==31666== by 0x807F9B8: ft2232_send_and_recv (ft2232.c:361)

==31666== by 0x807FD1B: ft2232_execute_queue (ft2232.c:1285)

==31666== by 0x807A0FE: jtag_execute_queue (jtag.c:1174)

==31666== by 0x807C1F3: jtag_validate_chain (jtag.c:1338)

==31666== by 0x807C41A: jtag_init (jtag.c:1443)

==31666== by 0x80497AA: main (openocd.c:111)

==31666== Address 0x41A6B12 is 10 bytes inside a block of size 131,072 alloc’d

==31666== at 0x4023765: malloc (vg_replace_malloc.c:149)

==31666== by 0x80805C3: ft2232_init (ft2232.c:1546)

==31666== by 0x807C3AA: jtag_init (jtag.c:1421)

==31666== by 0x80497AA: main (openocd.c:111)

Warning: arm7_9_common.c:674 arm7_9_poll(): DBGACK set while target was in unknown state. Reset or initialize target before resuming

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x8051000: arm9tdmi_examine_debug_reason (arm9tdmi.c:120)

==31666== by 0x80543F8: arm7_9_debug_entry (arm7_9_common.c:1026)

==31666== by 0x8056F95: arm7_9_poll (arm7_9_common.c:680)

==31666== by 0x8058418: arm7_9_prepare_reset_halt (arm7_9_common.c:900)

==31666== by 0x804C5E0: target_process_reset (target.c:265)

==31666== by 0x804C7D5: target_init (target.c:344)

==31666== by 0x80497EA: main (openocd.c:115)

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x805461D: arm7_9_debug_entry (arm7_9_common.c:1092)

==31666== by 0x8056F95: arm7_9_poll (arm7_9_common.c:680)

==31666== by 0x8058418: arm7_9_prepare_reset_halt (arm7_9_common.c:900)

==31666== by 0x804C5E0: target_process_reset (target.c:265)

==31666== by 0x804C7D5: target_init (target.c:344)

==31666== by 0x80497EA: main (openocd.c:115)

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x8054626: arm7_9_debug_entry (arm7_9_common.c:1092)

==31666== by 0x8056F95: arm7_9_poll (arm7_9_common.c:680)

==31666== by 0x8058418: arm7_9_prepare_reset_halt (arm7_9_common.c:900)

==31666== by 0x804C5E0: target_process_reset (target.c:265)

==31666== by 0x804C7D5: target_init (target.c:344)

==31666== by 0x80497EA: main (openocd.c:115)

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x805462F: arm7_9_debug_entry (arm7_9_common.c:1092)

==31666== by 0x8056F95: arm7_9_poll (arm7_9_common.c:680)

==31666== by 0x8058418: arm7_9_prepare_reset_halt (arm7_9_common.c:900)

==31666== by 0x804C5E0: target_process_reset (target.c:265)

==31666== by 0x804C7D5: target_init (target.c:344)

==31666== by 0x80497EA: main (openocd.c:115)

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x8054638: arm7_9_debug_entry (arm7_9_common.c:1092)

==31666== by 0x8056F95: arm7_9_poll (arm7_9_common.c:680)

==31666== by 0x8058418: arm7_9_prepare_reset_halt (arm7_9_common.c:900)

==31666== by 0x804C5E0: target_process_reset (target.c:265)

==31666== by 0x804C7D5: target_init (target.c:344)

==31666== by 0x80497EA: main (openocd.c:115)

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x8054640: arm7_9_debug_entry (arm7_9_common.c:1092)

==31666== by 0x8056F95: arm7_9_poll (arm7_9_common.c:680)

==31666== by 0x8058418: arm7_9_prepare_reset_halt (arm7_9_common.c:900)

==31666== by 0x804C5E0: target_process_reset (target.c:265)

==31666== by 0x804C7D5: target_init (target.c:344)

==31666== by 0x80497EA: main (openocd.c:115)

Warning: arm7_9_common.c:933 arm7_9_halt(): target was already halted

Info: server.c:67 add_connection(): accepted ‘gdb’ connection from 0

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

==31666==

==31666== Conditional jump or move depends on uninitialised value(s)

==31666== at 0x8081032: buf_get_u32 (binarybuffer.c:87)

==31666== by 0x806EC84: armv4_5_set_core_reg (armv4_5.c:231)

==31666== by 0x806EFA2: armv4_5_run_algorithm (armv4_5.c:554)

==31666== by 0x80941D8: str9x_write_block (str9x.c:402)

==31666== by 0x80944ED: str9x_write (str9x.c:478)

==31666== by 0x808865A: flash_write (flash.c:881)

==31666== by 0x8089917: handle_flash_write_image_command (flash.c:573)

==31666== by 0x808230E: command_run_line (command.c:372)

==31666== by 0x808727E: gdb_query_packet (gdb_server.c:1188)

==31666== by 0x8087D80: gdb_input (gdb_server.c:1427)

==31666== by 0x8083AE3: server_loop (server.c:356)

==31666== by 0x8049900: main (openocd.c:139)

Error: str9x.c:488 str9x_write(): flash writing failed with error code: 0xfffffc7a

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

Warning: gdb_server.c:206 gdb_put_packet(): negative reply, retrying

==31666==

==31666== Invalid read of size 4

==31666== at 0x8089930: handle_flash_write_image_command (flash.c:582)

==31666== by 0x808230E: command_run_line (command.c:372)

==31666== by 0x808727E: gdb_query_packet (gdb_server.c:1188)

==31666== by 0x8087D80: gdb_input (gdb_server.c:1427)

==31666== by 0x8083AE3: server_loop (server.c:356)

==31666== by 0x8049900: main (openocd.c:139)

==31666== Address 0x4396E50 is 0 bytes inside a block of size 8 free’d

==31666== at 0x402337F: free (vg_replace_malloc.c:233)

==31666== by 0x8089B03: handle_flash_write_image_command (flash.c:577)

==31666== by 0x808230E: command_run_line (command.c:372)

==31666== by 0x808727E: gdb_query_packet (gdb_server.c:1188)

==31666== by 0x8087D80: gdb_input (gdb_server.c:1427)

==31666== by 0x8083AE3: server_loop (server.c:356)

==31666== by 0x8049900: main (openocd.c:139)

==31666==

==31666== Invalid free() / delete / delete

==31666== at 0x402337F: free (vg_replace_malloc.c:233)

==31666== by 0x80899BD: handle_flash_write_image_command (flash.c:595)

==31666== by 0x808230E: command_run_line (command.c:372)

==31666== by 0x808727E: gdb_query_packet (gdb_server.c:1188)

==31666== by 0x8087D80: gdb_input (gdb_server.c:1427)

==31666== by 0x8083AE3: server_loop (server.c:356)

==31666== by 0x8049900: main (openocd.c:139)

==31666== Address 0x4396E50 is 0 bytes inside a block of size 8 free’d

==31666== at 0x402337F: free (vg_replace_malloc.c:233)

==31666== by 0x8089B03: handle_flash_write_image_command (flash.c:577)

==31666== by 0x808230E: command_run_line (command.c:372)

==31666== by 0x808727E: gdb_query_packet (gdb_server.c:1188)

==31666== by 0x8087D80: gdb_input (gdb_server.c:1427)

==31666== by 0x8083AE3: server_loop (server.c:356)

==31666== by 0x8049900: main (openocd.c:139)

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

Warning: gdb_server.c:255 gdb_get_packet(): acknowledgment received, but no packet pending

It looks like gdb is having problems with the first packet sent after the erase.

Also it look like the flash write was executed but 0 bytes were written.

Could you try programming using the telnet interface or a reset script.

I have my doubts on using the gdb monitor interface for programming due to timeout issues etc.

Cheers

Spen

Hi Spen,

It seems that the segfault also occurs during the flash write when using the telnet interface. Valgrind returns the same memory issue:

jump on unitialised value at binarybuffer.c:87

invalid read (4) flash.c:582

invalid free flash.c:595

but the erasing seemed ok. Perhaps these are two separate issues: a pointer issue during the write, and a gdb synch problem during the erase.

If you would me to send any particular debugging/trace information, please let me know (although I will have some difficulty between Tuesday and Friday this week).

Thanks

Ian

Looks like you have found one bug.

As it sounds like you are building from source, could you apply the following patch.

Index: flash.c
===================================================================
--- flash.c	(revision 211)
+++ flash.c	(working copy)
@@ -574,7 +574,6 @@
 	{
 		command_print(cmd_ctx, "failed writing image %s: %s", args[0], error_str);
 		free(error_str);
-		free(failed);
 	}
 	
 	for (i = 0; i < image.num_sections; i++)

This should cure the crash and enable us to debug why the flashing is failing.

Cheers

Spen

Hi Spen,

Thanks for the fix. It does solve the crash of course.

However, it still does not write the flash (or print any more diagnostic messages):

str9x flash_config 0 0 6 0x80000 0

flash protect 0 0 7 off

cleared protection for sectors 0 through 7 on flash bank 0

flash erase 0 0 7

erased sectors 0 through 7 on flash bank 0 in 3s 226694us

flash write_image hello.elf

failed writing image hello.elf: flash program error

wrote 0 byte from file hello.elf in 3s 480197us (0.000000 kb/s)

I also notice:

flash info 0

#0: str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0

#0: 0x00000000 (0x10000 64kB) erased, protected

#1: 0x00010000 (0x10000 64kB) erased, protected

#2: 0x00020000 (0x10000 64kB) erased, protected

#3: 0x00030000 (0x10000 64kB) erased, protected

#4: 0x00040000 (0x10000 64kB) erased, protected

#5: 0x00050000 (0x10000 64kB) erased, protected

#6: 0x00060000 (0x10000 64kB) erased, protected

#7: 0x00070000 (0x10000 64kB) erased, protected

Should it be not protected at this stage?

There was nothing obvious (to me) in the debug output. I can send it to you if you want, but it’s quite big of course.

Thanks

Ian

yes attach the debug log, it may be a starting point.

also can you show me your exact config and flash script

Cheers

Spen

Hi Spen,

I have managed to get the flash to burn ok now (from the telnet interface), the cause was an incorrect configuration command.

For the str9-comstick on svn 211, I should have used, not the one I got from somewhere else on the internet.

str9x flash_config 0 8 4 0 0x80000

I assume that before, the flash programmer was correctly writing 0 bytes because the configuration said that the flash size was 0, but the error reporting was picking up a zero size write as an error… or something similar.

The GDB communication is still broken however, I should be able to look again next week.

By the way - one reason I didn’t come across this before is because the documentation on the SVN for this command is not not there, and the one example is not right.

I tried to edit the wiki, but i get a permission to access index.phtml error from the server. Is it broken or is editing actually restricted?

However, I am not sure what the relevance of the first argument (bank) on the command is, since the arguments apply to bank0 and bank1 of this processor.

Thanks

Ian

When you mean the gdb is broken, are you referring to debug or programming? Personally i would use a separate script openocd config for programming then another for debug.

Yes there are a few problems with the wiki, i have created a texinfo file but have yet to commit to svn.

The reason for the bank as the first argument is so openocd can get the target associated with the flash bank - so the bank could be either 0 or 1 with the same results.

The flash controller is a bit strange in the fact it needs configuring before you can program it. On the other hand it is quite powerful as it can be remapped.

Cheers

Spen