Compile a project with const variable alone (No Code)

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

Compile a project with const variable alone (No Code)

跳至解决方案
2,118 次查看
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,150 次查看
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,150 次查看
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,151 次查看
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 项奖励
回复