Is there a solution to compiling a series of C files without the main function into executable files using the compilation chain of ti arm clang?
As shown in the following figure, an error will now be reported with no main function definition.
The makefile is as follows:
SRC = $(wildcard ../*.c ../interface/*.c) LIB = $(wildcard ../lib/*.a) OBJ = $(notdir $(patsubst %.c, %.o, $(SRC))) CC = tiarmclang LD = tiarmclang OBJDUMP = tiarmobjdump OBJCOPY = tiarmobjcopy ALL:task.hex $(OBJ): $(SRC) @echo $(SRC) @echo $(OBJ) $(CC) -c $(SRC) -mthumb -mcpu=cortex-r5 -mlittle-endian -mfloat-abi=hard -mfpu=vfpv3-d16 -specs=nosys.specs task.out:$(OBJ) $(LD) $(OBJ) $(LIB) -o task.out -l../interface/lnkme.cmd -nostartfiles task.hex:task.out $(OBJDUMP) -D -S task.out >> taskdump.txt $(OBJCOPY) -O binary task.out task.hex clean: del $(OBJ) task.out task.hex task.out taskdump.txt .PHONY:clean ALL