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