<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC Microcontrollers中的主题 Re: Problems debugging</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514629#M800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jun 2016 01:06:13 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-19T01:06:13Z</dc:date>
    <item>
      <title>Problems debugging</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514627#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by miccio on Thu Mar 24 09:51:43 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and happy Maundy Thursday. In the past weeks, I have been struggling with a pretty annoying behaviour of LPCXpresso debugging system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After clicking the "Debug" button in the Quickstart view, I get welcomed with the following 2 error messages:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Problem Occurred" window&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
Error in final launch sequence
&amp;nbsp; Failed to execute MI command:
&amp;nbsp; -target-download
Error message from debugger back end:
Error finishing flash operation
Error finishing flash operation
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Error reported by target" window&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
15: Target error from Commit Flash write
&amp;nbsp; 15: Target error from Commit Flash write
&amp;nbsp; System rejected access at location 0x02001760 - verify Population of memory and peripherals
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error would occur on a semi-random time basis, and common actions like deleting the .launch files, replugging the probe, power-cycling the board etc are rarely effective (after several observations I'd say that they're pretty irrelevant).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The memory location mentioned in the error message varies too, although it would more or less consistently complain about the same chunk - 0x02001000 to 0x02003000 approximately.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My system is a Linux Mint 17.2 (based on Ubuntu 14.04 LTS).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running LPCXpresso 8.1.2 - I know it's not the latest but the problem was occurring with previous versions too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The debugger probe I use is a LPCXpresso1549 board, flashed with the newest CMSIS-DAP firmware: v5.147.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The debugging target is a custom board featuring an LPC1549JBD64 and connects to the debugger with a standard Cortex Debug Connector (2x5 pins). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The target is powered through an external power supply, and the 3.3V regulator is capable of delivering up to 1A.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the connection diagram for the pin headers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 - 3V3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3 - GND&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5 - GND&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7 - N.C.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;9 - GND&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2 - SWDIO (pin 44) pulled high&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4 - SWCLK (pin 40) pulled low&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6 - N.C.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;8 - N.C.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10 - nRST (pin 45) pulled high&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All pull-up/pull-down resistors are 10K.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the output from the RedlinkServer terminal:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
[Started server]
[Connected on port 3025]
redlink&amp;gt;ProbeList
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.147
Serial Number = LRAYAQAR
VID:PID = 1FC9:0090
Path = /dev/hidraw3
redlink&amp;gt;ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.147
Serial Number = LRAYAQAR
VID:PID = 1FC9:0090
Path = /dev/hidraw3
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 1024
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink&amp;gt;ProbeIsOpen 1
FALSE
redlink&amp;gt;ProbeOpenByIndex 1
Probe Handle 1 Open
redlink&amp;gt;WireIspReset 1
redlink&amp;gt;ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.147
Serial Number = LRAYAQAR
VID:PID = 1FC9:0090
Path = /dev/hidraw3
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 1024
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink&amp;gt;quit
[Closed]
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...from the gdb traces terminal:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
265,012 2-gdb-version
265,013 ~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20151217-cvs-LPCXpresso001\n"
265,014 ~"Copyright (C) 2015 Free Software Foundation, Inc.\n"
&lt;SPAN&gt;265,014 ~"License GPLv3+: GNU GPL version 3 or later &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fgnu.org%2Flicenses%2Fgpl.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gnu.org/licenses/gpl.html&lt;/A&gt;&lt;SPAN&gt;&amp;gt;\nThis is fre\&lt;/SPAN&gt;
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law.&amp;nbsp; Type \"show copying\"\nand \"show warranty\" for details.\n"
265,014 ~"This GDB was configured as \"--host=i686-linux-gnu --target=arm-none-eabi\".\nType \"show \
configuration\" for configuration details."
265,014 ~"\nFor bug reporting instructions, please see:\n"
&lt;SPAN&gt;265,014 ~"&amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fgdb%2Fbugs%2F" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.gnu.org/software/gdb/bugs/&lt;/A&gt;&lt;SPAN&gt;&amp;gt;.\n"&lt;/SPAN&gt;
&lt;SPAN&gt;265,014 ~"Find the GDB manual and other documentation resources online at:\n&amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.gnu.org%2Fsoft" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.gnu.org/soft&lt;/A&gt;&lt;SPAN&gt;\&lt;/SPAN&gt;
ware/gdb/documentation/&amp;gt;.\n"
265,014 ~"For help, type \"help\".\n"
265,014 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
265,014 2^done
265,015 (gdb) 
265,016 3-environment-cd /home/miccio/das-gimbal/firmware/gimbal
265,016 3^done
265,016 (gdb) 
265,017 4-gdb-set breakpoint pending on
265,017 4^done
265,017 (gdb) 
265,018 5-enable-pretty-printing
265,018 5^done
265,018 (gdb) 
265,019 6-gdb-set python print-stack none
265,020 6^done
265,020 (gdb) 
265,021 7-gdb-set print object on
265,021 7^done
265,021 (gdb) 
265,022 8-gdb-set print sevenbit-strings on
265,023 8^done
265,023 (gdb) 
265,023 9-gdb-set charset ISO-8859-1
265,024 9^done
265,024 (gdb) 
265,025 10-gdb-set auto-solib-add on
265,025 10^done
265,026 (gdb) 
265,029 11-file-exec-and-symbols --thread-group i1 /home/miccio/das-gimbal/firmware/gimbal/Debug/das\
-gimbal.axf
265,152 11^done
265,152 (gdb) 
265,157 12-interpreter-exec console "set remotetimeout 60000"
265,157 =cmd-param-changed,param="remotetimeout",value="60000"
265,157 12^done
265,158 (gdb) 
265,248 13-target-select extended-remote | crt_emu_cm_redlink -msg-port=54177 -g -mi -2 -pLPC1549 -v\
endor=NXP -vc -ConnectScript=LPC15RunBootRomConnect.scp -ResetScript=LPC15RunBootRomReset.scp -reset\
= -ProbeHandle=1 -CoreIndex=0 -flash-driver=LPC15xx_256K.cfx
265,852 =thread-group-started,id="i1",pid="42000"
265,852 =thread-created,id="1",group-id="i1"
265,853 14-list-thread-groups --available
265,865 ~"0x030000b8 in ?? ()\n"
265,865 *stopped,frame={addr="0x030000b8",func="??",args=[]},thread-id="1",stopped-threads="all"
265,865 13^connected
265,865 (gdb) 
265,865 14^error,msg="Can not fetch data now."
265,866 (gdb) 
265,912 15-interpreter-exec console "set mem inaccessible-by-default off"
265,912 =cmd-param-changed,param="mem inaccessible-by-default",value="off"
265,912 15^done
265,912 (gdb) 
265,914 16-interpreter-exec console "mon ondisconnect cont"
265,914 16^done
265,914 (gdb) 
265,915 17-interpreter-exec console "set arm force-mode thumb"
265,916 =cmd-param-changed,param="arm force-mode",value="thumb"
265,916 17^done
265,916 (gdb) 
265,918 18-interpreter-exec console "mon capabilities"
265,919 18^done
265,919 (gdb) 
265,921 19-interpreter-exec console "set remote hardware-breakpoint-limit 6"
265,922 =cmd-param-changed,param="remote hardware-breakpoint-limit",value="6"
265,922 19^done
265,922 (gdb) 
265,923 20-interpreter-exec console "mon semihost enable"
265,924 20^done
265,924 (gdb) 
265,925 21-interpreter-exec console "mon info,all"
265,926 21^done
265,977 (gdb) 
266,356 22-data-list-register-names
266,357 22^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12",\
"sp","lr","pc","","","","","","","","","","xpsr","","","","","","","","","","","","","","","","","",\
"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\
","","","","","","","","","","","","","","","cycles"]
266,357 (gdb) 
266,359 23-target-download
266,361 23+download,{section=".text",section-size="90640",total-size="765449"}
266,363 23+download,{section=".ARM.exidx",section-size="8",total-size="765449"}
266,364 23+download,{section=".data",section-size="176",total-size="765449"}
266,564 24-list-thread-groups
266,820 23^error,msg="Error finishing flash operation"
266,820 (gdb) 
266,821 24^error,msg="Reply contains invalid hex digit 111"
266,821 (gdb) 
266,824 25-target-disconnect
266,824 26-gdb-exit
266,857 =thread-group-exited,id="i1"
266,857 25^done
266,857 (gdb) 
266,857 26^exit
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...and from the Debug messages terminal:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
LPCXpresso RedlinkMulti Driver v8.1 (Mar&amp;nbsp; 4 2016 17:16:40 - crt_emu_cm_redlink build 659)
============= SCRIPT: LPC15RunBootRomConnect.scp =============
No probes found
DpID = 2BA01477
AP_ID = 0x24770011
Halt on reset vector catch
Halt on watchpoint write of ROMWSCTRL register
============= END SCRIPT =====================================
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.147 (NXP Semiconductors)
Serial Number:&amp;nbsp; LRAYAQAR
VID:PID:&amp;nbsp; 1FC9:0090
USB Path: /dev/hidraw3
Vector catch on SYSRESETREQ signal
Emu(0): Connected&amp;amp;Reset. DpID: 2BA01477. CpuID: 410FC230. Info: &amp;lt;None&amp;gt;
Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.
inspected v.2 On-chip Flash Memory /usr/local/lpcxpresso_8.1.2_603/lpcxpresso/bin/Flash/LPC15xx_256K.cfx
image 'LPC15 (256K Flash) Feb 16 2016 09:18:59'
NXP: LPC1549&amp;nbsp; Part ID: 0x00000000
( 65) Chip Setup Complete
Connected: was_reset=true. was_stopped=true
LPCXpresso Free License - Download limit is 256K
Writing 90824 bytes to address 0x00000000 in Flash
Target error from Commit Flash write: Em(12). System rejected access at location 0x02001760 - verify Population of memory and peripherals
(crt_emu_cm_redlink) terminating on communication loss: Pipe has been closed by GDB.
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope someone of you knows what's going on, thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:13:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514627#M798</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problems debugging</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514628#M799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vtw.433e on Thu Mar 24 11:20:16 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Most likely it is power issue. Programming the flash takes a lot more power... Use a scope to check what happens to the voltage when this error occurs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:13:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514628#M799</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problems debugging</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514629#M800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:06:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problems-debugging/m-p/514629#M800</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:06:13Z</dc:date>
    </item>
  </channel>
</rss>

