This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS编译报错

Other Parts Discussed in Thread: MATHLIB

CCS编译报错这是什么意思?

* Build of configuration Debug for project lvboqi3 ****

"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building file: ../main.c'
'Invoking: C5500 Compiler'
"C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin/cl55" -v5501 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/include" --include_path="C:/Documents and Settings/Administrator/workspace_v5_3/DSPLib" --include_path="C:/Documents and Settings/Administrator/workspace_v5_3/MathLib" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/lib" --define=c5501 --display_error_number --diag_warning=225 --ptrdiff_size=32 --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\0906410", ERROR! at line 331:
[E9999]
Syntax Error
SWBP 0

"C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\0906410", ERROR! at line 331:
[E9999]
Invalid mnemonic specified
SWBP 0

2 Assembly Errors, No Assembly Warnings

Errors in Source - Assembler Aborted

>> Compilation failure

>> Compilation failure
gmake: *** [main.obj] Error 1
gmake: Target `all' not remade because of errors.

  • 提示SWBP 0语法错误

    请问用的是哪款器件?331行的代码怎么写的?

  • 首先谢谢你。

    用的CCS5.3.0仿真,做一个低通滤波器。低通滤波器的数据是利用matlab工具箱构造后导出的。编译后一直报上面的错误,求指点一下,谢谢。

    代码如下

    #include "math.h"

    #include "mathlib.h"
    #include "dsplib.h"

    #define SW_BREAKPOINT asm(" SWBP 0 ");

    #define PI 3.1415926535
    #define F_TOL (1e-06)

    #define Tn 1024
    #define Fs 550.0
    #define N 208

    #pragma DATA_ALIGN(FIR_In, 8);
    float FIR_In[Tn];

    #pragma DATA_ALIGN(FIR_Out, 8);
    float FIR_Out[Tn];

    #pragma DATA_ALIGN (B, 8);
    const float B[N] =
    {
    6.993425121624e-05,0.0008460561705483,-0.0004243169271607,-0.000697225760403,
    0.0002146752412384,-0.0002274397268771,0.0008292180935224,0.0005666619599084,
    -0.001269362550762,-0.0001179597794801,2.374444369195e-18,0.0001306626441659,
    0.001557655711691,-0.0007705135569073,-0.001249827094343,0.0003801726875973,
    -0.0003981939306948, 0.0014361768302,0.0009714782403292,-0.002155280213632,
    -0.0001984643844947,-1.451284349052e-17,0.0002161546638289, 0.002556772058488,
    -0.001255382702506,-0.002021989635634,0.0006109304044068,-0.000635810634553,
    0.002279273662328, 0.001532863315785,-0.003382020597476,-0.0003097933903089,
    8.199945544384e-18,0.0003341287459232, 0.003934372124454,-0.001923498099929,
    -0.00308547161774, 0.000928652746499,-0.0009629368942695, 0.003440029679458,
    0.002305951448647,-0.005072098529429,-0.0004632661906692,-3.056139014066e-17,
    0.0004970603079287, 0.005839275083487,-0.002848674479928,-0.004560572136405,
    0.001370178208178,-0.001418492382139, 0.005060307795842, 0.003387906025789,
    -0.007444186905378,-0.000679347271386,-1.00745020429e-17,0.0007280982297872,
    0.008551295055431, -0.00417156703236, -0.00667964523825, 0.002007641777333,
    -0.002079755710528, 0.00742580429849, 0.004977242414339, -0.01095166750741,
    -0.001001107354505,-1.156965257881e-17, 0.001077499457835, 0.01268779384025,
    -0.006207696217329,-0.009972891946314, 0.003008573509455,-0.003129504600371,
    0.01122512603539, 0.007561911948616, -0.01673191811982,-0.001538917842277,
    -1.278982485235e-17, 0.001680040035755, 0.01994525357769,-0.009846622903488,
    -0.01597609102477, 0.004872300241818,-0.005129245608751, 0.0186428072543,
    0.01274379406201, -0.02865788658865,-0.002683638300101,-1.36529628946e-17,
    0.003056773931659, 0.03721471755862, -0.01890174973652, -0.03167347777844,
    0.01002250647212, -0.01100919246649, 0.04204304594086, 0.03046289257186,
    -0.07343776124872,-0.007483853265208,-1.409998586339e-17, 0.01084157915159,
    0.1582872010363, -0.1044841639302, -0.269398408481, 0.2345916022397,
    0.2345916022397, -0.269398408481, -0.1044841639302, 0.1582872010363,
    0.01084157915159,-1.409998586339e-17,-0.007483853265208, -0.07343776124872,
    0.03046289257186, 0.04204304594086, -0.01100919246649, 0.01002250647212,
    -0.03167347777844, -0.01890174973652, 0.03721471755862, 0.003056773931659,
    -1.36529628946e-17,-0.002683638300101, -0.02865788658865, 0.01274379406201,
    0.0186428072543,-0.005129245608751, 0.004872300241818, -0.01597609102477,
    -0.009846622903488, 0.01994525357769, 0.001680040035755,-1.278982485235e-17,
    -0.001538917842277, -0.01673191811982, 0.007561911948616, 0.01122512603539,
    -0.003129504600371, 0.003008573509455,-0.009972891946314,-0.006207696217329,
    0.01268779384025, 0.001077499457835,-1.156965257881e-17,-0.001001107354505,
    -0.01095166750741, 0.004977242414339, 0.00742580429849,-0.002079755710528,
    0.002007641777333, -0.00667964523825, -0.00417156703236, 0.008551295055431,
    0.0007280982297872,-1.00745020429e-17,-0.000679347271386,-0.007444186905378,
    0.003387906025789, 0.005060307795842,-0.001418492382139, 0.001370178208178,
    -0.004560572136405,-0.002848674479928, 0.005839275083487,0.0004970603079287,
    -3.056139014066e-17,-0.0004632661906692,-0.005072098529429, 0.002305951448647,
    0.003440029679458,-0.0009629368942695, 0.000928652746499, -0.00308547161774,
    -0.001923498099929, 0.003934372124454,0.0003341287459232,8.199945544384e-18,
    -0.0003097933903089,-0.003382020597476, 0.001532863315785, 0.002279273662328,
    -0.000635810634553,0.0006109304044068,-0.002021989635634,-0.001255382702506,
    0.002556772058488,0.0002161546638289,-1.451284349052e-17,-0.0001984643844947,
    -0.002155280213632,0.0009714782403292, 0.0014361768302,-0.0003981939306948,
    0.0003801726875973,-0.001249827094343,-0.0007705135569073, 0.001557655711691,
    0.0001306626441659,2.374444369195e-18,-0.0001179597794801,-0.001269362550762,
    0.0005666619599084,0.0008292180935224,-0.0002274397268771,0.0002146752412384,
    -0.000697225760403,-0.0004243169271607,0.0008460561705483,6.993425121624e-05
    };

    void FIRTest();

    int main(void)
    {
    FIRTest();

    SW_BREAKPOINT;
    }

    void FIRTest(void)
    {
    unsigned int i;
    for (i=0;i<Tn;i++)
    FIR_In[i]=0.5*sin(2*PI*150*(i/Fs))+0.2*sin(2*PI*250*(i/Fs))+sin(2*PI*50*(i/Fs));

    DSPF_sp_fir_r2(FIR_In,B,FIR_Out,N,Tn);
    }

  • 请问你用是C5000系列的DSP吗?

    我看了一下C55x汇编指令集里没有SWBP指令。
    http://www.ti.com/lit/ug/spru374g/spru374g.pdf

  • 再次谢谢您!

    我仿真选的是C5409根据你说的换了一个C6000系列的编译通过了。

    但我用另一种方法,就是将main.c文件,fdacoefs.h文件,.cmd文件和.lib文件添加到同一个文件夹下。不好意思,我刚开始学习DSP也不知道描述的你能不能听明白?用的是C5000系列的。

    main.c的代码如下:

    #include<stdio.h>
    #include <stdint.h>
    #include<fdacoefs.h>
    #define N 30
    #define length 200
    long yn;
    int input[length];
    int output[length];
    void main() {
    int m, n;
    int *x;
    for (n = 0; n < length - 1; n++) {
    x = &input[n];
    yn = 0;
    for (m = 0; m < N - 1; m++)
    yn += B[m] * (*(x++));
    output[n] = yn;
    }
    while (1)
    ;
    }

    用matlab工具箱生成fdacoefs.h文件。

    fdacoefs.h的代码如下:

    /*
    * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
    * Generated by MATLAB(R) 8.3 and the Signal Processing Toolbox 6.21.
    * Generated on: 04-Jul-2016 09:30:25
    */

    /*
    * Discrete-Time FIR Filter (real)
    * -------------------------------
    * Filter Structure : Direct-Form FIR
    * Filter Length : 31
    * Stable : Yes
    * Linear Phase : Yes (Type 1)
    */

    /* General type conversion for MATLAB generated C-code */
    #include "tmwtypes.h"
    /*
    * Expected path to tmwtypes.h
    * F:\matlab2014\extern\include\tmwtypes.h
    */
    const int BL = 31;
    const real64_T B[31] = {
    0.0006199552659816, 0.002003236485352, 0.004023117311283, 0.005471854054303,
    0.004177310774629,-0.002094041075858, -0.01393643659197, -0.0286005239546,
    -0.03947698514831, -0.03768537597198, -0.01567424723313, 0.02854686252937,
    0.08869890751199, 0.1508633095011, 0.1977801599795, 0.2152471523067,
    0.1977801599795, 0.1508633095011, 0.08869890751199, 0.02854686252937,
    -0.01567424723313, -0.03768537597198, -0.03947698514831, -0.0286005239546,
    -0.01393643659197,-0.002094041075858, 0.004177310774629, 0.005471854054303,
    0.004023117311283, 0.002003236485352,0.0006199552659816
    };

    但是我编译的时候显示错误:


    **** Build of configuration Debug for project lvboqi ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin/cl55" -v5509A --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/include" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/include" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/lib" --include_path="C:/Documents and Settings/Administrator/workspace_v5_3/DSPLib" --include_path="F:/matlab2014/extern/include" --include_path="C:/Documents and Settings/Administrator/workspace_v5_3/lvboqi" --define=c5509a --display_error_number --diag_warning=225 --ptrdiff_size=32 --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    "C:/Documents and Settings/Administrator/workspace_v5_3/lvboqi/fdacoefs.h", line 23: error #20: identifier "real64_T" is undefined
    1 error detected in the compilation of "../main.c".

    >> Compilation failure
    gmake: *** [main.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    求你帮我指点一下,谢谢您!

  • 1.代码编译跟用的什么仿真器没有关系。SWBP是设置软件断点的功能,建议去掉。

    2. 从报错信息看,real64_T没有定义,你要定义一下。 

  • fdacoefs.h文件是我用matlab工具箱生成低通滤波器导出的,怎么定义呢?在哪里定义?

  • matlab和ccs代码不兼容的,建议联系一下mathworks看怎么移植matlab到ccs。

    www.mathworks.com

  • 好的,谢谢您。我去问一下。

  • 你好,请问这是什么错误?


    **** Build of configuration Debug for project lvboqi3 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: C5500 Compiler'
    "C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin/cl55" -v5501 --memory_model=large -g --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/include" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/lib/rts55x.lib" --include_path="C:/Documents and Settings/Administrator/workspace_v5_3/DSPLib" --include_path="C:/Documents and Settings/Administrator/workspace_v5_3/MathLib" --include_path="C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin" --define=c5501 --display_error_number --diag_warning=225 --ptrdiff_size=32 --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building target: lvboqi3.out'
    'Invoking: C5500 Linker'
    "C:/ti/ccsv5/tools/compiler/c5500_4.4.1/bin/cl55" -v5501 --memory_model=large -g --define=c5501 --display_error_number --diag_warning=225 --ptrdiff_size=32 -z -m"lvboqi3.map" --stack_size=0x200 --heap_size=0x400 -i"C:/ti/ccsv5/tools/compiler/c5500_4.4.1/lib" --reread_libs --display_error_number --warn_sections --rom_model --sys_stacksize=0x200 -o "lvboqi3.out" "./main.obj" -l"libc.a" -l"C:\ti\ccsv5\tools\compiler\c5500_4.4.1\lib\rts55x.lib" -l"C:\ti\ccsv5\tools\compiler\c5500_4.4.1\lib\rts55h.lib" "../lnk.cmd"
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    _DSPF_sp_fir_r2 ./main.obj
    _main C:\ti\ccsv5\tools\compiler\c5500_4.4.1\lib\rts55x.lib<args_main.obj>

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "lvboqi3.out" not built

    >> Compilation failure
    gmake: *** [lvboqi3.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • symbol没有定义,具体看下面的error说明。
    http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/10234

     

  • CCS6.2  新建的工程  型号C66XX单核的  TCL6616  写完程序编译之后有错误  图在附件  我是想编译之后仿真下  不用连板子