aleph: setting up linux toolchain

  • I followed the steps in the README and have ran make inside apps/bees. I've attached a txt file with the output I receive cause I think I may have something out of whack.

  • hey, check that the header files got copied correctly in these steps:


    cd atmel-headers-6.1.3.1475
    cp avr/ ~/avr32-gnu-toolchain/include/ -R
    cp avr32/ ~/avr32-gnu-toolchain/avr32/include/ -R


    the key here is this:

    ../../avr32_lib/asf-3.7.3/avr32/utils/compiler.h:62:22: error: avr32/io.h: No such file or directory

  • thanks. I'm confused about the placement of the header files. From the README:

    "move or copy the headers subdirectories avr/ and avr32/ to the avr32/include/ subdirectory of the toolchain location."

    To me this says to move the two header subdirectories (avr and avr32) into the avr32/include sub directory of the toolchain location.

    but when re-described:

    "cp avr/ ~/avr32-gnu-toolchain/include/ -R
    cp avr32/ ~/avr32-gnu-toolchain/avr32/include/ -R"

    doesnt this move the avr/ directory into the toolchain-location/include folder + move avr32 directory into toolchain-location/avr32/include ??

    Which one is it?

  • I ended up having to do the below to the aleph repo directory. not sure how but the file ownership/perms were off.

    sudo chown -R $USER /aleph
    sudo chmod -R u+rwx /aleph

    Anyway, compiles good now. :)

  • ugh, sorry the "copy step" is not accurate. (the description is.) should read

    "
    cp avr/ ~/avr32-gnu-toolchain/avr32/include/ -R
    cp avr32/ ~/avr32-gnu-toolchain/avr32/include/ -R
    "

    the final result, strange as it may seem, is *all* of these things:

    avr32-gnu-toolchain/include/*.h
    : seemingly random junk like the gnu MP and ncurses (maybe not necessary?)

    avr32-gnu-toolchain/avr32/include/*.h
    : standard libraries

    avr32-gnu-toolchain/avr32/include/avr/*.h
    : avr-specific part headers. not sure why avr32-gcc needs this but it does.

    avr32-gnu-toolchain/avr32/include/avr32/*.h
    : avr32-specific headers.

  • Gotcha. Now I'm on to the blackfin part. Currently getting this when trying to run 'make' in aleph/modules/lines
    -----
    bfin-elf-gcc -Wall -mcpu=bf533 -I../../bfin_lib/src/ -I../../bfin_lib/src//libfixmath -I../../bfin_lib//../common -I../../bfin_lib//../dsp -I./ -03 -D ARCH_BFIN=1 -g -I../../bfin_lib/src/ -I../../bfin_lib/src//libfixmath -I../../bfin_lib//../common -I../../bfin_lib//../dsp -I./ -c \
    -D MAJ=0 -D MIN=1 -D REV=2 \
    ../../bfin_lib/src/control.c \
    -o ../../bfin_lib/obj/control.o
    make: bfin-elf-gcc: Command not found
    make: *** [../../bfin_lib/obj/control.o] Error 127
    -----

    echo $PATH shows me I've got it in my path

    /home/adam/avr32-gnu-toolchain/bin:/usr/bin:/bin:/home/adam/uClinux/bfin-elf/bin

    any ideas?

  • not sure about the error but here are my notes from setting up the blackfin toolchain on Fusion 6/Ubuntu

    sudo su
    mv blackfin-toolchain-elf-gcc-4.3-2012R2-RC2.i386.tar.bz2 /
    cd /
    tar -xjvf blackfin-toolchain-elf-gcc-4.3-2012R2-RC2.i386.tar.bz2
    export PATH=$PATH:/opt/uClinux/bfin-elf/bin

    cd home
    sudo gedit .bashrc
    export PATH=$PATH:/opt/uClinux/bfin-elf/bin

    gedit /opt/uClinux/bfin-elf/bfin/elf/include/builtins.h
    comment (or delete) rows 246-280

  • @test2

    Why did you end up commenting or deleting from -> /uClinux/bfin-elf/bfin-elf/include/builtins.h ?

    Tried it for giggles but if didn't seem to make a difference.

  • ahh gotcha thanks! I think I have an additional issue:

    make: bfin-elf-gcc: Command not found

    Not sure why this would be the case. I can type bfin-[tab] and see all the damn executables in my path. :(

  • if its in your path, that's pretty baffling... i'll try some dumb questions:

    - are you building from an IDE, and if so, have you tried the commandline instead? i've had emacs freak out occasionally and not be able to find executables.

    - you're not doing any of this as root, are you?

    - relatedly: what is your distro?

    - do you have the right version of the toolchain for your architecture?

    BTW, i ended up building mine from source a good while back, to get some weird debug / flash programming features. sort of a pain though.

  • 1. I've been running make from command line only, no IDE in place at the moment.
    2. Not performing any of the actions as root, using my own user: adam. I've double checked that the entire uClinux directory is owned by that user.
    3. I'm running Ubuntu 13.10, saucy
    4. At first, I tried w/ the release you conveniently placed in the README:
    blackfin-toolchain-elf-gcc-4.3-2012R2-RC2.i386.tar.bz2. Most recently I'm trying w/ blackfin-toolchain-elf-gcc-4.3-2013R1-RC1.i386.tar.bz2 which I manually downloaded.

    It is quite mysterious. I suppose I can try building from source too. I'll keep trying stuff, I'm determined to get the blackfin related stuff compiling.

  • sorry, no idea! all seems pretty normal. maybe check that 'which bfin-elf-gcc' reports the expected/real location and not some broken symlink from a previous installation attempt, or something like that...

  • Shit. I guess I'm on 64bit Ubuntu and did not realize, I download and replace w/ 64 bit release of bfin toolchain and...success!