aboutsummaryrefslogtreecommitdiffstats
path: root/support/make/target-config.mk
blob: 48a33deca53844c656c9d6f073cb0a33ffef6e3d (plain)
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
# TARGET_FLAGS are to be passed while compiling, assembling, linking.

TARGET_FLAGS :=

# Board-specific configuration values. Punt these to board-specific
# include files.

include $(MAKEDIR)/board-includes/$(BOARD).mk

TARGET_FLAGS += -DBOARD_$(BOARD) -DMCU_$(MCU) \
                -DERROR_LED_PORT=$(ERROR_LED_PORT) \
                -DERROR_LED_PIN=$(ERROR_LED_PIN)

# STM32 series-specific configuration values.

LD_SERIES_PATH := $(LDDIR)/stm32/series/$(MCU_SERIES)
ifeq ($(MCU_SERIES), stm32f1)
   # Hack: force F1 to performance line; this will need to change if
   # you add connectivity etc. line support.
   LD_SERIES_PATH := $(LD_SERIES_PATH)/performance
endif
LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/$(MCU_SERIES)

# Memory target-specific configuration values

ifeq ($(MEMORY_TARGET), ram)
   LDSCRIPT := $(BOARD)/ram.ld
   VECT_BASE_ADDR := VECT_TAB_RAM
endif
ifeq ($(MEMORY_TARGET), flash)
   LDSCRIPT := $(BOARD)/flash.ld
   VECT_BASE_ADDR := VECT_TAB_FLASH
endif
ifeq ($(MEMORY_TARGET), jtag)
   LDSCRIPT := $(BOARD)/jtag.ld
   VECT_BASE_ADDR := VECT_TAB_BASE
endif

TARGET_FLAGS += -D$(VECT_BASE_ADDR)