Hi, im a bit of a noob here, but I was wondering if there is a way to get the source code ( all the C++ code generated) before it gets compiled and use it to run patches on another MCU (let's say one with more power)?
What I mean is, it would be great to use Axoloti patcher as a great prototype code generator to later use in a different board.
Possible?
Get source, before compiled, to use in another MCU
Should be possible if you can get the firmware to run on another board. The firmware did run on the STM32F4-Discovery board, but that one has the same chip as the Axoloti.
there are two separate ways this could be achieved:
take the generated sourcecode and edit it, to compile and work on a teensy directly
port the chibios to teensy 4.0 or 4.1 to make it run axoloti patches native.
Yeah, that was actually what I was wondering if it was possible to get the generated source code. As far as I know, Axoloti compiled to c++ and directly to machine language to the Axoloti Core, no in-between steps. I would imagine the later tinkering would require to add the code of the sound shield Teensy uses plus the CC directories for Teensy´s GPIOs, etc etc.
Not sure what chbios is, but ill look into it.
This things really are beyond my skill level, but ill definitively look into them. Thanks, you've been super helpful and pointed me in a good direction . great to know it is possible.
chibios is the "os" that runs on axoloti and handles usb in/out and sdcard file i/o etc.
when you compile a patch a xpatch.cpp file will be generated in your build directory, it contains the whole patch.
One should note, though, that xpatch.cpp only contains the code for the patch itself (including all the patch cords). It still relies on a number of things being in the flash ROM in the Axoloti, such as:
- Chibios (the multi tasking OS at the heart of the Axoloti)
- The CMSIS DSP library made specially for the STM32 processor series with its ARM core augmented with DSP functionality
- Other common things such as SD card and MIDI managment
Especially CMSIS might be a bit of a stumper, as several Axoloti objects make direct calls to the library (have a look at the code of some of the filter objects for instance). The equivalent functions can certainly be implemented on any other platform, but at a certain amount of development cost.
In the end, the best bet is probably getting the Axoloti running on another more powerful STM32 platform, which would require minimal changes to the firmware. I haven't kept up to date on what's available, but given that the Axoloti is several years old by now, it's likely that there is a more powerful STM32 platform available that it could be ported to.
A couple of years ago I ported the Axoloti to the Audiothingies P6, so that I could run Axoloti patches on the P6 hardware, inluding access to the display and encoders. It was mostly a question of differing GPIO assignments and DAC, and a couple of more complex issues like the clock crystal frequencies being different. But the STM32F405 used in the P6 is quite similar to the STM32F427 used in the Axoloti so the amount of changes needed were rather limited.
Dam, I knew it was not gonna be that "easy".
As for the CMSIS DSP library, I think it shouldn't be a problem. As far as I've seen, the Teensy 4.1 (which is where I want to port the code) has an arm_cortexM7 which uses the same library. But again, this comes from my very limited knowledge on the subject, so im pretty sure im wrong.
Maybe I should also mention what is what I want to do. My plan is to do a more modern version of the CS80, with MPE enabled and the full 16 polyphony. If this project is successful I wanted to, later on, put it into production for sale.
Iv saw some project around the forum where their creators had to cut down on the features because the axoloti was easily reaching the 90% DSP.
Axoloti is a great way to sketch up functional code (especially because I have little to non-codding experience), but the DSP limitations and later overproduction would seem an obstacle.
I hope this last clarify the reasons of why I would want to port the .cpp to another board.
As far as I can make out (I wouldn't count myself an expert on the subject, far from it) the CMSIS library is available for (all) Cortex-M and also Cortex-A processors, so it would certainly include the Cortex-M7.
http://www.keil.com/pack/doc/CMSIS/DSP/html/index.html
Cortex-A is interesting I think because the Raspberry Pi uses Cortex-A CPUs (although more research would be needed to check the exact requirements; there is an extension to ARM CPUs called NEON which provides DSP instructions, but not all SoCs have that; I don't know if CMSIS is dependent on NEON on the Cortex-A series).
Sounds like a nice project, creating a CS80.
yeah, been looking into it with more depth. I think ill just do basic C++ code on the Teensy and if needed look on to the nodes code of the Axoloti for inspiration.
for the time being this seems to be way beyond my pay grade
There have been efforts by user urklang to port Axoloti to the Stm32h7, search for 'next gen axoloti' maybe you can get some insights from there