[ECOS] Re : [ECOS] Using RedBoot_cmd

ayoub zaki ayoub_zaki@yahoo.fr
Tue Jan 16 10:55:00 GMT 2007


Hi,

You need also to update the file redboot.cdl with this new command.

Cheers

----- Message d'origine ----
De : Guillaume Menant <g.menant@ayrtontechnology.com>
À : ecos-discuss@sources.redhat.com
Envoyé le : Mardi, 16 Janvier 2007, 9h39mn 50s
Objet : [ECOS] Using RedBoot_cmd

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






	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

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



More information about the Ecos-discuss mailing list