Skip to content

Commit 0e6748c

Browse files
Merge pull request #9 from TimerOverflow/20190924
20190924
2 parents 8667516 + ff78124 commit 0e6748c

File tree

10 files changed

+67
-63
lines changed

10 files changed

+67
-63
lines changed

SysEeprom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <string.h>
88
#include "SysEeprom.h"
99
/*********************************************************************************/
10-
#if(SYS_EEPROM_REVISION_DATE != 20190905)
10+
#if(SYS_EEPROM_REVISION_DATE != 20190924)
1111
#error wrong include file. (SysEeprom.h)
1212
#endif
1313
/*********************************************************************************/

SysEeprom.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
/*********************************************************************************/
1010
#include "SysTypedef.h"
1111
/*********************************************************************************/
12-
#define SYS_EEPROM_REVISION_DATE 20190905
12+
#define SYS_EEPROM_REVISION_DATE 20190924
1313
/*********************************************************************************/
1414
/** REVISION HISTORY **/
1515
/*
16+
2019. 09. 24. - CheckEepromFirstExecuteSignature() 매크로 함수 추가. 직접 비트 필드에
17+
Jeong Hyun Gu 접근하지 않고 위 매크로 함수로 접근.
18+
1619
2019. 09. 05. - 프로그램 최초 실행 감지 루틴을 모듈 내 InitEepCommonConfig() 함수에 추가.
1720
Jeong Hyun Gu 이제 어플리케이션에서 시그니쳐 확인하여 초기화를 실행 여부를 판단할 필요없이
1821
tag_EepCommonConfig::Bit.FirstExecute 비트가 '1'이면 최초 실행으로 판단.
@@ -97,6 +100,7 @@ typedef struct
97100
tU8 InitEepCommonConfig(tag_EepCommonConfig *EepConfig, tU16 LastAddr, tU8 (*EepromWrite)(tU16 Addr, tU8 Data), tU8 (*EepromRead)(tU16 Addr, tU8 *pData));
98101
tU8 InitEepControl(tag_EepControl *Eep, const tU8 *DataBase, tU16 Length, tag_EepCommonConfig *EepConfig);
99102

103+
#define CheckEepromFirstExecuteSignature(Eepconfig) ((Eepconfig)->Bit.FirstExecute)
100104
void SetEepWriteEnable(tag_EepControl *Eep);
101105
void DoEepReadControl(tag_EepControl *Eep);
102106
tU8 DoEepWriteControl(tag_EepControl *Eep);
0 Bytes
Binary file not shown.

example/Debug/Obj/SysEeprom.pbd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This is an internal working file generated by the Source Browser.
2-
14:42 43s
2+
14:46 33s
33
F:\Github\SysEeprom\example\Debug\Obj\SysEeprom.pbi
44
F:\Github\SysEeprom\example\Debug\Obj\main.pbi

example/Debug/Obj/SysEeprom.r90

0 Bytes
Binary file not shown.

example/Debug/Obj/main.r90

-2 Bytes
Binary file not shown.

example/Release/Obj/SysEeprom.pbd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This is an internal working file generated by the Source Browser.
2-
14:42 39s
2+
14:46 37s
33
F:\Github\SysEeprom\example\Release\Obj\SysEeprom.pbi
44
F:\Github\SysEeprom\example\Release\Obj\main.pbi

example/SysEeprom.dep

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,66 @@
66
<configuration>
77
<name>Debug</name>
88
<outputs>
9+
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
10+
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
11+
<file>$PROJ_DIR$\Debug\Obj\SysEeprom.pbi</file>
12+
<file>$PROJ_DIR$\..\SysTypedef.h</file>
13+
<file>$PROJ_DIR$\Debug\Exe\SysEeprom(AT64).d90</file>
14+
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
15+
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
16+
<file>$PROJ_DIR$\Debug\Obj\main.r90</file>
917
<file>$TOOLKIT_DIR$\inc\inavr.h</file>
10-
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
1118
<file>$TOOLKIT_DIR$\inc\comp_a90.h</file>
1219
<file>$PROJ_DIR$\Debug\Obj\SysEeprom.r90</file>
13-
<file>$PROJ_DIR$\main.c</file>
14-
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
20+
<file>$PROJ_DIR$\..\SysEeprom.c</file>
1521
<file>$PROJ_DIR$\Debug\Obj\SysEeprom.pbd</file>
1622
<file>$TOOLKIT_DIR$\inc\bitdefinitions\iom64.inc</file>
17-
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
18-
<file>$PROJ_DIR$\Debug\Obj\SysEeprom.pbi</file>
23+
<file>$PROJ_DIR$\main.c</file>
1924
<file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
20-
<file>$PROJ_DIR$\..\SysTypedef.h</file>
21-
<file>$PROJ_DIR$\Debug\Exe\SysEeprom(AT64).d90</file>
22-
<file>$PROJ_DIR$\..\SysEeprom.c</file>
23-
<file>$PROJ_DIR$\Debug\Obj\main.r90</file>
25+
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
2426
<file>$TOOLKIT_DIR$\config\lnkm64s.xcl</file>
2527
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec_mul-sf.r90</file>
26-
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
2728
<file>$PROJ_DIR$\..\SysEeprom.h</file>
28-
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
2929
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
3030
</outputs>
3131
<file>
3232
<name>[ROOT_NODE]</name>
3333
<outputs>
3434
<tool>
3535
<name>XLINK</name>
36-
<file> 12</file>
36+
<file> 4</file>
3737
</tool>
3838
</outputs>
3939
</file>
4040
<file>
41-
<name>$PROJ_DIR$\main.c</name>
41+
<name>$PROJ_DIR$\Debug\Exe\SysEeprom(AT64).d90</name>
42+
<inputs>
43+
<tool>
44+
<name>XLINK</name>
45+
<file> 17 10 7 18</file>
46+
</tool>
47+
</inputs>
48+
</file>
49+
<file>
50+
<name>$PROJ_DIR$\..\SysEeprom.c</name>
4251
<outputs>
4352
<tool>
4453
<name>BICOMP</name>
45-
<file> 10</file>
54+
<file> 2</file>
4655
</tool>
4756
<tool>
4857
<name>ICCAVR</name>
49-
<file> 14</file>
58+
<file> 10</file>
5059
</tool>
5160
</outputs>
5261
<inputs>
5362
<tool>
5463
<name>BICOMP</name>
55-
<file> 5 8 7 17 0 1 2 18 11</file>
64+
<file> 20 0 19 3</file>
5665
</tool>
5766
<tool>
5867
<name>ICCAVR</name>
59-
<file> 5 8 7 17 0 1 2 18 11</file>
68+
<file> 20 0 19 3</file>
6069
</tool>
6170
</inputs>
6271
</file>
@@ -65,39 +74,30 @@
6574
<inputs>
6675
<tool>
6776
<name>BILINK</name>
68-
<file> 9 10</file>
69-
</tool>
70-
</inputs>
71-
</file>
72-
<file>
73-
<name>$PROJ_DIR$\Debug\Exe\SysEeprom(AT64).d90</name>
74-
<inputs>
75-
<tool>
76-
<name>XLINK</name>
77-
<file> 15 3 14 16</file>
77+
<file> 2 15</file>
7878
</tool>
7979
</inputs>
8080
</file>
8181
<file>
82-
<name>$PROJ_DIR$\..\SysEeprom.c</name>
82+
<name>$PROJ_DIR$\main.c</name>
8383
<outputs>
8484
<tool>
8585
<name>BICOMP</name>
86-
<file> 9</file>
86+
<file> 15</file>
8787
</tool>
8888
<tool>
8989
<name>ICCAVR</name>
90-
<file> 3</file>
90+
<file> 7</file>
9191
</tool>
9292
</outputs>
9393
<inputs>
9494
<tool>
9595
<name>BICOMP</name>
96-
<file> 20 19 18 11</file>
96+
<file> 1 5 13 6 8 16 9 19 3</file>
9797
</tool>
9898
<tool>
9999
<name>ICCAVR</name>
100-
<file> 20 19 18 11</file>
100+
<file> 1 5 13 6 8 16 9 19 3</file>
101101
</tool>
102102
</inputs>
103103
</file>
@@ -108,39 +108,39 @@
108108
<configuration>
109109
<name>Release</name>
110110
<outputs>
111-
<file>$TOOLKIT_DIR$\inc\inavr.h</file>
112-
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
113-
<file>$TOOLKIT_DIR$\inc\comp_a90.h</file>
114-
<file>$PROJ_DIR$\main.c</file>
111+
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
115112
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
116-
<file>$TOOLKIT_DIR$\inc\bitdefinitions\iom64.inc</file>
117-
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
118113
<file>$PROJ_DIR$\..\SysTypedef.h</file>
114+
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
115+
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
116+
<file>$TOOLKIT_DIR$\inc\inavr.h</file>
117+
<file>$TOOLKIT_DIR$\inc\comp_a90.h</file>
119118
<file>$PROJ_DIR$\..\SysEeprom.c</file>
119+
<file>$TOOLKIT_DIR$\inc\bitdefinitions\iom64.inc</file>
120+
<file>$PROJ_DIR$\main.c</file>
121+
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
120122
<file>$TOOLKIT_DIR$\config\lnkm64s.xcl</file>
121123
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec_mul-sf.r90</file>
122-
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
123124
<file>$PROJ_DIR$\..\SysEeprom.h</file>
124-
<file>$PROJ_DIR$\Release\Obj\SysEeprom.pbd</file>
125+
<file>$PROJ_DIR$\Release\Obj\SysEeprom.pbi</file>
125126
<file>$PROJ_DIR$\Release\Obj\main.pbi</file>
127+
<file>$PROJ_DIR$\Release\Obj\SysEeprom.pbd</file>
126128
<file>$PROJ_DIR$\Release\Obj\SysEeprom.r90</file>
127-
<file>$PROJ_DIR$\Release\Obj\SysEeprom.pbi</file>
129+
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
128130
<file>$PROJ_DIR$\Release\Obj\main.r90</file>
129131
<file>$PROJ_DIR$\Release\Exe\SysEeprom(AT64).hex</file>
130-
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
131-
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
132132
</outputs>
133133
<file>
134134
<name>[ROOT_NODE]</name>
135135
<outputs>
136136
<tool>
137137
<name>XLINK</name>
138-
<file> 18</file>
138+
<file> 20</file>
139139
</tool>
140140
</outputs>
141141
</file>
142142
<file>
143-
<name>$PROJ_DIR$\main.c</name>
143+
<name>$PROJ_DIR$\..\SysEeprom.c</name>
144144
<outputs>
145145
<tool>
146146
<name>BICOMP</name>
@@ -154,34 +154,34 @@
154154
<inputs>
155155
<tool>
156156
<name>BICOMP</name>
157-
<file> 4 6 5 11 0 1 2 12 7</file>
157+
<file> 18 0 13 2</file>
158158
</tool>
159159
<tool>
160160
<name>ICCAVR</name>
161-
<file> 4 6 5 11 0 1 2 12 7</file>
161+
<file> 18 0 13 2</file>
162162
</tool>
163163
</inputs>
164164
</file>
165165
<file>
166-
<name>$PROJ_DIR$\..\SysEeprom.c</name>
166+
<name>$PROJ_DIR$\main.c</name>
167167
<outputs>
168168
<tool>
169169
<name>BICOMP</name>
170-
<file> 16</file>
170+
<file> 15</file>
171171
</tool>
172172
<tool>
173173
<name>ICCAVR</name>
174-
<file> 15</file>
174+
<file> 19</file>
175175
</tool>
176176
</outputs>
177177
<inputs>
178178
<tool>
179179
<name>BICOMP</name>
180-
<file> 20 19 12 7</file>
180+
<file> 1 3 8 4 5 10 6 13 2</file>
181181
</tool>
182182
<tool>
183183
<name>ICCAVR</name>
184-
<file> 20 19 12 7</file>
184+
<file> 1 3 8 4 5 10 6 13 2</file>
185185
</tool>
186186
</inputs>
187187
</file>
@@ -190,7 +190,7 @@
190190
<inputs>
191191
<tool>
192192
<name>BILINK</name>
193-
<file> 16 14</file>
193+
<file> 14 15</file>
194194
</tool>
195195
</inputs>
196196
</file>
@@ -199,7 +199,7 @@
199199
<inputs>
200200
<tool>
201201
<name>XLINK</name>
202-
<file> 9 15 17 10</file>
202+
<file> 11 17 19 12</file>
203203
</tool>
204204
</inputs>
205205
</file>

example/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void main( void )
6565
InitEepControl(&EepVar, (unsigned char *) &Var, sizeof(Var), &EepConfig);
6666
InitEepControl(&EepArray, Array, sizeof(Array), &EepConfig);
6767

68-
if(EepConfig.Bit.FirstExecute == true)
68+
if(CheckEepromFirstExecuteSignature(&EepConfig) == true)
6969
{
7070
Var.Data1 = 10;
7171
Var.Data2 = 1000;

example/settings/SysEeprom.wsdt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Workspace>
44
<ConfigDictionary>
55

6-
<CurrentConfigs><Project>SysEeprom/Debug</Project></CurrentConfigs></ConfigDictionary>
6+
<CurrentConfigs><Project>SysEeprom/Release</Project></CurrentConfigs></ConfigDictionary>
77
<Desktop>
88
<Static>
99
<Workspace>
@@ -12,7 +12,7 @@
1212

1313

1414

15-
<Column0>124</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
15+
<Column0>350</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
1616
</Workspace>
1717
<Build>
1818

@@ -52,14 +52,14 @@
5252

5353

5454

55-
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>45</YPos><SelStart>851</SelStart><SelEnd>851</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
55+
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>45</YPos><SelStart>795</SelStart><SelEnd>795</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
5656
<Positions>
5757

5858

5959

6060

6161

62-
<Top><Row0><Sizes><Toolbar-04c96ba8><key>iaridepm.enu1</key></Toolbar-04c96ba8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>753</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>140449</sizeHorzCX><sizeHorzCY>200803</sizeHorzCY><sizeVertCX>140449</sizeVertCX><sizeVertCY>758032</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1426</Right><x>-2</x><y>-2</y><xscreen>1428</xscreen><yscreen>200</yscreen><sizeHorzCX>1002809</sizeHorzCX><sizeHorzCY>200803</sizeHorzCY><sizeVertCX>140449</sizeVertCX><sizeVertCY>200803</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
62+
<Top><Row0><Sizes><Toolbar-06ed6ba8><key>iaridepm.enu1</key></Toolbar-06ed6ba8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>753</Bottom><Right>424</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>140449</sizeHorzCX><sizeHorzCY>200803</sizeHorzCY><sizeVertCX>299157</sizeVertCX><sizeVertCY>758032</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1426</Right><x>-2</x><y>-2</y><xscreen>1428</xscreen><yscreen>200</yscreen><sizeHorzCX>1002809</sizeHorzCX><sizeHorzCY>200803</sizeHorzCY><sizeVertCX>140449</sizeVertCX><sizeVertCY>200803</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
6363
</Desktop>
6464
</Workspace>
6565

0 commit comments

Comments
 (0)