public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] xil_printf in ps7_init.c for u-boot-spl (zynq)
Date: Tue, 06 May 2014 16:28:48 +0200	[thread overview]
Message-ID: <5368F1A0.8050505@monstr.eu> (raw)
In-Reply-To: <CAAH1pR2N0UW6UVsbWy2kz3_x0W=bVBV+sqRevumLX2k_dEGNTQ@mail.gmail.com>

Hi,

On 05/03/2014 11:01 AM, Heshsham Abdul Basit wrote:
> Hi,
> 
> To build u-boot-spl I had to put ps7_init.c and ps7_init.h in
> /board/xilinx/zynq.
> Then when I compile I get boot.bin in the TOPDIR.
> 
> The functions defined in ps7_init.* are called in spl.c.
> 
> For debug purpose I wanted put some xil-printf statements in my
> ps7_init files. But it does not work, says ;
> 
> undefined reference to xil_printf
> 
> I included xil-printf.h in the ps7_init.c file, now it is unable to
> locate this file.
> I can find this file somewhere else and copy paset here, but I think
> then it would complain about other missing files and parameters.
> 
> So how do I use printf statements in ps7_init.c file  correctly.
> such as this:
> 
> // Get the PS_VERSION on run time
>   unsigned long si_ver = ps7GetSiliconVersion ();
> xil_printf ("\n ps7 Silicon Version : %d.0", si_ver);
> 
> 
> 
> If xil_printf is not valid here, then is there any other method to
> display messages such as  prointing si_ver wrt above snippet?

You should use just printf or puts which are standard u-boot method
how to print something on console.
I have never debug that but you have to ensure that you can use console
at that time.
I would say that MIO setting for console has to be done.
Or you have second option which I haven't tried which is to use DCC port
where I believe you don't need to setup any MIO pin.

Thanks,
Michal


---
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140506/3bec1567/attachment.pgp>

      reply	other threads:[~2014-05-06 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03  9:01 [U-Boot] xil_printf in ps7_init.c for u-boot-spl (zynq) Heshsham Abdul Basit
2014-05-06 14:28 ` Michal Simek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5368F1A0.8050505@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox