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.

Migrating StellarisWare to TivaWare - compiler error #18 [solved]

Hi,


I had a problem with migrating my project from StellarisWare to TivaWare.

After this the compiler throwed error #18 several times in the file "ustdlib.h".

Here is an example error:

compiling ustdlib.c...
..\..\TivaWareM4C\utils/ustdlib.h(55): error:  #18: expected a ")"
  extern int usnprintf(char * restrict s, size_t n, const char * restrict format,


The related source lines are these:

extern int usnprintf(char * restrict s, size_t n, const char * restrict format,
                     ...);

StellarisWare also contains a file "ustdlib.c", which also has a line break. But compiling this causes no error.


Hy help of people in the Keil forum I got a solution:

Enable the "C99 Mode" checkbox in the project settings and the errors are gone.

I re-post it here, because maybe it's useful for others.


The people of the Keil forum also had the idea to add "use strict" to the file "ustdlib.h", but I don't want to modify files inside of the TivaWare framework.

If interested, here is the link to the thread in the Keil forum:
http://www.keil.com/forum/58608

  • I, and many others I'm sure, appreciate your attitude about sharing useful information.  That said, I think you deserve to know this post is a bit out of place.  This forum is for compilers supplied by TI.  Conversely, I do not expect to find any tips about the TI ARM compiler in the Keil forum.  Perhaps the day will come when we decide to discuss other ARM compilers in this forum.  But that day is not here yet.

    Thanks and regards,

    -George