Change unique ID for GD32F103.
authorNIIBE Yutaka <gniibe@fsij.org>
Sat, 17 Nov 2018 10:11:39 +0000 (19:11 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Sat, 17 Nov 2018 10:11:39 +0000 (19:11 +0900)
ChangeLog
README
chopstx
src/main.c

index 576fc18..d71f82b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-11-17  NIIBE Yutaka  <gniibe@fsij.org>
+
+       * src/main.c (fill_serial_no_by_unique_id): Depends on MHZ.
+
+       * chopstx: Update to 1.12.
+
 2018-10-02  NIIBE Yutaka  <gniibe@fsij.org>
 
        * tool/neug_upgrade.py (main): Apply the change of
diff --git a/README b/README
index 7fadbfc..9eb38ae 100644 (file)
--- a/README
+++ b/README
@@ -185,10 +185,10 @@ You need GNU toolchain and newlib for 'arm-none-eabi' target.
 On Debian we can install the packages of gcc-arm-none-eabi,
 gdb-arm-none-eabi and its friends.  I'm using:
 
-       binutils-arm-none-eabi  2.28-5+9+b3
-       gcc-arm-none-eabi       15:6.3.1+svn253039-1
+       binutils-arm-none-eabi  2.31.1-2+10
+       gcc-arm-none-eabi       15:7-2018-q2-4
        gdb-arm-none-eabi       7.12-6+9+b2
-       libnewlib-arm-none-eabi 2.4.0.20160527-3
+       libnewlib-arm-none-eabi 3.0.0.20180802-2
 
 Or else, see https://launchpad.net/gcc-arm-embedded for preparation of
 GNU Toolchain for 'arm-none-eabi' target.
diff --git a/chopstx b/chopstx
index fffb8aa..39683db 160000 (submodule)
--- a/chopstx
+++ b/chopstx
@@ -1 +1 @@
-Subproject commit fffb8aa3b3731fb242d9b99f7d935d85425c1404
+Subproject commit 39683dbc5f66e92457f031bdf303c8226e75d55e
index 4750001..6edf108 100644 (file)
@@ -932,9 +932,8 @@ usb_main (void *arg)
 #define ID_OFFSET (2+SERIALNO_STR_LEN*2)
 static void fill_serial_no_by_unique_id (void)
 {
-  extern const uint8_t * unique_device_id (void);
   uint8_t *p = &neug_string_serial[ID_OFFSET];
-  const uint8_t *u = unique_device_id () + 8;
+  const uint8_t *u = unique_device_id () + (MHZ < 96 ? 8: 0);
   int i;
 
   for (i = 0; i < 4; i++)