Jump to content

Recommended Posts

Posted

Hi,

I´m working in a project that uses a console to facilitate the process of displaying messages on the screen.

I´m using  a compiler optimization for make the screen update faster. When I use the optimization, the console works OK. Without optimization, only the first line of the console is written, the second line is left blank.

Could the slower update of the screen cause this behavior?

This problem only happens when I use the console during startup. During normal operation, the problem does not occur, even without using compiler optimization. But using optimization, it never happens.

 

Thanks in advance.

Posted

That's interesting.

Could you please leave some detailed information of the compiler you're using and also your build flags?

 

4 hours ago, Rafael Zingler said:

This problem only happens when I use the console during startup.

What does that mean? Can you please give some more details?

Posted

I´m using Keil uVision 5 IDE with de default compiler.

Below are the build flags for optimization level 0:

-c --cpu Cortex-M3 -g -O0 --apcs=interwork --split_sections -I ../Biblioteca/ARM/FreeRTOS_10.0.0.1/Source/include -I ./application -I 

And those of optimization level 2, with the option "Optimize for time" enabled:

-c --cpu Cortex-M3 -g -O2 -Otime --apcs=interwork --split_sections -I ../Biblioteca/ARM/FreeRTOS_10.0.0.1/Source/include -I ./application -I

When I talked about startup, I meant that is when writing is done inside the FreeRTOS initialization task (vApplicationDaemonTaskStartupHook function). In this case, the console fails to write text at the second line with optimization level 0.

Normal operation means using the console within other FreeRTOS tasks (it then works OK, no matter the optimization level).

Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...