下载功能的移植问题
将DKB的功能移植到OBM中。
通过wtptp,但是确实无法正常下载,FFUART负责下载软件,想把STUART作为log输出口,就能顺利的看到软件的运行情况了,只可惜log一直没有输出来。
已经配置了pin引脚的功能,波特率,使能了UART了,但是依然无法输出。对应的log信息也有丢进THR寄存器,就是无法看到信号送出。
一定要搞定该问题,调试起来才容易。。。。
【2009.0416】//终于搞定log输出的STUART了,也是一个小乌龙,自己写了一个shell去实现自动copy文件,修改代码是在windows下,编译是在linux下,所以有很多文件需要同步,结果少同步了一个文件,就导致了上面的这个大错误了,浪费了我一个下午的时间。好好检讨一下,下次要注意了。
已经能看到log输出了,但是文件并没有真正的写入,好好看一下问题所在。
*** DKB ***
*** SeanLin ***
Sean:HandleRequest
Sean:GetPreamble
Sean:GetCommand
Sean:HandleDownloadFlow
Sean:HandleDoneCmd
Sean:Fill in TIM pointers
*** Checking TIM...
*** Preparing Flash for first use (may take several minutes)...
*** Downloading Next Image...
*** Image Download Complete
*** Validating Image...
*** Image Validation Successful
*** Copy Image to Flash...
*** Downloading Next Image...
*** Image Download Complete
*** Validating Image...
*** Image Validation Successful
*** Copy Image to Flash...
*** Downloading Next Image...
//wtptp端的log提示
E:\USBDownLoad>NTWTPTP.exe -P UART -B 38400 -C 4 -M 3 -t boot_nontrust.bin -f MH
L_LINUX_NTOBM_h.bin -f blob_h.bin -f zImage_h.bin -f rootfs_h.bin
WTPTP Tool Version: 3.2.2.2
WTPTP Tool Date : 02062009
Verbose mode disabled...
Number of Images listed in TIM: 5
TIM image ID list:
Image ID: TIMH
Image ID: OBMI
Image ID: OSLO
Image ID: ZIMG
Image ID: RTFS
Port Selected: UART
Number of files to download: 5
Sent preamble. Host waiting for target to reply!
Version: 3005
Date: 8312007
Processor: MLVA1
Success: Download file complete!
Code: InvalidCaddoFIFOEntryError 65
Error: Don't have image type asked for by target: 6D6F4320
Error: Image asked for by target does not exist!
Error: Download file number 2 has aborted!
Retrying image download!
Error: SendPreamble returned a NACK!
Error: Download failed for file number: 2
之前还碰到一个很乌龙的事情,修改了OBM,但是没有对应的去加载NTIM,导致系统无法加载起来,还一直在研究语法错误,呵呵,倒掉。
【2009.04.16】//也搞明白了一件事情,OBM需要在ISRAM里面先运行,结果Caddo自己保留了32K,Boot rom的stack又去了44K,就剩余52K的空间能留给我了,code size已经到了40K了,后面要小心点。