Re: arm-eabi toolchain memcpy using hard float causing unaligned access

2017-11-15 Thread Yupeng Chang
Hi Maxim, Linaro's arm-eabi toolchain is compiled with option --enable-multilib In the libc folder, you can find all other different libraries. I have found the reason causing my problem. Newlib implementation of memcpy-armv7a.S uses NEON and it requires "unaligned access" is enabled by the CPU. W

Re: arm-eabi toolchain memcpy using hard float causing unaligned access

2017-11-15 Thread Maxim Kuvyrkov
> On Nov 10, 2017, at 11:04 AM, Yupeng Chang wrote: > > Hi Linaro Team, > I'm currently using toolchain > gcc-linaro-7.1.1-2017.08-x86_64_arm-eabi.tar.xz > > to > develop m

Re: arm-eabi toolchain memcpy using hard float causing unaligned access

2017-11-10 Thread Yupeng Chang
The test code for this issue is as below: int main(int argc, char *argv[]) { uint8_t abc[40] = {0}; uint8_t def[40] = {1}; for (uint32_t i = 0; i < sizeof(abc); ++ i) { printf("Copying %u bytes, Dest Address: %p, Source Address: %p\n", sizeof(def) - i, &abc[i], &def[i]); memc

arm-eabi toolchain memcpy using hard float causing unaligned access

2017-11-10 Thread Yupeng Chang
Hi Linaro Team, I'm currently using toolchain gcc-linaro-7.1.1-2017.08-x86_64_arm-eabi.tar.xz to develop my bera-metal programs. My compile option is "-marm -march=armv7-a -mt