summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/.clang-format5
-rwxr-xr-xbootloader/.settings/stm32cubeide.project.prefs4
-rwxr-xr-xbootloader/Core/Src/ghostfat.c10
-rwxr-xr-xbootloader/STM32L476VGTX_FLASH.ld8
4 files changed, 22 insertions, 5 deletions
diff --git a/bootloader/.clang-format b/bootloader/.clang-format
new file mode 100644
index 0000000..025a880
--- /dev/null
+++ b/bootloader/.clang-format
@@ -0,0 +1,5 @@
+BasedOnStyle: LLVM
+ColumnLimit: 132
+BreakBeforeBraces: Attach
+SortIncludes: Never
+
diff --git a/bootloader/.settings/stm32cubeide.project.prefs b/bootloader/.settings/stm32cubeide.project.prefs
index 8ed9ba8..c9a7670 100755
--- a/bootloader/.settings/stm32cubeide.project.prefs
+++ b/bootloader/.settings/stm32cubeide.project.prefs
@@ -1,4 +1,4 @@
-2F62501ED4689FB349E356AB974DBE57=94ADD5E4909A0CFA8C7645E0FE590B85
-8DF89ED150041C4CBC7CB9A9CAA90856=94ADD5E4909A0CFA8C7645E0FE590B85
+2F62501ED4689FB349E356AB974DBE57=AC0AF904BCE4C59D2BC8F5F3C8F9EA88
+8DF89ED150041C4CBC7CB9A9CAA90856=AC0AF904BCE4C59D2BC8F5F3C8F9EA88
DC22A860405A8BF2F2C095E5B6529F12=784C6BDED0B54E15528F5E4F1E9EDAE2
eclipse.preferences.version=1
diff --git a/bootloader/Core/Src/ghostfat.c b/bootloader/Core/Src/ghostfat.c
index e3a94d6..28ff3e4 100755
--- a/bootloader/Core/Src/ghostfat.c
+++ b/bootloader/Core/Src/ghostfat.c
@@ -76,10 +76,14 @@ struct UF2File {
int size;
};
+#define BOOTLOADER_VERSION "1.04"
+__attribute__((section(".signature"), used)) const char firmware_signature[4] = BOOTLOADER_VERSION;
+
+
const char infoUf2File[] = //
- "UF2 Bootloader v1.0.3 Plinky\r\n"
- "Model: Plinky Synth v1.0.3\r\n"
- "Board-ID: STM32L476-Plinky-103\r\n";
+ "UF2 Bootloader v" BOOTLOADER_VERSION " Plinky\r\n"
+ "Model: Plinky Synth Bootloader v" BOOTLOADER_VERSION "\r\n"
+ "Board-ID: STM32L476-Plinky-v3\r\n";
const char indexFile[] = //
"<!doctype html>\n"
diff --git a/bootloader/STM32L476VGTX_FLASH.ld b/bootloader/STM32L476VGTX_FLASH.ld
index e5b911a..e43d901 100755
--- a/bootloader/STM32L476VGTX_FLASH.ld
+++ b/bootloader/STM32L476VGTX_FLASH.ld
@@ -68,6 +68,7 @@ SECTIONS
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
+
} >FLASH
/* Constant data into "FLASH" Rom type memory */
@@ -122,6 +123,7 @@ SECTIONS
. = ALIGN(4);
} >FLASH
+
/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
@@ -138,6 +140,7 @@ SECTIONS
} >RAM AT> FLASH
+
/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
@@ -165,6 +168,11 @@ SECTIONS
. = ALIGN(8);
} >RAM
+ .signature :
+ {
+ . = ALIGN(4);
+ KEEP(*(.signature))
+ } > FLASH
/* Remove information from the compiler libraries */
/DISCARD/ :