cancel
Showing results for 
Search instead for 
Did you mean: 

code on simulator and on board have different behaviour

Zui
Senior

I'm using the stm32H750 eval board, in my project i'm showing the date, with this piece of code:

Unicode::snprintf(mainScreenDateMonthTextBuffer, MAINSCREENDATEMONTHTEXT_SIZE, "%s", L"Gen");

i'm printing on screen Gen for Genuary.

That works fine on simulator, but on board only "G" is shown...

any idea why this happens?

Thanks

4 REPLIES 4
cameronf
Senior

Are you calling invalidate() for the TextArea as well?

Can you breakpoint in your code to see what's in mainScreenDateMonthTextBuffer to see if that get's overwritten somewhere?

Zui
Senior

yes i'm calling invalidate right after, in fact the text change when it has to, but just shown 1 letter instead of 3 (months name ), but in simulator all three letters are shown.

Martin KJELDSEN
Chief III

Any progress on this? I think i need to see your project. There's no obvious reason why this would happen.

/Martin

Zui
Senior

i just created a bunch of resurces and switching between them. still no idea why simulator and board behave differently with snprintf