]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Debugging and rewriting send not to use interrupts, but direct sending.
authorMichal Horn <hornmich@fel.cvut.cz>
Tue, 7 Aug 2012 14:50:01 +0000 (16:50 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Tue, 7 Aug 2012 14:50:01 +0000 (16:50 +0200)
Code cleanup

34 files changed:
CommandStoring.dil
Debug/CmdProcTISCI.map
Debug/CmdProcTISCI.out
Debug/source/cmd_proc_freertos_tms570.obj
Debug/source/cmd_proc_run.obj
Debug/source/cmdio_tisci.obj
Debug/source/cmdio_tisci.pp
Debug/source/commands.obj
Debug/source/commands.pp
Debug/source/esm.obj
Debug/source/notification.obj
Debug/source/os_croutine.obj
Debug/source/os_heap.obj
Debug/source/os_list.obj
Debug/source/os_port.obj
Debug/source/os_queue.obj
Debug/source/os_tasks.obj
Debug/source/os_timer.obj
Debug/source/pinmux.obj
Debug/source/sci.obj
Debug/source/sys_main.obj
Debug/source/sys_phantom.obj
Debug/source/sys_selftest.obj
Debug/source/sys_startup.obj
Debug/source/system.obj
include/cmd_proc_freertos_tms570.h
include/cmdio_tisci.h
source/cmd_proc_freertos_tms570.c
source/cmd_proc_run.c
source/cmdio_tisci.c
source/commands.c
source/notification.c
source/sci.c
source/sys_main.c

index a263c7cde50c86be8d21581210ef8e4cef32f6f0..439128213398836401efd274cc56a129b860ec38 100644 (file)
@@ -1,4 +1,4 @@
-# TMS570LS3137ZWT 07/31/12 11:20:55\r
+# TMS570LS3137ZWT 08/07/12 14:21:44\r
 # \r
 ARCH=TMS570LS3137ZWT\r
 # \r
index 13ccf3111226d365a15d37865ef77e58ae87ba5c..0db61a760852e72ad67ad52be7547b8211a4dbcd 100644 (file)
@@ -1,10 +1,10 @@
 ******************************************************************************
                   TMS470 Linker Unix v4.9.1                    
 ******************************************************************************
->> Linked Mon Aug  6 19:05:36 2012
+>> Linked Tue Aug  7 16:49:31 2012
 
 OUTPUT FILE NAME:   <CmdProcTISCI.out>
-ENTRY POINT SYMBOL: "_c_int00"  address: 000045e0
+ENTRY POINT SYMBOL: "_c_int00"  address: 00004be0
 
 
 MEMORY CONFIGURATION
@@ -12,25 +12,25 @@ MEMORY CONFIGURATION
          name            origin    length      used     unused   attr    fill
 ----------------------  --------  ---------  --------  --------  ----  --------
   VECTORS               00000000   00000020  00000020  00000000     X
-  FLASH0                00000020   0017ffe0  000088fc  001776e4  R  X
+  FLASH0                00000020   0017ffe0  000089d0  00177610  R  X
   FLASH1                00180000   00180000  00000000  00180000  R  X
   STACKS                08000000   00001500  00000000  00001500  RW  
-  RAM                   08001500   00026b00  00004238  000228c8  RW  
+  RAM                   08001500   00026b00  00004234  000228cc  RW  
 
 
 SEGMENT ALLOCATION MAP
 
 run origin  load origin   length   init length attrs members
 ----------  ----------- ---------- ----------- ----- -------
-00000000    00000000    00008920   00008920    r-x
+00000000    00000000    000089f0   000089f0    r-x
   00000000    00000000    00000020   00000020    r-x .intvecs
-  00000020    00000020    00008040   00008040    r-x .text
-  00008060    00008060    000007fc   000007fc    r-- .const
-  00008860    00008860    000000c0   000000c0    r-- .cinit
-08001500    08001500    00004148   00000000    rw-
-  08001500    08001500    00004148   00000000    rw- .bss
-08005648    08005648    000000f0   000000f0    rw-
-  08005648    08005648    000000f0   000000f0    rw- .data
+  00000020    00000020    000080dc   000080dc    r-x .text
+  000080fc    000080fc    00000834   00000834    r-- .const
+  00008930    00008930    000000c0   000000c0    r-- .cinit
+08001500    08001500    00004144   00000000    rw-
+  08001500    08001500    00004144   00000000    rw- .bss
+08005644    08005644    000000f0   000000f0    rw-
+  08005644    08005644    000000f0   000000f0    rw- .data
 
 
 SECTION ALLOCATION MAP
@@ -41,108 +41,109 @@ section   page    origin      length       input sections
 .intvecs   0    00000000    00000020     
                   00000000    00000020     sys_intvecs.obj (.intvecs)
 
-.text      0    00000020    00008040     
+.text      0    00000020    000080dc     
                   00000020    000014c8     sys_selftest.obj (.text)
                   000014e8    00001460     os_tasks.obj (.text)
                   00002948    00000b48     os_queue.obj (.text)
                   00003490    00000b18     cmd_proc.obj (.text)
                   00003fa8    00000638     os_port.obj (.text)
-                  000045e0    000005a8     sys_startup.obj (.text:retain)
-                  00004b88    00000520     sci.obj (.text)
-                  000050a8    0000046c     cmdio_tisci.obj (.text)
-                  00005514    0000043c     esm.obj (.text)
-                  00005950    000003cc     cmd_io_line.obj (.text)
-                  00005d1c    00000384     sys_core.obj (.text)
-                  000060a0    00000354     commands.obj (.text)
-                  000063f4    00000348     sci.obj (.text:retain)
-                  0000673c    00000308     system.obj (.text)
-                  00006a44    00000300     pinmux.obj (.text)
-                  00006d44    000002b8     i2str.obj (.text)
-                  00006ffc    00000240     os_list.obj (.text)
-                  0000723c    00000220     esm.obj (.text:retain)
-                  0000745c    000001d4     cmd_io.obj (.text)
-                  00007630    0000016c     os_portasm.obj (.text)
-                  0000779c    00000150     cmd_proc_run.obj (.text)
-                  000078ec    00000120     cmd_proc_freertos_tms570.obj (.text)
-                  00007a0c    000000e8     os_heap.obj (.text)
-                  00007af4    000000c0     dabort.obj (.text)
-                  00007bb4    0000009c     rtsv7R4_T_be_v3D16_eabi.lib : memcpy_t2.obj (.text)
-                  00007c50    00000078                                 : memset_t2.obj (.text)
-                  00007cc8    00000068     notification.obj (.text)
-                  00007d30    00000060     rtsv7R4_T_be_v3D16_eabi.lib : copy_decompress_rle.obj (.text)
-                  00007d90    00000054                                 : u_div32.obj (.text)
-                  00007de4    00000050                                 : atoi.obj (.text)
-                  00007e34    00000050                                 : atol.obj (.text)
-                  00007e84    0000004c                                 : cpy_tbl.obj (.text)
-                  00007ed0    00000048     sys_main.obj (.text)
-                  00007f18    00000044     rtsv7R4_T_be_v3D16_eabi.lib : exit.obj (.text)
-                  00007f5c    00000030                                 : strncpy.obj (.text)
-                  00007f8c    00000026                                 : strncmp.obj (.text)
-                  00007fb2    00000002     --HOLE-- [fill = 0]
-                  00007fb4    00000018                                 : _lock.obj (.text)
-                  00007fcc    00000016                                 : strchr.obj (.text)
-                  00007fe2    00000014                                 : strlen.obj (.text)
-                  00007ff6    00000012                                 : copy_zero_init.obj (.text:decompress:ZI)
-                  00008008    00000010                                 : isalnum.obj (.text)
-                  00008018    00000010                                 : isdigit.obj (.text)
-                  00008028    00000010                                 : isspace.obj (.text)
-                  00008038    00000010                                 : strcpy.obj (.text)
-                  00008048    0000000e                                 : copy_decompress_none.obj (.text:decompress:none)
-                  00008056    00000006                                 : copy_decompress_rle.obj (.text:decompress:rle24)
-                  0000805c    00000004     sys_phantom.obj (.text:retain)
+                  000045e0    00000600     sci.obj (.text)
+                  00004be0    000005a8     sys_startup.obj (.text:retain)
+                  00005188    0000043c     esm.obj (.text)
+                  000055c4    000003cc     cmd_io_line.obj (.text)
+                  00005990    00000384     sys_core.obj (.text)
+                  00005d14    0000037c     cmdio_tisci.obj (.text)
+                  00006090    00000378     sci.obj (.text:retain)
+                  00006408    00000308     commands.obj (.text)
+                  00006710    00000308     system.obj (.text)
+                  00006a18    00000300     pinmux.obj (.text)
+                  00006d18    000002b8     i2str.obj (.text)
+                  00006fd0    00000240     os_list.obj (.text)
+                  00007210    00000220     esm.obj (.text:retain)
+                  00007430    000001d4     cmd_io.obj (.text)
+                  00007604    000001c8     cmd_proc_freertos_tms570.obj (.text)
+                  000077cc    0000016c     os_portasm.obj (.text)
+                  00007938    00000150     cmd_proc_run.obj (.text)
+                  00007a88    000000e8     os_heap.obj (.text)
+                  00007b70    000000c0     dabort.obj (.text)
+                  00007c30    0000009c     rtsv7R4_T_be_v3D16_eabi.lib : memcpy_t2.obj (.text)
+                  00007ccc    00000088     notification.obj (.text)
+                  00007d54    00000078     rtsv7R4_T_be_v3D16_eabi.lib : memset_t2.obj (.text)
+                  00007dcc    00000060                                 : copy_decompress_rle.obj (.text)
+                  00007e2c    00000054                                 : u_div32.obj (.text)
+                  00007e80    00000050                                 : atoi.obj (.text)
+                  00007ed0    00000050                                 : atol.obj (.text)
+                  00007f20    0000004c                                 : cpy_tbl.obj (.text)
+                  00007f6c    00000048     sys_main.obj (.text)
+                  00007fb4    00000044     rtsv7R4_T_be_v3D16_eabi.lib : exit.obj (.text)
+                  00007ff8    00000030                                 : strncpy.obj (.text)
+                  00008028    00000026                                 : strncmp.obj (.text)
+                  0000804e    00000002     --HOLE-- [fill = 0]
+                  00008050    00000018                                 : _lock.obj (.text)
+                  00008068    00000016                                 : strchr.obj (.text)
+                  0000807e    00000014                                 : strlen.obj (.text)
+                  00008092    00000012                                 : copy_zero_init.obj (.text:decompress:ZI)
+                  000080a4    00000010                                 : isalnum.obj (.text)
+                  000080b4    00000010                                 : isdigit.obj (.text)
+                  000080c4    00000010                                 : isspace.obj (.text)
+                  000080d4    00000010                                 : strcpy.obj (.text)
+                  000080e4    0000000e                                 : copy_decompress_none.obj (.text:decompress:none)
+                  000080f2    00000006                                 : copy_decompress_rle.obj (.text:decompress:rle24)
+                  000080f8    00000004     sys_phantom.obj (.text:retain)
 
-.const     0    00008060    000007fc     
-                  00008060    00000304     commands.obj (.const:.string)
-                  00008364    00000204     sys_startup.obj (.const:s_vim_init)
-                  00008568    00000187     commands.obj (.const)
-                  000086ef    00000001     --HOLE-- [fill = 0]
-                  000086f0    00000101     rtsv7R4_T_be_v3D16_eabi.lib : ctype.obj (.const:_ctypes_)
-                  000087f1    00000003     --HOLE-- [fill = 0]
-                  000087f4    00000026     commands.obj (.const:$P$T0$1)
-                  0000881a    00000002     --HOLE-- [fill = 0]
-                  0000881c    00000023     commands.obj (.const:$P$T1$2)
-                  0000883f    00000001     --HOLE-- [fill = 0]
-                  00008840    0000001c     cmdio_std_line.obj (.const)
+.const     0    000080fc    00000834     
+                  000080fc    00000304     commands.obj (.const:.string)
+                  00008400    00000204     sys_startup.obj (.const:s_vim_init)
+                  00008604    00000187     commands.obj (.const)
+                  0000878b    00000001     --HOLE-- [fill = 0]
+                  0000878c    00000101     rtsv7R4_T_be_v3D16_eabi.lib : ctype.obj (.const:_ctypes_)
+                  0000888d    00000003     --HOLE-- [fill = 0]
+                  00008890    00000038     cmd_proc_freertos_tms570.obj (.const:$P$T0$1)
+                  000088c8    00000026     commands.obj (.const:$P$T0$1)
+                  000088ee    00000002     --HOLE-- [fill = 0]
+                  000088f0    00000023     commands.obj (.const:$P$T1$2)
+                  00008913    00000001     --HOLE-- [fill = 0]
+                  00008914    0000001c     cmdio_std_line.obj (.const)
 
-.cinit     0    00008860    000000c0     
-                  00008860    00000099     (.cinit..data.load) [load image, compression = rle]
-                  000088f9    00000003     --HOLE-- [fill = 0]
-                  000088fc    0000000c     (__TI_handler_table)
-                  00008908    00000008     (.cinit..bss.load) [load image, compression = zero_init]
-                  00008910    00000010     (__TI_cinit_table)
+.cinit     0    00008930    000000c0     
+                  00008930    00000098     (.cinit..data.load) [load image, compression = rle]
+                  000089c8    0000000c     (__TI_handler_table)
+                  000089d4    00000004     --HOLE-- [fill = 0]
+                  000089d8    00000008     (.cinit..bss.load) [load image, compression = zero_init]
+                  000089e0    00000010     (__TI_cinit_table)
 
-.bss       0    08001500    00004148     UNINITIALIZED
+.bss       0    08001500    00004144     UNINITIALIZED
                   08001500    00003fa0     os_heap.obj (.bss:xHeap)
                   080054a0    00000064     os_tasks.obj (.bss:pxReadyTasksLists)
                   08005504    00000058     os_tasks.obj (.bss)
                   0800555c    00000054     cmdio_std_line.obj (.bss:ed_line_in_std)
                   080055b0    00000054     cmdio_std_line.obj (.bss:ed_line_out_std)
-                  08005604    00000020     sci.obj (.bss)
-                  08005624    00000018     cmdio_tisci.obj (.bss)
-                  0800563c    00000008     cmd_proc_freertos_tms570.obj (.bss)
-                  08005644    00000004     commands.obj (.bss)
+                  08005604    0000001c     sci.obj (.bss)
+                  08005620    00000018     cmdio_tisci.obj (.bss)
+                  08005638    00000008     cmd_proc_freertos_tms570.obj (.bss)
+                  08005640    00000004     commands.obj (.bss)
 
-.data      0    08005648    000000f0     
-                  08005648    0000005c     commands.obj (.data)
-                  080056a4    00000030     cmdio_std_line.obj (.data)
-                  080056d4    00000030     os_tasks.obj (.data)
-                  08005704    0000001c     cmdio_tisci.obj (.data)
-                  08005720    00000008     rtsv7R4_T_be_v3D16_eabi.lib : _lock.obj (.data)
-                  08005728    00000008                                 : exit.obj (.data)
-                  08005730    00000004     os_heap.obj (.data)
-                  08005734    00000004     os_port.obj (.data)
+.data      0    08005644    000000f0     
+                  08005644    0000005c     commands.obj (.data)
+                  080056a0    00000030     cmdio_std_line.obj (.data)
+                  080056d0    00000030     os_tasks.obj (.data)
+                  08005700    0000001c     cmdio_tisci.obj (.data)
+                  0800571c    00000008     rtsv7R4_T_be_v3D16_eabi.lib : _lock.obj (.data)
+                  08005724    00000008                                 : exit.obj (.data)
+                  0800572c    00000004     os_heap.obj (.data)
+                  08005730    00000004     os_port.obj (.data)
 
 
 LINKER GENERATED COPY TABLES
 
-__TI_cinit_table @ 00008910 records: 2, size/record: 8, table size: 16
-       .data: load addr=00008860, load size=00000099 bytes, run addr=08005648, run size=000000f0 bytes, compression=rle
-       .bss: load addr=00008908, load size=00000008 bytes, run addr=08001500, run size=00004148 bytes, compression=zero_init
+__TI_cinit_table @ 000089e0 records: 2, size/record: 8, table size: 16
+       .data: load addr=00008930, load size=00000098 bytes, run addr=08005644, run size=000000f0 bytes, compression=rle
+       .bss: load addr=000089d8, load size=00000008 bytes, run addr=08001500, run size=00004144 bytes, compression=zero_init
 
 
 LINKER GENERATED HANDLER TABLE
 
-__TI_handler_table @ 000088fc records: 3, size/record: 4, table size: 12
+__TI_handler_table @ 000089c8 records: 3, size/record: 4, table size: 12
        index: 0, handler: __TI_zero_init
        index: 1, handler: __TI_decompress_rle24
        index: 2, handler: __TI_decompress_none
@@ -152,79 +153,75 @@ GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name
 
 address    name
 --------   ----
-00007f19   C$$EXIT
-00008910   __TI_CINIT_Base
-00008920   __TI_CINIT_Limit
-000088fc   __TI_Handler_Table_Base
-00008908   __TI_Handler_Table_Limit
-00006098   __TI_PINIT_Base
-0000609c   __TI_PINIT_Limit
-00008049   __TI_decompress_none
-00008057   __TI_decompress_rle24
+00007fb5   C$$EXIT
+000089e0   __TI_CINIT_Base
+000089f0   __TI_CINIT_Limit
+000089c8   __TI_Handler_Table_Base
+000089d4   __TI_Handler_Table_Limit
+00005d0c   __TI_PINIT_Base
+00005d10   __TI_PINIT_Limit
+000080e5   __TI_decompress_none
+000080f3   __TI_decompress_rle24
 00000000   __TI_static_base__
-00007ff7   __TI_zero_init
-00007c51   __aeabi_memclr
-00007c51   __aeabi_memclr4
-00007c51   __aeabi_memclr8
-00007bb5   __aeabi_memcpy
-00007bb5   __aeabi_memcpy4
-00007bb5   __aeabi_memcpy8
-00007c53   __aeabi_memset
-00007c53   __aeabi_memset4
-00007c53   __aeabi_memset8
-00007d90   __aeabi_uidivmod
+00008093   __TI_zero_init
+00007d55   __aeabi_memclr
+00007d55   __aeabi_memclr4
+00007d55   __aeabi_memclr8
+00007c31   __aeabi_memcpy
+00007c31   __aeabi_memcpy4
+00007c31   __aeabi_memcpy8
+00007d57   __aeabi_memset
+00007d57   __aeabi_memset4
+00007d57   __aeabi_memset8
+00007e2c   __aeabi_uidivmod
 ffffffff   __binit__
 ffffffff   __c_args__
-000045e0   _c_int00
-08005728   _cleanup_ptr
-00005fc0   _coreClearAuxiliaryDataFault_
-00005fdc   _coreClearAuxiliaryInstructionFault_
-00005f88   _coreClearDataFaultAddress_
-00005f50   _coreClearDataFault_
-00005fa4   _coreClearInstructionFaultAddress_
-00005f6c   _coreClearInstructionFault_
-00005eb4   _coreDisableEventBusExport_
-00005f18   _coreDisableFlashEcc_
-00005ee4   _coreDisableRamEcc_
-00005e9c   _coreEnableEventBusExport_
-00005efc   _coreEnableFlashEcc_
-00005f30   _coreEnableIrqVicOffset_
-00005ecc   _coreEnableRamEcc_
-00005e84   _coreEnableVfp_
-00005fb8   _coreGetAuxiliaryDataFault_
-00005fd4   _coreGetAuxiliaryInstructionFault_
-00005f80   _coreGetDataFaultAddress_
-00005f48   _coreGetDataFault_
-00005f9c   _coreGetInstructionFaultAddress_
-00005f64   _coreGetInstructionFault_
-00005d1c   _coreInitRegisters_
-00005e1c   _coreInitStackPointer_
-000086f0   _ctypes_
-00007af4   _dabort
-00005ff8   _disable_FIQ_interrupt_
-00006000   _disable_IRQ_interrupt_
-00005ff0   _disable_interrupt_
-0800572c   _dtors_ptr
-00006008   _enable_interrupt_
-00006010   _esmCcmErrorsClear_
-00005e68   _getCPSRValue_
-00005e70   _gotoCPUIdle_
-08005720   _lock
+00004be0   _c_int00
+08005724   _cleanup_ptr
+00005c34   _coreClearAuxiliaryDataFault_
+00005c50   _coreClearAuxiliaryInstructionFault_
+00005bfc   _coreClearDataFaultAddress_
+00005bc4   _coreClearDataFault_
+00005c18   _coreClearInstructionFaultAddress_
+00005be0   _coreClearInstructionFault_
+00005b28   _coreDisableEventBusExport_
+00005b8c   _coreDisableFlashEcc_
+00005b58   _coreDisableRamEcc_
+00005b10   _coreEnableEventBusExport_
+00005b70   _coreEnableFlashEcc_
+00005ba4   _coreEnableIrqVicOffset_
+00005b40   _coreEnableRamEcc_
+00005af8   _coreEnableVfp_
+00005c2c   _coreGetAuxiliaryDataFault_
+00005c48   _coreGetAuxiliaryInstructionFault_
+00005bf4   _coreGetDataFaultAddress_
+00005bbc   _coreGetDataFault_
+00005c10   _coreGetInstructionFaultAddress_
+00005bd8   _coreGetInstructionFault_
+00005990   _coreInitRegisters_
+00005a90   _coreInitStackPointer_
+0000878c   _ctypes_
+00007b70   _dabort
+00005c6c   _disable_FIQ_interrupt_
+00005c74   _disable_IRQ_interrupt_
+00005c64   _disable_interrupt_
+08005728   _dtors_ptr
+00005c7c   _enable_interrupt_
+00005c84   _esmCcmErrorsClear_
+00005adc   _getCPSRValue_
+00005ae4   _gotoCPUIdle_
+0800571c   _lock
 00000138   _memoryInit_
-00007fc1   _nop
-00007fbb   _register_lock
-00007fb5   _register_unlock
-08005724   _unlock
-00007f1d   abort
+0000805d   _nop
+00008057   _register_lock
+00008051   _register_unlock
+08005720   _unlock
+00007fb9   abort
 00000e28   adc1ParityCheck
 00000e94   adc2ParityCheck
-00007de5   atoi
-00007e35   atol
+00007e81   atoi
+00007ed1   atol
 ffffffff   binit
-00005330   buf_getc
-000052a8   buf_putc
-00005448   buf_read
-000053a0   buf_write
 00000f00   can1ParityCheck
 00000f80   can2ParityCheck
 00001010   can3ParityCheck
@@ -234,59 +231,59 @@ ffffffff   binit
 00000978   checkB1RAMECC
 00000a98   checkFlashECC
 000006d8   checkefcSelfTest
-0000527c   clearBuffer
-0000525c   clearInputBuffer
-0000526c   clearOutputBuffer
-00008688   cmd_des_char
-000086a0   cmd_des_charmid
-000085f8   cmd_des_error
-00008568   cmd_des_help
-000086b8   cmd_des_hiddedn
-00008670   cmd_des_num
-000085c8   cmd_des_opchar_test
-00008628   cmd_des_opchar_testro
-00008610   cmd_des_param
-00008658   cmd_des_prefix
-00008640   cmd_des_test
-000085e0   cmd_des_testio
-00008580   cmd_des_val
-00008598   cmd_des_valro
-000085b0   cmd_des_valwo
+00005f0c   clearBuffer
+00005eec   clearInputBuffer
+00005efc   clearOutputBuffer
+00008724   cmd_des_char
+0000873c   cmd_des_charmid
+00008694   cmd_des_error
+00008604   cmd_des_help
+00008754   cmd_des_hiddedn
+0000870c   cmd_des_num
+00008664   cmd_des_opchar_test
+000086c4   cmd_des_opchar_testro
+000086ac   cmd_des_param
+000086f4   cmd_des_prefix
+000086dc   cmd_des_test
+0000867c   cmd_des_testio
+0000861c   cmd_des_val
+00008634   cmd_des_valro
+0000864c   cmd_des_valwo
 00003da0   cmd_do_help
 00003bd8   cmd_do_rw_int
 00003c78   cmd_do_rw_long
 00003b38   cmd_do_rw_short
 00003ab4   cmd_do_stamp
-00006300   cmd_do_test
-00006348   cmd_do_testcmdio
-000062e4   cmd_do_testerror
-000060a0   cmd_do_testopchar
-0000620c   cmd_do_testparam
-000059c0   cmd_ed_line_buf
-08005704   cmd_io_buf
-00005bf0   cmd_io_line_in
-00005af8   cmd_io_line_out
-00005ad8   cmd_io_line_putc
-00005cc8   cmd_io_line_rdline
-000074a0   cmd_io_puts
-000075ac   cmd_io_read_bychar
-00008840   cmd_io_std_line
-00007534   cmd_io_write_bychar
-080056a0   cmd_list
-08005648   cmd_list_1
-08005660   cmd_list_2
-08005680   cmd_list_main
+00006620   cmd_do_test
+00006664   cmd_do_testcmdio
+00006604   cmd_do_testerror
+00006408   cmd_do_testopchar
+00006548   cmd_do_testparam
+00005634   cmd_ed_line_buf
+08005700   cmd_io_buf
+00005864   cmd_io_line_in
+0000576c   cmd_io_line_out
+0000574c   cmd_io_line_putc
+0000593c   cmd_io_line_rdline
+00007474   cmd_io_puts
+00007580   cmd_io_read_bychar
+00008914   cmd_io_std_line
+00007508   cmd_io_write_bychar
+0800569c   cmd_list
+08005644   cmd_list_1
+0800565c   cmd_list_2
+0800567c   cmd_list_main
 000039e4   cmd_num_suffix
 00003968   cmd_opchar_check
 00003d18   cmd_opchar_replong
-000077d8   cmd_processor_run
-00007e85   copy_in
+00007974   cmd_processor_run
+00007f21   copy_in
 00000224   cpuSelfTest
 00000b68   cpuSelfTestFail
 00000b60   custom_dabort
 00000be0   dmaParityCheck
-080056a4   ed_line_buf_in_std
-080056bc   ed_line_buf_out_std
+080056a0   ed_line_buf_in_std
+080056b8   ed_line_buf_out_std
 0800555c   ed_line_in_std
 080055b0   ed_line_out_std
 000005a0   efcCheck
@@ -294,54 +291,56 @@ ffffffff   binit
 00000774   efcClass2Error
 000006b0   efcSelfTest
 000005fc   efcStuckZeroTest
-000056c4   esmActivateNormalOperation
-000057b0   esmClearStatus
-000057f0   esmClearStatusBuffer
-00005688   esmDisableError
-00005700   esmDisableInterrupt
-0000565c   esmEnableError
-000056d4   esmEnableInterrupt
-00005640   esmError
-0000583c   esmGetStatus
-000058a0   esmGetStatusBuffer
-00007cc8   esmGroup1Notification
-00007cd4   esmGroup2Notification
-0000723c   esmHighInterrupt
-00005514   esmInit
-00007380   esmLowInterrupt
-0000581c   esmSetCounterPreloadValue
-0000572c   esmSetInterruptLevel
-000056b4   esmTriggerErrorPinReset
-00007f25   exit
+00005338   esmActivateNormalOperation
+00005424   esmClearStatus
+00005464   esmClearStatusBuffer
+000052fc   esmDisableError
+00005374   esmDisableInterrupt
+000052d0   esmEnableError
+00005348   esmEnableInterrupt
+000052b4   esmError
+000054b0   esmGetStatus
+00005514   esmGetStatusBuffer
+00007ccc   esmGroup1Notification
+00007cd8   esmGroup2Notification
+00007210   esmHighInterrupt
+00005188   esmInit
+00007354   esmLowInterrupt
+00005490   esmSetCounterPreloadValue
+000053a0   esmSetInterruptLevel
+00005328   esmTriggerErrorPinReset
+00007fc1   exit
 00000b58   flashClass1Error
 00000b5c   flashClass2Error
 00000778   fmcBus2Check
 0000084c   fmcClass1Error
 00000850   fmcClass2Error
 000007b4   fmcECCcheck
-08005604   g_sciTransfer
+08005608   g_sciTransfer
+00005df4   genericPrint
+00005dac   genericRead
 00000c54   het1ParityCheck
 00000d30   het2ParityCheck
 00000cbc   htu1ParityCheck
 00000db4   htu2ParityCheck
-00006d44   i2str
-08005630   inBuffer
-000078ec   initCmdProc
-000050a8   initIoBuffer
-00008009   isalnum
-00008019   isdigit
-00008029   isspace
-00007ed0   main
-00006850   mapClocks
-00007bb5   memcpy
-00007ce0   memoryPort0TestFailNotification
-00007cf8   memoryPort1TestFailNotification
-00007c59   memset
+00006d18   i2str
+0800562c   inBuffer
+00007604   initCmdProc
+00005d14   initIoBuffer
+000080a5   isalnum
+000080b5   isdigit
+000080c5   isspace
+00007f6c   main
+00006824   mapClocks
+00007c31   memcpy
+00007ce4   memoryPort0TestFailNotification
+00007cfc   memoryPort1TestFailNotification
+00007d5d   memset
 000010a4   mibspi1ParityCheck
 0000118c   mibspi3ParityCheck
 00001284   mibspi5ParityCheck
-00006a44   muxInit
-08005624   outBuffer
+00006a18   muxInit
+08005620   outBuffer
 000004ec   pbistIsTestCompleted
 00000508   pbistIsTestPassed
 00000544   pbistPortTestStatus
@@ -349,73 +348,73 @@ ffffffff   binit
 000002a4   pbistSelfCheck
 000003e0   pbistSelfCheckFail
 000004bc   pbistStop
-000067f8   periphInit
-0000805c   phantomInterrupt
-000051d4   print
-00005130   printToInputBuffer
-00005108   printToOutputBuffer
+000067cc   periphInit
+000080f8   phantomInterrupt
+00005d74   print
 00003544   proc_cmd_line
-000079b0   processCmd
-0800563c   processCmdHandler
-08005640   prompt
-00007a0c   pvPortMalloc
-080056d4   pxCurrentTCB
+0000775c   processCmd
+08005638   processCmdHandler
+0800563c   prompt
+00007a88   pvPortMalloc
+080056d0   pxCurrentTCB
 00003fa8   pxPortInitialiseStack
-00005198   read
-00005178   readFromInputBuffer
-00005158   readFromOutputBuffer
-00004f68   sciDisableLoopback
-00004fec   sciDisableNotification
-00004f34   sciEnableLoopback
-00004f84   sciEnableNotification
-000063f4   sciHighLevelInterrupt
-00004b88   sciInit
-00004e38   sciIsRxReady
-00004cfc   sciIsTxReady
-00006580   sciLowLevelInterrupt
-00007d10   sciNotification
-00004eac   sciReceive
-00004e84   sciReceiveByte
-00004e54   sciRxError
-00004d48   sciSend
-00004d18   sciSendByte
-00004c7c   sciSetBaudrate
-00004c5c   sciSetFunctional
-000067b8   setupFlash
-0000673c   setupPLL
+00005d94   read
+00004aa0   sciDisableLoopback
+00004b2c   sciDisableNotification
+00004a6c   sciEnableLoopback
+00004ac4   sciEnableNotification
+00006090   sciHighLevelInterrupt
+000045e0   sciInit
+000048b0   sciIsRxReady
+00004754   sciIsTxReady
+00006224   sciLowLevelInterrupt
+00007d14   sciNotification
+00004924   sciReceive
+000048fc   sciReceiveByte
+000048cc   sciRxError
+000047a0   sciSend
+00004770   sciSendByte
+000046d4   sciSetBaudrate
+000046b4   sciSetFunctional
+0000678c   setupFlash
+00006710   setupPLL
 00003510   skip_white
 0000017c   stcSelfCheck
 00000b64   stcSelfCheckFail
-00007fcd   strchr
-00008039   strcpy
-00007fe3   strlen
-00007f8d   strncmp
-00007f5d   strncpy
-00006928   systemInit
-000069b4   systemPowerDown
+00008069   strchr
+000080d5   strcpy
+0000807f   strlen
+00008029   strncmp
+00007ff9   strncpy
+000068fc   systemInit
+00006988   systemPowerDown
 00000a90   tcramClass1Error
 00000a94   tcramClass2Error
-00006770   trimLPO
-08005734   ulCriticalNesting
+00005f8c   tisci_getc
+00005f54   tisci_putc
+00006000   tisci_read
+00005fbc   tisci_write
+00006744   trimLPO
+08005730   ulCriticalNesting
 000030bc   uxQueueMessagesWaiting
 000030e0   uxQueueMessagesWaitingFromISR
 00001ebc   uxTaskGetNumberOfTasks
 0000269c   uxTaskGetStackHighWaterMark
 0000184c   uxTaskPriorityGet
-00006ffc   vListInitialise
-00007054   vListInitialiseItem
-000070f4   vListInsert
-00007070   vListInsertEnd
-000071b8   vListRemove
+00006fd0   vListInitialise
+00007028   vListInitialiseItem
+000070c8   vListInsert
+00007044   vListInsertEnd
+0000718c   vListRemove
 0000449c   vPortEndScheduler
 000044a0   vPortEnterCritical
 000044b8   vPortExitCritical
-00007ab4   vPortFree
-00007ac4   vPortInitialiseBlocks
-00007630   vPortStartFirstTask
-00007788   vPortYield
-00007664   vPortYieldProcessor
-000076ec   vPreemptiveTick
+00007b30   vPortFree
+00007b40   vPortInitialiseBlocks
+000077cc   vPortStartFirstTask
+00007924   vPortYield
+00007800   vPortYieldProcessor
+00007888   vPreemptiveTick
 00003100   vQueueDelete
 000017e4   vTaskDelay
 000016e8   vTaskDelayUntil
@@ -432,9 +431,9 @@ ffffffff   binit
 00001a2c   vTaskSuspend
 00001cf4   vTaskSuspendAll
 000020a8   vTaskSwitchContext
-08005644   val
+08005640   val
 00000b6c   vimParityCheck
-00007ad4   xPortGetFreeHeapSize
+00007b50   xPortGetFreeHeapSize
 00004488   xPortStartScheduler
 00002948   xQueueCreate
 00002b34   xQueueCreateCountingSemaphore
@@ -561,206 +560,204 @@ address    name
 0000449c   vPortEndScheduler
 000044a0   vPortEnterCritical
 000044b8   vPortExitCritical
-000045e0   _c_int00
-00004b88   sciInit
-00004c5c   sciSetFunctional
-00004c7c   sciSetBaudrate
-00004cfc   sciIsTxReady
-00004d18   sciSendByte
-00004d48   sciSend
-00004e38   sciIsRxReady
-00004e54   sciRxError
-00004e84   sciReceiveByte
-00004eac   sciReceive
-00004f34   sciEnableLoopback
-00004f68   sciDisableLoopback
-00004f84   sciEnableNotification
-00004fec   sciDisableNotification
-000050a8   initIoBuffer
-00005108   printToOutputBuffer
-00005130   printToInputBuffer
-00005158   readFromOutputBuffer
-00005178   readFromInputBuffer
-00005198   read
-000051d4   print
-0000525c   clearInputBuffer
-0000526c   clearOutputBuffer
-0000527c   clearBuffer
-000052a8   buf_putc
-00005330   buf_getc
-000053a0   buf_write
-00005448   buf_read
-00005514   esmInit
-00005640   esmError
-0000565c   esmEnableError
-00005688   esmDisableError
-000056b4   esmTriggerErrorPinReset
-000056c4   esmActivateNormalOperation
-000056d4   esmEnableInterrupt
-00005700   esmDisableInterrupt
-0000572c   esmSetInterruptLevel
-000057b0   esmClearStatus
-000057f0   esmClearStatusBuffer
-0000581c   esmSetCounterPreloadValue
-0000583c   esmGetStatus
-000058a0   esmGetStatusBuffer
-000059c0   cmd_ed_line_buf
-00005ad8   cmd_io_line_putc
-00005af8   cmd_io_line_out
-00005bf0   cmd_io_line_in
-00005cc8   cmd_io_line_rdline
-00005d1c   _coreInitRegisters_
-00005e1c   _coreInitStackPointer_
-00005e68   _getCPSRValue_
-00005e70   _gotoCPUIdle_
-00005e84   _coreEnableVfp_
-00005e9c   _coreEnableEventBusExport_
-00005eb4   _coreDisableEventBusExport_
-00005ecc   _coreEnableRamEcc_
-00005ee4   _coreDisableRamEcc_
-00005efc   _coreEnableFlashEcc_
-00005f18   _coreDisableFlashEcc_
-00005f30   _coreEnableIrqVicOffset_
-00005f48   _coreGetDataFault_
-00005f50   _coreClearDataFault_
-00005f64   _coreGetInstructionFault_
-00005f6c   _coreClearInstructionFault_
-00005f80   _coreGetDataFaultAddress_
-00005f88   _coreClearDataFaultAddress_
-00005f9c   _coreGetInstructionFaultAddress_
-00005fa4   _coreClearInstructionFaultAddress_
-00005fb8   _coreGetAuxiliaryDataFault_
-00005fc0   _coreClearAuxiliaryDataFault_
-00005fd4   _coreGetAuxiliaryInstructionFault_
-00005fdc   _coreClearAuxiliaryInstructionFault_
-00005ff0   _disable_interrupt_
-00005ff8   _disable_FIQ_interrupt_
-00006000   _disable_IRQ_interrupt_
-00006008   _enable_interrupt_
-00006010   _esmCcmErrorsClear_
-00006098   __TI_PINIT_Base
-0000609c   __TI_PINIT_Limit
-000060a0   cmd_do_testopchar
-0000620c   cmd_do_testparam
-000062e4   cmd_do_testerror
-00006300   cmd_do_test
-00006348   cmd_do_testcmdio
-000063f4   sciHighLevelInterrupt
-00006580   sciLowLevelInterrupt
-0000673c   setupPLL
-00006770   trimLPO
-000067b8   setupFlash
-000067f8   periphInit
-00006850   mapClocks
-00006928   systemInit
-000069b4   systemPowerDown
-00006a44   muxInit
-00006d44   i2str
-00006ffc   vListInitialise
-00007054   vListInitialiseItem
-00007070   vListInsertEnd
-000070f4   vListInsert
-000071b8   vListRemove
-0000723c   esmHighInterrupt
-00007380   esmLowInterrupt
-000074a0   cmd_io_puts
-00007534   cmd_io_write_bychar
-000075ac   cmd_io_read_bychar
-00007630   vPortStartFirstTask
-00007664   vPortYieldProcessor
-000076ec   vPreemptiveTick
-00007788   vPortYield
-000077d8   cmd_processor_run
-000078ec   initCmdProc
-000079b0   processCmd
-00007a0c   pvPortMalloc
-00007ab4   vPortFree
-00007ac4   vPortInitialiseBlocks
-00007ad4   xPortGetFreeHeapSize
-00007af4   _dabort
-00007bb5   __aeabi_memcpy
-00007bb5   __aeabi_memcpy4
-00007bb5   __aeabi_memcpy8
-00007bb5   memcpy
-00007c51   __aeabi_memclr
-00007c51   __aeabi_memclr4
-00007c51   __aeabi_memclr8
-00007c53   __aeabi_memset
-00007c53   __aeabi_memset4
-00007c53   __aeabi_memset8
-00007c59   memset
-00007cc8   esmGroup1Notification
-00007cd4   esmGroup2Notification
-00007ce0   memoryPort0TestFailNotification
-00007cf8   memoryPort1TestFailNotification
-00007d10   sciNotification
-00007d90   __aeabi_uidivmod
-00007de5   atoi
-00007e35   atol
-00007e85   copy_in
-00007ed0   main
-00007f19   C$$EXIT
-00007f1d   abort
-00007f25   exit
-00007f5d   strncpy
-00007f8d   strncmp
-00007fb5   _register_unlock
-00007fbb   _register_lock
-00007fc1   _nop
-00007fcd   strchr
-00007fe3   strlen
-00007ff7   __TI_zero_init
-00008009   isalnum
-00008019   isdigit
-00008029   isspace
-00008039   strcpy
-00008049   __TI_decompress_none
-00008057   __TI_decompress_rle24
-0000805c   phantomInterrupt
-00008568   cmd_des_help
-00008580   cmd_des_val
-00008598   cmd_des_valro
-000085b0   cmd_des_valwo
-000085c8   cmd_des_opchar_test
-000085e0   cmd_des_testio
-000085f8   cmd_des_error
-00008610   cmd_des_param
-00008628   cmd_des_opchar_testro
-00008640   cmd_des_test
-00008658   cmd_des_prefix
-00008670   cmd_des_num
-00008688   cmd_des_char
-000086a0   cmd_des_charmid
-000086b8   cmd_des_hiddedn
-000086f0   _ctypes_
-00008840   cmd_io_std_line
-000088fc   __TI_Handler_Table_Base
-00008908   __TI_Handler_Table_Limit
-00008910   __TI_CINIT_Base
-00008920   __TI_CINIT_Limit
+000045e0   sciInit
+000046b4   sciSetFunctional
+000046d4   sciSetBaudrate
+00004754   sciIsTxReady
+00004770   sciSendByte
+000047a0   sciSend
+000048b0   sciIsRxReady
+000048cc   sciRxError
+000048fc   sciReceiveByte
+00004924   sciReceive
+00004a6c   sciEnableLoopback
+00004aa0   sciDisableLoopback
+00004ac4   sciEnableNotification
+00004b2c   sciDisableNotification
+00004be0   _c_int00
+00005188   esmInit
+000052b4   esmError
+000052d0   esmEnableError
+000052fc   esmDisableError
+00005328   esmTriggerErrorPinReset
+00005338   esmActivateNormalOperation
+00005348   esmEnableInterrupt
+00005374   esmDisableInterrupt
+000053a0   esmSetInterruptLevel
+00005424   esmClearStatus
+00005464   esmClearStatusBuffer
+00005490   esmSetCounterPreloadValue
+000054b0   esmGetStatus
+00005514   esmGetStatusBuffer
+00005634   cmd_ed_line_buf
+0000574c   cmd_io_line_putc
+0000576c   cmd_io_line_out
+00005864   cmd_io_line_in
+0000593c   cmd_io_line_rdline
+00005990   _coreInitRegisters_
+00005a90   _coreInitStackPointer_
+00005adc   _getCPSRValue_
+00005ae4   _gotoCPUIdle_
+00005af8   _coreEnableVfp_
+00005b10   _coreEnableEventBusExport_
+00005b28   _coreDisableEventBusExport_
+00005b40   _coreEnableRamEcc_
+00005b58   _coreDisableRamEcc_
+00005b70   _coreEnableFlashEcc_
+00005b8c   _coreDisableFlashEcc_
+00005ba4   _coreEnableIrqVicOffset_
+00005bbc   _coreGetDataFault_
+00005bc4   _coreClearDataFault_
+00005bd8   _coreGetInstructionFault_
+00005be0   _coreClearInstructionFault_
+00005bf4   _coreGetDataFaultAddress_
+00005bfc   _coreClearDataFaultAddress_
+00005c10   _coreGetInstructionFaultAddress_
+00005c18   _coreClearInstructionFaultAddress_
+00005c2c   _coreGetAuxiliaryDataFault_
+00005c34   _coreClearAuxiliaryDataFault_
+00005c48   _coreGetAuxiliaryInstructionFault_
+00005c50   _coreClearAuxiliaryInstructionFault_
+00005c64   _disable_interrupt_
+00005c6c   _disable_FIQ_interrupt_
+00005c74   _disable_IRQ_interrupt_
+00005c7c   _enable_interrupt_
+00005c84   _esmCcmErrorsClear_
+00005d0c   __TI_PINIT_Base
+00005d10   __TI_PINIT_Limit
+00005d14   initIoBuffer
+00005d74   print
+00005d94   read
+00005dac   genericRead
+00005df4   genericPrint
+00005eec   clearInputBuffer
+00005efc   clearOutputBuffer
+00005f0c   clearBuffer
+00005f54   tisci_putc
+00005f8c   tisci_getc
+00005fbc   tisci_write
+00006000   tisci_read
+00006090   sciHighLevelInterrupt
+00006224   sciLowLevelInterrupt
+00006408   cmd_do_testopchar
+00006548   cmd_do_testparam
+00006604   cmd_do_testerror
+00006620   cmd_do_test
+00006664   cmd_do_testcmdio
+00006710   setupPLL
+00006744   trimLPO
+0000678c   setupFlash
+000067cc   periphInit
+00006824   mapClocks
+000068fc   systemInit
+00006988   systemPowerDown
+00006a18   muxInit
+00006d18   i2str
+00006fd0   vListInitialise
+00007028   vListInitialiseItem
+00007044   vListInsertEnd
+000070c8   vListInsert
+0000718c   vListRemove
+00007210   esmHighInterrupt
+00007354   esmLowInterrupt
+00007474   cmd_io_puts
+00007508   cmd_io_write_bychar
+00007580   cmd_io_read_bychar
+00007604   initCmdProc
+0000775c   processCmd
+000077cc   vPortStartFirstTask
+00007800   vPortYieldProcessor
+00007888   vPreemptiveTick
+00007924   vPortYield
+00007974   cmd_processor_run
+00007a88   pvPortMalloc
+00007b30   vPortFree
+00007b40   vPortInitialiseBlocks
+00007b50   xPortGetFreeHeapSize
+00007b70   _dabort
+00007c31   __aeabi_memcpy
+00007c31   __aeabi_memcpy4
+00007c31   __aeabi_memcpy8
+00007c31   memcpy
+00007ccc   esmGroup1Notification
+00007cd8   esmGroup2Notification
+00007ce4   memoryPort0TestFailNotification
+00007cfc   memoryPort1TestFailNotification
+00007d14   sciNotification
+00007d55   __aeabi_memclr
+00007d55   __aeabi_memclr4
+00007d55   __aeabi_memclr8
+00007d57   __aeabi_memset
+00007d57   __aeabi_memset4
+00007d57   __aeabi_memset8
+00007d5d   memset
+00007e2c   __aeabi_uidivmod
+00007e81   atoi
+00007ed1   atol
+00007f21   copy_in
+00007f6c   main
+00007fb5   C$$EXIT
+00007fb9   abort
+00007fc1   exit
+00007ff9   strncpy
+00008029   strncmp
+00008051   _register_unlock
+00008057   _register_lock
+0000805d   _nop
+00008069   strchr
+0000807f   strlen
+00008093   __TI_zero_init
+000080a5   isalnum
+000080b5   isdigit
+000080c5   isspace
+000080d5   strcpy
+000080e5   __TI_decompress_none
+000080f3   __TI_decompress_rle24
+000080f8   phantomInterrupt
+00008604   cmd_des_help
+0000861c   cmd_des_val
+00008634   cmd_des_valro
+0000864c   cmd_des_valwo
+00008664   cmd_des_opchar_test
+0000867c   cmd_des_testio
+00008694   cmd_des_error
+000086ac   cmd_des_param
+000086c4   cmd_des_opchar_testro
+000086dc   cmd_des_test
+000086f4   cmd_des_prefix
+0000870c   cmd_des_num
+00008724   cmd_des_char
+0000873c   cmd_des_charmid
+00008754   cmd_des_hiddedn
+0000878c   _ctypes_
+00008914   cmd_io_std_line
+000089c8   __TI_Handler_Table_Base
+000089d4   __TI_Handler_Table_Limit
+000089e0   __TI_CINIT_Base
+000089f0   __TI_CINIT_Limit
 0800555c   ed_line_in_std
 080055b0   ed_line_out_std
-08005604   g_sciTransfer
-08005624   outBuffer
-08005630   inBuffer
-0800563c   processCmdHandler
-08005640   prompt
-08005644   val
-08005648   cmd_list_1
-08005660   cmd_list_2
-08005680   cmd_list_main
-080056a0   cmd_list
-080056a4   ed_line_buf_in_std
-080056bc   ed_line_buf_out_std
-080056d4   pxCurrentTCB
-08005704   cmd_io_buf
-08005720   _lock
-08005724   _unlock
-08005728   _cleanup_ptr
-0800572c   _dtors_ptr
-08005734   ulCriticalNesting
+08005608   g_sciTransfer
+08005620   outBuffer
+0800562c   inBuffer
+08005638   processCmdHandler
+0800563c   prompt
+08005640   val
+08005644   cmd_list_1
+0800565c   cmd_list_2
+0800567c   cmd_list_main
+0800569c   cmd_list
+080056a0   ed_line_buf_in_std
+080056b8   ed_line_buf_out_std
+080056d0   pxCurrentTCB
+08005700   cmd_io_buf
+0800571c   _lock
+08005720   _unlock
+08005724   _cleanup_ptr
+08005728   _dtors_ptr
+08005730   ulCriticalNesting
 ffffffff   __binit__
 ffffffff   __c_args__
 ffffffff   binit
 
-[302 symbols]
+[300 symbols]
index e653d7ef1fb8a99c3e46ed48def141d2362bd594..a3829d62b82dbb104d7f00655407276c3c3bb857 100644 (file)
Binary files a/Debug/CmdProcTISCI.out and b/Debug/CmdProcTISCI.out differ
index af5e9c2030c8a8e3bcdcabb7c488fb52e9c08ada..cb67160cc1288eb310b534cc758c31e284eb2ae2 100644 (file)
Binary files a/Debug/source/cmd_proc_freertos_tms570.obj and b/Debug/source/cmd_proc_freertos_tms570.obj differ
index f9066556d856f0523b6c7dd9f6d34692114203f7..624d920d59da996faa77523926aca2e5fa550076 100644 (file)
Binary files a/Debug/source/cmd_proc_run.obj and b/Debug/source/cmd_proc_run.obj differ
index 1fa1444e66965cd4200cdf5bc16c1b801a4daf8a..ab1e5b1e7fa5ed2248aa9eb3049b8d67c3cd9c0e 100644 (file)
Binary files a/Debug/source/cmdio_tisci.obj and b/Debug/source/cmdio_tisci.obj differ
index 6f231aca86d119b44b2d630a75fde40cab6bd552..68ea61a9da1d876dda0548f6410a3adc04d47d0a 100644 (file)
@@ -14,6 +14,8 @@ source/cmdio_tisci.obj: ../include/sys_core.h
 source/cmdio_tisci.obj: ../include/sys_common.h
 source/cmdio_tisci.obj: ../include/os_queue.h
 source/cmdio_tisci.obj: ../include/os_semphr.h
+source/cmdio_tisci.obj: ../include/sci.h
+source/cmdio_tisci.obj: ../include/gio.h
 
 ../source/cmdio_tisci.c: 
 ../include/cmdio_tisci.h: 
@@ -29,3 +31,5 @@ source/cmdio_tisci.obj: ../include/os_semphr.h
 ../include/sys_common.h: 
 ../include/os_queue.h: 
 ../include/os_semphr.h: 
+../include/sci.h: 
+../include/gio.h: 
index 06c4c31a07cb27abe9d9587bf2d8840329c154d9..85c55c4ea6ac7ebe5ba5bae120d0a8905e26d244 100644 (file)
Binary files a/Debug/source/commands.obj and b/Debug/source/commands.obj differ
index 2d91cce200f06ddb546aea25331731e18256b119..194ea5d1f53131c082e88beba9f2cef123c656f0 100644 (file)
@@ -14,6 +14,8 @@ source/commands.obj: ../include/os_mpu_wrappers.h
 source/commands.obj: ../include/sys_core.h
 source/commands.obj: ../include/os_queue.h
 source/commands.obj: ../include/os_semphr.h
+source/commands.obj: ../include/sci.h
+source/commands.obj: ../include/gio.h
 source/commands.obj: /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/string.h
 source/commands.obj: /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/linkage.h
 source/commands.obj: /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/stdio.h
@@ -33,6 +35,8 @@ source/commands.obj: /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/stdarg.h
 ../include/sys_core.h: 
 ../include/os_queue.h: 
 ../include/os_semphr.h: 
+../include/sci.h: 
+../include/gio.h: 
 /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/string.h: 
 /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/linkage.h: 
 /opt/ti/ccsv5/tools/compiler/tms470_4.9.1/include/stdio.h: 
index ef4aa9786952ef35c6bb7706a516c63b6ca9faac..d68f7503c59cd9b5372655824d60b21a697d7427 100644 (file)
Binary files a/Debug/source/esm.obj and b/Debug/source/esm.obj differ
index 5299805b57ea9929c3795050849e25e8aeed19d8..af70b6c20808c757b3800cbb4789d27777c21b18 100644 (file)
Binary files a/Debug/source/notification.obj and b/Debug/source/notification.obj differ
index 2b17edf89008176118e33651758dc0777502987c..af3695409d7b3de3bfc12ec2b90833a94e6e39a5 100644 (file)
Binary files a/Debug/source/os_croutine.obj and b/Debug/source/os_croutine.obj differ
index fc00ad48975d637df56b8178d44c41e17ae2021b..c71f5678fb60e4ea842256caae967f92059d97d6 100644 (file)
Binary files a/Debug/source/os_heap.obj and b/Debug/source/os_heap.obj differ
index 531d59ab5fcbc9859adc07f5f28f83c156255616..61b9dde36a557848ad79509bc437fcd7f5d5632e 100644 (file)
Binary files a/Debug/source/os_list.obj and b/Debug/source/os_list.obj differ
index 311a3491022696e64b60be14d3f690dbef7b48c3..dc9e98913fad283bbb7afe3550f9cbe0aa0f16d7 100644 (file)
Binary files a/Debug/source/os_port.obj and b/Debug/source/os_port.obj differ
index 6acbd17498b6afad67206e0ea05e037a04b59f30..76a51722c2df05d2248f63a40fe11b03d698a6d1 100644 (file)
Binary files a/Debug/source/os_queue.obj and b/Debug/source/os_queue.obj differ
index 5aa2c40951562057ee28c31773039dd7bdb39291..8f22924e5cfa0b9c9cb147dc08deeef8fb99921a 100644 (file)
Binary files a/Debug/source/os_tasks.obj and b/Debug/source/os_tasks.obj differ
index 1acb2bd02ba8db36d7129b3007f9db8d304f7db9..9c3bd9428d8efc1f8a7ce80896cb99e22a01516a 100644 (file)
Binary files a/Debug/source/os_timer.obj and b/Debug/source/os_timer.obj differ
index 12b108e68d24eebb0a3875e822b11776ac107330..7ef8229ac55e9ac699aecd6e85bb00d3607987cd 100644 (file)
Binary files a/Debug/source/pinmux.obj and b/Debug/source/pinmux.obj differ
index 8abde98e200c799dbbc32486713c6cb819bcadf9..fd4594793f573d86fa0f3174eb992720365d4eb6 100644 (file)
Binary files a/Debug/source/sci.obj and b/Debug/source/sci.obj differ
index 1729f46332bf4eba13d9efcc0b472bf30c78fd3d..1ed5b73b39f2f6a3053c30bbccb5e705e3cd390e 100644 (file)
Binary files a/Debug/source/sys_main.obj and b/Debug/source/sys_main.obj differ
index d6fe28a03152df4453a185ef3e991310f6e69a0a..43b9b5ddcb900440600e8a32589b1b5804b7249e 100644 (file)
Binary files a/Debug/source/sys_phantom.obj and b/Debug/source/sys_phantom.obj differ
index d5b0c55386914c0c75455c9afde0967dd48bcd9b..a48ea9a46a9c727128b7eeef0ff397d304885795 100644 (file)
Binary files a/Debug/source/sys_selftest.obj and b/Debug/source/sys_selftest.obj differ
index 3f99ecf650e3ad90adf817386822e9e85b509b39..29406c4ea2c3311eabef47542e7a7d869864d0de 100644 (file)
Binary files a/Debug/source/sys_startup.obj and b/Debug/source/sys_startup.obj differ
index 60748ce4c03d0201c9cc9943024f56e883a7250a..f41efb0e77b1f6fc025c7257af4d0827dc35229a 100644 (file)
Binary files a/Debug/source/system.obj and b/Debug/source/system.obj differ
index 2fa113670935500831870291a9f4e872f4f7a5a1..0439d8188bc46959d5c7d6f7920703e30f29e50b 100644 (file)
 #include "os_portmacro.h"
 
 
-/**    Initializes CmdProc library, IO stack and creates tasks for FreeRTOS.
+/**    Initializes CmdProc library, IO stack and creates task for FreeRTOS.
  *     SCI must be initialized before calling this procedure.
  *
- *     @param[in]      priority                priorities for tasks.
- *     @param[in]      introText               string shown once after initialization before prompt is shown.
- *     @param[in]      promptText              string shown when software is ready to read command from RS-232
+ *     @param[in]      priority                priority for main task.
+ *     @param[in]      introText               string shown once after initialization before prompt is shown. Can be NULL.
+ *     @param[in]      promptText              string shown when software is ready to read command from RS-232. Can be NULL.
  */
 void initCmdProc(unsigned portBASE_TYPE printPriority, uint8_t * intro, uint8_t * prompt);
 
-/**    Procedure for task processCmd. Waits for semaphore, which indicates that command line is prepared for processing.
- * After semaphore is given, calls cmdProc function that process the command line
+/**    Procedure for task processCmd. Infinite loop that reads and process commands.
  */
 void processCmd(void *pvParameters );
 
index 34555d1c7669036635f7445a896d5c127ab41db5..2b5fd1dbf1e3364fefb88c4e30eba5e0b29297f9 100644 (file)
 #define CMDIO_BUFFER_H_
 
 #define MAX_BUFFER_LEN 128
+#define errBUFFER_NOT_INITIALIZED -6
 
 #include "cmd_proc.h"
 #include "FreeRTOS.h"
 #include "os_queue.h"
 #include "os_semphr.h"
+#include "sci.h"
 
 
 typedef struct {
@@ -29,78 +31,62 @@ typedef struct {
 */
 void initIoBuffer();
 
-/**    Print string into an output buffer. Let it be blocking or nonblocking in case the buffer is full.
- * @param[in]  string  String to be printed into buffer
- * @param[in]  length  number of characters to be printed
- * @param[in]  ticks   Number of FreeRTOS's ticks to block task, when buffer is full. portMAX_DELAY can be used.
- * @return     pdPASS when OK; errQUEUE_FULL when buffer is full and ran out of block time.
- */
-portBASE_TYPE printToOutputBuffer(const uint8_t * string, uint32_t length, portTickType ticks);
-
-/**    Print string into an input buffer. Let it be blocking or nonblocking in case the buffer is full.
- * @param[in]  string  String to be printed into buffer
+/**    Print string into an output buffer in a not blocking way.
+ * @param[in]  string  String to be printed into output buffer
  * @param[in]  length  number of characters to be printed
- * @param[in]  ticks   Number of FreeRTOS's ticks to block task, when buffer is full. portMAX_DELAY can be used.
- * @return     pdPASS when OK; errQUEUE_FULL when buffer is full and ran out of block time.
- */
-portBASE_TYPE printToInputBuffer(const uint8_t * string, uint32_t length, portTickType ticks);
-
-/**    Read character from an output buffer. Let it be blocking or nonblocking in case the buffer is empty.
- * @param[out] ch      Character read from buffer
- * @param[in]  ticks   Number of FreeRTOS's ticks to block task, when buffer is empty. portMAX_DELAY can be used.
- * @return     pdPASS when OK; errQUEUE_EMPTY when buffer is empty and ran out of block time.
+ * @return     pdPASS when OK; errQUEUE_FULL when buffer is full, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before
  */
-portBASE_TYPE readFromOutputBuffer(uint8_t * ch, portTickType ticks);
+portBASE_TYPE print(const uint8_t * string, uint32_t length);
 
-/**    Read character from an input buffer. Let it be blocking or nonblocking in case the buffer is empty.
+/**    Read character from an input buffer in a blocking way
  * @param[out] ch      Character read from buffer
- * @param[in]  ticks   Number of FreeRTOS's ticks to block task, when buffer is full. portMAX_DELAY can be used.
- * @return     pdPASS when OK; errQUEUE_EMPTY when buffer is empty and ran out of block time.
+ * @return     pdPASS when OK; errQUEUE_EMPTY when buffer is empty and ran out of block time, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before.
  */
-portBASE_TYPE readFromInputBuffer(uint8_t * ch, portTickType ticks);
+portBASE_TYPE read(uint8_t * ch);
 
 /**    Read character from a buffer. Let it be blocking or nonblocking in case the buffer is empty.
  * @param[in]  buffer  Pointer to buffer from which will be read.
  * @param[out] ch      Character read from buffer
- * @param[in]  ticks   Number of FreeRTOS's ticks to block task, when buffer is empty. portMAX_DELAY can be used.
- * @return     pdPASS when OK; errQUEUE_EMPTY when buffer is empty and ran out of block time.
+ * @return     pdPASS when OK; errQUEUE_EMPTY when buffer is empty and ran out of block time, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before.
  */
-portBASE_TYPE read(tBuffer* buffer, uint8_t * ch, portTickType ticks);
+portBASE_TYPE genericRead(tBuffer* buffer, uint8_t * ch);
 
 /**    Print string to a buffer. Let it be blocking or nonblocking in case the buffer is full.
  * @param[in]  buffer  Pointer to buffer from which will be read.
  * @param[in]  string  String to be printed into buffer
  * @param[in]  length  number of characters to be printed
- * @param[in]  ticks   Number of FreeRTOS's ticks to block task, when buffer is full. portMAX_DELAY can be used.
- * @return     pdPASS when OK; errQUEUE_FULL when buffer is full and ran out of block time.
+ * @return     pdPASS when OK; errQUEUE_FULL when buffer is full and ran out of block time, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before.
  */
-portBASE_TYPE print(tBuffer* buffer, const uint8_t * string, uint32_t length, portTickType ticks);
+portBASE_TYPE genericPrint(tBuffer* buffer, const uint8_t * string, uint32_t length);
 
 /**    Makes input buffer empty
+ * @return pdPass when success, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before
  */
-void clearInputBuffer();
+portBASE_TYPE clearInputBuffer();
 
 /**    Makes output buffer empty
+ * @return pdPass when success, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before
  */
-void clearOutputBuffer();
+portBASE_TYPE clearOutputBuffer();
 
 /**    Makes buffer empty
  * @param[in]  buffer  Buffer to be cleared
+ * @return pdPass when success, errBUFFER_NOT_INITIALIZED when initIoBuffer function was not called before
  */
-void clearBuffer(tBuffer * buffer);
+portBASE_TYPE clearBuffer(tBuffer * buffer);
 
 /**    Puts character into output buffer. Is blocking, when buffer is full.
  *     @param[in]      cmd_io  IO stack pointer
  *     @param[in]      ch      Character to be printed
  *     @return 1 when succes, 0 when fail
  */
-int buf_putc(cmd_io_t *cmd_io, int ch);
+int tisci_putc(cmd_io_t *cmd_io, int ch);
 
 /**    Gets character from input buffer, is blocking when buffer is empty.
  *     @param[in]      cmd_io  IO stack pointer
  *     @return read character
  */
-int buf_getc(cmd_io_t *cmd_io);
+int tisci_getc(cmd_io_t *cmd_io);
 
 /**    Writes string into output buffer, is blocking when buffer is full.
  *     @param[in]      cmd_io  IO stack pointer
@@ -108,7 +94,7 @@ int buf_getc(cmd_io_t *cmd_io);
  *     @param[in]      count   Number of character to be written
  *     @return number of written characters
  */
-int buf_write(cmd_io_t *cmd_io, const void *buf, int count);
+int tisci_write(cmd_io_t *cmd_io, const void *buf, int count);
 
 /**    Reads string from input buffer, is blocking when buffer is empty.
  *     @param[in]      cmd_io  IO stack pointer
@@ -116,7 +102,7 @@ int buf_write(cmd_io_t *cmd_io, const void *buf, int count);
  *     @param[in]      count   Number of character to be read
  *     @return number of read characters
  */
-int buf_read(cmd_io_t *cmd_io, void *buf, int count);
+int tisci_read(cmd_io_t *cmd_io, void *buf, int count);
 
 #endif /* CMDIO_BUFFER_H_ */
 
index 121bc9f9ee001a3cbe6d43b796f14c00d1f2cc22..c31c6fd1564b318c8e1b5358b6b94bfe8b35cee6 100644 (file)
@@ -4,7 +4,7 @@
  *  Created on: 1.8.2012
  *      Author: Michal Horn
  *
- *  All stuff that are needed for input commands via RS-232, processing command using CmdProc library and printing output back on RS-232.
+ *  Implementation of main task for processing commands.
  *
  */
 #include "cmd_proc_freertos_tms570.h"
@@ -14,20 +14,38 @@ uint8_t* prompt;
 extern cmd_des_t const *cmd_list_main[];               // Main list of commands
 extern cmd_io_t cmd_io_std_line;               // IO stack
 
+
 void initCmdProc(unsigned portBASE_TYPE priority, uint8_t * introText, uint8_t * promptText) {
        initIoBuffer();
-       prompt = (uint8_t *)pvPortMalloc(strlen((char*)promptText));
-       strcpy((char *)prompt, (const char*)promptText);
-       xTaskCreate(processCmd, (const signed char *)"processCmd", 200, NULL, priority, processCmdHandler);
-       sciSend(sciREG, strlen((char *)introText), (uint8_t *)introText);
-       sciSend(sciREG, strlen((char *)prompt), (uint8_t *)prompt);
+       prompt = NULL;
+       if (promptText != NULL) {
+               prompt = (uint8_t *)pvPortMalloc(strlen((char*)promptText));
+               strcpy((char *)prompt, (const char*)promptText);
+       }
+       int taskRetVal;
+       if ((taskRetVal = xTaskCreate(processCmd, (const signed char *)"processCmd", 200, NULL, priority, processCmdHandler)) != pdPASS) {
+               uint8_t taskCreateError[]="FreeRTOS: Creating task processCmd failed. Error code: ";
+               print(taskCreateError, strlen((char*)taskCreateError));
+               char buf[20];
+               i2str(buf, taskRetVal, 1, 0);
+               print((uint8_t *)buf, strlen(buf));
+               print((uint8_t *)"\r\n", 2);
+               /* An error occurred, block program */
+               while(1)
+                       ;
+       }
+       if (introText != NULL)
+               print((uint8_t *)introText, strlen((char *)introText));
+       if (prompt != NULL)
+               print((uint8_t *)prompt, strlen((char *)prompt));
        sciReceive(sciREG, 1, NULL);
 }
 
 void processCmd(void *pvParameters ) {
        for (;;) {
                cmd_processor_run(&cmd_io_std_line, cmd_list_main);
-               printToOutputBuffer((uint8_t *)prompt, strlen((char*)prompt), portMAX_DELAY);
+               if (prompt != NULL)
+                       print((uint8_t *)prompt, strlen((char*)prompt));
        }
 }
 
index 101237fbbe5ff890cc2c098a91e7d8391f02c487..6edc283a1eef4c8d6b3a00bb53de3a8bddc855e7 100644 (file)
@@ -42,7 +42,7 @@ int cmd_processor_run(cmd_io_t *cmd_io, cmd_des_t const **commands)
   }
 
   if(cmd_io->priv.ed_line.out->inbuf){
-    cmd_io_putc(cmd_io,'\r');
+       cmd_io_putc(cmd_io,'\r');
     cmd_io_putc(cmd_io,'\n');
   }else if(val<0){
     char s[20];
index 6121226320a8f2a21a4062624d49faf2303b77e4..2c99a07f105cf74acb5db5bc9a552178be559c5b 100644 (file)
@@ -21,93 +21,83 @@ void initIoBuffer() {
        inBuffer.mutex = xSemaphoreCreateMutex();
        inBuffer.initialized = 1;
 }
-portBASE_TYPE printToOutputBuffer(const uint8_t * string, uint32_t length, portTickType ticks) {
-       return print(&outBuffer, string, length, ticks);
+portBASE_TYPE print(const uint8_t * string, uint32_t length) {
+       return genericPrint(&outBuffer, string, length);
 }
-portBASE_TYPE printToInputBuffer(const uint8_t * string, uint32_t length, portTickType ticks) {
-       return print(&inBuffer, string, length, ticks);
+portBASE_TYPE read(uint8_t * ch) {
+       return genericRead(&inBuffer, ch);
 }
-portBASE_TYPE readFromOutputBuffer(uint8_t * ch, portTickType ticks) {
-       return read(&outBuffer, ch, ticks);
-}
-portBASE_TYPE readFromInputBuffer(uint8_t * ch, portTickType ticks) {
-       return read(&inBuffer, ch, ticks);
-}
-portBASE_TYPE read(tBuffer* buffer, uint8_t * ch, portTickType ticks) {
+portBASE_TYPE genericRead(tBuffer* buffer, uint8_t * ch) {
+       if (!buffer->initialized) return errBUFFER_NOT_INITIALIZED;
        portBASE_TYPE ret;
-       ret = xQueueReceive(buffer->buf, ch, ticks);
+       ret = xQueueReceive(buffer->buf, ch, portMAX_DELAY);
        return ret;
 }
-portBASE_TYPE print(tBuffer* buffer, const uint8_t * string, uint32_t length, portTickType ticks) {
+portBASE_TYPE genericPrint(tBuffer* buffer, const uint8_t * string, uint32_t length) {
+       if (!buffer->initialized) return errBUFFER_NOT_INITIALIZED;
        uint32_t i = 0;
        portBASE_TYPE ret = pdPASS;
+       xSemaphoreTake(buffer->mutex, portMAX_DELAY);
        while (i < length && string[i] != '\0') {
-               ret = xQueueSend(buffer->buf, (void*)&string[i++], ticks);
+               if (xQueueSend(buffer->buf, (void*)&string[i], 0) == pdPASS) {
+                       i++;
+               }
+               else sciSend(sciREG, 1, NULL);
        }
-
+       sciSend(sciREG, 1, NULL);
+       xSemaphoreGive(buffer->mutex);
        return ret;
 }
-void clearInputBuffer() {
-       clearBuffer(&inBuffer);
+portBASE_TYPE clearInputBuffer() {
+       return clearBuffer(&inBuffer);
 }
-void clearOutputBuffer() {
-       clearBuffer(&outBuffer);
+portBASE_TYPE clearOutputBuffer() {
+       return clearBuffer(&outBuffer);
 }
-void clearBuffer(tBuffer * buffer) {
+portBASE_TYPE clearBuffer(tBuffer * buffer) {
+       if (!buffer->initialized) return errBUFFER_NOT_INITIALIZED;
        while ((xQueueReceive(buffer->buf, NULL, 0)) != errQUEUE_EMPTY) // Delete content of queue
                ;
+       return pdPASS;
 }
 
-int buf_putc(cmd_io_t *cmd_io, int ch) {
+int tisci_putc(cmd_io_t *cmd_io, int ch) {
        uint8_t c = (uint8_t)ch;
-       xSemaphoreTake(outBuffer.mutex, portMAX_DELAY);
-       if (print(&outBuffer, (uint8_t *)&c, 1, portMAX_DELAY) != pdPASS) {
-               xSemaphoreGive(outBuffer.mutex);
+       if (print((uint8_t *)&c, 1) != pdPASS) {
                return 0;
        }
-       xSemaphoreGive(outBuffer.mutex);
     return 1;
 }
 
-int buf_getc(cmd_io_t *cmd_io) {
+int tisci_getc(cmd_io_t *cmd_io) {
        uint8_t ret = '\0';
-       xSemaphoreTake(inBuffer.mutex, portMAX_DELAY);
-       if (xQueueReceive(inBuffer.buf, &ret, portMAX_DELAY) != pdPASS) {
+       if (read(&ret) != pdPASS) {
         ret = '\0';
        }
-    xSemaphoreGive(inBuffer.mutex);
     return ret;
 }
-int buf_write(cmd_io_t *cmd_io, const void *buf, int count) {
+int tisci_write(cmd_io_t *cmd_io, const void *buf, int count) {
     const char *tmpBuf = buf;
-    int i = 0;
-       xSemaphoreTake(outBuffer.mutex, portMAX_DELAY);
-    while (i < count) {
-       print(&outBuffer, (uint8_t *)&tmpBuf[i], 1, portMAX_DELAY);
-       i++;
-    }
-    xSemaphoreGive(outBuffer.mutex);
-    return i;
+       if (print((uint8_t *)tmpBuf, count) != pdPASS)
+               return 0;
+    return count;
 }
-int buf_read(cmd_io_t *cmd_io, void *buf, int count) {
+int tisci_read(cmd_io_t *cmd_io, void *buf, int count) {
     char *tmpBuf = buf;
     int i = 0;
-       xSemaphoreTake(inBuffer.mutex, portMAX_DELAY);
-
     while (i < count) {
-       if (xQueueReceive(inBuffer.buf, &tmpBuf[i], 0) != pdPASS)
+       if (read((uint8_t *)&tmpBuf[i]) != pdPASS)
                break;
        i++;
     }
-       xSemaphoreGive(inBuffer.mutex);
     return i;
 }
 
 /* Setting io stack for cmdProc */
 cmd_io_t cmd_io_buf={
-    buf_putc,
-    buf_getc,
-    buf_write,
-    buf_read
+       tisci_putc,
+       tisci_getc,
+       tisci_write,
+       tisci_read
 };
 
index cb476e7bf0fc0f2dd1dbcc72a0963e4366cb1214..5736fd50e32bb5c9cfc02f8b44b9061bbb093f80 100644 (file)
@@ -28,19 +28,19 @@ int cmd_do_testopchar(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]
   if(opchar<0) return opchar;
   char str[] = {"\r\ncmd_do_testopchar called\r\nparam[0]="};
 
-  printToOutputBuffer((uint8_t *)str, strlen(str), portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)param[0], strlen(param[0]), portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)"\r\nparam[1]=", 11, portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)param[1], strlen(param[1]), portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)"\r\nparam[2]=", 11, portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)param[2], strlen(param[2]), portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)"\r\nparam[3]=", 11, portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)param[3], strlen(param[3]), portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)"\r\nopchar=", 9, portMAX_DELAY);
+  print((uint8_t *)str, strlen(str));
+  print((uint8_t *)param[0], strlen(param[0]));
+  print((uint8_t *)"\r\nparam[1]=", 11);
+  print((uint8_t *)param[1], strlen(param[1]));
+  print((uint8_t *)"\r\nparam[2]=", 11);
+  print((uint8_t *)param[2], strlen(param[2]));
+  print((uint8_t *)"\r\nparam[3]=", 11);
+  print((uint8_t *)param[3], strlen(param[3]));
+  print((uint8_t *)"\r\nopchar=", 9);
   char opcharBuf[4];
   i2str(opcharBuf, opchar, 1, 10);
-  printToOutputBuffer((uint8_t *)opcharBuf, strlen(opcharBuf), portMAX_DELAY);
-  printToOutputBuffer((uint8_t *)"\r\n", 2, portMAX_DELAY);
+  print((uint8_t *)opcharBuf, strlen(opcharBuf));
+  print((uint8_t *)"\r\n", 2);
   return 0;
 }
 
@@ -49,13 +49,13 @@ int cmd_do_testparam(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 
          char str[] = {"cmd_do_testparam called\r\nparam[0]="};
 
-         printToOutputBuffer((uint8_t *)str, strlen(str), portMAX_DELAY);
-         printToOutputBuffer((uint8_t *)param[0], strlen(param[0]), portMAX_DELAY);
-         printToOutputBuffer((uint8_t *)"\r\nparam[1]=", 11, portMAX_DELAY);
-         printToOutputBuffer((uint8_t *)param[1], strlen(param[1]), portMAX_DELAY);
-         printToOutputBuffer((uint8_t *)"\r\nparam[2]=", 11, portMAX_DELAY);
-         printToOutputBuffer((uint8_t *)param[2], strlen(param[2]), portMAX_DELAY);
-         printToOutputBuffer((uint8_t *)"\r\n", 2, portMAX_DELAY);
+         print((uint8_t *)str, strlen(str));
+         print((uint8_t *)param[0], strlen(param[0]));
+         print((uint8_t *)"\r\nparam[1]=", 11);
+         print((uint8_t *)param[1], strlen(param[1]));
+         print((uint8_t *)"\r\nparam[2]=", 11);
+         print((uint8_t *)param[2], strlen(param[2]));
+         print((uint8_t *)"\r\n", 2);
 
          return 0;
 }
@@ -68,7 +68,7 @@ int cmd_do_testerror(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 int cmd_do_test(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 {
        char str[] = {"This is the simplest command\r\n"};
-       printToOutputBuffer((uint8_t *)str, strlen(str), portMAX_DELAY);
+       print((uint8_t *)str, strlen(str));
 
        return 0;
 }
index 0778f69a8bfcc80fcade24b8f691db6617edeaa9..a737780b179af1a7fff103ac7c814e7d5d0b15b6 100644 (file)
@@ -73,8 +73,13 @@ void memoryPort1TestFailNotification(uint32_t groupSelect, uint32_t dataSelect,
 \r
 void sciNotification(sciBASE_t *sci, uint32_t flags)     \r
 {\r
+/*  enter user code and remove the while loop... */\r
 /* USER CODE BEGIN (29) */\r
-       sciReceive(sci, 1, NULL);\r
+       if (sci == sciREG) {\r
+               if (flags & SCI_RX_INT) {\r
+                       sciReceive(sci, 1, NULL);\r
+               }\r
+       }\r
 /* USER CODE END */\r
 \r
 }\r
index bcbbc8bee548cf5f272a75fbdeaa031ca2f13baf..ce3d08b4c450e67285e1559358c71defa807d49a 100644 (file)
 /* USER CODE END */\r
 \r
 #include "sci.h"\r
+\r
+/* USER CODE BEGIN (1) */\r
 #include "cmdio_tisci.h"\r
 #include "os_queue.h"\r
 \r
-/* USER CODE BEGIN (1) */\r
+extern tBuffer outBuffer;\r
+extern tBuffer inBuffer;\r
+static uint32_t receiveError;\r
 /* USER CODE END */\r
 /** @struct g_sciTransfer\r
 *   @brief Interrupt mode globals\r
@@ -27,11 +31,6 @@ struct g_sciTransfer
     uint8_t *data;\r
 } g_sciTransfer[2];\r
 \r
-extern tBuffer outBuffer;\r
-extern tBuffer inBuffer;\r
-static uint32_t receiveError;\r
-static uint32_t sendError;\r
-\r
 \r
 /** @fn void sciInit(void)\r
 *   @brief Initializes the SCI Driver\r
@@ -234,25 +233,47 @@ void sciSend(sciBASE_t *sci, uint32_t length, uint8_t *data)
     int index = sci == sciREG ? 0 : 1;\r
 \r
 /* USER CODE BEGIN (11) */\r
+    /* Using interrupt, does not work. Sometimes a character is lost */\r
+//    if ((g_sciTransfer[index].mode & SCI_TX_INT) != 0)\r
+//    {\r
+        /* start transmit by sending first byte */\r
+//     uint8_t byte = 0;\r
+//     if (xQueueReceiveFromISR(outBuffer.buf, (uint8_t *)&byte, NULL) == pdPASS) {\r
+//            sci->TD     = byte;\r
+//            sci->SETINT = SCI_TX_INT;\r
+//     }\r
+//    }\r
+//   else\r
+//    {\r
+        /* send the data *///\r
+//    while (length-- > 0)\r
+//        {\r
+//            while ((sci->FLR & SCI_TX_INT) == 0) { /* wait */ };\r
+//            sci->TD = *data++;\r
+//        }\r
+//    }\r
 /* USER CODE END */\r
 \r
     if ((g_sciTransfer[index].mode & SCI_TX_INT) != 0)\r
     {\r
-        /* start transmit by sending first byte */\r
-       uint8_t byte;\r
-       if (xQueueReceiveFromISR(outBuffer.buf, (uint8_t *)&byte, NULL) == pdPASS) {\r
-            sci->TD     = byte;\r
-            sci->SETINT = SCI_TX_INT;\r
-       }\r
-       else sendError++;\r
+        /* we are in interrupt mode */\r
+        \r
+        g_sciTransfer[index].length = length;\r
+        g_sciTransfer[index].data   = data;\r
+\r
+        /* start transmit by sending first byte */        \r
+        sci->TD     = *g_sciTransfer[index].data++;\r
+        sci->SETINT = SCI_TX_INT;\r
     }\r
     else\r
     {\r
         /* send the data */\r
-        while (length-- > 0)\r
+        while (xQueueIsQueueEmptyFromISR(outBuffer.buf) != pdTRUE)\r
         {\r
             while ((sci->FLR & SCI_TX_INT) == 0) { /* wait */ };\r
-            sci->TD = *data++;\r
+            uint8_t byte;\r
+            xQueueReceiveFromISR(outBuffer.buf, (void *)&byte, NULL);\r
+            sci->TD = byte;\r
         }\r
     }\r
 \r
@@ -340,13 +361,32 @@ int sciReceiveByte(sciBASE_t *sci)
 void sciReceive(sciBASE_t *sci, uint32_t length, uint8_t *data)\r
 {\r
 /* USER CODE BEGIN (16) */\r
+    if (sci->SETINT & SCI_RX_INT)\r
+    {\r
+        /* clear error flags */\r
+        sci->FLR = SCI_FE_INT | SCI_OE_INT | SCI_PE_INT;\r
+\r
+    }\r
+    else\r
+    {   \r
+        while (length-- > 0)\r
+        {\r
+            while ((sci->FLR & SCI_RX_INT) == 0) { /* wait */ };\r
+            *data++ = sci->RD;\r
+        }\r
+    }\r
 /* USER CODE END */\r
 \r
     if (sci->SETINT & SCI_RX_INT)\r
     {\r
+        /* we are in interrupt mode */\r
+        int index = sci == sciREG ? 0 : 1;\r
+        \r
         /* clear error flags */\r
         sci->FLR = SCI_FE_INT | SCI_OE_INT | SCI_PE_INT;\r
 \r
+        g_sciTransfer[index].length = length;\r
+        g_sciTransfer[index].data   = data;\r
     }\r
     else\r
     {   \r
@@ -465,8 +505,6 @@ void sciHighLevelInterrupt(void)
     uint32_t vec = sciREG->INTVECT0;\r
 \r
 /* USER CODE BEGIN (26) */\r
-/* USER CODE END */\r
-\r
     switch (vec)\r
     {\r
     case 1:\r
@@ -487,7 +525,7 @@ void sciHighLevelInterrupt(void)
 \r
     case 11:\r
         /* receive */\r
-        {   uint32_t byte = sciREG->RD;\r
+        {   uint8_t byte = sciREG->RD;\r
                if (xQueueSendFromISR(inBuffer.buf, (void*)&byte, NULL) == errQUEUE_FULL)\r
                        receiveError++;\r
                sciNotification(sciREG, SCI_RX_INT);\r
@@ -496,23 +534,38 @@ void sciHighLevelInterrupt(void)
 \r
     case 12:\r
         /* transmit */\r
-               {\r
-                       uint8_t byte;\r
-                       if (xQueueReceiveFromISR(outBuffer.buf, (uint8_t *)&byte, NULL) == pdPASS) {\r
-                               sciREG->TD = byte;\r
-                       sciNotification(sciREG, SCI_TX_INT);\r
-                       }\r
-                       else {\r
-                               sciREG->CLRINT = SCI_TX_INT;\r
-                       }\r
-                       break;\r
-               }\r
+       /* using interrupt, does not work properly, sometimes a character is lost */\r
+ /*    if (xQueueIsQueueEmptyFromISR(outBuffer.buf) == pdTRUE) {\r
+               sciREG->CLRINT = SCI_TX_INT;\r
+               sciNotification(sciREG, SCI_TX_INT);\r
+       }\r
+       else {\r
+               uint8_t byte = 0;\r
+               xQueueReceiveFromISR(outBuffer.buf, (uint8_t *)&byte, NULL);\r
+               while (sciIsTxReady(sciREG) == 0)\r
+                       ;\r
+                       sciREG->TD     = byte;\r
+       }\r
+ */\r
+        /* transmit */\r
+        if (--g_sciTransfer[0].length > 0)\r
+        {\r
+            sciREG->TD = *g_sciTransfer[0].data++;\r
+        }\r
+        else\r
+        {\r
+            sciREG->CLRINT = SCI_TX_INT;\r
+            sciNotification(sciREG, SCI_TX_INT);\r
+        }\r
+        break;\r
 \r
-    default:\r
+     default:\r
         /* phantom interrupt, clear flags and return */\r
         sciREG->FLR = ~sciREG->SETINTLVL & 0x07000303;\r
         break;\r
     }\r
+/* USER CODE END */\r
+\r
 /* USER CODE BEGIN (27) */\r
 /* USER CODE END */\r
 }\r
@@ -525,7 +578,6 @@ void sciHighLevelInterrupt(void)
 void sciLowLevelInterrupt(void)\r
 {\r
     uint32_t vec = sciREG->INTVECT1;\r
-\r
 /* USER CODE BEGIN (28) */\r
 /* USER CODE END */\r
 \r
@@ -550,24 +602,30 @@ void sciLowLevelInterrupt(void)
     case 11:\r
         /* receive */\r
         {   uint32_t byte = sciREG->RD;\r
-               if (xQueueSendFromISR(inBuffer.buf, (void *)&byte, NULL) == errQUEUE_FULL)\r
-                       receiveError++;\r
-               sciNotification(sciREG, SCI_RX_INT);\r
+\r
+            if (g_sciTransfer[0].length > 0)\r
+            {\r
+                *g_sciTransfer[0].data++ = byte;\r
+                g_sciTransfer[0].length--;\r
+                if (g_sciTransfer[0].length == 0)\r
+                {\r
+                    sciNotification(sciREG, SCI_RX_INT);\r
+                }\r
+            }\r
         }\r
         break;\r
 \r
     case 12:\r
         /* transmit */\r
-       {\r
-                       uint8_t byte;\r
-                       if (xQueueReceiveFromISR(outBuffer.buf, (uint8_t *)&byte, NULL) == pdPASS) {\r
-                               sciREG->TD = byte;\r
-                               sciNotification(sciREG, SCI_TX_INT);\r
-                       }\r
-                       else {\r
-                               sciREG->CLRINT = SCI_TX_INT;\r
-                       }\r
-       }\r
+        if (--g_sciTransfer[0].length > 0)\r
+        {\r
+            sciREG->TD = *g_sciTransfer[0].data++;\r
+        }\r
+        else\r
+        {\r
+            sciREG->CLRINT = SCI_TX_INT;\r
+            sciNotification(sciREG, SCI_TX_INT);\r
+        }\r
         break;\r
 \r
     default:\r
index cb35d7ab611ef24f8673bda379e148828b9c9386..9dd707d824d1bce77892ed16f638fa29666242e3 100644 (file)
 \r
 \r
 void main(void)\r
-       {\r
+{\r
 /* USER CODE BEGIN (3) */\r
        sciInit();\r
-       initCmdProc(1, (uint8_t*)"\r\nType commands\r\n", (uint8_t *)"--> ");\r
        _enable_IRQ();\r
+       initCmdProc(1, (uint8_t*)"\r\nType commands\r\n", (uint8_t *)"--> ");\r
 \r
        vTaskStartScheduler();\r
        //We should never get here\r