# bdiGDB configuration for CSB536fs - MC9328MXL echo Setting up for the Cogent CSB536fs Board.\n set endian little # Tell GDB to use 1024 bytes packes when downloading, this # reduces load image download times set remote memory-write-packet-size 1024 set remote memory-write-packet-size fixed # Tell GDB where send it's "gdb monitor" commands: # Tell GDB to send them to the OcdRemote monitoring port 8888 # that is running on your PC target remote localhost:8888 # Tell GDB to send them to the mpDemon/OcdRemote # monitoring port 8888 at ethernet address 192.168.1.222 #target remote 192.168.1.222:8888 # Reset and halt target monitor reset monitor set regbufaddr 0x08200000 #Enable CP0 and CP13 access monitor reg domainaccess = 0x00002001 # Enable Chip select for CS1..CS5 monitor long 0x0022002C = 0x00000001 # change the drive strength to 50Mhz, 30pf monitor long 0x0021B80c = 0x0000015c monitor sleep 1 # Initialize clocks # SYSCLK = FCLK = 96Mhz (default) # BCLK and HCLK = SYSCLK/2 = 48Mhz # enable the 16Mhz oscillator and enable the PLL's monitor long 0x0021B000 =0x27020402 monitor sleep 1 # set the new system pll values for 16Mhz in, 96Mhz out # MFI = 6, MFN = 0, MFD = 0, PD = 1 #monitor long 0x0021B00C = 0x04001800 # switch the sys pll input to the 16Mhz oscillator # restart the system PLL, also set USB clock to divide by 2 #monitor long 0x0021B000 = 0x27420402 #monitor sleep 1 # write the peripheral clock dividers (sys clock = 96Mhz) # PCLK_DIV3 = /1, PCLK_DIV2 = /4 (24Mhz), PCLK_DIV1 = /6 (16Mhz) monitor long 0x0021B020 = 0x00000035 monitor sleep 1 # Speed up Chip select CS0 monitor long 0x00220000 = 0x00000400 # init SDRAM 8Mx16x2 IAM=0 CS2 CL2, HCLK = 48Mhz # Set precharge all command monitor long 0x00221000 = 0x91120300 monitor long 0x00221000 # Issue precharge all command monitor long 0x08200000 = 0 # Set AutoRefresh Command monitor long 0x00221000 = 0xA1120300 monitor long 0x00221000 # Issue AutoRefresh Command monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 monitor long 0x08000000 # Set Mode Register monitor long 0x00221000 = 0xB1120300 monitor long 0x00221000 # Issue Mode Register Command monitor long 0x08119800 = 0 # Set to Normal Mode and enable refresh monitor long 0x00221000 = 0x81128300 monitor long 0x00221000 monitor long 0x08112420 # Load the program executable called "ramtst.elf" load ramtst.elf # Load the symbols for the program. symbol-file ramtst.elf # Set a breakpoint at main(). # b main # Run to the uMON. c