Skip to main content
manto.1
Associate III
March 31, 2022
Question

Screen Glitches every 20 seconds if G++ optimization for Debug turned on

  • March 31, 2022
  • 5 replies
  • 1083 views

Why does the screeen glitch for a moment every 20 second when G++ optimization for Debug turned on. If optimization is turned off then it works fine.

This topic has been closed for replies.

5 replies

TDK
March 31, 2022

If changing the optimization level leads to poor behavior, there is typically a bug in the code somewhere that is causing issues. Poor cache management, and variables not declared as volatile that should be are possible causes.

"If you feel a post has answered your question, please click ""Accept as Solution""."
manto.1
manto.1Author
Associate III
April 1, 2022

Do you have any idea what could produce glitches on regular 20 seconds interval. I disabled all other RTOS tasks and interupts not related to LCD.

TDK
April 1, 2022

You haven't given me much to work with here. What does your program do? What does "glitch" mean exactly? Is the screen actively changing or remaining static? Do you do anything at ~20sec intervals?

"If you feel a post has answered your question, please click ""Accept as Solution""."
manto.1
manto.1Author
Associate III
April 6, 2022

I found out that if I disable instruction cache the glitch disapears. Now the question remains why does the glitch apear when the instruction cache is enabled and optimization for debuging is on in g++.