Mercurial > public > ostc4
comparison FontPack/base_upperRegion.c @ 21:58007c7b5499
FIX shared SFirmwareData signature at fixed address
author | JeanDo |
---|---|
date | Mon, 01 Jan 2018 18:24:07 +0100 |
parents | 11f56f208b92 |
children | 1df134a2706e |
comparison
equal
deleted
inserted
replaced
20:3b0aa4e244d7 | 21:58007c7b5499 |
---|---|
15 ============================================================================== | 15 ============================================================================== |
16 [..] Use font_tmore.c and add line to corresponding font like font_t54c | 16 [..] Use font_tmore.c and add line to corresponding font like font_t54c |
17 Don't forget to adjust the length of the font in the last line starting | 17 Don't forget to adjust the length of the font in the last line starting |
18 const tFont ..... | 18 const tFont ..... |
19 | 19 |
20 [..] last char vor der großen Lücke, Stand 160217 | 20 [..] last char vor der gro�en L�cke, Stand 160217 |
21 image_data_FontT24_0x002b[364] | 21 image_data_FontT24_0x002b[364] |
22 __attribute__((at( START_T24_FONT + (1647 * 28) ))), START_T24_FONT (0x08142F00 - MINUS_BANK) | 22 __attribute__((at( START_T24_FONT + (1647 * 28) ))), START_T24_FONT (0x08142F00 - MINUS_BANK) |
23 | 23 |
24 -> frei ab 0x0814E490 | 24 -> frei ab 0x0814E490 |
25 geht dann weiter mit image_data_ostc_fuer_Tauchcomputer_240px | 25 geht dann weiter mit image_data_ostc_fuer_Tauchcomputer_240px |
33 * | 33 * |
34 ****************************************************************************** | 34 ****************************************************************************** |
35 */ | 35 */ |
36 | 36 |
37 /* Includes ------------------------------------------------------------------*/ | 37 /* Includes ------------------------------------------------------------------*/ |
38 #include "stdio.h" | 38 |
39 #include <string.h> // for memcopy | 39 #include "FirmwareData.h" |
40 #include "gfx_fonts.h" | |
40 | 41 |
41 #include "stm32f4xx_hal.h" | 42 #include "stm32f4xx_hal.h" |
42 #include "gfx_engine.h" | |
43 | 43 |
44 /* HINT chsw 160114 | 44 const SFirmwareData font_FirmwareData SECTION_FIRMWARE_DATA = |
45 * using Jef Driesen dctool.exe I found out that from 150K to 230K there is only '0's!!! | 45 { |
46 */ | 46 .versionFirst = 0, |
47 | 47 .versionSecond = 9, |
48 #define VARIABLE_UPPER_REGION | 48 .versionThird = 0, |
49 //#define FIXED_UPPER_REGION | 49 .versionBeta = 0, |
50 | 50 |
51 #ifdef VARIABLE_UPPER_REGION | 51 /* 4 bytes, including trailing 0 */ |
52 //static const uint8_t image_data_HelloWorld[] __attribute__((at(0x08132000 ))) = "Hello World "; | 52 .signature = "cw", |
53 | 53 |
54 typedef struct | 54 .release_year = 16, |
55 .release_month = 1, | |
56 .release_day = 13, | |
57 .release_sub = 0, | |
58 | |
59 /* max 48, including trailing 0 */ | |
60 .release_info ="", | |
61 | |
62 /* for safety reasons and coming functions */ | |
63 .magic[0] = FIRMWARE_MAGIC_FIRST, | |
64 .magic[1] = FIRMWARE_MAGIC_SECOND, | |
65 .magic[2] = FIRMWARE_MAGIC_FONT, /* the magic byte for fonts*/ | |
66 .magic[3] = FIRMWARE_MAGIC_END | |
67 }; | |
68 | |
69 /* Fonts fixed in upper region */ | |
70 #include "Fonts/font_awe48.h" | |
71 #include "Fonts/font_T24.h" | |
72 #include "Fonts/font_T42.h" | |
73 #include "Fonts/font_T48_plus.h" | |
74 #include "Fonts/font_T54.h" | |
75 #include "Fonts/font_T84.h" | |
76 #include "Fonts/font_T105.h" | |
77 #include "Fonts/font_T144_plus.h" | |
78 | |
79 /* Images fixed in upper region */ | |
80 #include "Fonts/image_battery.h" | |
81 #include "Fonts/image_heinrichs_weikamp.h" | |
82 #include "Fonts/image_ostc.h" | |
83 | |
84 int main(void) | |
55 { | 85 { |
56 uint8_t versionFirst; | 86 return 0; |
57 uint8_t versionSecond; | |
58 uint8_t versionNOTUSED; | |
59 uint8_t versionBeta; | |
60 uint8_t signature[4]; | |
61 uint8_t release_year; | |
62 uint8_t release_month; | |
63 uint8_t release_day; | |
64 uint8_t release_sub; | |
65 char release_info[48]; | |
66 char dummy[4]; | |
67 } SHelloWorldData; | |
68 | |
69 static const SHelloWorldData FirmwareData __attribute__((at(0x08132000))) = { | |
70 | |
71 .versionFirst = 0, | |
72 .versionSecond = 9, | |
73 .versionNOTUSED = 0, | |
74 .versionBeta = 0, | |
75 | |
76 /* 4 bytes with trailing 0 */ | |
77 .signature = "cw", | |
78 | |
79 .release_year = 16, | |
80 .release_month = 1, | |
81 .release_day = 13, | |
82 .release_sub = 0, | |
83 | |
84 /* max 48 with trailing 0 */ | |
85 //release_info ="12345678901234567890123456789012345678901" | |
86 .release_info ="", | |
87 | |
88 /* for safety reasons and coming functions */ | |
89 .dummy[0] = 0, | |
90 .dummy[1] = 0, | |
91 .dummy[2] = 0xF0, /* the magic byte for fonts*/ | |
92 .dummy[3] = 0xFF | |
93 }; | |
94 static const uint8_t image_data_end_of_header[] __attribute__((at(0x0813217e - 5 ))) = "chsw"; | |
95 | |
96 | |
97 // at the moment 09. Sept. 2015, font_T144_plus is the first code starting at 0x0813217e | |
98 #include "font_T144_plus.c" // 0x0813217e, max. 69 kB | |
99 #include "font_T24.c" // 0x08142F00 max. 47 kB | |
100 // grosse Lücke von 120 kB | |
101 #include "image_ostc.c" // 0x0816BAD2 | |
102 #include "font_T84.c" // 0x08170000 | |
103 #include "font_T54.c" // 0x081762EE | |
104 #include "font_T105.c" // 0x0817bd00 | |
105 // der letzte Font ist T42, dahinter ist Platz von 0x081aa5a0 (Stand 151214) bis 0x081DFFFF | |
106 #include "font_T42.c" // 0x0818f9c0 | |
107 // starts at BASE_TMORE = 0x081aa5a0, defined in fontT_config.h | |
108 #include "font_Tmore.c" // 0x081aa5a0 | |
109 | |
110 | |
111 // im regulären unteren Speicher | |
112 // for checked / unchecked only at the moment | |
113 //#include "font_awe48.c" | |
114 //#include "battery2_complete.c" | |
115 #endif | |
116 | |
117 // starts at 0x081E0000 | |
118 #ifdef FIXED_UPPER_REGION | |
119 #include "font_T48_plus.c" | |
120 #include "image_heinrichs_weikamp.c" /* with no fixed region color lookup table */ | |
121 #endif | |
122 | |
123 | |
124 int main(void) //__attribute__((at(0x08000000))) | |
125 { | |
126 } | 87 } |
127 | |
128 | 88 |
129 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ | 89 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ |