--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/navienginebsp/tools/testreference/lauterbach/Platforms/ne1_tb/attach.cmm Tue Sep 28 18:00:05 2010 +0100
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// Attaches to a running NaviEngine and stops the currently running CPU core.
+//
+// Change History:
+//
+// 11/11/2008 1.0 : Initial version
+// 08/05/2009 1.1 : Tidied up in readiness for putting into Nokia's distribution system
+//
+//////////////////////////////////////////////////////////////////////////////
+
+&scriptversion=1.1
+
+print "======================================================================="
+print "&Platform attach script version &scriptversion"
+
+; Detach from the board
+sys.down
+
+; Reset the jtag unit
+system.reset
+system.cpu &CpuType
+
+; ETM is not supported so ensure that it is off
+etm.off
+etm.datatrace off
+
+if ("&SystemOptionEnreset"!="")
+ (
+ system.option enreset &SystemOptionEnreset
+ )
+
+; VFP uses undefined instructions to operate, so switch off the UNDEF exception to
+; prevent us getting millions of false halts
+if ("&OnChipTriggerUndef"!="")
+ (
+ tronchip.set undef &OnChipTriggerUndef
+ )
+
+if ("&JtagClock"!="")
+ (
+ system.jtagclock &JtagClock
+ )
+
+; Attach to the current CPU core and stop it
+sys.mode.attach
+
+if run()
+ (
+ print "Stopping the running CPU core..."
+ break
+ )
+
+enddo