This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

fail safe 为no 是不是不可以直接fileoeprations进行操作?



你好,你这个所说的,国内的,通过get的方式下载:
比如说,这个URL:www.rainupdate.com/.../pro200.xmc (这个是我们公司现在的服务器,已经在使用,而且可以用GET方式下载了)
下载完成了之后,存储的SPI flash的/sys/mcuimg2.bin,重启单片机,这样子就可以了?
流程的细化以及调用的文件
                》通过TI 提供的http_client_demo 以GET的方式,获取文件。(可能通过安检触发或者另外MQTT消息触发)
                 》再用TI 提供的file_operations 的代码,调用 WriteFileToDevice(unsigned long *ulToken, long *lFileHandle)  函数,将数据写到
                  /sys/mcuimg2.bin 里面,这里的*lFileHandle等于这个/sys/mcuimg1.bin?还是什么,保存好了。关闭文件
                》 调用OTA NOTE.pdf里面的第五章节的一RebootMCU()函数,然后就完成了。
                以上是实际的应用处理过程,烧写相关文件,已经知道怎么烧写了,该烧写哪些文件,对应的哪些内容都知道,就是这个应用处理过程还是不是很懂。

/******************************************************************************
Image file names
*******************************************************************************/
#ifndef FAST_BOOT
#define IMG_BOOT_INFO "/sys/mcubootinfo.bin"
#define IMG_FACTORY_DEFAULT "/sys/mcuimg1.bin"
#define IMG_USER_1 "/sys/mcuimg2.bin"
#define IMG_USER_2 "/sys/mcuimg3.bin"
#else
#define IMG_BOOT_INFO "/sys/mcureserved.bin"
#define IMG_USER_1 "/sys/mcuimg.bin"
#define IMG_USER_2 "/sys/mcuflpatch.bin"
#endif

/*************************************************************