Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #30042 > unrolled thread

Simulator for embedded systems

Started bypozz <pozzugno@gmail.com>
First post2020-11-04 09:47 +0100
Last post2020-11-11 06:02 -0800
Articles 6 — 5 participants

Back to article view | Back to comp.arch.embedded


Contents

  Simulator for embedded systems pozz <pozzugno@gmail.com> - 2020-11-04 09:47 +0100
    Re: Simulator for embedded systems Paul Rubin <no.email@nospam.invalid> - 2020-11-04 01:57 -0800
      Re: Simulator for embedded systems pozz <pozzugno@gmail.com> - 2020-11-05 07:17 +0100
        Re: Simulator for embedded systems Dave Nadler <drn@nadler.com> - 2020-11-05 15:15 -0800
    Re: Simulator for embedded systems Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2020-11-04 20:52 +0100
    Re: Simulator for embedded systems StateMachineCOM <statemachineguru@gmail.com> - 2020-11-11 06:02 -0800

#30042 — Simulator for embedded systems

Frompozz <pozzugno@gmail.com>
Date2020-11-04 09:47 +0100
SubjectSimulator for embedded systems
Message-ID<rntpri$hhd$1@dont-email.me>
Usually I can build my projects for embedded platforms for target board 
and for mingw compiler under Windows.
Of course I simulate hw peripherals (UART, LEDs, and so on) in some way.

I usually have a debug console where I can type some commands to 
simulate something. For example, if I have analog inputs, I can type the 
command

   an1 300

to simulate the ADC result (300pt) for analog input 1.

It's not so easy and it should be good to have all the parameters in a 
graphical view. I know there are many possibilities, but I'd like to 
separate the GUI from the embedded project.

I'm thinking to create a channel between the simulator (that is written 
in C) and the GUI (that I can write in a high-level language, such as 
Python or Java).

I'm thinking to exchange a JSON string between the processes running on 
Windows. What do you suggest to do this? Should I use sockets?

Do you have better suggestions?


[toc] | [next] | [standalone]


#30043

FromPaul Rubin <no.email@nospam.invalid>
Date2020-11-04 01:57 -0800
Message-ID<87sg9pbg19.fsf@nightsong.com>
In reply to#30042
pozz <pozzugno@gmail.com> writes:
> GUI (that I can write in a high-level language, such as Python or
> Java)...  I'm thinking to exchange a JSON string between the processes
> running on Windows. What do you suggest to do this? Should I use
> sockets?

This is fine.  You can also embed a web server in the simulator, and use
a browser as your gui.

[toc] | [prev] | [next] | [standalone]


#30046

Frompozz <pozzugno@gmail.com>
Date2020-11-05 07:17 +0100
Message-ID<ro05e4$8r4$1@dont-email.me>
In reply to#30043
Il 04/11/2020 10:57, Paul Rubin ha scritto:
> pozz <pozzugno@gmail.com> writes:
>> GUI (that I can write in a high-level language, such as Python or
>> Java)...  I'm thinking to exchange a JSON string between the processes
>> running on Windows. What do you suggest to do this? Should I use
>> sockets?
> 
> This is fine.  You can also embed a web server in the simulator, and use
> a browser as your gui.
> 

Good hint. I already embedded libmicrohttpd, created an index.html (with 
some Javascript) and processed the body of a POST request that is a JSON 
file. The POST request is sent on clicking a button on the web page.

It works well and now I have a web GUI to simulate "hw inputs" for my 
simulator, without writing another application.

Next step is to recover the "hw output state" of the target board (LEDs, 
DACs, PWMs and so on) and show it on the web page.

I could add a picture of the board and link graphical elements to 
variables in the JSON.
For example, I could change the icon of a LED on the picture depending 
on a variabile in the JSON data.

Unfortunatley I'm not able to create a nice GUI, but this isn't 
important at the moment... it's only a simulator for me.

[toc] | [prev] | [next] | [standalone]


#30049

FromDave Nadler <drn@nadler.com>
Date2020-11-05 15:15 -0800
Message-ID<bc23b8a4-80b9-4649-97c0-d8e5cd1b2c50o@googlegroups.com>
In reply to#30046
Pozz - You can now get great regression testing simply:

1) record all inputs and outputs (interleaved)
2) add playback facility (for input strips outputs, captures new outputs)
3) if result of playback equals original, no outputs changed
4) add commands to display descriptive text on web page,
   and optionally pause

Hope that helps!
Best Regards, Dave

[toc] | [prev] | [next] | [standalone]


#30044

FromHans-Bernhard Bröker <HBBroeker@t-online.de>
Date2020-11-04 20:52 +0100
Message-ID<i0gf4oFfa6vU1@mid.dfncis.de>
In reply to#30042
Am 04.11.2020 um 09:47 schrieb pozz:
> I'm thinking to create a channel between the simulator (that is written 
> in C) and the GUI (that I can write in a high-level language, such as 
> Python or Java).
> 
> I'm thinking to exchange a JSON string between the processes running on 
> Windows. What do you suggest to do this? Should I use sockets?

Why do you plan on re-inventing that communication channel?  You already 
have one that appears usable: a command-line interface.  It's trivially 
easy to have the GUI generate those already existing text-based commands 
and send them to the simulation.

[toc] | [prev] | [next] | [standalone]


#30066

FromStateMachineCOM <statemachineguru@gmail.com>
Date2020-11-11 06:02 -0800
Message-ID<458a293c-6dbc-4bdc-a2a6-dbfa56d948aen@googlegroups.com>
In reply to#30042
Take a look at [QView](https://www.state-machine.com/qtools/qview.html). This is a "remote GUI" written in Python. Perhaps this gives you some ideas.

Also, speaking of "simulators" for embedded systems, you might check out [QWin](https://www.state-machine.com/qtools/qwin.html).

[toc] | [prev] | [standalone]


Back to top | Article view | comp.arch.embedded


csiph-web