From 9fa65fc9b32e67da96eae7324a78c70c22939e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Fri, 7 Aug 2020 13:45:11 +0200 Subject: [PATCH 01/37] Update to MCUXpresso IDE 11.2.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42497c8dd..b706368e3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you're one of the brave few who wants to hack the firmware then read on. `git clone --recursive git@github.com:UltimateHackingKeyboard/firmware.git` -2. Download and install MCUXpresso IDE for [Linux](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/mcuxpressoide-11.0.1_2563.x86_64.deb.bin), [Mac](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.0.1_2563.pkg), or [Windows](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.0.1_2563.exe). +2. Download and install MCUXpresso IDE for [Linux](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/mcuxpressoide-11.2.0_4120.x86_64.deb.bin), [Mac](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.2.0_4120.pkg), or [Windows](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.2.0_4120.exe). 3. Install the GNU ARM Eclipse Plugins for in McuXpresso IDE. This is needed to make indexing work, and to avoid the "Orphaned configuration" error message in project properties. 1. Visit the [latest release](https://github.com/gnu-mcu-eclipse/eclipse-plugins/releases/latest). From e52babac4498fd3fd0778ea17cd80c75ee4f29fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 9 Aug 2020 20:54:24 +0200 Subject: [PATCH 02/37] Update README.md --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b706368e3..8d2e52734 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,10 @@ If you're one of the brave few who wants to hack the firmware then read on. 2. Download and install MCUXpresso IDE for [Linux](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/mcuxpressoide-11.2.0_4120.x86_64.deb.bin), [Mac](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.2.0_4120.pkg), or [Windows](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.2.0_4120.exe). -3. Install the GNU ARM Eclipse Plugins for in McuXpresso IDE. This is needed to make indexing work, and to avoid the "Orphaned configuration" error message in project properties. - 1. Visit the [latest release](https://github.com/gnu-mcu-eclipse/eclipse-plugins/releases/latest). - 2. Download the zip file. - 3. In MCUXpresso IDE, go to Help > "Install New Software...", then a new dialog will appear. - 4. Click the "Add..." button, then a new dialog will appear. - 5. Click the "Archive..." button and choose the downloaded zip file. - 6. Go with the flow and install the plugin. +3. Install the GNU ARM Eclipse Plugins for in McuXpresso IDE. This is needed to make indexing work, and to avoid the "Orphaned configuration" error message in project properties. + 1. In MCUXpresso IDE, go to Help > "Install New Software...", then a new dialog will appear. + 2. In the Name field type "Eclipse Embedded CDT Plug-ins" and in the Location field type "https://download.eclipse.org/embed-cdt/updates/neon", then click on the Add button. + 3. Go with the flow and install the plugin. 4. In the IDE, import this project by invoking *File -> Import -> General -> Existing Projects into Workspace*, select the *left* or *right* directory depending on the desired firmware, then click on the *Finish* button. From dc61e4b2ef7bbe0d950b6ab8e08c6cae11e90c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 9 Aug 2020 20:54:50 +0200 Subject: [PATCH 03/37] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d2e52734..b1367944a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ If you're one of the brave few who wants to hack the firmware then read on. 3. Install the GNU ARM Eclipse Plugins for in McuXpresso IDE. This is needed to make indexing work, and to avoid the "Orphaned configuration" error message in project properties. 1. In MCUXpresso IDE, go to Help > "Install New Software...", then a new dialog will appear. - 2. In the Name field type "Eclipse Embedded CDT Plug-ins" and in the Location field type "https://download.eclipse.org/embed-cdt/updates/neon", then click on the Add button. + 2. In the Name field type `Eclipse Embedded CDT Plug-ins` and in the Location field type `https://download.eclipse.org/embed-cdt/updates/neon`, then click on the Add button. 3. Go with the flow and install the plugin. 4. In the IDE, import this project by invoking *File -> Import -> General -> Existing Projects into Workspace*, select the *left* or *right* directory depending on the desired firmware, then click on the *Finish* button. From 23ef6e029cdac65424530ef603ff805876432df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Wed, 12 Aug 2020 23:14:49 +0200 Subject: [PATCH 04/37] Add SDK_2.8.0_MKL17Z32xxx4 as a submodule. --- .gitmodules | 3 +++ lib/SDK_2.8.0_MKL17Z32xxx4 | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/SDK_2.8.0_MKL17Z32xxx4 diff --git a/.gitmodules b/.gitmodules index 6dced863b..8980186cf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "lib/agent"] path = lib/agent url = https://github.com/UltimateHackingKeyboard/agent.git +[submodule "lib/SDK_2.8.0_MKL17Z32xxx4"] + path = lib/SDK_2.8.0_MKL17Z32xxx4 + url = git@github.com:UltimateHackingKeyboard/SDK_2.8.0_MKL17Z32xxx4.git diff --git a/lib/SDK_2.8.0_MKL17Z32xxx4 b/lib/SDK_2.8.0_MKL17Z32xxx4 new file mode 160000 index 000000000..2d5ad7c31 --- /dev/null +++ b/lib/SDK_2.8.0_MKL17Z32xxx4 @@ -0,0 +1 @@ +Subproject commit 2d5ad7c31c503c1357229cf22cac1768f33c4df1 From cb71e7b1c47844e30cfe6d18170a9b4369da0c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Wed, 12 Aug 2020 23:24:58 +0200 Subject: [PATCH 05/37] Delete SDK_2.8.0_MKL17Z32xxx4 submodule. --- .gitmodules | 3 --- lib/SDK_2.8.0_MKL17Z32xxx4 | 1 - 2 files changed, 4 deletions(-) delete mode 160000 lib/SDK_2.8.0_MKL17Z32xxx4 diff --git a/.gitmodules b/.gitmodules index 8980186cf..6dced863b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,3 @@ [submodule "lib/agent"] path = lib/agent url = https://github.com/UltimateHackingKeyboard/agent.git -[submodule "lib/SDK_2.8.0_MKL17Z32xxx4"] - path = lib/SDK_2.8.0_MKL17Z32xxx4 - url = git@github.com:UltimateHackingKeyboard/SDK_2.8.0_MKL17Z32xxx4.git diff --git a/lib/SDK_2.8.0_MKL17Z32xxx4 b/lib/SDK_2.8.0_MKL17Z32xxx4 deleted file mode 160000 index 2d5ad7c31..000000000 --- a/lib/SDK_2.8.0_MKL17Z32xxx4 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2d5ad7c31c503c1357229cf22cac1768f33c4df1 From 648e290208f7a98fd2124538008ef2a64082c0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Wed, 12 Aug 2020 23:26:49 +0200 Subject: [PATCH 06/37] Add SDK_2.8.0_MKL17Z32xxx4 submodule via HTTPS. --- .gitmodules | 3 +++ lib/SDK_2.8.0_MKL17Z32xxx4 | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/SDK_2.8.0_MKL17Z32xxx4 diff --git a/.gitmodules b/.gitmodules index 6dced863b..0e7eb87be 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "lib/agent"] path = lib/agent url = https://github.com/UltimateHackingKeyboard/agent.git +[submodule "lib/SDK_2.8.0_MKL17Z32xxx4"] + path = lib/SDK_2.8.0_MKL17Z32xxx4 + url = https://github.com/UltimateHackingKeyboard/SDK_2.8.0_MKL17Z32xxx4.git diff --git a/lib/SDK_2.8.0_MKL17Z32xxx4 b/lib/SDK_2.8.0_MKL17Z32xxx4 new file mode 160000 index 000000000..2d5ad7c31 --- /dev/null +++ b/lib/SDK_2.8.0_MKL17Z32xxx4 @@ -0,0 +1 @@ +Subproject commit 2d5ad7c31c503c1357229cf22cac1768f33c4df1 From 6cf77ee30069594198b1b078c91c5822d6f6a695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 13 Aug 2020 10:15:41 +0200 Subject: [PATCH 07/37] Migrate the key cluster firmware from MKL03Z32VFK4 to MKL17Z32VFM4. --- keycluster/Makefile | 26 ++++++------ keycluster/build/.cproject | 28 ++++++------- keycluster/build/.project | 42 +++++++++---------- .../build/uhk-keycluster_debug_jlink.launch | 2 +- .../build/uhk-keycluster_release_jlink.launch | 2 +- lib/SDK_2.8.0_MKL17Z32xxx4 | 2 +- shared/module/init_peripherals.c | 2 +- 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/keycluster/Makefile b/keycluster/Makefile index c00f51e72..6d0662cb4 100644 --- a/keycluster/Makefile +++ b/keycluster/Makefile @@ -15,10 +15,10 @@ PROJECT_NAME = uhk_keycluster # Defines the part type that this project uses. -PART = MKL03Z32VFK4 +PART = MKL17Z32VFM4 # Defines the linker script to use for the application. -LDSCRIPT = ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/MKL03Z32xxx4_flash.ld +LDSCRIPT = ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/gcc/MKL17Z32xxx4_flash.ld # Size of the heap and stack. HEAP_SIZE = 0 @@ -36,22 +36,22 @@ JLINK_SCRIPT = ../scripts/flash-keycluster.jlink # Source files. SOURCE = $(wildcard src/*.c) \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/system_MKL03Z4.c \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/startup_MKL03Z4.S \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_clock.c \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_gpio.c \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_i2c.c \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_lptmr.c \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_spi.c \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_tpm.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/system_MKL17Z644.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/gcc/startup_MKL17Z644.S \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers/fsl_clock.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers/fsl_gpio.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers/fsl_i2c.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers/fsl_lptmr.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers/fsl_spi.c \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers/fsl_tpm.c \ $(wildcard ../shared/*.c) \ $(wildcard ../shared/module/*.c) # Header files. IPATH = src \ - ../lib/KSDK_2.0_MKL03Z8xxx4/CMSIS/Include \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4 \ - ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/CMSIS/Include \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644 \ + ../lib/SDK_2.8.0_MKL17Z32xxx4/devices/MKL17Z644/drivers \ ../shared # Include main Makefile. diff --git a/keycluster/build/.cproject b/keycluster/build/.cproject index 848ac01d9..8b4795b1b 100644 --- a/keycluster/build/.cproject +++ b/keycluster/build/.cproject @@ -75,19 +75,19 @@