做MMI的,动辄要make file,不是编模拟器,就是编资源或是其它,每次都要写固定的
那几行编译命令,后来烦了就自己写了个批处理,每次双击运行,选择,回车即可。
展讯自己也有个自动完成make file的小工具,不过还是觉得自己做的这个更顺手一些。
代码如下,复制到记事本里,保存为*.bat即可。
运行的时候,直接回车为编译整个工程,输入r回车编译资源,输入s回车编译模拟器,
a是app,d则是驱动,很简单。
@echo off
set "project_name=sc6530_128X64_320X480PDA_formal"
:start
set "operation_type="
echo.
echo 请输入编译命令:
set /p "operation_type=make p=%project_name% job=4 m="
if "%operation_type%" EQU "" goto make
if /i "%operation_type%" EQU "resource" goto make_resource
if /i "%operation_type%" EQU "r" goto make_resource
if /i "%operation_type%" EQU "simulator" goto make_simulator
if /i "%operation_type%" EQU "s" goto make_simulator
if /i "%operation_type%" EQU "app" goto make_app
if /i "%operation_type%" EQU "a" goto make_app
if /i "%operation_type%" EQU "drv" goto make_drv
if /i "%operation_type%" EQU "d" goto make_drv
echo.
echo 输入错误,请重新输入
goto start
:make_simulator
call make p=%project_name% job=4 m=simulator
goto start
:make_resource
call make p=%project_name% job=4 m=resource
goto start
:make_app
call make p=%project_name% job=4 m=app update
goto start
:make_drv
call make p=%project_name% m=custom_drv clean update image job=4
goto start
:make
echo.
set /p "check=确实要编译整个工程吗[Y/N]:"
if /i "%check%" EQU "y" call make p=%project_name% job=4
goto start