I use CodeWarrior5.1/5.2 for HCS12(X). When I use the MCU named MC9S12XET256,the S19 file generated by CW can't show the machine code(hex) in RAM.I modify the PRM file to make the program stored in RAM,because I want the bootloader program run in RAM.when

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

I use CodeWarrior5.1/5.2 for HCS12(X). When I use the MCU named MC9S12XET256,the S19 file generated by CW can't show the machine code(hex) in RAM.I modify the PRM file to make the program stored in RAM,because I want the bootloader program run in RAM.when

704 Views
sadwinds文
Contributor I

I do the following configure in PRM file:

/* non-paged RAM */
// RAM = READ_WRITE DATA_NEAR 0x2000 TO 0x3FFF;
RAM = READ_WRITE DATA_NEAR 0x2000 TO 0x2FFF; //正常RAM使用
RAM_VAR = READ_ONLY DATA_NEAR IBCC_NEAR 0x3000 TO 0x3FFF;

PLACEMENT 
     _PRESTART, 
     STARTUP, 
    ROM_VAR, 
    STRINGS,
    VIRTUAL_TABLE_SEGMENT, 
     //.ostext, /* eventually OSEK code */
     DEFAULT_ROM,
     NON_BANKED,
     COPY

               INTO RAM_VAR;

Thus all the machine code of this program will be stored in RAM_VAR,but I can't see the hex data in S19 file.

I have do this thing in MC9S12DP512 and MC9S12P64 before,it have no such problem.

Please tell me the solution,thank you!

Tags (1)
0 Kudos
Reply
3 Replies

493 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

The default bbl file doesn't support generate srecord in s19 file.

When you download your code to RAM, next time after power-off and power-on. all your code in RAM will disappear. why do you want to do this?

Normally if we want a piece of code running in RAM, we still need store this code to FLASH. then doing copy-to-ram code in your source code to copy this code from flash to ram then run it from RAM.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

493 Views
sadwinds文
Contributor I
 There have the master machine and the slave machine(MCU) to communicate with each other.I want to upgrade the promgram in MCU online(through CAN). First of all,I must use the master machine to import Bootloader(S19 file) to MCU. And the Bootloader function in RAM,so I do the 
configuration in PRM file to make the Bootloader stored in RAM.
        However,the S19 file can't show the machine code stored in RAM with MC9S12XET256,so I can't do the first step.I have done the experiment successfully with MC9S12P64 and MC9S12DP512,because they have no this question.
        I have tried storing the Bootloader program in FLASH(0xC000 TO 0xFFFF) and than modify the address in S19 file to RAM(0x3000 to 0x3FFF).But
it doesn't work.Although the program is same,the machine code is not 100% same with it when it is stored in RAM.
       It is important to me to solve this problem.Do you have the solution?
0 Kudos
Reply

493 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Sadwinds,

It should be possible to have RAM code recorded in s19 file by modifying bbl file.

But to avoid further trouble, please send your MC9S12P64 or MC9S12DP512 project here.

I need to check how they implement the same.

Thanks.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply