-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake_def_vars.mk
68 lines (59 loc) · 1.91 KB
/
make_def_vars.mk
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
STARTDIR := $(CURDIR)
ifeq ($(DEBUG),0)
DESTDIR := $(STARTDIR)/build/release
else
DESTDIR := $(STARTDIR)/build/debug
endif
OBJDIR := $(DESTDIR)/obj
DOCDIR := $(DESTDIR)/doc
BINDIR := $(DESTDIR)/bin
ASMDIR := $(DESTDIR)/asm
DBGDIR := $(DESTDIR)/debug
SRCDIR := $(STARTDIR)/src
DEPDIR := $(DESTDIR)/dep
ifeq ($(DEBUG),0)
FLASH_TGT := $(BINDIR)/eurobot2k17.bin
FLASH_OFFSET := 0x08000000
else
FLASH_TGT := $(BINDIR)/eurobot2k17.elf
endif
ifeq ($(DEBUG),0)
CFLAGS := -Ofast -Wall -Wextra -Wno-main -std=c11 -fdata-sections -ffunction-sections -fuse-ld=gold
else
CFLAGS := -Og -g -Wall -Wextra -Wno-main -std=c11 -fdata-sections -ffunction-sections -fuse-ld=gold
endif
ASFLAGS := --warn
MFLAGS := -mfloat-abi=hard -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16
DOXYFILE := $(STARTDIR)/Doxyfile
ifeq ($V,1)
DOXYGEN := doxygen
OPENOCD := openocd
OBJCOPY := arm-none-eabi-objcopy
CC := arm-none-eabi-gcc
AS := arm-none-eabi-as
VECHO := @true
RM := rm
SCP := scp
SSH := ssh
else
DOXYGEN := @doxygen
OPENOCD := @openocd
OBJCOPY := @arm-none-eabi-objcopy
CC := @arm-none-eabi-gcc
AS := @arm-none-eabi-as
VECHO := @echo
RM := @rm
SCP := scp
SSH := ssh
endif
MKDIR_P := @mkdir -p
# Rspberry Pi variables
PI_USERNAME := pi
PI_IP := 192.168.10.115
ifeq ($(DEBUG),0)
PI_FLASH_TGT := bin/eurobot2k17.bin
else
PI_FLASH_TGT := bin/eurobot2k17.elf
endif
PI_FLASH_CMD := 'openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg -c "reset_config srst_only separate srst_nogate srst_open_drain connect_assert_srst" -c "program $(PI_FLASH_TGT) verify reset exit $(FLASH_OFFSET)"'
INCLUDES := -I$(SRCDIR)/libs/STM32F4xx_HAL_Driver/Inc/ -I$(SRCDIR)/libs/CMSIS/Device/ST/STM32F4xx/Include/ -I$(SRCDIR)/libs/CMSIS/Include/ -I$(SRCDIR)/initialisation -I$(SRCDIR)/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/ -I$(SRCDIR)/Middlewares/Third_Party/FreeRTOS/Source/include/ -I$(SRCDIR)/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/