问题描述
我从并将其安装在我的Windows 10 PC上.
I downloaded the toolchain "gcc-arm-none-eabi-6-2017-q2-update-win32-sha1.exe" (Windows) from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads and installed it on my Windows 10 PC.
安装文件夹中的" ../share/doc/gcc-arm-none-eabi/"中包含release.txt,该信息表明:
The installation folder contains a release.txt in "../share/doc/gcc-arm-none-eabi/" which tells:
- newlib和newlib-nano: git://sourceware.org/git/newlib-cygwin.git commit 0d79b021a4ec4e6b9aa1a9f6db0e29a137005ce7
- newlib and newlib-nano : git://sourceware.org/git/newlib-cygwin.git commit 0d79b021a4ec4e6b9aa1a9f6db0e29a137005ce7
" ../share/doc/gcc-arm-none-eabi/"中的readme.txt包含:
And also the readme.txt in "../share/doc/gcc-arm-none-eabi/" contains:
此工具链与两个基于C的预构建C库一起发布 newlib:一个是标准的newlib(libc.a),另一个是 newlib-nano(libc_nano.a)以获得代码大小.
This toolchain is released with two prebuilt C libraries based on newlib: one is the standard newlib (libc.a) and the other is newlib-nano (libc_nano.a) for code size.
现在我要完全重建" ../arm-none-eabi/lib/thumb "
Now I want exactly rebuild all the libc.a and libc_nano.a contained in "../arm-none-eabi/lib/thumb"
目前,我可以使用" gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 "在Ubuntu上构建
At the moment I can build on Ubuntu with "gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2"
$ # Downloaded newlib-cygwin (with corresponding hash) into folder newlib-cygwin
$ mkdir build
$ cd build
$ ../newlib-cygwin/configure --target=arm-none-eabi --disable-newlib-supplied-syscalls
$ make
我如何配置newlib来构建gcc-arm-none-eabi-6-2017-q2-update-linux.tar中包含的libc.a和libc_nano.a的精确副本. bz2?
$ # Downloaded newlib-cygwin (with corresponding hash) into folder newlib-cygwin
$ mkdir build
$ cd build
$ ../newlib-cygwin/configure --target=arm-none-eabi --???
$ make
推荐答案
如果我对您的理解正确,那么一个更详细的问题是:
在构建gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2归档文件中随附的newlib库时,"GNU Arm嵌入式工具链"开发人员使用了哪些配置选项?
这些用于newlib:
If i understand you correctly, a more detailed question is:
What configure options did 'GNU Arm Embedded Toolchain' developers used when building newlib libraries shipped in gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 archive?
These ones for newlib:
--target=arm-none-eabi --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-supplied-syscalls --disable-nls
这些是newlib-nano的:
And these ones for newlib-nano:
--target=arm-none-eabi --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls
我怎么知道的?让我们看一下整个过程:
这些软件包基于 launchpad 构建,您可以在其中找到所有构建发生在lanuchpad上.我选择了 gcc-arm-none-eabi 6 -2017年10月24日的-2017q2-1 .在这里我可以找到 buildlog .我用| grep "^+ " | grep "configure " | grep 'src/newlib'
复制了构建日志,然后留下了:
How I got it? Let's walk through the process:
These packages are build on launchpad, where from you find all the builds that took place on lanuchpad. I picked gcc-arm-none-eabi 6-2017q2-1 from 2017-10-24. There i can find the buildlog. I grepped the buildlog with | grep "^+ " | grep "configure " | grep 'src/newlib'
and i was left with:
+ /<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/install-native --infodir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-supplied-syscalls --disable-nls+ /<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/build-native/target-libs --disable-newlib-supplied-syscalls --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls
+ /<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/install-native --infodir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-supplied-syscalls --disable-nls+ /<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/build-native/target-libs --disable-newlib-supplied-syscalls --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls
一些福尔摩斯和我推断出第二行是配置为newlib-nano(--enable-newlib-reent-small
)的newlib,第一行是配置为完整的newlib的newlib.
为了回答您的主题问题,以相同的方式将我上面发布的选项传递给newlib ./configure
脚本,以重新编译newlib和newlib-nano.
A bit of Sherlock Holmes and i deduced that the second line is newlib configured to build as newlib-nano (--enable-newlib-reent-small
), the first is newlib configured to build as full newlib.
To answer your topic question, to recompile newlib and newlib-nano the same way pass the options I have posted above to newlib ./configure
script.
这篇关于如何重建GNU Arm嵌入式工具链的newlib和newlib-nano的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!