simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] ELF simulation info storage


From: Markus Hitter
Subject: [Simulavr-devel] ELF simulation info storage
Date: Tue, 19 Nov 2013 23:13:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Perhaps you've noticed already I've sent a number of patches to
implement storing simulation info right inside the ELF file, freeing the
user from remembering the right command line parameters.

The bad news: the patches sent as outdated.

The good news:

- Updates patches exist, now counting 10 commits.

- The system is extended to allow connections between UART and a file or
the console as well, using the also sent SerialRxFile and SerialTxFile.

How does it work?

Instead of wrapping simulavr with TCL, Python or whatever, you simply
add a few macros right into your AVR source code:

#include "../../src/simulavr_info.h"
SIMINFO_DEVICE("atmega644");
SIMINFO_CPUFREQUENCY(F_CPU);
SIMINFO_SERIAL_IN("D0", "-", 19200);
SIMINFO_SERIAL_OUT("D1", "-", 19200);

That's it! Now you can run the very same binary on real hardware as well
as in the simulator. If you run it in the simulator, messages will be
sent to and received right from the console. Type there, hit enter, and
your AVR code will recognize characters on its UART.

To set up something new, you simply scroll through simulavr_info.h and
pick the macros suitable. I plan to extend this to logging pin changes
into a VCD file, too.


Now the reason why I'm writing this :-) So far I received no opinion
wether this stuff is worthwhile for inclusion. Is this a good match for
SimulAVR or should I plan to instruct my users to apply a number of
patches before building simulavr?

First steps of documenting SimulAVR usage for RepRappers is done here:

http://reprap.org/wiki/SimulAVR


Markus

-- 
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.reprap-diy.com/
http://www.jump-ing.de/



reply via email to

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