Hi all,<br><br>My earlier post can be somewhat ignored now.  It seems I have a problem either with VMWare or the machine it is installed on.  I did a fresh install of *nix on another box, and the bdm seems stable now.  I no longer get target bus errors, and things are behaving far more as expected.  At least now, I can launch debug sessions as per the gdb-init supplied with the 5235 BSP.  <br>
<br>Has anyone else had problems with gdb with dbg monitor on VMWare?  I am still interested to hear about 5329 BSP's, and init scripts that don't require booting and breaking dBug first.  I have pasted my init script below (the attachement didnt work in the earlier post).  I'm sure I will find it, but as of now, this script still has SP issues.  I can set the stack pointer to the top of SRAM but the SP keeps being set to 0xfffffffe such that any jsr or rst will throw and exception.<br>
<br>Cheers for any help or comments.<br><br>my .gdb-init script... The goal is to not have to have freescale dBug boot and break first before loading the elf....<br><br><br>target remote | m68k-bdm-gdbserver pipe /dev/bdmcf0<br>
<br>monitor bdm-reset<br><br>#<br># Show the exception stack frame.<br>#<br>define show-exception-sframe<br> set $frsr = *(unsigned short *)((unsigned long)$sp + 2)<br> set $frpc = *(unsigned long *)((unsigned long)$sp + 4)<br>
 set $frfvo = *(unsigned short *)((unsigned long)$sp + 0)<br> set $frcode = $frfvo >> 12<br> set $frvect = ($frfvo & 0xFFF) >> 2<br> set $frstatus = ((($frfvo >> 10) & 3) << 2) | ($frfvo & 3)<br>
 printf "EXCEPTION -- SR:0x%X  PC:0x%X  FRAME:0x%x  VECTOR:%d  STATUS:%d\n", $frsr, $frpc, $frcode, $frvect, $frstatus<br> if $frstatus == 4<br>  printf " Fault Type: Error on instruction fetch"<br> end<br>
 if $frstatus == 8<br>  printf " Fault Type: Error on operand write"<br> end<br> if $frstatus == 12<br>  printf " Fault Type: Error on operand read"<br> end<br> if $frstatus == 9<br>  printf " Fault Type: Attempted write to write-protected space"<br>
 end<br>end<br><br># Set RAMBAR = 0x20000001<br>monitor bdm-ctl-set 0xc05 0x20000001<br><br># Set PAR_SDRAM to allow SDRAM signals to be enabled<br>set *((char*) 0x40100046) = 0x3f<br><br># Set PAR_AD to allow 32-bit SDRAM if the external boot device is 16 bits<br>
set *((char*) 0x40100040) = 0xe1<br><br># Turn off WCR<br>set *((short*) 0x40140000) = 0x0000<br><br># 1MB ASRAM on CS1 at 0x30000000  (THE 5235 BCC doesn have this, the EVB doesnt populate)<br>set *((short*) 0x4000008C) = 0x3000<br>
set *((long*) 0x40000090) = 0x000f0001<br>set *((short*) 0x40000096) = 0x3d20<br><br># 2 meg flash on CS0 at 0xffe000<br>set *((short*) 0x40000080) = 0xffe0<br>set *((long*) 0x40000084) = 0x001f0001<br>set *((short*) 0x4000008a) = 0x1980<br>
<br># 16 meg sdram (page 18.6.4 of ref 5235 ref-manual)<br><br>#powerup sequence<br>set *((short) 0x40000040) = 0x0446<br>set *((long) 0x40000048) = 0x00001300<br>set *((long) 0x4000004c) = 0x00fc0001<br><br>#precharge<br>
set *((long) 0x40000048) = 0x00001308<br>set *((long) 0x00000000) = 0xdeadbeef<br><br>#refresh sequence<br>set *((long) 0x40000048) = 0x00009300<br><br>#wait at least 8 auto refresh cycles to occur<br># I don't know how to wait, so im just getting gdb to print something for a pause<br>
print $pc<br><br>#enable IMRS<br>set *((long) 0x40000048) = 0x00009340<br><br>#access sd ram to initialize the mode register<br>set *((long) 0x00000400) = 0x00000000<br><br>#set stack pointer<br>set $sp = 0x2000fffc<br><br>
b _uhoh<br><br><br><br><br>