Porting Kinetis Interrupt from CodeWarrior to KDS

Document created by ZhangJennie Employee on Jun 19, 2017Last modified by ebiz_ws_prod on Dec 13, 2017
Version 3Show Document
  • View in full screen mode

Recently I received two cases from Kinetis users. They both meet problem when porting Kinetis Interrupt project from CodeWarrior 10.x to KDS. There is a document KDS_Porting_Guide.pdf under KDS install folder which covers this topic. However I know many customers still have difficulty even they follow the document steps. This scenario is normal; because users’ projects are various, we can’t expect one porting document solve all kinds of problem of individuals. For me, honestly, I seldom use this porting guide to port my project. I prefer porting my project all by hand. Thus I can know my project changes from up to bottom. Thus even if I meet problem later, I can still position it easily and quickly.

For the reason of time, in this article, I will focus on how to port Kinetis Interrupt from CodeWarrior to KDS by hand.

Some NVIC register definition name and file structure are different in CodeWarrior and KDS. One big difference is that KDS uses core file from ARM limited directly. I summarized the difference as below table. It’s good to know the basic difference before we start the porting.

 

 

 

CodeWarrior

KDS

NVIC Register Definition :

 

Where

MCU header file.

Eg:

MK60N512VMD100.h

ARM Core file.

Eg: core_cm4, core_cm0plus.h

Written by

NXP(former Freescale)

ARM Limited

Sample of usage

NVICISERx = 0x01

NVIC->ISER[x] = 0x01

Packaged in NVIC_EnableIRQ(n)

Vector Table Definition:

Where

Kinetis_sysinit.c

Startup_MK60D10.S

Language Using

C

Assembly

Interrupt handler name

Defined by user

Defined by KDS.

Eg, PORTA_IRQHandler

Allow user modify.

 

For more, see attached document.

Original Attachment has been moved to: Porting-Kinetis-Interrupt-from-CodeWarrior-to-KDS.zip

Outcomes