Hardware Breakpoints. At wits end

I am trying to get a tool chain installed that will allow me to program and debug an AT91SAM7S256 chip. So far I have Yagarto, Eclipse, and OpenOCD installed. I can compile and download to the board. I have even gotten GDB running, but I am not able to set breakpoints.

With the SAM7, the code runs out of FLASH. From the error messages on the GDB console, it is obvious that it is trying to set software breakpoints and not using the hardware/JTAG breakpoints. I have spend hours on Google and tried a million things and have not gotten anywhere. I have tried the Zylin plugin (even less luck with that) and the standard CDT with the “Standard GDB Hardware Debugging Launcher” rather than the DSF.

It must be possible to do so, as the IAR compiler at work has no problem. I even have been able to debug using the console applications, but the difficulty in typing all the commands is overly difficult. With only two breakpoints, you have to delete the previous before setting the next. This makes single stepping an ordeal.

Somehow I need to tell someone (Eclipse, OpenOCD?) to use the hardware breakpoints. Other than a human sacrifice, what am I missing?

Ugh, I confess I’m not sure if I love Eclipse or hate it. Sorry about the delayed response. At least you have the command line tools working.

Do you get that behavior even on the first two breakpoints?

I have experience only with LPC and STM32 parts - it is possible there is something odd about SAM7 that is tripping you up.

I just installed the current version of Eclipse (4.3.1) on Fedora 20. After considerable floundering I got a simple STM32F4Discovery project up. It gave a choice of standard (CDI) debugger framework or GDB (DSF). I chose standard since that has worked in the past. With verbose console checked I got the following dump. Mostly gibberish to me, but Note: automatically using hardware breakpoints for read-only addresses. seems clear enough.

gdb-set confirm off
256^done
(gdb) 
257-gdb-set width 0
257^done
(gdb) 
258-gdb-set height 0
258^done
(gdb) 
259-interpreter-exec console echo
259^done
(gdb) 
260-gdb-show prompt
260^done,value="(gdb) "
(gdb) 
261-gdb-set new-console on
261^error,msg="No symbol table is loaded.  Use the \"file\" command."
(gdb) 
262 symbol-file /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/stm.o
&"symbol-file /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/stm.o\n"
symbol-file /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/stm.o
262^done
(gdb) 
263-target-select remote localhost:3333
=thread-group-started,id="i1",pid="42000"
=thread-created,id="1",group-id="i1"
*stopped,frame={addr="0x080002e8",func="Reset_Handler",args=[]},thread-id="1",stopped-threads="all"
263^connected
(gdb) 
264 load /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/stm.o 
&"load /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/stm.o \n"
~"Loading section .isr_vector, size 0x188 lma 0x8000000\n"
264+download,{section=".isr_vector",section-size="392",total-size="3421"}
~"Loading section .text, size 0x1b0 lma 0x8000188\n"
264+download,{section=".text",section-size="432",total-size="3421"}
~"Start address 0x8000188, load size 824\n"
~"Transfer rate: 1 KB/sec, 412 bytes/write.\n"
264^done
(gdb) 
265 info proc
&"info proc\n"
&"Undefined info command: \"proc\".  Try \"help info\".\n"
265^error,msg="Undefined info command: \"proc\".  Try \"help info\"."
266 info program
(gdb) 
&"info program\n"
~"Debugging a target over a serial line.\n"
~"Program stopped at 0x80002e8.\n"
~"It stopped with signal SIGINT, Interrupt.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
266^done
267 info threads
(gdb) 
&"info threads\n"
~"  Id   Target Id         Frame \n"
~"* 1    Remote target     0x08000188 in ?? ()\n"
267^done
268-stack-info-depth
(gdb) 
268^done,depth="3"
269-stack-list-frames 0 3
(gdb) 
269^done,stack=[frame={level="0",addr="0x08000188",func="??"},frame={level="1",addr="0xfffffffe",func="??"},frame={level="2",addr="0xfffffffe",func="??"}]
270-data-list-changed-registers
(gdb) 
270^done,changed-registers=["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25"]
271 info sharedlibrary
(gdb) 
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
271^done
(gdb) 
272-environment-directory /media/slug1/code/arm/stm32f4discovery/gpio/gpiod /media/slug1/code/chiplib/st/Libraries/CMSIS/Include /media/slug1/code/chiplib/st/Libraries/CMSIS/Device/ST/STM32F4xx/Include /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4 /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv6-m /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv6-m/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/fpu /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/fpu/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/softfp /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/softfp/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-m /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-m/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/fpu /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/fpu/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/softfp /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/softfp/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/fpu /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/fpu/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/thumb /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/thumb/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/backward /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/bits /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/debug /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/decimal /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/bin_search_tree_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/binary_heap_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/binomial_heap_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/binomial_heap_base_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/branch_policy /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/cc_hash_table_map_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/eq_fn /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/gp_hash_table_map_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/hash_fn /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/left_child_next_sibling_heap_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/list_update_map_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/list_update_policy /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/ov_tree_map_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/pairing_heap_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/pat_trie_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/rb_tree_map_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/rc_binomial_heap_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/resize_policy /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/splay_tree_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/thin_heap_ /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/tree_policy /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/trie_policy /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/unordered_iterator /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/profile /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/profile/impl /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/tr1 /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/tr2 /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/machine /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/rpc /home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/sys /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build /media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/obj /media/slug1/code/chiplib/st/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7
272^done,source-path="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod:/media/slug1/code/chiplib/st/Libraries/CMSIS/Include:/media/slug1/code/chiplib/st/Libraries/CMSIS/Device/ST/STM32F4xx/Include:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv6-m:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv6-m/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/fpu:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/fpu/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/softfp:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-ar/thumb/softfp/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-m:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7-m/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/fpu:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/fpu/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/softfp:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/armv7e-m/softfp/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/fpu:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/fpu/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/thumb:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/arm-none-eabi/thumb/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/backward:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/bits:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/debug:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/decimal:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/bin_search_tree_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/binary_heap_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/binomial_heap_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/binomial_heap_base_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/branch_policy:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/cc_hash_table_map_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/eq_fn:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/gp_hash_table_map_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/hash_fn:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/left_child_next_sibling_heap_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/list_update_map_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/list_update_policy:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/ov_tree_map_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/pairing_heap_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/pat_trie_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/rb_tree_map_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/rc_binomial_heap_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/resize_policy:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/splay_tree_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/thin_heap_:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/tree_policy:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/trie_policy:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/ext/pb_ds/detail/unordered_iterator:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/profile:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/profile/impl:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/tr1:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/c++/4.7.4/tr2:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/machine:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/rpc:/home/hfs2/toolchain/linaro/2013q3/arm-none-eabi/include/sys:/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build:/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/build/obj:/media/slug1/code/chiplib/st/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7:$cdir:$cwd"
273-data-list-register-names
(gdb) 
273^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","f0","f1","f2","f3","f4","f5","f6","f7","fps","cpsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
(gdb) 
274-break-insert main.c:9
274^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080001c6",func="main",file="main.c",fullname="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/main.c",line="9",times="0",original-location="main.c:9"}
(gdb) 
275-break-insert main.c:11
275^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x080001d4",func="main",file="main.c",fullname="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/main.c",line="11",times="0",original-location="main.c:11"}
(gdb) 
276-break-insert main.c:12
276^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x080001ec",func="main",file="main.c",fullname="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/main.c",line="12",times="0",original-location="main.c:12"}
(gdb) 
277-stack-list-arguments 0 0 0
277^done,stack-args=[frame={level="0",args=[]}]
(gdb) 
278-stack-list-locals 0
278^done,locals=[]
(gdb) 
279-exec-continue
~"Note: automatically using hardware breakpoints for read-only addresses.\n"
Note: automatically using hardware breakpoints for read-only addresses.
279^running
*running,thread-id="all"
(gdb) 
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080001c6",func="main",file="main.c",fullname="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/main.c",line="9",times="1",original-location="main.c:9"}
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x080001c6",func="main",args=[],file="main.c",fullname="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/main.c",line="9"},thread-id="1",stopped-threads="all"
(gdb) 
280 info threads
&"info threads\n"
~"  Id   Target Id         Frame \n"
~"* 1    Remote target     main () at main.c:9\n"
280^done
(gdb) 
281-stack-info-depth
281^done,depth="1"
(gdb) 
282-stack-list-frames 0 1
282^done,stack=[frame={level="0",addr="0x080001c6",func="main",file="main.c",fullname="/media/slug1/code/arm/stm32f4discovery/gpio/gpiod/main.c",line="9"}]
283-data-list-changed-registers
(gdb) 
283^done,changed-registers=["2","3","7","13","15"]
284 info sharedlibrary
(gdb) 
&"info sharedlibrary\n"
~"No shared libraries loaded at this time.\n"
284^done
(gdb) 
285-stack-list-arguments 0 0 0
285^done,stack-args=[frame={level="0",args=[]}]
(gdb) 
286-stack-list-locals 0
286^done,locals=[]
(gdb)

Not sure what to check next. I could attempt to set up with Yagarto, but if the issue is SAM7 specific that won’t help. I’d be happy to post some screen shots.

When entering into debug mode, the first breakpoint I set I get no immediate error. As soon as I try to step or run, it tells me my breakpoint (a software on) is not going to work because my code space is FLASH. Thank you Eclipse/GDB, tell me something I don’t know!

Using the command line tools is a pain in that you need to delete the previous (or second previous) hardware breakpoint to set the next. I understand why, but it would be nice if Eclipse could manage HW BPs via the GUI.

At this point I am content to keep the status quo. My major debugging (getting an RTOS assembler routines to work) is behind me. The next level of debugging can mostly be done via printf or led blinks.

But if some one has experience in what tools are needed to use Eclipse as a debugger using hardware breakpoints I would love to hear. There seems to be soooooooo much contradictory and out of date information on the web. Some say to add this plugin, some say it not needed. Some use Yagarto and swear at cygwin, other the other way around.

As I told my wife, it felt like I was building a house without a hammer using only a sandstone rock.

Hi,

First can you provide a better explanation of what steps you have taken, including any configs used.

OpenOCD will use hardware breakpoints if requested by gdb. But for this to happen gdb needs to be aware of the targets memory map - sent by OpenOCD.

You can force OpenOCD to use hardware breakpoints using gdb_breakpoint_override but should only be a last resort. See http://openocd.sourceforge.net/doc/html … figuration

So can you show us what cfg you are using with OpenOCD?

Also run OpenOCD with debug log enabled.

openocd -d3 ...

Cheers

Spen