[U-Boot] Question about ARM compiler optimization problem
Choe, Hyun-ho
firebird at legend.co.kr
Thu Nov 20 17:27:03 CET 2008
Hello, everyone.
Currently, I'm working on ARM922T-based board.(In fact, U-Boot is
already ported on that board, Kendin/Micrel KS8695P.)
While, modifying configuration to fit on my new board, I found
that /drivers/mtd/cfi_flash.c is not properly working when -Os
optimization flag is applied.
In function flash_toggle(), following code always gets same result.
retval = flash_read??(addr) != flash_read??(addr);
When I re-compiled this code with -O0 option, it works well.
even -O1 or -O2 is not helpful.
I think that is not so clean way to be done, is there any way to
overcome this behaviour?
Following is my test environment.
gcc : 3.4.4 / 4.2.1 arm-linux toolchain
- used for uClinux, distributed by http://www.snapgear.org/
Processor : ARM922T Micrel KS8695P
NOR Flash : STMicro M29W640FT (64Mbit 16bit buswidth)
Regards,
Choe, Hyun-ho
More information about the U-Boot
mailing list