Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
1,584 Views

Compile a makefile using arm-linux-gnueabihf compiler

I have downloaded SoC EDS tool which includes DS-5 as well. However, I have been trying to compile the simple "Hello world" but it does not compile and make it. I want to put this into my DE1 SoC FPGA Cyclone V board which run liunx. when I put the command $make it gives me this error: 

 

make: *** no rule to make target 'arm-linux-gnueabihf-' , needed by 'my-first-hps' . Stop. 

 

this is the make file: 

# ------------------------------------------------------------------------------- 

TARGET = my_first_hps 

 

 

CROSS_COMPILE = arm-linux-gnueabihf-  

CFLAGS= -g -Wall -l ${SOCEDS_DEST_ROOT}/ip/altera/hps/altera_hps/hwlib/include 

 

 

LDFLAGS= -g -Wall 

 

 

CC=$(CROSS_COMPILE)gcc 

 

 

ARCH=arm 

 

 

build:$(TARGET) 

 

 

$(TARGET):main.o $(CC)$(LDFLAGS) $^ -o $@ 

 

 

%.o: %.c $(CC)$(CFLAGS) -c $< -o $@ 

 

 

.PHONY:clean 

 

 

clean: rm -f $(TARGET)*.a.*o*~# --------------------------------------------------------------------------------- 

 

thanks for any help
0 Kudos
2 Replies
Highlighted
Valued Contributor III
41 Views

Hi! I know this is an old post, but I had the same issue some weeks ago so I think it may be useful for someone to have here the solution.  

 

The problem here is this line: 

 

build:$(TARGET) 

 

As far as I know, when you run the command "make" in DS-5, what it really does is to run the command "make all", so the compiler looks for the label "all" into the Makefile. In this Makefile, this label does not exist, and that's because you ended up with that error. 

 

So, to fix this problem you only have to change the label "build" by the label "all" and it should work fine.
0 Kudos
Highlighted
Valued Contributor III
41 Views

it didnt work with this solution what can I do  

My operating system is windows I use the shell commend  

Linux is just in My sd card in fpga.