How to import the code warrior project to IAR work bench

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

How to import the code warrior project to IAR work bench

1,375 Views
communitycommun
Contributor III

Hello,

              I want to import the code warrior project to IAR work bench for controller TWR Kinetics K53N512..Its a freescale project named MED-STENTH which is available in NXP site but its in code warrior.

thereby i want it to get converted into IAR work bench...


OR is code MED-STENTH is available in IAR with NXP

4 Replies

879 Views
ivadorazinova
NXP Employee
NXP Employee

Hello.

1) I contacted the expert for MED-STENTH if they have the SW in IAR. At the moment I´m waiting for his response.

2) I don´t think that would be possible to convert CW project to IAR. For sure - I contacted IAR support about this requirement.

3) Anyway, it is possible to convert CW project to KDS - Please see attached document and these links bellow.

Importing MCU V10.6 projects (sample, using PE and MQX) under KDS

KDS Installation and Porting Guide.doc

Also useful could be

Using Kinetis Design Studio with IAR Embedded Workbench IDE

Tutorial: Replacing IAR EW with Eclipse IDE

I will let you know as I receive the answer.

Best Regards,

Iva

879 Views
communitycommun
Contributor III

Thanks Iva,

                  I have also saw your mail regards about me.then Let me introduce to you .Myself Austin from India i am basically a embedded software developer.I have been looking for medical non invasive  equipment at that time i come across with your freescale project like MED BPM,MED SPO2,etc.....The problem occurred while  all the codes were in IAR except MED STETH.

I have refereed all the above document but for that i have create a new KDS project then have to import to IAR.....here i have create again the a new project in KDS which was in code warrior and import all the blocks to KDS(It can be done in IAR too,Then why KDS)...So is there any way to import the existing code warrior project to KDS and then generate the XML file and again import to IAR....Sound great but its long process ......

I am looking forward you to make good solution ..

regards
Austin

0 Kudos

879 Views
ivadorazinova
NXP Employee
NXP Employee

Hello,

unfortunately this project is available in CW and no such transition guide does not exist.

For importing project to KDS, please use the guide mentioned above.

In case of IAR, create a new project in IAR and add the sources to the IAR project.

I hope this helps.

Best Regards,

Iva

879 Views
communitycommun
Contributor III

Thanks Iva....
Iva one more doubt right now i got struck with configure uart3 interrupt ...i have done that but when ever interrupt occurs it doesn't go to ISR rountine...
<Code>

<Uart.c file>

#include "uart.h"

void uart_putchar (UART_MemMapPtr channel, char ch)

{

    /* Wait until space is available in the FIFO */

    while(!(UART_S1_REG(channel) & UART_S1_TDRE_MASK));

   

    /* Send the character */

    UART_D_REG(channel) = (uint8)ch;

}

void uart_init (UART_MemMapPtr uartch, int sysclk, int baud)

{

    register uint16 sbr, brfa;

    uint8 temp;

   

    /* Enable the clock to the selected UART */   

    if(uartch == UART0_BASE_PTR)

        SIM_SCGC4 |= SIM_SCGC4_UART0_MASK;

    else

        if (uartch == UART1_BASE_PTR)

            SIM_SCGC4 |= SIM_SCGC4_UART1_MASK;

        else

            if (uartch == UART2_BASE_PTR)

                SIM_SCGC4 |= SIM_SCGC4_UART2_MASK;

            else

                if(uartch == UART3_BASE_PTR)

                    SIM_SCGC4 |= SIM_SCGC4_UART3_MASK;

                else

                    if(uartch == UART4_BASE_PTR)

                        SIM_SCGC1 |= SIM_SCGC1_UART4_MASK;

                    else

                        SIM_SCGC1 |= SIM_SCGC1_UART5_MASK;

                               

    /* Make sure that the transmitter and receiver are disabled while we

     * change settings.

     */

    UART_C2_REG(uartch) &= ~(UART_C2_TE_MASK

                | UART_C2_RE_MASK );

    /* Configure the UART for 8-bit mode, no parity */

    UART_C1_REG(uartch) = 0;    /* We need all default settings, so entire register is cleared */

   

    /* Calculate baud settings */

    sbr = (uint16)((sysclk*1000)/(baud * 16));

       

    /* Save off the current value of the UARTx_BDH except for the SBR field */

    temp = UART_BDH_REG(uartch) & ~(UART_BDH_SBR(0x1F));

   

    UART_BDH_REG(uartch) = temp |  UART_BDH_SBR(((sbr & 0x1F00) >> 8));

    UART_BDL_REG(uartch) = (uint8)(sbr & UART_BDL_SBR_MASK);

   

    /* Determine if a fractional divider is needed to get closer to the baud rate */

    brfa = (((sysclk*32000)/(baud * 16)) - (sbr * 32));

   

    /* Save off the current value of the UARTx_C4 register except for the BRFA field */

    temp = UART_C4_REG(uartch) & ~(UART_C4_BRFA(0x1F));

   

    UART_C4_REG(uartch) = temp |  UART_C4_BRFA(brfa);   

    /* Enable receiver and transmitter */

    UART_C2_REG(uartch) |= (UART_C2_TE_MASK

                | UART_C2_RE_MASK );

       

          /* Enable interrupt on reception*/

         UART3_C2 |= UART_C2_RIE_MASK;

}

/********************************************************************/

/*

* Wait for a character to be received on the specified UART

*

* Parameters:

*  channel      UART channel to read from

*

* Return Values:

*  the received character

*/

char uart_getchar (UART_MemMapPtr channel)

{

    /* Wait until character has been received */

    while (!(UART_S1_REG(channel) & UART_S1_RDRF_MASK));

   

    /* Return the 8-bit data from the receiver */

    return UART_D_REG(channel);

}

/*************************************************************************/

/*************************************************************************/

/*************************************************************************/

/*************************************************************************/

<main.c File>
<ISR rountine>

void UART3_IRQHandler(void)

{

   //flag=1;

  

    if ((UART_S1_REG(UART3_BASE_PTR) & UART_S1_RDRF_MASK))

    {

     

    rxBuffer[rxBuffer_intex]=UART_D_REG(UART3_BASE_PTR);

   

   /* if(rxBuffer[rxBuffer_intex]=='\n'||rxBuffer[rxBuffer_intex]=='\r'||rxBuffer[rxBuffer_intex]=='\0'){

      rxflag=1;

      rxBuffer[rxBuffer_intex]='\0';

    }*/

   

   // else

   

    rxBuffer_intex++;

   

    }

}

0 Kudos