I downloaded and installed these 4 packages using pacman.
I compiled the same example project, and it seems to be working fine!
Just as a detail, the final binary have 11252bytes.
Thank you.
]]>fyi: you can use arm-none-eabi-objdump to disassemble the binaries. It is easier to compare assembler than hex dumps.
]]>I installed the following packages:
- arm-none-eabi-binutils-2.24-2-x86_64.pkg.tar.xz
- arm-none-eabi-gcc-4.9.2-1-x86_64.pkg.tar.xz
- arm-none-eabi-newlib-2.1.0-1-any.pkg.tar.xz
Binary: 11048 bytes
Then I removed :
- arm-none-eabi-newlib-2.1.0-1-any.pkg.tar.xz
and installed:
- arm-none-eabi-newlib-nano-2.1-1-any.pkg.tar.xz
Binary: 11048 bytes
Both binaries work pretty well on the target.
In order to compare, I saved both binaries on another folder, and then compared:
cmp nano.bin norm.bin
- nano.bin norm.bin differ: byte 1157, line 6
Going further, I 'hexdumped' them, and found 2 different lines:
00000480 b0 0d 00 20 00 01 00 20
00000480 b0 0d 00 20 80 00 00 20
00000830 80 00 00 20 00 25 00 00
00000830 84 00 00 20 00 25 00 00
So, they are 3 bits different each other. But different.
Build with 'Lauchpad' toolchain:
Binary: 10864 bytes (1,6% smaller)
So, the important stuff:
1) Both Arch versions worked fine now.
2) The two Arch binaries are slightly different, but different.
Thank you for fixing this!
]]>http://pkgbuild.com/~anatolik/arm-embedded/
Let me know if you see any issues.
]]>I plan to look at the Linaro toolchain and make something similar with Arch packages.
]]>About the processor support, i found a document on this launchpad site that says what architectures they support. It may help somehow:
https://launchpadlibrarian.net/186123405/readme.txt
Thanks for the help!
]]>>>Does TI TM4C123glx uses Cortex F4? My stm32 discoveryf4 has the same CPU and Arch toolchain works fine.
Sorry, I am not familiar with the meaning of Cortex F4. If I guess right, and the F is about a FPU, this processor have one (Cortex-M4F).
>> Get the PKGBUILD from ABS, apply the patch and rebuild the *-gcc. Let me know if it makes any difference.
I am a little unfamiliar with ABS, so I will say what I have done:
# abs community/arm-none-eabi-gcc
cp -r /var/abs/community/arm-none-eabi-gcc/ .
cd arm-none-eabi-gcc/
(pasted the patch on anatolik.patch)
patch PKGBUILD anatolik.patch
makepkg
# pacman -U arm-none-eabi-gcc-4.9.1-1-x86_64.pkg.tar.xz
cd <source_folder>/examples/boards/ek-tm4c123gxl/qs-rgb
make clean all
##Output##########################
CC ../drivers/buttons.c
CC ../../../../utils/cmdline.c
In file included from /usr/arm-none-eabi/include/string.h:10:0,
from ../../../../utils/cmdline.c:34:
/usr/arm-none-eabi/include/_ansi.h:16:24: fatal error: sys/config.h: No such file or directory
#include <sys/config.h>
^
compilation terminated.
../../../../makedefs:174: recipe for target 'gcc/cmdline.o' failed
make: *** [gcc/cmdline.o] Error 1
#################################
$ whereis arm-none-eabi-gcc
> arm-none-eabi-gcc: /usr/bin/arm-none-eabi-gcc /usr/share/man/man1/arm-none-eabi-gcc.1.gz
When I change the PATH to include the other toolchain:
make clean all
##Output##########################
CC ../drivers/buttons.c
CC ../../../../utils/cmdline.c
CC qs-rgb.c
CC ../drivers/rgb.c
CC rgb_commands.c
CC startup_gcc.c
CC ../../../../utils/uartstdio.c
CC ../../../../utils/ustdlib.c
LD gcc/qs-rgb.axf
################################
Did I miss something?
]]>The -nano project goal is provide smaller footprint in probably the reason of smaller binary with linaro toolchain.
Index: PKGBUILD
===================================================================
--- PKGBUILD (revision 121494)
+++ PKGBUILD (working copy)
@@ -8,6 +8,7 @@
pkgrel=1
#_snapshot=4.9-20140604
_newlibver=2.1.0
+_newlibnanover=2.1
pkgdesc='The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target'
arch=(i686 x86_64)
url='http://gcc.gnu.org/'
@@ -18,12 +19,12 @@
options=(!emptydirs !strip staticlibs)
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
#ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.bz2
- ftp://sourceware.org/pub/newlib/newlib-$_newlibver.tar.gz
+ https://github.com/32bitmicro/newlib-nano-2/archive/newlib-nano-$_newlibnanover.zip
gcc-multilib.patch
gcc-no-exceptions.patch
libgloss-configure-fix.patch)
sha256sums=('d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e'
- '3e4d5ab9f0508942b6231b8ade4f8e5048cf92c96ed574c2bd6bd3320a599a48'
+ '51cdc44ff7821837701316e4145d48b2dc27e43713f88194f6f147c6f09651a9'
'998d1face674cc8d1af5bf28ded15caaaa18936a28f278123448f29555a07775'
'7f59b28475aa2018a7edfb81ea81444a6eb098fd3847d8e605809ae6fbeabde5'
'eac96c034d3d7d16080d9aef4749e4eda493563a3348e6a06f08e8a330b027ba')
@@ -36,7 +37,7 @@
prepare() {
# Apply configure fix from newlib CVS
- cd "$srcdir/newlib-$_newlibver/libgloss/arm"
+ cd "$srcdir/newlib-nano-2-newlib-nano-$_newlibnanover/libgloss/arm"
patch -Np0 -i "$srcdir/libgloss-configure-fix.patch"
autoreconf
@@ -47,8 +48,8 @@
patch -Np0 -i "$srcdir"/gcc-no-exceptions.patch
# Move newlib and libgloss to gcc source directory
- mv "$srcdir"/newlib-$_newlibver/newlib "$srcdir/$_basedir"
- mv "$srcdir"/newlib-$_newlibver/libgloss "$srcdir/$_basedir"
+ mv "$srcdir"/newlib-nano-2-newlib-nano-$_newlibnanover/newlib "$srcdir/$_basedir"
+ mv "$srcdir"/newlib-nano-2-newlib-nano-$_newlibnanover/libgloss "$srcdir/$_basedir"
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" "$srcdir"/$_basedir/{libiberty,gcc}/configure
export CFLAGS_FOR_TARGET='-O2 -g -pipe'
export CXXFLAGS_FOR_TARGET='-O2 -g -pipe'
../configure --target=$_target \
--prefix=/usr \
--libexecdir=/usr/lib \
--with-pkgversion='Arch Repository' \
--with-bugurl='https://bugs.archlinux.org/' \
--enable-multilib \
--enable-interwork \
--enable-languages=c,c++ \
--with-newlib \
--with-gnu-as \
--with-gnu-ld \
--disable-nls \
--disable-shared \
--disable-threads \
--with-headers=newlib/libc/include \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-libmudflap \
--disable-libgomp \
--with-system-zlib \
--disable-newlib-supplied-syscalls
That does not tell me much about which processors are supported. You might contact the developer who supports it via the mail lists, or leave a bug report for the package.
Edit: A little slow on the posting. I see a developer beat me here
]]>Does TI TM4C123glx uses Cortex F4? My stm32 discoveryf4 has the same CPU and Arch toolchain works fine.
]]>I was using the 'arm-none-eabi-gcc' package from 'comunity' on Arch Linux in order to compile some projects to my TI TM4C123gxl.
In order to test the compiler, I rebuild a pre-build example sent with the 'Tivaware' software package (qs-rgb). The compilation was smooth, but the final binary didn't run on the board. (about 14KB)
After that, I downloaded a toolchain from this website:
https://launchpad.net/gcc-arm-embedded
Which also ships an 'arm-none-eabi-gcc'.
The compilation with the toolchain above could generate a binary that could run on my board. (about 10KB)
At first, I thought it was a bug, and I was on my way to file a bug report. But then I remember that this toolchain can be build with several different options, so I need to ask:
Do your package have support to this target? (TI TM4C123glx)
Is there a difference between the two toolchains that I should have noticed?
Sorry if my questions are some obvious things. I have no much information about toolchain building.
If you need any more informations about this, I will be happy to send you.
If you prefer I open a bug report, I will be happy to do so.
Thank you!
]]>