[sdiy] Executing guest synthesizer code on stm32f4

nvawter nvawter at media.mit.edu
Sat Jan 3 17:57:02 CET 2015


first, I want to thank everyone for their brilliant and valuable 
replies, as usual for this list =)

second, one reader sent a suggestion to me directly and I just now 
realized it didn't reach the full list and probably should have!

he suggested I look into Axoloti.  I was delighted, b/c it turns out 
Axoloti started a crowdfunding project *literally* the day before I 
asked my question on this list.

Axoloti is a system where you edit synth modular DSP patches in a java 
app, then press a button and it generates C code, compiles it and 
flashes it into your stm32f4 chip over USB!  Unbelievable!

Also, it works okay with the legendary stm32f4 discovery board, but the 
real platform is the designer (Johannes Talemann)'s hardware board which 
includes MIDI jacks, 24-audio and SD slot.  Also, the whole project is 
open source so if you want to make your own hardware running this 
software, go for it!

Here are some links related to Axoloti:
Crowd-funding campaign, highly recommended, costs about $100 for U.S. , 
less for Europeans (shipping)

Home Page:

My page where I talk in further detail about why I think this is an 
important project:


On 2015-01-02 06:09, Roman Sowa wrote:
> This was already mentioned in another words so far, so I'll just chip
> in with a little analogy to good old DOS. Every (almost?) I/O
> operations was done via software interupts, like INT 15 for example.
> That could be also done by simple indirect CALL. Every INT points to
> index table that is located at RAM address starting from 0, and each
> int has its own location. Index table is written by OS at startup, so
> even if OS gets upgraded, the user program still calls the same index,
> even if actual subroutine is at different address now.
> Before execution, user program loads a few registers or a stack with
> input values, calls the software INT. Results are also stored in
> registers or stack.
> Then you provide a list with all available calls and required 
> parameters.
> Roman
> doing that with 80186 back in 1990's
> W dniu 2014-12-30 o 17:16, nvawter pisze:
>> Hello All!
>> I made a nice instrument based on the stm32f4 and I want people to be
>> able to upload their own synth code into it via microphone.  Has 
>> anyone
>> got any suggestions for how to do this?
>> I think in theory the idea is to reserve some space in the linker file
>> for the "guest code" (plug-in).  Then, use the main program to listen 
>> to
>> the microphone, demodulate into the binary, then write the guest 
>> binary
>> block into flash memory.  Then, have the main program call the guest
>> code, leaving all of the sensor variables (such as control voltage, 
>> knob
>> inputs, patch select knob, etc.) in a magic place, have the synth code
>> execute, return a block of data, and have the main program write that 
>> to
>> the DAC.
>> Questions I'm having are: how does the guest code know what ram
>> locations are available?  Should I statically allocate some RAM for 
>> the
>> main program and some for the guest program?  How do I use labels in 
>> the
>> code to jump back and forth between funcions?  E.g. if I write a
>> "CV_to_pitch()" function and keep it in the main program, and I want 
>> the
>> guest code to use that function.  Should I make an intermediate table 
>> of
>> where those functions are in the flash code, for when they move 
>> around,
>> creating my own linker in effect?
>> Has anyone ever done this before?  Are there any reference examples 
>> like
>> this around?  If anyone has any suggestions/tips/ideas, etc, please 
>> let
>> me know.
>> Also, I reached out to the stm32f4 subreddit with the same question, 
>> if
>> anyone would like to respond there, or read the same request for help
>> with different working:
>> http://www.reddit.com/r/stm32f4/comments/2qtnsx/how_would_i_do_this_upload_blocks_of_binary_code/
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy

More information about the Synth-diy mailing list