by linux23dragon1 » Sun Mar 02, 2008 11:48 am
by linux23dragon1
Sun Mar 02, 2008 11:48 am
danog8 wrote:Thanks!
now i can connect and upload programs to the CM5 using the Gtkterm !
the problem now is that i can't compile my new program, I've downloaded and installed avr-lib and used a makefile that i found in this forum and apparently worked for the person who posted,
but i don't know what to put in GNU_AVR_PATH = ...?
when i try tocompile usin
gcc -c myproject.c
i get a lot of errors cause it doesn't know the following libaries
error: avr/io.h: No such file or directory
error: avr/interrupt.h: No such file or directory
error: avr/signal.h: No such file or directory
although i've already installed the avrlib
TARGET=example
GNU_AVR_PATH = /home
CC = $(GNU_AVR_PATH)/bin/avr-gcc
OBJCOPY = $(GNU_AVR_PATH)/bin/avr-objcopy
OPTIM_LEVEL = s
DaNoG
Hello
You need to change the "GNU_AVR_PATH = /home" (in the C file) or comment out the "GNU_AVR_PATH = /home", and export your $(GNU_AVR_PATH) in the terminal,like this example ; -
- Code: Select all
export GNU_AVR_PATH="/path/to/avr-gcc Directory"
##include the quotes as well##
I suspect that the avr-gcc will be located in /opt/avr-gcc, or /home/user/avr-gcc. I have not installed avr-gcc on my system yet, but you get the idea.
To see if the $GNU_AVR_PATH command works, issue this command : -
- Code: Select all
echo $GNU_AVR_PATH
That should fix that issue. You can make the $(GNU_AVR_PATH) permanent by entering the full $PATH command in ~/home/user/.bashrc file
- Code: Select all
PATH=$PATH:/opt/avr-gcc/bin ## May be needed
GNU_AVR_PATH=/opt/avr-gcc ## This line is needed
## Remember. Those are example PATHS##
Also note that the avr-gcc tool chain is a static cross compiler . This means that it could also be looking for another $PATH that may not exist (like temporary file locations). But Hopefully I'm wrong about that. It is a easy fix (Just a matter of creating the temporary $PATH with a symlink).
EDIT:- By the way. Have you set your $TARGET (in the C file) as well?
and you might need to issue the command
avr-gcc -c myproject.c (or
/opt/avr-gcc/bin/avr-gcc -c myproject.c if you have not setup your $PATH) too.
danog8 wrote:Thanks!
now i can connect and upload programs to the CM5 using the Gtkterm !
the problem now is that i can't compile my new program, I've downloaded and installed avr-lib and used a makefile that i found in this forum and apparently worked for the person who posted,
but i don't know what to put in GNU_AVR_PATH = ...?
when i try tocompile usin
gcc -c myproject.c
i get a lot of errors cause it doesn't know the following libaries
error: avr/io.h: No such file or directory
error: avr/interrupt.h: No such file or directory
error: avr/signal.h: No such file or directory
although i've already installed the avrlib
TARGET=example
GNU_AVR_PATH = /home
CC = $(GNU_AVR_PATH)/bin/avr-gcc
OBJCOPY = $(GNU_AVR_PATH)/bin/avr-objcopy
OPTIM_LEVEL = s
DaNoG
Hello
You need to change the "GNU_AVR_PATH = /home" (in the C file) or comment out the "GNU_AVR_PATH = /home", and export your $(GNU_AVR_PATH) in the terminal,like this example ; -
- Code: Select all
export GNU_AVR_PATH="/path/to/avr-gcc Directory"
##include the quotes as well##
I suspect that the avr-gcc will be located in /opt/avr-gcc, or /home/user/avr-gcc. I have not installed avr-gcc on my system yet, but you get the idea.
To see if the $GNU_AVR_PATH command works, issue this command : -
- Code: Select all
echo $GNU_AVR_PATH
That should fix that issue. You can make the $(GNU_AVR_PATH) permanent by entering the full $PATH command in ~/home/user/.bashrc file
- Code: Select all
PATH=$PATH:/opt/avr-gcc/bin ## May be needed
GNU_AVR_PATH=/opt/avr-gcc ## This line is needed
## Remember. Those are example PATHS##
Also note that the avr-gcc tool chain is a static cross compiler . This means that it could also be looking for another $PATH that may not exist (like temporary file locations). But Hopefully I'm wrong about that. It is a easy fix (Just a matter of creating the temporary $PATH with a symlink).
EDIT:- By the way. Have you set your $TARGET (in the C file) as well?
and you might need to issue the command
avr-gcc -c myproject.c (or
/opt/avr-gcc/bin/avr-gcc -c myproject.c if you have not setup your $PATH) too.
Love Linux and 3D Linux Games