rwayan 发表于 2006-5-17 23:41:17

may bug on UART???

It's not in the port, it's hardcoded into the Skyeye Makefile.
About the bug, unfortunately I don't really remember what was going on,
except that somehow, when reading the US_RHR char, the value
returned by at91rm92_io_read_word() was 0xff, not the actual value. But I
never understood where the value got changed. It should be 100% reproductible
on any FreeBSD/i386. Just compile Skyeye with -O2, and you shouldn't be able
to fully use the UART.

Cheers,

大虾们可以具体联系Olivier Houchard <[email protected]>

因为我是skyeye 的 porter 所以他们把信发给我了,我想应该发给斑竹更合适吧。

rwayan 发表于 2006-5-18 10:22:00

找到原因了

初步估计是
那个函数里面的强制类型转换代码和gcc 的优化不兼容。

编译选项-O2 -fno-strict-aliasing
可以通过。

建议走查一下那个函数的强制类型转换部分。
也可以看看-fstrict-aliasing的文档。
看看有没有办法规避。

总的感觉,strict-aliasing的优化不是很必要,可以在makefile中用
-fno-strict-aliasing关闭。
页: [1]
查看完整版本: may bug on UART???