2010-05-25 03:27:39     Question about Eclipse an bfin-uclinux-gcc

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-05-25 03:27:39     Question about Eclipse an bfin-uclinux-gcc

Raphael Lang (GERMANY)

Message: 89827   

 

Hello,

 

I wana setup Eclipse and I folled the instructions carefully, http://docs.blackfin.uclinux.org/doku.php?id=toolchain:eclipse

 

but now I hang on that problem:

 

When I want to compile my code in Eclipse the comiler stuck in that error:

 

****  Attempting to build...  ****

 

make all

Building file: ../src/SPI_TEST.c

/bin/sh: bfin-linux-uclibc-gcc: not found

Invoking: Blackfin FDPIC C Compiler

bfin-linux-uclibc-gcc -D__KERNEL__ -D__linux__ -Dlinux -I/opt/uClinux/bfin-linux-uclibc/bin -I/home/raphael/Desktop/uC-dist/uClinux-dist/linux-2.6.x/include -I/home/raphael/Desktop/uC-dist/uClinux-dist/linux-2.6.x/arch/blackfin/include -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/SPI_TEST.d" -MT"src/SPI_TEST.d" -o"src/SPI_TEST.o" "../src/SPI_TEST.c"

make: *** [src/SPI_TEST.o] Fehler 127

 

seems that Eclipse can not find the uclibc:

 

But should be all right ...

 

raphael@raphael:~/workspace/SPI_TEST/src$ which bfin-linux-uclibc-gcc

/opt/uClinux/bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc

 

 

but when i try manually it is working well and the files will be created:

 

raphael@raphael:~/workspace/SPI_TEST/src$ bfin-uclinux-gcc -Wl, -elf2flt /home/raphael/workspace/SPI_TEST/src/SPI_TEST.c -o SPI_TEST

 

 

 

SPI_TEST and SPI_TEST.gdb will be created

 

 

 

What can I do ?

 

thanks

 

Raph

TranslateQuoteReplyEditDelete

 

 

2010-05-25 04:11:56     Re: Question about Eclipse an bfin-uclinux-gcc

Mike Frysinger (UNITED STATES)

Message: 89829   

 

the PATH you set in your shell has no bearing on random GUI apps you start.  unless you start them from the shell, but i doubt you're doing that.

 

set the env via your desktop settings (see whatever documentation exists for your desktop env), or use one of the settings in eclipse itself where it allows for custom tweaking of env vars.

QuoteReplyEditDelete

 

 

2010-05-25 11:04:52     Re: Question about Eclipse an bfin-uclinux-gcc

Raphael Lang (GERMANY)

Message: 89834   

 

Hey Mike

 

thanks for your always quick respons ... Okay I understand, I am using ubuntu. here are my var

 

printenv:

 

ORBIT_SOCKETDIR=/tmp/orbit-raphael

SSH_AGENT_PID=2486

GPG_AGENT_INFO=/tmp/seahorse-ABJUoH/S.gpg-agent:2511:1

TERM=xterm

SHELL=/bin/bash

XDG_SESSION_COOKIE=26a2a3f55ac861c88222f9454a2156be-1274771258.536681-134968200

GTK_RC_FILES=/etc/gtk/gtkrc:/home/raphael/.gtkrc-1.2-gnome2

WINDOWID=79691779

GTK_MODULES=canberra-gtk-module

USER=raphael

LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:

LIBGL_DRIVERS_PATH=/usr/lib/dri

GNOME_KEYRING_SOCKET=/tmp/keyring-eCr6iK/socket

SSH_AUTH_SOCK=/tmp/keyring-eCr6iK/socket.ssh

SESSION_MANAGER=local/raphael:@/tmp/.ICE-unix/2443,unix/raphael:/tmp/.ICE-unix/2443

USERNAME=raphael

DESKTOP_SESSION=gnome

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin

PWD=/home/raphael

GDM_KEYBOARD_LAYOUT=de

LANG=de_DE.UTF-8

GNOME_KEYRING_PID=2428

GDM_LANG=de_DE.UTF-8

GDMSESSION=gnome

HISTCONTROL=ignoreboth

SPEECHD_PORT=7560

SHLVL=1

HOME=/home/raphael

GNOME_DESKTOP_SESSION_ID=this-is-deprecated

LOGNAME=raphael

XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-RECe3zQu6v,guid=ae09279a71e3cc3cc5da16164bfb773b

LESSOPEN=| /usr/bin/lesspipe %s

DISPLAY=:1.0

LESSCLOSE=/usr/bin/lesspipe %s %s

XAUTHORITY=/var/run/gdm/auth-for-raphael-brBkeW/database

COLORTERM=gnome-terminal

_=/usr/bin/printenv

raphael@raphael:~$

 

I added in the line path "opt/uClinux/bfin-linux-uclibc/bin"

 

But is still the same error ?

 

thanks

 

raph

TranslateQuoteReplyEditDelete

 

 

2010-05-25 13:57:31     Re: Question about Eclipse an bfin-uclinux-gcc

Mike Frysinger (UNITED STATES)

Message: 89837   

 

as i said, the env of your console shell has no bearing on any other process's env.  you need to either update the global env for your desktop setup (how you do that is dependent on your distro and the desktop environment you're using), or simply tweak the settings inside of eclipse itself.

QuoteReplyEditDelete

 

 

2010-05-27 10:50:51     Re: Question about Eclipse an bfin-uclinux-gcc

Raphael Lang (GERMANY)

Message: 89918   

 

Dear Mike, I tried tho whole day to tweak the eclipse settings but with no succes...

 

In other words eclipse can not acces the linux console ?...

 

I dont understand when I use my consel to compile its working but why not eclipse...

 

and all settings are linked with the Blackfin toolchain stuff...

 

Maybee my installation of eclipse was wrong.. I downloaded   the C/ C ++ version directly and I just start eclipse out of the

 

folder ?

 

 

 

Here is the make file

 

 

 

################################################################################

# Automatically-generated file. Do not edit!

################################################################################

 

-include ../makefile.init

 

RM := rm -rf

 

# All of the sources participating in the build are defined here

-include sources.mk

-include subdir.mk

-include src/subdir.mk

-include objects.mk

 

ifneq ($(MAKECMDGOALS),clean)

ifneq ($(strip $(C_DEPS)),)

-include $(C_DEPS)

endif

endif

 

-include ../makefile.defs

 

# Add inputs and outputs from these tool invocations to the build variables

 

# All Target

all: SPI_TEST

 

# Tool invocations

SPI_TEST: $(OBJS) $(USER_OBJS)

    @echo 'Building target: $@'

    @echo 'Invoking: Blackfin FDPIC C Linker'

    bfin-uclinux-gcc  -o"SPI_TEST" $(OBJS) $(USER_OBJS) $(LIBS)

    @echo 'Finished building target: $@'

    @echo ' '

 

: $(OBJS) $(USER_OBJS)

    @echo 'Invoking: Blackfin Loader'

    $(OBJS) $(USER_OBJS) $(LIBS)

    @echo 'Finished building: $@'

    @echo ' '

 

# Other Targets

clean:

    -$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) SPI_TEST

    -@echo ' '

 

.PHONY: all clean dependents

.SECONDARY:

 

-include ../makefile.targets

TranslateQuoteReplyEditDelete

 

 

2010-05-27 16:42:38     Re: Question about Eclipse an bfin-uclinux-gcc

Mike Frysinger (UNITED STATES)

Message: 89926   

 

if you cant figure out how to configure your desktop environment, then tweak eclipse like i said multiple times

 

i just installed eclipse fresh and it took me like 3 seconds:

Project Explorer -> right click project in question -> Properties

C/C++ Build -> Environment -> Add new variable

Name: PATH Value: <path-to-blackfin-toolchain>

Select Append variables

 

eclipse also has an IDE-wide setting under Window -> Preferences -> C/C++ Build -> Environment

QuoteReplyEditDelete

 

 

2010-05-28 23:07:19     Re: Question about Eclipse an bfin-uclinux-gcc

Robert Cochran (UNITED STATES)

Message: 89977   

 

Did you try to launch eclipse from your shell?

 

If you added the bfin tools to your path in your shell (perhaps via .bashrc), then your path should be good in eclipse after you launch from the shell.

 

> eclipse &

 

 

 

Hope this helps

QuoteReplyEditDelete

 

 

2010-05-28 23:23:44     Re: Question about Eclipse an bfin-uclinux-gcc

Mike Frysinger (UNITED STATES)

Message: 89978   

 

of course i didnt run eclipse from a shell that already had a PATH setup with the Blackfin toolchain in it.  that would invalidate my entire test and the point i've been stating all along.

 

it's trivial to verify the eclipse env:

$ strings /proc/<pid of eclipse and java bins>/environ | grep PATH

<blackfin toolchain isnt in it>

QuoteReplyEditDelete

 

 

2010-05-29 11:23:26     Re: Question about Eclipse an bfin-uclinux-gcc

Robert Cochran (UNITED STATES)

Message: 89990   

 

Mike,

 

My reply / quesion was to Raphael.  I use eclipse & blackfin tools on Ubuntu.  If I set up my path in my shell and later invoke eclipse, then my path is also set properly in eclipse.  This is an easy way to go; it's what I do.  And this way I can build inside & outside eclipse using the same set of environment variables. 

 

 

 

Bob

Attachments

    Outcomes