<s> """<STR_LIT>""" <EOL> from target_kinetis import Kinetis <EOL> from . memory_map import ( FlashRegion , RamRegion , MemoryMap ) <EOL> import logging <EOL> from pyOCD . pyDAPAccess import DAPAccess <EOL> SIM_SDID = <NUM_LIT> <EOL> SIM_SDID_KEYATTR_MASK = <NUM_LIT> <EOL> SIM_SDID_KEYATTR_SHIFT = <NUM_LIT:4> <EOL> KEYATTR_DUAL_CORE = <NUM_LIT:1> <EOL> class KL28x ( Kinetis ) : <EOL> singleMap = MemoryMap ( <EOL> FlashRegion ( name = '<STR_LIT>' , start = <NUM_LIT:0> , length = <NUM_LIT> , blocksize = <NUM_LIT> , isBootMemory = True ) , <EOL> RamRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> ) , <EOL> RamRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> ) <EOL> ) <EOL> dualMap = MemoryMap ( <EOL> FlashRegion ( name = '<STR_LIT>' , start = <NUM_LIT:0> , length = <NUM_LIT> , blocksize = <NUM_LIT> , isBootMemory = True ) , <EOL> RamRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> , blocksize = <NUM_LIT> ) , <EOL> RamRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> ) , <EOL> FlashRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> , blocksize = <NUM_LIT> ) , <EOL> RamRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> ) , <EOL> RamRegion ( name = '<STR_LIT>' , start = <NUM_LIT> , length = <NUM_LIT> ) <EOL> ) <EOL> def __init__ ( self , link ) : <EOL> super ( KL28x , self ) . __init__ ( link , self . singleMap ) <EOL> self . mdm_idr = <NUM_LIT> <EOL> self . is_dual_core = False <EOL> def init ( self ) : <EOL> super ( KL28x , self ) . init ( ) <EOL> sdid = self . readMemory ( SIM_SDID ) <EOL> keyattr = ( sdid & SIM_SDID_KEYATTR_MASK ) >> SIM_SDID_KEYATTR_SHIFT <EOL> logging . debug ( "<STR_LIT>" , keyattr , sdid ) <EOL> self . is_dual_core = ( keyattr == KEYATTR_DUAL_CORE ) <EOL> if self . is_dual_core : <EOL> self . memory_map = self . dualMap <EOL> logging . info ( "<STR_LIT>" ) <EOL> def reset ( self , software_reset = None ) : <EOL> try : <EOL> super ( KL28x , self ) . reset ( software_reset ) <EOL> except DAPAccess . TransferError : <EOL> pass </s>
