Freescale HCS08 using ROM_8000 as code memory

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

Freescale HCS08 using ROM_8000 as code memory

Jump to solution
389 Views
vikramhande
Contributor I

Hi

 

I am using freescale microcontroller mc9s08dz96, CodeWarrior development studio 10.2.

 

I started facing difficulty to program and debug since project code size has increased beyond 32K. I am using small memory model and till now I was able to keep my code in flash ROM_4000 & ROM_C000. To accommodate some more code I want to use flash ROM_8000 portion of memory.

 

When I tried to use ROM_8000 in small memory model, I faced following issues.

 

 1. I could not program the .s19 file on target correctly. I am using PE Micro usb multilink interface.

2. I could not debug the code. Due to some problem in copydown segment in startup,c, It was looping back/reseting to start location.

 

What is the correct way to use the flash memory ROM_8000 so that I can program and debug project using CodeWarrior studio?

Labels (1)
0 Kudos
1 Solution
276 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

hi,

in 9s08dz96, there are three segments of unbanked Flash ROM

    ROM                      =  READ_ONLY    0x4000 TO 0x7FFF;
    ROM1                     =  READ_ONLY    0x1900 TO 0x3BFF;
    ROM2                     =  READ_ONLY    0xC000 TO 0xFF7F;

from my understanding, you used ROM and ROM2. do you use ROM1 also?

if not, please also place ROM1 to DEFAULT_ROM.

To use "ROM1,ROM2" as well, pass the option -OnB=b to the compiler

pastedImage_1.png

if all ROM, ROM1 and ROM2 are not enough for you, I suggest you use bank memory mode. because flash memory from 0x8000 is banked memory, we can't use it as unbank.  to use flash memory from 0x8000, I suggest you create a new project with wizard with banked memory support, then port your code to the new project.


Have a great day,
Jennie Zhang

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

View solution in original post

0 Kudos
1 Reply
277 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

hi,

in 9s08dz96, there are three segments of unbanked Flash ROM

    ROM                      =  READ_ONLY    0x4000 TO 0x7FFF;
    ROM1                     =  READ_ONLY    0x1900 TO 0x3BFF;
    ROM2                     =  READ_ONLY    0xC000 TO 0xFF7F;

from my understanding, you used ROM and ROM2. do you use ROM1 also?

if not, please also place ROM1 to DEFAULT_ROM.

To use "ROM1,ROM2" as well, pass the option -OnB=b to the compiler

pastedImage_1.png

if all ROM, ROM1 and ROM2 are not enough for you, I suggest you use bank memory mode. because flash memory from 0x8000 is banked memory, we can't use it as unbank.  to use flash memory from 0x8000, I suggest you create a new project with wizard with banked memory support, then port your code to the new project.


Have a great day,
Jennie Zhang

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

0 Kudos