printf() is Broke in KSDK 1.3

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

printf() is Broke in KSDK 1.3

ソリューションへジャンプ
2,586件の閲覧回数
audi_mcavoy
Contributor IV

printf() is broke in KSDK 1.3 (at least with the  fsl_debug_console using PEx).

 

Steps to reproduce.

 

select File menu | New | Kinetis Project

enter a project name (e.g. printf_test) (next)

select Boards | Kinetis | FRDM-K64F (next)

select KSDK_1.3.0, check Processor Expert (next)

select GNU C Compiler (finish)

 

select Processor Expert menu | Show Views

select Components Library tab

navigate to KSDK 1.3.0 | Peripheral Drivers/HAL | Utilities

right-click fsl_debug_console and select Add to project

select Component Inspector tab

leave baud rate at 115200, set RxD to DBG_CONSOLE_RX, set TxD to DBG_CONSOLE_TX

Generate Processor Expert code

 

edit Sources | main.c

add #include <stdio.h> on line 41

starting on line 54, add the following three lines...

  PRINTF("KSDK 1.3 PRINTF\r\n");

  printf("printf\r\n");

  puts("puts");

Build project

 

attach FRDM-K64F board via OpenSDA USB port

connect your favorite terminal program to the mbed Serial Port (115200, 8N1)

debug using GDB OpenOCD Debugging

observe that only the first PRINTF statement is displayed

 

Repeat all of these steps using KSDK 1.2.0 and you will see all three lines displayed.

 

- Audi

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
2,214件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Audi,

Found fix but need to try to understand why.

Please set heap to 0x400.

ScreenHunter_185 Oct. 20 17.47.gif

Generate Code.

Do a project clean and rebuild.

Regards,

David

元の投稿で解決策を見る

4 返答(返信)
2,215件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Audi,

Found fix but need to try to understand why.

Please set heap to 0x400.

ScreenHunter_185 Oct. 20 17.47.gif

Generate Code.

Do a project clean and rebuild.

Regards,

David

2,214件の閲覧回数
audi_mcavoy
Contributor IV

Thanks David, that worked for me too.

- Audi

0 件の賞賛
返信
2,214件の閲覧回数
audi_mcavoy
Contributor IV

David,

I want to add that this fix was also necessary to get the HID mouse demo to work.

Would I be correct in assuming that this fix is necessary for every PEx project under KSDK 1.3.0?

- Audi

0 件の賞賛
返信
2,214件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Audi,

Honestly I don't know.

I will report it to our KSDK experts to allow them to dig into and reference this post so they can comment on it.

Regards,

David

Reference:

Issue KPSDK-7360 - KSDK_1.3 PE examples need 0x400 heap added to allow printf has been successfully created.

0 件の賞賛
返信