Skip to main content
Zui
Senior
July 31, 2019
Question

code on simulator and on board have different behaviour

  • July 31, 2019
  • 4 replies
  • 1006 views

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
July 31, 2019

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
August 1, 2019

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
August 14, 2019

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
August 29, 2019

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