Hi everyone!
I got a problem and I came here to ask if some of you might help me… I am using the board FRDM-K64F with the following software solutions:
KDS 3.2;
KSDK 1.3;
MQX provided by KSDK;
When I use the Shell() function provided by nshell library, the exit() method of the mqx is called, and all that I see on terminal is:
Shell (build: Sep 5 201
After that, I removed the task responsible of calling the shell, and tried to include the telnet shell, but when I open the connection nothing happens, I cannot write anything, but the program does not exit.
I am providing my source code in attachment hopping that some of you might help me.
Thank you.
Original Attachment has been moved to: Test.rar
Solved! Go to Solution.
Hi everyone!
I finally found how to resolve this issue, by reading the document annexed. The problem was related to the order of the including libraries in the project. The mqx_stdlib should be included after the others user libraries and before toolchain libraries.
Thank you everyone for the help!
Hi Clecio:
I downloaded your project, unfortunately, it can't compile, because some files are symbolic links, I can't get the whole source files.
For shell ,you can refer to shell example in KSDK1.3 , I can run this demo well in my side.
KSDK_1.3.0\middleware\tcpip\rtcs\examples\shell\build\iar\shell_frdmk64f
I was informed there is a bug in KSDK1.3, please check the following, I am not sure whether it can fix your issue or not.
SDK_1.3_FRDM-K64F\utilities\shell\src\shell.c
Line 253
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]);
Line 299
/* move the cursor to new position */
for (i = context->c_pos; i < context->l_pos; i++)
{
// printf("\b");
shell_printf(context, "\b");
}
Regards
Daniel
Hi Daniel:
I did some more tests and like you, the example project work on my side too.
I am utilizing the KSDK Project Generator 2.2 to create my projects. When I include the library of shell by the normal way in kds (.a static files) the bug that I described occurs. When I use processor expert and include the library in the same way the shell works just fine. However, in the project without PEx, when I include the .c and .h files of shell in my project as if they were part of it, the project works normally. Here is a picture of what I see on my terminal screen:
After the mqx exit, in the upper part of the KDS we can see the last called functions. One of them is _malloc_r(), as you can see in the image bellow, could this problem be related with the dynamic memory allocation?
So again I am asking for the help of community, someone have already seen this problem?
Thanks for the help!
Hi everyone!
I finally found how to resolve this issue, by reading the document annexed. The problem was related to the order of the including libraries in the project. The mqx_stdlib should be included after the others user libraries and before toolchain libraries.
Thank you everyone for the help!