Why would program which takes less than 10k of rom in a 9S08QE take more that 17k in a MKE02

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

Why would program which takes less than 10k of rom in a 9S08QE take more that 17k in a MKE02

545 Views
unclemike
Contributor III

Hello:

I am still trying to port a 9S08QE program to a KE02Z16.  The program size is <10k in the 9S08 and >17k in the KE02.  Have I done something to waste memory, or is it normal for a kinetis program to be much larger?

A related question is, when I change from a KE02Z16 to a Ke02Z32 to get more memory, do I have to start again from scratch with Processor Expert?  Or is there a way to change the MCU in the KE02Z16 project to a KE02Z32?

I am using Codewarrior 1.6 and Processor Expert

Thank You,

Michael

0 Kudos
2 Replies

390 Views
stanish
NXP Employee
NXP Employee

Michael,

These two MCUs have completely different architectures/programming models.

9S08QE is based on HCS08 core. This is 8-bit CISC core

MKE02 is based on ARM M0+ core. This is 32-bit RISC core with highly orthogonal instruction set

I'd expect some code size increase when migrating native 8 bit MCU code to 32 bit reduced instruction set code MCU.

Anyway, I'd recommend you to check your compiler optimization level settings for the arm project. If the optimization is off I'd recommend to turn it on (you can play with opt level vs. speed/size optimization)

Hope it helps.

Stan.

0 Kudos

390 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Michael,

- As to there is difference between 9S08QE and  KE02Z16, so the code size is not the same.

For example maybe kinetis chips more peripherals than S08 chips, then more registers and

more interrupt, so kinetis will use more memory .

- About change chip, you can try to directly change as below, double click the chip you want to use,

then clean project, generate code, build project.

pastedImage_1.png

Hope it helps


Have a great day,
TIC

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

0 Kudos