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
11 SET VARIABLE abortIRQ0 = 0x1
12 SET VARIABLE intVectorMonitorDebugger = 0xFFC00
17 # Disable all Interrupts
20 # Set Table Base Register
21 SET REGISTER TBR = intVectorMonitorDebugger
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
29 # Copy required vector table entries of monitor debugger in vector table of application
30 MOVE intVectorMonitorDebugger + 0x3C0..intVectorMonitorDebugger + 0x3FF, intVectorApllication + 0x3C0
33 # Prepare Entries for INT0
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
44 # Setting indicates software reset, which leads to that the clock settings are not changed.
48 # Set TBR to Vector table of application
49 SET REGISTER TBR = intVectorApllication
51 # Run to smd_c and let the CS enabled
52 go noClockStartup,Start91460\smd_cs
53 set register r2 = %r2|0x2