Forum Discussion

jsondergaard's avatar
jsondergaard
Icon for New Contributor rankNew Contributor
3 years ago

DE10-Nano My First HPS Demo

While following the "My First HPS" PDF tutorial from the Terrasic DE10-Nano page, I am having issues compiling the project. This step in the PDF is labelled as "2.4 Compiling the Project." When I use the make command inside of the embedded command shell, I get the message "make: Nothing to be done for '-IC'. I've attached the main.c and makefile screenshots in case someone can spot a mistake. This tutorial is years old at this time and it's likely there are different steps to take in order to perform the compilation with newer software. Anyone have ideas or know of an up to date tutorial for this development board?

  

3 Replies

  • aikeu's avatar
    aikeu
    Icon for Regular Contributor rankRegular Contributor

    Hi jsondergaard,


    I am testing out one of the example and having the same problem. Will let you know once I managed to resolve it.


    Thanks.

    Regards,

    Aik Eu


  • aikeu's avatar
    aikeu
    Icon for Regular Contributor rankRegular Contributor

    Hi jsondergaard,


    I was able to perform the "make" currently without issue.

    I compile the Linux Application on Windows, so consider the CROSS_COMPILE = arm-none-linux-gnueabihf-

    Can refer to this related issue:

    https://community.intel.com/t5/Intel-SoC-FPGA-Embedded/Using-SoCEDS-Error-with-quot-my-first-hps-quot/td-p/1366844

    After that, try to compare and re-edit your Makefile text alignment as below:


    #

    TARGET = my_first_hps


    ALT_DEVICE_FAMILY ?= soc_cv_av

    SOCEDS_ROOT ?= $(SOCEDS_DEST_ROOT)

    HWLIBS_ROOT = $(SOCEDS_ROOT)/ip/altera/hps/altera_hps/hwlib

    CROSS_COMPILE = arm-none-linux-gnueabihf-

    CFLAGS = -g -Wall -D$(ALT_DEVICE_FAMILY) --include-dir=$(HWLIBS_ROOT)/include/$(ALT_DEVICE_FAMILY) --include-dir=$(HWLIBS_ROOT)/include/


    CFLAGS = -g -Wall -D$(ALT_DEVICE_FAMILY) -I$(HWLIBS_ROOT)/include/$(ALT_DEVICE_FAMILY) -I$(HWLIBS_ROOT)/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.

    Regards,

    Aik Eu