eLua Simulator

classic Classic list List threaded Threaded
5 messages Options
Marcelo Politzer Marcelo Politzer
Reply | Threaded
Open this post in threaded view
|

eLua Simulator

Hello eLuers,

I've recently found out that qemu is able to simulate the lm3s6965evb which is compatible with eLua ( did any one knew? good news huh? :) ).
But i've got into a little problem, After removing some examples from SConstruct ( wasn't fitting when building codesourcery ). I've tried running
qemu like this:

`qemu-system-arm -M lm3s6965evb -kernel elua_lua_lm3s6965.bin'

qemu: hardware error: ssys_read: Bad offset 0x70

CPU #0:
R00=01c00380 R01=400fe060 R02=400fe070 R03=078e3ac0
R04=01c00380 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=2000ffb0 R14=00004101 R15=00004402
PSR=20000173 --C- T svc32
Aborted

Any one have ever tried this? Does it work? Does it worth trying?

Best,
Marcelo.

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: eLua Simulator

On Mon, Nov 8, 2010 at 3:48 PM, Marcelo Politzer <[hidden email]> wrote:
> Hello eLuers,
> I've recently found out that qemu is able to simulate the lm3s6965evb which
> is compatible with eLua ( did any one knew? good news huh? :) ).

Never tried it, I actually didn't know that qemu emulates something
else than x86. Good to know :)

> But i've got into a little problem, After removing some examples from
> SConstruct ( wasn't fitting when building codesourcery ). I've tried running
> qemu like this:
> `qemu-system-arm -M lm3s6965evb -kernel elua_lua_lm3s6965.bin'
> qemu: hardware error: ssys_read: Bad offset 0x70
> CPU #0:
> R00=01c00380 R01=400fe060 R02=400fe070 R03=078e3ac0
> R04=01c00380 R05=00000000 R06=00000000 R07=00000000
> R08=00000000 R09=00000000 R10=00000000 R11=00000000
> R12=00000000 R13=2000ffb0 R14=00004101 R15=00004402
> PSR=20000173 --C- T svc32
> Aborted
> Any one have ever tried this? Does it work? Does it worth trying?

Did you try disassembling the elf file (arm-none-eabi-objdump -d
elua_lua_lm3s6965.elf) and see where the actualy error is (PC equals
0x4402, as shown above, so it can easily identify the error location).
I have a feeling that while qemu might emulate the CPU just fine, it
most likely have issues with peripheral emulation. This is just of the
many possible causes of error I guess.

Best,
Bogdan
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: eLua Simulator

I remember looking at this at some time in the past since CodeSourcery
(which maintains the ARM GCC port) uses qemu for some of its automated
testing suites.  I never got to the stage where I had working
configuration though.  I would be interested in any details you have
on how you did your build and command line options if you get this to
a working state.

Note:  the emulator, I believe, emulates _some_ of the peripheral
features of the device, but might not emulate all.  You may be
encountering issues due to eLua trying to init some of these
facilities on startup.  As Bogdan points out however looking at the
program counter and a dump might be the most useful way to figure out
where it has failed.

On Mon, Nov 8, 2010 at 8:03 AM, Bogdan Marinescu
<[hidden email]> wrote:

> On Mon, Nov 8, 2010 at 3:48 PM, Marcelo Politzer <[hidden email]> wrote:
>> Hello eLuers,
>> I've recently found out that qemu is able to simulate the lm3s6965evb which
>> is compatible with eLua ( did any one knew? good news huh? :) ).
>
> Never tried it, I actually didn't know that qemu emulates something
> else than x86. Good to know :)
>
>> But i've got into a little problem, After removing some examples from
>> SConstruct ( wasn't fitting when building codesourcery ). I've tried running
>> qemu like this:
>> `qemu-system-arm -M lm3s6965evb -kernel elua_lua_lm3s6965.bin'
>> qemu: hardware error: ssys_read: Bad offset 0x70
>> CPU #0:
>> R00=01c00380 R01=400fe060 R02=400fe070 R03=078e3ac0
>> R04=01c00380 R05=00000000 R06=00000000 R07=00000000
>> R08=00000000 R09=00000000 R10=00000000 R11=00000000
>> R12=00000000 R13=2000ffb0 R14=00004101 R15=00004402
>> PSR=20000173 --C- T svc32
>> Aborted
>> Any one have ever tried this? Does it work? Does it worth trying?
>
> Did you try disassembling the elf file (arm-none-eabi-objdump -d
> elua_lua_lm3s6965.elf) and see where the actualy error is (PC equals
> 0x4402, as shown above, so it can easily identify the error location).
> I have a feeling that while qemu might emulate the CPU just fine, it
> most likely have issues with peripheral emulation. This is just of the
> many possible causes of error I guess.
>
> Best,
> Bogdan
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Marcelo Politzer Marcelo Politzer
Reply | Threaded
Open this post in threaded view
|

Re: eLua Simulator


2010/11/9 James Snyder <[hidden email]>
I remember looking at this at some time in the past since CodeSourcery
(which maintains the ARM GCC port) uses qemu for some of its automated
testing suites.  I never got to the stage where I had working
configuration though.  I would be interested in any details you have
on how you did your build and command line options if you get this to
a working state.

Note:  the emulator, I believe, emulates _some_ of the peripheral
features of the device, but might not emulate all.  You may be
encountering issues due to eLua trying to init some of these
facilities on startup.  As Bogdan points out however looking at the
program counter and a dump might be the most useful way to figure out
where it has failed.

On Mon, Nov 8, 2010 at 8:03 AM, Bogdan Marinescu
<[hidden email]> wrote:
> On Mon, Nov 8, 2010 at 3:48 PM, Marcelo Politzer <[hidden email]> wrote:
>> Hello eLuers,
>> I've recently found out that qemu is able to simulate the lm3s6965evb which
>> is compatible with eLua ( did any one knew? good news huh? :) ).
>
> Never tried it, I actually didn't know that qemu emulates something
> else than x86. Good to know :)
>
>> But i've got into a little problem, After removing some examples from
>> SConstruct ( wasn't fitting when building codesourcery ). I've tried running
>> qemu like this:
>> `qemu-system-arm -M lm3s6965evb -kernel elua_lua_lm3s6965.bin'
>> qemu: hardware error: ssys_read: Bad offset 0x70
>> CPU #0:
>> R00=01c00380 R01=400fe060 R02=400fe070 R03=078e3ac0
>> R04=01c00380 R05=00000000 R06=00000000 R07=00000000
>> R08=00000000 R09=00000000 R10=00000000 R11=00000000
>> R12=00000000 R13=2000ffb0 R14=00004101 R15=00004402
>> PSR=20000173 --C- T svc32
>> Aborted
>> Any one have ever tried this? Does it work? Does it worth trying?
>
> Did you try disassembling the elf file (arm-none-eabi-objdump -d
> elua_lua_lm3s6965.elf) and see where the actualy error is (PC equals
> 0x4402, as shown above, so it can easily identify the error location).
> I have a feeling that while qemu might emulate the CPU just fine, it
> most likely have issues with peripheral emulation. This is just of the
> many possible causes of error I guess.
>
> Best,
> Bogdan
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
 
I've folowed this tutorial and got a hello world on my "screen".

I won't be able to work on this until next week because of the end of period at my university.

Best,
Marcelo


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Marcelo Politzer Marcelo Politzer
Reply | Threaded
Open this post in threaded view
|

Re: eLua Simulator



2010/11/10 Marcelo Politzer <[hidden email]>

2010/11/9 James Snyder <[hidden email]>

I remember looking at this at some time in the past since CodeSourcery
(which maintains the ARM GCC port) uses qemu for some of its automated
testing suites.  I never got to the stage where I had working
configuration though.  I would be interested in any details you have
on how you did your build and command line options if you get this to
a working state.

Note:  the emulator, I believe, emulates _some_ of the peripheral
features of the device, but might not emulate all.  You may be
encountering issues due to eLua trying to init some of these
facilities on startup.  As Bogdan points out however looking at the
program counter and a dump might be the most useful way to figure out
where it has failed.

On Mon, Nov 8, 2010 at 8:03 AM, Bogdan Marinescu
<[hidden email]> wrote:
> On Mon, Nov 8, 2010 at 3:48 PM, Marcelo Politzer <[hidden email]> wrote:
>> Hello eLuers,
>> I've recently found out that qemu is able to simulate the lm3s6965evb which
>> is compatible with eLua ( did any one knew? good news huh? :) ).
>
> Never tried it, I actually didn't know that qemu emulates something
> else than x86. Good to know :)
>
>> But i've got into a little problem, After removing some examples from
>> SConstruct ( wasn't fitting when building codesourcery ). I've tried running
>> qemu like this:
>> `qemu-system-arm -M lm3s6965evb -kernel elua_lua_lm3s6965.bin'
>> qemu: hardware error: ssys_read: Bad offset 0x70
>> CPU #0:
>> R00=01c00380 R01=400fe060 R02=400fe070 R03=078e3ac0
>> R04=01c00380 R05=00000000 R06=00000000 R07=00000000
>> R08=00000000 R09=00000000 R10=00000000 R11=00000000
>> R12=00000000 R13=2000ffb0 R14=00004101 R15=00004402
>> PSR=20000173 --C- T svc32
>> Aborted
>> Any one have ever tried this? Does it work? Does it worth trying?
>
> Did you try disassembling the elf file (arm-none-eabi-objdump -d
> elua_lua_lm3s6965.elf) and see where the actualy error is (PC equals
> 0x4402, as shown above, so it can easily identify the error location).
> I have a feeling that while qemu might emulate the CPU just fine, it
> most likely have issues with peripheral emulation. This is just of the
> many possible causes of error I guess.
>
> Best,
> Bogdan
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
 
I've folowed this tutorial and got a hello world on my "screen".

I won't be able to work on this until next week because of the end of period at my university.

Best,
Marcelo

I gave the wrong link, this is the one about qemu


Best,
Marcelo

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev