Skip to content

Commit 4578ced

Browse files
committed
Add OSC_VALUE to Makefile
* Add the option to pass OSC frequency on command line.
1 parent e9c01de commit 4578ced

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

stm/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ FATFSSRC=fatfs
1515
CC3KSRC=cc3k
1616
DFU=../tools/dfu.py
1717
TARGET=PYBOARD
18+
OSC_VALUE=8000000
1819

1920
AS = arm-none-eabi-as
2021
CC = arm-none-eabi-gcc
2122
LD = arm-none-eabi-ld
2223
OBJCOPY = arm-none-eabi-objcopy
2324
SIZE = arm-none-eabi-size
2425

25-
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion -DSTM32F40_41xxx -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000
26+
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion -DSTM32F40_41xxx -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=$(OSC_VALUE)
2627
CFLAGS = -I. -I$(PY_SRC) -I$(FATFSSRC) -I$(CMSIS) -I$(STMSRC) -Wall -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) -D$(TARGET)
2728
#CFLAGS += -I$(STMOTGSRC) -DUSE_HOST_MODE -DUSE_OTG_MODE
2829

0 commit comments

Comments
 (0)