navienginebsp/tools/testreference/lauterbach/toggle_symbianawareness.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 ; script to toggle EKA2 Symbian OS awareness on and off safely
       
    18 ; 5/5/05 4.1 : modified script ordering so you can turn of awareness without
       
    19 ;				being attached
       
    20 ; 4/5/05 4.0 : rolled version to 4.0 for release
       
    21 ; 7/4/05 1.0 : initial checkin
       
    22 
       
    23 ; if os awareness is enabled, remove it and end
       
    24 global &_SYMBIAN_OS_AWARENESS_ENABLED
       
    25 if ("&_SYMBIAN_OS_AWARENESS_ENABLED"=="")
       
    26 	(
       
    27 	&_SYMBIAN_OS_AWARENESS_ENABLED=(0==1)
       
    28 	)
       
    29 
       
    30 if (&_SYMBIAN_OS_AWARENESS_ENABLED)
       
    31 	(
       
    32 	print "Removing SymbianOS support..."
       
    33 	TASK.reset
       
    34 	local &_FILE_CHECK
       
    35 	&_FILE_CHECK="symbian2.t32"
       
    36 	if os.file(&_FILE_CHECK)
       
    37 		(
       
    38 		 MENU.delete symbian2
       
    39 		)
       
    40 	else
       
    41 		(
       
    42 		 MENU.delete c:\t32\demo\arm\kernel\symbian\eka2\symbian2
       
    43 		)
       
    44 
       
    45 	&_SYMBIAN_OS_AWARENESS_ENABLED=(0==1)
       
    46 
       
    47 	enddo
       
    48 	)
       
    49 
       
    50 ; check that symbols are enabled
       
    51 if !(y.exist("KernelMain"))
       
    52 	(
       
    53 	 print "ERROR: You must have symbols turned on to enable SymbianOS awareness"
       
    54 	 end
       
    55 	)
       
    56 
       
    57 if run()
       
    58 	break
       
    59 
       
    60 ; Sanity test
       
    61 ; check that the mmu is on
       
    62 if (Data.Long(C15:0x1)&0x1)==0
       
    63 	(
       
    64 	 &local _CP15
       
    65 	 &_CP15=data.long(C15:0x1)
       
    66 	 print "ERROR: MMU is not enabled => to enable symbian awareness you must boot the system (CP15=&_CP15)"
       
    67 	 end
       
    68 	)
       
    69 
       
    70 ; enable os awareness
       
    71 print "Initialising SymbianOS support..."
       
    72 
       
    73 TASK.RESET
       
    74 local &_FILE_CHECK
       
    75 &_FILE_CHECK="symbian2.t32"
       
    76 if os.file(&_FILE_CHECK)
       
    77 	(
       
    78 	 TASK.CONFIG symbian2				; loads Symbian OS awareness (symbian2.t32)
       
    79 	 MENU.ReProgram symbian2			; loads Symbian OS menu (symbian2.men)
       
    80 	)
       
    81 else
       
    82 	(
       
    83 	 TASK.CONFIG c:\t32\demo\arm\kernel\symbian\eka2\symbian2			; loads Symbian OS awareness (symbian2.t32)
       
    84 	 MENU.ReProgram c:\t32\demo\arm\kernel\symbian\eka2\symbian2		; loads Symbian OS menu (symbian2.men)
       
    85 	)
       
    86 
       
    87 HELP.FILTER.Add rtossymbian2	; add Symbian OS awareness manual to help filter
       
    88 &_SYMBIAN_OS_AWARENESS_ENABLED=(0==0)
       
    89