diff --git a/stm/Makefile b/stm/Makefile
index 75fdee7c623d3d174a788b14c098bedc51932bfc..8b9e98fa084e6002e090f99ac1d8ea3d2124ff81 100644
--- a/stm/Makefile
+++ b/stm/Makefile
@@ -17,7 +17,6 @@ STMSRC=lib
 FATFSSRC=fatfs
 CC3KSRC=cc3k
 DFU=../tools/dfu.py
-OSC_VALUE=8000000
 
 AS = arm-none-eabi-as
 CC = arm-none-eabi-gcc
@@ -25,7 +24,7 @@ LD = arm-none-eabi-ld
 OBJCOPY = arm-none-eabi-objcopy
 SIZE = arm-none-eabi-size
 
-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)
+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
 CFLAGS = -I. -I$(PY_SRC) -I$(FATFSSRC) -I$(CMSIS) -I$(STMSRC) -Wall -ansi -std=gnu99 $(CFLAGS_CORTEX_M4)
 #CFLAGS += -I$(STMOTGSRC) -DUSE_HOST_MODE -DUSE_OTG_MODE
 
diff --git a/stm/lib/stm32f4xx.h b/stm/lib/stm32f4xx.h
index eca2616915ee5567af47b88836a211a58badfa84..22b47f6b2e9ec9d0dc26b9625d2a9c930801c4ce 100644
--- a/stm/lib/stm32f4xx.h
+++ b/stm/lib/stm32f4xx.h
@@ -57,6 +57,9 @@
  extern "C" {
 #endif /* __cplusplus */
   
+// dpgeorge: we include mpconfigport.h here because it contains the settings for the STM
+#include "mpconfigport.h"
+
 /** @addtogroup Library_configuration_section
   * @{
   */
diff --git a/stm/mpconfigport.h b/stm/mpconfigport.h
index 2d9eba1f4834463992b4a16684d141c7479b23e6..3577918beba63ca132e91fd63a3c7c23365eaa5a 100644
--- a/stm/mpconfigport.h
+++ b/stm/mpconfigport.h
@@ -22,6 +22,11 @@ machine_float_t machine_sqrt(machine_float_t x);
 
 // board specific definitions
 
+// choose 1 of these boards
 //#define PYBOARD
 #define PYBOARD4
 //#define STM32F4DISC
+
+#define STM32F40_41xxx
+#define USE_STDPERIPH_DRIVER
+#define HSE_VALUE (8000000)