On Nov 29, 2010, at 3:19 PM, Piotr Esden-Tempski wrote: > > On Nov 29, 2010, at 12:39 PM, Øyvind Harboe wrote: > >> Better. >> >> Could you try HEAD w/master branch? >> >>> #0 0x0000000100073314 in mem_ap_read_atomic_u32 (dap=0x10032f540, >>> address=1, value=0x10032e800) at arm_adi_v5.c:214 >> >> => this doesn't point to anything sensible, it's the tailend of the fn. >> >> Also try w/-O0 >> >> CFLAGS="-O0 -g" configure ... >> make clean >> make > > > I did that but it does not change anything. It is still failing at the same > line. For more context maybe this helps. This is the signal I get: > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: 13 at address: 0x0000000000000000 > 0x000000010007325c in mem_ap_read_atomic_u32 (dap=0x10032f540, address=1, > value=0x10032e800) at arm_adi_v5.c:214 > > Also I stepped through the code and this is what is happening: > jim_target_reset (interp=0x100308c90, argc=3, argv=0x7fff5fbfc9d8) at > target.c:4321 > cortex_m3_assert_reset (target=0x10032e950) at cortex_m3.c:921 > mem_ap_read_atomic_u32 (dap=0x10032f7b0, address=3758157296, > value=0x10032f6b0) at arm_adi_v5.c:209 > dap_run (dap=0x10032f7b0) at arm_adi_v5.h:337 > jtag_dp_run (dap=0x10032f7b0) at adi_v5_jtag.c:435 > jtagdp_transaction_endcheck (dap=0x10032f7b0) at adi_v5_jtag.c:222 > jtag_dp_run (dap=0x10032f7b0) at adi_v5_jtag.c:436 > dap_run (dap=0x10032f7b0) at arm_adi_v5.h:339 > mem_ap_read_atomic_u32 (dap=0x10032f7b0, address=3758157296, > value=0x10032f6b0) at arm_adi_v5.c:214 > > these calls work correctly in that order each calling the next. As soon as > dap_run returns the mem_ap_read_atomic_u32 function wants to return the > dap_run value but failes with the memory access error quoted before. I have > never seen such wired behavior before.
I did some more poking. Maybe it will be useful. As this seems to be a memory problem I thought maybe electric-fence will tell us something useful. So I compiled oocd with libefence, and this is what I get: Starting program: /opt/mine/bin/openocd -f interface/flossjtag.cfg -f board/open-bldc.cfg Reading symbols for shared libraries .++++........ done Electric Fence 2.1 Copyright (C) 1987-1998 Bruce Perens. ElectricFence Aborting: free(1003061b0): address not from malloc(). Program received signal SIGILL, Illegal instruction. 0x00007fff82ac8616 in __kill () (gdb) bt #0 0x00007fff82ac8616 in __kill () #1 0x0000000100002ec8 in EF_Abort (pattern=0x10012a2a8 "free(%a): address not from malloc().") at print.c:137 #2 0x0000000100002596 in free (address=0x1003061b0) at efence.c:699 #3 0x00000001000e0301 in SetListFromAny (interp=0x100403e40, objPtr=0x1005e4fc0) at jim.c:5453 #4 0x00000001000e0c29 in Jim_ListLength (interp=0x100403e40, objPtr=0x1005e4fc0) at jim.c:5728 #5 0x00000001000edde5 in Jim_ProcCoreCommand (interp=0x100403e40, argc=4, argv=0x7fff5fbff240) at jim.c:11775 #6 0x00000001000e86b7 in Jim_EvalObj (interp=0x100403e40, scriptObjPtr=0x100415fc0) at jim.c:9422 #7 0x00000001000e8fd3 in Jim_Eval_Named (interp=0x100403e40, script=0x10012dd48 "\n\n\nproc alias {name args} {\n\tset prefix $args\n\tproc $name args prefix {\n\t\ttailcall {*}$prefix {*}$args\n\t}\n}\n\n\nproc lambda {arglist args} {\n\tset name [ref {} function lambda.finalizer]\n\ttailcall proc $"..., filename=0x10012dd3b "stdlib.tcl", lineno=1) at jim.c:9661 #8 0x0000000100101a18 in Jim_stdlibInit (interp=0x100403e40) at jim-stdlib.c:7 #9 0x00000001000f4124 in Jim_InitStaticExtensions (interp=0x100403e40) at jim-load-static-exts.c:10 #10 0x00000001000d1363 in command_init (startup_tcl=0x10012fd80 "# Defines basic Tcl procs that must exist for OpenOCD scripts to work.\n#\n# Embedded into OpenOCD executable\n#\n\n\n# We need to explicitly redirect this to the OpenOCD command\n# as Tcl defines the exit p"..., interp=0x100403e40) at command.c:1338 #11 0x00000001000039dc in setup_command_handler (interp=0x0) at openocd.c:267 #12 0x0000000100003ae1 in openocd_main (argc=5, argv=0x7fff5fbff488) at openocd.c:314 #13 0x0000000100003153 in main (argc=5, argv=0x7fff5fbff488) at main.c:42 I have no clue about the internals of Jim so maybe I just did something wrong. But who knows it may help. :) Cheers Esden -- Blog: http://www.esden.net Projects: http://open-bldc.org http://paparazziuav.org http://github.org/esden/floss-jtag http://github.org/esden/summon-arm-toolchain
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development