From: Jeremy S. <js...@mv...> - 2002-05-28 18:02:49
|
manoj ks wrote: > I have gone through the site > http://linuxsh.sourceforge.net/docs/gdb-p.ph3 > but i am not clear on my above doubts. > Could any one pls help on how should i modify the > config.mk and config.h and sh37727.mem files. Not sure what to add to the above document. If you start with the machine/config.mk-sesh3 as an example: CONFIG_LITTLE_ENDIAN=y CONFIG_CPU_SH3=y CONFIG_SESH3=y You keep or drop the first line (ENDIAN) depending on your HW; keep the second (it is an SH3); replace the third with something specifying your target (e.g. CONFIG_BOARDNAME=y). Similarly with the .h file. Then you modify the Makefile so your configuration references the BSC initialization file for your board: +ifdef CONFIG_BOARDNAME +MACHINE_DEPENDS := init-boardname.o +endif You have to generate init-boardname.S yourself based on your specific HW and the BSC for the 7727. (The 7727 BSC is similar but not identical to the 7709A BSC.) While some existing files (e.g. init-cqsh3.S) might serve as a guide the actual values that go into the BSC registers depend on your specific HW... any low-level SW or FW that configures the BSC must be tailored for the HW, not just the CPU. You might also need to use CONFIG_BOARDNAME in sh-sci.c to determine the correct value for BPS_SETTING_VALUE (baud rate divisor) based on the clock speed of your board. And of course you need to set CONFIG_SCIF or CONFIG_SCI in the .h file. > My memory maps are > Flash ROM- BANK0(0000 0000 to 0007 FFFF) > BANK1(0008 0000 to 000F FFFF) > ............................. > ............................. > BANK7(0038 0000 to 003E FFFF) > > SDRAM - BANK0 to BANK 3(0C00 0000 to 0C3F FFFF). > > For sh37727.mem,could you pls specify how i should > fill the 'XXX' > > MEMORY > > { > ROM (rx): ORIGIN = XXX, LENGTH =XXX > RAM (rw): ORIGIN =XXX , LENGTH =XXX > STACK (rw): ORIGIN = XXX, LENGTH = XXXX > > } Your first posting says you want IPL to be in "BANK1", so you probably want: ROM(rx): ORIGIN=0x80080000, LENGTH=16384 The leading 8 just puts you in P1 space (direct-mapped) rather than P0; the length just needs to be big enough to hold the text and read-only space (that's what sh-stub.lds puts into ROM). If you add stuff (e.g. to initialize other devices) you may need to expand it; you could just make it the whole bank (LENGTH=512k) if it makes you more comfortable. The other two you can just safely copy from others: RAM(rw): ORIGIN=0x8c000000, LENGTH=2560 STACK(rw): ORIGIN=0x8c000a00, LENGTH=1536 Hope some of that's at least a little bit helpful... --Jeremy Siegel |