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]);
       memcpy(&abc[i], &def[i], sizeof(def) - i);
   }
}

If &abc[i] or &def[i] is not 4 bytes aligned, the whole system hangs.


On Fri, Nov 10, 2017 at 4:04 PM Yupeng Chang <chang...@gmail.com> wrote:

> Hi Linaro Team,
> I'm currently using toolchain
> gcc-linaro-7.1.1-2017.08-x86_64_arm-eabi.tar.xz
> <https://releases.linaro.org/components/toolchain/binaries/latest/arm-eabi/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 -mtune=cortex-a9
> -mlittle-endian -mfloat-abi=hard -mfpu=neon"
>
> I found an issue, when I use memcpy, and if the DEST or SOURCE address is
> not 4 bytes aligned, the system hangs.
> It seems that this toolchain doesn't support using hard float and NEON ?
>
> My question is does this toolchain support hard float and NEON in the
> newlib C library?
> If I want to use hard float and NEON, how can I do that?
>
> Your reply is more appreciated!!
>
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to