Most recent activity
so Ive had my implementation of Xstate in Espruino on hold while working on getting USB Host working on Pico (both essential to my project) . But the status of Xstate in Espruino work is well beyond proof of concept and is a point of testing nested states , which are one of the most basic yet usefull extensions of statecharts over simple finite state machines.
But in parallel the Xstate world is moving on leaps and bounds.
check out Xstate when you can and imagine it working in Espruino.
will update ASAP
A little wire wrapping going on in the mean time. :)
P.s any advice always appreciated.
Quick status ... still putting in lots of hours on this. Steep learning curve for me. Achieved so far,
- building Espruino for pico on Ubuntu and getting vars for build
- building Espruino in Stmcube ide with hacked make file.
- Wired up pico with swd via a Nucleo SWD and so able to run debug via stmcube ide on Espruino interpreter, with power and active console via serial on pico, so can trace thru existing interpreter functionality eg serial.inject. (See pics attached)
- Started custom lib in Espruino Usbhost , with jswrap_usbhost
- got standalone stmcubef4 usb host library running with a simple main on discovery board. Can see init and receive data callbacks that need to be implemented in Espruino idle loop via wrapper.
- Currently copying over usbhost library components from stmcubef4 and trying to build Espruino with them included, issues are newer versions of common files down the usb stack that are shared With existing Espruino usb client stack. Trying to understand and work the overlap. Don’t want to give up on building with both host and client stacks in place.
- Initial dev target is ‘just’ disable usb client, init usbhost, and print received data to console.
- I will be seeking advice , in due course, on plumbing in usbhost cdc get data into an usbhost.on(‘data’, callback) via the wrapper functionality. Looks like serial.inject has some clues.
Thanks Gordon, CDC it is.
Initially , looks like CDC is an easier implementation and needing fewer library files.
Interested in others view , if you only had one usb class of input. HID or virtual com ?
Realised that given my requirement is to input to pico from usb barcode readers that are usually capable of output in virtual com mode, then may only need host CDC capability on the pico and not need host HID also. So will start with host CDC .
complicated ....... still early days. update in a couple of weeks.