Can I define a macro or pass a macro name to the bbl file?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Can I define a macro or pass a macro name to the bbl file?

跳至解决方案
1,652 次查看
admin
Specialist II

Hi,

 

I am using the comand line method not IDE to build my application. Then I have a question, can I define a macro or pass a macro name to the bbl file via command line. Now my bbl file is as below:

"
/* global s-record file */
OPENFILE "%ABS_FILE%.glo"
format = motorola
busWidth = 1
SRECORD=Sx

/* "EABI compliant encoded global" address to global */
len = 0x1800000
origin = 0x1000000
destination = 0
SENDBYTE 1 "%ABS_FILE%"
"

 

But the ABS_FILE is the environment variable thant CodeWarrio defines. I'd like to define my own macro in the bbl file or pass a macro to the bbl file such as:

burner.exe -D(MY_MACRO=%MY_MAOCR%) my.bbl

 

Is it possible?

 

Thanks,

Simon

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
839 次查看
CompilerGuru
NXP Employee
NXP Employee

Actually I don't think the handling of ABS_FILE is hidden. I don't have a CW installation here (just installed vista), but I guess this var is passed via -env command line option. Check the echo command line box in the burner preferences in a CW project and build once. You should get the full command line as CW is using it, and using the same command line from dos/make, you should get the same result.

 

For a makefile based use for the burner there is even a simpler way, check the burner documentation. The burner supports to pass in the content of a bbl file directly as command line argument, not sure of the option and the exact syntax though.

 

Daniel

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
840 次查看
CompilerGuru
NXP Employee
NXP Employee

Actually I don't think the handling of ABS_FILE is hidden. I don't have a CW installation here (just installed vista), but I guess this var is passed via -env command line option. Check the echo command line box in the burner preferences in a CW project and build once. You should get the full command line as CW is using it, and using the same command line from dos/make, you should get the same result.

 

For a makefile based use for the burner there is even a simpler way, check the burner documentation. The burner supports to pass in the content of a bbl file directly as command line argument, not sure of the option and the exact syntax though.

 

Daniel

 

0 项奖励
回复