Compiling Core application with firmware from develop branch fails because of missing libuser.a

I created an application with local built in own source folder. I use the spark/firmware develop branch.
I ran into the problem that the build fails with :smile:

make[1]: *** No rule to make target β€˜β€¦/build/target/user/platform-0-lto/oinkbrew_firmware/libuser.a’, needed by β€˜β€¦/…/oinkbrew_firmware/target/oinkbrew.elf’. Stop

my make file:

$(MAKECMDGOALS): run_make

.PHONY: run_make

APPDIR = …/…/oinkbrew_firmware
APP ?= oinkbrew

run_make:
@$(MAKE) -e -C …/spark-firmware/main
APPDIR=$(APPDIR)
USER_MAKEFILE=build.mk
TARGET_FILE_NAME=oinkbrew
TARGET_DIR_NAME=$(APPDIR)/target
SPARK_CLOUD=n
$(MAKEOVERRIDES)
$(MAKECMDGOALS)

Please let me know if you need more information from me. I’m not sure what information you need.

You don’t need to define APP and APPDIR - just one is sufficient, so try removing the APP variable.

I followed your advice and I removed the APP variable. Based on the build documentation I need the APPDIR variable because my source code is outside the spark-firmware code base. The compile did return the same error message.

After playing around a bit I discovered that I used the wrong TARGET_FILE_NAME and TARGET_DIR_NAME. I should have used without the _NAME at the end and it worked absolutely fine.

Thank you for your guidance.

1 Like