-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 748 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Makefile for rtthread-lab
BOARD ?= vexpress-a9
BSP ?= qemu-$(BOARD)
NET_DEV = lan9118
BSP_DIR = rt-thread/bsp/$(BSP)/
BOOT_CMD = qemu-system-arm -M $(BOARD) -net nic,model=$(NET_DEV) -net tap -kernel $(BSP_DIR)/rtthread.elf
ifneq ($(G),1)
BOOT_CMD += -nographic
endif
ifneq ($(V),1)
BOOT_CMD += 2>/dev/null
endif
help:
@echo "Usage:"
@echo
@echo "init -- download or update rt-thread"
@echo "config-- configure rt-thread"
@echo "build -- compile rt-thread"
@echo "clean -- clean rt-thread"
@echo "boot -- boot rt-thread on qemu, G=1 for graphic"
@echo
init:
git submodule update --init --remote .
config:
scons --menuconfig -C $(BSP_DIR)
build:
scons -C $(BSP_DIR)
clean:
scons -c -C $(BSP_DIR)
boot:
sudo $(BOOT_CMD)