Adding your own libraries to a freedom studio project

Hi everyone,

I’m trying to code my own HAL. I’ve created two subfolders in the src folder that’s inside the Freedom Studio project. I’ve added the
$(wildcard/include *.h)
$(wildcard/src *.c)
command to the Makefile inside src, but I get this error:
main.c:21: undefined reference to gpio_init’`

If you add subfolders in the FS /src path, try this in your Makefile:

$(PROGRAM): $(shell find . -name "*.c") $(shell find . -name "*.h") $(shell find . -name "*.S")