File tree Expand file tree Collapse file tree 18 files changed +75
-134
lines changed Expand file tree Collapse file tree 18 files changed +75
-134
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
6
6
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
7
7
8
8
include $(TOP ) /$(BOARD_PATH ) /board.mk
9
+ CPU_CORE ?= cortex-m0
9
10
10
11
# --------------
11
12
# Compiler Flags
@@ -17,19 +18,11 @@ CFLAGS += \
17
18
# GCC Flags
18
19
GCC_CFLAGS += \
19
20
-flto \
20
- -mthumb \
21
- -mabi=aapcs \
22
- -mcpu=cortex-m0 \
23
- -mfloat-abi=soft \
24
21
-nostdlib -nostartfiles \
25
22
26
23
# suppress warning caused by vendor mcu driver
27
24
GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
28
25
29
- # IAR Flags
30
- IAR_CFLAGS += --cpu cortex-m0
31
- IAR_ASFLAGS += --cpu cortex-m0
32
-
33
26
# ------------------------
34
27
# All source paths should be relative to the top level.
35
28
# ------------------------
@@ -51,6 +44,3 @@ INC += \
51
44
$(TOP ) /lib/CMSIS_5/CMSIS/Core/Include \
52
45
$(TOP ) /$(ST_CMSIS ) /Include \
53
46
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
54
-
55
- # For freeRTOS port source
56
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM0
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
5
5
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
6
6
7
7
include $(TOP ) /$(BOARD_PATH ) /board.mk
8
+ CPU_CORE ?= cortex-m3
8
9
9
10
# --------------
10
11
# Compiler Flags
@@ -15,16 +16,8 @@ CFLAGS += \
15
16
# GCC Flags
16
17
GCC_CFLAGS += \
17
18
-flto \
18
- -mthumb \
19
- -mabi=aapcs \
20
- -mcpu=cortex-m3 \
21
- -mfloat-abi=soft \
22
19
-nostdlib -nostartfiles \
23
20
24
- # IAR Flags
25
- IAR_CFLAGS += --cpu cortex-m3
26
- IAR_ASFLAGS += --cpu cortex-m3
27
-
28
21
# ------------------------
29
22
# All source paths should be relative to the top level.
30
23
# ------------------------
@@ -43,12 +36,6 @@ INC += \
43
36
$(TOP ) /$(ST_CMSIS ) /Include \
44
37
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
45
38
46
- # For freeRTOS port source
47
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM3
48
-
49
- # For flash-jlink target
50
- JLINK_DEVICE = stm32f103c8
51
-
52
39
# flash target ROM bootloader
53
40
flash-dfu-util : $(BUILD ) /$(PROJECT ) .bin
54
41
dfu-util -R -a 0 --dfuse-address 0x08000000 -D $<
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ uint32_t board_millis(void)
203
203
204
204
void HardFault_Handler (void )
205
205
{
206
- asm( "bkpt " );
206
+ __asm( "BKPT #0\n " );
207
207
}
208
208
209
209
// Required by __libc_init_array in startup code if we are compiling using
Original file line number Diff line number Diff line change @@ -9,18 +9,17 @@ DEPS_SUBMODULES += \
9
9
$(ST_HAL_DRIVER )
10
10
11
11
include $(TOP ) /$(BOARD_PATH ) /board.mk
12
+ CPU_CORE ?= cortex-m3
12
13
13
14
CFLAGS += \
15
+ -DCFG_TUSB_MCU=OPT_MCU_STM32F2
16
+
17
+ GCC_CFLAGS += \
14
18
-flto \
15
- -mthumb \
16
- -mabi=aapcs \
17
- -mcpu=cortex-m3 \
18
- -mfloat-abi=soft \
19
19
-nostdlib -nostartfiles \
20
- -DCFG_TUSB_MCU=OPT_MCU_STM32F2
21
20
22
21
# mcu driver cause following warnings
23
- CFLAGS += -Wno-error=sign-compare
22
+ GCC_CFLAGS += -Wno-error=sign-compare
24
23
25
24
SRC_C += \
26
25
src/portable/synopsys/dwc2/dcd_dwc2.c \
@@ -36,6 +35,3 @@ INC += \
36
35
$(TOP ) /$(ST_CMSIS ) /Include \
37
36
$(TOP ) /$(ST_HAL_DRIVER ) /Inc \
38
37
$(TOP ) /$(BOARD_PATH )
39
-
40
- # For freeRTOS port source
41
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM3
Original file line number Diff line number Diff line change @@ -9,14 +9,10 @@ DEPS_SUBMODULES += \
9
9
$(ST_HAL_DRIVER )
10
10
11
11
include $(TOP ) /$(BOARD_PATH ) /board.mk
12
+ CPU_CORE ?= cortex-m4
12
13
13
14
CFLAGS += \
14
15
-flto \
15
- -mthumb \
16
- -mabi=aapcs \
17
- -mcpu=cortex-m4 \
18
- -mfloat-abi=hard \
19
- -mfpu=fpv4-sp-d16 \
20
16
-nostdlib -nostartfiles \
21
17
-DCFG_TUSB_MCU=OPT_MCU_STM32F3
22
18
@@ -37,6 +33,3 @@ INC += \
37
33
$(TOP ) /$(ST_CMSIS ) /Include \
38
34
$(TOP ) /$(ST_HAL_DRIVER ) /Inc \
39
35
$(TOP ) /$(BOARD_PATH )
40
-
41
- # For freeRTOS port source
42
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM4F
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
6
6
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
7
7
8
8
include $(TOP ) /$(BOARD_PATH ) /board.mk
9
+ CPU_CORE ?= cortex-m4
9
10
10
11
# --------------
11
12
# Compiler Flags
@@ -16,20 +17,11 @@ CFLAGS += \
16
17
# GCC Flags
17
18
GCC_CFLAGS += \
18
19
-flto \
19
- -mthumb \
20
- -mabi=aapcs \
21
- -mcpu=cortex-m4 \
22
- -mfloat-abi=hard \
23
- -mfpu=fpv4-sp-d16 \
24
20
-nostdlib -nostartfiles
25
21
26
22
# suppress warning caused by vendor mcu driver
27
23
GCC_CFLAGS += -Wno-error=cast-align
28
24
29
- # IAR Flags
30
- IAR_CFLAGS += --cpu cortex-m4 --fpu VFPv4
31
- IAR_ASFLAGS += --cpu cortex-m4 --fpu VFPv4
32
-
33
25
# -----------------
34
26
# Sources & Include
35
27
# -----------------
@@ -51,8 +43,5 @@ INC += \
51
43
$(TOP ) /$(ST_CMSIS ) /Include \
52
44
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
53
45
54
- # For freeRTOS port source
55
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM4F
56
-
57
46
# flash target using on-board stlink
58
47
flash : flash-stlink
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
6
6
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
7
7
8
8
include $(TOP ) /$(BOARD_PATH ) /board.mk
9
+ CPU_CORE ?= cortex-m7
9
10
10
11
# --------------
11
12
# Compiler Flags
@@ -29,20 +30,11 @@ endif
29
30
# GCC Flags
30
31
GCC_CFLAGS += \
31
32
-flto \
32
- -mthumb \
33
- -mabi=aapcs \
34
- -mcpu=cortex-m7 \
35
- -mfloat-abi=hard \
36
- -mfpu=fpv5-d16 \
37
33
-nostdlib -nostartfiles
38
34
39
35
# mcu driver cause following warnings
40
36
GCC_CFLAGS += -Wno-error=shadow -Wno-error=cast-align
41
37
42
- # IAR Flags
43
- IAR_CFLAGS += --cpu cortex-m7 --fpu VFPv5_D16
44
- IAR_ASFLAGS += --cpu cortex-m7 --fpu VFPv5_D16
45
-
46
38
# -----------------
47
39
# Sources & Include
48
40
# -----------------
@@ -64,6 +56,3 @@ INC += \
64
56
$(TOP ) /lib/CMSIS_5/CMSIS/Core/Include \
65
57
$(TOP ) /$(ST_CMSIS ) /Include \
66
58
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
67
-
68
- # For freeRTOS port source
69
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM7/r0p1
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
5
5
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
6
6
7
7
include $(TOP ) /$(BOARD_PATH ) /board.mk
8
+ CPU_CORE ?= cortex-m0plus
8
9
9
10
# --------------
10
11
# Compiler Flags
@@ -15,19 +16,11 @@ CFLAGS += \
15
16
# GCC Flags
16
17
GCC_CFLAGS += \
17
18
-flto \
18
- -mthumb \
19
- -mabi=aapcs \
20
- -mcpu=cortex-m0plus \
21
- -mfloat-abi=soft \
22
19
-nostdlib -nostartfiles
23
20
24
21
# suppress warning caused by vendor mcu driver
25
22
GCC_CFLAGS += -Wno-error=cast-align
26
23
27
- # IAR Flags
28
- IAR_CFLAGS += --cpu cortex-m0
29
- IAR_ASFLAGS += --cpu cortex-m0
30
-
31
24
# -----------------
32
25
# Sources & Include
33
26
# -----------------
@@ -50,8 +43,5 @@ INC += \
50
43
$(TOP ) /$(ST_CMSIS ) /Include \
51
44
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
52
45
53
- # For freeRTOS port source
54
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM0
55
-
56
46
# flash target using on-board stlink
57
47
flash : flash-stlink
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
6
6
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
7
7
8
8
include $(TOP ) /$(BOARD_PATH ) /board.mk
9
+ CPU_CORE ?= cortex-m4
9
10
10
11
# --------------
11
12
# Compiler Flags
@@ -16,20 +17,11 @@ CFLAGS += \
16
17
# GCC Flags
17
18
GCC_CFLAGS += \
18
19
-flto \
19
- -mthumb \
20
- -mabi=aapcs \
21
- -mcpu=cortex-m4 \
22
- -mfloat-abi=hard \
23
- -mfpu=fpv4-sp-d16 \
24
20
-nostdlib -nostartfiles \
25
21
26
22
# suppress warning caused by vendor mcu driver
27
23
GCC_CFLAGS += -Wno-error=cast-align
28
24
29
- # IAR Flags
30
- IAR_CFLAGS += --cpu cortex-m4 --fpu VFPv4
31
- IAR_ASFLAGS += --cpu cortex-m4 --fpu VFPv4
32
-
33
25
# -----------------
34
26
# Sources & Include
35
27
# -----------------
@@ -53,8 +45,5 @@ INC += \
53
45
$(TOP ) /$(ST_CMSIS ) /Include \
54
46
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
55
47
56
- # For freeRTOS port source
57
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM4F
58
-
59
48
# flash target using on-board stlink
60
49
flash : flash-stlink
Original file line number Diff line number Diff line change @@ -8,13 +8,10 @@ ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY)
8
8
ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY ) xx_hal_driver
9
9
10
10
include $(TOP ) /$(BOARD_PATH ) /board.mk
11
+ CPU_CORE ?= cortex-m0plus
11
12
12
13
CFLAGS += \
13
14
-flto \
14
- -mthumb \
15
- -mabi=aapcs \
16
- -mcpu=cortex-m0plus \
17
- -mfloat-abi=soft \
18
15
-nostdlib -nostartfiles \
19
16
-DCFG_EXAMPLE_MSC_READONLY \
20
17
-DCFG_EXAMPLE_VIDEO_READONLY \
@@ -42,6 +39,3 @@ INC += \
42
39
$(TOP ) /lib/CMSIS_5/CMSIS/Core/Include \
43
40
$(TOP ) /$(ST_CMSIS ) /Include \
44
41
$(TOP ) /$(ST_HAL_DRIVER ) /Inc
45
-
46
- # For freeRTOS port source
47
- FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH ) /ARM_CM0
You can’t perform that action at this time.
0 commit comments