Make sure you compile with debug info enabled and no optimization.  Then, since 
you mentioned you have a Segger J-Link JTAG probe, I highly recommend you use 
Segger’s debugger Ozone (free J-Link probes) — you’ll be able to easily 
single-step and determine what’s going wrong…

If you have a J-Link then you are in business and it shouldn't be difficult to find the problem.  You can use the J-Link like this:

 * Start U-Boot and break out to the prompt.  This will initialize the
   SDRAM.
 * Then load NuttX in SDRAM and debug it.

The first think I would want to know is does the code get to nsh_main().

 * gdb> file nuttx
 * gdb > b nsh_main
 * gdb> mon reset
 * gdb> c

If you get there, then all of the initialization went OK.  Then put a breakpoint on fputs().  You should hit it via

   nsh_session.c:  fputs(g_nshgreeting, pstate->cn_outstream);

If you get there then it is at least trying to get something on the serial console, but is failing for some reason:  maybe wrong UART or wrong pin configuration.


Reply via email to