Makefile error: hwlib.h no such file or directory

Hi all,
I am getting this error in my make file

Here is my make file:
#
TARGET = FPGAHPS

#
CROSS_COMPILE = arm-linux-gnueabihf-
ALT_DEVICE_FAMILY ?= soc_cv_av 
CFLAGS = -static -g -Wall  -I${SOCEDS_DEST_ROOT}/ip/altera/hps/altera_hps/hwlib/include-D$(ALT_DEVICE_FAMILY)
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 *~ 

I have already included path to my windows environment variable. I have also attached my C file. Any help please? Here is my main.c code
#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”

#define REG_BASE 0xFF200000
#define REG_SPAN 0x00200000

void* virtual_base;
void* led_addr;
void* sw_addr;
int fd;
int switches;
int main (){
fd=open("/dev/mem",(O_RDWR|O_SYNC));
virtual_base=mmap(NULL,REG_SPAN,(PROT_READ|PROT_WRITE),MAP_SHARED,fd,REG_BASE);
sw_addr=virtual_base+SW_BASE;
led_addr=virtual_base+LED_BASE;
while(1){
switches=*(uint32_t *)sw_addr;
*(uint32_t *)led_addr=switches;
usleep(1000000);
printf("%u\n",switches);
}
return 0;
}

You are missing a space here. It should be (space inserted between include & -D):
CFLAGS = -static -g -Wall -I${SOCEDS_DEST_ROOT}/ip/altera/hps/altera_hps/hwlib/include -D$(ALT_DEVICE_FAMILY)

1 Like

hi,
thanks a lot. that worked . THank you so much again.