|
From: Jonathan L. <ji...@eC...> - 2008-02-18 21:34:43
|
kitts wrote: > On Monday 18 Feb 2008 8:59:27 pm you wrote: > >>>I would like to know if i can >>>follow this method with openocd as it would save a lot of development >>>time. I would request anyone with any knowledge on this to guide me as i >>>was unable to find any openocd examples that followed this method. >> >>openocd implements the required functionality, or at least it's meant to >>;-). So it's up to you to drive GDB to use it. You will only be able to do >>it from kdevelop if kdevelop gives you a GDB command line you can use. >>Note that the feature is only available in GDB 6.6 and later. > > > Thanks for replying. Yes KDevelop does provide a GDB command line but why do i > need that? To set up the memory regions. I guess you can put them in a .gdbinit file if you know what Kdevelop's current working directory is going to be when it runs GDB. >>The key is to define your memory map in GDB correctly to indicate which >>memory regions are flash. Then when you do a 'load' it automatically >>reprograms the flash. > > Do you have any example? How do i specify memory regions? Would this mean that > my gdbinit script mostly remains the same for RAM and FLASH operation except > for the memory region information (and the hardware/software breakpoints > config)? 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. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["The best things in life aren't things."]------ Opinions==mine |