problem with IAR EWARM 5.11 on LPC2148

Open source ARM Debugger

Moderator: phalanx

problem with IAR EWARM 5.11 on LPC2148

Postby SimonQian » Sun Jul 20, 2008 11:51 pm

I use the demo project in IAR EWARM 5.11 KS.
It basically works, but there is some problems with the breakpoint.

If I set a breakpoint in 0x00002104, there will be warnings in the OpenOCD:
Code: Select all
Warning: arm7_9_common.c:2125 arm7_9_write_memory(): memory write caused data abort (address: 0x00002104, size: 0x2, count: 0x1)
Warning: arm7_9_common.c:2125 arm7_9_write_memory(): memory write caused data abort (address: 0x00002104, size: 0x2, count: 0x1)

It seems that IAR EWARM call 'M' command to write data to 0x00002104.

And IAR EWARM cannot set more than 1 breakpoint.
The first breakpoint is set to 0x00000008 by default.
It's maybe used by the FlashLoader.
So there will be only 1 hardware breakpoint available.
And it seems that the software breakpoint is not available.

So does anyone use OpenOCD with IAR EWARM on LPC2148?
I test it on STM32F101C6, IAR EWARM will aslo call 'M' command to write data on the breakpoint, but without warnings.
SimonQian
 
Posts: 49
Joined: Mon May 12, 2008 12:55 am

Postby SimonQian » Mon Jul 21, 2008 12:28 am

-d3 output with STM32F101C6 when set breakpoint at 0x080003D2:
Code: Select all
Debug:   3218 35891 gdb_server.c:1866 gdb_input_inner(): received packet: 'm80003d2,2'
Debug:   3219 35891 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0x080003d2, len: 0x00000002
Debug:   3220 35891 target.c:1063 target_read_buffer(): reading buffer of 2 byte at 0x080003d2
Debug:   3221 35891 gdb_server.c:1866 gdb_input_inner(): received packet: 'M80003d2,2:55aa'
Debug:   3222 35891 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0x080003d2, len: 0x00000002
Debug:   3223 35891 target.c:994 target_write_buffer(): writing buffer of 2 byte at 0x080003d2
Debug:   3224 35906 gdb_server.c:1866 gdb_input_inner(): received packet: 'm80003d2,2'
Debug:   3225 35906 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0x080003d2, len: 0x00000002
Debug:   3226 35906 target.c:1063 target_read_buffer(): reading buffer of 2 byte at 0x080003d2
Debug:   3227 35906 gdb_server.c:1866 gdb_input_inner(): received packet: 'M80003d2,2:00f0'
Debug:   3228 35906 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0x080003d2, len: 0x00000002
Debug:   3229 35906 target.c:994 target_write_buffer(): writing buffer of 2 byte at 0x080003d2
Debug:   3230 35906 gdb_server.c:1866 gdb_input_inner(): received packet: 'Z1,80003d2,2'
Debug:   3231 35906 gdb_server.c:1242 gdb_breakpoint_watchpoint_packet(): -
Debug:   3232 35906 target.c:1253 target_write_u32(): address: 0xe0002010, value: 0x880003d1
Debug:   3233 35906 cortex_m3.c:828 cortex_m3_set_breakpoint(): fpc_num 2 fpcr_value 0x880003d1
Debug:   3234 35906 breakpoints.c:95 breakpoint_add(): added hardware breakpoint at 0x080003d2 of l
Debug:   3235 35906 gdb_server.c:1866 gdb_input_inner(): received packet: 'me0002000,4'
Debug:   3236 35906 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0xe0002000, len: 0x00000004
Debug:   3237 35906 target.c:1063 target_read_buffer(): reading buffer of 4 byte at 0xe0002000
Debug:   3238 35906 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me0002000,4:02000000'
Debug:   3239 35906 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe0002000, len: 0x00000004
Debug:   3240 35906 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe0002000
Debug:   3241 35922 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me0002008,4:d1030088'
Debug:   3242 35922 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe0002008, len: 0x00000004
Debug:   3243 35922 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe0002008
Debug:   3244 35922 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me000200c,4:f5030088'
Debug:   3245 35922 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe000200c, len: 0x00000004
Debug:   3246 35922 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe000200c
Debug:   3247 35922 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me0002010,4:fd030088'
Debug:   3248 35922 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe0002010, len: 0x00000004
Debug:   3249 35922 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe0002010
Debug:   3250 35922 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me0002014,4:00000000'
Debug:   3251 35922 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe0002014, len: 0x00000004
Debug:   3252 35922 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe0002014
Debug:   3253 35922 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me0002018,4:00000000'
Debug:   3254 35922 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe0002018, len: 0x00000004
Debug:   3255 35922 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe0002018
Debug:   3256 35938 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me000201c,4:00000000'
Debug:   3257 35938 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe000201c, len: 0x00000004
Debug:   3258 35938 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe000201c
Debug:   3259 35938 gdb_server.c:1866 gdb_input_inner(): received packet: 'Me0002000,4:03000000'
Debug:   3260 35938 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0xe0002000, len: 0x00000004
Debug:   3261 35938 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0xe0002000


-d3 output with LPC2148 when set breakpoint at 0x00002122 in Thumb Mode:
Code: Select all
Debug:   4111 37422 gdb_server.c:1866 gdb_input_inner(): received packet: 'm2122,2'
Debug:   4112 37422 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0x00002122, len: 0x00000002
Debug:   4113 37422 target.c:1063 target_read_buffer(): reading buffer of 2 byte at 0x00002122
Debug:   4114 37422 arm7_9_common.c:1830 arm7_9_read_memory(): address: 0x00002122, size: 0x00000002, count: 0x00000001
Debug:   4115 37422 gdb_server.c:1866 gdb_input_inner(): received packet: 'M2122,2:55aa'
Debug:   4116 37422 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0x00002122, len: 0x00000002
Debug:   4117 37422 target.c:994 target_write_buffer(): writing buffer of 2 byte at 0x00002122
Debug:   4118 37422 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004
Debug:   4119 37437 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Warning: 4120 37437 arm7_9_common.c:2125 arm7_9_write_memory(): memory write caused data abort (address: 0x00002122, size: 0x2, count: 0x1)
Debug:   4121 37437 arm7tdmi.c:475 arm7tdmi_write_xpsr_im8(): xpsr_im: df, rot: 0, spsr: 0
Debug:   4122 37437 gdb_server.c:1866 gdb_input_inner(): received packet: 'm2122,2'
Debug:   4123 37437 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0x00002122, len: 0x00000002
Debug:   4124 37437 target.c:1063 target_read_buffer(): reading buffer of 2 byte at 0x00002122
Debug:   4125 37437 arm7_9_common.c:1830 arm7_9_read_memory(): address: 0x00002122, size: 0x00000002, count: 0x00000001
Debug:   4126 37437 gdb_server.c:1866 gdb_input_inner(): received packet: 'M2122,2:304a'
Debug:   4127 37437 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0x00002122, len: 0x00000002
Debug:   4128 37437 target.c:994 target_write_buffer(): writing buffer of 2 byte at 0x00002122
Debug:   4129 37437 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004
Debug:   4130 37437 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Warning: 4131 37453 arm7_9_common.c:2125 arm7_9_write_memory(): memory write caused data abort (address: 0x00002122, size: 0x2, count: 0x1)
Debug:   4132 37453 arm7tdmi.c:475 arm7tdmi_write_xpsr_im8(): xpsr_im: df, rot: 0, spsr: 0
Debug:   4133 37453 gdb_server.c:1866 gdb_input_inner(): received packet: 'Z1,2122,2'
Debug:   4134 37453 gdb_server.c:1242 gdb_breakpoint_watchpoint_packet(): -
Debug:   4135 37453 breakpoints.c:95 breakpoint_add(): added hardware breakpoint at 0x00002122 of length 0x00000002


-d3 output with LPC2148 when set breakpoint at 0x000033C8 in ARM Mode:
Code: Select all
Debug:   4563 33812 gdb_server.c:1866 gdb_input_inner(): received packet: 'm33c8,4'
Debug:   4564 33812 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0x000033c8, len: 0x00000004
Debug:   4565 33812 target.c:1063 target_read_buffer(): reading buffer of 4 byte at 0x000033c8
Debug:   4566 33812 arm7_9_common.c:1830 arm7_9_read_memory(): address: 0x000033c8, size: 0x00000004, count: 0x00000001
Debug:   4567 33812 gdb_server.c:1866 gdb_input_inner(): received packet: 'M33c8,4:55aacc33'
Debug:   4568 33812 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0x000033c8, len: 0x00000004
Debug:   4569 33812 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0x000033c8
Debug:   4570 33812 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004
Debug:   4571 33828 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Warning: 4572 33828 arm7_9_common.c:2125 arm7_9_write_memory(): memory write caused data abort (address: 0x000033c8, size: 0x4, count: 0x1)
Debug:   4573 33828 arm7tdmi.c:475 arm7tdmi_write_xpsr_im8(): xpsr_im: df, rot: 0, spsr: 0
Debug:   4574 33828 gdb_server.c:1866 gdb_input_inner(): received packet: 'm33c8,4'
Debug:   4575 33828 gdb_server.c:1049 gdb_read_memory_packet(): addr: 0x000033c8, len: 0x00000004
Debug:   4576 33828 target.c:1063 target_read_buffer(): reading buffer of 4 byte at 0x000033c8
Debug:   4577 33828 arm7_9_common.c:1830 arm7_9_read_memory(): address: 0x000033c8, size: 0x00000004, count: 0x00000001
Debug:   4578 33828 gdb_server.c:1866 gdb_input_inner(): received packet: 'M33c8,4:50219fe5'
Debug:   4579 33828 gdb_server.c:1129 gdb_write_memory_packet(): addr: 0x000033c8, len: 0x00000004
Debug:   4580 33828 target.c:994 target_write_buffer(): writing buffer of 4 byte at 0x000033c8
Debug:   4581 33828 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000004
Debug:   4582 33828 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Warning: 4583 33843 arm7_9_common.c:2125 arm7_9_write_memory(): memory write caused data abort (address: 0x000033c8, size: 0x4, count: 0x1)
Debug:   4584 33843 arm7tdmi.c:475 arm7tdmi_write_xpsr_im8(): xpsr_im: df, rot: 0, spsr: 0
Debug:   4585 33843 gdb_server.c:1866 gdb_input_inner(): received packet: 'Z1,33c8,4'
Debug:   4586 33843 gdb_server.c:1242 gdb_breakpoint_watchpoint_packet(): -
Debug:   4587 33843 breakpoints.c:95 breakpoint_add(): added hardware breakpoint at 0x000033c8 of length 0x00000004
SimonQian
 
Posts: 49
Joined: Mon May 12, 2008 12:55 am

Postby SimonQian » Mon Jul 21, 2008 4:13 am

I got the reason.
sw breakpoints can not be used if debug in flash.
I tried to debug in ram, and it's OK now.
SimonQian
 
Posts: 49
Joined: Mon May 12, 2008 12:55 am


Return to OpenOCD

Who is online

Users browsing this forum: No registered users and 4 guests