;bdiGDB configuration file for programming MPC5517DEMO internal flash ; ------------------------------------------------------------------- ; ; ; WTLB : ; ; The parameter defines the effective page number, space, size and WIMG flags (MAS1/MAS2): ; ; +--------------------+----+--+------+ ; | EPN |SIZE|PS|VWIMGE| P = IPROT ; +--------------------+----+--+------+ S = TS ; 20 4 2 6 ; ; The parameter defines the real page number and access rights (MAS3): ; ; +--------------------+--+----+------+ ; | RPN |--|UUUU|XXWWRR| ; +--------------------+--+----+------+ ; 22 4 6 ; ; [INIT] ; WREG MSR 0x00000000 ;clear MSR ; WTLB 0xFFF0058A 0xFFF0003F ;Peripherals: 0xfff00000 -> 0xfff00000, 1MB, --I-G- WTLB 0x4000048A 0x4000003F ;Int.SRAM : 0x40000000 -> 0x40000000, 256KB, --I-G- WTLB 0x0000078A 0x0000003F ;Flash : 0x00000000 -> 0x00000000, 16MB, --I-G- ; FILL 0x40000000 0x14000 ;init ECC-SRAM ; ; Disable watchdog WM16 0xFFF40016 0x0051 ;MCM_SWTCR ; ; Speed-up system clock to fsys = 48MHz WM32 0xFFFE89A0 0x00000000 ;SIU_SYSCLK: select 16 MHz IRC as system clock WM32 0xFFFF0008 0x80030050 ;FMPLL_ESYNCR1: (EPREDIV+1)=4, (EMFD+16)=96 WM32 0xFFFF000C 0x00000005 ;FMPLL_ESYNCR2: (ERFD+1)=6 WM32 0xFFFF0008 0xF0030050 ;FMPLL_ESYNCR1: select PLL mode DELAY 100 WM32 0xFFFE89A0 0x80000000 ;SIU_SYSCLK: select PLL as system clock ; ; Lock/Unlock Flash Blocks for Erase/Programming WM32 0xFFFF8004 0xA1A11111 ;FLASH_LMLR : unlock register WM32 0xFFFF8004 0x001CFF0F ;FLASH_LMLR : lock/unlock blocks WM32 0xFFFF800C 0xC3C33333 ;FLASH_SLMLR: unlock register WM32 0xFFFF800C 0x001CFF0F ;FLASH_SLMLR: lock/unlock blocks WM32 0xFFFF8008 0xB2B22222 ;FLASH_HLR : unlock register WM32 0xFFFF8008 0x0FFFFFF0 ;FLASH_HLR : lock/unlock blocks ; [TARGET] CPUTYPE 5517 ;the used target CPU type ;JTAGCLOCK 1 ;BDI2000: use 8 MHz JTAG clock JTAGCLOCK 3 ;BDI3000: use 8 MHz JTAG clock POWERUP 2000 ;start delay after power-up detected in ms WAKEUP 100 ;give reset time to complete STARTUP HALT BREAKMODE HARD ;SOFT or HARD, HARD uses PPC hardware breakpoint STEPMODE HWBP ;JTAG or HWBP, HWPB uses one or two hardware breakpoints MEMACCESS ONCE ;only ONCE supported on MPC551x (e200z1) [HOST] IP 151.120.25.112 ;Windows host PROMPT PROG5517> [FLASH] WORKSPACE 0x40001000 ;workspace at 0x40001000 CHIPTYPE H7F ;MPC5517 internal flash ;FILE E:/temp/dump512k.bin ;FORMAT BIN 0x00040000 FILE E:/temp/dump16k.bin FORMAT BIN 0x00010000 ERASE 0x000000F0 LOW ;erase 4 blocks in Low Space ERASE 0x00000003 MID ;erase 2 blocks in Mid Space ERASE 0x0000000F HIGH ;erase 4 blocks in High Space [REGS] FILE $reg5517.def