Porting project from MC9s08sg16 to MC9S08DZ32

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Porting project from MC9s08sg16 to MC9S08DZ32

1,296 次查看
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.

标签 (1)
标记 (2)
3 回复数

1,028 次查看
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 项奖励
回复

1,028 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Thanks for the sharing. You are welcome.

0 项奖励
回复

1,028 次查看
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!
-----------------------------------------------------------------------------------------------------------------------