aboutsummaryrefslogblamecommitdiff
path: root/projects/rtos-test/Makefile
blob: 9e58a41ebc3f8a370cb57c66f9e13f9e31f7dbbe (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #00
TEST = thread-test semaphore-test mutex-test

CFLAGS += -I$(RTOS_DIR)/rtos -I$(RTOS_DIR)/rtx/TARGET_CORTEX_M

LIBS += $(RTOS_DIR)/librtos.a

all: $(TEST:=.elf)

%.elf: %.o $(BOARD_OBJS) $(LIBS)
	$(CC) $(CFLAGS) $^ -o $@ -T$(LDSCRIPT) -g -Wl,-Map=$*.map
	$(OBJCOPY) -O ihex $*.elf $*.hex
	$(OBJCOPY) -O binary $*.elf $*.bin
	$(OBJDUMP) -St $*.elf >$*.lst
	$(SIZE) $*.elf

clean:
	rm -f *.o
	rm -f *.elf
	rm -f *.hex
	rm -f *.bin
	rm -f *.map
	rm -f *.lst
p">(uint8_t ch); extern HAL_StatusTypeDef uart_recv_char(uint8_t *cp); extern HAL_StatusTypeDef uart_send_string(char *s); extern HAL_StatusTypeDef uart_send_number(uint32_t num, uint8_t digits, uint8_t radix); extern HAL_StatusTypeDef uart_send_char2(enum stm_uart_port port, uint8_t ch); extern HAL_StatusTypeDef uart_recv_char2(enum stm_uart_port port, uint8_t *cp, uint32_t timeout); extern HAL_StatusTypeDef uart_send_string2(enum stm_uart_port port, const char *s); extern HAL_StatusTypeDef uart_send_number2(enum stm_uart_port port, uint32_t num, uint8_t digits, uint8_t radix); extern HAL_StatusTypeDef uart_send_bytes(enum stm_uart_port port, uint8_t *buf, size_t len); extern HAL_StatusTypeDef uart_receive_bytes(enum stm_uart_port port, uint8_t *buf, size_t len, uint32_t timeout); extern HAL_StatusTypeDef uart_send_hexdump(enum stm_uart_port port, const uint8_t *buf, const uint8_t start_offset, const uint8_t end_offset); #define uart_send_binary(num, bits) uart_send_number(num, bits, 2) #define uart_send_integer(num, digits) uart_send_number(num, digits, 10) #define uart_send_hex(num, digits) uart_send_number(num, digits, 16) #endif /* __STM32_UART_H */