summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
authorAlex Evans <715855+mmalex@users.noreply.github.com>2024-11-07 12:01:15 +0000
committerAlex Evans <715855+mmalex@users.noreply.github.com>2024-11-07 12:01:15 +0000
commitcc7afbbb54d2b66cc3a89f2748c85fc632634d1f (patch)
tree5f5c07c1aa0c6a9cf8dcf3543e68fd4626a8769f /bootloader
parent78a4df6ca67f937cda8462d43cbd9547994b6474 (diff)
downloadplinky-cc7afbbb54d2b66cc3a89f2748c85fc632634d1f.tar.gz
work on build tooling to choose a golden bootloader (dubbed, v1.04) and then make a BOOTLOAD.UF2 that actually encompasses latest firmware and the golden bootloader
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/ :