<div dir="ltr">I will check to see if the clock driver is enabled and running, that sounds like a good place to start.<div style>I would think that the context switching, stacks, and memory map are OK due to the number of other things that work. ( I modified unlimited to create 10,000 tasks ) </div>
<div style><br></div><div style>Also, I found some good info on low cost JTAG options for the Pi:</div><div style><a href="https://github.com/dwelch67/raspberrypi/blob/master/armjtag/README">https://github.com/dwelch67/raspberrypi/blob/master/armjtag/README</a><br>
</div><div style><br></div><div style>Thanks,</div><div style>Alan</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 8, 2013 at 10:49 AM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 4/8/2013 9:22 AM, Alan Cudmore wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This weekend, I was putting together an example for the Raspberry Pi which includes a ramdisk, nvramdisk, shell with most commands enabled, and a few of the samples built in.<br>
<br>
While much of the code I run works, I have run into a few problems.<br>
Some examples:<br>
1. If I type "ls" on the shell, it works. If I type "ls -l" the shell ( and I guess the board ) locks up. I could probably start some tasks to see if it's just the shell that stops.<br>
<br>
2. If I type in an incorrect command like "helo" rather than "help" the shell will lock up.<br>
<br>
3. If I try to copy a file "cp shell-init shell-init2"  The shell seems to lock up. This is in the base imfs file system.<br>
<br>
</blockquote></div>
(2) looks like a very easy and suspicious case. The command lookup is a simple<br>
search of a list after splitting the command line into argc/argv. From shell_cmdset.c:<br>
<br>
rtems_shell_cmd_t * rtems_shell_lookup_cmd(const char * cmd) {<br>
  rtems_shell_cmd_t * shell_cmd;<br>
  shell_cmd=rtems_shell_first_<u></u>cmd;<br>
  while (shell_cmd) {<br>
   if (!strcmp(shell_cmd->name,cmd)) return shell_cmd;<br>
   shell_cmd=shell_cmd->next;<br>
  };<br>
  return NULL;<br>
}<br>
<br>
Notice that it depends on finding a NULL at the end of the list of<br>
commands.<br>
<br>
I am guessing you don't have a NULL there and the question<br>
is why.<br>
<br>
strcmp is also dangerous given that it is processing arbitrary<br>
user input. But you aren't pushing a buffer overflow here.<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But many other things still work. I can create a 32MB ramdisk, format it with RFS, mount it and fill it up with test files. I was even able to copy a file on the RFS ramdisk.<br>
<br>
I was thinking that the shell issues might be due to a very basic polled console driver. It might not be behaving the way a proper termios compatible console driver should.<br>
<br>
</blockquote></div>
It is using the libchip console framework and thus is using termios.<br>
You have to have the clock tick device driver running though since if<br>
you don't have input, then the termios polled code will sleep for 1<br>
tick.<br>
<br>
If you forgot to enable the clock driver on cases with user input,<br>
this would lock the system up.<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think it's time to get a jtag setup for this board because I really cannot tell what is going on.<br>
<br>
Alan<br>
<br>
<br>
</blockquote>
<br>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Joel Sherrill, Ph.D.             Director of Research & Development<br>
joel.sherrill@OARcorp.com        On-Line Applications Research<br>
Ask me about RTEMS: a free RTOS  Huntsville AL 35805<br>
Support Available                <a href="tel:%28256%29%20722-9985" value="+12567229985" target="_blank">(256) 722-9985</a><br>
<br>
</font></span></blockquote></div><br></div>