1. 在HEW工程文件夹中找到将用于通过FDT软件批量烧写的.mot文件,应知其所在的工程路径(后续制作脚本时会用到此路径)。
2. 新建一个FDT工程,之后在FDT工程文件夹中找到.AWS文件,应知其所在的工程路径(后续制作脚本时会用到此路径)。
3. 制作脚本文件:
3.1 脚本文件后缀为.fsf(可以先使用.txt制作,之后修改后缀)。
3.2 脚本内容:
# EXAMPLE SCRIPT FILE
# open this workspace and associated project
# (for which the flash project wizard must have completed successfully)
workspace E:\FDT proj\main_nostop\main\main.AWS
# Ensure that comms is closed (in case previous attempt failed and didn’t disconnect)
disconnect
# erase all blocks
erase device
# download the file "C:\WorkSpace\R5F212A7\0011800212-fr001.mot" and verify that programming was OK
# (script processing will stop if this verify fails)
download E:\RES PROJ\test_proj\tg\main\main\Debug\main.mot|user|verify
# get the checksum for the user area of the device
checksum device
# pause for 100 milliseconds
pause 100
# disconnect from the device
disconnect reset
# Display message in output window
#alert output|Programmed OK!!!!!!!!!!!!!!!!!!!!!!!!
alert beep|Programmed OK!!!!!!!!!!!!!!!!!!!!!!!!
pause 10000
# delete this script
# (will stop FDT from running through the file again)
# delete $script
3.3 注意:
3.3.1 workspace E:\FDT proj\main_nostop\main\main.AWS :表示我的FDT工程中一文件的路径。
3.3.2 download E:\RES PROJ\test_proj\tg\main\main\Debug\main.mot|user|verify:表示我的HEW工程中.MOT的路径。
3.3.3 pause 10000:表示10秒钟,在这段时间可以更换板子,根据手操作的快慢可以修改该值。
其他无需改变。
以上制作脚本文件完成。
4. 用E8a连接上带有MCU的电路板,系统上电。
5. 打开FDT软件,打开之前新建的工程,选择Tools-->wait for script-->new configuration
在script框的右边点击file,调入上边编写的脚本文件。
在Error Handling框中选择Continue。(按照网上的资料,没有这一项,我试了之后不成功,加上了这一项,成功。)
6. 点击save,保存(此处不知为什么还要找到那个脚本文件,再次点击才能保存,比如软件会提示“已存在,要替换吗?”然后点击“是”,好乱)。7. 之后软件会提示是否运行,若点击是,则开始下载程序,下载完毕后,暂停10秒钟,可以利用这个时间,断电,换电路板,上电,时间一到,
开始自动下载程序。如此循环。
8. 若不再需要下载,点击cancel。
9. 以上经过验证,完全可以使用。
---20150731
以下为转载原文:
出处:http://www.renesas-mcu.com/read-htm-tid-2345-fpage-3.html
瑞萨芯片当有很多板子需要批量烧写的时候,烧写完一块更换新的板子之后,都需要手动点以下烧写按钮才可以进行下一次的烧写,
有没有板子可以不需要重复点击鼠标就能实现呢,瑞萨的FDT烧写工具本身就带有这样的工具可以实现这样的批量烧写。
1、首先编写脚本文件;格式如下: 文件名为:*.fsf
# EXAMPLE SCRIPT FILE
# open this workspace and associated project
# (for which the flash project wizard must have completed successfully)
workspace C:\WorkSpace\R5F212A7\R5F212A7.AWS ----------该部分为烧写时FDT建立的工程路径
# Ensure that comms is closed (in case previous attempt failed and didn’t disconnect)
disconnect
# connect over the USB to the device with this Product ID + Bus ID
connect USB|E8A|9IS025287|5.0|0.0 -------该部分为E8A序列号,后边的5.0,0.0是版本,可以不要。
# erase all blocks
erase device
# download the file "C:\WorkSpace\R5F212A7\0011800212-fr001.mot" and verify that programming was OK
# (script processing will stop if this verify fails)
download C:\WorkSpace\R5F212A7\**.mot|user|verify -----烧写文件路径,名称
# get the checksum for the user area of the device
checksum device ------计算校验和
# pause for 100 milliseconds
pause 100 ------延迟
# disconnect from the device
disconnect ------断开
# Display message in output window
#alert output|Programmed OK!!!!!!!!!!!!!!!!!!!!!!!!
alert beep|Programmed OK!!!!!!!!!!!!!!!!!!!!!!!! --------烧写完提示信息(声音和文字)
pause 5000 -----等待更换板子的时间,该时间根据你更换板子的快慢调整
# delete this script
# (will stop FDT from running through the file again)
#delete $script
2. 在FDT烧写工程中,选择Tools-->wait for script-->new configuration
在script框的右边点击file,调入上边编写的脚本文件
3. 点击save,保存。
4. 先连接好一块板子
5. 在FDT烧写工程中,选择Tools-->wait for script-->run configuration
后,选择步骤3中保存的文件。
好了,下边就可以开始进行自动烧写了,烧写完成会有声音提示后,则更换板子,这时不需要点击鼠标,FDT就可以自动烧写。
注:
1中脚本文件使用的时候,把--以及汉字部分都去掉,其中路径名字,都修改为你自己的就可以使用。。。