CC=arm-none-eabi-gcc AR=arm-none-eabi-ar ########################################### vpath %.c rtx/TARGET_CORTEX_M vpath %.S rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC SRCS = rtos/rtos_idle.c \ HAL_CM.c \ rt_CMSIS.c \ rt_Event.c \ rt_List.c \ rt_Mailbox.c \ rt_MemBox.c \ rt_Mutex.c \ rt_Robin.c \ rt_Semaphore.c \ rt_System.c \ rt_Task.c \ rt_Time.c \ RTX_Conf_CM.c \ HAL_CM4.S \ SVC_Table.S OBJS = $(patsubst %.S,%.o, $(patsubst %.c,%.o, $(SRCS))) all: librtos.a %.o : %.c $(CC) $(CFLAGS) -c -o $@ $< %.o : %.S $(CC) $(CFLAGS) -c -o $@ $< librtos.a: $(OBJS) $(AR) -r $@ $(OBJS) clean: rm -f $(OBJS) librtos.a form'>
Cryptech HSM on STM-32 ARM processorgit repositories
aboutsummaryrefslogtreecommitdiff
path: root/projects/libhal-test/Makefile
blob: 1a2106ee2f873493ddf5068a7ac0d90e13cce035 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
TEST = cores test-bus test-trng test-hash test-aes-key-wrap test-pbkdf2 test-ecdsa test-rsa test-mkmif

CFLAGS += -I $(LIBHAL_SRC)
LIBC_OBJS = printf.o gettimeofday.o
LIBS += $(LIBHAL_BLD)/libhal.a $(LIBTFM_BLD)/libtfm.a

all: $(TEST:=.elf)

vpath %.c $(LIBHAL_SRC)/tests $(LIBHAL_SRC)/utils

# .mo extension for files with main() that need to be wrapped as __main()
%.mo: %.c
	$(CC) -c $(CFLAGS) -Dmain=__main -o $@ $<

%.elf: %.mo main.o $(BOARD_OBJS) $(LIBC_OBJS) $(LIBS)
	$(CC) $(CFLAGS) $^ -o $*.elf -T$(LDSCRIPT) -g -Wl,-Map=$*.map
	$(OBJCOPY) -O binary $*.elf $*.bin
	$(SIZE) $*.elf

clean:
	rm -f *.o *.mo
	rm -f *.elf
	rm -f *.bin
	rm -f *.map