Fix for flash size override.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 8 May 2018 04:22:12 +0000 (13:22 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 8 May 2018 04:25:10 +0000 (13:25 +0900)
src/configure

index b1c0b17..09c23d4 100755 (executable)
@@ -201,7 +201,8 @@ STBEE)
     with_dfu=yes;
   fi  ;;
 BLUE_PILL|STM8S_DISCOVERY)
-  FLASH_SIZE=64
+  # It's 64KB version of STM32F103, but actually has 128KB
+  flash_override="-DSTM32F103_OVERRIDE_FLASH_SIZE_KB=128"
   ;;
 BLUE_PILL_G)
   MHZ=96
@@ -404,7 +405,7 @@ fi
  echo "EMULATION=$emulation";
  echo "CROSS=$cross";
  echo "MCU=$mcu";
- echo "DEFS=$use_sys3 $def_emulation $def_mhz";
+ echo "DEFS=$use_sys3 $flash_override $def_emulation $def_mhz";
  echo "LDSCRIPT=$ldscript";
  echo "LIBS=$libs";
  echo "ENABLE_FRAUCHEKY=$enable_fraucheky";