; ========================================== ; bdiGDB configuration for Kinetis Cortex-M4 ; ========================================== ; ; 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, ; ; Accessing the MDM-AP Control Registers ; -------------------------------------- ; You can access the MDM-AP control registers via the following ; Telnet commands: ; "RAP display Access Port (AP) register" ; "WAP modify Access Port (AP) register" ; To read the MDM-AP Status Register use: "rap 0x01000000" ; To write to MDM-AP Control Register use: "wap 0x01000004 " ; Use it to recover a secured device (see Kinetis user's manual). ; ; ; To recover a secured device execute the following sequence: ; ----------------------------------------------------------- ; jtag;rst 1;exit;delay 100 ; wap 0x01000004 1;delay 2000 ; wap 0x01000004 4;delay 100 ; jtag;rst 0;exit;delay 100 ; reset ; [INIT] ; [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 NONE ;don't assert and observe reset STARTUP RUN ;let the core run 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 K40> [FLASH] CHIPTYPE FTFL FILE E:\Cygwin\home\bdidemo\arm11\k40x256.bin FORMAT BIN 0x00000000 ERASE 0x00000000 BLOCK ;erase the 256kB block ; [REGS] FILE $regKinetis.def