simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Help with New Example


From: Joel Sherrill
Subject: Re: [Simulavr-devel] Help with New Example
Date: Sat, 28 Mar 2009 17:26:27 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Knut Schwichtenberg wrote:
Joel Sherrill wrote:
Knut Schwichtenberg wrote:
Joel,

I tried your example and currently I don't understand your example. And
therefore please explain the details.
Using 0x20 / 0x21 means PINF and PINE as IO - you can't use these
addresses on a
M128 without a look to the HW-manual.

I was trying to copy the stdiodemo to get the UART connected
to the UI port.  But still use a "magic" port to write debug output.
I guess I need to switch the magic port to a reserved address.
The real app (see below) uses two serial ports.

My AVR ignorance is showing. Sorry.
:-)
Also "-d" is not interpreted as expected :-((. The X-Windows catches the
command-line and removes "-d" as displaynumber. "-D" works if changed.

-d to what program? I thought simulavr.tcl was handling it ok.
Sorry, it was simulavr.tcl. "simulavr.tcl" can't handle "-d" because it is
removed before "simulavr.tcl" can catch it. Try it on a dual screen machine with
 simulavr.tcl -d :0.1 / -d :0.0.
simulavr.tcl should be using tclsh not wish.  tclsh shouldn't
be doing that I would think.
What is the difference between your example and the stdio-example? The
main
difference I see is the use of the debug channels. And they do not
work as
expected :-)).

Right now, not much.  When finished it will show how to write
a program which provides feedback to the program running on the
simulated AVR.  In my case, the UART really connects to a PC and
there is a custom serial protocol.  I will be writing code which talks
that custom protocol to exercise and debug the AVR program.
Okay, PC communication and a debug output. Tomorrow I hope I can do some 
testing.
I want to add similar support for the analogs and eventually
a part of 8 channel ADC modules on the SPI.  All would be drive
by this test framework.  But baby steps.
I want to configure simulavr to match the user's board and then
drive all inputs in a way that pushes their application.
Overall I think it might be good to have a schematic for each example to
simplify the connecting the Nets.
I was beginning to realize that.  I also have a set of questions
like "what are you doing with X?" for them.  I was brought on
to help with the testing and had nothing to do (for once) with
the application design/development.
Please explain by writing your design goals.

The design goal is to use the UI interface to not have a GUI
but to interact with the AVR program.  Having a GUI to interact
with is nice but I am trying to figure out the basics of how to
interact via the "ui port" so I can build a test facility that is
aware of the application running and drives it.  It will eventually
be scripted and allow regression testing of the application.
Are you aware that the DEBUG_*_PORT are available in simulavrxx and not at the
real HW?
Yes.  I was just using this to have some IO for the test
that didn't get in the way of using the real devices.
I want to develop as much as possible of this in a generic
reusable fashion so other users benefit.  No one wants code
for our custom application but I hope the framework will be useful.

Does that make more sense?
Yes indeed.
I am really hoping this works out to be a great contribution.

--joel
--joel
Knut

Joel Sherrill schrieb:
Hi,

My ultimate goal is to be able to test
an application running on simulavr.  I
want to pretend to be the devices it is
attached to and exercise the application
as on real hardware.  In this light, I have
added "examples/feedback".
The goal will be to demonstrate that you
can programmatically interact with the UARTS,
analogs and discrete IO.

But at this point I don't seem to be able to
get the UART data I am transmitting to show up
in the "simfeedback.tcl" program.  It is getting
events but the data is printed as 0.  I am sure
it is my ignorance of the Net connection scheme.

Some help and advice would definitely be appreciated.
All code is in CVS.

Thanks.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]