GUI for Simavr

778 views
Skip to first unread message

hovercraft-google

unread,
Jul 22, 2016, 4:22:08 AM7/22/16
to simavr
Hello!

I've created a GUI for Simavr under Linux. It is implemented as plugin for the Simutron digital simulator (see there: https://sourceforge.net/projects/simutron) and it wraps up most of the Simavr functionality (except of analog parts).
One can create setup for firmware debug scenario dinamically. Just draw a circuit, put AVR part on it, add some digital sources, probes, UART-to-host-PTY link, VCD recorder and other parts. Everybody welcome to evaluate. But you have to build it from source, there is no binary distribution yet. Currently builds for QT4.8.

M P

unread,
Jul 22, 2016, 5:22:00 AM7/22/16
to simavr
Cool! Any chance of moving that to github? SF already spamming me with
full screen popups and I haven't even clicked anything ;-)

Do you have patches for simavr we could merge, or did it work out
straight out of the box?

Cheers,
M
> --
> You received this message because you are subscribed to the Google Groups
> "simavr" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to simavr+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

hovercraft-google

unread,
Jul 22, 2016, 10:41:13 AM7/22/16
to simavr
I can try to ask original simutron project author (I'm only a plugin writer) about github, but don't think it would be very easy.
Oh, yes, some patch is highly desirable  (see attachment). Without it program would crash at the debugging restart.
Also my code use alternative version of uart_pty.c and the following new functions related to VCD:

int avr_vcd_add_signal_ext(avr_vcd_t * vcd,
    avr_irq_t * signal_irq,
    int signal_bit_size,
    const char * name,
    int *signal_index /// Returns an index of our signal assigned by VCD recorder
    )
{
    int ret = avr_vcd_add_signal(vcd, signal_irq, signal_bit_size, name);
    if (ret)
        return ret;
    if (signal_index)
        *signal_index = vcd->signal_count - 1;
    return ret;
}

int avr_vcd_remove_signal(avr_vcd_t * vcd,
    avr_irq_t * signal_irq,
    int signal_index
    )
{
    if (signal_index < 0 || signal_index >= AVR_VCD_MAX_SIGNALS)
        return -1;
    avr_vcd_signal_t * s = &vcd->signal[signal_index];

    if (!s)
        return -1;
    if (signal_irq)
        avr_unconnect_irq(signal_irq, &s->irq);
    avr_irq_unregister_notify(&s->irq, _avr_vcd_notify, vcd);
    avr_free_irq(&s->irq, 1);

    return 0;
}


simavr-changes-4-simutron.patch

hovercraft-google

unread,
Sep 26, 2016, 5:44:08 AM9/26/16
to simavr
Now Simutron can be built on Windows nativelly (using mingw/msys1.0 environment)!
I've made binary release for 32-bit Windows & Linux.
As Windows don't have pseudo-terminals, separate virtual COM port driver required (com0com.sourceforge.net) to connect host terminal to emulated processor UART.

tjwan

unread,
Dec 21, 2016, 2:42:50 AM12/21/16
to simavr
looks very promising.
just tried the windows version 1.0.0 from SF. I installed the com0com driver and i have created a new com10 / com11 pair, but when dragging the avr serial connection to the atmega128 in the 3-axes-cnc-machine example i always get 'uart_pty_init: Can't create pty:: No such file or directory'
any hints ? The Windows is a current Windows 10.

I also tried to compile the linux version from trunk under ubuntu 16.04. Dependencies seem ok but I get some strange error about std c++ 2011 standard after successfull compilation of about 20 cpp files. Will try again with the 1.0.0 branch.

hovercraft-google

unread,
Dec 23, 2016, 3:00:13 PM12/23/16
to simavr
Could you please post a "strange error about std c++ 2011" you obtained on ubuntu 16.04 ?
For example do
./build-unix 2>&1 |tee build_it.log
and send me build_it.log file ?

On Windows simutron currently uses \\\\.\\CNCA0 .. \\\\.\\CNCB0 virtual port pair.
com0com installer should create it by default. Try look com0com documentation for how to set and use those ports.
When you open 3-axes_CNC_machine.simu example file, it already contains serial connection component.
Dragging avr serial connection on to the atmega128 would create another extra one.
Near to the atmega128 you should see a box with "uart0" inside - it's it. The label on top of it should show the virtual com device name, where your host program should connect. Try double click "uart0" box - this should start simple terminal program supplied.

On Linux I'd advise to download and build latest trunk sources .
For example do:
svn checkout https://svn.code.sf.net/p/simutron/code/trunk simutron-code
Note: it requires Qt5 now.
Look updated README.txt in the simutron-code dir for build instructions.
Build tested on latest Fedora Linux 25 release, x86_64

Regards,
Al

hovercraft-google

unread,
Jan 6, 2017, 4:46:20 AM1/6/17
to simavr
Simutron 1.0.1 released !
New features:
  • libsimavr v1.4 bundled which contains many bug fixes and improvements
  • added several electronic parts, e.g. popular LCD screens and rotary encoder
  • binaries for Linux 64 and 32 bit
  • wiki page now contains more information
  • teplate CodeBlocks project with full source code of Arduino menu system for easier start and reference (see examples/MENWIZ/LCD20x4Test)
Reply all
Reply to author
Forward
0 new messages