On Sun, Feb 21, 2021 at 11:25 AM Gregory Nutt <spudan...@gmail.com> wrote:
>
>
> > ...  Using
> > the pinguino toolchain, 2 LEDs now light up, and the debugger at least
> > thinks that we're in the up_idle function, so that looks promising.
> > After switching the serial console to UART2(for the explorer16), I do
> > now get data out of the serial port!  The last message that I see is
> > "nx_start: CPU0: Beginning Idle Loop".  Nothing else is happening
> > though - I was expecting to get some kind of shell, as USER_ENTRYPOINT
> > is set to "nsh_main".
>
> That means that the OS bring-up completed without error but something
> failed while starting the application.  Perhaps the memory is still
> configured wrong or perhaps the NSH stack size is too small.  It is
> impossible to diagnose without debugging.
>
> I would put a breakpoint on nsh_main and see if it gets there.
>

Robert I did a quick verification via a qemu based simulator that I
was able to run nsh.

I did find a couple things. One was a invalid register write for port K
https://github.com/apache/incubator-nuttx/pull/2886

The other more concerning one was that when I did not build with the
debug features enabled I had what the simulator at least thought was
an invalid hex file with an entry starting on an odd address:

❯ ./mipsel-softmmu/qemu-system-mipsel \
  -machine pic32mz-explorer16 \
  -nographic -monitor none \
  -serial stdio \
  -kernel  ~/nuttx/wrk/nuttx/nuttx.hex -S -s
Board: Microchip Explorer16
Processor: microAptivP
RAM size: 512 kbytes
/home/bashton/nuttx/wrk/nuttx/nuttx.hex: odd address

Note that I was abusing a different config "pic32mz-starterkit:nsh"
and I had to make a few tweaks including disabling
CONFIG_MIPS_MICROMIPS and I believe there also may be a limitation in
the simulator around SRSCtl that I also hacked around.


I don't have an actual Microchip Explorer16/32 which it sounds like
you are working on, but if you were to put a draft PR up or point me
at a branch I would be happy to try to run this against the simulator
and see if we can get a little further.

This is the simulator I was using https://github.com/sergev/qemu/wiki
I did have to make a few changes to get it to build with  a modern
gcc/glibc

--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -22,6 +22,8 @@
 #include "trace.h"
 #include "migration/migration.h"

+#include <sys/sysmacros.h>
+
 int open_fd_hw;
 int total_open_fd;

./configure --target-list=mipsel-softmmu --python=/usr/bin/python2
--disable-werror
make

Reply via email to