no message

master
zcy 2024-02-26 11:31:48 +08:00
parent ff62412e5c
commit 11a81adc7c
8 changed files with 34624 additions and 18469 deletions

2126
Boot.map

File diff suppressed because it is too large Load Diff

View File

@ -302,9 +302,9 @@ int Ftp_Down_File( uint8_t *fileName, uint32_t startPos, uint16_t transLen)
ftpDataMode = true ; //EC20串口接收模式切换到FTP模式
Ec20FtpBufReset() ; //FTP接收缓冲区初始化
UARTx_SendString(EC20_UART, (uint8_t *)sFtpCmd[DOWNFILE].cmdStr, fileName, startPos, transLen ) ;
while( revTimes++ < sFtpCmd[DOWNFILE].timeout )
while( revTimes++ < sFtpCmd[DOWNFILE].timeout*2 )
{
Wait_For_Nms(10) ;
Wait_For_Nms(15) ;
headPos = kmp(ec20FtpBuf, "CONNECT")+9 ; //下载的文件数据开始的地方相对用户数据开始处 在ec20FtpBuf中的偏移量
sFtpCmd[DOWNFILE].trueOffset = kmp(&ec20FtpBuf[transLen+headPos], sFtpCmd[DOWNFILE].trueStr) ; //+QFTPGET: 0,2048在相对用户数据结尾处 在ec20FtpBuf中的偏移量
if( sFtpCmd[DOWNFILE].trueOffset == 0)

File diff suppressed because one or more lines are too long

View File

@ -150,7 +150,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=890,175,1266,731,0)(1007=105,136,292,410,0)(1008=591,153,967,388,0)(1009=120,137,378,724,0)(100=15,38,661,710,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=60,87,594,447,0)(180=1025,149,1320,445,0)(120=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(124=-1,-1,-1,-1,0)(125=-1,-1,-1,-1,0)(126=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=964,143,1363,487,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=120,152,405,447,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=351,0,799,413,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
<Name>(1010=890,175,1266,731,0)(1007=105,136,292,410,0)(1008=591,153,967,388,0)(1009=120,137,378,724,0)(100=509,255,1155,928,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=60,87,594,447,0)(180=1025,149,1320,445,0)(120=-1,-1,-1,-1,0)(121=605,395,1026,800,0)(122=871,443,1292,848,0)(123=-1,-1,-1,-1,0)(124=-1,-1,-1,-1,0)(125=-1,-1,-1,-1,0)(126=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=964,143,1363,488,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=120,152,405,447,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=351,0,799,413,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -162,23 +162,7 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>109</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218874</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\109</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>0</LineNumber>
<LineNumber>346</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218460</Address>
<ByteObject>0</ByteObject>
@ -187,142 +171,78 @@
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename></Filename>
<Filename>..\CORE\startup_stm32f10x_hd.s</Filename>
<ExecCommand></ExecCommand>
<Expression>0x080002DC</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Number>1</Number>
<Type>0</Type>
<LineNumber>151</LineNumber>
<LineNumber>53</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219150</Address>
<Address>134221200</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<Filename>.\USERCMD\usercmd.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\151</Expression>
<Expression>\\Boot\USERCMD/usercmd.c\53</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>61</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134221210</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERCMD\usercmd.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERCMD/usercmd.c\61</Expression>
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>147</LineNumber>
<LineNumber>67</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218940</Address>
<Address>134222468</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<Filename>.\IAP\iap.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\147</Expression>
<Expression>\\Boot\IAP/iap.c\67</Expression>
</Bp>
<Bp>
<Number>4</Number>
<Type>0</Type>
<LineNumber>138</LineNumber>
<LineNumber>61</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219048</Address>
<Address>134222466</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<Filename>.\IAP\iap.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\138</Expression>
<Expression>\\Boot\IAP/iap.c\61</Expression>
</Bp>
<Bp>
<Number>5</Number>
<Type>0</Type>
<LineNumber>113</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219036</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\113</Expression>
</Bp>
<Bp>
<Number>6</Number>
<Type>0</Type>
<LineNumber>77</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218834</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\77</Expression>
</Bp>
<Bp>
<Number>7</Number>
<Type>0</Type>
<LineNumber>214</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134220178</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\214</Expression>
</Bp>
<Bp>
<Number>8</Number>
<Type>0</Type>
<LineNumber>208</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134220126</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\208</Expression>
</Bp>
<Bp>
<Number>9</Number>
<Type>0</Type>
<LineNumber>169</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219988</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\169</Expression>
</Bp>
<Bp>
<Number>10</Number>
<Type>0</Type>
<LineNumber>47</LineNumber>
<LineNumber>60</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222458</Address>
<ByteObject>0</ByteObject>
@ -333,362 +253,26 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\IAP\iap.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\IAP/iap.c\47</Expression>
<Expression>\\Boot\IAP/iap.c\60</Expression>
</Bp>
<Bp>
<Number>11</Number>
<Number>6</Number>
<Type>0</Type>
<LineNumber>104</LineNumber>
<LineNumber>242</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222564</Address>
<Address>134240356</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\IAP\iap.c</Filename>
<Filename>..\SYSTEM\FLASH\flash.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\IAP/iap.c\104</Expression>
<Expression>\\Boot\../SYSTEM/FLASH/flash.c\242</Expression>
</Bp>
<Bp>
<Number>12</Number>
<Type>0</Type>
<LineNumber>126</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219038</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\main.c\126</Expression>
</Bp>
<Bp>
<Number>13</Number>
<Type>0</Type>
<LineNumber>160</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219984</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\160</Expression>
</Bp>
<Bp>
<Number>14</Number>
<Type>0</Type>
<LineNumber>241</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219944</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\241</Expression>
</Bp>
<Bp>
<Number>15</Number>
<Type>0</Type>
<LineNumber>238</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219940</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\238</Expression>
</Bp>
<Bp>
<Number>16</Number>
<Type>0</Type>
<LineNumber>243</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219936</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\243</Expression>
</Bp>
<Bp>
<Number>17</Number>
<Type>0</Type>
<LineNumber>245</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219938</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\245</Expression>
</Bp>
<Bp>
<Number>18</Number>
<Type>0</Type>
<LineNumber>234</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219920</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\234</Expression>
</Bp>
<Bp>
<Number>19</Number>
<Type>0</Type>
<LineNumber>235</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219924</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Boot\USERAPP/userapp.c\235</Expression>
</Bp>
<Bp>
<Number>20</Number>
<Type>0</Type>
<LineNumber>346</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\CORE\startup_stm32f10x_hd.s</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>21</Number>
<Type>0</Type>
<LineNumber>206</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>22</Number>
<Type>0</Type>
<LineNumber>212</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>23</Number>
<Type>0</Type>
<LineNumber>237</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>24</Number>
<Type>0</Type>
<LineNumber>244</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>25</Number>
<Type>0</Type>
<LineNumber>246</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>26</Number>
<Type>0</Type>
<LineNumber>247</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>27</Number>
<Type>0</Type>
<LineNumber>248</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>28</Number>
<Type>0</Type>
<LineNumber>249</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>29</Number>
<Type>0</Type>
<LineNumber>250</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>30</Number>
<Type>0</Type>
<LineNumber>251</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>31</Number>
<Type>0</Type>
<LineNumber>252</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>32</Number>
<Type>0</Type>
<LineNumber>253</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\USERAPP\userapp.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>33</Number>
<Number>7</Number>
<Type>0</Type>
<LineNumber>1</LineNumber>
<EnabledFlag>1</EnabledFlag>
@ -703,38 +287,6 @@
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>34</Number>
<Type>0</Type>
<LineNumber>167</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>35</Number>
<Type>0</Type>
<LineNumber>273</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
@ -812,6 +364,41 @@
<WinNumber>1</WinNumber>
<ItemText>flagWord</ItemText>
</Ww>
<Ww>
<count>15</count>
<WinNumber>1</WinNumber>
<ItemText>appNum</ItemText>
</Ww>
<Ww>
<count>16</count>
<WinNumber>1</WinNumber>
<ItemText>sFtpCmd</ItemText>
</Ww>
<Ww>
<count>17</count>
<WinNumber>1</WinNumber>
<ItemText>ftpDataMode</ItemText>
</Ww>
<Ww>
<count>18</count>
<WinNumber>1</WinNumber>
<ItemText>ec20FtpBufIndex</ItemText>
</Ww>
<Ww>
<count>19</count>
<WinNumber>1</WinNumber>
<ItemText>psFileParm</ItemText>
</Ww>
<Ww>
<count>20</count>
<WinNumber>1</WinNumber>
<ItemText>psFileParm</ItemText>
</Ww>
<Ww>
<count>21</count>
<WinNumber>1</WinNumber>
<ItemText>sFtpBoot</ItemText>
</Ww>
</WatchWindow1>
<WatchWindow2>
<Ww>
@ -833,19 +420,27 @@
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>2</SubType>
<ItemText>0x801C000</ItemText>
<SubType>0</SubType>
<ItemText>0x08018800</ItemText>
<AccSizeX>1</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>0</SubType>
<ItemText>0x20003C40</ItemText>
<SubType>8</SubType>
<ItemText>0x2000131A+0x0b</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<MemoryWindow3>
<Mm>
<WinNumber>3</WinNumber>
<SubType>2</SubType>
<ItemText>0x803c000</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow3>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>

File diff suppressed because it is too large Load Diff

View File

@ -69,6 +69,11 @@ void Board_Init(void)
// Watchdog_Feed() ; //看门狗喂狗
Gpio_Init(PC, PIN8, GPIO_Mode_Out_PP) ;
GPIO_WriteBit(GPIOC,PIN8,Bit_SET);
Gpio_Init(PB, PIN1, GPIO_Mode_Out_PP) ;
GPIO_WriteBit(GPIOC,PIN1,Bit_SET);
Gpio_Init(PD, PIN10, GPIO_Mode_Out_PP) ;
GPIO_WriteBit(GPIOD,PIN10,Bit_SET);
//KeyInit() ; //初始化KEY按键
// Led_Init() ; //初始化LED
//Beep_Init() ; //初始化蜂鸣器

View File

@ -43,44 +43,41 @@ int main(void)
Board_Init() ; //硬件驱动初始化和功能块初始化
Watchdog_Feed() ; //看门狗喂狗
/*强制升级检测、开始变砖检测修复 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼*/
if( (uIapFlash.sIapFlash.JumpResult == 0x30) ) // 跳转失败或者按键操作进入恢复模式,则运行应急程序
/*强制升级检测、开始变砖检测修复 */
if( (uIapFlash.sIapFlash.JumpResult == 0x30)) // 跳转失败或者按键操作进入恢复模式,则运行应急程序
{
DisplayInfo("执行应急程序") ;
goto SAVEAPPOUT ; //跳转到应急程序运行
}
else //跳转APP未出现失败设置标志位jumpResult为暂未跳转成功状
{
uIapFlash.sIapFlash.JumpResult = 0x30 ; //复位JumpResult标志位
Set_uIapFlash(&uIapFlash) ; //保存JumpResult
// uIapFlash.sIapFlash.JumpResult = 0x30 ; //复位JumpResult标志位
// Set_uIapFlash(&uIapFlash); //保存JumpResult
}
/*结束变砖检测修复、强制升级检测*/
/*结束变砖检测修复、强制升级检测*/
/*开始检测是否需要升级APP(即判断IapFlag标志位)▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼*/
/*开始检测是否需要升级APP(即判断IapFlag标志位)*/
if(true == IS_IapFlag_ALL_PERIPH(uIapFlash.sIapFlash.IapFlag)) /*IapFlag合法*/ //IapFlag标志位合法性校验
{
if(uIapFlash.sIapFlash.IapFlag == 0x30 ) /*升级标志位为0, 说明不需要升级,直接跳转即可*/
{
AppLogPrintf("无需升级,即将执行APP%c .", uIapFlash.sIapFlash.RunAppNum) ;
goto APPNUMOUT ; //跳转到RunAppNum执行原先的程序
}
{
if(uIapFlash.sIapFlash.IapFlag == 0x30) /*升级标志位为0, 说明不需要升级,直接跳转即可*/
{
goto APPNUMOUT ; //跳转到RunAppNum执行原先的程序
}
}
else /*IapFlag不合法*/
{
AppLogPrintf("IapFlag=%c,不合法,即将执行APP%c .", uIapFlash.sIapFlash.IapFlag, uIapFlash.sIapFlash.RunAppNum) ;
uIapFlash.sIapFlash.IapFlag = 0x30 ; //清除升级标志位
Set_uIapFlash(&uIapFlash) ; //保存升级标志位
goto APPNUMOUT ; //跳转到RunAppNum执行原先的程序
}
/*检测是否需要升级APP结束▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲*/
/*检测是否需要升级APP结束*/
/*升级APP(连接TCP\FTP下载写入固件最后跳转APPP)开始▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼*/
/*升级APP(连接TCP\FTP下载写入固件最后跳转APPP)开始*/
//保存升级标志位
Watchdog_Feed() ; //看门狗喂狗
/*∧∧网络连接开始∧∧∧∧∧∧∧∧∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨*/
/*∧∧网络连接开*/
result = NetTask() ; //网络初始化
if(RUNERR == result) /*TCP\FTP初始化、连接失败 */
{
@ -89,9 +86,9 @@ int main(void)
Wait_For_Nms(20) ; //延时2S用于显示屏显示实际项目可以屏蔽延时
goto APPNUMOUT ; //跳转到RunAppNum执行原先的程序
}
/*∧∧网络连接结束∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧*/
/*∧∧网络连接结*/
/*∨∨查找新固件开始∨∨∨∨∨∨∨∧∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨*/
/*∨∨查找新固件*/
TcpUpdata( BOOTTOTCPFRAME, "FTP初始化成功即将开始升级") ;
Watchdog_Feed() ; //看门狗喂狗
result = FindAppFile(&sDownApp) ; //查找新固件
@ -101,9 +98,9 @@ int main(void)
Wait_For_Nms(200) ; //延时2S用于显示屏显示实际项目可以屏蔽延时
goto APPNUMOUT ; //跳转到RunAppNum执行原先的程序
}
/*∧∧查找新固件结束∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧*/
/*∧∧查找新固件结束*/
/*∨∨获取新固件文件大小开始∨∨∨∨∨∨∨∧∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨*/
/*∨∨获取新固件文件大小开始*/
sDownApp.fileSize = Ftp_Get_FileSize( sDownApp.fileName ) ; //获取新固件文件的大小
if(sDownApp.fileSize <= 0) /*获取文件大小失败*/
{
@ -114,9 +111,9 @@ int main(void)
if(sDownApp.fileSize%ONCE_DOWN_LEN > 0)
sDownApp.subPackSum = sDownApp.subPackSum + 1 ; //计算固件subPackSum
TcpUpdata( BOOTTOTCPFRAME, "新固件包大小 %d bytes ; 拆分子包数目: %d 。",sDownApp.fileSize, sDownApp.subPackSum) ;
/*∧∧获取新固件文件大小结束∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧*/
/*∧∧获取新固件文件大小结束*/
/*∨∨新固件合法性校验开始∨∨∨∨∨∨∨∧∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨∨*/
/*∨∨新固件合法性校验开始*/
int headPos = -1 ;
result = DownSubpackVerify(&sDownApp, &headPos) ; //下载第一个subpack并进行固件合法性校验
if(RUNERR == result) /*固件校验不合法”*/
@ -129,7 +126,7 @@ int main(void)
// Wait_For_Nms(2000) ; //延时2S用于修改文件名实测发现在下载完数据后立即更名会返回+CME ERROR: 603错误
// Ftp_File_Rename( sDownApp.fileName , (uint8_t *)newName ) ; //对不合法的固件进行重名了, 防止二次升级
// portFree(newName) ;
goto APPNUMOUT ; // 跳转到RunAppNum执行原先的程序
goto APPNUMOUT ; // 跳转到RunAppNum执行原先的程序
}
else if(TIMEOUT == result) /*固件校验失败*/
{
@ -139,9 +136,8 @@ int main(void)
}
/*∧∧新固件合法性校验结束∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧*/
Erase_App_Area(sDownApp.appFlashAddr) ; //擦除相应代码段准备将新的代码写入FLASH此时该APP段已经不可用了如果后续出现下载/写入FLASH错误需要跳转到应急程序
TcpUpdata( BOOTTOTCPFRAME, "子包1 。下载成功!") ;
Erase_App_Area(sDownApp.appFlashAddr); //擦除相应代码段准备将新的代码写入FLASH此时该APP段已经不可用了如果后续出现下载/写入FLASH错误需要跳转到应急程序
TcpUpdata( BOOTTOTCPFRAME, "子包1 。下载成功!");
if( RUNOK == Write_Flash(sDownApp.appFlashAddr, (uint8_t*)(ec20FtpBuf+headPos), ONCE_DOWN_LEN)) /*写FLASH成功*///将上一步下载的subpack1写入falsh中
{
TcpUpdata( BOOTTOTCPFRAME, "子包1 。写入FLASH成功") ;
@ -172,21 +168,21 @@ int main(void)
// }
goto NEWAPPOUT ; //跳转到最新下载的固件的栈顶地址运行APP
}
/*∧∧下载新固件并写FLASH 结束∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧∧*/
/*∧∧下载新固件并写FLASH 结*/
APPNUMOUT:
appAddr = QueryNewAppArea(0x32); //校验固件合法性、获取跳转的FLASH存放区域首地址
// appAddr = QueryNewAppArea((u32)uIapFlash.sIapFlash.RunAppNum); //校验固件合法性、获取跳转的FLASH存放区域首地址
appAddr = QueryNewAppArea(0x32); //校验固件合法性、获取跳转的FLASH存放区域首地址
// appAddr = QueryNewAppArea((u32)uIapFlash.sIapFlash.RunAppNum); //校验固件合法性、获取跳转的FLASH存放区域首地址
NetDisconnetc() ; //断开网络连接注销FTP登陆
Iap_Load_App(appAddr) ; //执行APP不会再往下执行了
NetDisconnetc() ; //断开网络连接注销FTP登陆
Iap_Load_App(appAddr) ; //执行APP不会再往下执行了
NEWAPPOUT:
uIapFlash.sIapFlash.IapFlag = 0x32 ; //清除升级标志位
uIapFlash.sIapFlash.JumpResult = 0x30; // JumpResult if fail,next startup will goto SAVEAPPOUT
Set_uIapFlash(&uIapFlash) ;
appAddr = QueryNewAppArea(sDownApp.appFlashAddr); //校验固件合法性、获取跳转的FLASH存放区域首地址
NetDisconnetc() ; //断开网络连接注销FTP登陆
Iap_Load_App(appAddr) ; //执行APP不会再往下执行了
appAddr = QueryNewAppArea(sDownApp.appFlashAddr); //校验固件合法性、获取跳转的FLASH存放区域首地址
NetDisconnetc() ; //断开网络连接注销FTP登陆
Iap_Load_App(appAddr) ; //执行APP不会再往下执行了
SAVEAPPOUT:
appAddr = QueryNewAppArea(SAVEAPP_AREA_ADDR); //校验固件合法性、获取跳转的FLASH存放区域首地址