Skip to main content
Zui
Senior
Question

code on simulator and on board have different behaviour

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

This topic has been closed for replies.

4 replies

cameronf
Associate

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
ZuiAuthor
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
Principal III

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

/Martin

Zui
ZuiAuthor
Senior

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