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_INTERNAL.prc] - Blame information for rev 584

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
 
11
SET VARIABLE abortIRQ0 = 0x1
12
SET VARIABLE intVectorMonitorDebugger = 0xFFC00
13
 
14
 
15
 
16
 
17
# Disable all Interrupts
18
SET REGISTER I = 0x0
19
 
20
# Set Table Base Register
21
SET REGISTER TBR = intVectorMonitorDebugger
22
 
23
 
24
# Run to smd_tbr and save TBR of Application
25
go ,Start91460\smd_tbr
26
SET VARIABLE intVectorApllication  = %r0
27
SET REGISTER TBR = intVectorApllication
28
 
29
# Copy required vector table entries of monitor debugger in vector table of application
30
MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0
31
 
32
 
33
# Prepare Entries for INT0
34
IF %abortIRQ0 == 0x1
35
  MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3C3, intVectorApllication + 0x3BC
36
  SET MEMORY/BYTE 0x32 = 0x3
37
  SET MEMORY/BYTE 0x30 = 0x0
38
  SET MEMORY/BYTE 0x31 = 0x1
39
  SET MEMORY/BYTE 0x440 = 0x10
40
  SET REGISTER ILM = 0x1E
41
ENDIF
42
 
43
 
44
# Setting indicates software reset, which leads to that the clock settings are not changed.
45
SET REGISTER R4 = 0x8
46
 
47
 
48
# Set TBR to Vector table of application
49
SET REGISTER TBR = intVectorApllication
50
 
51
# Run to smd_c and let the CS enabled
52
go noClockStartup,Start91460\smd_cs
53
set register r2 = %r2|0x2
54
 
55
# Run to main()
56
go ,main

powered by: WebSVN 2.1.0

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