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
10 SET VARIABLE abortIRQ0 = 0x1
\r
11 SET VARIABLE intVectorMonitorDebugger = 0x10FFC00
\r
16 # Disable all Interrupts
\r
17 SET REGISTER I = 0x0
\r
19 # Set Table Base Register
\r
20 SET REGISTER TBR = intVectorMonitorDebugger
\r
22 # Run to smd_tbr and save TBR of Application
\r
23 go ,Start91460\smd_tbr
\r
24 SET VARIABLE intVectorApllication = %r0
\r
25 SET REGISTER TBR = intVectorApllication
\r
27 # Copy required vector table entries of monitor debugger in vector table of application
\r
28 MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0
\r
30 # Prepare Entries for INT0
\r
32 MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3C3, intVectorApllication + 0x3BC
\r
33 SET MEMORY/BYTE 0x32 = 0x3
\r
34 SET MEMORY/BYTE 0x30 = 0x0
\r
35 SET MEMORY/BYTE 0x31 = 0x1
\r
36 SET MEMORY/BYTE 0x440 = 0x10
\r
37 SET REGISTER ILM = 0x1E
\r
40 # Setting indicates software reset, which leads to that the clock settings are not changed.
\r
41 SET REGISTER R4 = 0x8
\r
44 # Set TBR to Vector table of application
\r
45 SET REGISTER TBR = intVectorApllication
\r
48 # Run to smd_c and let the CS enabled
\r
49 go noClockStartup,Start91460\smd_cs
\r
50 set register r2 = %r2|0x3
\r