Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Application Not Compling

I'm in the process of trying to get the simple "hello_world.c" code to run from the board using Linux. I have the kernel and filesystem built and installed on the board. I'm now trying to compile the hello_world.c code in an application project. Upon clicking build project I receive the following error:

Kind Status Priority Description Resource In Folder Location

Error *** No rule to make target `hello.exe', needed by `all'. hello_world_app

Now, I made the proper edit to the makefile I built (i.e. TOPDIR = .. to TOPDIR = ./) since the makefile and hello_world.c are at the same level.

Below is my current Makefile code:

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 *.[oad] *.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

I'm at a loss as to what could be causing this problem. My first thought would be the make target, but I created one for all. Any help here would greatly be appreciated.

Thanks

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ah, simple fix.

    Original code:

    DEBUG = 0

    PROJ_NAME = hello

    INSTALL_DIR =

    PROGS := $(PROJ_NAME).exe

    CFLAGS +=

    I changed:

    PROJ_NAME = hello

    TO

    PROJ_NAME = hello_world

    Ok, I'm sure I'll have more questions regarding what I'm trying to do.