load using HTTP is defined in RFC1867. This method of uploading files is based on HTML forms. To send raw binary data, the HTML POST method is used instead of the GET method [7].
HTML code for implementing form-based file upload can be like this:Once the server received the POST request, it starts to erase all the user Flash area and waits for a binary file raw data. The received data will then be written into the user Flash area. Flowchart in figure 5 summarizes the IAP method using HTTP.
![](/scPhotoFile/2016/0420/20160420125053965396.jpg)
Figure 5. IAP base on HTTP flow
Before sending the binary file, the web client usually sends HTTP header containing information such as the file name, the content length, etc... These infomation must be parsed by the HTTP web server. While different web clients do not always have the same HTTP header format. For example: Internet Explorer HTTP header format is different from the Mozilla Firefox HTTP header format. So, the HTTP web server must handle these different formats.
The total length of the data to be received is extracted from the HTTP header sent at the beginning of the transfer. Depending on the binary file size, the data is sent in consecutive TCP segments to the web server.
V. MODEL EVALUATION模型评价
For we applied the standard TCP/IP protocol in this IAP method, the safety of file transfer is surely guaranteed. If for some reasons (like being powered off, hardware problems, wrong operation), the updating process failed, it can be restarted again for another updating process without affecting the normal performance of the product. In the following, we present the user interface, the code size and the downdoad speed of this IAP method.
A. User interface
Figure 6 shows this IAP user interface. Using a common web browser, the user can select a binary file and upload it to the embedded system (background window). After the IAP operation is finished successfully, the user can reset the MCU and to run the new updated user application program(front window). This way of IAP is very customer-friendly, unlike IAP via UART and ISP via UART needing specific PC software to cooperate with the firmware.
![](/scPhotoFile/2016/0420/20160420125096449644.jpg)
Figure 6. HTTP based IAP User interface
B. IAP code size
The optional modules like ICMP module and UDP module is eliminated to reduce the code size. The results in table 1 are computed with the ARM GCC compiler. Optimizations: -O2, One ELF section per function.
The results show that this IAP implementation program size is very small(Flash: 26.8KB, Memory: 19KB), thus can be applied in many embedded products.
![](/scPhotoFile/2016/0420/20160420125080118011.jpg)
TABLE 1. IAP CODE SIZE
C. Download speed
We compared the download speed of this IAP method with IAP via UART and ISP via UART. The results showed in the following table (Table 2) obviously imply that the download speed of this IAP method is faster than the other two methods.
![](/scPhotoFile/2016/0420/20160420125170327032.jpg)
TABLE 2. DOWNLOAD SPEED COMPARISION
VI. SUMMARY总结
Compare to ISP and some other on-line programming methods, this IAP method doesn’t require any extra hardware support. But it renders many advantages like higher speed of data transfer rate, remote operation capability, very friendly user interface and so on, which greatly increases the work proficiency. So, this IAP method will be easily applied in many embedded pro
本论文由英语论文网提供整理,提供论文代写,英语论文代写,代写论文,代写英语论文,代写留学生论文,代写英文论文,留学生论文代写相关核心关键词搜索。