OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [MB91460_Softune/] [PRC/] [set_MONITOR.prc] - Blame information for rev 599

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 584 jeremybenn
# THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
2
# MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
3
# ELIGIBILITY FOR ANY PURPOSES.                                             */
4
#                 (C) Fujitsu Microelectronics Europe GmbH                  */
5
 
6
# Environment and memory manioulation after program upload
7
 
8
 
9
# Settings
10
SET VARIABLE abortIRQ0 = 0x1
11
SET VARIABLE intVectorMonitorDebugger = 0x10FFC00
12
 
13
 
14
 
15
 
16
# Disable all Interrupts
17
SET REGISTER I = 0x0
18
 
19
# Set Table Base Register
20
SET REGISTER TBR = intVectorMonitorDebugger
21
 
22
# Run to smd_tbr and save TBR of Application
23
go ,Start91460\smd_tbr
24
SET VARIABLE intVectorApllication  = %r0
25
SET REGISTER TBR = intVectorApllication
26
 
27
# Copy required vector table entries of monitor debugger in vector table of application
28
MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0
29
 
30
# Prepare Entries for INT0
31
IF %abortIRQ0 == 1
32
  MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3C3, intVectorApllication + 0x3BC
33
  SET MEMORY/BYTE 0x32 = 0x3
34
  SET MEMORY/BYTE 0x30 = 0x0
35
  SET MEMORY/BYTE 0x31 = 0x1
36
  SET MEMORY/BYTE 0x440 = 0x10
37
  SET REGISTER ILM = 0x1E
38
ENDIF
39
 
40
# Setting indicates software reset, which leads to that the clock settings are not changed.
41
SET REGISTER R4 = 0x8
42
 
43
 
44
# Set TBR to Vector table of application
45
SET REGISTER TBR = intVectorApllication
46
 
47
 
48
# Run to smd_c and let the CS enabled
49
go noClockStartup,Start91460\smd_cs
50
set register r2 = %r2|0x3
51
 
52
# Run to main()
53
go ,main

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.