Skip to content

Commit

Permalink
set bootloader in one location
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Oct 17, 2024
1 parent 7400f5c commit cff95d9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Source/Heavy/DaisyExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,36 +299,35 @@ class DaisyExporter : public ExporterBase {
// set linker script and if we want bootloader
bool bootloader = false;

if (size > 1) {
bootloader = true;
}

if (size == 2) {
metaDaisy.getDynamicObject()->setProperty("linker_script", "../../libdaisy/core/STM32H750IB_sram.lds");
metaDaisy.getDynamicObject()->setProperty("bootloader", "BOOT_SRAM");
bootloader = true;
} else if (size == 3) {
metaDaisy.getDynamicObject()->setProperty(
"linker_script",
Toolchain::dir.getChildFile("etc").getChildFile("linkers").getChildFile("sram_linker_sdram.lds").getFullPathName()
);
metaDaisy.getDynamicObject()->setProperty("bootloader", "BOOT_SRAM");
bootloader = true;
} else if (size == 4) {
metaDaisy.getDynamicObject()->setProperty("linker_script", "../../libdaisy/core/STM32H750IB_qspi.lds");
metaDaisy.getDynamicObject()->setProperty("bootloader", "BOOT_QSPI");
bootloader = true;
} else if (size == 5) {
metaDaisy.getDynamicObject()->setProperty(
"linker_script",
Toolchain::dir.getChildFile("etc").getChildFile("linkers").getChildFile("qspi_linker_sdram.lds").getFullPathName()
);
metaDaisy.getDynamicObject()->setProperty("bootloader", "BOOT_QSPI");
bootloader = true;
} else if (size == 6) {
metaDaisy.getDynamicObject()->setProperty("linker_script", customLinker.getFullPathName());
if (appType == 2) {
metaDaisy.getDynamicObject()->setProperty("bootloader", "BOOT_SRAM");
} else if (appType == 3) {
metaDaisy.getDynamicObject()->setProperty("bootloader", "BOOT_QSPI");
}
bootloader = true;
}

metaJson->setProperty("daisy", metaDaisy);
Expand Down

0 comments on commit cff95d9

Please sign in to comment.