Hi Spencer et al,

> 
> I am not sure what you mean, issuing as reset halt (or reset init)
> will cause OpenOCD to reset the target @ the reset vector.
> Can you explain in more detail, perhaps with some logs attached?
> 
> FYI: OpenOCD at the moment only supports the software reset for
> stlink, however this should mean the same as a hardware (srst) reset
> on the stm32 as it supports SYSRESETREQ.
> 
> Cheers
> Spen

Ok I have made some real progress.
I checked out the latest revision from the Git repository and did a build and 
install on Windows
I am able to flash the stm32l-discovery without error.
On starting the debug server the reset is now working with the following output

Current working directory: 
C:\CodeLite-embed\msys\home\Projects\Stm32f1L_Discovery_demo\build\App\Debug
Running program: "C:\CodeLite-embed\msys\local\bin\openocd.exe" -f 
C:\CodeLite-embed/msys/local/share/openocd/codelite/Stm32Lx_STLink_GDB.cfg
Open On-Chip Debugger 0.6.0-dev-00425-g631b80f-dirty (2012-02-21-16:10)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : must select a transport.
1 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_assert_width: 2000
adapter_nsrst_delay: 2000
Info : clock speed 1 kHz
Info : IDCODE 2ba01477
Info : stm32lx.cpu: hardware has 6 breakpoints, 4 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08002874 msp: 0x20004000
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08002874 msp: 0x20004000

On starting a debug session I get the following output from the server

Info : accepting 'gdb' connection from 3333
Info : flash size = 128kbytes
Warn : acknowledgment received, but no packet pending


The last few lines of the output from CodeLite shows the following

DEBUG>>~"Reset_Handler () at 
C:/CodeLite-embed/msys/home/Projects/Stm32f1L_Discovery_demo/App/src\\startup_stm32l1xx_md.s:67\n"
Reset_Handler () at 
C:/CodeLite-embed/msys/home/Projects/Stm32f1L_Discovery_demo/App/src\startup_stm32l1xx_md.s:67
DEBUG>>~"67\t  movs r1, #0\n"
67\t  movs r1, #0
DEBUG>>*stopped,frame={addr="0x08002874",func="Reset_Handler",args=[],file="C:/CodeLite-embed/msys/home/Projects/Stm32f1L_Discovery_demo/App/src\\startup_stm32l1xx_md.s",fullname="c:\\codelite-embed\\msys\\home\\projects\\stm32f1l_discovery_demo\\app\\src\\startup_stm32l1xx_md.s",line="67"},thread-id="1",stopped-threads="all"
DEBUG>>00000001^done
Successfully connected to debugger server
Applying breakpoints...
Applying breakpoints... done
DEBUG>>00000002-exec-continue
DEBUG>>~"Note: automatically using hardware breakpoints for read-only 
addresses.\n"
Note: automatically using hardware breakpoints for read-only addresses.
DEBUG>>00000002^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={addr="0x08002876",func="Reset_Handler",args=[],file="C:/CodeLite-embed/msys/home/Projects/Stm32f1L_Discovery_demo/App/src\\startup_stm32l1xx_md.s",fullname="c:\\codelite-embed\\msys\\home\\projects\\stm32f1l_discovery_demo\\app\\src\\startup_stm32l1xx_md.s",line="68"},thread-id="1",stopped-threads="all"


This tells me that the breakpoint at "Reset_Handler" has been hit, but it never 
updated the breakpoint marker in the source file.
To trace the problem I did a comparison  with the output from my 
stm32f10z-128k-eval using the versaloon mini dongle.
The output is as follows.

DEBUG>>~"Reset_Handler () at 
C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\\startup_stm32f10x_md.S:67\n"
Reset_Handler () at 
C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\startup_stm32f10x_md.S:67
DEBUG>>~"67\t  movs\tr1, #0\n"
67\t  movs\tr1, #0
DEBUG>>*stopped,frame={addr="0x0800f154",func="Reset_Handler",args=[],file="C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\\startup_stm32f10x_md.S",fullname="c:\\codelite-embed\\msys\\home\\projects\\stm3210b_eval_demo\\message_2\\src\\startup_stm32f10x_md.S",line="67"},thread-id="1",stopped-threads="all"
DEBUG>>00000102^done
Successfully connected to debugger server
Applying breakpoints...
Applying breakpoints... done
DEBUG>>00000103-exec-continue
DEBUG>>~"Note: automatically using hardware breakpoints for read-only 
addresses.\n"
Note: automatically using hardware breakpoints for read-only addresses.
DEBUG>>00000103^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0800f156",file="C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\\\\startup_stm32f10x_md.S",fullname="c:\\\\codelite-embed\\\\msys\\\\home\\\\projects\\\\stm3210b_eval_demo\\\\message_2\\\\src\\\\startup_stm32f10x_md.S",line="68",times="1",original-location="Reset_Handler"}
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0800f156",file="C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\\\\startup_stm32f10x_md.S",fullname="c:\\\\codelite-embed\\\\msys\\\\home\\\\projects\\\\stm3210b_eval_demo\\\\message_2\\\\src\\\\startup_stm32f10x_md.S",line="68",times="1",original-location="Reset_Handler"}
DEBUG>>*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0800f156",func="Reset_Handler",args=[],file="C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\\startup_stm32f10x_md.S",fullname="c:\\codelite-embed\\msys\\home\\projects\\stm3210b_eval_demo\\message_2\\src\\startup_stm32f10x_md.S",line="68"},thread-id="1",stopped-threads="all"
DEBUG>>00000104-file-list-exec-source-file
DEBUG>>00000105-break-list
DEBUG>>00000104^done,line="68",file="C:/CodeLite-embed/msys/home/Projects/Stm3210B_eval_demo/message_2/src\\startup_stm32f10x_md.S",fullname="c:\\codelite-embed\\msys\\home\\projects\\stm3210b_eval_demo\\message_2\\src\\startup_stm32f10x_md.S",macro-info="0"
DEBUG>>00000106-data-disassemble -f 
c:\codelite-embed\msys\home\projects\stm3210b_eval_demo\message_2\src\startup_stm32f10x_md.S
 -l 68 -- 1
DEBUG>>00000105^done,BreakpointTable={nr_rows="1",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},
...
/src\\startup_stm32f10x_md.S",line_asm_insn=[{address="0x0800f182",func-name="LoopFillZerobss",offset="14",inst="bx\tlr"},{address="0x0800f184",func-name="LoopFillZerobss",offset="16",inst="ldrd\tr0,
 r8, [r12, 
#-4]"},{address="0x0800f188",func-name="LoopFillZerobss",offset="20",inst="movs\tr0,
 
r0"},{address="0x0800f18a",func-name="LoopFillZerobss",offset="22",inst="movs\tr0,
 
#0"},{address="0x0800f18c",func-name="LoopFillZerobss",offset="24",inst="lsls\tr0,
 r0, 
#24"},{address="0x0800f18e",func-name="LoopFillZerobss",offset="26",inst="movs\tr0,
 
#0"},{address="0x0800f190",func-name="LoopFillZerobss",offset="28",inst="lsls\tr0,
 r0, 
#24"},{address="0x0800f192",func-name="LoopFillZerobss",offset="30",inst="movs\tr0,
 
#0"},{address="0x0800f194",func-name="LoopFillZerobss",offset="32",inst="lsrs\tr4,
 r1, 
#32"},{address="0x0800f196",func-name="LoopFillZerobss",offset="34",inst="movs\tr0,
 #0"}]}]
Starting Disassembly

In this case the "stopped,reason" is breakpoint-hit whereas "stopped,reason" 
for the stlink-v2 discovery is "signal-received" .
What I have to do now is correct my CodeLite dll to correctly handle all of the 
"stopped, reason"'s and I should be in business.
The stm32f4 discovery is also looking very good.

I will report my progress tomorrow.

For now I must really thank you for your help and patience in getting me this 
far. I will also do some testing on Ubuntu Linux.

Cheers for now,

Noel


Noel Diviney Ayrenet Pty Ltd, 24 Wadhurst Drive, Boronia, Victoria 3155,
 Australia. Phone +61 3 9887 1130 email n...@ayrenet.com or 
div...@hotmail.com


                                          
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to