Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
2,433 Views

missing socal folder

Hi! 

 

I will be using DE1-SOC board for my bachelor's degree and Im learning on how to use it. I noticed that user's manuals are for version 13 of Quartus and current version is version 15. I have already encountered some differences that puzzled me but I managed to solve them with a bit of googling. Now Im at FPGA-HPS project and I get an error from command shell: 

 

$ makearm-linux-gnueabihf-gcc -static -g -Wall -IE:/Programs/altera/15.0/embedded/ip/ altera/hps/altera_hps/hwlib/include -c main.c -o main.o main.c:6:25: fatal error: socal/socal.h: No such file or directory # include "socal/socal.h" ^ compilation terminated. make: *** Error 1 

 

I noticed that there are now two folders there: soc_a10 and soc_cv_av, which both include the missing files. What do these two folders mean? Which one should I use? Do I fix the header to match the new folder configuration? 

 

Thank you for help!
0 Kudos
14 Replies
Highlighted
Valued Contributor III
188 Views

TO_BE_DONE

0 Kudos
Highlighted
Valued Contributor III
188 Views

TO_BE_DONE

0 Kudos
Highlighted
Valued Contributor III
188 Views

The new 15.0 makefiles for hwlibs expect the ALT_DEVICE_FAMILY variable to be set to "soc_cv_av" or "soc_a10".  

 

ALT_DEVICE_FAMILY ?= soc_cv_av 

CFLAGS := -g $(OFLAG) -Wall -Werror -std=c99 $(MULTILIBFLAGS) -I$(HWLIBS_ROOT)/include -I$(HWLIBS_ROOT)/include/$(ALT_DEVICE_FAMILY) -D$(ALT_DEVICE_FAMILY) 

ALL_HWLIBS_SRC = $(wildcard $(HWLIBS_ROOT)/src/hwmgr/*.c) $(wildcard $(HWLIBS_ROOT)/src/hwmgr/$(ALT_DEVICE_FAMILY)/*.c $(wildcard $(HWLIBS_ROOT)/src/utils/*.c)) 

 

 

On the CFLAGS, you need to add the soc_cv_av or soc_a10 directories to the includes with -I and define either -Dsoc_cv_av or -Dsoc_a10. The ALL_HWLIBS_SRC variable above finds all the .c files in all the directories.
0 Kudos
Highlighted
Valued Contributor III
188 Views

Thank you very much for help! The instructions seem to be for version 13 and I was a little bit confused by some changes.

0 Kudos
Highlighted
Valued Contributor III
188 Views

I am trying to make the my_first_hps-fpga tutorial given in altera de0 nano soc cd. firstly i got above same error that was with social file. now get another error as below. i tried above lines 

ALT_DEVICE_FAMILY ?= soc_cv_av 

CFLAGS := -g $(OFLAG) -Wall -Werror -std=c99 $(MULTILIBFLAGS) -I$(HWLIBS_ROOT)/include -I$(HWLIBS_ROOT)/include/$(ALT_DEVICE_FAMILY) -D$(ALT_DEVICE_FAMILY) 

ALL_HWLIBS_SRC = $(wildcard $(HWLIBS_ROOT)/src/hwmgr/*.c) $(wildcard $(HWLIBS_ROOT)/src/hwmgr/$(ALT_DEVICE_FAMILY)/*.c $(wildcard $(HWLIBS_ROOT)/src/utils/*.c)) 

in make file but now i get another error. 

 

$ make 

arm-linux-gnueabihf-gcc -g -Wall -Werror -std=c99 -I/include -I/include/soc_cv_av -Dsoc_cv_av -c main.c -o main.o 

main.c:5:19: fatal error: hwlib.h: No such file or directory 

# include "hwlib.h" 

compilation terminated. 

make: *** [main.o] Error 1
0 Kudos
Highlighted
Valued Contributor III
188 Views

Did you manage to solve the problem G.Ornil ? I have the same problem.

0 Kudos
Highlighted
Valued Contributor III
188 Views

Changes to the make file are in red - define ALT_DEVICE_FAMILY, then in CFLAGS statement add -D definition. Still assumes include statements have /soc_cv_av added to them. 

 

 

TARGET = hps_gpio#  

CROSS_COMPILE = arm-linux-gnueabihf- 

 

 

ALT_DEVICE_FAMILY ?= soc_cv_av 

 

 

CFLAGS = -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 *~
0 Kudos
Highlighted
Valued Contributor III
188 Views

I still have the same problem. :'(

0 Kudos
Highlighted
Valued Contributor III
188 Views

 

--- Quote Start ---  

I still have the same problem. :'( 

--- Quote End ---  

 

 

I gave up using linux, you can use nios 2 or HPS for soc fpga. still nios 2 is easier it has many tutorials than HPS
0 Kudos
Highlighted
Valued Contributor III
188 Views

 

--- Quote Start ---  

I still have the same problem. :'( 

--- Quote End ---  

 

 

I have the same problem
0 Kudos
Highlighted
Valued Contributor III
188 Views

 

--- Quote Start ---  

I have the same problem 

--- Quote End ---  

 

 

Hello, 

I have the same problem and can not find a solution although I have followed everything closely in this discussion. 

I am using a DE0-Nano-SoC board and I wanted to bring the demo-Software in the Folder  

SoC/Beispiele/HPS_CONTROL_FPGA_LED/software up and running.  

Error: 

In file included from main.c:7:0: 

D:/intelFPGA_pro/18.0/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 

main.c:8:25: fatal error: socal/socal.h: No such file or directory 

# include "socal/socal.h" 

 

Has anyone found a solution? 

 

Many Thanks in advance, Reinhard
0 Kudos
Highlighted
Beginner
188 Views

Working Makefile for 18.1 version

 

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-linux-gnueabihf-   CFLAGS=-g -Wall -D$(ALT_DEVICE_FAMILY) -I$(HWLIBS_ROOT)/include/$(ALT_DEVIVE_FAMILY) -I$(HWLIBS_ROOT)/include/ -I $(HWLIBS_ROOT)/include/soc_a10/         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 *~

 

0 Kudos
Highlighted
Beginner
188 Views

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-linux-gnueabihf-   CFLAGS=-g -Wall -D$(ALT_DEVICE_FAMILY) -I$(HWLIBS_ROOT)/include/$(ALT_DEVIVE_FAMILY) -I$(HWLIBS_ROOT)/include/ -I $(HWLIBS_ROOT)/include/soc_a10/         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 *~

This Makefile is working for me

0 Kudos
Highlighted
Beginner
188 Views

@RRuiz5​ it the soc_a10 similar to the soc_cv_av (aka Cyclone V as on the de0 nano board) ?

0 Kudos