TIVA emWin RemoveFreeBlock

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • TIVA emWin RemoveFreeBlock

    All,
    I've integrated emWIN in my TIVA project with TI-RTOS.

    I'm using windows manager with memdev option and my application consist of a semi-static screen with an update every one second (only text fields).

    The issue I see is that after a random time of free running (from 30 sec to 31 h) an exception rise up on my TIVA C129 and in my exception call stack I see:
    RemoveFreeBlock
    AddFreeBlock
    Gui_Alloc

    The exception signalled by ARM is number 11 (SVCAll exception), and my debug version of the program let me see this message on my debug window:
    Illegal memory operation in RemoveFreeBlock().

    Is there a way to prevent the exception? Beside, is there a way to manage the exception (e.g. Gui-reinit, ...)

    Thanks in advance,
    Regards,
    Marco Crivellari


    PS:
    I see this issue also in my simulator version of the GUI, but as I said before, it's very random.
    For sure, I close every window before create new one, because I know I have to reduce RAM consumption.
  • Hi Adrian.

    Below my code, this is the sample that I call every 1 second.


    HWinMain is the handle of foreground window.


    if( hWinMain )


    {

    //

    // Live display

    //


    hItem = WM_GetDialogItem(hWinMain, ID_TEXT_3);

    strcpy( tmpString, appMain.config.message.general.live_display_1 );

    strcat( tmpString, ": " );

    AppDataGetTemperature( tmpValue, appData.test.control.t_current, 1 );


    strcat( tmpString, tmpValue );

    TEXT_GetText( hItem, tmpValue, 40 );

    if( strcmp( tmpValue, tmpString) != 0 )


    {

    TEXT_SetText(hItem, tmpString );

    }


    hItem = WM_GetDialogItem(hWinMain, ID_TEXT_4);

    strcpy( tmpString, appMain.config.message.general.live_display_2 );

    strcat( tmpString, ": " );

    AppDataGetTime( tmpValue, (appData.test.control.elapsedTime / OS_BASE_MILLISEC), 1 );


    strcat( tmpString, tmpValue );

    TEXT_GetText( hItem, tmpValue, 40 );

    if( strcmp( tmpValue, tmpString) != 0 )


    {

    TEXT_SetText(hItem, tmpString );

    }


    //

    // Stations

    //

    for( i=0; i<appData.test.setup.num_of_stations; i++ )


    {

    floatToStr( appData.test.station.displacement, tmpString, 3 );


    AppDataGetLinearUnit( tmpUnit, tmpString );

    TEXT_GetText( hTextDispl[i], tmpValue, 20 );

    if( strcmp( tmpValue, tmpString) != 0 )


    {

    TEXT_SetText( hTextDispl[i], tmpString );

    }


    floatToStr( appData.test.station[i].temperature, tmpString, 2 );


    AppDataGetTempUnit( tmpUnit, tmpString );

    TEXT_GetText( hTextTemp[i], tmpValue, 20 );

    if( strcmp( tmpValue, tmpString) != 0 )


    {

    TEXT_SetText( hTextTemp[i], tmpString );

    }

    }

    }


    Let me know.

    MC