⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build.bat

📁 usb serial converter
💻 BAT
字号:
@echo off
REM #--------------------------------------------------------------------------
REM #	File:		BUILD.BAT
REM #	Contents:	Batch file to build ep_pair.
REM #
REM #	Copyright (c) 2000 Cypress Semiconductor All rights reserved
REM #--------------------------------------------------------------------------

REM # command line switches
REM # ---------------------
REM # -clean delete temporary files
REM # -i     Locate code in internal RAM.  Also builds EEPROM images.  Requires full
REM #        version of Keil Tools

REM Set the following to defaults
set EZTARGET=C:\Anchor\EzUsb\Target
set C51INC=C:keil\\C51\INC;%EZTARGET%\INC

REM ### Compile FrameWorks code ###
c51 hid_fw.c debug objectextend code small moddp2
pause

REM ### Compile user peripheral code ###
REM ### Note: This code does not generate interrupt vectors ###
rem c51 serialisr.c db oe code small moddp2 noiv
rem pause
c51 usb2ser.c db oe code small moddp2 noiv
pause

REM ### Assemble descriptor table ###
a51 dscr.a51 errorprint debug
pause

REM ### Link object code (includes debug info) ###
REM ### Note: XDATA and CODE must not overlap ###
REM ### Note: CODE should be located after 0x6a (end of max vector table)
REM ### Note: XDATA was moved from 0x800 (really close to code) to 0x1000
REM ### Note: If modifications to code expand it past 0x1000, move XDATA
REM ### Note: we are using response file here for line longer than 128 chars
echo hid_fw.obj, dscr.obj, usb2ser.obj, > tmp.rsp
echo USBJmpTb.obj,EZUSB.lib  >> tmp.rsp
if "%1" == "-i" echo TO hid RAMSIZE(256) PL(68) PW(78) CODE(80h) XDATA(1000h)  >> tmp.rsp
if not "%1" == "-i" echo TO hid RAMSIZE(256) PL(68) PW(78) CODE(4000h) XDATA(5000h)  >> tmp.rsp
bl51 @tmp.rsp
pause

REM ### Generate intel hex image of binary (no debug info) ###
oh51 hid HEXFILE(hid.hex)
pause

REM ### Generate BIX image of binary
REM ### Use of the -M option will check for program collision with XDATA space ###
%EZTARGET%\Hex2bix\Release\hex2bix -M 0x5000 hid.hex
pause

REM ### Generate serial eeprom image for B2 (EZ-USB) bootload ###
if "%1" == "-i" %EZTARGET%\Hex2bix\Release\hex2bix -i -o hid.iic hid.hex
pause

REM ### Generate serial eeprom image for B6 (EZ-USB FX)bootload ###
if "%1" == "-i" %EZTARGET%\Hex2bix\Release\hex2bix -i -f 0xB6 -o hid.b6 hid.hex
pause

echo WARNING: Descriptors will be relocated to internal memory if using 4K compiler.

if "%1" == "-clean" del tmp.rsp
if "%1" == "-clean" del *.lst
if "%1" == "-clean" del *.obj
if "%1" == "-clean" del *.m51

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -