Virtualbox RTEMS Setup

Steven Grunza sgrunza at ctdi.com
Thu Jul 19 22:03:54 UTC 2012


The patches I used are in rtems/c/src/lib/libbsp/arm/lm3s69xx/*.patch

 

Make sure you're not using an ELF file.  My understanding is that the
qemu-system-arm requires a binary image of the code to be run, not a
file requiring re-location.

 

Running the hello example gave me the following:

 

grunzasr at stm32dbg% qemu-system-arm  -nographic -M lm3s6965evb -kernel
hello.ralf

 

 

*** HELLO WORLD TEST ***

Hello World

*** END OF HELLO WORLD TEST ***

qemu: hardware error: gic_dist_writeb: Bad offset 4f0

 

 

The hardware error is caused by the BSP not having "a proper board
reset".

 

The build created the following files:

grunzasr at stm32dbg% ls -l

total 2888

-rwxrwxr-x 1 grunzasr grunzasr   79032 May  8 16:36 hello.bin*

-rwxrwxr-x 1 grunzasr grunzasr 2711472 May  8 16:35 hello.exe*

-rw-rw-r-- 1 grunzasr grunzasr   28045 May  8 16:35 hello.num

-rwxrwxr-x 1 grunzasr grunzasr   79032 May  8 16:35 hello.ralf*

-rw-rw-r-- 1 grunzasr grunzasr   37040 May  8 16:35 test.o

grunzasr at stm32dbg% file hello.exe

hello.exe: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically
linked, not stripped grunzasr at stm32dbg% file hello.ralf

hello.ralf: data

 

 

I'm not sure what the .ralf extension is supposed to mean but if you
watch the build you'll see that the .ralf file is the result of running
arm-*-objcopy on the .exe (ELF) file with the binary output option;
therefore, the .ralf file is a binary file.

 

Steven G

 

 

 

From: rtems-users-bounces at rtems.org
[mailto:rtems-users-bounces at rtems.org] On Behalf Of Aric Hunter
Sent: Thursday, July 19, 2012 5:36 PM
To: rtems-users at rtems.org
Subject: Re: Virtualbox RTEMS Setup

 

I installed qemu-system-arm and attempted to test the lm3s6965 with a
test file in the pc386 testsuite and got this error.


lm3s6965 -v -i hello.exe
Default program to run is
Using qemu-system-arm
qemu-system-arm is /usr/local/bin/qemu-system-arm
TESTS TO RUN: hello.exe
INTERACTIVE runtest hello.exe single 0
qemu-system-arm -nographic -M lm3s6965evb -kernel hello.exe
qemu: fatal: Bad mode 1c

R00=00000000 R01=0000007f R02=00000000 R03=00000000
R04=00890089 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=464c457f R14=00000000 R15=00010118
PSR=00000173 ---- T svc32
Aborted (core dumped)

what patches are you talking about for lm3s6965?
I see some binpatch files, but not much else.

 

	 

	On Thu, Jul 19, 2012 at 10:28 AM, Gedare Bloom
<gedare at rtems.org> wrote:

	On Thu, Jul 19, 2012 at 1:12 PM, Joel Sherrill
	<joel.sherrill at oarcorp.com> wrote:
	> On 07/19/2012 12:05 PM, Aric Hunter wrote:
	>
	> Fantastic!!!
	> I looked into /home/rtems/qemu/install/bin and saw the
qemu-system-i386 file
	> that you mentioned, and after the update everything with the
i386/pc386
	> works just fine.
	>
	> If you have time:
	> How do I get qemu-system-arm?
	> Is it as simple as another git update?
	>
	> On that virtualbox image, the qemu was pulled from their git
	> and built. You just need to do their build and let it build
everything.
	> I restricted it to i386 for size.
	>

	IIRC for lm3sxx there are some patches for qemu in the bsp
directory..
	not sure if they are still necessary.

	
	> Thanks oodles,
	> Aric Hunter
	>
	> On Thu, Jul 19, 2012 at 9:27 AM, Joel Sherrill
<joel.sherrill at oarcorp.com>
	> wrote:
	>>
	>> On 07/19/2012 11:25 AM, Aric Hunter wrote:
	>>
	>> I tried solution 1) already
(PATH=$PATH:/home/rtems/qemu/install/bin)
	>> I haven't tried solution 2.
	>> So, for solution 2, somewhere in the pc386 script it attempts
to run qemu
	>> but it should be qemu-system-i386?
	>>
	>> Yep.
	>>
	>> You could update the rtems-testing git module and type make
:)
	>>
	>> ls /home/rtems/qemu/install/bin and see what's there
	>>
	>> I will look for that.
	>>
	>> Thanks for the amazingly quick replies,
	>> Aric Hunter
	>>
	>> On Thu, Jul 19, 2012 at 9:10 AM, Joel Sherrill
<joel.sherrill at oarcorp.com>
	>> wrote:
	>>>
	>>> Hi
	>>>
	>>> I know this has been answered before but I don't recall
which
	>>> answer it is:
	>>>
	>>> (1) qemu is not in your PATH. The qemu installation was
	>>>      left out of setting the PATH in the setenv script
	>>> (2) It is really called qemu-system-i386 and the script
	>>>      needs to use the correct name. qemu renamed this.
	>>>
	>>> -joel
	>>>
	>>>
	>>> On 07/19/2012 11:02 AM, Aric Hunter wrote:
	>>>>
	>>>> Hello,
	>>>>
	>>>> I am attempting to get the RTEMS development station setup
on the Centos
	>>>> virtualbox.
	>>>> I was following the instructions on the wiki:
	>>>>
	>>>>
http://www.rtems.com/wiki/index.php/Virtual_Machines_for_RTEMS_Developme
nt
	>>>>
	>>>> I got to the section for testing the i386/pc386 without any
problems,
	>>>> but then I tried to do tho the following command:
	>>>>         pc386 -i
	>>>>
./rtems-4.11-work/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples/hell
o/hello.exe
	>>>> and got this error:
	>>>>
/home/rtems/rtems-4.11-work/rtems-testing/bin/pc386: line 298:
	>>>> type: qemu: not found
	>>>>         FAILED:  Path appears to be broken (cannot find
qemu)
	>>>>
	>>>> Any ideas as to what I am missing/doing incorrectly?
	>>>>
	>>>> My ultimate goal is to run lm3s6965 instead of pc386, but I
get the same
	>>>> error with either.
	>>>>
	>>>> Thanks,
	>>>> Aric Hunter
	>>>
	>>>
	>>>
	>>> --
	>>> Joel Sherrill, Ph.D.             Director of Research&
Development
	>>> joel.sherrill at OARcorp.com        On-Line Applications
Research
	>>> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
	>>>     Support Available             (256) 722-9985
<tel:%28256%29%20722-9985> 
	>>>
	>>>
	>>
	>>
	>>
	>> --
	>> Joel Sherrill, Ph.D.             Director of Research&
Development
	>> joel.sherrill at OARcorp.com        On-Line Applications
Research
	>> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
	>>     Support Available             (256) 722-9985
<tel:%28256%29%20722-9985> 
	>>
	>
	>
	>
	> --
	> Joel Sherrill, Ph.D.             Director of Research&
Development
	> joel.sherrill at OARcorp.com        On-Line Applications Research
	> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
	>     Support Available             (256) 722-9985
<tel:%28256%29%20722-9985> 
	>
	>

	> _______________________________________________
	> rtems-users mailing list
	> rtems-users at rtems.org
	> http://www.rtems.org/mailman/listinfo/rtems-users
	>

	 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120719/d320fd00/attachment-0001.html>


More information about the users mailing list