librelist archives

« back to archive

Simulator for testing

Simulator for testing

From:
Drasko Draskovic
Date:
2010-06-20 @ 22:52
Hi all,
I am interesting in inspecting and learning how the Atomthreads work,
so I was wondering if there is some Linux based AVR architecture
simulator, like qemu or similar, in which this kernel can be run and
debugged.

Best regards,
Drasko

Re: [atomthreads] Simulator for testing

From:
Kelvin Lawson
Date:
2010-06-20 @ 23:11
Hi Drasko,

Only last week an Atomthreads user contributed a simulator for the Windows
environment, that runs Atomthreads threads within a single Windows thread.
He has dubbed this "Atomvm" and it is a separate port within the ports tree.
I only just received this and have not had time to try it out or push it to
Github yet, but I could send you the contributed ZIP separately if you are
interested.

I realise you mention Linux-based, but you could do this within a Windows
VM. I'm not sure how well Visual C++ Express runs within Wine.

Other than this, I did have a look at a couple of the AVR simulators a few
months ago. Simavr looked the most promising but I did not get as far as
creating the necessary infrastructure to bring up Atomthreads with a UART
for testing.

In time I would like to create a Linux equivalent of the Atomvm, but I'll
likely be personally concentrating on some of the other architecture ports
first. Perhaps it would be fairly simple to create a Linux one using the
contributed Windows version as example.

Let me know if you'd like to see the Atomvm contribution.

Best regards,
Kelvin.


On 20 June 2010 23:52, Drasko DRASKOVIC <drasko.draskovic@gmail.com> wrote:

> Hi all,
> I am interesting in inspecting and learning how the Atomthreads work,
> so I was wondering if there is some Linux based AVR architecture
> simulator, like qemu or similar, in which this kernel can be run and
> debugged.
>
> Best regards,
> Drasko
>

Re: [atomthreads] Simulator for testing

From:
Drasko Draskovic
Date:
2010-06-21 @ 08:58
On Mon, Jun 21, 2010 at 1:11 AM, Kelvin Lawson <info@atomthreads.com> wrote:
> Hi Drasko,
> Only last week an Atomthreads user contributed a simulator for the Windows
> environment, that runs Atomthreads threads within a single Windows thread.
> He has dubbed this "Atomvm" and it is a separate port within the ports tree.
> I only just received this and have not had time to try it out or push it to
> Github yet, but I could send you the contributed ZIP separately if you are
> interested.
Do you really need an Atomthreads dedicated simulator ? What would be
benefit of OS dedicated simulator ?
I think that it would be safer to use well tested simulator soulutions
(for example qemu can be used for many ARM achitectures, and SkyEye
for ARM7TDMI).

> I realise you mention Linux-based, but you could do this within a Windows
> VM. I'm not sure how well Visual C++ Express runs within Wine.
I never had a luck with Wine :(. Configuring and porting would take
too much time...

> Other than this, I did have a look at a couple of the AVR simulators a few
> months ago. Simavr looked the most promising but I did not get as far as
> creating the necessary infrastructure to bring up Atomthreads with a UART
> for testing.

I took a look at Simavr site - seems promising. I will try to
configure this one.
It seems to have all that I need. As I understand, your AVR port is
for ATmega128 ?
Simavr has support for this SoC and  gdb support to look what is happening...

> In time I would like to create a Linux equivalent of the Atomvm, but I'll
> likely be personally concentrating on some of the other architecture ports
> first. Perhaps it would be fairly simple to create a Linux one using the
> contributed Windows version as example.
> Let me know if you'd like to see the Atomvm contribution.
Problem is that I am not AVR expert. I prefer ARM architecture which I
know better,
and I am afraid that it would demand AVR specifics learning. I just
requested simulator in order to be able to quickly run
Atomthreads and have try so I can get idea how it works exactly. For
the moment I'd like to concentrate on ARM7 port
of Atomthreads, and I guess in the meantime you'll have Atomvm under
git already. Then, if we find it useful, I could work on it's Linux
port.

Thanks for the support and kind regards,
Drasko

Re: [atomthreads] Simulator for testing

From:
Kelvin Lawson
Date:
2010-06-21 @ 18:09
Hi Drasko,


> Do you really need an Atomthreads dedicated simulator ? What would be
> benefit of OS dedicated simulator ?
> I think that it would be safer to use well tested simulator soulutions
> (for example qemu can be used for many ARM achitectures, and SkyEye
> for ARM7TDMI).
>

It will be very useful in the future to have architecture-specific
simulators like qemu and simavr up and running, but in the meantime a local
simulator might be useful for testing generic application code, as well as
testing and debugging core kernel modules. It will always be necessary to
run the test suite on each architecture port, but this will make it very
easy to automate the running of the automated tests where generic (non-port)
code is concerned.

I took a look at Simavr site - seems promising. I will try to
> configure this one.
> It seems to have all that I need. As I understand, your AVR port is
> for ATmega128 ?
> Simavr has support for this SoC and  gdb support to look what is
> happening...
>

It should be possible to run it on most ATmega devices. I have personally
run it on ATmega16 and ATmega32, and others have reported success on
ATmega168, ATmega2560/1 and others.

Best regards,
Kelvin.