Some basic questions on Axoloti firmware customization and general programming


#1

Hello guys,
first post here, I just received the board and started a few trials...It is beautiful :slight_smile:

My motivation to use Axoloti is probably different from that of the core Axo users: I would like to learn embedded programming of "audio applications", more than developing patches from the GUI.

I chose Axoloti because it has a lot of extra hw in place, like ADC/DAC, MIDI support, SRAM...

Although I have an engineering background, my knowledge of MCU 'n stuff is close - very close - to zero: I am in the process of trying to figure out the basics, and although this may not be the focus of this Community, there's clearly some very knowledgeable people here, whom I'm hoping to get some help from :blush:

So I ended up reading here how to flash custom firmware onto the Axo (STM32F4xx), and I have a couple of questions.

The first and foremost is: can you point me where to read/study/learn on the topics I am asking about?

I would like to know, roughly, what is the process that takes place when you plug the board?
Is it the USART boot loader in ST's chip which is called, and in turn receives the firmware via USB?

What goes different when you power your Axo in "standalone" mode? Is it just that, if nothing comes from the USART, the execution will eventually start from another location (maybe where a patch code is present)?

Since my understanding of MCUs and of the embedded world is clearly limited, I won't attempt to craft my firmware until I've learnt the ropes: my "plan" is to try to boot Axoloti with its own firmware, then put some test code into RAM using the SWD debug feature, and start learning how to operate both STM32 and peripherials from there.

Do you think this is the right approach?

Thanks for your help,

Mike


#2

You can also consider developing objects for the GUI :slight_smile:

There are a few books that could interest you:
* The Definitive Guide to ARM® Cortex®-M3 and Cortex®-M4
* Digital Signal Processing Using the ARM Cortex M4
I can't comment on their quality, I have not read them.

For the "software side of firmware", there is the ChibiOS book, Chibios is the "real time operating system" that runs on Axoloti.

For the "hardware side of firmware", the STMicro documentation is the reference for all details, but certainly not a step-by-step learning guide:

PM0214 Programming manual
RM0090 Reference manual
STM32F427xx/STM32F429xx Datasheet

For a development setup, I can recommend Eclipse with the GNU ARM C/C++ plugins, in combination with an STLink/v2 (or compatible) SWD debugger. It became pretty easy to install, and works fine on Windows, Mac, Linux...

For doing digital audio, there is a collection of links here: https://sebiik.github.io/community.axoloti.com.backup/t/learning-to-code-axoloti-objects/1520

Code execution starts from flash memory. Only flash rescue mode (holding switch S1 during powerup), causes the processor to jump into the bootloader, the bootloader supports different interfaces, normally DFU (over USB) is used, I haven't tried bootloading over UART.

Nothing different really, firmware initializes, loads and starts a patch if present in flash or on sdcard, and waits for USB communication.


#3

That is a hell of an informative reply @johannes !!

Thanks a lot, I will wade through the plethora of information you gave.

but

Yeah, that might be a way to give back :slight_smile:

I am not a programmer but I have had some decent C and somewhat less decent C++ exposure at various points in my life/career, so after all I might be able to work in that direction.

However, I quickly checked the "learning-to-code-axoloti-objects" link: there is a lot of DSP related stuff but I cannot find anything related to really coding axo objects...

Am I missing something?

Cheers!

Mike


#4

there are a few topics in the axoobject code category related to this:
https://sebiik.github.io/community.axoloti.com.backup/c/axoobject-code

they are a bit 'scattered around' though.

if your using 1.0.10 using the object editor will give you most of what you need, and basically the best way forward is the 'practical' way of taking some existing objects, and modifying them - this way you will learn pretty quickly.
(then search the forum for any questions, as many have already been asked... if you can't find the question just shout in the above category)

a couple of suggestions:
- first get comfortable patching axoloti using existing objects, even if you want to code your own objects... theres a huge amount you can do in axoloti to 'prototype' objects in patches initially.
- get familiar with the data format and in particular Q numbers (search here, you'll find posts about it), its this, and the integer maths surrounding it, these are probably the most frequent questions.
(yes you could convert everything to floats which makes the maths easier, but it also will be less efficient... which is important on a 168mhz processor :slight_smile: )

anyway, just have fun, dive in, and just ask if you have questions....

if you fancy documenting your 'journey', this could be a fantastic resource for other newcomers :slight_smile: