Compile a project with const variable alone (No Code)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Compile a project with const variable alone (No Code)

ソリューションへジャンプ
2,124件の閲覧回数
MSURESH
Contributor I

I am currently using MC9S12C64. I need to download some table (const strings and const linked list) into flash. I need to generate seperate s19 files for code  and the table. This would enable me to download the tables seperately without having to download the code part of it.

 

Is this possible using code warrior?

 

I have been able to compile a project with only the data in the required flash pages, But i am not able to confirm this from the S-records in the s19 file.

 

Is some documentation on s-record available which could explain this? 

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,156件の閲覧回数
MSURESH
Contributor I

 

 

Hi Stanish,

    Thanks for your response. Your idea looks more of a work-around than a solution. My intention was to be able to compile 2 projects seperately and release the S19 files independant of each other.

 

     One way of generating the hex file would be to have a dedicated utiltiy (C, VB, Excel (VBA script)) to generate the output file from the data (table). The Other way that i have tried is to use ENTRIES block in prm file to list the unrefernced variables to be retained as part of the output file. By this the compiler & linking does not eliminate the variables (data/ tables), even in the absence of code.

 

ENTRIES /* retain the following unreferenced variables */

 my_file.c.o:*          /* include all the variables in my_file.c */

END

 

I have now verified the output S19 file. It contains S1 & S2 records for the data I wanted. I was unsure of S0 record, but i got details on the record, this record contain only the name with path of the .abs file.

 

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,156件の閲覧回数
stanish
NXP Employee
NXP Employee

Hello MSURESH,

 

To get the const tables as a S-record file you can:

1) load the complete project (Code+Const) into the Debugger (MCU or simulator)

2) save the area of memory that contains the const tables into S-Record file using debugger command line:

e.g.

 

save 0xED00..0xEE00 my_tables.s19

 

Stanish

0 件の賞賛
返信
1,157件の閲覧回数
MSURESH
Contributor I

 

 

Hi Stanish,

    Thanks for your response. Your idea looks more of a work-around than a solution. My intention was to be able to compile 2 projects seperately and release the S19 files independant of each other.

 

     One way of generating the hex file would be to have a dedicated utiltiy (C, VB, Excel (VBA script)) to generate the output file from the data (table). The Other way that i have tried is to use ENTRIES block in prm file to list the unrefernced variables to be retained as part of the output file. By this the compiler & linking does not eliminate the variables (data/ tables), even in the absence of code.

 

ENTRIES /* retain the following unreferenced variables */

 my_file.c.o:*          /* include all the variables in my_file.c */

END

 

I have now verified the output S19 file. It contains S1 & S2 records for the data I wanted. I was unsure of S0 record, but i got details on the record, this record contain only the name with path of the .abs file.

 

 

 

0 件の賞賛
返信