blob: 2e360ea025723a1bd5be261a17d294c757f53ff4 (
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
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
69
70
71
72
73
74
75
76
77
78
79
80
|
# TARGET_FLAGS are to be passed while compiling, assembling, linking.
TARGET_FLAGS :=
# Board-specific configuration values. Flash and SRAM sizes in bytes.
ifeq ($(BOARD), maple)
MCU := STM32F103RB
PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOA
ERROR_LED_PIN := 5
DENSITY := STM32_MEDIUM_DENSITY
TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), maple_native)
MCU := STM32F103ZE
PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 15
DENSITY := STM32_HIGH_DENSITY
TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), maple_mini)
MCU := STM32F103CB
PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOB
ERROR_LED_PIN := 1
DENSITY := STM32_MEDIUM_DENSITY
TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), maple_RET6)
MCU := STM32F103RE
PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOA
ERROR_LED_PIN := 5
DENSITY := STM32_HIGH_DENSITY
TARGET_FLAGS += -D$(DENSITY)
endif
ifeq ($(BOARD), olimex_stm32_h103)
MCU := STM32F103RB
PRODUCT_ID := 0003
ERROR_LED_PORT := GPIOC
ERROR_LED_PIN := 12
DENSITY := STM32_MEDIUM_DENSITY
TARGET_FLAGS += -D$(DENSITY)
endif
TARGET_FLAGS += -DBOARD_$(BOARD) -DMCU_$(MCU) \
-DERROR_LED_PORT=$(ERROR_LED_PORT) \
-DERROR_LED_PIN=$(ERROR_LED_PIN)
# STM32 series-specific configuration values.
# NB: these only work for STM32F1 performance line chips, but those
# are the only ones we support at this time. If you add support for
# STM32F1 connectivity line MCUs or other STM32 families, this section
# will need to change.
LD_SERIES_PATH := $(LDDIR)/stm32/series/f1/performance
LIBMAPLE_MODULE_SERIES := $(LIBMAPLE_PATH)/stm32f1
# 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)
|