Re: [coldfire-gnu-discuss] Using m68k-elf-cfpe-stub with our own board
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldfire-gnu-discuss] Using m68k-elf-cfpe-stub with our own board



David Brown wrote:
Can anyone give me some pointers to getting board setup to work correctly using CodeSourcery's gdb and stub? I have two problems - I can't see how to set (or view) cpu space registers, and I can't get the stub to use my own board configuration file.

I'm used to using a older version of gdb, patched with bdm support (from bdm.sourceforge.net). My board setup is done with commands in a .gdbinit file such as:

bdm-write-creg 0xc05 0x10000001

I can't find any way to do something similar with the CodeSourcery tools.

The cfpe-stub program appears to do a certain amount of board setup, based on the "-t" parameter. For example, when called with "m68k-elf-cfpe-stub -t m5213evb", creg 0xc05 (aka RAMBAR) is apparently set to 0x20000001. I'd like to use my own target setup, but I can't find any information on the configuration file syntax (the CodeSourcery documentation refers to the Code Worrier documentation, but I've no plans to download hundreds of megabytes of Code Worrier if I can avoid it). I tried using a cfg file from FreeScale's flash programmer, but that does not seem to work. If anyone has an example configuration file, I expect I can figure out what changes I'd need for my own use.

mvh.,

David



It turns out that you can get the Code Worrier user's guide from without downloading the whole lot, from:

http://www.freescale.com/files/soft_dev_tools/doc/user_guide/COLDFIREUG.pdf

As an example (in case it is of use to others), my "board.cfg" file is:

; Set RAMBAR for ram access
writecontrolreg 0xc05 0x10000221
writemem.l 0x40000008 0x10000200

; Set SYNCR for x8 clock
writemem.w 0x40120000 0x2007



I'd still like to know how to change cpu-space registers from with gdb, if anyone has any ideas - for some processors, it is important to be able to do things like turn caching on and off while debugging.


mvh.,

David