This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM Keil error #17 expected a “]”

I am trying to build a program on Keil µVision v.5.12.

The errors seems to be only "one" (expecting a ]) .

Rebuild target 'Target 1'
compiling ax.c...
ax.c: Warning: C3910W: Old syntax, please use '--c99'.
23_2\fixvector3d.h(30): warning:  #1-D: last line of file ends without a newline
  #endif
23_2\fixquat.h(73): warning:  #1-D: last line of file ends without a newline
  #endif
23_2\fixstring.h(21): warning:  #1-D: last line of file ends without a newline
  #endif
23_2\ax.c(46): error:  #17: expected a "]"
        mf16 Adew =  {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(47): error:  #17: expected a "]"
                     {[0 ... DIM-    1] = fix16_from_int(0)},
23_2\ax.c(48): error:  #17: expected a "]"
                     {[0 ... DIM-    1] = fix16_from_int(0)}}};
23_2\ax.c(58): error:  #17: expected a "]"
        mf16 sqrtD = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(59): error:  #17: expected a "]"
                     {[0 ... DIM-    1] = fix16_from_int(0)},
23_2\ax.c(60): error:  #17: expected a "]"
                     {[0 ... DIM-    1] = fix16_from_int(0)}}};
23_2\ax.c(64): error:  #17: expected a "]"
        mf16 transE = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(65): error:  #17: expected a "]"
                       {[0 ... DIM-    1] = fix16_from_int(0)},
23_2\ax.c(66): error:  #17: expected a "]"
                       {[0 ... DIM-    1] = fix16_from_int(0)}}};
23_2\ax.c(70): error:  #17: expected a "]"
        mf16 inv_eigenvectors = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(71): error:  #17: expected a "]"
                         {[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(72): error:  #17: expected a "]"
                        {[0 ... DIM-1] = fix16_from_int(0)}}};
23_2\ax.c(76): error:  #17: expected a "]"
        mf16 eigenvectors = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(77): error:  #17: expected a "]"
                     {[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(78): error:  #17: expected a "]"
                       {[0 ... DIM-1] = fix16_from_int(0)}}};
23_2\ax.c(82): error:  #17: expected a "]"
        mf16 whiteningMatrix = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(83): error:  #17: expected a "]"
                       {[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(84): error:  #17: expected a "]"
                   {[0 ... DIM-1] = fix16_from_int(0)}}};
23_2\ax.c(88): error:  #17: expected a "]"
        mf16 dewhiteningMatrix = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(89): error:  #17: expected a "]"
                       {[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(90): error:  #17: expected a "]"
                      {[0 ... DIM-1] = fix16_from_int(0)}}};
23_2\ax.c(94): error:  #17: expected a "]"
        mf16 Bold = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(95): error:  #17: expected a "]"
                      {[0 ... DIM-    1] = fix16_from_int(0)},
23_2\ax.c(96): error:  #17: expected a "]"
                       {[0 ... DIM-    1] = fix16_from_int(0)}}};
23_2\ax.c(100): error:  #17: expected a "]"
        mf16 tempMatrixOne = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(101): error:  #17: expected a "]"
                           {[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(102): error:  #17: expected a "]"
                   {[0 ... DIM-1] = fix16_from_int(0)}}};
23_2\ax.c(106): error:  #17: expected a "]"
        mf16 tempMatrixTwo = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(107): error:  #17: expected a "]"
                         {[0 ... DIM-1] = fix16_from_int(0)},
23_2\ax.c(108): error:  #17: expected a "]"
                   {[0 ... DIM-1] = fix16_from_int(0)}}};
assembling startup_ARMCM0.s...
compiling system_ARMCM0.c...
system_ARMCM0.c: Warning: C3910W: Old syntax, please use '--c99'.
".\Objects\ax.axf" - 30 Error(s), 5 Warning(s).

** The part of my code where the errors appear to be

mf16 Adew =  {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                            {[0 ... DIM-1] = fix16_from_int(0)},
                            {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_Adew;
ptr_Adew = &Adew;

mf16 identity = {DIM, DIM, 0, {{fix16_from_int(1),fix16_from_int(0),fix16_from_int(0)},
                               {fix16_from_int(0),fix16_from_int(1),fix16_from_int(0)},
                               {fix16_from_int(0),fix16_from_int(0),fix16_from_int(1)}}};
mf16 *ptr_identity;
ptr_identity = &identity;

mf16 sqrtD = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                            {[0 ... DIM-1] = fix16_from_int(0)},
                            {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_sqrtD;
ptr_sqrtD = &sqrtD;

mf16 transE = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                            {[0 ... DIM-1] = fix16_from_int(0)},
                            {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_transE;
ptr_transE = &transE;

mf16 inv_eigenvectors = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                                       {[0 ... DIM-1] = fix16_from_int(0)},
                                       {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_inv_eigenvectors;
ptr_inv_eigenvectors = &inv_eigenvectors;

mf16 eigenvectors = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                                   {[0 ... DIM-1] = fix16_from_int(0)},
                                   {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_eigenvectors;
ptr_eigenvectors = &eigenvectors;

mf16 whiteningMatrix = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                                      {[0 ... DIM-1] = fix16_from_int(0)},
                                      {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_whiteningMatrix;
ptr_whiteningMatrix = &whiteningMatrix;

mf16 dewhiteningMatrix = {DIM, DIM, 0, {{[0 ... DIM-1] = fix16_from_int(0)},
                                        {[0 ... DIM-1] = fix16_from_int(0)},
                                        {[0 ... DIM-1] = fix16_from_int(0)}}};
mf16 *ptr_dewhiteningMatrix;
ptr_dewhiteningMatrix = &dewhiteningMatrix;

What did i do wrong? (am i forgeting anything setting up my keil project?, perhaps a .h? or is the [0 ... dimension] declaring my matrices? )

Parents
  • Sorry but I am new with all this and I try to learn as fast as I can.

    The ranger [ 0 ... Dim ] is not acceptable obviously by the compiler.
    I initialized my matrices otherwise and now that error disappeared.

    But now I get this....

    Rebuild target 'Target 1'
    compiling ax.c...
    ax.c: Warning: C3910W: Old syntax, please use '--c99'.
    23_2\fixvector3d.h(30): warning:  #1-D: last line of file ends without a newline
      #endif
    23_2\fixquat.h(73): warning:  #1-D: last line of file ends without a newline
      #endif
    23_2\fixstring.h(21): warning:  #1-D: last line of file ends without a newline
      #endif
    assembling startup_ARMCM0.s...
    compiling system_ARMCM0.c...
    system_ARMCM0.c: Warning: C3910W: Old syntax, please use '--c99'.
    linking...
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_div (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_mul (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_smul (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_sqrt (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_fill (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_mul (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_mul_at (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_mul_s (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_qr_decomposition (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_solve (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_sub (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_transpose (referred from ax.o).
    Not enough information to list image symbols.
    Finished: 1 information, 0 warning and 12 error messages.
    ".\Objects\ax.axf" - 12 Error(s), 5 Warning(s).
    Target not created.
    

Reply
  • Sorry but I am new with all this and I try to learn as fast as I can.

    The ranger [ 0 ... Dim ] is not acceptable obviously by the compiler.
    I initialized my matrices otherwise and now that error disappeared.

    But now I get this....

    Rebuild target 'Target 1'
    compiling ax.c...
    ax.c: Warning: C3910W: Old syntax, please use '--c99'.
    23_2\fixvector3d.h(30): warning:  #1-D: last line of file ends without a newline
      #endif
    23_2\fixquat.h(73): warning:  #1-D: last line of file ends without a newline
      #endif
    23_2\fixstring.h(21): warning:  #1-D: last line of file ends without a newline
      #endif
    assembling startup_ARMCM0.s...
    compiling system_ARMCM0.c...
    system_ARMCM0.c: Warning: C3910W: Old syntax, please use '--c99'.
    linking...
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_div (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_mul (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_smul (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol fix16_sqrt (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_fill (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_mul (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_mul_at (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_mul_s (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_qr_decomposition (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_solve (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_sub (referred from ax.o).
    .\Objects\ax.axf: Error: L6218E: Undefined symbol mf16_transpose (referred from ax.o).
    Not enough information to list image symbols.
    Finished: 1 information, 0 warning and 12 error messages.
    ".\Objects\ax.axf" - 12 Error(s), 5 Warning(s).
    Target not created.
    

Children