To get astrid set up to test external serial communication, this morning
I realized I need to be able to embed some core types in an arduino
sketch. libpippi is meant to be embedded in other programs
but also in firmware and arduino sketches and so on. There’s a
relatively lightweight pippicore.h for this, with other
pieces available (like mir and microsound and ugens and special oscs
etc) to be included on-demand to keep firmware sizes small, but in this
case I really just want to be able to embed some of libpippi’s internal
types to serialize messages on the arduino side.
To start I split out all the internal constants in libpippi’s core into its own header, and the core datatypes into another. Factory datatypes are still in the main pippicore.h header for now because I don’t think they are really needed. If you want the factory types you want to use their implementations, too. Better to just include the whole pippicore.h header in that case.
I thought I’d have to do some special packaging for arduino to embed it, but after breaking the headers out like this it’s easy to just have my makefile copy the latest constants/types headers from pippi into the sketch directory before building it with arduino-cli.
Now there’s an lpmsg_t struct in my sequencer sketch. Yay!
:-)
The LMDB stack smashing bug is still eluding me. I did some cleanup after work yesterday, trying to tidy up some potential issues with my usage of jack, since I was suspicious the issue was related to the jack callback trying to interact with an LMDB database that had already been closed, but it doesn’t seem like that’s the issue.