commit 83aba49efdcfddf3b315ff0945645c6a3236f249 Author: chen Date: Tue Dec 13 14:52:43 2022 +0800 add regs_aototest diff --git a/c5416_test/__pycache__/deal.cpython-35.pyc b/c5416_test/__pycache__/deal.cpython-35.pyc new file mode 100644 index 0000000..fc6c1b6 Binary files /dev/null and b/c5416_test/__pycache__/deal.cpython-35.pyc differ diff --git a/c5416_test/__pycache__/deal1.cpython-35.pyc b/c5416_test/__pycache__/deal1.cpython-35.pyc new file mode 100644 index 0000000..73ac5b1 Binary files /dev/null and b/c5416_test/__pycache__/deal1.cpython-35.pyc differ diff --git a/c5416_test/c54.skyeye b/c5416_test/c54.skyeye new file mode 100644 index 0000000..1cc8978 --- /dev/null +++ b/c5416_test/c54.skyeye @@ -0,0 +1,4 @@ +#define-conf skyeye.json +#load-binary c5416_core_0 timer.out +#init-ok +run-pyfile demotst.py \ No newline at end of file diff --git a/c5416_test/data.csv b/c5416_test/data.csv new file mode 100644 index 0000000..df4b7fd --- /dev/null +++ b/c5416_test/data.csv @@ -0,0 +1,16 @@ +test_num,device_name,reg_name,offset,alter_value,expect_value +testcase1_(core_0_uart_0),core_0_uart_0,RBR,0x0,0xFFFFF,0x0 +testcase2_(core_0_uart_0),core_0_uart_0,THR,0x0,0xFFFFF,0x0 +testcase3_(core_0_uart_0),core_0_uart_0,IER,0x2,0xFFFFF,0xffff +testcase4_(core_0_uart_0),core_0_uart_0,FCR,0x4,0xFFFFF,0x1 +testcase5_(core_0_uart_0),core_0_uart_0,IIR,0x4,0xFFFFF,0x1 +testcase6_(core_0_uart_0),core_0_uart_0,LCR,0x6,0xFFFFF,0xffff +testcase7_(core_0_uart_0),core_0_uart_0,MCR,0x8,0xFFFFF,0xffff +testcase8_(core_0_uart_0),core_0_uart_0,LSR,0xa,0xFFFFF,0xffff +testcase9_(core_0_uart_0),core_0_uart_0,SCR,0xe,0xFFFFF,0xffff +testcase10_(core_0_uart_0),core_0_uart_0,DLL,0x10,0xFFFFF,0xffff +testcase11_(core_0_uart_0),core_0_uart_0,DLH,0x12,0xFFFFF,0xffff +testcase12_(core_0_uart_0),core_0_uart_0,PWREMU_MGMT,0x18,0xFFFFF,0xffff +testcase1_(core_0_timer_0),core_0_timer_0,tim,0x0,0xFFFFF,0xffff +testcase2_(core_0_timer_0),core_0_timer_0,prd,0x4,0xFFFFF,0x0 +testcase3_(core_0_timer_0),core_0_timer_0,tcr,0x8,0xFFFFF,0x0 diff --git a/c5416_test/demo.py b/c5416_test/demo.py new file mode 100644 index 0000000..5d29f00 --- /dev/null +++ b/c5416_test/demo.py @@ -0,0 +1,31 @@ +a=[('core_0_uart_0', 0, 'RBR'), ('core_0_uart_0', 18, 'DLH'), ('core_0_uart_0', 16, 'DLL'), ('core_0_uart_0', 10, 'LSR'), ('core_0_uart_0', 4, 'IIR'), ('core_0_uart_0', 6, 'LCR'), ('core_0_uart_0', 0, 'THR'), ('core_0_uart_0', 4, 'FCR'), ('core_0_uart_0', 2, 'IER'), ('core_0_uart_0', 8, 'MCR'), ('core_0_uart_0', 14, 'SCR'), ('core_0_uart_0', 24, 'PWREMU_MGMT'), ('core_0_timer_0', 0, 'tim'), ('core_0_timer_0', 8, 'tcr'), ('core_0_timer_0', 4, 'prd')] + + + +def sort_list(a): + for i in range(len(a)): + for j in range(i+1,len(a)): + if a[i][0] == a[j][0]: + if a[i][1]>a[j][1]: + a[i],a[j] = a[j],a[i] + res=[] + res1=[] + for i in a: + i=list(i) + res.append(i) + + [res1.append(res[i][0]) for i in range(len(res)) if res[i][0] not in res1] + for i in res1: + a=1 + for k in res: + if i in k: + testcasenum="testcase{}_({})".format(str(a),i) + k.insert(0,testcasenum) + a+=1 + return res + +b=sort_list(a) + +print(b) +for i in b: + print(i) \ No newline at end of file diff --git a/c5416_test/demotst.py b/c5416_test/demotst.py new file mode 100644 index 0000000..9cf9aef --- /dev/null +++ b/c5416_test/demotst.py @@ -0,0 +1,40 @@ +import os +from telnetlib import PRAGMA_HEARTBEAT, SE +import sys +from se import * +import se_system as ss +from ctypes import * +from deal import * + +json_name="skyeye.json" +binary_params=("c5416_core_0","timer.out") +run_to_time=("c5416_core_0",10) +reg_data=[] + +def func(): + SE_define_conf(json_name) + SE_load_binary(*binary_params) + SE_init_ok() + SE_run() + dev_list=SE_get_simulation_device_info() + SE_run_to_time(*run_to_time) + read_params_list= deal_params(dev_list,SE_get_registers) + for i in read_params_list: + c=SE_read_dword(i[1],i[2]) + reg_value=list((i[0],i[1],i[3],i[2])) + reg_value.append(c) + reg_value[3]=hex(eval(str(reg_value[3]))) + reg_data.append(reg_value) + output_value_csv(reg_data) + reg_params_list=read_csv() + test_res=[] + try: + for i in reg_params_list: + test_res.append(SE_Test_regs_read_wirte(*i)) + out_put_test_reslut(test_res) + except Exception as ep: + print("please add test data") + SE_Quit() + SE_Quit() + +func() \ No newline at end of file diff --git a/c5416_test/skyeye.json b/c5416_test/skyeye.json new file mode 100644 index 0000000..ce9f20a --- /dev/null +++ b/c5416_test/skyeye.json @@ -0,0 +1,102 @@ +{ + "c5416_0":{ + "base":"mach", + "class":"c5416", + "c5416_core_0": { + "base": "cpu", + "class": "c54x_core", + "memory_space": ["iface", "memory_space_0"] + }, + "memory_space_0":{ + "base": "device", + "class": "memory_space", + "memory_space" :[ + [1, "iface", "core_0_ram0", "0x0", "0x24"], + [2, "iface", "core_0_timer_0", "0x24", "0x3"], + [3, "iface", "core_0_ram1", "0x27", "0x2c00"], + [4, "iface", "core_0_ram2", "0x8000", "0x4000"], + [5, "iface", "core_0_ram3", "0x4000", "0x4000"], + [6, "iface", "core_0_vector", "0xff80", "0x0080"], + [7, "iface", "core_0_uart_0", "0xd000", "0x20"] + ] + }, + "core_0_image0":{ + "base": "device", + "class": "image", + "size": ["uinteger", "0x2800"] + }, + + "core_0_ram0": { + "base": "device", + "class": "ram16", + "memory_space": ["iface", "core_0_image0"] + }, + + "core_0_image1":{ + "base": "device", + "class": "image", + "size": ["uinteger", "0x5800"] + }, + + "core_0_ram1": { + "base": "device", + "class": "ram16", + "memory_space": ["iface", "core_0_image1"] + }, + "core_0_image2":{ + "base": "device", + "class": "image", + "size": ["uinteger", "0x8000"] + }, + + "core_0_ram2": { + "base": "device", + "class": "ram16", + "memory_space": ["iface", "core_0_image2"] + }, + "core_0_image3":{ + "base": "device", + "class": "image", + "size": ["uinteger", "0x8000"] + }, + + "core_0_ram3": { + "base": "device", + "class": "ram16", + "memory_space": ["iface", "core_0_image3"] + }, + "core_0_image4":{ + "base": "device", + "class": "image", + "size": ["uinteger", "0x100"] + }, + + "core_0_vector": { + "base": "device", + "class": "ram16", + "memory_space": ["iface", "core_0_image4"] + }, + "core_0_uart_file" :{ + "base": "device", + "class": "uart_file", + "filename":["string", "uart_log.txt"] + }, + + "core_0_uart_0" :{ + "base": "device", + "class": "c5510_uart", + "uart_file_intf":["iface", "core_0_uart_file"], + "skyeye_uart_intf":["iface", "core_0_uart_term0"] + }, + "core_0_timer_0" :{ + "base": "device", + "class": "c541x_timer", + "int_number": ["uinteger", "0x3"], + "core_signal_intf":["iface", "c5416_core_0"] + }, + "core_0_uart_term0":{ + "base":"device", + "class": "uart_term" + } + } +} diff --git a/c5416_test/testcase_result.csv b/c5416_test/testcase_result.csv new file mode 100644 index 0000000..29b1593 --- /dev/null +++ b/c5416_test/testcase_result.csv @@ -0,0 +1,16 @@ +tst_num,device_name,reg_name,offset,init_value,alter_value,expect_value,actual_value,test_result +testcase1_(core_0_uart_0),core_0_uart_0,RBR,0x0,0x0,0xfffff,0x0,0x0,true +testcase2_(core_0_uart_0),core_0_uart_0,THR,0x0,0x0,0xfffff,0x0,0x0,true +testcase3_(core_0_uart_0),core_0_uart_0,IER,0x2,0x0,0xfffff,0xffff,0xffff,true +testcase4_(core_0_uart_0),core_0_uart_0,FCR,0x4,0x1,0xfffff,0x1,0x1,true +testcase5_(core_0_uart_0),core_0_uart_0,IIR,0x4,0x1,0xfffff,0x1,0x1,true +testcase6_(core_0_uart_0),core_0_uart_0,LCR,0x6,0x0,0xfffff,0xffff,0xffff,true +testcase7_(core_0_uart_0),core_0_uart_0,MCR,0x8,0x0,0xfffff,0xffff,0xffff,true +testcase8_(core_0_uart_0),core_0_uart_0,LSR,0xa,0x20,0xfffff,0xffff,0xffff,true +testcase9_(core_0_uart_0),core_0_uart_0,SCR,0xe,0x0,0xfffff,0xffff,0xffff,true +testcase10_(core_0_uart_0),core_0_uart_0,DLL,0x10,0x0,0xfffff,0xffff,0xffff,true +testcase11_(core_0_uart_0),core_0_uart_0,DLH,0x12,0x0,0xfffff,0xffff,0xffff,true +testcase12_(core_0_uart_0),core_0_uart_0,PWREMU_MGMT,0x18,0x0,0xfffff,0xffff,0xffff,true +testcase1_(core_0_timer_0),core_0_timer_0,tim,0x0,0x345,0xfffff,0xffff,0xffff,true +testcase2_(core_0_timer_0),core_0_timer_0,prd,0x4,0x0,0xfffff,0x0,0x0,true +testcase3_(core_0_timer_0),core_0_timer_0,tcr,0x8,0x0,0xfffff,0x0,0x0,true diff --git a/c5416_test/timer.out b/c5416_test/timer.out new file mode 100644 index 0000000..15bba69 Binary files /dev/null and b/c5416_test/timer.out differ diff --git a/c5416_test/timer1/.timer.c.swp b/c5416_test/timer1/.timer.c.swp new file mode 100644 index 0000000..a97796b Binary files /dev/null and b/c5416_test/timer1/.timer.c.swp differ diff --git a/c5416_test/timer1/Debug.lkf b/c5416_test/timer1/Debug.lkf new file mode 100644 index 0000000..bd7f9b9 --- /dev/null +++ b/c5416_test/timer1/Debug.lkf @@ -0,0 +1,4 @@ +-z -q -c -m"./Debug/timer.out" -o"./Debug/timer.out" -x -i"D:/CCStudio_v3.3/C5400/xdais/lib" -i"D:/CCStudio_v3.3/C5400/csl/lib" -i"D:/CCStudio_v3.3/bios_5_31_02/packages/ti/bios/lib" -i"D:/CCStudio_v3.3/bios_5_31_02/packages/ti/rtdx/lib/c5400" -i"D:/CCStudio_v3.3/C5400/cgtools/lib" -l"csl5416x.lib" -l"rts500EXT.lib" +"D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\Debug\timer.obj" +"D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\Debug\uart.obj" +"D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\timer.cmd" diff --git a/c5416_test/timer1/Debug/timer.lst b/c5416_test/timer1/Debug/timer.lst new file mode 100644 index 0000000..01f68a5 --- /dev/null +++ b/c5416_test/timer1/Debug/timer.lst @@ -0,0 +1,1115 @@ +TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 1 + + 1 ;*************************************************************** + 2 ;* TMS320C54x C/C++ Codegen PC v4.1.0 * + 3 ;* Date/Time created: Mon May 02 17:19:42 2016 * + 4 ;*************************************************************** + 5 .compiler_opts --mem_model:code=far --mem_model:data=flat --quiet --silicon_version=548 + 6 .mmregs + 7 0017 FP .set AR7 + 8 .c_mode + 9 + 10 DW$CU .dwtag DW_TAG_compile_unit + 11 .dwattr DW$CU, DW_AT_name("timer.c") + 12 .dwattr DW$CU, DW_AT_producer("TMS320C54x C/C++ Codegen PC v4.1.0 Copyright (c) 1996-2005 Texas Instr + 13 .dwattr DW$CU, DW_AT_stmt_list(0x00) + 14 .dwattr DW$CU, DW_AT_TI_VERSION(0x01) + 15 ;************************************************************** + 16 ;* CINIT RECORDS * + 17 ;************************************************************** + 18 000000 .sect ".cinit" + 19 .align 1 + 20 000000 0002 .field IR_1,16 + 21 000001 0000- .field _myTConfig+0,16 + 22 000002 0C20 .field 3104,16 ; _myTConfig._tcr @ 0 + 23 000003 0800 .field 2048,16 ; _myTConfig._prd @ 16 + 24 0002 IR_1: .set 2 + 25 + 26 000004 .sect ".cinit" + 27 .align 1 + 28 000004 0001 .field 1,16 + 29 000005 0003- .field _timer_int_cnt+0,16 + 30 000006 0000 .field 0,16 ; _timer_int_cnt @ 0 + 31 + 32 + 33 DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("printf"), DW_AT_symbol_name("_printf") + 34 .dwattr DW$1, DW_AT_type(*DW$T$10) + 35 .dwattr DW$1, DW_AT_declaration(0x01) + 36 .dwattr DW$1, DW_AT_external(0x01) + 37 DW$2 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$41) + 38 DW$3 .dwtag DW_TAG_unspecified_parameters + 39 .dwendtag DW$1 + 40 + 41 + 42 DW$4 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_clear"), DW_AT_symbol_name("_IRQ_clear") + 43 .dwattr DW$4, DW_AT_declaration(0x01) + 44 .dwattr DW$4, DW_AT_external(0x01) + 45 DW$5 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 46 .dwendtag DW$4 + 47 + 48 + 49 DW$6 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_enable"), DW_AT_symbol_name("_IRQ_enable") + 50 .dwattr DW$6, DW_AT_type(*DW$T$10) + 51 .dwattr DW$6, DW_AT_declaration(0x01) + 52 .dwattr DW$6, DW_AT_external(0x01) + 53 DW$7 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 54 .dwendtag DW$6 + 55 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 2 + + 56 + 57 DW$8 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_globalDisable"), DW_AT_symbol_name("_IRQ_globalDisable") + 58 .dwattr DW$8, DW_AT_type(*DW$T$10) + 59 .dwattr DW$8, DW_AT_declaration(0x01) + 60 .dwattr DW$8, DW_AT_external(0x01) + 61 + 62 DW$9 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_globalEnable"), DW_AT_symbol_name("_IRQ_globalEnable") + 63 .dwattr DW$9, DW_AT_type(*DW$T$10) + 64 .dwattr DW$9, DW_AT_declaration(0x01) + 65 .dwattr DW$9, DW_AT_external(0x01) + 66 + 67 DW$10 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_globalRestore"), DW_AT_symbol_name("_IRQ_globalRestore") + 68 .dwattr DW$10, DW_AT_declaration(0x01) + 69 .dwattr DW$10, DW_AT_external(0x01) + 70 DW$11 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + 71 .dwendtag DW$10 + 72 + 73 + 74 DW$12 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_plug"), DW_AT_symbol_name("_IRQ_plug") + 75 .dwattr DW$12, DW_AT_declaration(0x01) + 76 .dwattr DW$12, DW_AT_external(0x01) + 77 DW$13 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 78 DW$14 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$28) + 79 .dwendtag DW$12 + 80 + 81 + 82 DW$15 .dwtag DW_TAG_subprogram, DW_AT_name("CSL_init"), DW_AT_symbol_name("_CSL_init") + 83 .dwattr DW$15, DW_AT_declaration(0x01) + 84 .dwattr DW$15, DW_AT_external(0x01) + 85 + 86 DW$16 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_open"), DW_AT_symbol_name("_TIMER_open") + 87 .dwattr DW$16, DW_AT_type(*DW$T$32) + 88 .dwattr DW$16, DW_AT_declaration(0x01) + 89 .dwattr DW$16, DW_AT_external(0x01) + 90 DW$17 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + 91 DW$18 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 92 .dwendtag DW$16 + 93 + 94 + 95 DW$19 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_close"), DW_AT_symbol_name("_TIMER_close") + 96 .dwattr DW$19, DW_AT_declaration(0x01) + 97 .dwattr DW$19, DW_AT_external(0x01) + 98 DW$20 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 99 .dwendtag DW$19 + 100 + 101 + 102 DW$21 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_getEventId"), DW_AT_symbol_name("_TIMER_getEventId") + 103 .dwattr DW$21, DW_AT_type(*DW$T$19) + 104 .dwattr DW$21, DW_AT_declaration(0x01) + 105 .dwattr DW$21, DW_AT_external(0x01) + 106 DW$22 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 107 .dwendtag DW$21 + 108 + 109 + 110 DW$23 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_start"), DW_AT_symbol_name("_TIMER_start") + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 3 + + 111 .dwattr DW$23, DW_AT_declaration(0x01) + 112 .dwattr DW$23, DW_AT_external(0x01) + 113 DW$24 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 114 .dwendtag DW$23 + 115 + 116 + 117 DW$25 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_stop"), DW_AT_symbol_name("_TIMER_stop") + 118 .dwattr DW$25, DW_AT_declaration(0x01) + 119 .dwattr DW$25, DW_AT_external(0x01) + 120 DW$26 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 121 .dwendtag DW$25 + 122 + 123 + 124 DW$27 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_config"), DW_AT_symbol_name("_TIMER_config") + 125 .dwattr DW$27, DW_AT_declaration(0x01) + 126 .dwattr DW$27, DW_AT_external(0x01) + 127 DW$28 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 128 DW$29 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$36) + 129 .dwendtag DW$27 + 130 + 131 + 132 DW$30 .dwtag DW_TAG_subprogram, DW_AT_name("uart_puts"), DW_AT_symbol_name("_uart_puts") + 133 .dwattr DW$30, DW_AT_declaration(0x01) + 134 .dwattr DW$30, DW_AT_external(0x01) + 135 DW$31 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$41) + 136 .dwendtag DW$30 + 137 + 138 .global _myTConfig + 139 000000 .bss _myTConfig,2,0,0 + 140 DW$32 .dwtag DW_TAG_variable, DW_AT_name("myTConfig"), DW_AT_symbol_name("_myTConfig") + 141 .dwattr DW$32, DW_AT_location[DW_OP_addr _myTConfig] + 142 .dwattr DW$32, DW_AT_type(*DW$T$35) + 143 .dwattr DW$32, DW_AT_external(0x01) + 144 .global _mhTimer + 145 000002 .bss _mhTimer,1,0,0 + 146 DW$33 .dwtag DW_TAG_variable, DW_AT_name("mhTimer"), DW_AT_symbol_name("_mhTimer") + 147 .dwattr DW$33, DW_AT_location[DW_OP_addr _mhTimer] + 148 .dwattr DW$33, DW_AT_type(*DW$T$32) + 149 .dwattr DW$33, DW_AT_external(0x01) + 150 .global _timer_int_cnt + 151 000003 .bss _timer_int_cnt,1,0,0 + 152 DW$34 .dwtag DW_TAG_variable, DW_AT_name("timer_int_cnt"), DW_AT_symbol_name("_timer_int_cnt") + 153 .dwattr DW$34, DW_AT_location[DW_OP_addr _timer_int_cnt] + 154 .dwattr DW$34, DW_AT_type(*DW$T$47) + 155 .dwattr DW$34, DW_AT_external(0x01) + 156 ; D:\CCStudio_v3.3\C5400\cgtools\bin\acp500.exe --keep_unneeded_types -q -D_DEBUG -DCHIP_5416 -ID:/CCSt + 157 000000 .sect ".text" + 158 .global _main + 159 + 160 DW$35 .dwtag DW_TAG_subprogram, DW_AT_name("main"), DW_AT_symbol_name("_main") + 161 .dwattr DW$35, DW_AT_low_pc(_main) + 162 .dwattr DW$35, DW_AT_high_pc(0x00) + 163 .dwattr DW$35, DW_AT_begin_file("timer.c") + 164 .dwattr DW$35, DW_AT_begin_line(0x31) + 165 .dwattr DW$35, DW_AT_begin_column(0x06) + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 4 + + 166 .dwpsn "timer.c",49,13 + 167 + 168 .dwfde DW$CIE + 169 + 170 ;*************************************************************** + 171 ;* FUNCTION DEF: _main * + 172 ;*************************************************************** + 173 000000 _main: + 174 .dwcfa 0x0e, 2 + 175 .dwcfa 0x80, 34, 2 + 176 .dwpsn "timer.c",51,3 + 177 FCALLD #_uart_puts ; |51| + "timer.asm", ERROR! at line 177: [E0000] parse error + 178 LD #SL1,A + "timer.asm", ERROR! at line 178: [E0000] parse error + 179 ; call occurs [#_uart_puts] ; |51| + 180 .dwpsn "timer.c",53,3 + 181 FCALL #_CSL_init ; |53| + "timer.asm", ERROR! at line 181: [E0000] parse error + 182 ; call occurs [#_CSL_init] ; |53| + 183 .dwpsn "timer.c",55,3 + 184 FCALL #_taskFunc ; |55| + "timer.asm", ERROR! at line 184: [E0000] parse error + 185 ; call occurs [#_taskFunc] ; |55| + 186 .dwpsn "timer.c",56,1 + 187 000000 F495 NOP + 188 000001 F495 NOP + 189 FRET + "timer.asm", ERROR! at line 189: [E0000] parse error + 190 ; return occurs + 191 .dwattr DW$35, DW_AT_end_file("timer.c") + 192 .dwattr DW$35, DW_AT_end_line(0x38) + 193 .dwattr DW$35, DW_AT_end_column(0x01) + 194 .dwendentry + 195 .dwendtag DW$35 + 196 + 197 000002 .sect ".text" + 198 .global _taskFunc + 199 + 200 DW$36 .dwtag DW_TAG_subprogram, DW_AT_name("taskFunc"), DW_AT_symbol_name("_taskFunc") + 201 .dwattr DW$36, DW_AT_low_pc(_taskFunc) + 202 .dwattr DW$36, DW_AT_high_pc(0x00) + 203 .dwattr DW$36, DW_AT_begin_file("timer.c") + 204 .dwattr DW$36, DW_AT_begin_line(0x3b) + 205 .dwattr DW$36, DW_AT_begin_column(0x06) + 206 .dwpsn "timer.c",59,21 + 207 + 208 .dwfde DW$CIE + 209 + 210 ;*************************************************************** + 211 ;* FUNCTION DEF: _taskFunc * + 212 ;*************************************************************** + 213 000002 _taskFunc: + 214 .dwcfa 0x0e, 2 + 215 .dwcfa 0x80, 34, 2 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 5 + + 216 PSHM AR1 + "timer.asm", ERROR! at line 216: [E0000] parse error + 217 .dwcfa 0x0e, 3 + 218 .dwcfa 0x80, 10, 3 + 219 FRAME #-5 + "timer.asm", ERROR! at line 219: [E0000] parse error + 220 000002 F495 NOP + 221 .dwcfa 0x0e, 8 + 222 DW$37 .dwtag DW_TAG_variable, DW_AT_name("eventId"), DW_AT_symbol_name("_eventId") + 223 .dwattr DW$37, DW_AT_type(*DW$T$19) + 224 .dwattr DW$37, DW_AT_location[DW_OP_breg17 2] + 225 DW$38 .dwtag DW_TAG_variable, DW_AT_name("old_intm"), DW_AT_symbol_name("_old_intm") + 226 .dwattr DW$38, DW_AT_type(*DW$T$10) + 227 .dwattr DW$38, DW_AT_location[DW_OP_breg17 3] + 228 DW$39 .dwtag DW_TAG_variable, DW_AT_name("err"), DW_AT_symbol_name("_err") + 229 .dwattr DW$39, DW_AT_type(*DW$T$19) + 230 .dwattr DW$39, DW_AT_location[DW_OP_breg17 4] + 231 .dwpsn "timer.c",63,10 + 232 ST #0,*SP(4) ; |63| + "timer.asm", ERROR! at line 232: [E0000] parse error + 233 .dwpsn "timer.c",65,3 + 234 ST #SL2,*SP(0) ; |65| + "timer.asm", ERROR! at line 234: [E0000] parse error + 235 FCALL #_printf ; |65| + "timer.asm", ERROR! at line 235: [E0000] parse error + 236 ; call occurs [#_printf] ; |65| + 237 .dwpsn "timer.c",69,3 + 238 FCALL #_IRQ_globalDisable ; |69| + "timer.asm", ERROR! at line 238: [E0000] parse error + 239 ; call occurs [#_IRQ_globalDisable] ; |69| + 240 STL A,*SP(3) + "timer.asm", ERROR! at line 240: [E0000] parse error + 241 .dwpsn "timer.c",73,3 + 242 ST #1,*SP(0) ; |73| + "timer.asm", ERROR! at line 242: [E0000] parse error + 243 FCALLD #_TIMER_open ; |73| + "timer.asm", ERROR! at line 243: [E0000] parse error + 244 000003 F495 NOP + 245 LD #0,A + "timer.asm", ERROR! at line 245: [E0000] parse error + 246 ; call occurs [#_TIMER_open] ; |73| + 247 STL A,*(_mhTimer) + "timer.asm", ERROR! at line 247: [E0000] parse error + 248 .dwpsn "timer.c",77,3 + 249 ST #_myTConfig,*SP(0) ; |77| + "timer.asm", ERROR! at line 249: [E0000] parse error + 250 FCALL #_TIMER_config ; |77| + "timer.asm", ERROR! at line 250: [E0000] parse error + 251 ; call occurs [#_TIMER_config] ; |77| + 252 .dwpsn "timer.c",80,3 + 253 LD *(_mhTimer),A + "timer.asm", ERROR! at line 253: [E0000] parse error + 254 FCALL #_TIMER_getEventId ; |80| + "timer.asm", ERROR! at line 254: [E0000] parse error + 255 ; call occurs [#_TIMER_getEventId] ; |80| + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 6 + + 256 STL A,*SP(2) + "timer.asm", ERROR! at line 256: [E0000] parse error + 257 .dwpsn "timer.c",83,3 + 258 FCALL #_IRQ_clear ; |83| + "timer.asm", ERROR! at line 258: [E0000] parse error + 259 ; call occurs [#_IRQ_clear] ; |83| + 260 .dwpsn "timer.c",86,3 + 261 LDX #_timerIsr,16,A ; |86| + "timer.asm", ERROR! at line 261: [E0000] parse error + 262 OR #_timerIsr,A,A ; |86| + "timer.asm", ERROR! at line 262: [E0000] parse error + 263 DST A,*SP(0) ; |86| + "timer.asm", ERROR! at line 263: [E0000] parse error + 264 LD *SP(2),A + "timer.asm", ERROR! at line 264: [E0000] parse error + 265 FCALL #_IRQ_plug ; |86| + "timer.asm", ERROR! at line 265: [E0000] parse error + 266 ; call occurs [#_IRQ_plug] ; |86| + 267 .dwpsn "timer.c",89,3 + 268 LD *SP(2),A + "timer.asm", ERROR! at line 268: [E0000] parse error + 269 FCALL #_IRQ_enable ; |89| + "timer.asm", ERROR! at line 269: [E0000] parse error + 270 ; call occurs [#_IRQ_enable] ; |89| + 271 .dwpsn "timer.c",92,3 + 272 FCALL #_IRQ_globalEnable ; |92| + "timer.asm", ERROR! at line 272: [E0000] parse error + 273 ; call occurs [#_IRQ_globalEnable] ; |92| + 274 .dwpsn "timer.c",95,3 + 275 LD *(_mhTimer),A + "timer.asm", ERROR! at line 275: [E0000] parse error + 276 FCALL #_TIMER_start ; |95| + "timer.asm", ERROR! at line 276: [E0000] parse error + 277 ; call occurs [#_TIMER_start] ; |95| + 278 .dwpsn "timer.c",98,9 + 279 MVDM *(_timer_int_cnt),AR1 + "timer.asm", ERROR! at line 279: [E0000] parse error + 280 STM #20,AR0 + "timer.asm", ERROR! at line 280: [E0000] parse error + 281 CMPR 1,AR1 ; |98| + "timer.asm", ERROR! at line 281: [E0000] parse error + 282 BC L2,NTC ; |98| + "timer.asm", ERROR! at line 282: [E0000] parse error + 283 ; branchcc occurs ; |98| + 284 000004 L1: + 285 000004 DW$L$_taskFunc$2$B: + 286 MVDM *(_timer_int_cnt),AR1 + "timer.asm", ERROR! at line 286: [E0000] parse error + 287 000004 F495 NOP + 288 CMPR 1,AR1 ; |98| + "timer.asm", ERROR! at line 288: [E0000] parse error + 289 BC L1,TC ; |98| + "timer.asm", ERROR! at line 289: [E0000] parse error + 290 ; branchcc occurs ; |98| + 291 000005 DW$L$_taskFunc$2$E: + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 7 + + 292 000005 L2: + 293 .dwpsn "timer.c",101,3 + 294 LD *(_mhTimer),A + "timer.asm", ERROR! at line 294: [E0000] parse error + 295 FCALL #_TIMER_close ; |101| + "timer.asm", ERROR! at line 295: [E0000] parse error + 296 ; call occurs [#_TIMER_close] ; |101| + 297 .dwpsn "timer.c",104,3 + 298 LD *SP(3),A + "timer.asm", ERROR! at line 298: [E0000] parse error + 299 FCALL #_IRQ_globalRestore ; |104| + "timer.asm", ERROR! at line 299: [E0000] parse error + 300 ; call occurs [#_IRQ_globalRestore] ; |104| + 301 .dwpsn "timer.c",106,4 + 302 MVDM *(_timer_int_cnt),AR1 + "timer.asm", ERROR! at line 302: [E0000] parse error + 303 STM #20,AR0 + "timer.asm", ERROR! at line 303: [E0000] parse error + 304 CMPR 1,AR1 ; |106| + "timer.asm", ERROR! at line 304: [E0000] parse error + 305 BC L3,NTC ; |106| + "timer.asm", ERROR! at line 305: [E0000] parse error + 306 ; branchcc occurs ; |106| + 307 .dwpsn "timer.c",107,7 + 308 ADDM #1,*SP(4) ; |107| + "timer.asm", ERROR! at line 308: [E0000] parse error + 309 000005 L3: + 310 .dwpsn "timer.c",109,4 + 311 ST #SL5,*SP(0) ; |109| + "timer.asm", ERROR! at line 311: [E0000] parse error + 312 LD *SP(4),A ; |109| + "timer.asm", ERROR! at line 312: [E0000] parse error + 313 BC L4,AEQ ; |109| + "timer.asm", ERROR! at line 313: [E0000] parse error + 314 ; branchcc occurs ; |109| + 315 BD L5 ; |109| + "timer.asm", ERROR! at line 315: [E0000] parse error + 316 LD #SL3,A + "timer.asm", ERROR! at line 316: [E0000] parse error + 317 ; branch occurs ; |109| + 318 000005 L4: + 319 LD #SL4,A + "timer.asm", ERROR! at line 319: [E0000] parse error + 320 000005 L5: + 321 STL A,*SP(1) + "timer.asm", ERROR! at line 321: [E0000] parse error + 322 FCALL #_printf ; |109| + "timer.asm", ERROR! at line 322: [E0000] parse error + 323 ; call occurs [#_printf] ; |109| + 324 .dwpsn "timer.c",110,4 + 325 ST #SL6,*SP(0) ; |110| + "timer.asm", ERROR! at line 325: [E0000] parse error + 326 FCALL #_printf ; |110| + "timer.asm", ERROR! at line 326: [E0000] parse error + 327 ; call occurs [#_printf] ; |110| + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 8 + + 328 .dwpsn "timer.c",111,1 + 329 FRAME #5 + "timer.asm", ERROR! at line 329: [E0000] parse error + 330 .dwcfa 0x0e, 3 + 331 POPM AR1 + "timer.asm", ERROR! at line 331: [E0000] parse error + 332 .dwcfa 0xc0, 10 + 333 .dwcfa 0x0e, 2 + 334 000005 F495 NOP + 335 000006 F495 NOP + 336 FRET + "timer.asm", ERROR! at line 336: [E0000] parse error + 337 ; return occurs + 338 + 339 DW$40 .dwtag DW_TAG_loop + 340 .dwattr DW$40, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\timer.asm:L1:1:14621807 + 341 .dwattr DW$40, DW_AT_begin_file("timer.c") + 342 .dwattr DW$40, DW_AT_begin_line(0x62) + 343 .dwattr DW$40, DW_AT_end_line(0x62) + 344 DW$41 .dwtag DW_TAG_loop_range + 345 .dwattr DW$41, DW_AT_low_pc(DW$L$_taskFunc$2$B) + 346 .dwattr DW$41, DW_AT_high_pc(DW$L$_taskFunc$2$E) + 347 .dwendtag DW$40 + 348 + 349 .dwattr DW$36, DW_AT_end_file("timer.c") + 350 .dwattr DW$36, DW_AT_end_line(0x6f) + 351 .dwattr DW$36, DW_AT_end_column(0x01) + 352 .dwendentry + 353 .dwendtag DW$36 + 354 + 355 000007 .sect ".text" + 356 .global _timerIsr + 357 + 358 DW$42 .dwtag DW_TAG_subprogram, DW_AT_name("timerIsr"), DW_AT_symbol_name("_timerIsr") + 359 .dwattr DW$42, DW_AT_low_pc(_timerIsr) + 360 .dwattr DW$42, DW_AT_high_pc(0x00) + 361 .dwattr DW$42, DW_AT_begin_file("timer.c") + 362 .dwattr DW$42, DW_AT_begin_line(0x74) + 363 .dwattr DW$42, DW_AT_begin_column(0x10) + 364 .dwpsn "timer.c",116,31 + 365 + 366 .dwfde DW$CIE + 367 + 368 ;*************************************************************** + 369 ;* FUNCTION DEF: _timerIsr * + 370 ;*************************************************************** + 371 000007 _timerIsr: + 372 000007 F495 NOP + 373 .dwcfa 0x0e, 2 + 374 .dwcfa 0x80, 34, 2 + 375 PSHM AL + "timer.asm", ERROR! at line 375: [E0000] parse error + 376 .dwcfa 0x0e, 3 + 377 .dwcfa 0x80, 0, 3 + 378 PSHM AH + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 9 + + "timer.asm", ERROR! at line 378: [E0000] parse error + 379 .dwcfa 0x0e, 4 + 380 .dwcfa 0x80, 1, 4 + 381 PSHM AG + "timer.asm", ERROR! at line 381: [E0000] parse error + 382 .dwcfa 0x0e, 5 + 383 .dwcfa 0x80, 2, 5 + 384 PSHM BL + "timer.asm", ERROR! at line 384: [E0000] parse error + 385 .dwcfa 0x0e, 6 + 386 .dwcfa 0x80, 6, 6 + 387 PSHM BH + "timer.asm", ERROR! at line 387: [E0000] parse error + 388 .dwcfa 0x0e, 7 + 389 .dwcfa 0x80, 7, 7 + 390 PSHM BG + "timer.asm", ERROR! at line 390: [E0000] parse error + 391 .dwcfa 0x0e, 8 + 392 .dwcfa 0x80, 8, 8 + 393 PSHM AR0 + "timer.asm", ERROR! at line 393: [E0000] parse error + 394 .dwcfa 0x0e, 9 + 395 .dwcfa 0x80, 9, 9 + 396 PSHM AR1 + "timer.asm", ERROR! at line 396: [E0000] parse error + 397 .dwcfa 0x0e, 10 + 398 .dwcfa 0x80, 10, 10 + 399 PSHM AR2 + "timer.asm", ERROR! at line 399: [E0000] parse error + 400 .dwcfa 0x0e, 11 + 401 .dwcfa 0x80, 11, 11 + 402 PSHM AR3 + "timer.asm", ERROR! at line 402: [E0000] parse error + 403 .dwcfa 0x0e, 12 + 404 .dwcfa 0x80, 12, 12 + 405 PSHM AR4 + "timer.asm", ERROR! at line 405: [E0000] parse error + 406 .dwcfa 0x0e, 13 + 407 .dwcfa 0x80, 13, 13 + 408 PSHM AR5 + "timer.asm", ERROR! at line 408: [E0000] parse error + 409 .dwcfa 0x0e, 14 + 410 .dwcfa 0x80, 14, 14 + 411 PSHM AR6 + "timer.asm", ERROR! at line 411: [E0000] parse error + 412 .dwcfa 0x0e, 15 + 413 .dwcfa 0x80, 15, 15 + 414 PSHM AR7 + "timer.asm", ERROR! at line 414: [E0000] parse error + 415 .dwcfa 0x0e, 16 + 416 .dwcfa 0x80, 16, 16 + 417 PSHM FP + "timer.asm", ERROR! at line 417: [E0000] parse error + 418 .dwcfa 0x0e, 17 + 419 .dwcfa 0x80, 18, 17 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 10 + + 420 PSHM BK + "timer.asm", ERROR! at line 420: [E0000] parse error + 421 .dwcfa 0x0e, 18 + 422 .dwcfa 0x80, 19, 18 + 423 PSHM T + "timer.asm", ERROR! at line 423: [E0000] parse error + 424 .dwcfa 0x0e, 19 + 425 .dwcfa 0x80, 20, 19 + 426 PSHM ST0 + "timer.asm", ERROR! at line 426: [E0000] parse error + 427 .dwcfa 0x0e, 20 + 428 .dwcfa 0x80, 23, 20 + 429 PSHM ST1 + "timer.asm", ERROR! at line 429: [E0000] parse error + 430 000008 F495 NOP + 431 .dwcfa 0x0e, 21 + 432 .dwcfa 0x80, 24, 21 + 433 PSHM BRC + "timer.asm", ERROR! at line 433: [E0000] parse error + 434 .dwcfa 0x0e, 22 + 435 .dwcfa 0x80, 25, 22 + 436 PSHM PMST + "timer.asm", ERROR! at line 436: [E0000] parse error + 437 000009 F495 NOP + 438 .dwcfa 0x0e, 23 + 439 .dwcfa 0x80, 29, 23 + 440 PSHM RSA + "timer.asm", ERROR! at line 440: [E0000] parse error + 441 .dwcfa 0x0e, 24 + 442 .dwcfa 0x80, 30, 24 + 443 PSHM REA + "timer.asm", ERROR! at line 443: [E0000] parse error + 444 .dwcfa 0x0e, 25 + 445 .dwcfa 0x80, 31, 25 + 446 ANDM #32063,*(ST1) + "timer.asm", ERROR! at line 446: [E0000] parse error + 447 ORM #16384,*(ST1) + "timer.asm", ERROR! at line 447: [E0000] parse error + 448 ANDM #-4,*(PMST) + "timer.asm", ERROR! at line 448: [E0000] parse error + 449 LDM SP,A + "timer.asm", ERROR! at line 449: [E0000] parse error + 450 ANDM #-2,*(SP) + "timer.asm", ERROR! at line 450: [E0000] parse error + 451 00000a F495 NOP + 452 00000b F495 NOP + 453 PSHM AL + "timer.asm", ERROR! at line 453: [E0000] parse error + 454 FRAME #-1 + "timer.asm", ERROR! at line 454: [E0000] parse error + 455 .dwcfa 0x0e, 25 + 456 .dwpsn "timer.c",117,4 + 457 LD *(_mhTimer),A + "timer.asm", ERROR! at line 457: [E0000] parse error + 458 FCALL #_TIMER_stop ; |117| + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 11 + + "timer.asm", ERROR! at line 458: [E0000] parse error + 459 ; call occurs [#_TIMER_stop] ; |117| + 460 .dwpsn "timer.c",118,4 + 461 ADDM #1,*(_timer_int_cnt) ; |118| + "timer.asm", ERROR! at line 461: [E0000] parse error + 462 .dwpsn "timer.c",119,4 + 463 MVDM *(_timer_int_cnt),AR1 + "timer.asm", ERROR! at line 463: [E0000] parse error + 464 STM #20,AR0 + "timer.asm", ERROR! at line 464: [E0000] parse error + 465 CMPR 1,AR1 ; |119| + "timer.asm", ERROR! at line 465: [E0000] parse error + 466 BC L6,NTC ; |119| + "timer.asm", ERROR! at line 466: [E0000] parse error + 467 ; branchcc occurs ; |119| + 468 .dwpsn "timer.c",120,6 + 469 LD *(_mhTimer),A + "timer.asm", ERROR! at line 469: [E0000] parse error + 470 FCALL #_TIMER_start ; |120| + "timer.asm", ERROR! at line 470: [E0000] parse error + 471 ; call occurs [#_TIMER_start] ; |120| + 472 .dwpsn "timer.c",121,4 + 473 00000c L6: + 474 .dwpsn "timer.c",123,1 + 475 FRAME #1 + "timer.asm", ERROR! at line 475: [E0000] parse error + 476 .dwcfa 0x0e, 25 + 477 POPM SP + "timer.asm", ERROR! at line 477: [E0000] parse error + 478 00000c F495 NOP + 479 POPM REA + "timer.asm", ERROR! at line 479: [E0000] parse error + 480 .dwcfa 0xc0, 31 + 481 .dwcfa 0x0e, 24 + 482 POPM RSA + "timer.asm", ERROR! at line 482: [E0000] parse error + 483 .dwcfa 0xc0, 30 + 484 .dwcfa 0x0e, 23 + 485 POPM PMST + "timer.asm", ERROR! at line 485: [E0000] parse error + 486 00000d F495 NOP + 487 .dwcfa 0xc0, 29 + 488 .dwcfa 0x0e, 22 + 489 POPM BRC + "timer.asm", ERROR! at line 489: [E0000] parse error + 490 .dwcfa 0xc0, 25 + 491 .dwcfa 0x0e, 21 + 492 POPM ST1 + "timer.asm", ERROR! at line 492: [E0000] parse error + 493 00000e F495 NOP + 494 .dwcfa 0xc0, 24 + 495 .dwcfa 0x0e, 20 + 496 POPM ST0 + "timer.asm", ERROR! at line 496: [E0000] parse error + 497 .dwcfa 0xc0, 23 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 12 + + 498 .dwcfa 0x0e, 19 + 499 POPM T + "timer.asm", ERROR! at line 499: [E0000] parse error + 500 .dwcfa 0xc0, 20 + 501 .dwcfa 0x0e, 18 + 502 POPM BK + "timer.asm", ERROR! at line 502: [E0000] parse error + 503 .dwcfa 0xc0, 19 + 504 .dwcfa 0x0e, 17 + 505 POPM FP + "timer.asm", ERROR! at line 505: [E0000] parse error + 506 .dwcfa 0xc0, 18 + 507 .dwcfa 0x0e, 16 + 508 POPM AR7 + "timer.asm", ERROR! at line 508: [E0000] parse error + 509 .dwcfa 0xc0, 16 + 510 .dwcfa 0x0e, 15 + 511 POPM AR6 + "timer.asm", ERROR! at line 511: [E0000] parse error + 512 .dwcfa 0xc0, 15 + 513 .dwcfa 0x0e, 14 + 514 POPM AR5 + "timer.asm", ERROR! at line 514: [E0000] parse error + 515 .dwcfa 0xc0, 14 + 516 .dwcfa 0x0e, 13 + 517 POPM AR4 + "timer.asm", ERROR! at line 517: [E0000] parse error + 518 .dwcfa 0xc0, 13 + 519 .dwcfa 0x0e, 12 + 520 POPM AR3 + "timer.asm", ERROR! at line 520: [E0000] parse error + 521 .dwcfa 0xc0, 12 + 522 .dwcfa 0x0e, 11 + 523 POPM AR2 + "timer.asm", ERROR! at line 523: [E0000] parse error + 524 .dwcfa 0xc0, 11 + 525 .dwcfa 0x0e, 10 + 526 POPM AR1 + "timer.asm", ERROR! at line 526: [E0000] parse error + 527 .dwcfa 0xc0, 10 + 528 .dwcfa 0x0e, 9 + 529 POPM AR0 + "timer.asm", ERROR! at line 529: [E0000] parse error + 530 .dwcfa 0xc0, 9 + 531 .dwcfa 0x0e, 8 + 532 POPM BG + "timer.asm", ERROR! at line 532: [E0000] parse error + 533 .dwcfa 0xc0, 8 + 534 .dwcfa 0x0e, 7 + 535 POPM BH + "timer.asm", ERROR! at line 535: [E0000] parse error + 536 .dwcfa 0xc0, 7 + 537 .dwcfa 0x0e, 6 + 538 POPM BL + "timer.asm", ERROR! at line 538: [E0000] parse error + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 13 + + 539 .dwcfa 0xc0, 6 + 540 .dwcfa 0x0e, 5 + 541 POPM AG + "timer.asm", ERROR! at line 541: [E0000] parse error + 542 .dwcfa 0xc0, 2 + 543 .dwcfa 0x0e, 4 + 544 POPM AH + "timer.asm", ERROR! at line 544: [E0000] parse error + 545 .dwcfa 0xc0, 1 + 546 .dwcfa 0x0e, 3 + 547 POPM AL + "timer.asm", ERROR! at line 547: [E0000] parse error + 548 .dwcfa 0xc0, 0 + 549 .dwcfa 0x0e, 2 + 550 00000f F495 NOP + 551 000010 F495 NOP + 552 FRETE + "timer.asm", ERROR! at line 552: [E0000] parse error + 553 ; branch occurs + 554 .dwattr DW$42, DW_AT_end_file("timer.c") + 555 .dwattr DW$42, DW_AT_end_line(0x7b) + 556 .dwattr DW$42, DW_AT_end_column(0x01) + 557 .dwendentry + 558 .dwendtag DW$42 + 559 + 560 ;*************************************************************** + 561 ;* STRINGS * + 562 ;*************************************************************** + 563 000000 .sect ".const" + 564 000000 0068 SL1: .string "hello world.",10,0 + 000001 0065 + 000002 006C + 000003 006C + 000004 006F + 000005 0020 + 000006 0077 + 000007 006F + 000008 0072 + 000009 006C + 00000a 0064 + 00000b 002E + 00000c 000A + 00000d 0000 + 565 00000e 003C SL2: .string "",10,0 + 00000f 0054 + 000010 0049 + 000011 004D + 000012 0045 + 000013 0052 + 000014 003E + 000015 000A + 000016 0000 + 566 000017 0054 SL3: .string "TEST FAILED",0 + 000018 0045 + 000019 0053 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 14 + + 00001a 0054 + 00001b 0020 + 00001c 0046 + 00001d 0041 + 00001e 0049 + 00001f 004C + 000020 0045 + 000021 0044 + 000022 0000 + 567 000023 0054 SL4: .string "TEST PASSED",0 + 000024 0045 + 000025 0053 + 000026 0054 + 000027 0020 + 000028 0050 + 000029 0041 + 00002a 0053 + 00002b 0053 + 00002c 0045 + 00002d 0044 + 00002e 0000 + 568 00002f 0025 SL5: .string "%s",10,0 + 000030 0073 + 000031 000A + 000032 0000 + 569 000033 003C SL6: .string "",10,0 + 000034 0044 + 000035 004F + 000036 004E + 000037 0045 + 000038 003E + 000039 000A + 00003a 0000 + 570 ;*************************************************************** + 571 ;* UNDEFINED EXTERNAL REFERENCES * + 572 ;*************************************************************** + 573 .global _printf + 574 .global _IRQ_clear + 575 .global _IRQ_enable + 576 .global _IRQ_globalDisable + 577 .global _IRQ_globalEnable + 578 .global _IRQ_globalRestore + 579 .global _IRQ_plug + 580 .global _CSL_init + 581 .global _TIMER_open + 582 .global _TIMER_close + 583 .global _TIMER_getEventId + 584 .global _TIMER_start + 585 .global _TIMER_stop + 586 .global _TIMER_config + 587 .global _uart_puts + 588 + 589 ;*************************************************************** + 590 ;* TYPE INFORMATION * + 591 ;*************************************************************** + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 15 + + 592 + 593 DW$T$22 .dwtag DW_TAG_subroutine_type + 594 .dwattr DW$T$22, DW_AT_language(DW_LANG_C) + 595 DW$43 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 596 .dwendtag DW$T$22 + 597 + 598 + 599 DW$T$24 .dwtag DW_TAG_subroutine_type + 600 .dwattr DW$T$24, DW_AT_language(DW_LANG_C) + 601 DW$44 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + 602 .dwendtag DW$T$24 + 603 + 604 + 605 DW$T$26 .dwtag DW_TAG_subroutine_type + 606 .dwattr DW$T$26, DW_AT_language(DW_LANG_C) + 607 DW$T$28 .dwtag DW_TAG_typedef, DW_AT_name("IRQ_IsrPtr"), DW_AT_type(*DW$T$27) + 608 .dwattr DW$T$28, DW_AT_language(DW_LANG_C) + 609 + 610 DW$T$29 .dwtag DW_TAG_subroutine_type + 611 .dwattr DW$T$29, DW_AT_language(DW_LANG_C) + 612 DW$45 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 613 DW$46 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$28) + 614 .dwendtag DW$T$29 + 615 + 616 + 617 DW$T$33 .dwtag DW_TAG_subroutine_type + 618 .dwattr DW$T$33, DW_AT_language(DW_LANG_C) + 619 DW$47 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 620 .dwendtag DW$T$33 + 621 + 622 + 623 DW$T$37 .dwtag DW_TAG_subroutine_type + 624 .dwattr DW$T$37, DW_AT_language(DW_LANG_C) + 625 DW$48 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 626 DW$49 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$36) + 627 .dwendtag DW$T$37 + 628 + 629 + 630 DW$T$42 .dwtag DW_TAG_subroutine_type + 631 .dwattr DW$T$42, DW_AT_language(DW_LANG_C) + 632 DW$50 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$41) + 633 .dwendtag DW$T$42 + 634 + 635 + 636 DW$T$44 .dwtag DW_TAG_subroutine_type + 637 .dwattr DW$T$44, DW_AT_language(DW_LANG_C) + 638 DW$T$19 .dwtag DW_TAG_typedef, DW_AT_name("Uint16"), DW_AT_type(*DW$T$9) + 639 .dwattr DW$T$19, DW_AT_language(DW_LANG_C) + 640 + 641 DW$T$45 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$19) + 642 .dwattr DW$T$45, DW_AT_language(DW_LANG_C) + 643 DW$51 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + 644 .dwendtag DW$T$45 + 645 + 646 DW$T$47 .dwtag DW_TAG_volatile_type + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 16 + + 647 .dwattr DW$T$47, DW_AT_type(*DW$T$19) + 648 DW$T$10 .dwtag DW_TAG_base_type, DW_AT_name("int") + 649 .dwattr DW$T$10, DW_AT_encoding(DW_ATE_signed) + 650 .dwattr DW$T$10, DW_AT_byte_size(0x01) + 651 + 652 DW$T$48 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + 653 .dwattr DW$T$48, DW_AT_language(DW_LANG_C) + 654 DW$52 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$41) + 655 DW$53 .dwtag DW_TAG_unspecified_parameters + 656 .dwendtag DW$T$48 + 657 + 658 + 659 DW$T$50 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + 660 .dwattr DW$T$50, DW_AT_language(DW_LANG_C) + 661 DW$54 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 662 .dwendtag DW$T$50 + 663 + 664 + 665 DW$T$52 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + 666 .dwattr DW$T$52, DW_AT_language(DW_LANG_C) + 667 DW$T$32 .dwtag DW_TAG_typedef, DW_AT_name("TIMER_Handle"), DW_AT_type(*DW$T$31) + 668 .dwattr DW$T$32, DW_AT_language(DW_LANG_C) + 669 + 670 DW$T$63 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$32) + 671 .dwattr DW$T$63, DW_AT_language(DW_LANG_C) + 672 DW$55 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + 673 DW$56 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + 674 .dwendtag DW$T$63 + 675 + 676 DW$T$35 .dwtag DW_TAG_typedef, DW_AT_name("TIMER_Config"), DW_AT_type(*DW$T$21) + 677 .dwattr DW$T$35, DW_AT_language(DW_LANG_C) + 678 DW$T$36 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$35) + 679 .dwattr DW$T$36, DW_AT_address_class(0x10) + 680 DW$T$41 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$40) + 681 .dwattr DW$T$41, DW_AT_address_class(0x10) + 682 DW$T$27 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$26) + 683 .dwattr DW$T$27, DW_AT_address_class(0x20) + 684 DW$T$9 .dwtag DW_TAG_base_type, DW_AT_name("unsigned short") + 685 .dwattr DW$T$9, DW_AT_encoding(DW_ATE_unsigned) + 686 .dwattr DW$T$9, DW_AT_byte_size(0x01) + 687 DW$T$31 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$20) + 688 .dwattr DW$T$31, DW_AT_address_class(0x10) + 689 + 690 DW$T$21 .dwtag DW_TAG_structure_type + 691 .dwattr DW$T$21, DW_AT_byte_size(0x02) + 692 DW$57 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + 693 .dwattr DW$57, DW_AT_name("tcr"), DW_AT_symbol_name("_tcr") + 694 .dwattr DW$57, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] + 695 .dwattr DW$57, DW_AT_accessibility(DW_ACCESS_public) + 696 DW$58 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + 697 .dwattr DW$58, DW_AT_name("prd"), DW_AT_symbol_name("_prd") + 698 .dwattr DW$58, DW_AT_data_member_location[DW_OP_plus_uconst 0x1] + 699 .dwattr DW$58, DW_AT_accessibility(DW_ACCESS_public) + 700 .dwendtag DW$T$21 + 701 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 17 + + 702 DW$T$40 .dwtag DW_TAG_const_type + 703 .dwattr DW$T$40, DW_AT_type(*DW$T$39) + 704 + 705 DW$T$20 .dwtag DW_TAG_structure_type + 706 .dwattr DW$T$20, DW_AT_byte_size(0x01) + 707 DW$59 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + 708 .dwattr DW$59, DW_AT_name("Private"), DW_AT_symbol_name("_Private") + 709 .dwattr DW$59, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] + 710 .dwattr DW$59, DW_AT_accessibility(DW_ACCESS_public) + 711 .dwendtag DW$T$20 + 712 + 713 DW$T$39 .dwtag DW_TAG_base_type, DW_AT_name("signed char") + 714 .dwattr DW$T$39, DW_AT_encoding(DW_ATE_signed_char) + 715 .dwattr DW$T$39, DW_AT_byte_size(0x01) + 716 + 717 .dwattr DW$35, DW_AT_external(0x01) + 718 .dwattr DW$36, DW_AT_external(0x01) + 719 .dwattr DW$42, DW_AT_external(0x01) + 720 .dwattr DW$CU, DW_AT_language(DW_LANG_C) + 721 + 722 ;*************************************************************** + 723 ;* DWARF CIE ENTRIES * + 724 ;*************************************************************** + 725 + 726 DW$CIE .dwcie 1, 34 + 727 .dwcfa 0x0c, 17, 0 + 728 .dwcfa 0x07, 0 + 729 .dwcfa 0x07, 1 + 730 .dwcfa 0x07, 2 + 731 .dwcfa 0x07, 3 + 732 .dwcfa 0x07, 4 + 733 .dwcfa 0x07, 5 + 734 .dwcfa 0x07, 6 + 735 .dwcfa 0x07, 7 + 736 .dwcfa 0x07, 8 + 737 .dwcfa 0x07, 9 + 738 .dwcfa 0x08, 10 + 739 .dwcfa 0x07, 11 + 740 .dwcfa 0x07, 12 + 741 .dwcfa 0x07, 13 + 742 .dwcfa 0x07, 14 + 743 .dwcfa 0x08, 15 + 744 .dwcfa 0x08, 16 + 745 .dwcfa 0x07, 17 + 746 .dwcfa 0x07, 18 + 747 .dwcfa 0x07, 19 + 748 .dwcfa 0x07, 20 + 749 .dwcfa 0x07, 21 + 750 .dwcfa 0x07, 22 + 751 .dwcfa 0x07, 23 + 752 .dwcfa 0x07, 24 + 753 .dwcfa 0x07, 25 + 754 .dwcfa 0x07, 26 + 755 .dwcfa 0x07, 27 + 756 .dwcfa 0x07, 28 + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 18 + + 757 .dwcfa 0x07, 29 + 758 .dwcfa 0x07, 30 + 759 .dwcfa 0x07, 31 + 760 .dwcfa 0x07, 32 + 761 .dwcfa 0x07, 33 + 762 .dwcfa 0x07, 34 + 763 + 764 ;*************************************************************** + 765 ;* DWARF REGISTER MAP * + 766 ;*************************************************************** + 767 + 768 DW$60 .dwtag DW_TAG_assign_register, DW_AT_name("A") + 769 .dwattr DW$60, DW_AT_location[DW_OP_reg0] + 770 DW$61 .dwtag DW_TAG_assign_register, DW_AT_name("AH") + 771 .dwattr DW$61, DW_AT_location[DW_OP_reg1] + 772 DW$62 .dwtag DW_TAG_assign_register, DW_AT_name("AG") + 773 .dwattr DW$62, DW_AT_location[DW_OP_reg2] + 774 DW$63 .dwtag DW_TAG_assign_register, DW_AT_name("") + 775 .dwattr DW$63, DW_AT_location[DW_OP_reg3] + 776 DW$64 .dwtag DW_TAG_assign_register, DW_AT_name("") + 777 .dwattr DW$64, DW_AT_location[DW_OP_reg4] + 778 DW$65 .dwtag DW_TAG_assign_register, DW_AT_name("") + 779 .dwattr DW$65, DW_AT_location[DW_OP_reg5] + 780 DW$66 .dwtag DW_TAG_assign_register, DW_AT_name("B") + 781 .dwattr DW$66, DW_AT_location[DW_OP_reg6] + 782 DW$67 .dwtag DW_TAG_assign_register, DW_AT_name("BH") + 783 .dwattr DW$67, DW_AT_location[DW_OP_reg7] + 784 DW$68 .dwtag DW_TAG_assign_register, DW_AT_name("BG") + 785 .dwattr DW$68, DW_AT_location[DW_OP_reg8] + 786 DW$69 .dwtag DW_TAG_assign_register, DW_AT_name("AR0") + 787 .dwattr DW$69, DW_AT_location[DW_OP_reg9] + 788 DW$70 .dwtag DW_TAG_assign_register, DW_AT_name("AR1") + 789 .dwattr DW$70, DW_AT_location[DW_OP_reg10] + 790 DW$71 .dwtag DW_TAG_assign_register, DW_AT_name("AR2") + 791 .dwattr DW$71, DW_AT_location[DW_OP_reg11] + 792 DW$72 .dwtag DW_TAG_assign_register, DW_AT_name("AR3") + 793 .dwattr DW$72, DW_AT_location[DW_OP_reg12] + 794 DW$73 .dwtag DW_TAG_assign_register, DW_AT_name("AR4") + 795 .dwattr DW$73, DW_AT_location[DW_OP_reg13] + 796 DW$74 .dwtag DW_TAG_assign_register, DW_AT_name("AR5") + 797 .dwattr DW$74, DW_AT_location[DW_OP_reg14] + 798 DW$75 .dwtag DW_TAG_assign_register, DW_AT_name("AR6") + 799 .dwattr DW$75, DW_AT_location[DW_OP_reg15] + 800 DW$76 .dwtag DW_TAG_assign_register, DW_AT_name("AR7") + 801 .dwattr DW$76, DW_AT_location[DW_OP_reg16] + 802 DW$77 .dwtag DW_TAG_assign_register, DW_AT_name("SP") + 803 .dwattr DW$77, DW_AT_location[DW_OP_reg17] + 804 DW$78 .dwtag DW_TAG_assign_register, DW_AT_name("FP") + 805 .dwattr DW$78, DW_AT_location[DW_OP_reg18] + 806 DW$79 .dwtag DW_TAG_assign_register, DW_AT_name("BK") + 807 .dwattr DW$79, DW_AT_location[DW_OP_reg19] + 808 DW$80 .dwtag DW_TAG_assign_register, DW_AT_name("T") + 809 .dwattr DW$80, DW_AT_location[DW_OP_reg20] + 810 DW$81 .dwtag DW_TAG_assign_register, DW_AT_name("ASM") + 811 .dwattr DW$81, DW_AT_location[DW_OP_reg21] + TMS320C54x COFF Assembler PC v4.1.0 Mon May 02 17:19:42 2016 + +Tools Copyright (c) 1996-2005 Texas Instruments Incorporated +timer.asm PAGE 19 + + 812 DW$82 .dwtag DW_TAG_assign_register, DW_AT_name("SXM") + 813 .dwattr DW$82, DW_AT_location[DW_OP_reg22] + 814 DW$83 .dwtag DW_TAG_assign_register, DW_AT_name("ST0") + 815 .dwattr DW$83, DW_AT_location[DW_OP_reg23] + 816 DW$84 .dwtag DW_TAG_assign_register, DW_AT_name("ST1") + 817 .dwattr DW$84, DW_AT_location[DW_OP_reg24] + 818 DW$85 .dwtag DW_TAG_assign_register, DW_AT_name("BRC") + 819 .dwattr DW$85, DW_AT_location[DW_OP_reg25] + 820 DW$86 .dwtag DW_TAG_assign_register, DW_AT_name("TC") + 821 .dwattr DW$86, DW_AT_location[DW_OP_reg26] + 822 DW$87 .dwtag DW_TAG_assign_register, DW_AT_name("PC") + 823 .dwattr DW$87, DW_AT_location[DW_OP_reg27] + 824 DW$88 .dwtag DW_TAG_assign_register, DW_AT_name("DB") + 825 .dwattr DW$88, DW_AT_location[DW_OP_reg28] + 826 DW$89 .dwtag DW_TAG_assign_register, DW_AT_name("PMST") + 827 .dwattr DW$89, DW_AT_location[DW_OP_reg29] + 828 DW$90 .dwtag DW_TAG_assign_register, DW_AT_name("RSA") + 829 .dwattr DW$90, DW_AT_location[DW_OP_reg30] + 830 DW$91 .dwtag DW_TAG_assign_register, DW_AT_name("REA") + 831 .dwattr DW$91, DW_AT_location[DW_OP_reg31] + 832 DW$92 .dwtag DW_TAG_assign_register, DW_AT_name("OVM") + 833 .dwattr DW$92, DW_AT_location[DW_OP_regx 0x20] + 834 DW$93 .dwtag DW_TAG_assign_register, DW_AT_name("FRCT") + 835 .dwattr DW$93, DW_AT_location[DW_OP_regx 0x21] + 836 DW$94 .dwtag DW_TAG_assign_register, DW_AT_name("CIE_RETA") + 837 .dwattr DW$94, DW_AT_location[DW_OP_regx 0x22] + 838 .dwendtag DW$CU + 839 + +126 Assembly Errors, No Assembly Warnings diff --git a/c5416_test/timer1/Debug/timer.obj b/c5416_test/timer1/Debug/timer.obj new file mode 100644 index 0000000..a484c7f Binary files /dev/null and b/c5416_test/timer1/Debug/timer.obj differ diff --git a/c5416_test/timer1/Debug/timer.out b/c5416_test/timer1/Debug/timer.out new file mode 100644 index 0000000..15bba69 Binary files /dev/null and b/c5416_test/timer1/Debug/timer.out differ diff --git a/c5416_test/timer1/Debug/uart.obj b/c5416_test/timer1/Debug/uart.obj new file mode 100644 index 0000000..eac1a53 Binary files /dev/null and b/c5416_test/timer1/Debug/uart.obj differ diff --git a/c5416_test/timer1/cc_build_Debug.log b/c5416_test/timer1/cc_build_Debug.log new file mode 100644 index 0000000..f9720c1 --- /dev/null +++ b/c5416_test/timer1/cc_build_Debug.log @@ -0,0 +1,8 @@ +----------------------------- timer.pjt - Debug ----------------------------- +[timer.c] "D:\CCStudio_v3.3\C5400\cgtools\bin\cl500" -g -k -q -fr"./Debug" -d"_DEBUG" -d"CHIP_5416" -mf -v548 -@"Debug.lkf" "timer.c" + +[Linking...] "D:\CCStudio_v3.3\C5400\cgtools\bin\cl500" -@"Debug.lkf" + + +Build Complete, + 0 Errors, 0 Warnings, 0 Remarks. diff --git a/c5416_test/timer1/timer.CS_/FILE.CDX b/c5416_test/timer1/timer.CS_/FILE.CDX new file mode 100644 index 0000000..d61ad2c Binary files /dev/null and b/c5416_test/timer1/timer.CS_/FILE.CDX differ diff --git a/c5416_test/timer1/timer.CS_/FILE.DBF b/c5416_test/timer1/timer.CS_/FILE.DBF new file mode 100644 index 0000000..30f7f83 Binary files /dev/null and b/c5416_test/timer1/timer.CS_/FILE.DBF differ diff --git a/c5416_test/timer1/timer.CS_/FILE.FPT b/c5416_test/timer1/timer.CS_/FILE.FPT new file mode 100644 index 0000000..1be8428 Binary files /dev/null and b/c5416_test/timer1/timer.CS_/FILE.FPT differ diff --git a/c5416_test/timer1/timer.CS_/SYMBOL.CDX b/c5416_test/timer1/timer.CS_/SYMBOL.CDX new file mode 100644 index 0000000..5555834 Binary files /dev/null and b/c5416_test/timer1/timer.CS_/SYMBOL.CDX differ diff --git a/c5416_test/timer1/timer.CS_/SYMBOL.DBF b/c5416_test/timer1/timer.CS_/SYMBOL.DBF new file mode 100644 index 0000000..5ed8840 Binary files /dev/null and b/c5416_test/timer1/timer.CS_/SYMBOL.DBF differ diff --git a/c5416_test/timer1/timer.CS_/SYMBOL.FPT b/c5416_test/timer1/timer.CS_/SYMBOL.FPT new file mode 100644 index 0000000..20cbf7a Binary files /dev/null and b/c5416_test/timer1/timer.CS_/SYMBOL.FPT differ diff --git a/c5416_test/timer1/timer.asm b/c5416_test/timer1/timer.asm new file mode 100644 index 0000000..cb488e1 --- /dev/null +++ b/c5416_test/timer1/timer.asm @@ -0,0 +1,839 @@ +;*************************************************************** +;* TMS320C54x C/C++ Codegen PC v4.1.0 * +;* Date/Time created: Fri May 06 17:19:30 2016 * +;*************************************************************** + .compiler_opts --mem_model:code=far --mem_model:data=flat --quiet --silicon_version=548 + .mmregs +FP .set AR7 + .c_mode + +DW$CU .dwtag DW_TAG_compile_unit + .dwattr DW$CU, DW_AT_name("timer.c") + .dwattr DW$CU, DW_AT_producer("TMS320C54x C/C++ Codegen PC v4.1.0 Copyright (c) 1996-2005 Texas Instruments Incorporated") + .dwattr DW$CU, DW_AT_stmt_list(0x00) + .dwattr DW$CU, DW_AT_TI_VERSION(0x01) +;************************************************************** +;* CINIT RECORDS * +;************************************************************** + .sect ".cinit" + .align 1 + .field IR_1,16 + .field _myTConfig+0,16 + .field 3104,16 ; _myTConfig._tcr @ 0 + .field 2048,16 ; _myTConfig._prd @ 16 +IR_1: .set 2 + + .sect ".cinit" + .align 1 + .field 1,16 + .field _timer_int_cnt+0,16 + .field 0,16 ; _timer_int_cnt @ 0 + + +DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_clear"), DW_AT_symbol_name("_IRQ_clear") + .dwattr DW$1, DW_AT_declaration(0x01) + .dwattr DW$1, DW_AT_external(0x01) +DW$2 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + .dwendtag DW$1 + + +DW$3 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_enable"), DW_AT_symbol_name("_IRQ_enable") + .dwattr DW$3, DW_AT_type(*DW$T$10) + .dwattr DW$3, DW_AT_declaration(0x01) + .dwattr DW$3, DW_AT_external(0x01) +DW$4 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + .dwendtag DW$3 + + +DW$5 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_globalDisable"), DW_AT_symbol_name("_IRQ_globalDisable") + .dwattr DW$5, DW_AT_type(*DW$T$10) + .dwattr DW$5, DW_AT_declaration(0x01) + .dwattr DW$5, DW_AT_external(0x01) + +DW$6 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_globalEnable"), DW_AT_symbol_name("_IRQ_globalEnable") + .dwattr DW$6, DW_AT_type(*DW$T$10) + .dwattr DW$6, DW_AT_declaration(0x01) + .dwattr DW$6, DW_AT_external(0x01) + +DW$7 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_globalRestore"), DW_AT_symbol_name("_IRQ_globalRestore") + .dwattr DW$7, DW_AT_declaration(0x01) + .dwattr DW$7, DW_AT_external(0x01) +DW$8 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + .dwendtag DW$7 + + +DW$9 .dwtag DW_TAG_subprogram, DW_AT_name("IRQ_plug"), DW_AT_symbol_name("_IRQ_plug") + .dwattr DW$9, DW_AT_declaration(0x01) + .dwattr DW$9, DW_AT_external(0x01) +DW$10 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) +DW$11 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$28) + .dwendtag DW$9 + + +DW$12 .dwtag DW_TAG_subprogram, DW_AT_name("CSL_init"), DW_AT_symbol_name("_CSL_init") + .dwattr DW$12, DW_AT_declaration(0x01) + .dwattr DW$12, DW_AT_external(0x01) + +DW$13 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_open"), DW_AT_symbol_name("_TIMER_open") + .dwattr DW$13, DW_AT_type(*DW$T$32) + .dwattr DW$13, DW_AT_declaration(0x01) + .dwattr DW$13, DW_AT_external(0x01) +DW$14 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) +DW$15 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + .dwendtag DW$13 + + +DW$16 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_close"), DW_AT_symbol_name("_TIMER_close") + .dwattr DW$16, DW_AT_declaration(0x01) + .dwattr DW$16, DW_AT_external(0x01) +DW$17 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + .dwendtag DW$16 + + +DW$18 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_getEventId"), DW_AT_symbol_name("_TIMER_getEventId") + .dwattr DW$18, DW_AT_type(*DW$T$19) + .dwattr DW$18, DW_AT_declaration(0x01) + .dwattr DW$18, DW_AT_external(0x01) +DW$19 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + .dwendtag DW$18 + + +DW$20 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_start"), DW_AT_symbol_name("_TIMER_start") + .dwattr DW$20, DW_AT_declaration(0x01) + .dwattr DW$20, DW_AT_external(0x01) +DW$21 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + .dwendtag DW$20 + + +DW$22 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_stop"), DW_AT_symbol_name("_TIMER_stop") + .dwattr DW$22, DW_AT_declaration(0x01) + .dwattr DW$22, DW_AT_external(0x01) +DW$23 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + .dwendtag DW$22 + + +DW$24 .dwtag DW_TAG_subprogram, DW_AT_name("TIMER_config"), DW_AT_symbol_name("_TIMER_config") + .dwattr DW$24, DW_AT_declaration(0x01) + .dwattr DW$24, DW_AT_external(0x01) +DW$25 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) +DW$26 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$36) + .dwendtag DW$24 + + +DW$27 .dwtag DW_TAG_subprogram, DW_AT_name("uart_puts"), DW_AT_symbol_name("_uart_puts") + .dwattr DW$27, DW_AT_declaration(0x01) + .dwattr DW$27, DW_AT_external(0x01) +DW$28 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$41) + .dwendtag DW$27 + + .global _myTConfig + .bss _myTConfig,2,0,0 +DW$29 .dwtag DW_TAG_variable, DW_AT_name("myTConfig"), DW_AT_symbol_name("_myTConfig") + .dwattr DW$29, DW_AT_location[DW_OP_addr _myTConfig] + .dwattr DW$29, DW_AT_type(*DW$T$35) + .dwattr DW$29, DW_AT_external(0x01) + .global _mhTimer + .bss _mhTimer,1,0,0 +DW$30 .dwtag DW_TAG_variable, DW_AT_name("mhTimer"), DW_AT_symbol_name("_mhTimer") + .dwattr DW$30, DW_AT_location[DW_OP_addr _mhTimer] + .dwattr DW$30, DW_AT_type(*DW$T$32) + .dwattr DW$30, DW_AT_external(0x01) + .global _timer_int_cnt + .bss _timer_int_cnt,1,0,0 +DW$31 .dwtag DW_TAG_variable, DW_AT_name("timer_int_cnt"), DW_AT_symbol_name("_timer_int_cnt") + .dwattr DW$31, DW_AT_location[DW_OP_addr _timer_int_cnt] + .dwattr DW$31, DW_AT_type(*DW$T$47) + .dwattr DW$31, DW_AT_external(0x01) +; D:\CCStudio_v3.3\C5400\cgtools\bin\acp500.exe --keep_unneeded_types -q -D_DEBUG -DCHIP_5416 -ID:/CCStudio_v3.3/C5400/xdais/include -ID:/CCStudio_v3.3/C5400/csl/include -ID:/CCStudio_v3.3/bios_5_31_02/packages/ti/bios/include -ID:/CCStudio_v3.3/bios_5_31_02/packages/ti/rtdx/include/c5400 -ID:/CCStudio_v3.3/C5400/cgtools/include --mem_model:code=far --mem_model:data=flat -m --i_output_file C:\Users\jiachao\AppData\Local\Temp\TI8762 --template_info_file C:\Users\jiachao\AppData\Local\Temp\TI8766 + .sect ".text" + .global _main + +DW$32 .dwtag DW_TAG_subprogram, DW_AT_name("main"), DW_AT_symbol_name("_main") + .dwattr DW$32, DW_AT_low_pc(_main) + .dwattr DW$32, DW_AT_high_pc(0x00) + .dwattr DW$32, DW_AT_begin_file("timer.c") + .dwattr DW$32, DW_AT_begin_line(0x31) + .dwattr DW$32, DW_AT_begin_column(0x06) + .dwpsn "timer.c",49,13 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _main * +;*************************************************************** +_main: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + .dwpsn "timer.c",51,3 + FCALLD #_uart_puts ; |51| + LD #SL1,A + ; call occurs [#_uart_puts] ; |51| + .dwpsn "timer.c",54,3 + FCALL #_CSL_init ; |54| + ; call occurs [#_CSL_init] ; |54| + .dwpsn "timer.c",56,3 + FCALL #_taskFunc ; |56| + ; call occurs [#_taskFunc] ; |56| + .dwpsn "timer.c",57,9 +L1: +DW$L$_main$2$B: + B L1 ; |57| + ; branch occurs ; |57| +DW$L$_main$2$E: + +DW$33 .dwtag DW_TAG_loop + .dwattr DW$33, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\timer.asm:L1:1:1462526370") + .dwattr DW$33, DW_AT_begin_file("timer.c") + .dwattr DW$33, DW_AT_begin_line(0x39) + .dwattr DW$33, DW_AT_end_line(0x39) +DW$34 .dwtag DW_TAG_loop_range + .dwattr DW$34, DW_AT_low_pc(DW$L$_main$2$B) + .dwattr DW$34, DW_AT_high_pc(DW$L$_main$2$E) + .dwendtag DW$33 + + .dwattr DW$32, DW_AT_end_file("timer.c") + .dwattr DW$32, DW_AT_end_line(0x3a) + .dwattr DW$32, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$32 + + .sect ".text" + .global _taskFunc + +DW$35 .dwtag DW_TAG_subprogram, DW_AT_name("taskFunc"), DW_AT_symbol_name("_taskFunc") + .dwattr DW$35, DW_AT_low_pc(_taskFunc) + .dwattr DW$35, DW_AT_high_pc(0x00) + .dwattr DW$35, DW_AT_begin_file("timer.c") + .dwattr DW$35, DW_AT_begin_line(0x3d) + .dwattr DW$35, DW_AT_begin_column(0x06) + .dwpsn "timer.c",61,21 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _taskFunc * +;*************************************************************** +_taskFunc: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-5 + NOP + .dwcfa 0x0e, 8 +DW$36 .dwtag DW_TAG_variable, DW_AT_name("eventId"), DW_AT_symbol_name("_eventId") + .dwattr DW$36, DW_AT_type(*DW$T$19) + .dwattr DW$36, DW_AT_location[DW_OP_breg17 2] +DW$37 .dwtag DW_TAG_variable, DW_AT_name("old_intm"), DW_AT_symbol_name("_old_intm") + .dwattr DW$37, DW_AT_type(*DW$T$10) + .dwattr DW$37, DW_AT_location[DW_OP_breg17 3] +DW$38 .dwtag DW_TAG_variable, DW_AT_name("err"), DW_AT_symbol_name("_err") + .dwattr DW$38, DW_AT_type(*DW$T$19) + .dwattr DW$38, DW_AT_location[DW_OP_breg17 4] + .dwpsn "timer.c",65,10 + ST #0,*SP(4) ; |65| + .dwpsn "timer.c",68,3 + FCALLD #_uart_puts ; |68| + LD #SL2,A + ; call occurs [#_uart_puts] ; |68| + .dwpsn "timer.c",72,3 + FCALL #_IRQ_globalDisable ; |72| + ; call occurs [#_IRQ_globalDisable] ; |72| + STL A,*SP(3) + .dwpsn "timer.c",76,3 + ST #1,*SP(0) ; |76| + FCALLD #_TIMER_open ; |76| + NOP + LD #0,A + ; call occurs [#_TIMER_open] ; |76| + STL A,*(_mhTimer) + .dwpsn "timer.c",80,3 + ST #_myTConfig,*SP(0) ; |80| + FCALL #_TIMER_config ; |80| + ; call occurs [#_TIMER_config] ; |80| + .dwpsn "timer.c",83,3 + LD *(_mhTimer),A + FCALL #_TIMER_getEventId ; |83| + ; call occurs [#_TIMER_getEventId] ; |83| + STL A,*SP(2) + .dwpsn "timer.c",86,3 + FCALL #_IRQ_clear ; |86| + ; call occurs [#_IRQ_clear] ; |86| + .dwpsn "timer.c",89,3 + LDX #_timerIsr,16,A ; |89| + OR #_timerIsr,A,A ; |89| + DST A,*SP(0) ; |89| + LD *SP(2),A + FCALL #_IRQ_plug ; |89| + ; call occurs [#_IRQ_plug] ; |89| + .dwpsn "timer.c",92,3 + LD *SP(2),A + FCALL #_IRQ_enable ; |92| + ; call occurs [#_IRQ_enable] ; |92| + .dwpsn "timer.c",95,3 + FCALL #_IRQ_globalEnable ; |95| + ; call occurs [#_IRQ_globalEnable] ; |95| + .dwpsn "timer.c",98,3 + LD *(_mhTimer),A + FCALL #_TIMER_start ; |98| + ; call occurs [#_TIMER_start] ; |98| + .dwpsn "timer.c",101,9 + MVDM *(_timer_int_cnt),AR1 + STM #20,AR0 + CMPR 1,AR1 ; |101| + BC L3,NTC ; |101| + ; branchcc occurs ; |101| +L2: +DW$L$_taskFunc$2$B: + MVDM *(_timer_int_cnt),AR1 + NOP + CMPR 1,AR1 ; |101| + BC L2,TC ; |101| + ; branchcc occurs ; |101| +DW$L$_taskFunc$2$E: +L3: + .dwpsn "timer.c",104,3 + LD *(_mhTimer),A + FCALL #_TIMER_close ; |104| + ; call occurs [#_TIMER_close] ; |104| + .dwpsn "timer.c",107,3 + LD *SP(3),A + FCALL #_IRQ_globalRestore ; |107| + ; call occurs [#_IRQ_globalRestore] ; |107| + .dwpsn "timer.c",109,4 + MVDM *(_timer_int_cnt),AR1 + STM #20,AR0 + CMPR 1,AR1 ; |109| + BC L4,NTC ; |109| + ; branchcc occurs ; |109| + .dwpsn "timer.c",110,7 + ADDM #1,*SP(4) ; |110| +L4: + .dwpsn "timer.c",114,4 + LD *SP(4),A ; |114| + BC L5,AEQ ; |114| + ; branchcc occurs ; |114| + .dwpsn "timer.c",115,6 + FCALLD #_uart_puts ; |115| + LD #SL3,A + ; call occurs [#_uart_puts] ; |115| + B L6 ; |115| + ; branch occurs ; |115| +L5: + .dwpsn "timer.c",117,6 + FCALLD #_uart_puts ; |117| + LD #SL4,A + ; call occurs [#_uart_puts] ; |117| +L6: + .dwpsn "timer.c",119,4 + FCALLD #_uart_puts ; |119| + LD #SL5,A + ; call occurs [#_uart_puts] ; |119| + .dwpsn "timer.c",120,1 + FRAME #5 + .dwcfa 0x0e, 3 + POPM AR1 + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET + ; return occurs + +DW$39 .dwtag DW_TAG_loop + .dwattr DW$39, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\timer.asm:L2:1:1462526370") + .dwattr DW$39, DW_AT_begin_file("timer.c") + .dwattr DW$39, DW_AT_begin_line(0x65) + .dwattr DW$39, DW_AT_end_line(0x65) +DW$40 .dwtag DW_TAG_loop_range + .dwattr DW$40, DW_AT_low_pc(DW$L$_taskFunc$2$B) + .dwattr DW$40, DW_AT_high_pc(DW$L$_taskFunc$2$E) + .dwendtag DW$39 + + .dwattr DW$35, DW_AT_end_file("timer.c") + .dwattr DW$35, DW_AT_end_line(0x78) + .dwattr DW$35, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$35 + + .sect ".text" + .global _timerIsr + +DW$41 .dwtag DW_TAG_subprogram, DW_AT_name("timerIsr"), DW_AT_symbol_name("_timerIsr") + .dwattr DW$41, DW_AT_low_pc(_timerIsr) + .dwattr DW$41, DW_AT_high_pc(0x00) + .dwattr DW$41, DW_AT_begin_file("timer.c") + .dwattr DW$41, DW_AT_begin_line(0x7d) + .dwattr DW$41, DW_AT_begin_column(0x10) + .dwpsn "timer.c",125,31 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _timerIsr * +;*************************************************************** +_timerIsr: + NOP + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AL + .dwcfa 0x0e, 3 + .dwcfa 0x80, 0, 3 + PSHM AH + .dwcfa 0x0e, 4 + .dwcfa 0x80, 1, 4 + PSHM AG + .dwcfa 0x0e, 5 + .dwcfa 0x80, 2, 5 + PSHM BL + .dwcfa 0x0e, 6 + .dwcfa 0x80, 6, 6 + PSHM BH + .dwcfa 0x0e, 7 + .dwcfa 0x80, 7, 7 + PSHM BG + .dwcfa 0x0e, 8 + .dwcfa 0x80, 8, 8 + PSHM AR0 + .dwcfa 0x0e, 9 + .dwcfa 0x80, 9, 9 + PSHM AR1 + .dwcfa 0x0e, 10 + .dwcfa 0x80, 10, 10 + PSHM AR2 + .dwcfa 0x0e, 11 + .dwcfa 0x80, 11, 11 + PSHM AR3 + .dwcfa 0x0e, 12 + .dwcfa 0x80, 12, 12 + PSHM AR4 + .dwcfa 0x0e, 13 + .dwcfa 0x80, 13, 13 + PSHM AR5 + .dwcfa 0x0e, 14 + .dwcfa 0x80, 14, 14 + PSHM AR6 + .dwcfa 0x0e, 15 + .dwcfa 0x80, 15, 15 + PSHM AR7 + .dwcfa 0x0e, 16 + .dwcfa 0x80, 16, 16 + PSHM FP + .dwcfa 0x0e, 17 + .dwcfa 0x80, 18, 17 + PSHM BK + .dwcfa 0x0e, 18 + .dwcfa 0x80, 19, 18 + PSHM T + .dwcfa 0x0e, 19 + .dwcfa 0x80, 20, 19 + PSHM ST0 + .dwcfa 0x0e, 20 + .dwcfa 0x80, 23, 20 + PSHM ST1 + NOP + .dwcfa 0x0e, 21 + .dwcfa 0x80, 24, 21 + PSHM BRC + .dwcfa 0x0e, 22 + .dwcfa 0x80, 25, 22 + PSHM PMST + NOP + .dwcfa 0x0e, 23 + .dwcfa 0x80, 29, 23 + PSHM RSA + .dwcfa 0x0e, 24 + .dwcfa 0x80, 30, 24 + PSHM REA + .dwcfa 0x0e, 25 + .dwcfa 0x80, 31, 25 + ANDM #32063,*(ST1) + ORM #16384,*(ST1) + ANDM #-4,*(PMST) + LDM SP,A + ANDM #-2,*(SP) + NOP + NOP + PSHM AL + FRAME #-1 + .dwcfa 0x0e, 25 + .dwpsn "timer.c",126,4 + LD *(_mhTimer),A + FCALL #_TIMER_stop ; |126| + ; call occurs [#_TIMER_stop] ; |126| + .dwpsn "timer.c",127,4 + ADDM #1,*(_timer_int_cnt) ; |127| + .dwpsn "timer.c",128,4 + MVDM *(_timer_int_cnt),AR1 + STM #20,AR0 + CMPR 1,AR1 ; |128| + BC L7,NTC ; |128| + ; branchcc occurs ; |128| + .dwpsn "timer.c",129,6 + LD *(_mhTimer),A + FCALL #_TIMER_start ; |129| + ; call occurs [#_TIMER_start] ; |129| +L7: + .dwpsn "timer.c",132,4 + FCALLD #_uart_puts ; |132| + LD #SL6,A + ; call occurs [#_uart_puts] ; |132| + .dwpsn "timer.c",133,1 + FRAME #1 + .dwcfa 0x0e, 25 + POPM SP + NOP + POPM REA + .dwcfa 0xc0, 31 + .dwcfa 0x0e, 24 + POPM RSA + .dwcfa 0xc0, 30 + .dwcfa 0x0e, 23 + POPM PMST + NOP + .dwcfa 0xc0, 29 + .dwcfa 0x0e, 22 + POPM BRC + .dwcfa 0xc0, 25 + .dwcfa 0x0e, 21 + POPM ST1 + NOP + .dwcfa 0xc0, 24 + .dwcfa 0x0e, 20 + POPM ST0 + .dwcfa 0xc0, 23 + .dwcfa 0x0e, 19 + POPM T + .dwcfa 0xc0, 20 + .dwcfa 0x0e, 18 + POPM BK + .dwcfa 0xc0, 19 + .dwcfa 0x0e, 17 + POPM FP + .dwcfa 0xc0, 18 + .dwcfa 0x0e, 16 + POPM AR7 + .dwcfa 0xc0, 16 + .dwcfa 0x0e, 15 + POPM AR6 + .dwcfa 0xc0, 15 + .dwcfa 0x0e, 14 + POPM AR5 + .dwcfa 0xc0, 14 + .dwcfa 0x0e, 13 + POPM AR4 + .dwcfa 0xc0, 13 + .dwcfa 0x0e, 12 + POPM AR3 + .dwcfa 0xc0, 12 + .dwcfa 0x0e, 11 + POPM AR2 + .dwcfa 0xc0, 11 + .dwcfa 0x0e, 10 + POPM AR1 + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 9 + POPM AR0 + .dwcfa 0xc0, 9 + .dwcfa 0x0e, 8 + POPM BG + .dwcfa 0xc0, 8 + .dwcfa 0x0e, 7 + POPM BH + .dwcfa 0xc0, 7 + .dwcfa 0x0e, 6 + POPM BL + .dwcfa 0xc0, 6 + .dwcfa 0x0e, 5 + POPM AG + .dwcfa 0xc0, 2 + .dwcfa 0x0e, 4 + POPM AH + .dwcfa 0xc0, 1 + .dwcfa 0x0e, 3 + POPM AL + .dwcfa 0xc0, 0 + .dwcfa 0x0e, 2 + NOP + NOP + FRETE + ; branch occurs + .dwattr DW$41, DW_AT_end_file("timer.c") + .dwattr DW$41, DW_AT_end_line(0x85) + .dwattr DW$41, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$41 + +;*************************************************************** +;* STRINGS * +;*************************************************************** + .sect ".const" +SL1: .string "C5416 Timer Test Start...",10,0 +SL2: .string "",10,0 +SL3: .string "TEST FAILED",10,0 +SL4: .string "TEST PASSED",10,0 +SL5: .string "",10,0 +SL6: .string "Entry Timer Isr function...",10,0 +;*************************************************************** +;* UNDEFINED EXTERNAL REFERENCES * +;*************************************************************** + .global _IRQ_clear + .global _IRQ_enable + .global _IRQ_globalDisable + .global _IRQ_globalEnable + .global _IRQ_globalRestore + .global _IRQ_plug + .global _CSL_init + .global _TIMER_open + .global _TIMER_close + .global _TIMER_getEventId + .global _TIMER_start + .global _TIMER_stop + .global _TIMER_config + .global _uart_puts + +;*************************************************************** +;* TYPE INFORMATION * +;*************************************************************** + +DW$T$22 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$22, DW_AT_language(DW_LANG_C) +DW$42 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + .dwendtag DW$T$22 + + +DW$T$24 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$24, DW_AT_language(DW_LANG_C) +DW$43 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + .dwendtag DW$T$24 + + +DW$T$26 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$26, DW_AT_language(DW_LANG_C) +DW$T$28 .dwtag DW_TAG_typedef, DW_AT_name("IRQ_IsrPtr"), DW_AT_type(*DW$T$27) + .dwattr DW$T$28, DW_AT_language(DW_LANG_C) + +DW$T$29 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$29, DW_AT_language(DW_LANG_C) +DW$44 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) +DW$45 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$28) + .dwendtag DW$T$29 + + +DW$T$33 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$33, DW_AT_language(DW_LANG_C) +DW$46 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + .dwendtag DW$T$33 + + +DW$T$37 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$37, DW_AT_language(DW_LANG_C) +DW$47 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) +DW$48 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$36) + .dwendtag DW$T$37 + + +DW$T$42 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$42, DW_AT_language(DW_LANG_C) +DW$49 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$41) + .dwendtag DW$T$42 + + +DW$T$44 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$44, DW_AT_language(DW_LANG_C) +DW$T$19 .dwtag DW_TAG_typedef, DW_AT_name("Uint16"), DW_AT_type(*DW$T$9) + .dwattr DW$T$19, DW_AT_language(DW_LANG_C) + +DW$T$45 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$19) + .dwattr DW$T$45, DW_AT_language(DW_LANG_C) +DW$50 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$32) + .dwendtag DW$T$45 + +DW$T$47 .dwtag DW_TAG_volatile_type + .dwattr DW$T$47, DW_AT_type(*DW$T$19) +DW$T$10 .dwtag DW_TAG_base_type, DW_AT_name("int") + .dwattr DW$T$10, DW_AT_encoding(DW_ATE_signed) + .dwattr DW$T$10, DW_AT_byte_size(0x01) + +DW$T$48 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + .dwattr DW$T$48, DW_AT_language(DW_LANG_C) +DW$51 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + .dwendtag DW$T$48 + + +DW$T$50 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + .dwattr DW$T$50, DW_AT_language(DW_LANG_C) +DW$T$32 .dwtag DW_TAG_typedef, DW_AT_name("TIMER_Handle"), DW_AT_type(*DW$T$31) + .dwattr DW$T$32, DW_AT_language(DW_LANG_C) + +DW$T$52 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$32) + .dwattr DW$T$52, DW_AT_language(DW_LANG_C) +DW$52 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) +DW$53 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$19) + .dwendtag DW$T$52 + +DW$T$35 .dwtag DW_TAG_typedef, DW_AT_name("TIMER_Config"), DW_AT_type(*DW$T$21) + .dwattr DW$T$35, DW_AT_language(DW_LANG_C) +DW$T$36 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$35) + .dwattr DW$T$36, DW_AT_address_class(0x10) +DW$T$41 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$40) + .dwattr DW$T$41, DW_AT_address_class(0x10) +DW$T$27 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$26) + .dwattr DW$T$27, DW_AT_address_class(0x20) +DW$T$9 .dwtag DW_TAG_base_type, DW_AT_name("unsigned short") + .dwattr DW$T$9, DW_AT_encoding(DW_ATE_unsigned) + .dwattr DW$T$9, DW_AT_byte_size(0x01) +DW$T$31 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$20) + .dwattr DW$T$31, DW_AT_address_class(0x10) + +DW$T$21 .dwtag DW_TAG_structure_type + .dwattr DW$T$21, DW_AT_byte_size(0x02) +DW$54 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$54, DW_AT_name("tcr"), DW_AT_symbol_name("_tcr") + .dwattr DW$54, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] + .dwattr DW$54, DW_AT_accessibility(DW_ACCESS_public) +DW$55 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$55, DW_AT_name("prd"), DW_AT_symbol_name("_prd") + .dwattr DW$55, DW_AT_data_member_location[DW_OP_plus_uconst 0x1] + .dwattr DW$55, DW_AT_accessibility(DW_ACCESS_public) + .dwendtag DW$T$21 + +DW$T$40 .dwtag DW_TAG_const_type + .dwattr DW$T$40, DW_AT_type(*DW$T$39) + +DW$T$20 .dwtag DW_TAG_structure_type + .dwattr DW$T$20, DW_AT_byte_size(0x01) +DW$56 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$56, DW_AT_name("Private"), DW_AT_symbol_name("_Private") + .dwattr DW$56, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] + .dwattr DW$56, DW_AT_accessibility(DW_ACCESS_public) + .dwendtag DW$T$20 + +DW$T$39 .dwtag DW_TAG_base_type, DW_AT_name("signed char") + .dwattr DW$T$39, DW_AT_encoding(DW_ATE_signed_char) + .dwattr DW$T$39, DW_AT_byte_size(0x01) + + .dwattr DW$32, DW_AT_external(0x01) + .dwattr DW$35, DW_AT_external(0x01) + .dwattr DW$41, DW_AT_external(0x01) + .dwattr DW$CU, DW_AT_language(DW_LANG_C) + +;*************************************************************** +;* DWARF CIE ENTRIES * +;*************************************************************** + +DW$CIE .dwcie 1, 34 + .dwcfa 0x0c, 17, 0 + .dwcfa 0x07, 0 + .dwcfa 0x07, 1 + .dwcfa 0x07, 2 + .dwcfa 0x07, 3 + .dwcfa 0x07, 4 + .dwcfa 0x07, 5 + .dwcfa 0x07, 6 + .dwcfa 0x07, 7 + .dwcfa 0x07, 8 + .dwcfa 0x07, 9 + .dwcfa 0x08, 10 + .dwcfa 0x07, 11 + .dwcfa 0x07, 12 + .dwcfa 0x07, 13 + .dwcfa 0x07, 14 + .dwcfa 0x08, 15 + .dwcfa 0x08, 16 + .dwcfa 0x07, 17 + .dwcfa 0x07, 18 + .dwcfa 0x07, 19 + .dwcfa 0x07, 20 + .dwcfa 0x07, 21 + .dwcfa 0x07, 22 + .dwcfa 0x07, 23 + .dwcfa 0x07, 24 + .dwcfa 0x07, 25 + .dwcfa 0x07, 26 + .dwcfa 0x07, 27 + .dwcfa 0x07, 28 + .dwcfa 0x07, 29 + .dwcfa 0x07, 30 + .dwcfa 0x07, 31 + .dwcfa 0x07, 32 + .dwcfa 0x07, 33 + .dwcfa 0x07, 34 + +;*************************************************************** +;* DWARF REGISTER MAP * +;*************************************************************** + +DW$57 .dwtag DW_TAG_assign_register, DW_AT_name("A") + .dwattr DW$57, DW_AT_location[DW_OP_reg0] +DW$58 .dwtag DW_TAG_assign_register, DW_AT_name("AH") + .dwattr DW$58, DW_AT_location[DW_OP_reg1] +DW$59 .dwtag DW_TAG_assign_register, DW_AT_name("AG") + .dwattr DW$59, DW_AT_location[DW_OP_reg2] +DW$60 .dwtag DW_TAG_assign_register, DW_AT_name("") + .dwattr DW$60, DW_AT_location[DW_OP_reg3] +DW$61 .dwtag DW_TAG_assign_register, DW_AT_name("") + .dwattr DW$61, DW_AT_location[DW_OP_reg4] +DW$62 .dwtag DW_TAG_assign_register, DW_AT_name("") + .dwattr DW$62, DW_AT_location[DW_OP_reg5] +DW$63 .dwtag DW_TAG_assign_register, DW_AT_name("B") + .dwattr DW$63, DW_AT_location[DW_OP_reg6] +DW$64 .dwtag DW_TAG_assign_register, DW_AT_name("BH") + .dwattr DW$64, DW_AT_location[DW_OP_reg7] +DW$65 .dwtag DW_TAG_assign_register, DW_AT_name("BG") + .dwattr DW$65, DW_AT_location[DW_OP_reg8] +DW$66 .dwtag DW_TAG_assign_register, DW_AT_name("AR0") + .dwattr DW$66, DW_AT_location[DW_OP_reg9] +DW$67 .dwtag DW_TAG_assign_register, DW_AT_name("AR1") + .dwattr DW$67, DW_AT_location[DW_OP_reg10] +DW$68 .dwtag DW_TAG_assign_register, DW_AT_name("AR2") + .dwattr DW$68, DW_AT_location[DW_OP_reg11] +DW$69 .dwtag DW_TAG_assign_register, DW_AT_name("AR3") + .dwattr DW$69, DW_AT_location[DW_OP_reg12] +DW$70 .dwtag DW_TAG_assign_register, DW_AT_name("AR4") + .dwattr DW$70, DW_AT_location[DW_OP_reg13] +DW$71 .dwtag DW_TAG_assign_register, DW_AT_name("AR5") + .dwattr DW$71, DW_AT_location[DW_OP_reg14] +DW$72 .dwtag DW_TAG_assign_register, DW_AT_name("AR6") + .dwattr DW$72, DW_AT_location[DW_OP_reg15] +DW$73 .dwtag DW_TAG_assign_register, DW_AT_name("AR7") + .dwattr DW$73, DW_AT_location[DW_OP_reg16] +DW$74 .dwtag DW_TAG_assign_register, DW_AT_name("SP") + .dwattr DW$74, DW_AT_location[DW_OP_reg17] +DW$75 .dwtag DW_TAG_assign_register, DW_AT_name("FP") + .dwattr DW$75, DW_AT_location[DW_OP_reg18] +DW$76 .dwtag DW_TAG_assign_register, DW_AT_name("BK") + .dwattr DW$76, DW_AT_location[DW_OP_reg19] +DW$77 .dwtag DW_TAG_assign_register, DW_AT_name("T") + .dwattr DW$77, DW_AT_location[DW_OP_reg20] +DW$78 .dwtag DW_TAG_assign_register, DW_AT_name("ASM") + .dwattr DW$78, DW_AT_location[DW_OP_reg21] +DW$79 .dwtag DW_TAG_assign_register, DW_AT_name("SXM") + .dwattr DW$79, DW_AT_location[DW_OP_reg22] +DW$80 .dwtag DW_TAG_assign_register, DW_AT_name("ST0") + .dwattr DW$80, DW_AT_location[DW_OP_reg23] +DW$81 .dwtag DW_TAG_assign_register, DW_AT_name("ST1") + .dwattr DW$81, DW_AT_location[DW_OP_reg24] +DW$82 .dwtag DW_TAG_assign_register, DW_AT_name("BRC") + .dwattr DW$82, DW_AT_location[DW_OP_reg25] +DW$83 .dwtag DW_TAG_assign_register, DW_AT_name("TC") + .dwattr DW$83, DW_AT_location[DW_OP_reg26] +DW$84 .dwtag DW_TAG_assign_register, DW_AT_name("PC") + .dwattr DW$84, DW_AT_location[DW_OP_reg27] +DW$85 .dwtag DW_TAG_assign_register, DW_AT_name("DB") + .dwattr DW$85, DW_AT_location[DW_OP_reg28] +DW$86 .dwtag DW_TAG_assign_register, DW_AT_name("PMST") + .dwattr DW$86, DW_AT_location[DW_OP_reg29] +DW$87 .dwtag DW_TAG_assign_register, DW_AT_name("RSA") + .dwattr DW$87, DW_AT_location[DW_OP_reg30] +DW$88 .dwtag DW_TAG_assign_register, DW_AT_name("REA") + .dwattr DW$88, DW_AT_location[DW_OP_reg31] +DW$89 .dwtag DW_TAG_assign_register, DW_AT_name("OVM") + .dwattr DW$89, DW_AT_location[DW_OP_regx 0x20] +DW$90 .dwtag DW_TAG_assign_register, DW_AT_name("FRCT") + .dwattr DW$90, DW_AT_location[DW_OP_regx 0x21] +DW$91 .dwtag DW_TAG_assign_register, DW_AT_name("CIE_RETA") + .dwattr DW$91, DW_AT_location[DW_OP_regx 0x22] + .dwendtag DW$CU + diff --git a/c5416_test/timer1/timer.c b/c5416_test/timer1/timer.c new file mode 100644 index 0000000..3203d76 --- /dev/null +++ b/c5416_test/timer1/timer.c @@ -0,0 +1,136 @@ +/* + * Copyright 2002 by Texas Instruments Incorporated. + * All rights reserved. Property of Texas Instruments Incorporated. + * Restricted rights to use, duplicate or disclose this code are + * granted through contract. + * + */ +/* "@(#) DSP/BIOS 4.80.188 12-06-02 (bios,dsk5416-a11)" */ +/******************************************************************************\ +* Copyright (C) 2000 Texas Instruments Incorporated. +* All Rights Reserved +*------------------------------------------------------------------------------ +* FILENAME...... timer.c +* DATE CREATED.. 01/11/2000 +* LAST MODIFIED. 12/29/2000 +\******************************************************************************/ +#include + +#include +#include +#include +#include "uart.h" + +/*----------------------------------------------------------------------------*/ +/* In this exmaple, we are simply setting the timer to interrupt */ +/* every 0x800 clock cycles. All timer setup will be done in a */ +/* TASK function that executes after exit from "main" */ + + +/* Create a timer control structure */ +TIMER_Config myTConfig = { + TIMER_TCR_RMK( + TIMER_TCR_SOFT_WAITZERO, + TIMER_TCR_FREE_NOSOFT, + TIMER_TCR_TRB_RESET, + TIMER_TCR_TSS_START, + TIMER_TCR_TDDR_OF(0) + ), /* TCR0 */ + 0x0800u /* PRD0 */ +}; + +/* Global declarations */ +TIMER_Handle mhTimer; +volatile Uint16 timer_int_cnt = 0; +interrupt void timerIsr(void); +void taskFunc(void); + +/*----------------------------------------------------------------------------*/ +void main() { + + uart_puts("C5416 Timer Test Start...\n"); + + /* Initialize CSL library, this step is required */ + CSL_init(); + /* Call example task/function */ + taskFunc(); + while(1); +} + +/*----------------------------------------------------------------------------*/ +void taskFunc(void) { + + Uint16 eventId; + int old_intm; + Uint16 err = 0; + + //printf("\n"); + uart_puts("\n"); + + /* Temporarily disable all maskable interrupts, preserving */ + /* previous state of INTM */ + old_intm = IRQ_globalDisable(); + + /* Open Timer 0, this returns a pointer to a Timer Handle */ + /* that will be used as an argument to other CSL functions */ + mhTimer = TIMER_open(TIMER_DEV0, TIMER_OPEN_RESET); + + /* Write configuration structure values to Timer control */ + /* registers. */ + TIMER_config(mhTimer, &myTConfig); + + /* Get Event ID associated with Timer interrupt */ + eventId = TIMER_getEventId(mhTimer); + + /* Clear any pending Timer interrupts */ + IRQ_clear(eventId); + + /* Place interrupt service routine address at associated vector */ + IRQ_plug(eventId,timerIsr); + + /* Enable Timer interrupt */ + IRQ_enable(eventId); + + /* Enable all maskable interrupts */ + IRQ_globalEnable(); + + /* Start Timer */ + TIMER_start(mhTimer); + + /* wait for 20 timer periods */ + while(timer_int_cnt < 20); + + /* We are through with the Timer, so close it */ + TIMER_close(mhTimer); + + /* Restore old value of INTM */ + IRQ_globalRestore(old_intm); + + if (timer_int_cnt < 20) + ++err; + + //printf("%s\n",err?"TEST FAILED":"TEST PASSED"); + //printf("\n"); + if (err) + uart_puts("TEST FAILED\n"); + else + uart_puts("TEST PASSED\n"); + + uart_puts("\n"); +} + +/*----------------------------------------------------------------------------*/ + +/* Timer ISR - will be called by DSP/BIOS dispatcher */ +interrupt void timerIsr(void) { + TIMER_stop(mhTimer); + timer_int_cnt = timer_int_cnt + 1; + if (timer_int_cnt < 20) { + TIMER_start(mhTimer); + } + + uart_puts("Entry Timer Isr function...\n"); +} + + + diff --git a/c5416_test/timer1/timer.cmd b/c5416_test/timer1/timer.cmd new file mode 100644 index 0000000..4523c2e --- /dev/null +++ b/c5416_test/timer1/timer.cmd @@ -0,0 +1,60 @@ +/*****************************************************************************/ +/* */ +/* LNK.CMD - V2.00 COMMAND FILE FOR LINKING C PROGRAMS */ +/* */ +/* Usage: lnk500 -o -m lnk.cmd */ +/* cl500 -z -o -m lnk.cmd */ +/* */ +/* Description: This file is a sample command file that can be used */ +/* for linking programs built with the C54x C Compiler. */ +/* This file has been designed to work for */ +/* 548 C54x device. */ +/* Use it as a guideline; you may want to make alterations */ +/* appropriate for the memory layout of the target */ +/* system and/or your application. */ +/* */ +/* Notes: (1) You must specify the directory in which rts.lib is */ +/* located. Either add a "-i" line to this */ +/* file, or use the system environment variable C_DIR to */ +/* specify a search path for the libraries. */ +/* */ +/* (2) If the run-time library you are using is not */ +/* named rts.lib, be sure to use the correct name here. */ +/*****************************************************************************/ + + +MEMORY { + PAGE 0: /* program memory */ + + PROG_RAM (RWX) : origin = 0x1400, length = 0x2C00 + PROG_EXT (RWX) : origin = 0x8000, length = 0x4000 + + /* boot interrupt vector table location */ + VECTORS (RWX): origin = 0xFF80, length = 0x80 + + + PAGE 1: + + DATA_RAM (RW): origin = 0x4000, length = 0x2C00 + DATA_EXT (RW): origin = 0x8000, length = 0x7FFF + + + +} /* MEMORY */ + + +SECTIONS { + .text > PROG_RAM | PROG_EXT PAGE 0 /* code */ + .switch > PROG_RAM PAGE 0 /* switch table info */ + .cinit > PROG_RAM PAGE 0 + + .vectors > VECTORS PAGE 0 /* interrupt vectors */ + + .cio > DATA_RAM PAGE 1 /* C I/O */ + .data > DATA_RAM | DATA_EXT PAGE 1 /* initialized data */ + .bss > DATA_RAM | DATA_EXT PAGE 1 /* global & static variables */ + .const > DATA_RAM PAGE 1 /* constant data */ + .sysmem > DATA_RAM | DATA_EXT PAGE 1 /* heap */ + .stack > DATA_RAM | DATA_EXT PAGE 1 /* stack */ + .csldata > DATA_RAM PAGE 1 +} /* SECTIONS */ diff --git a/c5416_test/timer1/timer.c~ b/c5416_test/timer1/timer.c~ new file mode 100644 index 0000000..6e47679 --- /dev/null +++ b/c5416_test/timer1/timer.c~ @@ -0,0 +1,135 @@ +/* + * Copyright 2002 by Texas Instruments Incorporated. + * All rights reserved. Property of Texas Instruments Incorporated. + * Restricted rights to use, duplicate or disclose this code are + * granted through contract. + * + */ +/* "@(#) DSP/BIOS 4.80.188 12-06-02 (bios,dsk5416-a11)" */ +/******************************************************************************\ +* Copyright (C) 2000 Texas Instruments Incorporated. +* All Rights Reserved +*------------------------------------------------------------------------------ +* FILENAME...... timer.c +* DATE CREATED.. 01/11/2000 +* LAST MODIFIED. 12/29/2000 +\******************************************************************************/ +#include + +#include +#include +#include +#include "uart.h" + +/*----------------------------------------------------------------------------*/ +/* In this exmaple, we are simply setting the timer to interrupt */ +/* every 0x800 clock cycles. All timer setup will be done in a */ +/* TASK function that executes after exit from "main" */ + + +/* Create a timer control structure */ +TIMER_Config myTConfig = { + TIMER_TCR_RMK( + TIMER_TCR_SOFT_WAITZERO, + TIMER_TCR_FREE_NOSOFT, + TIMER_TCR_TRB_RESET, + TIMER_TCR_TSS_START, + TIMER_TCR_TDDR_OF(0) + ), /* TCR0 */ + 0x0800u /* PRD0 */ +}; + +/* Global declarations */ +TIMER_Handle mhTimer; +volatile Uint16 timer_int_cnt = 0; +interrupt void timerIsr(void); +void taskFunc(void); + +/*----------------------------------------------------------------------------*/ +void main() { + + uart_puts("C5416 Timer Test Start...\n"); + + /* Initialize CSL library, this step is required */ + CSL_init(); + /* Call example task/function */ + taskFunc(); +} + +/*----------------------------------------------------------------------------*/ +void taskFunc(void) { + + Uint16 eventId; + int old_intm; + Uint16 err = 0; + + //printf("\n"); + uart_puts("\n"); + + /* Temporarily disable all maskable interrupts, preserving */ + /* previous state of INTM */ + old_intm = IRQ_globalDisable(); + + /* Open Timer 0, this returns a pointer to a Timer Handle */ + /* that will be used as an argument to other CSL functions */ + mhTimer = TIMER_open(TIMER_DEV0, TIMER_OPEN_RESET); + + /* Write configuration structure values to Timer control */ + /* registers. */ + TIMER_config(mhTimer, &myTConfig); + + /* Get Event ID associated with Timer interrupt */ + eventId = TIMER_getEventId(mhTimer); + + /* Clear any pending Timer interrupts */ + IRQ_clear(eventId); + + /* Place interrupt service routine address at associated vector */ + IRQ_plug(eventId,timerIsr); + + /* Enable Timer interrupt */ + IRQ_enable(eventId); + + /* Enable all maskable interrupts */ + IRQ_globalEnable(); + + /* Start Timer */ + TIMER_start(mhTimer); + + /* wait for 20 timer periods */ + while(timer_int_cnt < 20); + + /* We are through with the Timer, so close it */ + TIMER_close(mhTimer); + + /* Restore old value of INTM */ + IRQ_globalRestore(old_intm); + + if (timer_int_cnt < 20) + ++err; + + //printf("%s\n",err?"TEST FAILED":"TEST PASSED"); + //printf("\n"); + if (err) + uart_puts("TEST FAILED\n"); + else + uart_puts("TEST PASSED\n"); + + uart_puts("\n"); +} + +/*----------------------------------------------------------------------------*/ + +/* Timer ISR - will be called by DSP/BIOS dispatcher */ +interrupt void timerIsr(void) { + TIMER_stop(mhTimer); + timer_int_cnt = timer_int_cnt + 1; + if (timer_int_cnt < 20) { + TIMER_start(mhTimer); + } + + uart_puts("Entry Timer Isr function...\n"); +} + + + diff --git a/c5416_test/timer1/timer.paf2 b/c5416_test/timer1/timer.paf2 new file mode 100644 index 0000000..a85a31f Binary files /dev/null and b/c5416_test/timer1/timer.paf2 differ diff --git a/c5416_test/timer1/timer.pjt b/c5416_test/timer1/timer.pjt new file mode 100644 index 0000000..4645af1 --- /dev/null +++ b/c5416_test/timer1/timer.pjt @@ -0,0 +1,27 @@ +; Code Composer Project File, Version 2.0 (do not modify or remove this line) + +[Project Settings] +ProjectName="timer" +ProjectDir="D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\" +ProjectType=Executable +CPUFamily=TMS320C54XX +Tool="Compiler" +Tool="CustomBuilder" +Tool="DspBiosBuilder" +Tool="Linker" +Config="Debug" + +[Source Files] +Source="timer.c" +Source="uart.c" +Source="timer.cmd" + +["Compiler" Settings: "Debug"] +Options=-g -k -q -fr".\Debug" -d"_DEBUG" -d"CHIP_5416" -mf -v548 + +["DspBiosBuilder" Settings: "Debug"] +Options=-v54 + +["Linker" Settings: "Debug"] +Options=-q -c -m".\Debug\timer.out" -o".\Debug\timer.out" -x -l"csl5416x.lib" -l"rts500EXT.lib" + diff --git a/c5416_test/timer1/timer.sbl b/c5416_test/timer1/timer.sbl new file mode 100644 index 0000000..9a37a0a Binary files /dev/null and b/c5416_test/timer1/timer.sbl differ diff --git a/c5416_test/timer1/uart.asm b/c5416_test/timer1/uart.asm new file mode 100644 index 0000000..14efdea --- /dev/null +++ b/c5416_test/timer1/uart.asm @@ -0,0 +1,1762 @@ +;*************************************************************** +;* TMS320C54x C/C++ Codegen PC v4.1.0 * +;* Date/Time created: Mon May 02 17:20:23 2016 * +;*************************************************************** + .compiler_opts --mem_model:code=far --mem_model:data=flat --quiet --silicon_version=548 + .mmregs +FP .set AR7 + .c_mode + +DW$CU .dwtag DW_TAG_compile_unit + .dwattr DW$CU, DW_AT_name("uart.c") + .dwattr DW$CU, DW_AT_producer("TMS320C54x C/C++ Codegen PC v4.1.0 Copyright (c) 1996-2005 Texas Instruments Incorporated") + .dwattr DW$CU, DW_AT_stmt_list(0x00) + .dwattr DW$CU, DW_AT_TI_VERSION(0x01) +;************************************************************** +;* CINIT RECORDS * +;************************************************************** + .sect ".cinit" + .align 1 + .field IR_1,16 + .field _s$2+0,16 + .field 0,16 ; _s$2[0] @ 0 +IR_1: .set 1 + + +DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("putc"), DW_AT_symbol_name("_putc") + .dwattr DW$1, DW_AT_type(*DW$T$10) + .dwattr DW$1, DW_AT_declaration(0x01) + .dwattr DW$1, DW_AT_external(0x01) +DW$2 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) +DW$3 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$30) + .dwendtag DW$1 + +DW$4 .dwtag DW_TAG_variable, DW_AT_name("_ftable"), DW_AT_symbol_name("__ftable") + .dwattr DW$4, DW_AT_type(*DW$T$41) + .dwattr DW$4, DW_AT_declaration(0x01) + .dwattr DW$4, DW_AT_external(0x01) + .bss _str$1,100,0,0 + .bss _s$2,100,0,0 +; D:\CCStudio_v3.3\C5400\cgtools\bin\acp500.exe --keep_unneeded_types -q -D_DEBUG -DCHIP_5416 -ID:/CCStudio_v3.3/C5400/xdais/include -ID:/CCStudio_v3.3/C5400/csl/include -ID:/CCStudio_v3.3/bios_5_31_02/packages/ti/bios/include -ID:/CCStudio_v3.3/bios_5_31_02/packages/ti/rtdx/include/c5400 -ID:/CCStudio_v3.3/C5400/cgtools/include --mem_model:code=far --mem_model:data=flat -m --i_output_file C:\Users\jiachao\AppData\Local\Temp\TI7082 --template_info_file C:\Users\jiachao\AppData\Local\Temp\TI7086 + .sect ".text" + .global _uart_putc + +DW$5 .dwtag DW_TAG_subprogram, DW_AT_name("uart_putc"), DW_AT_symbol_name("_uart_putc") + .dwattr DW$5, DW_AT_low_pc(_uart_putc) + .dwattr DW$5, DW_AT_high_pc(0x00) + .dwattr DW$5, DW_AT_begin_file("uart.c") + .dwattr DW$5, DW_AT_begin_line(0x0c) + .dwattr DW$5, DW_AT_begin_column(0x06) + .dwpsn "uart.c",13,1 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _uart_putc * +;*************************************************************** +_uart_putc: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-3 + NOP + .dwcfa 0x0e, 6 +;* A assigned to _c +DW$6 .dwtag DW_TAG_formal_parameter, DW_AT_name("c"), DW_AT_symbol_name("_c") + .dwattr DW$6, DW_AT_type(*DW$T$22) + .dwattr DW$6, DW_AT_location[DW_OP_reg0] +DW$7 .dwtag DW_TAG_variable, DW_AT_name("c"), DW_AT_symbol_name("_c") + .dwattr DW$7, DW_AT_type(*DW$T$22) + .dwattr DW$7, DW_AT_location[DW_OP_breg17 2] + STL A,*SP(2) + .dwpsn "uart.c",14,3 + .dwpsn "uart.c",15,4 + STM #53248,AR1 + BD L1 ; |15| + NOP + STL A,*AR1 + ; branch occurs ; |15| +L1: + .dwpsn "uart.c",19,1 + FRAME #3 + .dwcfa 0x0e, 3 + POPM AR1 + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET + ; return occurs + .dwattr DW$5, DW_AT_end_file("uart.c") + .dwattr DW$5, DW_AT_end_line(0x13) + .dwattr DW$5, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$5 + + .sect ".text" + .global _uart_puts + +DW$8 .dwtag DW_TAG_subprogram, DW_AT_name("uart_puts"), DW_AT_symbol_name("_uart_puts") + .dwattr DW$8, DW_AT_low_pc(_uart_puts) + .dwattr DW$8, DW_AT_high_pc(0x00) + .dwattr DW$8, DW_AT_begin_file("uart.c") + .dwattr DW$8, DW_AT_begin_line(0x15) + .dwattr DW$8, DW_AT_begin_column(0x06) + .dwpsn "uart.c",22,1 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _uart_puts * +;*************************************************************** +_uart_puts: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-1 + NOP + .dwcfa 0x0e, 4 +;* A assigned to _s +DW$9 .dwtag DW_TAG_formal_parameter, DW_AT_name("s"), DW_AT_symbol_name("_s") + .dwattr DW$9, DW_AT_type(*DW$T$25) + .dwattr DW$9, DW_AT_location[DW_OP_reg0] +DW$10 .dwtag DW_TAG_variable, DW_AT_name("s"), DW_AT_symbol_name("_s") + .dwattr DW$10, DW_AT_type(*DW$T$25) + .dwattr DW$10, DW_AT_location[DW_OP_breg17 0] + STL A,*SP(0) + .dwpsn "uart.c",23,5 + STLM A,AR1 + NOP + NOP + LD *AR1,A ; |23| + BC L3,AEQ ; |23| + ; branchcc occurs ; |23| +L2: +DW$L$_uart_puts$2$B: + .dwpsn "uart.c",25,2 + LD *AR1+,A + MVKD *(AR1),*SP(0) + FCALL #_uart_putc ; |25| + ; call occurs [#_uart_putc] ; |25| + .dwpsn "uart.c",26,5 + MVDK *SP(0),*(AR1) + LD *AR1,A ; |26| + BC L2,ANEQ ; |26| + ; branchcc occurs ; |26| +DW$L$_uart_puts$2$E: + .dwpsn "uart.c",27,5 +L3: + .dwpsn "uart.c",28,1 + FRAME #1 + .dwcfa 0x0e, 3 + POPM AR1 + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET + ; return occurs + +DW$11 .dwtag DW_TAG_loop + .dwattr DW$11, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L2:1:1462180823") + .dwattr DW$11, DW_AT_begin_file("uart.c") + .dwattr DW$11, DW_AT_begin_line(0x17) + .dwattr DW$11, DW_AT_end_line(0x1a) +DW$12 .dwtag DW_TAG_loop_range + .dwattr DW$12, DW_AT_low_pc(DW$L$_uart_puts$2$B) + .dwattr DW$12, DW_AT_high_pc(DW$L$_uart_puts$2$E) + .dwendtag DW$11 + + .dwattr DW$8, DW_AT_end_file("uart.c") + .dwattr DW$8, DW_AT_end_line(0x1c) + .dwattr DW$8, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$8 + + .sect ".text" + .global _my_strlen + +DW$13 .dwtag DW_TAG_subprogram, DW_AT_name("my_strlen"), DW_AT_symbol_name("_my_strlen") + .dwattr DW$13, DW_AT_low_pc(_my_strlen) + .dwattr DW$13, DW_AT_high_pc(0x00) + .dwattr DW$13, DW_AT_begin_file("uart.c") + .dwattr DW$13, DW_AT_begin_line(0x1f) + .dwattr DW$13, DW_AT_begin_column(0x05) + .dwpsn "uart.c",32,1 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _my_strlen * +;*************************************************************** +_my_strlen: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-3 + NOP + .dwcfa 0x0e, 6 +;* A assigned to _str +DW$14 .dwtag DW_TAG_formal_parameter, DW_AT_name("str"), DW_AT_symbol_name("_str") + .dwattr DW$14, DW_AT_type(*DW$T$33) + .dwattr DW$14, DW_AT_location[DW_OP_reg0] +DW$15 .dwtag DW_TAG_variable, DW_AT_name("str"), DW_AT_symbol_name("_str") + .dwattr DW$15, DW_AT_type(*DW$T$33) + .dwattr DW$15, DW_AT_location[DW_OP_breg17 0] +DW$16 .dwtag DW_TAG_variable, DW_AT_name("i"), DW_AT_symbol_name("_i") + .dwattr DW$16, DW_AT_type(*DW$T$10) + .dwattr DW$16, DW_AT_location[DW_OP_breg17 1] + STL A,*SP(0) + .dwpsn "uart.c",34,6 + ST #0,*SP(1) ; |34| + .dwpsn "uart.c",34,13 + LD *SP(1),A + ADD *SP(0),A ; |34| + STLM A,AR1 + NOP + NOP + LD *AR1,A ; |34| + BC L5,AEQ ; |34| + ; branchcc occurs ; |34| +L4: +DW$L$_my_strlen$2$B: + .dwpsn "uart.c",34,29 + ADDM #1,*SP(1) ; |34| + .dwpsn "uart.c",34,13 + LD *SP(1),A + ADD *SP(0),A ; |34| + STLM A,AR1 + NOP + NOP + LD *AR1,A ; |34| + BC L4,ANEQ ; |34| + ; branchcc occurs ; |34| +DW$L$_my_strlen$2$E: +L5: + .dwpsn "uart.c",35,2 + LD *SP(1),A + .dwpsn "uart.c",36,1 + FRAME #3 ; |35| + .dwcfa 0x0e, 3 + POPM AR1 ; |35| + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET ; |35| + ; return occurs ; |35| + +DW$17 .dwtag DW_TAG_loop + .dwattr DW$17, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L4:1:1462180823") + .dwattr DW$17, DW_AT_begin_file("uart.c") + .dwattr DW$17, DW_AT_begin_line(0x22) + .dwattr DW$17, DW_AT_end_line(0x22) +DW$18 .dwtag DW_TAG_loop_range + .dwattr DW$18, DW_AT_low_pc(DW$L$_my_strlen$2$B) + .dwattr DW$18, DW_AT_high_pc(DW$L$_my_strlen$2$E) + .dwendtag DW$17 + + .dwattr DW$13, DW_AT_end_file("uart.c") + .dwattr DW$13, DW_AT_end_line(0x24) + .dwattr DW$13, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$13 + + .sect ".text" + .global _myitoa + +DW$19 .dwtag DW_TAG_subprogram, DW_AT_name("myitoa"), DW_AT_symbol_name("_myitoa") + .dwattr DW$19, DW_AT_low_pc(_myitoa) + .dwattr DW$19, DW_AT_high_pc(0x00) + .dwattr DW$19, DW_AT_begin_file("uart.c") + .dwattr DW$19, DW_AT_begin_line(0x25) + .dwattr DW$19, DW_AT_begin_column(0x07) + .dwpsn "uart.c",38,1 + + .dwfde DW$CIE +DW$20 .dwtag DW_TAG_variable, DW_AT_name("str"), DW_AT_symbol_name("_str$1") + .dwattr DW$20, DW_AT_type(*DW$T$48) + .dwattr DW$20, DW_AT_location[DW_OP_addr _str$1] + +;*************************************************************** +;* FUNCTION DEF: _myitoa * +;*************************************************************** +_myitoa: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-7 + NOP + .dwcfa 0x0e, 10 +;* A assigned to _n +DW$21 .dwtag DW_TAG_formal_parameter, DW_AT_name("n"), DW_AT_symbol_name("_n") + .dwattr DW$21, DW_AT_type(*DW$T$10) + .dwattr DW$21, DW_AT_location[DW_OP_reg0] +DW$22 .dwtag DW_TAG_formal_parameter, DW_AT_name("hex"), DW_AT_symbol_name("_hex") + .dwattr DW$22, DW_AT_type(*DW$T$10) + .dwattr DW$22, DW_AT_location[DW_OP_breg17 10] +DW$23 .dwtag DW_TAG_variable, DW_AT_name("n"), DW_AT_symbol_name("_n") + .dwattr DW$23, DW_AT_type(*DW$T$10) + .dwattr DW$23, DW_AT_location[DW_OP_breg17 2] +DW$24 .dwtag DW_TAG_variable, DW_AT_name("num"), DW_AT_symbol_name("_num") + .dwattr DW$24, DW_AT_type(*DW$T$10) + .dwattr DW$24, DW_AT_location[DW_OP_breg17 3] +DW$25 .dwtag DW_TAG_variable, DW_AT_name("i"), DW_AT_symbol_name("_i") + .dwattr DW$25, DW_AT_type(*DW$T$10) + .dwattr DW$25, DW_AT_location[DW_OP_breg17 4] +DW$26 .dwtag DW_TAG_variable, DW_AT_name("k"), DW_AT_symbol_name("_k") + .dwattr DW$26, DW_AT_type(*DW$T$10) + .dwattr DW$26, DW_AT_location[DW_OP_breg17 5] +DW$27 .dwtag DW_TAG_variable, DW_AT_name("temp"), DW_AT_symbol_name("_temp") + .dwattr DW$27, DW_AT_type(*DW$T$21) + .dwattr DW$27, DW_AT_location[DW_OP_breg17 6] + STL A,*SP(2) + .dwpsn "uart.c",39,14 + ST #0,*SP(4) ; |39| + .dwpsn "uart.c",39,21 + ST #0,*SP(5) ; |39| + .dwpsn "uart.c",42,5 + SSBX SXM + NOP + LD *SP(2),A ; |42| + BC L6,AGEQ ; |42| + ; branchcc occurs ; |42| + .dwpsn "uart.c",44,9 + MVDK *SP(4),*(AR1) + LDM AR1,A + ADD #1,A,A ; |44| + STL A,*SP(4) + ST #45,*AR1(_str$1) ; |44| + .dwpsn "uart.c",45,9 + LD *SP(2),A + NEG A,A ; |45| + STL A,*SP(2) +L6: +DW$L$_myitoa$3$B: + .dwpsn "uart.c",49,7 + LD *SP(2),A + STL A,*SP(3) + .dwpsn "uart.c",50,7 + LD *SP(10),A + STL A,*SP(0) + LD *SP(2),A + FCALL #I$$DIV ; |50| + ; call occurs [#I$$DIV] ; |50| + STL A,*SP(2) + .dwpsn "uart.c",51,7 + LD *SP(10),A + STL A,*SP(0) + LD *SP(3),A + FCALL #I$$MOD ; |51| + ; call occurs [#I$$MOD] ; |51| + SSBX SXM + LD *(AL),A ; |51| + SFTA A,8 ; |51| + SFTA A,-8 ; |51| + SUB #9,A,A ; |51| + BC L7,ALEQ ; |51| + ; branchcc occurs ; |51| +DW$L$_myitoa$3$E: +DW$L$_myitoa$4$B: + .dwpsn "uart.c",52,11 + LD *SP(10),A + STL A,*SP(0) + LD *SP(3),A + FCALL #I$$MOD ; |52| + ; call occurs [#I$$MOD] ; |52| + ADD #87,A,A ; |52| + LD *SP(5),B + STLM A,AR1 + ADD #1,B,A ; |52| + STL A,*SP(5) + ADD *SP(4),B + STLM B,AR2 + LDM AR1,A + BD L8 ; |52| + STL A,*AR2(_str$1) + ; branch occurs ; |52| +DW$L$_myitoa$4$E: +L7: +DW$L$_myitoa$5$B: + .dwpsn "uart.c",54,11 + LD *SP(10),A + STL A,*SP(0) + LD *SP(3),A + FCALL #I$$MOD ; |54| + ; call occurs [#I$$MOD] ; |54| + ADD #48,A,A ; |54| + LD *SP(5),B + STLM A,AR1 + ADD #1,B,A ; |54| + STL A,*SP(5) + ADD *SP(4),B + STLM B,AR2 + NOP + LDM AR1,A + STL A,*AR2(_str$1) +DW$L$_myitoa$5$E: +L8: +DW$L$_myitoa$6$B: + .dwpsn "uart.c",55,5 + LD *SP(2),A ; |55| + BC L6,ANEQ ; |55| + ; branchcc occurs ; |55| +DW$L$_myitoa$6$E: + .dwpsn "uart.c",56,5 + LD *SP(5),A + ADD *SP(4),A ; |56| + STLM A,AR1 + NOP + NOP + ST #0,*AR1(_str$1) ; |56| + .dwpsn "uart.c",58,5 + FCALLD #_my_strlen ; |58| + LD #_str$1,A + ; call occurs [#_my_strlen] ; |58| + SUB #1,A,A ; |58| + STL A,*SP(5) + .dwpsn "uart.c",60,10 + SSBX SXM + NOP + LD *SP(5),A ; |60| + SFTA A,8 ; |60| + SFTA A,-8 ; |60| + SUB *SP(4),A ; |60| + BC L10,ALEQ ; |60| + ; branchcc occurs ; |60| +L9: +DW$L$_myitoa$8$B: + .dwpsn "uart.c",62,9 + MVDK *SP(4),*(AR1) + LD *AR1(_str$1),A + STL A,*SP(6) + .dwpsn "uart.c",63,9 + MVDK *SP(5),*(AR1) + LD *AR1(_str$1),A + MVDK *SP(4),*(AR1) + STL A,*AR1(_str$1) + .dwpsn "uart.c",64,9 + MVDK *SP(5),*(AR1) + LD *SP(6),A + STL A,*AR1(_str$1) + .dwpsn "uart.c",60,17 + ADDM #1,*SP(4) ; |60| + ADDM #-1,*SP(5) ; |60| + .dwpsn "uart.c",60,10 + LD *SP(5),A ; |60| + SFTA A,8 ; |60| + SFTA A,-8 ; |60| + SUB *SP(4),A ; |60| + BC L9,AGT ; |60| + ; branchcc occurs ; |60| +DW$L$_myitoa$8$E: +L10: + .dwpsn "uart.c",66,5 + LD #_str$1,A + .dwpsn "uart.c",67,1 + FRAME #7 ; |66| + .dwcfa 0x0e, 3 + POPM AR1 ; |66| + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET ; |66| + ; return occurs ; |66| + +DW$28 .dwtag DW_TAG_loop + .dwattr DW$28, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L9:1:1462180823") + .dwattr DW$28, DW_AT_begin_file("uart.c") + .dwattr DW$28, DW_AT_begin_line(0x3c) + .dwattr DW$28, DW_AT_end_line(0x41) +DW$29 .dwtag DW_TAG_loop_range + .dwattr DW$29, DW_AT_low_pc(DW$L$_myitoa$8$B) + .dwattr DW$29, DW_AT_high_pc(DW$L$_myitoa$8$E) + .dwendtag DW$28 + + +DW$30 .dwtag DW_TAG_loop + .dwattr DW$30, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L6:1:1462180823") + .dwattr DW$30, DW_AT_begin_file("uart.c") + .dwattr DW$30, DW_AT_begin_line(0x2f) + .dwattr DW$30, DW_AT_end_line(0x37) +DW$31 .dwtag DW_TAG_loop_range + .dwattr DW$31, DW_AT_low_pc(DW$L$_myitoa$3$B) + .dwattr DW$31, DW_AT_high_pc(DW$L$_myitoa$3$E) +DW$32 .dwtag DW_TAG_loop_range + .dwattr DW$32, DW_AT_low_pc(DW$L$_myitoa$4$B) + .dwattr DW$32, DW_AT_high_pc(DW$L$_myitoa$4$E) +DW$33 .dwtag DW_TAG_loop_range + .dwattr DW$33, DW_AT_low_pc(DW$L$_myitoa$5$B) + .dwattr DW$33, DW_AT_high_pc(DW$L$_myitoa$5$E) +DW$34 .dwtag DW_TAG_loop_range + .dwattr DW$34, DW_AT_low_pc(DW$L$_myitoa$6$B) + .dwattr DW$34, DW_AT_high_pc(DW$L$_myitoa$6$E) + .dwendtag DW$30 + + .dwattr DW$19, DW_AT_end_file("uart.c") + .dwattr DW$19, DW_AT_end_line(0x43) + .dwattr DW$19, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$19 + + .sect ".text" + .global _square + +DW$35 .dwtag DW_TAG_subprogram, DW_AT_name("square"), DW_AT_symbol_name("_square") + .dwattr DW$35, DW_AT_low_pc(_square) + .dwattr DW$35, DW_AT_high_pc(0x00) + .dwattr DW$35, DW_AT_begin_file("uart.c") + .dwattr DW$35, DW_AT_begin_line(0x44) + .dwattr DW$35, DW_AT_begin_column(0x0a) + .dwpsn "uart.c",68,44 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _square * +;*************************************************************** +_square: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-3 + NOP + .dwcfa 0x0e, 6 +;* A assigned to _val +DW$36 .dwtag DW_TAG_formal_parameter, DW_AT_name("val"), DW_AT_symbol_name("_val") + .dwattr DW$36, DW_AT_type(*DW$T$11) + .dwattr DW$36, DW_AT_location[DW_OP_reg0] +DW$37 .dwtag DW_TAG_formal_parameter, DW_AT_name("num"), DW_AT_symbol_name("_num") + .dwattr DW$37, DW_AT_type(*DW$T$11) + .dwattr DW$37, DW_AT_location[DW_OP_breg17 6] +DW$38 .dwtag DW_TAG_variable, DW_AT_name("val"), DW_AT_symbol_name("_val") + .dwattr DW$38, DW_AT_type(*DW$T$11) + .dwattr DW$38, DW_AT_location[DW_OP_breg17 0] +DW$39 .dwtag DW_TAG_variable, DW_AT_name("i"), DW_AT_symbol_name("_i") + .dwattr DW$39, DW_AT_type(*DW$T$10) + .dwattr DW$39, DW_AT_location[DW_OP_breg17 1] +DW$40 .dwtag DW_TAG_variable, DW_AT_name("ret"), DW_AT_symbol_name("_ret") + .dwattr DW$40, DW_AT_type(*DW$T$11) + .dwattr DW$40, DW_AT_location[DW_OP_breg17 2] + STL A,*SP(0) + .dwpsn "uart.c",70,11 + STL A,*SP(2) + .dwpsn "uart.c",71,6 + ST #0,*SP(1) ; |71| + .dwpsn "uart.c",71,13 + MVDK *SP(6),*(AR0) + MVDK *SP(1),*(AR1) + MAR *AR0- + CMPR 1,AR1 ; |71| + BC L12,NTC ; |71| + ; branchcc occurs ; |71| +L11: +DW$L$_square$2$B: + .dwpsn "uart.c",72,3 + LD *SP(0),T + NOP + MPY *SP(2),A ; |72| + STL A,*SP(2) + .dwpsn "uart.c",71,26 + ADDM #1,*SP(1) ; |71| + .dwpsn "uart.c",71,13 + MVDK *SP(6),*(AR0) + MVDK *SP(1),*(AR1) + MAR *AR0- + CMPR 1,AR1 ; |71| + BC L11,TC ; |71| + ; branchcc occurs ; |71| +DW$L$_square$2$E: +L12: + .dwpsn "uart.c",74,2 + LD *SP(2),A + .dwpsn "uart.c",75,1 + FRAME #3 ; |74| + .dwcfa 0x0e, 3 + POPM AR1 ; |74| + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET ; |74| + ; return occurs ; |74| + +DW$41 .dwtag DW_TAG_loop + .dwattr DW$41, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L11:1:1462180823") + .dwattr DW$41, DW_AT_begin_file("uart.c") + .dwattr DW$41, DW_AT_begin_line(0x47) + .dwattr DW$41, DW_AT_end_line(0x49) +DW$42 .dwtag DW_TAG_loop_range + .dwattr DW$42, DW_AT_low_pc(DW$L$_square$2$B) + .dwattr DW$42, DW_AT_high_pc(DW$L$_square$2$E) + .dwendtag DW$41 + + .dwattr DW$35, DW_AT_end_file("uart.c") + .dwattr DW$35, DW_AT_end_line(0x4b) + .dwattr DW$35, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$35 + + .sect ".text" + .global _ftoa + +DW$43 .dwtag DW_TAG_subprogram, DW_AT_name("ftoa"), DW_AT_symbol_name("_ftoa") + .dwattr DW$43, DW_AT_low_pc(_ftoa) + .dwattr DW$43, DW_AT_high_pc(0x00) + .dwattr DW$43, DW_AT_begin_file("uart.c") + .dwattr DW$43, DW_AT_begin_line(0x4c) + .dwattr DW$43, DW_AT_begin_column(0x08) + .dwpsn "uart.c",77,1 + + .dwfde DW$CIE +DW$44 .dwtag DW_TAG_variable, DW_AT_name("s"), DW_AT_symbol_name("_s$2") + .dwattr DW$44, DW_AT_type(*DW$T$48) + .dwattr DW$44, DW_AT_location[DW_OP_addr _s$2] + +;*************************************************************** +;* FUNCTION DEF: _ftoa * +;*************************************************************** +_ftoa: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-21 + NOP + .dwcfa 0x0e, 24 +;* A assigned to _val +DW$45 .dwtag DW_TAG_formal_parameter, DW_AT_name("val"), DW_AT_symbol_name("_val") + .dwattr DW$45, DW_AT_type(*DW$T$17) + .dwattr DW$45, DW_AT_location[DW_OP_reg0] +DW$46 .dwtag DW_TAG_formal_parameter, DW_AT_name("prec"), DW_AT_symbol_name("_prec") + .dwattr DW$46, DW_AT_type(*DW$T$10) + .dwattr DW$46, DW_AT_location[DW_OP_breg17 24] +DW$47 .dwtag DW_TAG_variable, DW_AT_name("val"), DW_AT_symbol_name("_val") + .dwattr DW$47, DW_AT_type(*DW$T$17) + .dwattr DW$47, DW_AT_location[DW_OP_breg17 2] +DW$48 .dwtag DW_TAG_variable, DW_AT_name("sig"), DW_AT_symbol_name("_sig") + .dwattr DW$48, DW_AT_type(*DW$T$10) + .dwattr DW$48, DW_AT_location[DW_OP_breg17 4] +DW$49 .dwtag DW_TAG_variable, DW_AT_name("index"), DW_AT_symbol_name("_index") + .dwattr DW$49, DW_AT_type(*DW$T$10) + .dwattr DW$49, DW_AT_location[DW_OP_breg17 5] +DW$50 .dwtag DW_TAG_variable, DW_AT_name("p"), DW_AT_symbol_name("_p") + .dwattr DW$50, DW_AT_type(*DW$T$10) + .dwattr DW$50, DW_AT_location[DW_OP_breg17 6] +DW$51 .dwtag DW_TAG_variable, DW_AT_name("i"), DW_AT_symbol_name("_i") + .dwattr DW$51, DW_AT_type(*DW$T$10) + .dwattr DW$51, DW_AT_location[DW_OP_breg17 7] +DW$52 .dwtag DW_TAG_variable, DW_AT_name("j"), DW_AT_symbol_name("_j") + .dwattr DW$52, DW_AT_type(*DW$T$10) + .dwattr DW$52, DW_AT_location[DW_OP_breg17 8] +DW$53 .dwtag DW_TAG_variable, DW_AT_name("temp_ch"), DW_AT_symbol_name("_temp_ch") + .dwattr DW$53, DW_AT_type(*DW$T$21) + .dwattr DW$53, DW_AT_location[DW_OP_breg17 9] +DW$54 .dwtag DW_TAG_variable, DW_AT_name("val_long"), DW_AT_symbol_name("_val_long") + .dwattr DW$54, DW_AT_type(*DW$T$12) + .dwattr DW$54, DW_AT_location[DW_OP_breg17 10] +DW$55 .dwtag DW_TAG_variable, DW_AT_name("num"), DW_AT_symbol_name("_num") + .dwattr DW$55, DW_AT_type(*DW$T$12) + .dwattr DW$55, DW_AT_location[DW_OP_breg17 12] +DW$56 .dwtag DW_TAG_variable, DW_AT_name("val_temp"), DW_AT_symbol_name("_val_temp") + .dwattr DW$56, DW_AT_type(*DW$T$17) + .dwattr DW$56, DW_AT_location[DW_OP_breg17 14] +DW$57 .dwtag DW_TAG_variable, DW_AT_name("v"), DW_AT_symbol_name("_v") + .dwattr DW$57, DW_AT_type(*DW$T$16) + .dwattr DW$57, DW_AT_location[DW_OP_breg17 16] +DW$58 .dwtag DW_TAG_variable, DW_AT_name("val_float"), DW_AT_symbol_name("_val_float") + .dwattr DW$58, DW_AT_type(*DW$T$12) + .dwattr DW$58, DW_AT_location[DW_OP_breg17 18] + DST A,*SP(2) ; |77| + .dwpsn "uart.c",78,6 + ST #0,*SP(4) ; |78| + .dwpsn "uart.c",78,15 + ST #0,*SP(5) ; |78| + .dwpsn "uart.c",85,2 + DLD *(FL1),A ; |85| + DST A,*SP(0) ; |85| + DLD *SP(2),A ; |85| + FCALL #F$$COMPARE ; |85| + ; call occurs [#F$$COMPARE] ; |85| + SSBX SXM + LD *(AL),A ; |85| + BC L13,AGEQ ; |85| + ; branchcc occurs ; |85| + .dwpsn "uart.c",86,3 + MVDK *SP(5),*(AR1) + LDM AR1,A + ADD #1,A,A ; |86| + STL A,*SP(5) + ST #45,*AR1(_s$2) ; |86| + .dwpsn "uart.c",87,3 + DLD *SP(2),A ; |87| + FCALL #F$$FTOL ; |87| + ; call occurs [#F$$FTOL] ; |87| + NEG A,A ; |87| + DST A,*SP(10) ; |87| + .dwpsn "uart.c",88,3 + DLD *(FL2),A ; |88| + DST A,*SP(0) ; |88| + DLD *SP(2),A ; |88| + FCALL #F$$MUL ; |88| + ; call occurs [#F$$MUL] ; |88| + DST A,*SP(14) ; |88| + .dwpsn "uart.c",89,3 + ST #1,*SP(6) ; |89| + .dwpsn "uart.c",90,2 + B L14 ; |90| + ; branch occurs ; |90| +L13: + .dwpsn "uart.c",91,3 + DLD *SP(2),A ; |91| + FCALL #F$$FTOL ; |91| + ; call occurs [#F$$FTOL] ; |91| + DST A,*SP(10) ; |91| + .dwpsn "uart.c",92,3 + DLD *SP(2),A ; |92| + DST A,*SP(14) ; |92| + .dwpsn "uart.c",93,3 + ST #0,*SP(6) ; |93| +L14: +DW$L$_ftoa$4$B: + .dwpsn "uart.c",98,10 + DLD *SP(10),A ; |98| + DST A,*SP(12) ; |98| + .dwpsn "uart.c",99,10 + LD #10,A + DST A,*SP(0) ; |99| + DLD *SP(10),A ; |99| + FCALL #L$$DIVS ; |99| + ; call occurs [#L$$DIVS] ; |99| + DST A,*SP(10) ; |99| + .dwpsn "uart.c",100,10 + LD #10,A + DST A,*SP(0) ; |100| + DLD *SP(12),A ; |100| + FCALL #L$$MODS ; |100| + ; call occurs [#L$$MODS] ; |100| + MVDK *SP(5),*(AR1) + ADD #48,A,B ; |100| + LDM AR1,A + ADD #1,A,A ; |100| + STL A,*SP(5) + STL B,*AR1(_s$2) ; |100| + .dwpsn "uart.c",101,6 + DLD *SP(10),A ; |101| + BC L14,ANEQ ; |101| + ; branchcc occurs ; |101| +DW$L$_ftoa$4$E: + .dwpsn "uart.c",102,6 + LD *SP(6),A + STL A,*SP(7) + LD *SP(5),A + SUB #1,A + STL A,*SP(8) + .dwpsn "uart.c",102,28 + SSBX SXM + NOP + LD *SP(8),A ; |102| + SFTA A,8 ; |102| + SFTA A,-8 ; |102| + SUB *SP(7),A ; |102| + BC L16,ALEQ ; |102| + ; branchcc occurs ; |102| +L15: +DW$L$_ftoa$6$B: + .dwpsn "uart.c",103,3 + MVDK *SP(7),*(AR1) + LD *AR1(_s$2),A + STL A,*SP(9) + .dwpsn "uart.c",104,3 + MVDK *SP(8),*(AR1) + LD *AR1(_s$2),A + MVDK *SP(7),*(AR1) + STL A,*AR1(_s$2) + .dwpsn "uart.c",105,3 + MVDK *SP(8),*(AR1) + LD *SP(9),A + STL A,*AR1(_s$2) + .dwpsn "uart.c",102,35 + ADDM #1,*SP(7) ; |102| + ADDM #-1,*SP(8) ; |102| + .dwpsn "uart.c",102,28 + LD *SP(8),A ; |102| + SFTA A,8 ; |102| + SFTA A,-8 ; |102| + SUB *SP(7),A ; |102| + BC L15,AGT ; |102| + ; branchcc occurs ; |102| +DW$L$_ftoa$6$E: +L16: + .dwpsn "uart.c",107,2 + MVDK *SP(5),*(AR1) + LDM AR1,A + ADD #1,A,A ; |107| + STL A,*SP(5) + ST #46,*AR1(_s$2) ; |107| + .dwpsn "uart.c",108,2 + LD *SP(5),A + STL A,*SP(6) + .dwpsn "uart.c",109,2 + DLD *SP(14),A ; |109| + FCALL #F$$FTOL ; |109| + ; call occurs [#F$$FTOL] ; |109| + FCALL #F$$LTOF ; |109| + ; call occurs [#F$$LTOF] ; |109| + DST A,*SP(0) ; |109| + DLD *SP(14),A ; |109| + FCALL #F$$SUB ; |109| + ; call occurs [#F$$SUB] ; |109| + LD A,B ; |109| + LD *SP(24),A + STL A,*SP(0) + FCALLD #_square ; |109| + NOP + LD #10,A + ; call occurs [#_square] ; |109| + FCALL #F$$UTOF ; |109| + ; call occurs [#F$$UTOF] ; |109| + DST A,*SP(0) ; |109| + FCALLD #F$$MUL ; |109| + NOP + LD B,A ; |109| + ; call occurs [#F$$MUL] ; |109| + DST A,*SP(16) ; |109| + .dwpsn "uart.c",110,2 + FCALL #F$$FTOL ; |110| + ; call occurs [#F$$FTOL] ; |110| + DST A,*SP(18) ; |110| + .dwpsn "uart.c",111,6 + ST #0,*SP(7) ; |111| + .dwpsn "uart.c",111,13 + SSBX SXM + NOP + LD *SP(24),A ; |111| + SFTA A,8 ; |111| + SFTA A,-8 ; |111| + SUB *SP(7),A ; |111| + BC L18,ALEQ ; |111| + ; branchcc occurs ; |111| +L17: +DW$L$_ftoa$8$B: + .dwpsn "uart.c",112,3 + DLD *SP(18),A ; |112| + DST A,*SP(12) ; |112| + .dwpsn "uart.c",113,3 + LD #10,A + DST A,*SP(0) ; |113| + DLD *SP(18),A ; |113| + FCALL #L$$DIVS ; |113| + ; call occurs [#L$$DIVS] ; |113| + DST A,*SP(18) ; |113| + .dwpsn "uart.c",114,10 + LD #10,A + DST A,*SP(0) ; |114| + DLD *SP(12),A ; |114| + FCALL #L$$MODS ; |114| + ; call occurs [#L$$MODS] ; |114| + MVDK *SP(5),*(AR1) + ADD #48,A,B ; |114| + LDM AR1,A + ADD #1,A,A ; |114| + STL A,*SP(5) + STL B,*AR1(_s$2) ; |114| + .dwpsn "uart.c",111,23 + ADDM #1,*SP(7) ; |111| + .dwpsn "uart.c",111,13 + SSBX SXM + NOP + LD *SP(24),A ; |111| + SFTA A,8 ; |111| + SFTA A,-8 ; |111| + SUB *SP(7),A ; |111| + BC L17,AGT ; |111| + ; branchcc occurs ; |111| +DW$L$_ftoa$8$E: +L18: + .dwpsn "uart.c",116,6 + LD *SP(6),A + STL A,*SP(7) + LD *SP(5),A + SUB #1,A + STL A,*SP(8) + .dwpsn "uart.c",116,28 + LD *SP(8),A ; |116| + SFTA A,8 ; |116| + SFTA A,-8 ; |116| + SUB *SP(7),A ; |116| + BC L20,ALEQ ; |116| + ; branchcc occurs ; |116| +L19: +DW$L$_ftoa$10$B: + .dwpsn "uart.c",117,3 + MVDK *SP(7),*(AR1) + LD *AR1(_s$2),A + STL A,*SP(9) + .dwpsn "uart.c",118,3 + MVDK *SP(8),*(AR1) + LD *AR1(_s$2),A + MVDK *SP(7),*(AR1) + STL A,*AR1(_s$2) + .dwpsn "uart.c",119,3 + MVDK *SP(8),*(AR1) + LD *SP(9),A + STL A,*AR1(_s$2) + .dwpsn "uart.c",116,35 + ADDM #1,*SP(7) ; |116| + ADDM #-1,*SP(8) ; |116| + .dwpsn "uart.c",116,28 + LD *SP(8),A ; |116| + SFTA A,8 ; |116| + SFTA A,-8 ; |116| + SUB *SP(7),A ; |116| + BC L19,AGT ; |116| + ; branchcc occurs ; |116| +DW$L$_ftoa$10$E: +L20: + .dwpsn "uart.c",121,2 + MVDK *SP(5),*(AR1) + ST #0,*AR1(_s$2) ; |121| + .dwpsn "uart.c",122,2 + LD #_s$2,A + .dwpsn "uart.c",123,1 + FRAME #21 ; |122| + .dwcfa 0x0e, 3 + POPM AR1 ; |122| + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET ; |122| + ; return occurs ; |122| + +DW$59 .dwtag DW_TAG_loop + .dwattr DW$59, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L19:1:1462180823") + .dwattr DW$59, DW_AT_begin_file("uart.c") + .dwattr DW$59, DW_AT_begin_line(0x74) + .dwattr DW$59, DW_AT_end_line(0x78) +DW$60 .dwtag DW_TAG_loop_range + .dwattr DW$60, DW_AT_low_pc(DW$L$_ftoa$10$B) + .dwattr DW$60, DW_AT_high_pc(DW$L$_ftoa$10$E) + .dwendtag DW$59 + + +DW$61 .dwtag DW_TAG_loop + .dwattr DW$61, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L17:1:1462180823") + .dwattr DW$61, DW_AT_begin_file("uart.c") + .dwattr DW$61, DW_AT_begin_line(0x6f) + .dwattr DW$61, DW_AT_end_line(0x73) +DW$62 .dwtag DW_TAG_loop_range + .dwattr DW$62, DW_AT_low_pc(DW$L$_ftoa$8$B) + .dwattr DW$62, DW_AT_high_pc(DW$L$_ftoa$8$E) + .dwendtag DW$61 + + +DW$63 .dwtag DW_TAG_loop + .dwattr DW$63, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L15:1:1462180823") + .dwattr DW$63, DW_AT_begin_file("uart.c") + .dwattr DW$63, DW_AT_begin_line(0x66) + .dwattr DW$63, DW_AT_end_line(0x6a) +DW$64 .dwtag DW_TAG_loop_range + .dwattr DW$64, DW_AT_low_pc(DW$L$_ftoa$6$B) + .dwattr DW$64, DW_AT_high_pc(DW$L$_ftoa$6$E) + .dwendtag DW$63 + + +DW$65 .dwtag DW_TAG_loop + .dwattr DW$65, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L14:1:1462180823") + .dwattr DW$65, DW_AT_begin_file("uart.c") + .dwattr DW$65, DW_AT_begin_line(0x60) + .dwattr DW$65, DW_AT_end_line(0x65) +DW$66 .dwtag DW_TAG_loop_range + .dwattr DW$66, DW_AT_low_pc(DW$L$_ftoa$4$B) + .dwattr DW$66, DW_AT_high_pc(DW$L$_ftoa$4$E) + .dwendtag DW$65 + + .dwattr DW$43, DW_AT_end_file("uart.c") + .dwattr DW$43, DW_AT_end_line(0x7b) + .dwattr DW$43, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$43 + + .sect ".text" + .global _uart_printf + +DW$67 .dwtag DW_TAG_subprogram, DW_AT_name("uart_printf"), DW_AT_symbol_name("_uart_printf") + .dwattr DW$67, DW_AT_low_pc(_uart_printf) + .dwattr DW$67, DW_AT_high_pc(0x00) + .dwattr DW$67, DW_AT_begin_file("uart.c") + .dwattr DW$67, DW_AT_begin_line(0x7d) + .dwattr DW$67, DW_AT_begin_column(0x06) + .dwpsn "uart.c",126,1 + + .dwfde DW$CIE + +;*************************************************************** +;* FUNCTION DEF: _uart_printf * +;*************************************************************** +_uart_printf: + .dwcfa 0x0e, 2 + .dwcfa 0x80, 34, 2 + PSHM AR1 + .dwcfa 0x0e, 3 + .dwcfa 0x80, 10, 3 + FRAME #-7 + .dwcfa 0x0e, 10 +DW$68 .dwtag DW_TAG_formal_parameter, DW_AT_name("format"), DW_AT_symbol_name("_format") + .dwattr DW$68, DW_AT_type(*DW$T$25) + .dwattr DW$68, DW_AT_location[DW_OP_breg17 10] +DW$69 .dwtag DW_TAG_unspecified_parameters +DW$70 .dwtag DW_TAG_variable, DW_AT_name("ap"), DW_AT_symbol_name("_ap") + .dwattr DW$70, DW_AT_type(*DW$T$37) + .dwattr DW$70, DW_AT_location[DW_OP_breg17 2] +DW$71 .dwtag DW_TAG_variable, DW_AT_name("c"), DW_AT_symbol_name("_c") + .dwattr DW$71, DW_AT_type(*DW$T$21) + .dwattr DW$71, DW_AT_location[DW_OP_breg17 3] + .dwpsn "uart.c",129,5 + LDM SP,A + ADD #10,A + STL A,*SP(2) + .dwpsn "uart.c",130,11 + SSBX SXM + MVDK *SP(10),*(AR1) + LD *AR1+,A + MVKD *(AR1),*SP(10) + BCD L38,ALEQ ; |130| + NOP + STL A,*SP(3) + ; branchcc occurs ; |130| +L21: +DW$L$_uart_printf$2$B: + .dwpsn "uart.c",132,9 + CMPM *SP(3),#37 ; |132| + BC L32,NTC ; |132| + ; branchcc occurs ; |132| +DW$L$_uart_printf$2$E: +DW$L$_uart_printf$3$B: + .dwpsn "uart.c",134,9 + B L30 ; |134| + ; branch occurs ; |134| +DW$L$_uart_printf$3$E: +L22: +DW$L$_uart_printf$5$B: + +DW$72 .dwtag DW_TAG_lexical_block, DW_AT_low_pc(0x00), DW_AT_high_pc(0x00) +DW$73 .dwtag DW_TAG_variable, DW_AT_name("ch"), DW_AT_symbol_name("_ch") + .dwattr DW$73, DW_AT_type(*DW$T$21) + .dwattr DW$73, DW_AT_location[DW_OP_breg17 4] + .dwpsn "uart.c",136,31 + ADDM #1,*SP(2) ; |136| + MVDK *SP(2),*(AR1) + LD *AR1,A + STL A,*SP(4) + .dwpsn "uart.c",137,26 + FCALL #_uart_putc ; |137| + ; call occurs [#_uart_putc] ; |137| + .dwpsn "uart.c",138,26 + B L37 ; |138| + ; branch occurs ; |138| +DW$L$_uart_printf$5$E: + .dwendtag DW$72 + +L23: +DW$L$_uart_printf$7$B: + +DW$74 .dwtag DW_TAG_lexical_block, DW_AT_low_pc(0x00), DW_AT_high_pc(0x00) +DW$75 .dwtag DW_TAG_variable, DW_AT_name("p"), DW_AT_symbol_name("_p") + .dwattr DW$75, DW_AT_type(*DW$T$33) + .dwattr DW$75, DW_AT_location[DW_OP_breg17 4] + .dwpsn "uart.c",141,32 + ADDM #1,*SP(2) ; |141| + MVDK *SP(2),*(AR1) + LD *AR1,A + STL A,*SP(4) + .dwpsn "uart.c",142,26 + FCALL #_uart_puts ; |142| + ; call occurs [#_uart_puts] ; |142| + .dwpsn "uart.c",143,26 + B L37 ; |143| + ; branch occurs ; |143| +DW$L$_uart_printf$7$E: + .dwendtag DW$74 + +L24: +DW$L$_uart_printf$9$B: + .dwpsn "uart.c",147,26 + FCALLD #_uart_putc ; |147| + NOP + LD B,A + ; call occurs [#_uart_putc] ; |147| + .dwpsn "uart.c",148,26 + B L37 ; |148| + ; branch occurs ; |148| +DW$L$_uart_printf$9$E: +L25: +DW$L$_uart_printf$10$B: + +DW$76 .dwtag DW_TAG_lexical_block, DW_AT_low_pc(0x00), DW_AT_high_pc(0x00) +DW$77 .dwtag DW_TAG_variable, DW_AT_name("num"), DW_AT_symbol_name("_num") + .dwattr DW$77, DW_AT_type(*DW$T$10) + .dwattr DW$77, DW_AT_location[DW_OP_breg17 4] +DW$78 .dwtag DW_TAG_variable, DW_AT_name("p"), DW_AT_symbol_name("_p") + .dwattr DW$78, DW_AT_type(*DW$T$33) + .dwattr DW$78, DW_AT_location[DW_OP_breg17 5] + .dwpsn "uart.c",153,30 + ADDM #1,*SP(2) ; |153| + MVDK *SP(2),*(AR1) + LD *AR1,A + STL A,*SP(4) + .dwpsn "uart.c",154,32 + ST #10,*SP(0) ; |154| + LD *SP(4),A + FCALL #_myitoa ; |154| + ; call occurs [#_myitoa] ; |154| + STL A,*SP(5) + .dwpsn "uart.c",155,26 + FCALL #_uart_puts ; |155| + ; call occurs [#_uart_puts] ; |155| + .dwpsn "uart.c",156,26 + B L37 ; |156| + ; branch occurs ; |156| +DW$L$_uart_printf$10$E: + .dwendtag DW$76 + +L26: +DW$L$_uart_printf$12$B: + +DW$79 .dwtag DW_TAG_lexical_block, DW_AT_low_pc(0x00), DW_AT_high_pc(0x00) +DW$80 .dwtag DW_TAG_variable, DW_AT_name("num"), DW_AT_symbol_name("_num") + .dwattr DW$80, DW_AT_type(*DW$T$10) + .dwattr DW$80, DW_AT_location[DW_OP_breg17 4] +DW$81 .dwtag DW_TAG_variable, DW_AT_name("p"), DW_AT_symbol_name("_p") + .dwattr DW$81, DW_AT_type(*DW$T$33) + .dwattr DW$81, DW_AT_location[DW_OP_breg17 5] + .dwpsn "uart.c",160,30 + ADDM #1,*SP(2) ; |160| + MVDK *SP(2),*(AR1) + LD *AR1,A + STL A,*SP(4) + .dwpsn "uart.c",161,32 + ST #16,*SP(0) ; |161| + LD *SP(4),A + FCALL #_myitoa ; |161| + ; call occurs [#_myitoa] ; |161| + STL A,*SP(5) + .dwpsn "uart.c",162,26 + FCALL #_uart_puts ; |162| + ; call occurs [#_uart_puts] ; |162| + .dwpsn "uart.c",163,26 + B L37 ; |163| + ; branch occurs ; |163| +DW$L$_uart_printf$12$E: + .dwendtag DW$79 + +L27: +DW$L$_uart_printf$14$B: + +DW$82 .dwtag DW_TAG_lexical_block, DW_AT_low_pc(0x00), DW_AT_high_pc(0x00) +DW$83 .dwtag DW_TAG_variable, DW_AT_name("fdata"), DW_AT_symbol_name("_fdata") + .dwattr DW$83, DW_AT_type(*DW$T$17) + .dwattr DW$83, DW_AT_location[DW_OP_breg17 4] +DW$84 .dwtag DW_TAG_variable, DW_AT_name("str"), DW_AT_symbol_name("_str") + .dwattr DW$84, DW_AT_type(*DW$T$33) + .dwattr DW$84, DW_AT_location[DW_OP_breg17 6] + .dwpsn "uart.c",168,14 + BITF *SP(2),#1 ; |168| + BCD L28,TC ; |168| + NOP + LD #0,A + ; branchcc occurs ; |168| +DW$L$_uart_printf$14$E: +DW$L$_uart_printf$15$B: + LD #1,A +DW$L$_uart_printf$15$E: +L28: +DW$L$_uart_printf$16$B: + ADD #1,A,A ; |168| + ADD *SP(2),A ; |168| + STLM A,AR1 + STL A,*SP(2) + ADD #1,A,A ; |168| + STL A,*SP(2) + DLD *AR1,A ; |168| + DST A,*SP(4) ; |168| + .dwpsn "uart.c",169,13 + ST #6,*SP(0) ; |169| + DLD *SP(4),A ; |169| + FCALL #_ftoa ; |169| + ; call occurs [#_ftoa] ; |169| + STL A,*SP(6) + .dwpsn "uart.c",170,25 + FCALL #_uart_puts ; |170| + ; call occurs [#_uart_puts] ; |170| + .dwpsn "uart.c",171,7 + B L37 ; |171| + ; branch occurs ; |171| +DW$L$_uart_printf$16$E: + .dwendtag DW$82 + +L29: +DW$L$_uart_printf$18$B: + .dwpsn "uart.c",174,22 + FCALLD #_uart_putc ; |174| + NOP + LD B,A + ; call occurs [#_uart_putc] ; |174| + .dwpsn "uart.c",175,27 + B L37 ; |175| + ; branch occurs ; |175| +DW$L$_uart_printf$18$E: +L30: +DW$L$_uart_printf$19$B: + .dwpsn "uart.c",134,9 + MVDK *SP(10),*(AR1) + LD *AR1+,A + MVKD *(AR1),*SP(10) + LD A,B + STL A,*SP(3) + LD *(BL),A ; |134| + SFTA A,8 ; |134| + SFTA A,-8 ; |134| + SUB #102,A,A ; |134| + BC L31,AGT ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$19$E: +DW$L$_uart_printf$20$B: + STM #102,AR1 + LD *(BL),A ; |134| + SUB *(AR1),A ; |134| + BC L27,AEQ ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$20$E: +DW$L$_uart_printf$21$B: + STM #37,AR1 + LD *(BL),A ; |134| + SUB *(AR1),A ; |134| + BC L24,AEQ ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$21$E: +DW$L$_uart_printf$22$B: + STM #99,AR1 + LD *(BL),A ; |134| + SUB *(AR1),A ; |134| + BC L22,AEQ ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$22$E: +DW$L$_uart_printf$23$B: + STM #100,AR1 + LD *(BL),A ; |134| + SUB *(AR1),A ; |134| + BC L25,AEQ ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$23$E: +DW$L$_uart_printf$24$B: + B L29 ; |134| + ; branch occurs ; |134| +DW$L$_uart_printf$24$E: +L31: +DW$L$_uart_printf$25$B: + STM #115,AR1 + LD *(BL),A ; |134| + SUB *(AR1),A ; |134| + BC L23,AEQ ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$25$E: +DW$L$_uart_printf$26$B: + STM #120,AR1 + LD *(BL),A ; |134| + SUB *(AR1),A ; |134| + BC L26,AEQ ; |134| + ; branchcc occurs ; |134| +DW$L$_uart_printf$26$E: +DW$L$_uart_printf$27$B: + B L29 ; |134| + ; branch occurs ; |134| +DW$L$_uart_printf$27$E: +L32: +DW$L$_uart_printf$29$B: + .dwpsn "uart.c",178,14 + CMPM *SP(3),#92 ; |178| + BC L36,NTC ; |178| + ; branchcc occurs ; |178| +DW$L$_uart_printf$29$E: +DW$L$_uart_printf$30$B: + .dwpsn "uart.c",180,10 + B L35 ; |180| + ; branch occurs ; |180| +DW$L$_uart_printf$30$E: +L33: +DW$L$_uart_printf$32$B: + .dwpsn "uart.c",182,7 + FCALLD #_uart_putc ; |182| + NOP + LD #13,A + ; call occurs [#_uart_putc] ; |182| + .dwpsn "uart.c",183,26 + B L37 ; |183| + ; branch occurs ; |183| +DW$L$_uart_printf$32$E: +L34: +DW$L$_uart_printf$33$B: + .dwpsn "uart.c",187,14 + LD *SP(3),A + FCALL #_uart_putc ; |187| + ; call occurs [#_uart_putc] ; |187| + .dwpsn "uart.c",188,19 + B L37 ; |188| + ; branch occurs ; |188| +DW$L$_uart_printf$33$E: +L35: +DW$L$_uart_printf$34$B: + .dwpsn "uart.c",180,10 + MVDK *SP(10),*(AR1) + LD *AR1+,A + LD #110,B + MVKD *(AR1),*SP(10) + STL A,*SP(3) + LD *(AL),A ; |180| + SUB *(BL),A ; |180| + BC L33,AEQ ; |180| + ; branchcc occurs ; |180| +DW$L$_uart_printf$34$E: +DW$L$_uart_printf$35$B: + B L34 ; |180| + ; branch occurs ; |180| +DW$L$_uart_printf$35$E: +L36: +DW$L$_uart_printf$37$B: + .dwpsn "uart.c",192,13 + LD *SP(3),A + FCALL #_uart_putc ; |192| + ; call occurs [#_uart_putc] ; |192| +DW$L$_uart_printf$37$E: +L37: +DW$L$_uart_printf$38$B: + .dwpsn "uart.c",130,11 + SSBX SXM + MVDK *SP(10),*(AR1) + LD *AR1+,A + MVKD *(AR1),*SP(10) + BCD L21,AGT ; |130| + NOP + STL A,*SP(3) + ; branchcc occurs ; |130| +DW$L$_uart_printf$38$E: +L38: + .dwpsn "uart.c",195,1 + FRAME #7 + .dwcfa 0x0e, 3 + POPM AR1 + .dwcfa 0xc0, 10 + .dwcfa 0x0e, 2 + NOP + NOP + FRET + ; return occurs + +DW$85 .dwtag DW_TAG_loop + .dwattr DW$85, DW_AT_name("D:\CCStudio_v3.3\examples\dsk5416\csl\timer\timer1\uart.asm:L21:1:1462180823") + .dwattr DW$85, DW_AT_begin_file("uart.c") + .dwattr DW$85, DW_AT_begin_line(0x82) + .dwattr DW$85, DW_AT_end_line(0xc1) +DW$86 .dwtag DW_TAG_loop_range + .dwattr DW$86, DW_AT_low_pc(DW$L$_uart_printf$2$B) + .dwattr DW$86, DW_AT_high_pc(DW$L$_uart_printf$2$E) +DW$87 .dwtag DW_TAG_loop_range + .dwattr DW$87, DW_AT_low_pc(DW$L$_uart_printf$35$B) + .dwattr DW$87, DW_AT_high_pc(DW$L$_uart_printf$35$E) +DW$88 .dwtag DW_TAG_loop_range + .dwattr DW$88, DW_AT_low_pc(DW$L$_uart_printf$29$B) + .dwattr DW$88, DW_AT_high_pc(DW$L$_uart_printf$29$E) +DW$89 .dwtag DW_TAG_loop_range + .dwattr DW$89, DW_AT_low_pc(DW$L$_uart_printf$30$B) + .dwattr DW$89, DW_AT_high_pc(DW$L$_uart_printf$30$E) +DW$90 .dwtag DW_TAG_loop_range + .dwattr DW$90, DW_AT_low_pc(DW$L$_uart_printf$34$B) + .dwattr DW$90, DW_AT_high_pc(DW$L$_uart_printf$34$E) +DW$91 .dwtag DW_TAG_loop_range + .dwattr DW$91, DW_AT_low_pc(DW$L$_uart_printf$24$B) + .dwattr DW$91, DW_AT_high_pc(DW$L$_uart_printf$24$E) +DW$92 .dwtag DW_TAG_loop_range + .dwattr DW$92, DW_AT_low_pc(DW$L$_uart_printf$27$B) + .dwattr DW$92, DW_AT_high_pc(DW$L$_uart_printf$27$E) +DW$93 .dwtag DW_TAG_loop_range + .dwattr DW$93, DW_AT_low_pc(DW$L$_uart_printf$14$B) + .dwattr DW$93, DW_AT_high_pc(DW$L$_uart_printf$14$E) +DW$94 .dwtag DW_TAG_loop_range + .dwattr DW$94, DW_AT_low_pc(DW$L$_uart_printf$15$B) + .dwattr DW$94, DW_AT_high_pc(DW$L$_uart_printf$15$E) +DW$95 .dwtag DW_TAG_loop_range + .dwattr DW$95, DW_AT_low_pc(DW$L$_uart_printf$26$B) + .dwattr DW$95, DW_AT_high_pc(DW$L$_uart_printf$26$E) +DW$96 .dwtag DW_TAG_loop_range + .dwattr DW$96, DW_AT_low_pc(DW$L$_uart_printf$23$B) + .dwattr DW$96, DW_AT_high_pc(DW$L$_uart_printf$23$E) +DW$97 .dwtag DW_TAG_loop_range + .dwattr DW$97, DW_AT_low_pc(DW$L$_uart_printf$25$B) + .dwattr DW$97, DW_AT_high_pc(DW$L$_uart_printf$25$E) +DW$98 .dwtag DW_TAG_loop_range + .dwattr DW$98, DW_AT_low_pc(DW$L$_uart_printf$3$B) + .dwattr DW$98, DW_AT_high_pc(DW$L$_uart_printf$3$E) +DW$99 .dwtag DW_TAG_loop_range + .dwattr DW$99, DW_AT_low_pc(DW$L$_uart_printf$19$B) + .dwattr DW$99, DW_AT_high_pc(DW$L$_uart_printf$19$E) +DW$100 .dwtag DW_TAG_loop_range + .dwattr DW$100, DW_AT_low_pc(DW$L$_uart_printf$20$B) + .dwattr DW$100, DW_AT_high_pc(DW$L$_uart_printf$20$E) +DW$101 .dwtag DW_TAG_loop_range + .dwattr DW$101, DW_AT_low_pc(DW$L$_uart_printf$21$B) + .dwattr DW$101, DW_AT_high_pc(DW$L$_uart_printf$21$E) +DW$102 .dwtag DW_TAG_loop_range + .dwattr DW$102, DW_AT_low_pc(DW$L$_uart_printf$22$B) + .dwattr DW$102, DW_AT_high_pc(DW$L$_uart_printf$22$E) +DW$103 .dwtag DW_TAG_loop_range + .dwattr DW$103, DW_AT_low_pc(DW$L$_uart_printf$5$B) + .dwattr DW$103, DW_AT_high_pc(DW$L$_uart_printf$5$E) +DW$104 .dwtag DW_TAG_loop_range + .dwattr DW$104, DW_AT_low_pc(DW$L$_uart_printf$7$B) + .dwattr DW$104, DW_AT_high_pc(DW$L$_uart_printf$7$E) +DW$105 .dwtag DW_TAG_loop_range + .dwattr DW$105, DW_AT_low_pc(DW$L$_uart_printf$9$B) + .dwattr DW$105, DW_AT_high_pc(DW$L$_uart_printf$9$E) +DW$106 .dwtag DW_TAG_loop_range + .dwattr DW$106, DW_AT_low_pc(DW$L$_uart_printf$10$B) + .dwattr DW$106, DW_AT_high_pc(DW$L$_uart_printf$10$E) +DW$107 .dwtag DW_TAG_loop_range + .dwattr DW$107, DW_AT_low_pc(DW$L$_uart_printf$12$B) + .dwattr DW$107, DW_AT_high_pc(DW$L$_uart_printf$12$E) +DW$108 .dwtag DW_TAG_loop_range + .dwattr DW$108, DW_AT_low_pc(DW$L$_uart_printf$16$B) + .dwattr DW$108, DW_AT_high_pc(DW$L$_uart_printf$16$E) +DW$109 .dwtag DW_TAG_loop_range + .dwattr DW$109, DW_AT_low_pc(DW$L$_uart_printf$18$B) + .dwattr DW$109, DW_AT_high_pc(DW$L$_uart_printf$18$E) +DW$110 .dwtag DW_TAG_loop_range + .dwattr DW$110, DW_AT_low_pc(DW$L$_uart_printf$32$B) + .dwattr DW$110, DW_AT_high_pc(DW$L$_uart_printf$32$E) +DW$111 .dwtag DW_TAG_loop_range + .dwattr DW$111, DW_AT_low_pc(DW$L$_uart_printf$33$B) + .dwattr DW$111, DW_AT_high_pc(DW$L$_uart_printf$33$E) +DW$112 .dwtag DW_TAG_loop_range + .dwattr DW$112, DW_AT_low_pc(DW$L$_uart_printf$37$B) + .dwattr DW$112, DW_AT_high_pc(DW$L$_uart_printf$37$E) +DW$113 .dwtag DW_TAG_loop_range + .dwattr DW$113, DW_AT_low_pc(DW$L$_uart_printf$38$B) + .dwattr DW$113, DW_AT_high_pc(DW$L$_uart_printf$38$E) + .dwendtag DW$85 + + .dwattr DW$67, DW_AT_end_file("uart.c") + .dwattr DW$67, DW_AT_end_line(0xc3) + .dwattr DW$67, DW_AT_end_column(0x01) + .dwendentry + .dwendtag DW$67 + +;*************************************************************** +;* FLOATING-POINT CONSTANTS * +;*************************************************************** + .sect ".const" + .align 2 +FL1: .xlong 0x00000000 +FL2: .xlong 0xbf800000 +;*************************************************************** +;* UNDEFINED EXTERNAL REFERENCES * +;*************************************************************** + .global _putc + .global __ftable + .global I$$DIV + .global I$$MOD + .global F$$COMPARE + .global F$$FTOL + .global F$$MUL + .global L$$DIVS + .global L$$MODS + .global F$$LTOF + .global F$$SUB + .global F$$UTOF + +;*************************************************************** +;* TYPE INFORMATION * +;*************************************************************** + +DW$T$23 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$23, DW_AT_language(DW_LANG_C) +DW$114 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$22) + .dwendtag DW$T$23 + + +DW$T$26 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$26, DW_AT_language(DW_LANG_C) +DW$115 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$25) + .dwendtag DW$T$26 + + +DW$T$28 .dwtag DW_TAG_subroutine_type + .dwattr DW$T$28, DW_AT_language(DW_LANG_C) +DW$116 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$25) +DW$117 .dwtag DW_TAG_unspecified_parameters + .dwendtag DW$T$28 + +DW$T$10 .dwtag DW_TAG_base_type, DW_AT_name("int") + .dwattr DW$T$10, DW_AT_encoding(DW_ATE_signed) + .dwattr DW$T$10, DW_AT_byte_size(0x01) + +DW$T$31 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + .dwattr DW$T$31, DW_AT_language(DW_LANG_C) +DW$118 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) +DW$119 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$30) + .dwendtag DW$T$31 + + +DW$T$34 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$10) + .dwattr DW$T$34, DW_AT_language(DW_LANG_C) +DW$120 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$33) + .dwendtag DW$T$34 + +DW$T$37 .dwtag DW_TAG_typedef, DW_AT_name("va_list"), DW_AT_type(*DW$T$36) + .dwattr DW$T$37, DW_AT_language(DW_LANG_C) +DW$T$11 .dwtag DW_TAG_base_type, DW_AT_name("unsigned int") + .dwattr DW$T$11, DW_AT_encoding(DW_ATE_unsigned) + .dwattr DW$T$11, DW_AT_byte_size(0x01) + +DW$T$38 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$11) + .dwattr DW$T$38, DW_AT_language(DW_LANG_C) +DW$121 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$11) +DW$122 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$11) + .dwendtag DW$T$38 + +DW$T$12 .dwtag DW_TAG_base_type, DW_AT_name("long") + .dwattr DW$T$12, DW_AT_encoding(DW_ATE_signed) + .dwattr DW$T$12, DW_AT_byte_size(0x02) +DW$T$16 .dwtag DW_TAG_base_type, DW_AT_name("float") + .dwattr DW$T$16, DW_AT_encoding(DW_ATE_float) + .dwattr DW$T$16, DW_AT_byte_size(0x02) +DW$T$17 .dwtag DW_TAG_base_type, DW_AT_name("double") + .dwattr DW$T$17, DW_AT_encoding(DW_ATE_float) + .dwattr DW$T$17, DW_AT_byte_size(0x02) +DW$T$30 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$29) + .dwattr DW$T$30, DW_AT_address_class(0x10) + +DW$T$41 .dwtag DW_TAG_array_type, DW_AT_type(*DW$T$29) + .dwattr DW$T$41, DW_AT_language(DW_LANG_C) + .dwattr DW$T$41, DW_AT_byte_size(0x8c) +DW$123 .dwtag DW_TAG_subrange_type + .dwattr DW$123, DW_AT_upper_bound(0x13) + .dwendtag DW$T$41 + +DW$T$21 .dwtag DW_TAG_base_type, DW_AT_name("signed char") + .dwattr DW$T$21, DW_AT_encoding(DW_ATE_signed_char) + .dwattr DW$T$21, DW_AT_byte_size(0x01) +DW$T$22 .dwtag DW_TAG_const_type + .dwattr DW$T$22, DW_AT_type(*DW$T$21) +DW$T$25 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$22) + .dwattr DW$T$25, DW_AT_address_class(0x10) +DW$T$33 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$21) + .dwattr DW$T$33, DW_AT_address_class(0x10) + +DW$T$43 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$33) + .dwattr DW$T$43, DW_AT_language(DW_LANG_C) +DW$124 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) +DW$125 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + .dwendtag DW$T$43 + + +DW$T$45 .dwtag DW_TAG_subroutine_type, DW_AT_type(*DW$T$33) + .dwattr DW$T$45, DW_AT_language(DW_LANG_C) +DW$126 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$17) +DW$127 .dwtag DW_TAG_formal_parameter, DW_AT_type(*DW$T$10) + .dwendtag DW$T$45 + + +DW$T$48 .dwtag DW_TAG_array_type, DW_AT_type(*DW$T$21) + .dwattr DW$T$48, DW_AT_language(DW_LANG_C) + .dwattr DW$T$48, DW_AT_byte_size(0x64) +DW$128 .dwtag DW_TAG_subrange_type + .dwattr DW$128, DW_AT_upper_bound(0x63) + .dwendtag DW$T$48 + +DW$T$36 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$10) + .dwattr DW$T$36, DW_AT_address_class(0x10) +DW$T$29 .dwtag DW_TAG_typedef, DW_AT_name("FILE"), DW_AT_type(*DW$T$20) + .dwattr DW$T$29, DW_AT_language(DW_LANG_C) + +DW$T$20 .dwtag DW_TAG_structure_type + .dwattr DW$T$20, DW_AT_byte_size(0x07) +DW$129 .dwtag DW_TAG_member, DW_AT_type(*DW$T$10) + .dwattr DW$129, DW_AT_name("fd"), DW_AT_symbol_name("_fd") + .dwattr DW$129, DW_AT_data_member_location[DW_OP_plus_uconst 0x0] + .dwattr DW$129, DW_AT_accessibility(DW_ACCESS_public) +DW$130 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$130, DW_AT_name("buf"), DW_AT_symbol_name("_buf") + .dwattr DW$130, DW_AT_data_member_location[DW_OP_plus_uconst 0x1] + .dwattr DW$130, DW_AT_accessibility(DW_ACCESS_public) +DW$131 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$131, DW_AT_name("pos"), DW_AT_symbol_name("_pos") + .dwattr DW$131, DW_AT_data_member_location[DW_OP_plus_uconst 0x2] + .dwattr DW$131, DW_AT_accessibility(DW_ACCESS_public) +DW$132 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$132, DW_AT_name("bufend"), DW_AT_symbol_name("_bufend") + .dwattr DW$132, DW_AT_data_member_location[DW_OP_plus_uconst 0x3] + .dwattr DW$132, DW_AT_accessibility(DW_ACCESS_public) +DW$133 .dwtag DW_TAG_member, DW_AT_type(*DW$T$19) + .dwattr DW$133, DW_AT_name("buff_stop"), DW_AT_symbol_name("_buff_stop") + .dwattr DW$133, DW_AT_data_member_location[DW_OP_plus_uconst 0x4] + .dwattr DW$133, DW_AT_accessibility(DW_ACCESS_public) +DW$134 .dwtag DW_TAG_member, DW_AT_type(*DW$T$11) + .dwattr DW$134, DW_AT_name("flags"), DW_AT_symbol_name("_flags") + .dwattr DW$134, DW_AT_data_member_location[DW_OP_plus_uconst 0x5] + .dwattr DW$134, DW_AT_accessibility(DW_ACCESS_public) +DW$135 .dwtag DW_TAG_member, DW_AT_type(*DW$T$10) + .dwattr DW$135, DW_AT_name("index"), DW_AT_symbol_name("_index") + .dwattr DW$135, DW_AT_data_member_location[DW_OP_plus_uconst 0x6] + .dwattr DW$135, DW_AT_accessibility(DW_ACCESS_public) + .dwendtag DW$T$20 + +DW$T$19 .dwtag DW_TAG_pointer_type, DW_AT_type(*DW$T$6) + .dwattr DW$T$19, DW_AT_address_class(0x10) +DW$T$6 .dwtag DW_TAG_base_type, DW_AT_name("unsigned char") + .dwattr DW$T$6, DW_AT_encoding(DW_ATE_unsigned_char) + .dwattr DW$T$6, DW_AT_byte_size(0x01) + + .dwattr DW$43, DW_AT_external(0x01) + .dwattr DW$43, DW_AT_type(*DW$T$33) + .dwattr DW$13, DW_AT_external(0x01) + .dwattr DW$13, DW_AT_type(*DW$T$10) + .dwattr DW$19, DW_AT_external(0x01) + .dwattr DW$19, DW_AT_type(*DW$T$33) + .dwattr DW$35, DW_AT_external(0x01) + .dwattr DW$35, DW_AT_type(*DW$T$11) + .dwattr DW$67, DW_AT_external(0x01) + .dwattr DW$5, DW_AT_external(0x01) + .dwattr DW$8, DW_AT_external(0x01) + .dwattr DW$CU, DW_AT_language(DW_LANG_C) + +;*************************************************************** +;* DWARF CIE ENTRIES * +;*************************************************************** + +DW$CIE .dwcie 1, 34 + .dwcfa 0x0c, 17, 0 + .dwcfa 0x07, 0 + .dwcfa 0x07, 1 + .dwcfa 0x07, 2 + .dwcfa 0x07, 3 + .dwcfa 0x07, 4 + .dwcfa 0x07, 5 + .dwcfa 0x07, 6 + .dwcfa 0x07, 7 + .dwcfa 0x07, 8 + .dwcfa 0x07, 9 + .dwcfa 0x08, 10 + .dwcfa 0x07, 11 + .dwcfa 0x07, 12 + .dwcfa 0x07, 13 + .dwcfa 0x07, 14 + .dwcfa 0x08, 15 + .dwcfa 0x08, 16 + .dwcfa 0x07, 17 + .dwcfa 0x07, 18 + .dwcfa 0x07, 19 + .dwcfa 0x07, 20 + .dwcfa 0x07, 21 + .dwcfa 0x07, 22 + .dwcfa 0x07, 23 + .dwcfa 0x07, 24 + .dwcfa 0x07, 25 + .dwcfa 0x07, 26 + .dwcfa 0x07, 27 + .dwcfa 0x07, 28 + .dwcfa 0x07, 29 + .dwcfa 0x07, 30 + .dwcfa 0x07, 31 + .dwcfa 0x07, 32 + .dwcfa 0x07, 33 + .dwcfa 0x07, 34 + +;*************************************************************** +;* DWARF REGISTER MAP * +;*************************************************************** + +DW$136 .dwtag DW_TAG_assign_register, DW_AT_name("A") + .dwattr DW$136, DW_AT_location[DW_OP_reg0] +DW$137 .dwtag DW_TAG_assign_register, DW_AT_name("AH") + .dwattr DW$137, DW_AT_location[DW_OP_reg1] +DW$138 .dwtag DW_TAG_assign_register, DW_AT_name("AG") + .dwattr DW$138, DW_AT_location[DW_OP_reg2] +DW$139 .dwtag DW_TAG_assign_register, DW_AT_name("") + .dwattr DW$139, DW_AT_location[DW_OP_reg3] +DW$140 .dwtag DW_TAG_assign_register, DW_AT_name("") + .dwattr DW$140, DW_AT_location[DW_OP_reg4] +DW$141 .dwtag DW_TAG_assign_register, DW_AT_name("") + .dwattr DW$141, DW_AT_location[DW_OP_reg5] +DW$142 .dwtag DW_TAG_assign_register, DW_AT_name("B") + .dwattr DW$142, DW_AT_location[DW_OP_reg6] +DW$143 .dwtag DW_TAG_assign_register, DW_AT_name("BH") + .dwattr DW$143, DW_AT_location[DW_OP_reg7] +DW$144 .dwtag DW_TAG_assign_register, DW_AT_name("BG") + .dwattr DW$144, DW_AT_location[DW_OP_reg8] +DW$145 .dwtag DW_TAG_assign_register, DW_AT_name("AR0") + .dwattr DW$145, DW_AT_location[DW_OP_reg9] +DW$146 .dwtag DW_TAG_assign_register, DW_AT_name("AR1") + .dwattr DW$146, DW_AT_location[DW_OP_reg10] +DW$147 .dwtag DW_TAG_assign_register, DW_AT_name("AR2") + .dwattr DW$147, DW_AT_location[DW_OP_reg11] +DW$148 .dwtag DW_TAG_assign_register, DW_AT_name("AR3") + .dwattr DW$148, DW_AT_location[DW_OP_reg12] +DW$149 .dwtag DW_TAG_assign_register, DW_AT_name("AR4") + .dwattr DW$149, DW_AT_location[DW_OP_reg13] +DW$150 .dwtag DW_TAG_assign_register, DW_AT_name("AR5") + .dwattr DW$150, DW_AT_location[DW_OP_reg14] +DW$151 .dwtag DW_TAG_assign_register, DW_AT_name("AR6") + .dwattr DW$151, DW_AT_location[DW_OP_reg15] +DW$152 .dwtag DW_TAG_assign_register, DW_AT_name("AR7") + .dwattr DW$152, DW_AT_location[DW_OP_reg16] +DW$153 .dwtag DW_TAG_assign_register, DW_AT_name("SP") + .dwattr DW$153, DW_AT_location[DW_OP_reg17] +DW$154 .dwtag DW_TAG_assign_register, DW_AT_name("FP") + .dwattr DW$154, DW_AT_location[DW_OP_reg18] +DW$155 .dwtag DW_TAG_assign_register, DW_AT_name("BK") + .dwattr DW$155, DW_AT_location[DW_OP_reg19] +DW$156 .dwtag DW_TAG_assign_register, DW_AT_name("T") + .dwattr DW$156, DW_AT_location[DW_OP_reg20] +DW$157 .dwtag DW_TAG_assign_register, DW_AT_name("ASM") + .dwattr DW$157, DW_AT_location[DW_OP_reg21] +DW$158 .dwtag DW_TAG_assign_register, DW_AT_name("SXM") + .dwattr DW$158, DW_AT_location[DW_OP_reg22] +DW$159 .dwtag DW_TAG_assign_register, DW_AT_name("ST0") + .dwattr DW$159, DW_AT_location[DW_OP_reg23] +DW$160 .dwtag DW_TAG_assign_register, DW_AT_name("ST1") + .dwattr DW$160, DW_AT_location[DW_OP_reg24] +DW$161 .dwtag DW_TAG_assign_register, DW_AT_name("BRC") + .dwattr DW$161, DW_AT_location[DW_OP_reg25] +DW$162 .dwtag DW_TAG_assign_register, DW_AT_name("TC") + .dwattr DW$162, DW_AT_location[DW_OP_reg26] +DW$163 .dwtag DW_TAG_assign_register, DW_AT_name("PC") + .dwattr DW$163, DW_AT_location[DW_OP_reg27] +DW$164 .dwtag DW_TAG_assign_register, DW_AT_name("DB") + .dwattr DW$164, DW_AT_location[DW_OP_reg28] +DW$165 .dwtag DW_TAG_assign_register, DW_AT_name("PMST") + .dwattr DW$165, DW_AT_location[DW_OP_reg29] +DW$166 .dwtag DW_TAG_assign_register, DW_AT_name("RSA") + .dwattr DW$166, DW_AT_location[DW_OP_reg30] +DW$167 .dwtag DW_TAG_assign_register, DW_AT_name("REA") + .dwattr DW$167, DW_AT_location[DW_OP_reg31] +DW$168 .dwtag DW_TAG_assign_register, DW_AT_name("OVM") + .dwattr DW$168, DW_AT_location[DW_OP_regx 0x20] +DW$169 .dwtag DW_TAG_assign_register, DW_AT_name("FRCT") + .dwattr DW$169, DW_AT_location[DW_OP_regx 0x21] +DW$170 .dwtag DW_TAG_assign_register, DW_AT_name("CIE_RETA") + .dwattr DW$170, DW_AT_location[DW_OP_regx 0x22] + .dwendtag DW$CU + diff --git a/c5416_test/timer1/uart.c b/c5416_test/timer1/uart.c new file mode 100644 index 0000000..fe0f28b --- /dev/null +++ b/c5416_test/timer1/uart.c @@ -0,0 +1,195 @@ + +/* + * uart.c + */ + +/*******************************************************/ +/* printf */ +/*******************************************************/ +#include + +#define SKYEYE 1 +void uart_putc (const char c) +{ + if (SKYEYE) + *(char *)0xd000 = c; /* write char to Transmit Buffer Register */ + else + putc(c, stdout); + return; +} + +void uart_puts (const char *s) +{ + while (*s) + { + uart_putc (*s++); + } + return; +} + + +int my_strlen(char *str) +{ + int i; + for(i = 0; str[i] != '\0'; i++); + return i; +} +char *myitoa(int n, int hex) +{ + int num, i = 0, k = 0; + static char str[100]; + char temp; + if(n < 0) + { + str[i++] = '-'; + n = -1 * n; + } + do + { + num = n; + n = n / hex; + if (num%hex > 9) + str[i+k++] = 'a' + (num%hex - 0xa); + else + str[i + k++] = '0' + num % hex; + }while(n); + str[i + k] = '\0'; + + k = my_strlen(str) - 1; + + for(;i < k; i++, k--) + { + temp = str[i]; + str[i] = str[k]; + str[k] = temp; + } + return str; +} +unsigned square(unsigned val, unsigned num){ + int i; + unsigned ret = val; + for(i = 0; i < num - 1; i++){ + ret = ret*val; + } + return ret; +} +char * ftoa(double val, int prec) +{ + int sig = 0, index = 0, p, i, j; + static char s[100] = {'\0'}; + char temp_ch; + long val_long, num; + double val_temp; + float v; + long val_float; + if(val < 0){ + s[index++] = '-'; + val_long = ((long)val) * -1; + val_temp = val * -1; + p = 1; + }else{ + val_long = (long)val; + val_temp = val; + p = 0; + } + + do + { + num = val_long; + val_long = val_long / 10; + s[index++] = '0' + num % 10; + }while(val_long); + for(i = p, j = index - 1; i < j; i++, j--){ + temp_ch = s[i]; + s[i] = s[j]; + s[j] = temp_ch; + } + s[index++] = '.'; + p = index; + v = (val_temp - (long)val_temp) * square(10, prec); + val_float = (long)v; + for(i = 0; i < prec; i++){ + num = val_float; + val_float = val_float/10; + s[index++] = '0' + num % 10; + } + for(i = p, j = index - 1; i < j; i++, j--){ + temp_ch = s[i]; + s[i] = s[j]; + s[j] = temp_ch; + } + s[index] = '\0'; + return s; +} + +void uart_printf(const char *format, ...) +{ + va_list ap; + char c; + va_start(ap ,format); + while((c = *format++) > 0) + { + if(c == '%') + { + switch(c = *format++){ + case 'c':{ + char ch = va_arg(ap, int); + uart_putc(ch); + break; + } + case 's':{ + char *p = va_arg(ap, char*); + uart_puts(p); + break; + } + case '%': + { + uart_putc(c); + break; + } + + case 'd': + { + int num = va_arg(ap, int); + char *p = myitoa(num, 10); + uart_puts(p); + break; + } + case 'x': + { + int num = va_arg(ap, int); + char *p = myitoa(num, 16); + uart_puts(p); + break; + } + + case 'f': + { + double fdata = va_arg(ap, double); + char *str = ftoa(fdata, 6); + uart_puts(str); + break; + } + default: + uart_putc(c); + break; + } + } + else if(c == '\\') + { + switch(c = *format++){ + case 'n':{ + uart_putc('\r'); + break; + } + + default: + uart_putc(c); + break; + } + } + else + uart_putc(c); + } + va_end(ap); +} diff --git a/c5416_test/timer1/uart.h b/c5416_test/timer1/uart.h new file mode 100644 index 0000000..8bb0c0f --- /dev/null +++ b/c5416_test/timer1/uart.h @@ -0,0 +1,20 @@ + +/* + * uart.h + */ + +/*******************************************************/ +/* printf */ +/*******************************************************/ +#ifndef __UART_H__ +#define __UART_H__ + +void uart_putc (const char c); +void uart_puts (const char *s); +int my_strlen(char *str); +char *myitoa(int n, int hex); +unsigned square(unsigned val, unsigned num); +char * ftoa(double val, int prec); +void uart_printf(const char *format, ...); + +#endif diff --git a/c5416_test/uart_log.txt b/c5416_test/uart_log.txt new file mode 100644 index 0000000..261be1c --- /dev/null +++ b/c5416_test/uart_log.txt @@ -0,0 +1,8 @@ +C5416 Timer Test Start... + +Entry Timer Isr function... +Entry Timer Isr function... +Entry Timer Isr function... +Entry Timer Isr function... +Entry Timer Isr function... + \ No newline at end of file diff --git a/deal.py b/deal.py new file mode 100644 index 0000000..860ef0b --- /dev/null +++ b/deal.py @@ -0,0 +1,86 @@ +import csv +import os + +def deal_params(dev_list,fun): + para_list=[] + for i in dev_list: + a=fun(i) + dict1=demo(a) + para_list.append(dict1) + read_params_list=[] + for i in para_list: + if len(i)>0: + for j,k in i.items(): + k.append(j) + read_params_list.append(tuple(k)) + for l in range(len(k)): + if isinstance(k[l],int): + pass + read_params_list=sort_list(read_params_list) + return read_params_list + +def output_value_csv(data,header =["test_num","device_name","reg_name","offset","alter_value","expect_value"],file_name="data.csv"): + if file_name=="data.csv": + if os.path.exists(file_name): + print("{}文件已存在".format(file_name)) + else: + with open(file_name,"w",encoding="utf-8",newline='')as fq: + writer=csv.writer(fq) + writer.writerow(header) + writer.writerows(data) + else: + if os.path.exists(file_name): + print("{}已删除,重新生成".format(file_name)) + os.remove(file_name) + with open(file_name,"w",encoding="utf-8",newline='')as fq: + writer=csv.writer(fq) + writer.writerow(header) + writer.writerows(data) + +def out_put_test_reslut(data): + file_name="testcase_result.csv" + header=["tst_num","device_name","reg_name","offset","init_value","alter_value","expect_value","actual_value","test_result"] + output_value_csv(data,header=header,file_name=file_name) + +def read_csv(): + try: + reg_par_list=[] + with open("data.csv") as f: + f_csv=csv.reader(f) + headers=next(f_csv) + for row in f_csv: + reg_params=(row[0],row[1],row[2],int(row[3],16),int(row[4],16),int(row[5],16)) + reg_par_list.append(reg_params) + return reg_par_list + except IndexError: + print("请补充测试数据") + except Exception as ep: + print(ep) + +def demo(a): + dict1={} + for j,k in a.items(): + for i in range(len(k)): + dict1[k[i]["name"]] = [j,k[i]["offset"]] + return dict1 + +def sort_list(a): + for i in range(len(a)): + for j in range(i+1,len(a)): + if a[i][0] == a[j][0]: + if a[i][1]>a[j][1]: + a[i],a[j] = a[j],a[i] + res=[] + res1=[] + for i in a: + i=list(i) + res.append(i) + [res1.append(res[i][0]) for i in range(len(res)) if res[i][0] not in res1] + for i in res1: + a=1 + for k in res: + if i in k: + testcasenum="testcase{}_({})".format(str(a),i) + k.insert(0,testcasenum) + a+=1 + return res \ No newline at end of file diff --git a/se.py b/se.py new file mode 100644 index 0000000..b152fb3 --- /dev/null +++ b/se.py @@ -0,0 +1,433 @@ +import os,sys,time +import cli +from conf import * +from skyeye_common_module import * +import se_system as ss +import threading +from fuzzywuzzy import fuzz +import fault_inject as fi +import se_func as sf +import skyeye_autotest_command as sac +import pytimer +import skyeye_common_module as scm + + +MO_READ = 1 +MO_WRITE = 2 + +OP_CHAR_TYPE = 1 +OP_SHORT_TYPE = 2 +OP_WORD_TYPE = 4 +OP_DWORD_TYPE = 8 + +TY_INT = "int" +TY_FLOAT = "float" +TY_DOUBLE = "double" + +def SE_define_conf(filename): + try: + Config = json_conf(parent = None, filename = filename) + if Config.get_init_result() == False: + print ("load_config error") + return False + Config.instance() + SetGlobalConfig(Config) + define_json_file[0] = os.path.join(os.getcwd(), filename) + except: + print ("load_config error") + return False + +def SE_load_binary(cpuname,filename): + if os.path.isfile(filename)==False: + print ("No such binary file") + return False + if SkyEyeLoadBinary(cpuname,filename)!=1: + print ("load_binary error") + return False + binary_l[cpuname] = os.path.join(os.getcwd(), filename) + +def SE_init_ok(): + SkyEyePrepareToRun() + if ss.system ==None: + ss.CreateClass() + +def SE_run_script(filename): + fullfilename = os.path.realpath(filename) + if not os.path.exists(fullfilename): + print ("%s file does not exists!" % fullfilename) + return False + fp = open(fullfilename,'r') + lines = fp.readlines() + fp.close() + cmd = cli.GetCommand("run-command") + if cmd == None: + SE_print("Can not find command: run-command") + return False + for line in lines: + line = line.strip(' \n') + if line == "" or line[0] == '#' or "run-pyfile" in line: + continue + try: + ret=cmd.run(line) + except Exception as e: + SE_print(e) + return False + return True + +def SE_run(): + SkyEyeRun() + +def SE_stop(): + SkyEyeStop() + +def SE_stop_autotest(): + if sac.ac != None: + sac.ac.autotest_run = False + +def SE_reset(): + SkyEyeReset() + +def SE_restart(): + SE_reset() + SE_define_conf(define_json_file[0]) + for binary in binary_l.keys(): + SE_load_binary(binary,os.path.normpath(binary_l[binary])) + SE_init_ok() + +def SE_running_status(): + return SkyEyeRunningStatus() + +def SE_pre_conf_obj(classname, objname): + SkyEyePreConfObj(objname,classname) + obj = ss.SkyEyeBaseClass(objname,classname,None) + return obj + +def SE_sleep(s): + time.sleep(s) + +log=None + +def SE_print(data): + global log + if log == None: + return + r_obj=ss.__redirection__() + r_obj.set_out() + print (data) + r_obj.reset() + log.WriteText(r_obj.buff) + +def SE_compare(actual_out,expect_out,accuracy): + sj_output=actual_out + try: + fp1=open(sj_output,'r') + except: + SE_print('The actual output file was not found') + return + actual=fp1.read() + fp1.close() + rmlist=['\t','\r',' ','\n'] + for i in rmlist: + actual=actual.replace(i,'') + expect_out=expect_out.replace(i,'') + if len(actual)==0: + SE_print('The actual output file is empty') + return + if len(expect_out)==0: + SE_print('The desired output is empty') + return + accuracy_list=[] + accuracy_list.append(fuzz.ratio(actual,expect_out)) + accuracy_list.append(fuzz.partial_ratio(actual,expect_out)) + if accuracy!=100: + accuracy_list.append(fuzz.token_set_ratio(actual,expect_out)) + max_accuracy = max(accuracy_list) + if max_accuracy >= accuracy: + SE_print("Proofreading success") + return True + else: + SE_print('Check failure. expect accuracy: %d%% max actual accuracy: %d%%'%(accuracy,max_accuracy)) + return False + +def SE_set_fault_inject(machname,addr,bit,mode): + return fi.skyeye_set_fj_by_aadr(machname,addr,bit,mode) + +def SE_get_fault_inject(): + return fi.skyeye_get_fj() + +def SE_clear_fault_injece(machname,addr,bit,mode): + return fi.skyeye_clear_fj_by_addr(machname,addr,bit,mode) + +def SE_set_register_value(machname,addr,value): + return sf.set_reg_value_by_addr(machname,addr,value) + +def SE_get_register_value(machname,addr): + return sf.get_reg_value_by_addr(machname,addr) + +def SE_get_simulation_time(cpuname): + return SkyEyeGetSimulationRunTime(cpuname) + +def SE_enable_parse_symbol(cpuname,binary): + cmd = cli.GetCommand("parse-symbol") + if cmd == None: + SE_print("Can not find command: parse-symbol") + return False + try: + ret=cmd.run([cpuname,binary]) + except Exception as e: + SE_print(e) + return False + return ret + +def SE_get_global_variable_addr(cpuname,varname): + return SkyEyeGetSymbolAddr(cpuname,varname) + +def SE_get_global_variable_value(cpuname,varname,value_bytes_number,value_type): + if value_type == TY_INT: + return SkyEyeGetSymbolValue(cpuname,varname,value_bytes_number) + elif value_type == TY_FLOAT: + return SkyEyeGetFloatSymbolValue(cpuname,varname,value_bytes_number) + elif value_type == TY_DOUBLE: + return SkyEyeGetDoubleSymbolValue(cpuname,varname,value_bytes_number) + else: + pass + + + + +def SE_set_global_variable_value(cpuname,varname,value,value_bytes_number,value_type): + if value_type == TY_INT: + return SkyEyeSetSymbolValue(cpuname,varname,value,value_bytes_number) + elif value_type == TY_FLOAT: + return SkyEyeSetFloatSymbolValue(cpuname,varname,value,value_bytes_number) + elif value_type == TY_DOUBLE: + return SkyEyeSetDoubleSymbolValue(cpuname,varname,value,value_bytes_number) + else: + pass + +def SE_log_output(filename,content): + now_time = time.strftime('%m%d%H%M%S',time.localtime(time.time())) + new_filename = filename+"_"+now_time+".txt" + try: + fp = open(new_filename,"w") + fp.write(content) + fp.close() + except: + print ("Write file failed") + +def SE_out_error_log(log): + if sac.ac != None: + sac.ac.error_test.append([sac.ac.error_reset(sac.ac.test_info),log]) + +def SE_run_to_time(cpuname,time_s): + sf.run_to_time(cpuname,time_s) + +def SE_create_breakpoint(cpuname,addr): + try: + SkyEyeCreateBreakpoint(cpuname,addr) + except Exception as e: + SE_print(e) + +def SE_get_current_pc(cpuname): + try: + return SkyEyeGetPcByCoreName(cpuname) + except Exception as e: + SE_print(e) + +def SE_get_cpu_freq(cpuname): + try: + return SkyEyeGetCpuFreq(cpuname) + except Exception as e: + SE_print(e) + +def SE_read_byte(cpuname,addr): + try: + return SkyEyeReadByte(cpuname,addr) + except Exception as e: + SE_print(e) + +def SE_read_dword(cpuname,addr): + try: + return SkyEyeReadDWord(cpuname,addr) + except Exception as e: + SE_print(e) +def SE_write_byte(cpuname,addr,value): + try: + return SkyEyeWriteByte(cpuname,addr,value) + except Exception as e: + SE_print(e) + +def SE_write_dword(cpuname,addr,value): + try: + return SkyEyeWriteDWord(cpuname,addr,value) + except Exception as e: + SE_print(e) + +def SE_sync_callback(cpuname,my_callback,argument): + return pytimer.PyTmrCreate(cpuname,0,pytimer.TMR_ONE_SHOT,my_callback, argument) + +def SE_create_timer(cpuname,time_ms,my_callback,argument): + return pytimer.PyTmrCreate(cpuname,time_ms,pytimer.TMR_ONE_SHOT,my_callback, argument) + +def SE_delete_timer(tmr): + try: + return pytimer.PyTmrDelete(tmr) + except: + return False + +def SE_set_watch_on_pc(cpuname,pc_addr,my_callback,argument): + return pytimer.PySetWatchOnPc(cpuname,pc_addr,my_callback,argument) + +def SE_del_watch_on_pc(watch): + try: + return pytimer.PyUnWatchOnPc(watch) + except: + return False + +def SE_set_watch_on_mem(ms_name,mm_type,addr,data_type,length,my_callback,argument): + return pytimer.PySetWatchOnMem(ms_name,mm_type,addr,data_type,length,my_callback,argument) + +def SE_del_watch_on_mem(watch): + try: + return pytimer.PyUnWatchOnMem(watch) + except: + return False + +def SE_get_func_addr(cpuname,funcname): + try: + return SkyEyeGetFuncAddr(cpuname,funcname) + except Exception as e: + SE_print(e) + +def SE_get_func_length(cpuname,funcname): + try: + return SkyEyeGetFuncLength(cpuname,funcname) + except Exception as e: + SE_print(e) + +def SE_load_file(memoryname, filename, pc_addr): + if os.path.isfile(filename)==False: + print ("No such binary file") + return False + if SkyEyeNewLoadFile(memoryname, filename, pc_addr) != 1: + print ("load_file error") + return False + +def SE_cpu_load_file(cpuname, filename, pc_addr): + if os.path.isfile(filename)==False: + print ("No such binary file") + return False + if SkyEyeLoadFile(cpuname, filename, pc_addr) != 1: + print ("load_file error") + return False + +def SE_term_wait_for_string(termname, string): + return SkyEyeTermWaitForString(termname, string) + +def SE_term_write(termname, string): + return SkyEyeTermWrite(termname, string) + +def SE_term_wait_then_write(termname, wait_string, write_string): + return SkyEyeTermWaitThenWrite(termname, wait_string, write_string) + +def SE_get_device_register_list(machname, devicename): + regs = [] + RegNum = SkyEyeGetDevRegNum(machname,devicename) + for regid in range(0,RegNum): + regs.append(SkyEyeGetDevRegNameById(machname,devicename,regid)) + return regs + +def SE_Device_skyEyeGetDevRegNum(machname,devicename): + return SkyEyeGetDevRegNum(machname,devicename) + +def SE_SkyEyeGetModules(): + return SkyEyeGetModules() + +def SE_get_regs(machname,devname): + return fi.get_device_register_info(machname,devname) + +def SE_get_registers(devicename): + reg_list = [] + reg_list1=[] + reg_attr_dic1 = {} + try: + num = scm.SkyEyeGetDevRegNum(None, devicename) + except: + return None + for i in range(0, num): + try: + name = scm.SkyEyeGetDevRegNameById(None, devicename, i) + if name == None: + continue + except: + return None + try: + value = scm.SkyEyeGetDevRegValueById(None, devicename, i) + except: + return None + try: + offset = scm.SkyEyeGetDevRegOffsetById(None, devicename, i) + except: + return None + if offset == 0xffffffff: + offset = i * 4 + + reg_attr_dic={} + + reg_attr_dic["offset"] = offset + reg_attr_dic["size"] = 4 + reg_attr_dic["value"] = value + reg_attr_dic["name"] = name + reg_list.append(reg_attr_dic) + + reg_attr_dic1[devicename] = reg_list + # reg_list1.append(reg_attr_dic1) + return reg_attr_dic1 + +def SE_ReadDevice4(device, offset): + return SkyEyeReadDevice4(device, offset) + +def SE_WriteDevice4(device, offset,data): + return SkyEyeWriteDevice4(device, offset,data) + +def SE_Test_regs_read_wirte(test_num,device,reg_name, offset,alter_value,expect): + alter_value=int(alter_value) + init_vaule= SkyEyeReadDWord(device,offset) + a=SE_write_dword(device, offset,alter_value) + actual_value = SkyEyeReadDWord(device,offset) + if actual_value == expect: + result = "true" + else: + result = "false" + return [test_num,device,reg_name,hex(eval(str(offset))),hex(eval(str(init_vaule))),hex(eval(str(alter_value))),hex(eval(str(expect))),hex(eval(str(actual_value))),result] + +def SE_get_simulation_device_info(): + result='false' + error=None + device_info={} + config = GetGlobalConfig() + if config!=None: + mach_list=config.get_mach_list() + for machname in mach_list: + device_info[machname]={} + device_list = config.get_device_list_by_mach(machname) + dev_list=[] + if device_list != None: + for device in device_list: + cls = config.get_device_classname(machname, device) + base=SkyEyeGetClassType(cls) + if "image" in cls or "memory_space" in cls or "ram" in cls or "_core" in cls: + pass + else: + dev_list.append(device) + device_info[machname]=dev_list + result=device_info + device_list=[] + for j,k in result.items(): + device_list.extend(k) + else: + error="The config is None" + return device_list + +def SE_Quit(): + SkyEyeQuit() \ No newline at end of file diff --git a/测试方法.docx b/测试方法.docx new file mode 100644 index 0000000..d082feb Binary files /dev/null and b/测试方法.docx differ