Rtems for a space project
Massimo Tipaldi
mtipaldi at cgspace.it
Wed Jan 14 08:44:39 UTC 2009
I think we are on the right track.
The makefile in the Rtems examples 4.9.1 includes a Makefile.inc located
in the tree (/d/opt/src/rtems/i386/i386-rtems4.9/c/pc386/make).
To compile my hello.exe from the exeamples 4.9.1, I was obliged to
modify a little bit the Makefile.inc:
CC_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-gcc --pipe
-I/d/opt/src/rtems/i386/i386-rtems4.9/pc386/lib/include
CXX_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-g++
AS_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-as
AR_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-ar
NM_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-nm
LD_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-ld
SIZE_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-size
OBJCOPY_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-rtems4.9-objcopy
I suppose that we have to modify further the CC_FOR_TARGET definition to
provide the BSP arguments.
Let me know how to do and I'll try immediately your suggetions.
Massimo
Joel Sherrill ha scritto:
> Massimo Tipaldi wrote:
>> With the qemu-0.9.1-windows, the GRUB does not start.
>> On the DOS shell I have:
>> qemu: could not open disk image d:optrtems-4.9rtems-boot.img
>>
> This looks like the directory path argument is
> not specified in a way qemu likes. Very likely it is
> some confusion or / versus \ and maybe needing \\ or
> something.
>> The floppy image rtems-boot.img has been downloaded from the RTEMS wiki.
>> With the 0.9.0, I do not have any problem and GRUB starts.
>>
>>
>> I send you the hello.exe correctly managed by the 0.9.0 and the one
>> that has the issue "no multiboot header found".
>>
>>
> OK I duplicated that.
>
> The "not ok" is indeed ELF BUT it was NOT linked
> using the right arguments for an RTEMS executable.
> I suspect you did this:
>
> i386-rtems4.9-gcc -o hello.exe hello.c
>
> That doesn't work. You have to provide the BSP specific
> arguments. The external Makefiles in RTEMS may not be
> ideal but they get that right.
>
> I can tell the above because you didn't end up with proper
> link addresses, crt0, and have dummies for a number of
> routines. Compare output of i386-rtems-nm -g -n on the
> two executables. It is clearly different.
>
> Compare how you did this versus how the hello sample is
> compiled and linked inside the tree.
>
> I am leaving soon for the day so won't be able to
> offer anything else today.
> --joel
>> Massimo
>>
>>
>> Joel Sherrill ha scritto:
>>
>>> Massimo Tipaldi wrote:
>>>
>>>> Joel,
>>>>
>>>> I have downloaded QEMU from http://www.h7.dion.ne.jp/~qemu-win/.
>>>>
>>>> The file is qemu-0.9.0-windows.zip.
>>>>
>>>> Window version of QEMU: 0.9.0
>>>> GNU GRUB version 1.94
>>>>
>>>>
>>> I found that he has a new site with 0.9.1. He also
>>> states that there was a version of 0.9.0 with a virus
>>> attached. Because of this I am not installing 0.9.0
>>> on my PC.
>>>
>>> Try this page for 0.9.1.
>>>
>>> http://homepage3.nifty.com/takeda-toshiya/qemu/
>>>
>>> I used a ticker.exe (not ticker.ralf) and it booted fine with
>>> the floppy image I used on linux.
>>>
>>> ticker.ralf is a netboot image and apparently grub doesn't
>>> like it.
>>>
>>> I am going to be off this afternoon but if you can't get it to
>>> run, email me your ticker.exe (compressed) and I will
>>> try it locally.
>>>
>>>
>>> --joel
>>>
>>>> Massimo
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Joel Sherrill ha scritto:
>>>>
>>>>
>>>>> Massimo Tipaldi wrote:
>>>>>
>>>>>> OK, I experienced myself that the Rtems makefiles are not correct
>>>>>> ...but I should solve my issue, if it is possible.
>>>>>>
>>>>> I have been unable to duplicate any problem you have reported.
>>>>> I don't know what is going wrong with your install.
>>>>>
>>>>>> In any case, I'd like to know if:
>>>>>> 1) someone has considering compiling an easy RTEMS application on
>>>>>> Windows PC for i386(and not on a Linux PC, where I konw that it
>>>>>> works)
>>>>>>
>>>>> It works on Windows but the main developers use Windows
>>>>> as little as possible. The Eclipse plugin work was initially
>>>>> done on Windows.
>>>>>
>>>>>
>>>>>> 2) how this application can be make compliant with Grub (Elf
>>>>>> file/multiboot specification).
>>>>>>
>>>>>>
>>>>> You have at least 4 variables. I suspect your qemu/grub
>>>>> setup. Can you tell me where you got your Windows version
>>>>> of Qemu and what version it is. The one I see is not that latest
>>>>> version and that by itself is enough to cause issues.
>>>>>
>>>>> With that, I will run the executable and grub setup I have
>>>>> on Linux on Windows so we can be sure that a known good
>>>>> RTEMS executable can even run on the version of qemu
>>>>> you have.
>>>>>
>>>>> I do LOTS of testing on qemu/rtems/grub/linux. This is
>>>>> how the i386-rtems tool test results are generated. That is
>>>>> ~80K tests in batch mode. There are many Windows users.
>>>>>
>>>>> So we need to reduce variables. First order is to split it
>>>>> between rtems/tools and qemu.
>>>>>
>>>>>> I insist on these points:
>>>>>> 1) the Grub set-up is correct and the source of this
>>>>>> failure is somewhere else (the hello.exe in testsuites/samples works)
>>>>>> 2) I have followed all the Rtems wiki instructions to install the
>>>>>> toolchains, rtems and so on; the packages have been downloaded
>>>>>> following the links shown on Rtems wiki.
>>>>>>
>>>>>> Can I hope to solve this issue? Is Rtems today mature for Windows?
>>>>>>
>>>>>>
>>>>>> Massimo
>>>>>>
>>>>>>
>>>>>>
>>>>>> rtwas ha scritto:
>>>>>>
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Ralf Corsepius wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Makefile.inc is a different class of problem.
>>>>>>>>
>>>>>>>> My personal answer to all Makefile.inc related problems: I
>>>>>>>> refuse to
>>>>>>>> answer any Makefile.inc related issues, because I consider RTEMS
>>>>>>>> Makefile-template system to be mal-designed kid-stuff, RTEMS
>>>>>>>> should
>>>>>>>> have stopped dropped a long time ago ;)
>>>>>>>>
>>>>>>> ;)
>>>>>>>
>>>>>>> I was never comfortable with having the make-system *hidden* from
>>>>>>> me. I made
>>>>>>> an attempt to be a *good boy* and use it but couldn't get it to
>>>>>>> work for my particular
>>>>>>> build so I ended up reverse engineering it (Makefile templates
>>>>>>> etc.) and writing my
>>>>>>> own (Makefile system) from scratch.
>>>>>>>
>>>>>>> Robert W.
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> rtems-users mailing list
>>>>>>> rtems-users at rtems.com
>>>>>>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>>
>
>
--
Eng. Massimo Tipaldi
Technical Directorate
SW Principal Engineer
Carlo Gavazzi Space SpA
Via Tiengo, snc - 82100 Benevento BN - Italy
Tel: + 39 0824481733
Fax: +39 0824481730
e-mail: mtipaldi at cgspace.it
www.cgspace.it
<< Le informazioni contenute in questo messaggio di posta elettronica
e relativi allegati sono riservate e confidenziali e ne e vietata
la diffusione in qualunque modo eseguita. Qualora Lei non fosse la
persona a cui il presente messaggio e destinato, La invitiamo ad
eliminarlo e a darcene gentile comunicazione.Quanto precede ai fini del
rispetto delle Legge 675/96 e del Decreto Legislativo 30/06/2003 n.196,
sulla tutela dei dati personali >>
<< This e-mail is confidential and may well also be legally privileged.
If you have received it in error, you are on notice of its status.
Please notify us immediately by reply e-mail and then delete this
message from your system. Please do not copy it or use it for any
purposes, or disclose its contents to any other person: to do so could
be a breach of confidence. Thank you for your co-operation. Please
contact our IT Helpdesk on +3902380481 or email
ml_servizi.informatici at cgspace.it if you need assistance>>
More information about the users
mailing list