; ==================================== ; bdiGDB configuration for Kinetis K70 ; ==================================== ; ; Info about the JTAG clock frequency: ; ------------------------------------ ; BDI2000: ; 0=Adaptive, ; 1=16MHz, 2=8MHz, 3=4MHz, ; 4= 1MHz, 5=500kHz, 6=200kHz, 7=100kHz, 8=50kHz, ; 9=20kHz, 10=10kHz, 11=5kHz, 12=2kHz, 13=1kHz ; BDI3000: ; 0=Adaptive, ; 1=32MHz, 2=16MHz, 3=11MHz, 4=8MHz, 5=5MHz, 6=4MHz, ; 7=1MHz, 8=500kHz, 9=200kHz, 10=100kHz, 11=50kHz, ; 12=20kHz, 13=10kHz, 14=5kHz, 15=2kHz, 16=1kHz, ; ; [INIT] WGPR 13 0x20007ffc ;set SP to top of internal SRAM ; ; for flash programming disable caches WM32 0x4001F008 0x00080000 ;FMC_PFB23CR: disable cache WM32 0x4001F004 0x00080000 ;FMC_PFB01CR: invaliate and disable cache ; ; Disable Watchdog WGPR 0 0x40052000 ;WDOG register base address WGPR 1 0xC520 ;unlock code A WGPR 2 0xD928 ;unlock code B WGPR 3 0x01D2 ;New value for WDOG_STCTRLH WM16 0x20000000 0x81c1 ;strh r1, [r0, #14] WM16 0x20000002 0x81c2 ;strh r2, [r0, #14] WM16 0x20000004 0x8003 ;strh r3, [r0, #0] WM16 0x20000006 0xbe00 ;bkpt 0x0000 EXEC 0x20000000 ;execute disable code ; [TARGET] CPUTYPE CORTEX-M4 ;CLOCK 3 ;BDI3000: JTAG clock 11MHz CLOCK 2 ;BDI2000: JTAG clock 8MHz POWERUP 3000 ;start delay after power-up detected in ms RESET HARD 100 ;assert reset for 100 ms ;RESET SOFT ;assert reset via Reset Control Register ;RESET NONE ;don't assert and observe reset WAKEUP 100 ;wait after reset released STARTUP HALT ;halt immediatelly at the reset vector ;STARTUP IDLE ;ignore until attached ;STARTUP RUN ;let boot ROM setup the system ENDIAN LITTLE ;memory model (LITTLE | BIG) BREAKMODE SOFT ;SOFT or HARD MEMACCESS AHB 1 ;memory access via AHB (8 TCK's access delay) ; [HOST] PROMPT K70> FILE E:/temp/dump16k.bin FORMAT BIN 0x20000000 [FLASH] CHIPTYPE FTFE WORKSPACE 0x20000000 ;FILE E:/temp/dump16k.bin ;FORMAT BIN 0x00080000 ;ERASE 0x00080000 0x1000 4 ;erase 4 x 4kB sectors ; FILE E:\Cygwin\home\bdidemo\arm11\k70f120m.bin FORMAT BIN 0x00000000 ERASE 0x00000000 BLOCK ;erase the 256kB block ERASE 0x00040000 BLOCK ;erase the 256kB block ; [REGS] FILE $regK70.def