Hardware 版 (精华区)

发信人: edmcgy (达达尼), 信区: Hardware
标  题: DSP(Data Signal Processor)的应用(23)
发信站: 紫 丁 香 (Thu Apr 23 16:06:18 1998), 转信

 Workaround/Solution

 WORKAROUND/SOLUTION
 ===================
  
 Extract boot.asm from your rts.src:
  
         dspar -x rts.src boot.asm
  
 Perform the following edits.  Replace this code:
  
 ****************************************************************************
 * CONST COPY ROUTINE - COPIES THE .const SECTION FROM PROGRAM TO DATA MEMORY
 ****************************************************************************
         .if CONST_COPY
 const_copy:
  
 ****************************************************************************
 * C2x/C2xx VERSION - MUST USE 'RPT *' BECAUSE RPTK COUNT ISN'T BIG ENOUGH
 ****************************************************************************
         .if     .tms32025 | .tms3202xx
         LALK    #__const_length         ; load length of const section
         BZ      quit                    ; if 0, quit
         LRLK    AR2,#__const_run        ; AR2 = const address in data
         LALK    #__const_length-1       ; load length - 1
         SACL    *                       ; write to temp
  
         RPT     *,AR2                   ; repeat length times
         BLKP    #__const_load,*+        ; block copy from program
  
         LARP    AR1                     ; restore ARP to SP
 quit:
         RET                             ; return
         .endif ; .tms32025 | .tms3202xx
  
 With the following code:
  
 ****************************************************************************
 * CONST COPY ROUTINE - COPIES THE .const SECTION FROM PROGRAM TO DATA MEMORY
 ****************************************************************************
         .if CONST_COPY
 const_copy:
  
 ****************************************************************************
 * C2x/C2xx VERSION - CAN'T USE RPT.  COUNTER IS ONLY 8-BITS WIDE
 ****************************************************************************
         .if     .tms32025 | .tms3202xx
         LARP    AR3
         LRLK    AR3,#__const_length     ; AR3 = length of section
         BANZ    cont,*-,AR2             ; Check for zero and decrement
         B       quit                    ; if (zero) quit
 cont:
         LRLK    AR2,#__const_run        ; AR2 = const address in data
         LALK    #__const_load           ; ACC = const address in program
 cloop:
         TBLR    *+,AR3                  ; copy from program to data
         ADDK    1                       ; increment program address
         BANZ    cloop,*-,AR2            ; check for zero and decrement
 quit:
         LARP    AR1                     ; restore ARP to SP
         RET                             ; return
         .endif ; .tms32025 | .tms3202xx
  
 Assemble the new boot.asm:
  
         dspa -v2xx boot.asm  OR  dspa -v25 boot.asm
  
 Archive into the object library:
  
         dspar -r rts2xx.lib boot.obj  OR  dspar -r rts25.lib boot.obj
  
 The C50 is unaffected by this bug.  Don't forget the source library:
  
         dspar -r rts.src boot.asm







DOCUMENTATION DEFECTS

 Title: There is a bug in the sample program listed on pg 1-26 of the Getting
 Bug #
                                                                   Tool
                                                                                                                                           Version
                                                                                                                                                                                     Fixed?
 SDSsq02490
                                                                   Documentation
                                                                                                                                           V6.60
                                                                                                                                                                                     Will fix in a future release
 Bug Description

 BUG DESCRIPTION
 ===============
  
   The example C program shown on pg 1-26 of the  TMS320C1x/2x/2xx/C5x
 Code Generation Tools (Release 6.60) Getting Started Guide, shows
 incorrect C syntax. This program will not compile correctly as written.
  
 e.g.
  
      /*************************************************************/
      /*                       function.c                          */
      /*              (Sample file for walkthrough)                */
      /*************************************************************/
  
      main()
      {
           int x = -3             <===== Statement missing closing ";" X="abs_func(X)" <="====" Statement missing closing ";" } <="====" Note: Symbol "X" should be "x" int abs_func(int i) int i; <="====" Mix of old K&R and ANSI style func def { int 
temp="i;" if (temp < 0) temp *="-1;" return (temp); } 

 

--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: edmcgy.hit.edu.c]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.431毫秒