bug in debug console for FRDM-K22F BOARD_DEBUG_UART_INSTANCE?

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

bug in debug console for FRDM-K22F BOARD_DEBUG_UART_INSTANCE?

1,568 Views
christophertsch
Contributor III

This is in KSDK 1.1.0 and I am wondering if this is a bug. I had to change the statement "#define BOARD_DEBUG_UART_INSTANCE 2"  to "#define BOARD_DEBUG_UART_INSTANCE 1" in DbgCs1.h for my debug_printf command to write to 0x4006b000 instead of 0x4006c000 which was not working. I set the device to UART1 so that it would write to PTE0 so that I can use the pins that go to the UART that goes to the USB debug port but that was not sufficient.


18730_18730.pngpastedImage_1.png

Labels (1)
0 Kudos
Reply
6 Replies

1,115 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

can you upload your project here and depict how to reproduce your problem?

and what's your KDS version?

Best Regards,

Zhang Jun

=============================================================

this answer is for you, if it helps, please click on "Correct Answer" button. Thanks!

=============================================================

0 Kudos
Reply

1,115 Views
christophertsch
Contributor III

KDS version is 2.0.0

It is probably easier to describe the steps.

1) I created a new KSDK project for FRDM-K22F (File-New-KDS Project-Clicked Processor Expert-Finish).

2) Double-clicked fsl_debug_console in Components Library to instance DbgCs1.

3) Click on DbgCs1 in components view and set device to UART1 in Component Inspector.

4) Set Rx/Tx pins are set to PTE1/PTE0.

5) Set baud rate to 115200.

6) Click "Generate Processor Expert Code" button.

7) Add #include "DbgCs1.h" to main.c

8) Add the code below to the main function

  bool start = true;

     for(;;)

     {

        if (start)

        {

               debug_printf("\n\r Process started\n\r");

               start = false;

         }

     }

9) Start terminal emulator to communicate with com port associated with USB port connected to FRDM-K22F

10) Build, debug and press F8 key to resume. No message.

To fix it go to line 67 of file DbgCs1.h and change

#define BOARD_DEBUG_UART_INSTANCE 2

to

#define BOARD_DEBUG_UART_INSTANCE 1

Re-build-debug - hit F8 and the "Process started" message now appears.


I don't see how to upload a file.

0 Kudos
Reply

1,115 Views
DavidS
NXP Employee
NXP Employee

Hi Christopher,

When in the "Reply" window, in the upper right hand corner is a grayed out (no idea why grayed out) "Use advanced editor" link.  Click it and then you can click the "Attach" link in the lower right hand corner.

BTW: I have tried your steps with the Board and Processor option and both have the same results you have so I'm guessing this is a errata to the Wizard.

Zhang can you report this behavior?

Regards,

David

0 Kudos
Reply

1,115 Views
mathieumünch-zu
Contributor I

Could you please give a short update on the problem. Will it be fixed?

I am running in the same issues and don't want to fix the #define after every PE generation cycle.

Thank you!

0 Kudos
Reply

1,115 Views
DavidS
NXP Employee
NXP Employee

It is scheduled to be looked at and when I hear back I will update the post.

Regards,

David

0 Kudos
Reply

1,115 Views
christophertsch
Contributor III

Thanks David,

Thanks for the quick response. Do you know how it should work? Is the UART choice supposed to set that #define statement?

0 Kudos
Reply