public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Guillaume Menant" <g.menant@ayrtontechnology.com>
To: <ecos-discuss@sources.redhat.com>
Subject: [ECOS] Using RedBoot_cmd
Date: Tue, 16 Jan 2007 08:40:00 -0000	[thread overview]
Message-ID: <003b01c73949$e6754770$7001a8c0@be.local> (raw)

Hi,

I'm trying to add a command to RedBoot with inserting the following code in
a file names pci.c placed in the src of redboot package:

-----------------------------------------
#include <redboot.h>

void
do_pcitest(int argc, char *argv[]);

RedBoot_cmd("pcitest", 
            "Tests PCI block",
            "",
            do_pcitest
    );

void
do_pcitest(int argc, char *argv[])
{
}
-----------------------------------------

But I'm facing to this when I'm trying to compile:

-----------------------------------------
sparc-rtems-gcc -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static
-L/ecos-f/TEMP/untitled_install/lib -Ttarget.ld -o
/ecos-f/TEMP/untitled_install/bin/redboot.elf
/ecos-f/TEMP/untitled_install/lib/version.o
make[1]: Leaving directory `/ecos-f/TEMP/untitled_build/redboot/v2_0'
/ecos-f/TEMP/untitled_install/lib/extras.o(.ecos.table.RedBoot_commands.data
.do_pcitest+0xc): undefined reference to `do_pcitest'
make: Leaving directory `/ecos-f/TEMP/untitled_build'
collect2: ld returned 1 exit status
make[1]: *** [/ecos-f/TEMP/untitled_install/bin/redboot.elf] Error 1
make: *** [build] Error 2
-----------------------------------------

Why my do_pcitest function is undefined?

Thanks for your time.

Guillaume MENANT


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

             reply	other threads:[~2007-01-16  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16  8:40 Guillaume Menant [this message]
2007-01-16 11:43 ` Andrew Lunn
2007-01-16 13:33 ` Gary Thomas
2007-01-16 13:39   ` [ECOS] RE : " Guillaume Menant

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='003b01c73949$e6754770$7001a8c0@be.local' \
    --to=g.menant@ayrtontechnology.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).