Mercurial > public > ostc4
diff Discovery/Inc/Fonts/font_T54_extra.h @ 569:3508e6dc4f22
Added new section "lower.font":
To avoid section overlap caused by the memory needs of the new characters, a new section has been introduced to store the font data behind the code and data sections. The handling is a little bit overengineered but was used to have the same look as the upper section, where a defined structure had to be rebuild to match the output of another compiler. moving the lower section behind the upper would save firmware space but result in the need of a new fontlib version.
author | Ideenmodellierer |
---|---|
date | Mon, 30 Nov 2020 20:52:49 +0100 |
parents | 1c95f811967c |
children |
line wrap: on
line diff
--- a/Discovery/Inc/Fonts/font_T54_extra.h Sun Nov 29 11:41:03 2020 +0100 +++ b/Discovery/Inc/Fonts/font_T54_extra.h Mon Nov 30 20:52:49 2020 +0100 @@ -29,7 +29,7 @@ #include "gfx_fonts.h" -static const uint8_t image_data_FontT54_0x0066[(20 * 42) - (6 * 41)] = { +static const uint8_t image_data_FontT54_0x0066[(20 * 42) - (6 * 41)] __attribute__(( section(".lower_fonts.image_data_FontT54_0x0066") )) = { 0x01,//,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,//,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,//,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -52,7 +52,7 @@ 0x01,//,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; -static const uint8_t image_data_FontT54_0x0074[(18 * 42) - (6 * 41)] = { +static const uint8_t image_data_FontT54_0x0074[(18 * 42) - (6 * 41)] __attribute__(( section(".lower_fonts.image_data_FontT54_0x0074") )) = { 0x01,//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -73,10 +73,10 @@ 0x01,//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; -static const tImage FontT54_0x0066 = { image_data_FontT54_0x0066, 20, 42}; -static const tImage FontT54_0x0074 = { image_data_FontT54_0x0074, 18, 42}; +static const tImage FontT54_0x0066 __attribute__(( section(".lower_fonts.FontT54_0x0066") )) = { image_data_FontT54_0x0066, 20, 42}; +static const tImage FontT54_0x0074 __attribute__(( section(".lower_fonts.FontT54_0x0074") )) = { image_data_FontT54_0x0074, 18, 42}; -static const tChar FontT54_array_extra[] = +static const tChar FontT54_array_extra[] __attribute__(( section(".lower_fonts.FontT54_array_extra") )) = { // character: '"' {0x0066, &FontT54_0x0066}, @@ -85,4 +85,4 @@ {0x0074, &FontT54_0x0074} }; -const tFont FontT54Extra = { 2, FontT54_array_extra, 18, 28, 42 }; +const tFont FontT54Extra __attribute__ (( used, section(".lower_font_directory.FontT54Extra") )) = { 2, FontT54_array_extra, 18, 28, 42 };