[U-Boot] printf and R9 in ARM architecture

Marek Vasut marex at denx.de
Tue Jan 20 11:56:52 CET 2015


On Tuesday, January 20, 2015 at 07:12:35 AM, Da Shi Cao wrote:
> In standalone applications, it seems that the execution of printf
> function in U-Boot is dependent on the value of register R9, which is
> setup in app_startup. But r9 can be used by your program at the
> decision of gcc compilation which is not aware of this dependence.
> This is especially the case if +O2 is used!

+CC the experts who probably broke it ;-)

Shouldn't you compile your standalone application with something like -ffixed-r9 
?

Best regards,
Marek Vasut


More information about the U-Boot mailing list