Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: Guix problem printf

$
0
0
Hi When I use a sprintf in a guix event the system crashes. There is a solution in https://en-us.knowledgebase.renesas.com/English_Content/Renesas_Synergy%E2%84%A2_Platform/Renesas_Synergy_Knowledge_Base/What_are_the_specifications_for_the_DK-S3A7_V2_LCD_Panel%3F/How_do_I_port_code_to_ThreadX_and_SSP%3F/Why_do_I_get_a_system_crash_when_using_printf()_with_a_GUIX_and_Dave_2D_implementation%3F   to change the heap location for Dave2D. That works. For a while. When executing the same code for the second time the system still gets corrupted. No crash anymore but a status error .I see very strange values in the debugger. It must still be a stack problem.  typedef struct {     GX_ICON icon;     GX_PROMPT name;     GX_PROMPT value;     GX_PROMPT units;     char valbuf[20]; } menuRow_t; menuRow_t menuRowBuffer[LIST_VISIBLE_ROWS + 1]; name , value and units are childs of icon icon is a child of a vertical_list part of code: menuRow_t *row; status |= gx_icon_pixelmap_set (&row- icon, background, GX_PIXELMAP_ID_ROW_SELECTED); if (status)  //here hang       while (1) sprintf (&row- valbuf, "%1.1f", pConf- value);  // the criminal function     //    strcpy (row- valbuf,"122" ); // ok  status |= gx_prompt_text_set (&row- value, (GX_CHAR*) row- valbuf);  row points to one of the menuRowBuffer items. When the status is not zero (8190)  the row  and other variables are corrupt. without the sprintf ok.

Viewing all articles
Browse latest Browse all 59170

Trending Articles