当前位置:首页 > Win > 正文内容

小脚丫Lattice FPGA自动下载脚本

chanra1n2个月前 (03-07)Win83

这是一个名为 "flash.bat" 的批处理脚本,由ChanRa1n编写,用于将指定文件夹('impl1'子文件夹)中的所有JED文件复制到名为 "STEPLink" 的磁盘中。以下是该脚本的详细介绍:

@echo off
echo ------------------------------------------------------------------------
echo Script Name: flash.bat
echo Description: This batch script copies all JED files from the 'impl1'
echo              subfolder to the 'STEPLink' disk.
echo Author:      ChanRa1n
echo Website:     https://www.myfpga.cn
echo Version:     1.0
echo ------------------------------------------------------------------------

setlocal enabledelayedexpansion

REM Get the current script directory
set "scriptDir=%~dp0"

REM Set the source folder path
set "sourceFolder=%scriptDir%impl1"

REM Check the drive letter of the STEPLink disk
for /f "tokens=2 delims==" %%d in ('wmic logicaldisk where "volumename='STEPLink'" get caption /format:value ^| find "="') do (
    set "destDrive=%%d"
)

REM Check if the STEPLink disk exists
if not defined destDrive (
    echo STEPLink disk does not exist or cannot be accessed.
    pause
    exit /b
)

REM Set the destination folder path
set "destFolder=!destDrive!\"

REM Check if the source folder exists
if not exist "%sourceFolder%\" (
    echo Source folder does not exist.
    pause
    exit /b
)

REM Create the destination folder
if not exist "%destFolder%" mkdir "%destFolder%"

REM Copy all JED files to the destination folder
copy "%sourceFolder%\*.jed" "%destFolder%"

echo Operation completed.
pause
exit /b

使用时将该bat文件放置于相关工程根目录下,双击运行即可实现自动程序烧录。

1709813573959.png

扫描二维码推送至手机访问。

版权声明:本文由我的FPGA发布,如需转载请注明出处。

本文链接:https://www.myfpga.cn/index.php/post/384.html

分享给朋友:
返回列表

上一篇:台电X98Pro BIOS升级工具

没有最新的文章了...

“小脚丫Lattice FPGA自动下载脚本” 的相关文章

网页图片批量下载助手 二十线程并发 强劲自主研发引擎(含单线程版本 多线程版本 贪心版本)

网页图片批量下载助手 二十线程并发 强劲自主研发引擎(含单线程版本 多线程版本 贪心版本)

建议使用多线程专版,将要下载的网页按行输入,然后点击开始下载,下载的数据在文件夹内的data文件夹下,pic文件夹代表含有图片的文件夹,另一个是没有图片的文件夹下载链接:多线程专版 test.exe单线程稳定版 停止分享贪心专版 停止分享为稳定性,现专注研发多线程版本,经过多次改进,目前已...

台电X98Pro BIOS升级工具

台电X98Pro BIOS升级工具

X98Pro-V1.00~V1.05.exe...