hps-fpga problems with makefile error: #error You must define soc_cv_av or soc_a10 before compiling with HwLibs
Hello,
I am having issues making my C file with the EDS editor. I am using 18.1 . My goal is to compile my C code with the below make file. However, whenever I attempt to run the make file, I get the following error:
$ make
C:/intelFPGA/18.1/embedded/ip/altera/hps/altera_hps/hwlib/include/hwlib.h:56:2: error: #error You must define soc_cv_av or soc_a10 before compiling with HwLibs
#error You must define soc_cv_av or soc_a10 before compiling with HwLibs
I have read some forum posts which suggest to include this in the make file:
ALT_DEVICE_FAMILY = soc_cv_av
however, this has not helped me.
Any suggestions?
Here is my make file:
#
TARGET = my_first_hps-fpga
CROSS_COMPILE = arm-linux-gnueabihf-
CFLAGS = -static -g -Wall -I${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 *~ and here is the top portion of my c file:
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include "hwlib.h"
#include "socal/socal.h"
#include "socal/hps.h"
#include "socal/alt_gpio.h"
#include "hps_0.h"
Thank you,
James