; --------------------------------------------------------------------------------
; @Title: NORTi Demo for TRACE32 OS Awareness
; @Description: 
;   
;   This batchfile loads all necessary files to demonstrate
;   the OS Awareness for NORTi v4.
;   
;   
; @Keywords: awareness, norti, RTOS
; @Author: DIE
; @Chip: PPC405GP
; @Copyright: (C) 1989-2014 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: norti.cmm 13125 2018-09-11 14:03:01Z rdienstbeck $

;   Created by Rudi Dienstbeck / Lauterbach GmbH

 SCREEN.ON                    ; all messages are displayed
 AREA.RESet
 WinPAGE.RESet
 WinCLEAR
 WinPOS 0. 27. 63. 7. 0. 0. W006
 AREA.view

; Debugger reset

 PRINT "resetting..."
 RESet
 
; Initializing Debugger

 PRINT "initializing..."
 
 SYStem.CPU PPC405GP
 SYStem.Up

; load sample application

 PRINT "loading sample application..."

 Data.LOAD.auto smp405.elf
 
 ; patch task creation to use common stack pattern
 Data.Assemble v4_cre_tsk+0x1ac lis r9,0x0101
 Data.Assemble v4_cre_tsk+0x1d0 ori r29,r9,0x0101

; initialize RTOS support
 PRINT "initializing RTOS support..."
 TASK.CONFIG norti          ; load NORTi awareness (norti.t32)
 MENU.ReProgram norti       ; load NORTi specific menu (norti.men)
 HELP.FILTER.Add rtosnorti  ; add NORTi awareness manual to help filter
 
 PRINT "load complete." 

; open some windows

 WinPOS 0. 0. 73. 23. 11. 1. W001
 List.auto
 
 WinPOS 40. 12. 50. 9. 0. 1. W003
 TASK.TASK 

; start application

 Go.direct MainTask
 
 ENDDO
 
