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
6 # Environment and memory manioulation after program upload
\r
11 SET VARIABLE abortIRQ0 = 0x1
\r
12 SET VARIABLE intVectorMonitorDebugger = 0xFFC00
\r
17 # Disable all Interrupts
\r
18 SET REGISTER I = 0x0
\r
20 # Set Table Base Register
\r
21 SET REGISTER TBR = intVectorMonitorDebugger
\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
29 # Copy required vector table entries of monitor debugger in vector table of application
\r
30 MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0
\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
44 # Setting indicates software reset, which leads to that the clock settings are not changed.
\r
45 SET REGISTER R4 = 0x8
\r
48 # Set TBR to Vector table of application
\r
49 SET REGISTER TBR = intVectorApllication
\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