MKM34 and MKM35 code compaitbility, one code for both controllers

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

MKM34 and MKM35 code compaitbility, one code for both controllers

Jump to solution
680 Views
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

Tags (3)
0 Kudos
1 Solution
643 Views
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.

View solution in original post

0 Kudos
3 Replies
155 Views
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 Kudos
644 Views
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 Kudos
620 Views
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 Kudos