- Wed Jan 09, 2008 5:55 pm
#40680
Hello, I am using this board: (olmex lpc2148 board)
http://www.sparkfun.com/commerce/produc ... cts_id=676
and this programmer (parallel port jtag)
http://www.sparkfun.com/commerce/produc ... cts_id=275
I seem to be able to detect the device and dump the registers, but I cannot load code or set breakpoints.
I have the following config file (arm7_wig.cfg)
I tried setting a breakpoint in main, and I get from openocd:
I am not sure what I am doing wrong. I got the config for openocd from the doc/config folder. I have only had this board for a few hours, so I would appreciate any pointers to better example code that might be easier to debug. So far I am trying to run the elf from lpc2148freertos.
Thanks
http://www.sparkfun.com/commerce/produc ... cts_id=676
and this programmer (parallel port jtag)
http://www.sparkfun.com/commerce/produc ... cts_id=275
I seem to be able to detect the device and dump the registers, but I cannot load code or set breakpoints.
I have the following config file (arm7_wig.cfg)
Code: Select all
I cannot get load to work in gdb, when I type load:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface parport
#parport_port 0x378
parport_cable wiggler
jtag_speed 5
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
target_script 0 reset h2294_init.script
run_and_halt_time 0 30
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum
flash bank cfi 0x80000000 0x400000 2 2 0
#programming and debugging in flash
#gdb_memory_map enable
gdb_flash_program enable
Code: Select all
The output from openocd:
(gdb) load
Loading section .text, size 0x29d4 lma 0x0
Load failed
Code: Select all
I can however telnet to port 4444 and type "load_image program.elf" and it seems to loadWarning: arm7_9_common.c:2084 arm7_9_write_memory(): memory write caused data abort (address: 0x00000000, size: 0x4, count: 0x1e8)
I tried setting a breakpoint in main, and I get from openocd:
Code: Select all
If I uncomment 'gdb_memory_map enable' in my config file, then I get a floating-point exception when I try to connect with gdb (target remote localhost:3333)Info: arm7_9_common.c:285 arm7_9_add_breakpoint(): sw breakpoint requested, but software breakpoints not enabled
Info: breakpoints.c:73 breakpoint_add(): can't add software breakpoint, resource not available
I am not sure what I am doing wrong. I got the config for openocd from the doc/config folder. I have only had this board for a few hours, so I would appreciate any pointers to better example code that might be easier to debug. So far I am trying to run the elf from lpc2148freertos.
Thanks