AnsweredAssumed Answered

Going from CW 10.6 to KDS

Question asked by juanm on Apr 20, 2015
Latest reply on Apr 20, 2015 by juanm

Hi! I have a simple program for a KL05 running on CW 10.6, I tried to use the same code in KDS but it seems that many definitions are missing from MKL05Z4.h. For example, this code compiles fine on CW:

#include "derivative.h" /* include peripheral declarations */   unsigned int i;   int main(void) {   SIM_SCGC5 = SIM_SCGC5_PORTA_MASK ; //Activo reloj PTA   PORTA_PCR10 = PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;   GPIOA_PDDR |= (1<<10); //PTA10 como salida     for(;;) {      GPIOA_PTOR=(1<<10); //Toggle PTA10   for (i=61000; i; i--);   }    return 0; }


In KDS I change the include to #include "MKL05Z4.h", but when I compile I get errors saying that SIM_SCGC5, PORTA_PCR10, GPIOA_PDDR and GPIOA_PTOR aren't defined.

I'm missing another include file? It's strange because those definitions are present on the KL25Z include but not on the KL05Z.