PULP Community
pulp-rt-example Makefile and assembly code - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: pulp-rt-example Makefile and assembly code (/showthread.php?tid=232)



pulp-rt-example Makefile and assembly code - monniaux - 01-21-2021

What is the correct way to add assembly files (.s) to a project compiled with the Makefile system in the SDK?
Adding them to PULP_APP_FC_SRCS leads to strange errors.


RE: pulp-rt-example Makefile and assembly code - nikolas - 02-18-2021

(01-21-2021, 10:37 PM)monniaux Wrote: What is the correct way to add assembly files (.s) to a project compiled with the Makefile system in the SDK?
Adding them to PULP_APP_FC_SRCS leads to strange errors.

You should not use PULP_APP_FC_SRCS for assembly files. Use PULP_APP_FC_ASM_SRCS instead.

Here just a little example of a project of mine where I use a vector table in assembly :

Code:
PULP_APP = PULPissimo
PULP_APP_FC_SRCS = main.c HAL/hal_gpio.c HAL/hal_timer.c HAL/hal_interrupt.c HAL/hal_sys.c HAL/hal_SoftTimer_v23.c FWO/SoftTimer_v23.c 
PULP_APP_FC_ASM_SRCS = HAL/vTable.S
PULP_APP_HOST_SRCS = main.c  
PULP_CFLAGS = -O3 -g

include $(PULP_SDK_HOME)/install/rules/pulp_rt.mk

Oh and be sure if you compile the first time with the assembly file, delete the automatically generated build folder first. Otherwise there will be an error.

Hope the information was useful for you. For me it worked like this.
Smile