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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,648 Views
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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
835 Views
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

 

View solution in original post

0 Kudos
Reply
1 Reply
836 Views
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 Kudos
Reply