diff BootLoader/Src/base_bootlader.c @ 1016:0dd92e9b70a2 BootloaderOstc5

Bootloader use compressed fonts: The previous Bootloader was larger than 128k => not fitting into the first sectors of the second flash bank. Most memory is occupied by the two fonts in use. In order to make the bootloader small enough for the bootloader update function the fonts need to be compressed. To avoid code changes in visualization functions the compressed fonts are decompressed into RAM and then used in the same way as before.
author Ideenmodellierer
date Wed, 28 May 2025 17:20:44 +0200
parents 4ef0511c6665
children 9d9d506a82d3
line wrap: on
line diff
--- a/BootLoader/Src/base_bootlader.c	Tue May 06 21:56:03 2025 +0200
+++ b/BootLoader/Src/base_bootlader.c	Wed May 28 17:20:44 2025 +0200
@@ -223,7 +223,7 @@
 #include "stm32f4xx_hal_flash_ex.h"
 #include "stm32f4xx_hal_wwdg.h"
 
-#include "Fonts/Font_T48_plus.h"
+#include "font_T48_min.h"
 #include "font_T24_min.h"
 #include "Fonts/image_heinrichs_weikamp.h"
 
@@ -239,6 +239,9 @@
 #include <stdio.h>
 #include <string.h> // for memcopy
 
+
+extern void decompressFont(const tFont* pFont, tImageComp** pFontComp);
+
 /* Private define ------------------------------------------------------------*/
 #define BUFFER_SIZE         ((uint32_t)0x00177000)
 #define WRITE_READ_ADDR     ((uint32_t)0x0000)
@@ -486,6 +489,10 @@
 
 	MX_SPI_Init();
 	SDRAM_Config();
+
+	decompressFont(&FontT24min, (tImageComp**)&FontT24_Comp);
+	decompressFont(&FontT48min, (tImageComp**)&FontT48_Comp);
+
 	HAL_Delay(100);
 
 	GFX_init1_no_DMA(&pLayerInvisible, 2);