MKM34 and MKM35 code compaitbility, one code for both controllers

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

MKM34 and MKM35 code compaitbility, one code for both controllers

跳至解决方案
1,895 次查看
Chris_P
Contributor I

Hello *,

I have the case that I want to replace the MKM34Z256 with the MKM35Z256 and I only use those internal modules and features that both of them have inside. 

Is it possible to compile the code only for the MKM35 and run it on both controllers without any risk? (watchdog is active) I have already run code compiled for 34 on the 35 without any obvious problems...

As I read in the docu and migration guide there are only small additions in the MKM35, they have the same pinning, registers, adcs etc and even the SDK drivers I use in Keil are nearly the same, only minor differences.

 

Thanks in advance !!

Christian

标记 (3)
0 项奖励
回复
1 解答
1,858 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @Chris_P,

Is it possible to compile the code only for the MKM35 and run it on both controllers without any risk?

As you mention, both microcontrollers share some characteristics and functionalities.

Nonetheless, you should be careful with those that are not, for example: SRAM. Specially if you intend to program or compile from MKM35Z256 to MKM34Z256.

You could continue working as you mention, but it might be a better practice to use the corresponding microcontroller SDK.

Best regards, Raul.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,370 次查看
amal_s
Contributor I

Hi Chris_P,

Can you tell which compiler are you using for code?

If it is IAR, which version?

Are you able to build output file for both MKM34Z256 and MKM35Z256 using IARv9.10.2?

I'm facing a issue while compiling the code for MKM34Z256 with iarv9.10.2. I think some linker issues.

The error shown is: Fatal Error[Lp049]: there was no reference to __iar_data_init3, but it is needed to initialize section .bss (irtc.o #8) on iar v9.10

can you please help me if you have any idea regarding this error, I'm new in this field:(

Thanks and regards

0 项奖励
回复
1,859 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @Chris_P,

Is it possible to compile the code only for the MKM35 and run it on both controllers without any risk?

As you mention, both microcontrollers share some characteristics and functionalities.

Nonetheless, you should be careful with those that are not, for example: SRAM. Specially if you intend to program or compile from MKM35Z256 to MKM34Z256.

You could continue working as you mention, but it might be a better practice to use the corresponding microcontroller SDK.

Best regards, Raul.

0 项奖励
回复
1,835 次查看
Chris_P
Contributor I

Hi Raul,

thank you for your reply and your hint regarding the SRAM, to be honest I didn't recognize the different address ranges in MKM34 and 35.

I will reconsider the one-compile-for-all strategy

 

Best regards,

Christian 

0 项奖励
回复