navienginebsp/tools/testreference/lauterbach/Platforms/ne1_tb/attach.cmm
changeset 0 5de814552237
equal deleted inserted replaced
-1:000000000000 0:5de814552237
       
     1 //
       
     2 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:  
       
    15 //
       
    16 //////////////////////////////////////////////////////////////////////////////
       
    17 //
       
    18 // Attaches to a running NaviEngine and stops the currently running CPU core.
       
    19 //
       
    20 // Change History:
       
    21 //
       
    22 // 11/11/2008 1.0 : Initial version
       
    23 // 08/05/2009 1.1 : Tidied up in readiness for putting into Nokia's distribution system
       
    24 //
       
    25 //////////////////////////////////////////////////////////////////////////////
       
    26 
       
    27 &scriptversion=1.1
       
    28 
       
    29 print "======================================================================="
       
    30 print "&Platform attach script version &scriptversion"
       
    31 
       
    32 ; Detach from the board
       
    33 sys.down
       
    34 
       
    35 ; Reset the jtag unit
       
    36 system.reset
       
    37 system.cpu &CpuType
       
    38 
       
    39 ; ETM is not supported so ensure that it is off
       
    40 etm.off
       
    41 etm.datatrace off
       
    42 
       
    43 if ("&SystemOptionEnreset"!="")
       
    44 	(
       
    45 	system.option enreset &SystemOptionEnreset
       
    46 	)
       
    47 
       
    48 ; VFP uses undefined instructions to operate, so switch off the UNDEF exception to
       
    49 ; prevent us getting millions of false halts
       
    50 if ("&OnChipTriggerUndef"!="")
       
    51 	(
       
    52 	tronchip.set undef &OnChipTriggerUndef
       
    53 	)
       
    54 
       
    55 if ("&JtagClock"!="")
       
    56 	(
       
    57 	system.jtagclock &JtagClock
       
    58 	)
       
    59 
       
    60 ; Attach to the current CPU core and stop it
       
    61 sys.mode.attach
       
    62 
       
    63 if run()
       
    64 	(
       
    65 	print "Stopping the running CPU core..."
       
    66 	break
       
    67 	)
       
    68 
       
    69 enddo