|
From: Spen <sp...@sp...> - 2008-02-18 21:51:02
|
> Having correct memory region info is something that can exist > whatever the aim of the config. And according to a recent > message here, recent GDB already apparently sets the correct > sort of breakpoint if a memory region is marked read-only > (hardware bp) or read-write (software bp). My GDB is a little > older and it didn't work for me (6.4), but you'll need 6.6+ > anyway for the flash support. Anyway, you should be able to > have the same config I'm sure. > > Here's the doc on the 'mem' command which sets up the regions: > http://sourceware.org/gdb/current/onlinedocs/gdb_9.html#SEC73 > > At some point in the future it will probably be possible for > openocd to provide the memory region info to GDB, but it isn't yet. > Openocd already will supply gdb the memory map if enabled, and you have a xml enabled gdb. The config commands are: gdb_memory_map enable gdb_flash_program enable You need to make sure you have a valid openocd flash config and for speed a valid working area. and if any commands need running before flashing, ie. unprotect/flash config then use target_script 0 gdb_program_config gdbprogram.ocr It is all in the info docs about gdb and flash programming. Also have a look here for more info: http://forum.sparkfun.com/viewtopic.php?t=9215&highlight=gdbprogramconfig then when you issue a load gdb will erase/program your flash. to verify you can use the gdb command compare-sections Hope this helps Spen |