KSDK 2.0 for FRDM-K66F

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KSDK 2.0 for FRDM-K66F

1,878件の閲覧回数
a8Chcx
Contributor V

Hi,

 

I generated KSDK 2.0 for FRDM-K66F today

Then I generate my application by using wizard 2.x in KDS 3.2. it works fine to generate *.elf. But when I add printf, I found the printf() function to cause linker problem. So, it can't generate *.elf file. See attached doc.

When I use KSDK 2.0 that is generated 2 months ago, printf() worked fine...

Does anyone know how to fix it?

 

Thanks,

 

Christie

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,548件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee


Hi Christie,

It seem like you forgot to attach the document with the error.

Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 件の賞賛
返信

1,547件の閲覧回数
a8Chcx
Contributor V

Hi Carlos,

Sorry. Here it is...

0 件の賞賛
返信

1,547件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Christie,

Thanks for attaching the file.

I would recommend you to use the SDK Debug console implementation to print information instead of the printf function from the stdio library, here is an example:

pastedImage_1.png

You could use the hello_world demo as base for your application.


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 件の賞賛
返信

1,547件の閲覧回数
a8Chcx
Contributor V

Hi Carlos,

Yes. I can use PRINTF, but it can't output the formatted data, like "%#02X", and etc...

I can't make my USB project to work as demo project. But it works fine with KSDK that I built two months ago..

Regards,

Christie

0 件の賞賛
返信

1,547件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee


Hi Christie,

 

I would recommend you to compare the project properties of your new project with the properties of the hello_world demo, I have done some test and I'm able to use both PRINTF and printf functions.

Regarding the formatting you mention, in order to print hexadecimal numbers using the PRINTF function you need to use the following syntax:

    PRINTF("0x%02X\r\n",255);

Here is an example based on the hello_world demo:

int main(void)
{
    char ch;

    /* Init board hardware. */
    BOARD_InitPins();
    BOARD_BootClockRUN();
    BOARD_InitDebugConsole();

    PRINTF("hello world.\r\n");

    printf("hello world.\r\n");

    printf("%#02X\r\n",255);

    PRINTF("0x%02X\r\n",255);


    while (1)
    {
        ch = GETCHAR();
        PUTCHAR(ch);
    }
}

pastedImage_1.png

 

You can check the chapter "12.1.2 Advanced Feature" in the Kinetis SDK v.2.0 API Reference Manual for more information on how to scan and print formatted data.

Hope it helps!

 

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 件の賞賛
返信