773 views
in System Integration by
Dear all,

I'm using SW4STM32 IDE environment. I had an issue about using an empty string ("") when the optimization for size is active. The target control panel shows XXXXXX (characters how if the font is not recognized) in the text box where the empty string has to be used. Of course, in case of the optimization in not used, the empty strung is correctly working.

Could you help us please?

Best regards

Gianni Perugini

1 Answer

0 votes
by
Hi Gianni,

of course, we try to help you. First of all, some questions:

Can you please post the entire set of compiler flags that you are using?

What do you mean with 'target control panel'?

Does the text box show XXXXX or some empty boxes?

How do you create that string - is it a string constant or is it created during runtime?

Best regards,

Manfred.
by

Hi Manfred,

thanks for you fast reply.

- Attached the capture screen of the compiler flags...

-mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 -DUSE_HAL_DRIVER -DSetLanguages1 -DDEBUG -DEW_MAX_SURFACE_CACHE_SIZE=0x200000 -DEW_USE_OFFSCREEN_BUFFER=0 -DEW_SURFACE_ROTATION=0 -DEW_MAX_GLYPH_SURFACE_WIDTH=256 -DEW_MAX_GLYPH_SURFACE_HEIGHT=256 -DEW_USE_DOUBLE_BUFFER=1 -DEW_USE_FREE_RTOS=1 -DEW_MCU_LOAD_MEASURING=0 -DEW_USE_QSPI_FLASH=1 -

- Target control panel is our device. Our projects is a control panel.... And in a text box of this panel happens this issue (only in case of an empty string).

-the text box shows the strange simbols you see below in your example:

image

- the empty string is returned by a function... Somenthing like this: return (XString) "";

Hope this help

Many Thanks

Best regards

Gianni

 

 

by
Hi Manfred,

 

i forgot to say that in case the optimization level is 3 (instead of "for size") the issue is not present

Best regards

Gianni
by

Hi Gianni,

are you formatting a string with float values? In this case, please have a look to the article discussing about string formatting.

Especially, the "-u _printf_float" compiler option can help.

Btw: Which version of Embedded Wizard and the Build Environment are you using?

Manfred.

by

Hi Manfred,

thanks for your reply.

No, we aren't formatting string with float values. Should we try to do it?

Our Embedded Wizard version is 8.20 and Build Environment version is

Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500

Thanks

Best regards

Gianni

by
Hi Gianni,

there is no need to test with float values - it was just an idea, because we noticed some troubles with floats by some compilers / optimization levels in the past.

I think we have a compiler problem here - but it is difficult to find the root cause for that. Can you post the code snippet how you create the string?

Can you reproduce the problem within our provided GCC Build Environment (e.g. within a modified example)?

In general, let me recommend to update to the latest version - this is always helpful to get the latest improvements and bug-fixes. The migration from 8.20 to 8.30 (or 9.00) should be easy.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...