shell_printf() shell.c KSDK 1.1.0

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

shell_printf() shell.c KSDK 1.1.0

697 Views
tomasvanek
Contributor III

Shell code uses shell_printf for output. However standard printf is used at two places. It is a problem when you use context->ops->send_data for output.


--- a/KSDK-1.1.0/utilities/shell/src/shell.c    2014-12-17 11:42:10.000000000 +0100

+++ b/KSDK-1.1.0/utilities/shell/src/shell.c    2015-03-10 22:19:58.152395878 +0100

@@ -250,7 +250,7 @@

                 int i;

                 memmove(&context->line[context->c_pos],&context->line[context->c_pos + 1],context->l_pos - context->c_pos);

                 context->line[context->l_pos] = 0;

-                printf("\b%s  \b", &context->line[context->c_pos]);

+                shell_printf(context, "\b%s  \b", &context->line[context->c_pos]);

 

                 /* reset postion */

                 for (i = context->c_pos; i <= context->l_pos; i++)

@@ -296,7 +296,7 @@

             /* move the cursor to new position */

             for (i = context->c_pos; i < context->l_pos; i++)

             {

-                printf("\b");

+                shell_printf(context, "\b");

             }

         }

         else

Labels (1)
Tags (2)
3 Replies

364 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Tomas,

Thanks for the reporting! I have passed it to the software team, and will let you know when  I have any more information.

Have a great day!

Kan

0 Kudos

364 Views
tomasvanek
Contributor III

I downloaded KSDK 1.3.0 and the reported problem is still there untouched. Why sw team has not accepted even so clear and trivial patch?

0 Kudos

364 Views
DavidS
NXP Employee
NXP Employee

Hi Tomas,

Thanks for re-reporting.

I have submitted formal trouble ticket:

Issue KPSDK-7285 - shell printf coding error has been successfully created.

Regards,

David

0 Kudos