Porting project from MC9s08sg16 to MC9S08DZ32

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

Porting project from MC9s08sg16 to MC9S08DZ32

1,295 Views
punxer
Contributor II

Hello, i have a project on MC9S08SG16 and i need to add can support for my project. I choose MC9S08DZ32 with onboard can. what should i do to port my software from SG16 to DZ32. I makw some changest at code and now it compiles. But if i start it on simulator i am getting error before main 

static void near loadByte(void) {
asm {
PSHH
PSHX
#ifdef __HCS08__
LDHX 5,SP
LDA 0,X - here
AIX #1
STHX 5,SP
#else.....


 What should i do for right porting on new MCU? 

Thanx in advance.

Labels (1)
Tags (2)
3 Replies

1,027 Views
punxer
Contributor II

Hello i solved this problem creatring new project for DZ32 and moving all sources i need to new project. Then i changet few register names. Program works good. Now i just need to map some I/O Ports. Thanx

0 Kudos
Reply

1,027 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Thanks for the sharing. You are welcome.

0 Kudos
Reply

1,027 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

loadByte is called during initializing data when copy data from ROM to RAM.

DZ32 has larger RAM/ROM size than SG16. Normally this problem should not happen.

Please upload your demo project here thus we can check the problem directly. Thanks.


Have a great day,
Jennie Zhang

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