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.
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
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!
-----------------------------------------------------------------------------------------------------------------------