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.

CCSv5.x/GCC memset issue.

Hello,

I've tried to use GNU C which is bundled with CCSv5 for developing on Stellaris LM4F120XL launchpad board and I've observed the problem with memset function, which shows as the call to memset always ends in FaultISR handler. Duplication of this issue is easy, I've modified hello example provided by StellarisWare/TivaWare and add

    static uint8_t   buffer[100];

somewhere on top of hello.c file and into the main I've added:

    memset(buffer, 0, sizeof(buffer));

Of course unmodifed/vanilla hello example compiled by GNU C works well. Once I've added the code using memset into it, it faults. I'm using hello.ld and startup_gcc.c provided by the hello example.

Any idea what may be wrong here is highly appreciated!

Thanks!

Karel

PS: memset addition works perfectly well while compiled by ARM compiler and using the same example just for ARM compiler...

  • Hi,

    Did you tried an #include <string.h> at the beginning of the code, and set a path to the include folder of this file and link with the suitable library? 

    Petrei

  • Hi Petrei,

    I've added inclusion of string.h, but this does not help. I guess if this file is not found, the compiler will complain about it. The file is distributed with GNU C anyway, so I guess GNU C knows where to find it. The libraries I link into the hello demo are driver-cm4f and c.

    Thanks!
    Karel