Library for Testing?

Hi, total n00b here, found you via HackaDay.

It would be useful to have a testing library, e.g. textboxes and indicators so I could compile on my macbook and test my patches before uploading.

Initial version could just be things like simulated buttons, pots, and LEDs, later could have single clock steps, etc.

Apologies if this is a dup, thanks!

Hello and welcome!

You’re talking about something interactive, right? I.e. clicking a button on a screen within IDE instead of clicking it on a breadboard and observing data right within IDE and not on a physical LCD. If so, it would be a precious addition to XOD and we have talked about it in our team. There we see two opportunities:

  • Live sessions — a board executes code, sends values back so that IDE can visualize them, accepts values override so that we can push virtual buttons with IDE
  • Full simulation — no board required, IDE executes code with WASM technology

The latter is more powerful although much harder than former. We’ll start with live sessions implementation and will see… Maybe it would work fine for most of the cases.

1 Like

Live sessions would certainly be quite useful, particularly as a live graphical debugger.

Simulation would be just as useful IMHO, since it could be used for testing, allowing a much faster development cycle than repetitively cross-compiling and uploading to hardware.

Since it looks like the generated c++ is fairly generic, the first iteration of simulation could simply not support any hardware, except for, say, simulated UI buttons and LEDs, and maybe an analog slider or something. Simulating actual hardware wouldn’t be critical to me, since at that point it’s easier just to upload to a real board.

1 Like