Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHey thanks !
I'm trying to catch interrupts under linux. I was reading the altera documentation for HWLIB and SoCAL APIs without success. This is a simple starting program with a strange error:#include <stdio.h>
# include "hwlib.h"
# include "alt_interrupt.h"
int main() {
ALT_STATUS_CODE status;
status = alt_int_global_init();
if(status == ALT_E_SUCCESS) printf("exito...");
return 0;
} I got this error: $ make build
arm-linux-gnueabihf-gcc -g -Wall -Werror -ID:/intelFPGA/17.0/embedded/ip/altera/
hps/altera_hps/hwlib/include -ID:/intelFPGA/17.0/embedded/ip/altera/hps/altera_h
ps/hwlib/include/soc_cv_av -Dsoc_cv_av -c main.c -o main.o
arm-linux-gnueabihf-gcc -g -Wall -Werror main.o -o ledtest
main.o: In function `main':
C:\Users\nhasbun\Desktop\C/main.c:7: undefined reference to `alt_int_global_init
'
collect2.exe: error: ld returned 1 exit status
make: *** Error 1 And I'm using this makefile (https://pastebin.com/zxwzybqf) that I got from Altera examples for this board. Not sure what the problem is, since the header is being read.