public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Issues developing standalone applications
@ 2013-03-22 20:58 Lucas Endres
  2013-03-23  0:17 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Endres @ 2013-03-22 20:58 UTC (permalink / raw)
  To: u-boot

Hi, I am new to U-Boot and I am trying to develop a standalone application
that accesses my board peripherals. I couldn't find any examples on how to
access my NAND device, for example, and when trying to run the same
sequence that is made in the board's initialization, I get an ** Illegal
Instruction ** error, causing the board to reboot.
I know it's an issue on the NAND initialization, but I am neither very
familiar to the U-Boot code nor to debugging errors. What follows is the
console output I get when trying to run nand_init_chip() from my standalone
application:

NIP: 3FFDB098 XER: 20000000 LR: 00046170 REGS: 3bf4f528 TRAP: 0700 DAR:
00000000
MSR: 00029200 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00

** Illegal Instruction **
Call backtrace:
65782035 000465EC 00046668 00046764 3FF6F548 3FF6F5C8 3FF7FE44
3FF8001C 3FF62A74 3FF61630
Program Check Exception

I need to run a badblocks test on the NAND device, and I successfully do it
in the board initialization from within the U-Boot environment, but not
from the standalone environment.

I could really use some examples, but I couldn't find any online.

Thank you so much for your attention, Lucas Pereira Endres.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Issues developing standalone applications
  2013-03-22 20:58 [U-Boot] Issues developing standalone applications Lucas Endres
@ 2013-03-23  0:17 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2013-03-23  0:17 UTC (permalink / raw)
  To: u-boot

Dear Lucas Endres,

In message <CAKZOPtKY-WJsZf_PpoC4gV_8Y8PvHSGJm4hhah2Znq=rvGMYxQ@mail.gmail.com> you wrote:
>
> I know it's an issue on the NAND initialization, but I am neither very
> familiar to the U-Boot code nor to debugging errors. What follows is the
> console output I get when trying to run nand_init_chip() from my standalone
> application:

You are not supposed to do things like that. For standalone
applications, ther eis only a very limited, well-defined set of
functionality exported by U-Boot.  NAND access is not part of it.

> I need to run a badblocks test on the NAND device, and I successfully do it
> in the board initialization from within the U-Boot environment, but not
> from the standalone environment.

Why do you want to do it from a standalone application?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only perfect science is hind-sight.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-23  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 20:58 [U-Boot] Issues developing standalone applications Lucas Endres
2013-03-23  0:17 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox