No, I didn't use that option. This option should fix it. Thanks a lot. Thomas
On Tue, Jan 20, 2015 at 5:37 PM, Albert ARIBAUD <albert.u.b...@aribaud.net> wrote: > Hello Dashi Cao, > > On Tue, 20 Jan 2015 14:12:35 +0800, Da Shi Cao <dscao...@gmail.com> > 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! > > U-Boot follows the ARM EABI, in which ""The role of register r9 is > platform specific". In U-Boot r9 is specifically used for the global > data structure, and the standalone programs must follow this EABI. > > If your standalone program is built with the same options as U-Boot > example standalone programs are (see hellow_world), then it should > have gcc option -ffixed-r9 which will prevent the compiler from ever > touching r9. > > How exactly do you build your standalone application? > >> My version is U-Boot 2014.10 >> >> Regards, >> Dashi Cao > > Amicalement, > -- > Albert. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot