11ST_FAMILY = n6
22ST_PREFIX = stm32${ST_FAMILY}xx
3- ST_PREFIX_LONG = stm32${ST_FAMILY}57xx
43ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY )
54ST_HAL_DRIVER = hw/mcu/st/${ST_PREFIX}_hal_driver
65
@@ -12,26 +11,15 @@ CPU_CORE ?= cortex-m55
1211# ----------------------
1312# Port & Speed Selection
1413# ----------------------
15- RHPORT_SPEED ?= OPT_MODE_FULL_SPEED OPT_MODE_HIGH_SPEED
1614RHPORT_DEVICE ?= 1
1715RHPORT_HOST ?= 1
1816
19- # Determine RHPORT_DEVICE_SPEED if not defined
2017ifndef RHPORT_DEVICE_SPEED
21- ifeq ($(RHPORT_DEVICE ) , 0)
22- RHPORT_DEVICE_SPEED = $(firstword $(RHPORT_SPEED ) )
23- else
24- RHPORT_DEVICE_SPEED = $(lastword $(RHPORT_SPEED ) )
25- endif
18+ RHPORT_DEVICE_SPEED = OPT_MODE_HIGH_SPEED
2619endif
2720
28- # Determine RHPORT_HOST_SPEED if not defined
2921ifndef RHPORT_HOST_SPEED
30- ifeq ($(RHPORT_HOST ) , 0)
31- RHPORT_HOST_SPEED = $(firstword $(RHPORT_SPEED ) )
32- else
33- RHPORT_HOST_SPEED = $(lastword $(RHPORT_SPEED ) )
34- endif
22+ RHPORT_HOST_SPEED = OPT_MODE_HIGH_SPEED
3523endif
3624
3725# --------------
@@ -42,7 +30,9 @@ CFLAGS += \
4230 -DBOARD_TUD_RHPORT=${RHPORT_DEVICE} \
4331 -DBOARD_TUD_MAX_SPEED=${RHPORT_DEVICE_SPEED} \
4432 -DBOARD_TUH_RHPORT=${RHPORT_HOST} \
45- -DBOARD_TUH_MAX_SPEED=${RHPORT_HOST_SPEED}
33+ -DBOARD_TUH_MAX_SPEED=${RHPORT_HOST_SPEED} \
34+ -DSEGGER_RTT_SECTION=\"noncacheable_buffer\" \
35+ -DBUFFER_SIZE_UP=0x3000 \
4636
4737# GCC Flags
4838CFLAGS_GCC += \
@@ -71,10 +61,10 @@ SRC_C += \
7161 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_dma.c \
7262 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_gpio.c \
7363 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_hcd.c \
74- $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_i2c.c \
64+ $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_i2c.c \
7565 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_pcd.c \
7666 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_pcd_ex.c \
77- $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_pwr.c \
67+ $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_pwr.c \
7868 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_pwr_ex.c \
7969 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_rcc.c \
8070 $(ST_HAL_DRIVER ) /Src/${ST_PREFIX}_hal_rcc_ex.c \
@@ -89,13 +79,10 @@ INC += \
8979 $(TOP ) /$(ST_CMSIS ) /Include \
9080 $(TOP ) /$(ST_HAL_DRIVER ) /Inc
9181
92- # Linker
93- LD_FILE_GCC = $(BOARD_PATH ) /STM32N657XX_AXISRAM2_fsbl.ld
94-
9582# Startup
96- SRC_S_GCC += $(ST_CMSIS ) /Source/Templates/gcc/startup_$(ST_PREFIX_LONG ) _fsbl.s
83+ SRC_S_GCC += $(ST_CMSIS ) /Source/Templates/gcc/startup_$(MCU_VARIANT ) _fsbl.s
9784SRC_S_IAR += $(ST_CMSIS ) /Source/Templates/iar/startup_$(MCU_VARIANT ) .s
9885
9986# Linker
100- LD_FILE_GCC ?= $(ST_CMSIS ) /Source/Templates/gcc/linker/$(ST_PREFIX_LONG ) _flash.ld
87+ LD_FILE_GCC ?= $(ST_CMSIS ) /Source/Templates/gcc/linker/$(MCU_VARIANT ) _flash.ld
10188LD_FILE_IAR ?= $(ST_CMSIS ) /Source/Templates/iar/linker/$(MCU_VARIANT ) _flash.icf
0 commit comments