Compile a project with const variable alone (No Code)

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

Compile a project with const variable alone (No Code)

Jump to solution
2,120 Views
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? 

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

 

 

 

View solution in original post

0 Kudos
Reply
2 Replies
1,152 Views
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 Kudos
Reply
1,153 Views
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 Kudos
Reply