1 # 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 */
6 # Environment and memory manioulation after program upload
10 SET VARIABLE abortIRQ0 = 0x1
11 SET VARIABLE intVectorMonitorDebugger = 0x10FFC00
16 # Disable all Interrupts
19 # Set Table Base Register
20 SET REGISTER TBR = intVectorMonitorDebugger
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
27 # Copy required vector table entries of monitor debugger in vector table of application
28 MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0
30 # Prepare Entries for INT0
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
40 # Setting indicates software reset, which leads to that the clock settings are not changed.
44 # Set TBR to Vector table of application
45 SET REGISTER TBR = intVectorApllication
48 # Run to smd_c and let the CS enabled
49 go noClockStartup,Start91460\smd_cs
50 set register r2 = %r2|0x3