Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Newbie help

Altera_Forum
Honored Contributor II
942 Views

Hi, 

 

I tried to run hello.c as per the tutorial in the linux reference guide. However, I get the following errors when i build the project (in the Nios IDE - Im using Nios2 eval kit 1.1) : 

Description                                                                         Resource           In Folder        Location *** No rule to make target `../Rules.mak'.                        hello_world   *** No rule to make target `hello.exe', needed by `all'.   hello_world     ../Rules.mak: No such file or directory                                Makefile           hello_world      line 3 

 

I used the same makefile given in the folder with the hello.c program and did not edit the Rules.mak 

 

The code for the rules.mak: 

 

TOPDIR = .. include $(TOPDIR)/Rules.mak # # configurable options#  - set DEBUG = 1 to turn on debugging support# DEBUG = 0 PROJ_NAME = hello INSTALL_DIR = PROGS := $(PROJ_NAME).exe CFLAGS += # # You should not need to modify anything beyond this point# ifeq '$(DEBUG)' '1'     CFLAGS += -O0 -g     PROGS += $(PROGS:.exe=.gdb) endif all: $(PROGS) .PHONY: clean clean:     -rm -f *. *.elf *.gdb *.bin *.exe .PHONY: install install: all ifeq "$(INSTALL_DIR)" ""     $(error No installation directory specified) endif     mkdir -p $(INSTALL_DIR)/bin     install -v $(filter %.exe, $(PROGS)) $(INSTALL_DIR)/bin
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
221 Views

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

I used the same makefile given in the folder with the hello.c program and did not edit the Rules.mak 

 

The code for the rules.mak:[/b] 

--- Quote End ---  

 

 

I think that you meant Makefile because this is the code of the makefile. 

I think that the problem is : 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

TOPDIR = ..[/b] 

--- Quote End ---  

 

That means that the path of your Rules.mak file is one directory above the project&#39;s directory. 

If the Rules.mak and Makefile are in the same directory then you must change the TOPDIR to : 

TOPDIR = ./
0 Kudos
Altera_Forum
Honored Contributor II
221 Views

Yes, you are right. It worked after changing it. 

 

Thanks for the help.
0 Kudos
Reply