Building toolchain for arm cortex m3

classic Classic list List threaded Threaded
10 messages Options
César Raúl Mamani Choquehuanca César Raúl Mamani Choquehuanca
Reply | Threaded
Open this post in threaded view
|

Building toolchain for arm cortex m3

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

It sounds like you do not have arm-elf-gcc in your path (check if you  
can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that  
directory above, make sure you do this, and then redo the ../configure  
stage for newlib.

Hope that helps..

-jsnyder

On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

> hi all
>
> I trying to building toolchain for arm cortex-m3 Im doing that with  
> the tutorial for www.giga.puc-rio.br/elua. I have successful in  
> BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have  
> the next messagem
>
> $ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-
> mcpu=cortex-m3 -mthumb -D__thumb2__"
>
> /cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -
> DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -
> DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -
> I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-
> builtin      -ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-
> dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/
> argz/'`dummy.c
> /bin/bash: arm-elf-cc: command not found
> make[5]: *** [lib_a-dummy.o] Error 127
> make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib/libc/argz'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib/libc'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib'
> make[1]: *** [all-target-newlib] Error 2
> make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build'
> make: *** [all] Error 2
> cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$
>
> I am a new ubuntu user and i dont know what happend
>
> thx
>
> --
> César R. Mamani Ch.
> Estudante da Mestrado
> Pontificia Universidade Catolica
> Rio da Janeiro - Gavea
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

smime.p7s (5K) Download Attachment
César Raúl Mamani Choquehuanca César Raúl Mamani Choquehuanca
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os 
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256 
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256 
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build
$ cd build
$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared
$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>
It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

Hello Cesar,
   Don't forget to do a:

scons board=EK-LM3S8962 prog -c

before a new:

scons board=EK-LM3S8962 prog

This "cleans" the temporary files generated by the last build.

Best
Dado




On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os 
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256 
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256 
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1

make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build
$ cd build
$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>

It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

Hello folks,
   I am checking the same tutorial that Cesar used and indeed, I'm having the same error as he did.
   Before that, on the step 4 of the newlib build (autoconf), I also had to fix on config/override.m4:
  [m4_define([_GCC_AUTOCONF_VERSION], [2.59])])  

but changing the version to 2.63, instead of the 2.59 stated on the text.
For some reason, arm-elf-cc doesn't seem to be created by the previous build steps and my error is also:
  
.......................................................
make[3]: `configure.info' is up to date.
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
/bin/bash ../../etc/../mkinstalldirs /usr/local/cross-cortex/share/info
mkdir -p -- /usr/local/cross-cortex/share/info
if test ! -f standards.info; then cd ../../etc; fi; \
    if test -f standards.info; then \
      for i in standards.info*; do \
        /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
      done; \
    fi
if test ! -f configure.info; then cd ../../etc; fi; \
    if test -f configure.info; then \
      for i in configure.info*; do \
        /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
      done; \
    fi
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
make[2]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
Making install in libc
make[3]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
Making install in argz
make[4]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
arm-elf-cc -B/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/ -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -g -O2   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[4]: *** [lib_a-dummy.o] Error 127
make[4]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [install-target-newlib] Error 2
make[1]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build'
make: *** [install] Error 2


I'm running as a normal user and only sudoing when stated but I remember having some problems with this before.
So I'll try again from the start, this time doing everything as root, as this was how I could build many time before, in Ubuntu Desktop 8.04. I'm in Ubuntu Desktop 9.04 now.

Best
Dado









On Fri, Jul 3, 2009 at 11:58, Dado Sutter <[hidden email]> wrote:
Hello Cesar,
   Don't forget to do a:

scons board=EK-LM3S8962 prog -c

before a new:

scons board=EK-LM3S8962 prog

This "cleans" the temporary files generated by the last build.

Best
Dado





On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os 
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256 
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256 
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1

make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build
$ cd build
$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>

It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

Hello,
   The tutorial for the (gcc) toolchain building for arm-cortex works perfectly if I run it as root.
   It is clear that the trouble lies on things like PATH and TOOLPATH, when we change from normal user to su, in several steps of the tutorial but I'm just too lazy right now to figure out where exactly it happens :) I hope to fix it in the doc soon.
   Anyway, if anyone wants to build a toolchain for ARM Cortex M3, just make yourself root before and skip the su -s -H steps, as well as the export PATH= ... after you do it the first time.
   If your PATH includes /usr/local/cross-cortex/bin and your TOOLPATH=/usr/local/cross-cortex, you should be able to build it too.

Best
Dado



On Fri, Jul 3, 2009 at 16:19, Dado Sutter <[hidden email]> wrote:
Hello folks,
   I am checking the same tutorial that Cesar used and indeed, I'm having the same error as he did.
   Before that, on the step 4 of the newlib build (autoconf), I also had to fix on config/override.m4:
  [m4_define([_GCC_AUTOCONF_VERSION], [2.59])])  

but changing the version to 2.63, instead of the 2.59 stated on the text.
For some reason, arm-elf-cc doesn't seem to be created by the previous build steps and my error is also:
  
.......................................................
make[3]: `configure.info' is up to date.
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
/bin/bash ../../etc/../mkinstalldirs /usr/local/cross-cortex/share/info
mkdir -p -- /usr/local/cross-cortex/share/info
if test ! -f standards.info; then cd ../../etc; fi; \
    if test -f standards.info; then \
      for i in standards.info*; do \
        /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
      done; \
    fi
if test ! -f configure.info; then cd ../../etc; fi; \
    if test -f configure.info; then \
      for i in configure.info*; do \
        /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
      done; \
    fi
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
make[2]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
Making install in libc
make[3]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
Making install in argz
make[4]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
arm-elf-cc -B/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/ -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -g -O2   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c

/bin/bash: arm-elf-cc: command not found
make[4]: *** [lib_a-dummy.o] Error 127
make[4]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [install-target-newlib] Error 2
make[1]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build'
make: *** [install] Error 2


I'm running as a normal user and only sudoing when stated but I remember having some problems with this before.
So I'll try again from the start, this time doing everything as root, as this was how I could build many time before, in Ubuntu Desktop 8.04. I'm in Ubuntu Desktop 9.04 now.

Best
Dado










On Fri, Jul 3, 2009 at 11:58, Dado Sutter <[hidden email]> wrote:
Hello Cesar,
   Don't forget to do a:

scons board=EK-LM3S8962 prog -c

before a new:

scons board=EK-LM3S8962 prog

This "cleans" the temporary files generated by the last build.

Best
Dado





On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os 
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256 
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256 
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1

make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build
$ cd build
$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>

It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

I'm not 100% sure, but at least with the CodeSourcery sources, the  
process laid out in this guide of mine seems to work on OS X:
http://fanplastic.org/gcc-for-arm-eabi/

I think there might be some remaining issues on Linux at least for 64-
bit installs of Ubuntu (last time I tried, it all compiled but  
something wasn't quite right with the binaries it generated).

The Makefile that I included for the guide is a mixture of a guide  
posted some time ago on this elua-dev list, and some of the special  
flags used for the eLua build (minus certain ones that make it  
particular to one ARM architecture).

One other thing, however: if you just grab CodeSourcery G++ Lite for  
Linux, that might be less painful than building a toolchain from  
scratch, and it should work just fine:
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
(not sure what packages are needed to use their 32-bit binaries on 64-
bit builds of linux, but it shouldn't be too complicated)

I'll try and check tomorrow if these CS toolchain instructions will  
work on some Ubuntu machines I've got, and check if the binaries the  
toolchain generates are functional.  I've not checked on the latest  
GCC 4.4 &  related toolchain sources to see if they all still need the  
modifications and patches.  The CodeSourcery sources contain patches  
that are usually upstream from GCC & related toolchain components, and  
usually take some time to work their way into project repositories.  
They are sponsored by ARM, in part, to release the G++ Lite sources in  
order to provide a quality open source toolchain for ARM MCUs and  
CPUs.  As a result, they pretty much are the ones who maintain the GCC  
ARM port.  In my somewhat limited experience with them, they've given  
me slightly smaller binaries than the plain GCC toolchain and no  
tweaking is required to enable multilib (compile for many types of ARM  
MCUs & CPUs) and EABI.


Side Note:
I seem to recall that exporting the toolpath _before_ doing the  
configure for newlib has saved me in some cases without having to try  
and redefine the path when the sudo stage comes for installation.

Just my 2 US cents (or 0.038 Brazilian reais, according to Google...  
though that's a US idiom... not sure of the equivalent one anywhere  
else) :-)

-jsnyder

On Jul 4, 2009, at 10:49 AM, Dado Sutter wrote:

> Hello,
>    The tutorial for the (gcc) toolchain building for arm-cortex  
> works perfectly if I run it as root.
>    It is clear that the trouble lies on things like PATH and  
> TOOLPATH, when we change from normal user to su, in several steps of  
> the tutorial but I'm just too lazy right now to figure out where  
> exactly it happens :) I hope to fix it in the doc soon.
>    Anyway, if anyone wants to build a toolchain for ARM Cortex M3,  
> just make yourself root before and skip the su -s -H steps, as well  
> as the export PATH= ... after you do it the first time.
>    If your PATH includes /usr/local/cross-cortex/bin and your  
> TOOLPATH=/usr/local/cross-cortex, you should be able to build it too.
>
> Best
> Dado
>
>
>
> On Fri, Jul 3, 2009 at 16:19, Dado Sutter <[hidden email]>  
> wrote:
> Hello folks,
>    I am checking the same tutorial that Cesar used and indeed, I'm  
> having the same error as he did.
>    Before that, on the step 4 of the newlib build (autoconf), I also  
> had to fix on config/override.m4:
>   [m4_define([_GCC_AUTOCONF_VERSION], [2.59])])
>
> but changing the version to 2.63, instead of the 2.59 stated on the  
> text.
>
>
>
> For some reason, arm-elf-cc doesn't seem to be created by the  
> previous build steps and my error is also:
>
> .......................................................
> make[3]: `configure.info' is up to date.
> make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/etc'
> /bin/bash ../../etc/../mkinstalldirs /usr/local/cross-cortex/share/
> info
> mkdir -p -- /usr/local/cross-cortex/share/info
> if test ! -f standards.info; then cd ../../etc; fi; \
>     if test -f standards.info; then \
>       for i in standards.info*; do \
>         /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/
> info/$i; \
>       done; \
>     fi
> if test ! -f configure.info; then cd ../../etc; fi; \
>     if test -f configure.info; then \
>       for i in configure.info*; do \
>         /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/
> info/$i; \
>       done; \
>     fi
> make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/etc'
> make[2]: Entering directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/arm-elf/newlib'
> Making install in libc
> make[3]: Entering directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
> Making install in argz
> make[4]: Entering directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
> arm-elf-cc -B/home/dado/dev/elua/toolchains_building/cortexM3/
> newlib-1.17.0/build/arm-elf/newlib/ -isystem /home/dado/dev/elua/
> toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/targ-
> include -isystem /home/dado/dev/elua/toolchains_building/cortexM3/
> newlib-1.17.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -
> DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -
> DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -
> I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-
> builtin      -g -O2   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo  
> '../../../../../newlib/libc/argz/'`dummy.c
>
> /bin/bash: arm-elf-cc: command not found
> make[4]: *** [lib_a-dummy.o] Error 127
> make[4]: Leaving directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
> make[3]: *** [install-recursive] Error 1
> make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
> make[2]: *** [install-recursive] Error 1
> make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build/arm-elf/newlib'
> make[1]: *** [install-target-newlib] Error 2
> make[1]: Leaving directory `/home/dado/dev/elua/toolchains_building/
> cortexM3/newlib-1.17.0/build'
> make: *** [install] Error 2
>
>
> I'm running as a normal user and only sudoing when stated but I  
> remember having some problems with this before.
> So I'll try again from the start, this time doing everything as  
> root, as this was how I could build many time before, in Ubuntu  
> Desktop 8.04. I'm in Ubuntu Desktop 9.04 now.
>
> Best
> Dado
>
>
>
>
>
>
>
>
>
>
> On Fri, Jul 3, 2009 at 11:58, Dado Sutter <[hidden email]>  
> wrote:
> Hello Cesar,
>    Don't forget to do a:
>
> scons board=EK-LM3S8962 prog -c
>
> before a new:
>
> scons board=EK-LM3S8962 prog
>
> This "cleans" the temporary files generated by the last build.
>
> Best
> Dado
>
>
>
>
>
> On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]
> > wrote:
> Hi James,
>
> Thx for your answer. I cheked that and all is rigth (i think)
>
> cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
> arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-
> objdump  arm-elf-strip
> arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-
> ranlib   cesar.c
> arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
> arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
> arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
> cesar@cesar-laptop:/usr/local/cross-cortex/bin$
>
>
> , so i redo all , again i have the next message when i try to do this
>
> $ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os
> -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -
> D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
> (I dont paste the before part)
> Checking multilib configuration for newlib...
> Configuring in arm-elf/newlib
> configure: loading cache ./config.cache
> configure: error: `CC' has changed since the previous run:
> configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/
> newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/
> newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/
> cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-
> cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-
> cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/
> cross-cortex/newlib-1.17.0/libgloss/arm
> configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/
> newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/
> newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/
> cross-cortex/newlib-1.17.0/newlib/libc/include
> configure: error: `CFLAGS' has changed since the previous run:
> configure:   former value:  -ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256
> configure:   current value: -ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256
> configure: error: changes in the environment can compromise the build
> configure: error: run `make distclean' and/or `rm ./config.cache'  
> and start over
> make[1]: *** [configure-target-newlib] Error 1
>
> make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build'
> make: *** [all] Error 2
> cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$
>
>
> that item belong the tutorial for building tooltchain cortex in the  
> STEP 3: NEWLIB
> $ mkdir build
>
>
>
>
> $ cd build
>
> $ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-
> interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-
> gnu-as --disable-shared
>
> $ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-
> mcpu=cortex-m3 -mthumb -D__thumb2__"
>
>
>
>
>
> $ sudo -s -H
> # export PATH=/usr/local/cross-cortex/bin:$PATH
> # make install
> # exit
> $ cd ../..
> Best regards
>
>
> --
> César R. Mamani Ch.
> Estudante da Mestrado
> Pontificia Universidade Catolica
> Rio da Janeiro - Gavea
>
> 2009/7/3 James Snyder <[hidden email]>
>
> It sounds like you do not have arm-elf-gcc in your path (check if  
> you can run that from the command line).
>
> Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin
>
> If you couldn't run it by just typing in the name, but it is in that  
> directory above, make sure you do this, and then redo the ../
> configure stage for newlib.
>
> Hope that helps..
>
> -jsnyder
>
>
> On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:
>
> hi all
>
> I trying to building toolchain for arm cortex-m3 Im doing that with  
> the tutorial for www.giga.puc-rio.br/elua. I have successful in  
> BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have  
> the next messagem
>
> $ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-
> mcpu=cortex-m3 -mthumb -D__thumb2__"
>
> /cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -
> DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -
> DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -
> I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-
> builtin      -ffunction-sections -fdata-sections -
> DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer  
> -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-
> dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/
> argz/'`dummy.c
> /bin/bash: arm-elf-cc: command not found
> make[5]: *** [lib_a-dummy.o] Error 127
> make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib/libc/argz'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib/libc'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build/arm-elf/newlib'
> make[1]: *** [all-target-newlib] Error 2
> make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/
> build'
> make: *** [all] Error 2
> cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$
>
> I am a new ubuntu user and i dont know what happend
>
> thx
>
> --
> César R. Mamani Ch.
> Estudante da Mestrado
> Pontificia Universidade Catolica
> Rio da Janeiro - Gavea
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
> --
> James Snyder
> Biomedical Engineering
> Northwestern University
> [hidden email]
> http://fanplastic.org/key.txt
> ph: 847.448.0386
>
>
>
>
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
>
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

smime.p7s (5K) Download Attachment
César Raúl Mamani Choquehuanca César Raúl Mamani Choquehuanca
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

Hello!!

I did building toolchain for cortex-m3 as root and i have successful, then i built and installed elua. now ill try work with LM3S8962.

Thx for your help.

Best.

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/6 James Snyder <[hidden email]>
I'm not 100% sure, but at least with the CodeSourcery sources, the process laid out in this guide of mine seems to work on OS X:
http://fanplastic.org/gcc-for-arm-eabi/

I think there might be some remaining issues on Linux at least for 64-bit installs of Ubuntu (last time I tried, it all compiled but something wasn't quite right with the binaries it generated).

The Makefile that I included for the guide is a mixture of a guide posted some time ago on this elua-dev list, and some of the special flags used for the eLua build (minus certain ones that make it particular to one ARM architecture).

One other thing, however: if you just grab CodeSourcery G++ Lite for Linux, that might be less painful than building a toolchain from scratch, and it should work just fine:
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
(not sure what packages are needed to use their 32-bit binaries on 64-bit builds of linux, but it shouldn't be too complicated)

I'll try and check tomorrow if these CS toolchain instructions will work on some Ubuntu machines I've got, and check if the binaries the toolchain generates are functional.  I've not checked on the latest GCC 4.4 &  related toolchain sources to see if they all still need the modifications and patches.  The CodeSourcery sources contain patches that are usually upstream from GCC & related toolchain components, and usually take some time to work their way into project repositories.  They are sponsored by ARM, in part, to release the G++ Lite sources in order to provide a quality open source toolchain for ARM MCUs and CPUs.  As a result, they pretty much are the ones who maintain the GCC ARM port.  In my somewhat limited experience with them, they've given me slightly smaller binaries than the plain GCC toolchain and no tweaking is required to enable multilib (compile for many types of ARM MCUs & CPUs) and EABI.


Side Note:
I seem to recall that exporting the toolpath _before_ doing the configure for newlib has saved me in some cases without having to try and redefine the path when the sudo stage comes for installation.

Just my 2 US cents (or 0.038 Brazilian reais, according to Google... though that's a US idiom... not sure of the equivalent one anywhere else) :-)

-jsnyder


On Jul 4, 2009, at 10:49 AM, Dado Sutter wrote:

Hello,
  The tutorial for the (gcc) toolchain building for arm-cortex works perfectly if I run it as root.
  It is clear that the trouble lies on things like PATH and TOOLPATH, when we change from normal user to su, in several steps of the tutorial but I'm just too lazy right now to figure out where exactly it happens :) I hope to fix it in the doc soon.
  Anyway, if anyone wants to build a toolchain for ARM Cortex M3, just make yourself root before and skip the su -s -H steps, as well as the export PATH= ... after you do it the first time.
  If your PATH includes /usr/local/cross-cortex/bin and your TOOLPATH=/usr/local/cross-cortex, you should be able to build it too.

Best
Dado



On Fri, Jul 3, 2009 at 16:19, Dado Sutter <[hidden email]> wrote:
Hello folks,
  I am checking the same tutorial that Cesar used and indeed, I'm having the same error as he did.
  Before that, on the step 4 of the newlib build (autoconf), I also had to fix on config/override.m4:
 [m4_define([_GCC_AUTOCONF_VERSION], [2.59])])

but changing the version to 2.63, instead of the 2.59 stated on the text.



For some reason, arm-elf-cc doesn't seem to be created by the previous build steps and my error is also:

.......................................................
make[3]: `configure.info' is up to date.
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
/bin/bash ../../etc/../mkinstalldirs /usr/local/cross-cortex/share/info
mkdir -p -- /usr/local/cross-cortex/share/info
if test ! -f standards.info; then cd ../../etc; fi; \
   if test -f standards.info; then \
     for i in standards.info*; do \
       /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
     done; \
   fi
if test ! -f configure.info; then cd ../../etc; fi; \
   if test -f configure.info; then \
     for i in configure.info*; do \
       /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
     done; \
   fi
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
make[2]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
Making install in libc
make[3]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
Making install in argz
make[4]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
arm-elf-cc -B/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/ -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -g -O2   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c

/bin/bash: arm-elf-cc: command not found
make[4]: *** [lib_a-dummy.o] Error 127
make[4]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [install-target-newlib] Error 2
make[1]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build'
make: *** [install] Error 2


I'm running as a normal user and only sudoing when stated but I remember having some problems with this before.
So I'll try again from the start, this time doing everything as root, as this was how I could build many time before, in Ubuntu Desktop 8.04. I'm in Ubuntu Desktop 9.04 now.

Best
Dado










On Fri, Jul 3, 2009 at 11:58, Dado Sutter <[hidden email]> wrote:
Hello Cesar,
  Don't forget to do a:

scons board=EK-LM3S8962 prog -c

before a new:

scons board=EK-LM3S8962 prog

This "cleans" the temporary files generated by the last build.

Best
Dado





On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1

make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build




$ cd build

$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"





$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>

It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev






_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

Man, this is crazy. So many people reported having problems with the "su" approach that I'm actually considering changing the tutorials to "do everything as root". But I'm still not quite ready to make this step :)
I'm glad it worked for you in the end.

Best,
Bogdan

On Mon, Jul 6, 2009 at 5:44 PM, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hello!!

I did building toolchain for cortex-m3 as root and i have successful, then i built and installed elua. now ill try work with LM3S8962.

Thx for your help.

Best.


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/6 James Snyder <[hidden email]>

I'm not 100% sure, but at least with the CodeSourcery sources, the process laid out in this guide of mine seems to work on OS X:
http://fanplastic.org/gcc-for-arm-eabi/

I think there might be some remaining issues on Linux at least for 64-bit installs of Ubuntu (last time I tried, it all compiled but something wasn't quite right with the binaries it generated).

The Makefile that I included for the guide is a mixture of a guide posted some time ago on this elua-dev list, and some of the special flags used for the eLua build (minus certain ones that make it particular to one ARM architecture).

One other thing, however: if you just grab CodeSourcery G++ Lite for Linux, that might be less painful than building a toolchain from scratch, and it should work just fine:
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
(not sure what packages are needed to use their 32-bit binaries on 64-bit builds of linux, but it shouldn't be too complicated)

I'll try and check tomorrow if these CS toolchain instructions will work on some Ubuntu machines I've got, and check if the binaries the toolchain generates are functional.  I've not checked on the latest GCC 4.4 &  related toolchain sources to see if they all still need the modifications and patches.  The CodeSourcery sources contain patches that are usually upstream from GCC & related toolchain components, and usually take some time to work their way into project repositories.  They are sponsored by ARM, in part, to release the G++ Lite sources in order to provide a quality open source toolchain for ARM MCUs and CPUs.  As a result, they pretty much are the ones who maintain the GCC ARM port.  In my somewhat limited experience with them, they've given me slightly smaller binaries than the plain GCC toolchain and no tweaking is required to enable multilib (compile for many types of ARM MCUs & CPUs) and EABI.


Side Note:
I seem to recall that exporting the toolpath _before_ doing the configure for newlib has saved me in some cases without having to try and redefine the path when the sudo stage comes for installation.

Just my 2 US cents (or 0.038 Brazilian reais, according to Google... though that's a US idiom... not sure of the equivalent one anywhere else) :-)

-jsnyder


On Jul 4, 2009, at 10:49 AM, Dado Sutter wrote:

Hello,
  The tutorial for the (gcc) toolchain building for arm-cortex works perfectly if I run it as root.
  It is clear that the trouble lies on things like PATH and TOOLPATH, when we change from normal user to su, in several steps of the tutorial but I'm just too lazy right now to figure out where exactly it happens :) I hope to fix it in the doc soon.
  Anyway, if anyone wants to build a toolchain for ARM Cortex M3, just make yourself root before and skip the su -s -H steps, as well as the export PATH= ... after you do it the first time.
  If your PATH includes /usr/local/cross-cortex/bin and your TOOLPATH=/usr/local/cross-cortex, you should be able to build it too.

Best
Dado



On Fri, Jul 3, 2009 at 16:19, Dado Sutter <[hidden email]> wrote:
Hello folks,
  I am checking the same tutorial that Cesar used and indeed, I'm having the same error as he did.
  Before that, on the step 4 of the newlib build (autoconf), I also had to fix on config/override.m4:
 [m4_define([_GCC_AUTOCONF_VERSION], [2.59])])

but changing the version to 2.63, instead of the 2.59 stated on the text.



For some reason, arm-elf-cc doesn't seem to be created by the previous build steps and my error is also:

.......................................................
make[3]: `configure.info' is up to date.
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
/bin/bash ../../etc/../mkinstalldirs /usr/local/cross-cortex/share/info
mkdir -p -- /usr/local/cross-cortex/share/info
if test ! -f standards.info; then cd ../../etc; fi; \
   if test -f standards.info; then \
     for i in standards.info*; do \
       /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
     done; \
   fi
if test ! -f configure.info; then cd ../../etc; fi; \
   if test -f configure.info; then \
     for i in configure.info*; do \
       /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
     done; \
   fi
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
make[2]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
Making install in libc
make[3]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
Making install in argz
make[4]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
arm-elf-cc -B/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/ -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -g -O2   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c

/bin/bash: arm-elf-cc: command not found
make[4]: *** [lib_a-dummy.o] Error 127
make[4]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [install-target-newlib] Error 2
make[1]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build'
make: *** [install] Error 2


I'm running as a normal user and only sudoing when stated but I remember having some problems with this before.
So I'll try again from the start, this time doing everything as root, as this was how I could build many time before, in Ubuntu Desktop 8.04. I'm in Ubuntu Desktop 9.04 now.

Best
Dado










On Fri, Jul 3, 2009 at 11:58, Dado Sutter <[hidden email]> wrote:
Hello Cesar,
  Don't forget to do a:

scons board=EK-LM3S8962 prog -c

before a new:

scons board=EK-LM3S8962 prog

This "cleans" the temporary files generated by the last build.

Best
Dado





On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1

make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build




$ cd build

$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"





$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>

It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev






_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: Building toolchain for arm cortex m3

No need to change the approach (to root) here, although it is certainly easier to build this way.
I really think that a simple extra export TOOLPATH=/usr/local/cross-cortex/bin at the right place, in one of the "becoming sudoer" step, will do the trick.

Tks for the report Cesar !

Dado



On Mon, Jul 6, 2009 at 11:54, Bogdan Marinescu <[hidden email]> wrote:
Man, this is crazy. So many people reported having problems with the "su" approach that I'm actually considering changing the tutorials to "do everything as root". But I'm still not quite ready to make this step :)
I'm glad it worked for you in the end.

Best,
Bogdan


On Mon, Jul 6, 2009 at 5:44 PM, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hello!!

I did building toolchain for cortex-m3 as root and i have successful, then i built and installed elua. now ill try work with LM3S8962.

Thx for your help.

Best.


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/6 James Snyder <[hidden email]>

I'm not 100% sure, but at least with the CodeSourcery sources, the process laid out in this guide of mine seems to work on OS X:
http://fanplastic.org/gcc-for-arm-eabi/

I think there might be some remaining issues on Linux at least for 64-bit installs of Ubuntu (last time I tried, it all compiled but something wasn't quite right with the binaries it generated).

The Makefile that I included for the guide is a mixture of a guide posted some time ago on this elua-dev list, and some of the special flags used for the eLua build (minus certain ones that make it particular to one ARM architecture).

One other thing, however: if you just grab CodeSourcery G++ Lite for Linux, that might be less painful than building a toolchain from scratch, and it should work just fine:
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
(not sure what packages are needed to use their 32-bit binaries on 64-bit builds of linux, but it shouldn't be too complicated)

I'll try and check tomorrow if these CS toolchain instructions will work on some Ubuntu machines I've got, and check if the binaries the toolchain generates are functional.  I've not checked on the latest GCC 4.4 &  related toolchain sources to see if they all still need the modifications and patches.  The CodeSourcery sources contain patches that are usually upstream from GCC & related toolchain components, and usually take some time to work their way into project repositories.  They are sponsored by ARM, in part, to release the G++ Lite sources in order to provide a quality open source toolchain for ARM MCUs and CPUs.  As a result, they pretty much are the ones who maintain the GCC ARM port.  In my somewhat limited experience with them, they've given me slightly smaller binaries than the plain GCC toolchain and no tweaking is required to enable multilib (compile for many types of ARM MCUs & CPUs) and EABI.


Side Note:
I seem to recall that exporting the toolpath _before_ doing the configure for newlib has saved me in some cases without having to try and redefine the path when the sudo stage comes for installation.

Just my 2 US cents (or 0.038 Brazilian reais, according to Google... though that's a US idiom... not sure of the equivalent one anywhere else) :-)

-jsnyder


On Jul 4, 2009, at 10:49 AM, Dado Sutter wrote:

Hello,
  The tutorial for the (gcc) toolchain building for arm-cortex works perfectly if I run it as root.
  It is clear that the trouble lies on things like PATH and TOOLPATH, when we change from normal user to su, in several steps of the tutorial but I'm just too lazy right now to figure out where exactly it happens :) I hope to fix it in the doc soon.
  Anyway, if anyone wants to build a toolchain for ARM Cortex M3, just make yourself root before and skip the su -s -H steps, as well as the export PATH= ... after you do it the first time.
  If your PATH includes /usr/local/cross-cortex/bin and your TOOLPATH=/usr/local/cross-cortex, you should be able to build it too.

Best
Dado



On Fri, Jul 3, 2009 at 16:19, Dado Sutter <[hidden email]> wrote:
Hello folks,
  I am checking the same tutorial that Cesar used and indeed, I'm having the same error as he did.
  Before that, on the step 4 of the newlib build (autoconf), I also had to fix on config/override.m4:
 [m4_define([_GCC_AUTOCONF_VERSION], [2.59])])

but changing the version to 2.63, instead of the 2.59 stated on the text.



For some reason, arm-elf-cc doesn't seem to be created by the previous build steps and my error is also:

.......................................................
make[3]: `configure.info' is up to date.
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
/bin/bash ../../etc/../mkinstalldirs /usr/local/cross-cortex/share/info
mkdir -p -- /usr/local/cross-cortex/share/info
if test ! -f standards.info; then cd ../../etc; fi; \
   if test -f standards.info; then \
     for i in standards.info*; do \
       /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
     done; \
   fi
if test ! -f configure.info; then cd ../../etc; fi; \
   if test -f configure.info; then \
     for i in configure.info*; do \
       /usr/bin/install -c -m 644 $i /usr/local/cross-cortex/share/info/$i; \
     done; \
   fi
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/etc'
make[2]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
Making install in libc
make[3]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
Making install in argz
make[4]: Entering directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
arm-elf-cc -B/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/ -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -g -O2   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c

/bin/bash: arm-elf-cc: command not found
make[4]: *** [lib_a-dummy.o] Error 127
make[4]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib/libc'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [install-target-newlib] Error 2
make[1]: Leaving directory `/home/dado/dev/elua/toolchains_building/cortexM3/newlib-1.17.0/build'
make: *** [install] Error 2


I'm running as a normal user and only sudoing when stated but I remember having some problems with this before.
So I'll try again from the start, this time doing everything as root, as this was how I could build many time before, in Ubuntu Desktop 8.04. I'm in Ubuntu Desktop 9.04 now.

Best
Dado










On Fri, Jul 3, 2009 at 11:58, Dado Sutter <[hidden email]> wrote:
Hello Cesar,
  Don't forget to do a:

scons board=EK-LM3S8962 prog -c

before a new:

scons board=EK-LM3S8962 prog

This "cleans" the temporary files generated by the last build.

Best
Dado





On Fri, Jul 3, 2009 at 11:24, César Raúl Mamani Choquehuanca <[hidden email]> wrote:
Hi James,

Thx for your answer. I cheked that and all is rigth (i think)

cesar@cesar-laptop:/usr/local/cross-cortex/bin$ ls
arm-elf-addr2line  arm-elf-cpp        arm-elf-gcov     arm-elf-objdump  arm-elf-strip
arm-elf-ar         arm-elf-g++        arm-elf-gprof    arm-elf-ranlib   cesar.c
arm-elf-as         arm-elf-gcc        arm-elf-ld       arm-elf-readelf
arm-elf-c++        arm-elf-gcc-4.3.3  arm-elf-nm       arm-elf-size
arm-elf-c++filt    arm-elf-gccbug     arm-elf-objcopy  arm-elf-strings
cesar@cesar-laptop:/usr/local/cross-cortex/bin$


, so i redo all , again i have the next message when i try to do this

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os
-fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
(I dont paste the before part)
Checking multilib configuration for newlib...
Configuring in arm-elf/newlib
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/arm -L/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/libgloss/libnosys -L/usr/local/cross-cortex/newlib-1.17.0/libgloss/arm
configure:   current value: arm-elf-cc -B/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/ -isystem /usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/targ-include -isystem /usr/local/cross-cortex/newlib-1.17.0/newlib/libc/include
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thum2__ -D__BUFSIZ__=256
configure:   current value: -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-target-newlib] Error 1

make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$


that item belong the tutorial for building tooltchain cortex in the STEP 3: NEWLIB
$ mkdir build




$ cd build

$ ../configure --target=arm-elf --prefix=$TOOLPATH --enable-interwork --disable-newlib-supplied-syscalls --with-gnu-ld --with-gnu-as --disable-shared

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"





$ sudo -s -H
# export PATH=/usr/local/cross-cortex/bin:$PATH
# make install
# exit
$ cd ../..
Best regards


--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea

2009/7/3 James Snyder <[hidden email]>

It sounds like you do not have arm-elf-gcc in your path (check if you can run that from the command line).

Check if arm-elf-gcc exists in /usr/local/cross-cortex/bin

If you couldn't run it by just typing in the name, but it is in that directory above, make sure you do this, and then redo the ../configure stage for newlib.

Hope that helps..

-jsnyder


On Jul 2, 2009, at 3:59 PM, César Raúl Mamani Choquehuanca wrote:

hi all

I trying to building toolchain for arm cortex-m3 Im doing that with the tutorial for www.giga.puc-rio.br/elua. I have successful in BINTUTILS STEP 1 and BASIC GCC STEP 2 but in NEWLIB STEP 3 I have the next messagem

$ make CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256" CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"

/cross-cortex/newlib-1.17.0/libgloss/arm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.17.0\" -DPACKAGE_STRING=\"newlib\ 1.17.0\" -DPACKAGE_BUGREPORT=\"\"  -I. -I../../../../../newlib/libc/argz -O2 -D__NO_SYSCALLS__ -fno-builtin      -ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256   -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../newlib/libc/argz/'`dummy.c
/bin/bash: arm-elf-cc: command not found
make[5]: *** [lib_a-dummy.o] Error 127
make[5]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build/arm-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/usr/local/cross-cortex/newlib-1.17.0/build'
make: *** [all] Error 2
cesar@cesar-laptop:/usr/local/cross-cortex/newlib-1.17.0/build$

I am a new ubuntu user and i dont know what happend

thx

--
César R. Mamani Ch.
Estudante da Mestrado
Pontificia Universidade Catolica
Rio da Janeiro - Gavea
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev




_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev






_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev