[Gnuk-users] Proposed patch to fix regnual on "blue pill" board

Jeremy Drake jeremydrake+gnuk at eacceleration.com
Fri Aug 11 22:48:16 UTC 2017


I just updated and tried it, and I think that configure needs a patch 
like the following:

diff --git a/src/configure b/src/configure
index 18f1bd3..fed321f 100755
--- a/src/configure
+++ b/src/configure
@@ -167,7 +167,7 @@ MEMORY_SIZE=20
  # Settings for TARGET
  case $target in
  BLUE_PILL)
-  flash_override="-DSTM32F103_OVERRIDE_FLASH_SIZE_KB" ;;
+  flash_override="-DSTM32F103_OVERRIDE_FLASH_SIZE_KB=$FLASH_SIZE" ;;
  CQ_STARM|STBEE_MINI)
    if test "$with_dfu" = "default"; then
      with_dfu=yes;


Not sure if it would be better to use the $FLASH_SIZE variable or a 
hardcoded 128 there, though, since FLASH_SIZE is overridden in other cases 
in the same switch.

Oddly enough, I don't know how it compiled as committed, as the expansion 
of the define should have looked something like
uint32_t end = FLASH_START_ADDR + *1024;

Also, it might be nice to change "DEFS=..." to override "DEFS+=..." to 
allow adding more DEFS on the make command line.  Like:

diff --git a/src/configure b/src/configure
index 18f1bd3..fed321f 100755
--- a/src/configure
+++ b/src/configure
@@ -368,7 +368,7 @@ else
  fi


-echo -e "DEFS=$use_sys3 $flash_override" '\n'      \
+echo -e "override DEFS+=$use_sys3 $flash_override" '\n'      \
       "$DEBUG_MAKE_OPTION" '\n'  \
       "$PINPAD_MAKE_OPTION" '\n' \
       "$HEXOUTPUT_MAKE_OPTION"   \


On Sat, 12 Aug 2017, NIIBE Yutaka wrote:

> Chopstx 1.4 and Gnuk 1.2.5 are released, syncing both repos.



More information about the gnuk-users mailing list