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.
Which means, if you compile newlib with default GCC cflags, this code will
be used, and LDR STR instruction may access unaligned address.
My system has disabled CPU unaligned access by setting SCTRL.A to 1, this
setting will enable unaligned address checking, once unaligned address is
accessed by LDR STR instruction, CPU enters DATA ABORT mode.

I have re-compiled this toolchain according to my requirements by adding
-mno-unalinged-access to CFLAGS of newlib.
This option makes newlib use C version of memcpy, which is a little slower
than the NEON version, but it generates code without any unaligned access.

Maxim Kuvyrkov <maxim.kuvyr...@linaro.org> 于 2017年11月15日周三 21:04写道:

>
> > On Nov 10, 2017, at 11:04 AM, 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"
>
> Hi Yupeng,
>
> Linaro's arm-eabi toolchain provides libraries only for
> -mfloat-abi=softfp.  I'm surprised your baremetal application compiled with
> -mfloat-abi=hard linked against provided newlib.  Can there be another
> library installed that the tools picked up?
>
> >
> > 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!!
>
>
> --
> Maxim Kuvyrkov
> www.linaro.org
>
>
>
>
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to